From 9b87dce09b81e65b59c28b7f858149dc74a415d2 Mon Sep 17 00:00:00 2001 From: Jacques Fournier Date: Fri, 18 Nov 2022 19:32:33 +0100 Subject: [PATCH 01/17] feat: with comprehension pattern --- dash/dash.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dash/dash.py b/dash/dash.py index bb8327e670..5bc3ddab10 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -795,14 +795,13 @@ def _generate_scripts_html(self): mode = "dev" if self._dev_tools["props_check"] is True else "prod" - deps = [] - for js_dist_dependency in _dash_renderer._js_dist_dependencies: - dep = {} - for key, value in js_dist_dependency.items(): - dep[key] = value[mode] if isinstance(value, dict) else value - - deps.append(dep) - + deps = [ + { + key: value[mode] if isinstance(value, dict) else value + for key, value in js_dist_dependency.items() + } + for js_dist_dependency in _dash_renderer._js_dist_dependencies + ] dev = self._dev_tools.serve_dev_bundles srcs = ( self._collect_and_register_resources( From 4f7a6656157b4d682d7650467910f0a76a273f98 Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 12 Dec 2022 12:19:28 -0500 Subject: [PATCH 02/17] Fix changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18be0736cd..a46772fb9b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). -## [2.7.0] - 2022-12-12 +## [2.7.1] - 2022-12-12 ### Fixed @@ -14,7 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#2361](https://github.com/plotly/dash/pull/2361) Dependencies upgrade. - Update Plotly.js to v2.16.4 (from v2.16.1): fix several bugs, particularly related to updating mapbox graphs. - - Path release [2.16.4](https://github.com/plotly/plotly.js/releases/tag/v2.16.4) + - Patch release [2.16.4](https://github.com/plotly/plotly.js/releases/tag/v2.16.4) - Patch release [2.16.3](https://github.com/plotly/plotly.js/releases/tag/v2.16.3) - Patch release [2.16.2](https://github.com/plotly/plotly.js/releases/tag/v2.16.2) - [#2363](https://github.com/plotly/dash/pull/2363) Update html attributes for ol From b6eca6851dea93a16f3b2e5c499729b7c3ad582c Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Sat, 17 Dec 2022 09:10:09 -0500 Subject: [PATCH 03/17] 2022 logo as favicon --- dash/favicon.ico | Bin 15406 -> 15086 bytes 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 dash/favicon.ico diff --git a/dash/favicon.ico b/dash/favicon.ico old mode 100755 new mode 100644 index 44954a594aac7ccf26ce8cab9add8e8742caf10a..c48827544cd285174c4bf3e8a201b48bb70100ce GIT binary patch literal 15086 zcmd5@3wTu3wH{sul1%2Dc_owQWbz^q5*~q&1SCKZB>@Bx0^EwARV#+Jyq_8b#YYt` z2DyNO5Ff3=*Q;FV=e4!rsZs%+Hxw2M|C(xB3%vq9|F_gf$cjGnGwEIkj^9h8}R?eqo^xEH6Uke zcwbFfVD$m>{h(c-Q+Nk16_^zrw*f1;ovKd8d|;*^okaR;&|Pjt^+uRPdV=OGK{RZ55z_}iDGK9DF_@n4w z;+N^ykfG7-P_kQ#GqSv@B(=eq8|+e)_ksITbnGlkxc;TCBlG3EiT)*iPA|chc0g|x zZQH{AT){6fzEfNHliR@WnB>{oG?omP!7pTi3`bDzW=EWzWiV1qiQ;Z(-xfY(4Df!| zTFl1s(eS&??cb<>S*Vbjs_*x#Fdi-w=eTCtyqGCMJ*bD{#r2jFm^?N`jO81o<_G08k5e$JQg zM*N(o=SSEN=3xRhD>AKhB_+j2lL2_{1$`@VMW)Q3F%@+wq%NHc^m&Q%_?s`;OWljR zkv}s-$R_dgw}3y3x^?X$%J93?ZL-rv#f4p{OJ2U7C%>7b|AZ~oMc^0y2{xYtyayvO z8{b*Cw~iQ22M-*e{rmROh}v581KW;DUbmYbUAmP1_{k@<`L$Q6ATLkI0K28)q9S^8 z>sI>1#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7xN4V*dB$Nc-vYga|*d*s_t6-njC*j4u-Jru-Qi3tRC`LTT zcCzExCCjfP_Fk0a2Q8Kas4ETyTnqN}$`Y5s=f^&w`$J2qk@#BM{2(mmWv*Kl2F>-c zqPQKUL;PxWS`7IHJ4*1+LQ82L%Pp|yBY2lAzX0bMxkY{CI}F#dsEx=j^&N31fIs!} zPe4|wV{!ubi;-U+=mnMf#jvG0f#x0HdbZaKwpnVU$r_2LdAzy+g$TwJ=>r=`9tQRc zeGg9uW8s?`<6v{sawttxk@J-ppNA9FlJ#GltfYPib2iX_SZZTHzgWBnp?^o;gg$oX z?lcxJM}FvQcXg&S|GV!<4wxcsv1?tR0vakK;Lu4E%?m;Nv2-Mm9d#pFelziP2ae@J z-%vjE5+1EvlK}HTg!HftWBNG0kH{W{xzv0=>au-TD)sv)Bhuh=q!9*v6Xqn~*bf{t z!oGeoK9X0?<2$G&%a8Vhc?%!)XVcvBRq6iE(5^HDQT?NQs6WhI5%SHC_Mv+i?%^BP z#j<=B9;S9>2<$(aOLSn>k3BvQC#WUMk2sjifM*vz-&{b4%853DV^~Y%5ZZ Date: Sat, 17 Dec 2022 09:25:59 -0500 Subject: [PATCH 04/17] changelog for new favicon --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a46772fb9b..41c8259c06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## Unreleased + +### Updated + +- [#2367](https://github.com/plotly/dash/pull/2367) Updated the default `favicon.ico` to the current Plotly logo + ## [2.7.1] - 2022-12-12 ### Fixed From 13911b3dcf4e1247ec9fac752726d219863f7ca5 Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 16 Jan 2023 13:57:14 -0500 Subject: [PATCH 05/17] Add test pmc update subtree ordering. --- tests/integration/callbacks/test_wildcards.py | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/tests/integration/callbacks/test_wildcards.py b/tests/integration/callbacks/test_wildcards.py index b1bf5c71d5..d807e0bef3 100644 --- a/tests/integration/callbacks/test_wildcards.py +++ b/tests/integration/callbacks/test_wildcards.py @@ -483,3 +483,72 @@ def assert_callback_context(items_text): dash_duo.wait_for_text_to_equal("#totals", "3 total item(s)") assert_count(3) assert_callback_context(["apples", "bananas", "carrots"]) + + +def test_cbwc007_pmc_update_subtree_ordering(dash_duo): + # Test for regression bug #2368, updated pmc subtree should keep order. + app = dash.Dash(__name__) + + app.layout = html.Div( + [ + html.Button("refresh options", id="refresh-options"), + html.Br(), + html.Div( + [ + *[ + dcc.Dropdown( + id={"type": "demo-options", "index": i}, + placeholder=f"dropdown-{i}", + style={"width": "200px"}, + ) + for i in range(2) + ], + dcc.Dropdown( + id={"type": "demo-options", "index": 2}, + options=[f"option2-{i}" for i in range(3)], + placeholder="dropdown-2", + style={"width": "200px"}, + ), + ], + id="dropdown-container", + ), + html.Br(), + html.Pre(id="selected-values"), + ], + style={"padding": "50px"}, + ) + + @app.callback( + [ + Output({"type": "demo-options", "index": 0}, "options"), + Output({"type": "demo-options", "index": 1}, "options"), + ], + Input("refresh-options", "n_clicks"), + prevent_initial_call=True, + ) + def refresh_options(_): + return [[f"option0-{i}" for i in range(3)], [f"option1-{i}" for i in range(3)]] + + @app.callback( + Output("selected-values", "children"), + Input({"type": "demo-options", "index": ALL}, "value"), + ) + def update_selected_values(values): + return str(values) + + dash_duo.start_server(app) + dash_duo.select_dcc_dropdown(".dash-dropdown:nth-child(3)", index=2) + + dash_duo.wait_for_text_to_equal("#selected-values", "[None, None, 'option2-2']") + + dash_duo.wait_for_element("#refresh-options").click() + + dash_duo.select_dcc_dropdown(".dash-dropdown:nth-child(2)", index=2) + dash_duo.wait_for_text_to_equal( + "#selected-values", "[None, 'option1-2', 'option2-2']" + ) + + dash_duo.select_dcc_dropdown(".dash-dropdown:nth-child(1)", index=2) + dash_duo.wait_for_text_to_equal( + "#selected-values", "['option0-2', 'option1-2', 'option2-2']" + ) From 94521e3026d694cb0b9489a0681d05967f3ae45c Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 16 Jan 2023 14:03:48 -0500 Subject: [PATCH 06/17] Fix pmc path ordering update. --- dash/dash-renderer/src/actions/paths.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/dash/dash-renderer/src/actions/paths.js b/dash/dash-renderer/src/actions/paths.js index ead7507b45..dd0c5d4cfd 100644 --- a/dash/dash-renderer/src/actions/paths.js +++ b/dash/dash-renderer/src/actions/paths.js @@ -3,9 +3,11 @@ import { filter, find, forEachObjIndexed, + insert, path, propEq, - props + props, + indexOf } from 'ramda'; import {crawlLayout} from './utils'; @@ -46,7 +48,14 @@ export function computePaths(subTree, startingPath, oldPaths, events) { const values = props(keys, id); const keyStr = keys.join(','); const paths = (objs[keyStr] = objs[keyStr] || []); - paths.push({values, path: concat(startingPath, itempath)}); + const oldie = oldObjs[keyStr] || []; + const item = {values, path: concat(startingPath, itempath)}; + const index = indexOf(item, oldie); + if (index === -1) { + paths.push(item); + } else { + objs[keyStr] = insert(index, item, paths); + } } else { strs[id] = concat(startingPath, itempath); } From c2f3faf4efe8bc6093e70ffe68570af0f768202a Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 16 Jan 2023 14:10:34 -0500 Subject: [PATCH 07/17] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41c8259c06..28830d5fb3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## Unreleased +## Fixed + +- [#2388](https://github.com/plotly/dash/pull/2388) Fix [#2368](https://github.com/plotly/dash/issues/2368) ordering or Pattern Matching ALL after update to the subtree. + ### Updated - [#2367](https://github.com/plotly/dash/pull/2367) Updated the default `favicon.ico` to the current Plotly logo From d0ac9d6e3bb70d8d23d529d048f9afb113ca0ab3 Mon Sep 17 00:00:00 2001 From: AnnMarieW Date: Tue, 17 Jan 2023 13:52:45 -0700 Subject: [PATCH 08/17] re-create pr#2370 --- CHANGELOG.md | 5 +++ .../scripts/generate-components.js | 14 ++++++-- .../tests/test_integration.py | 32 +++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41c8259c06..ec582e2a93 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ This project adheres to [Semantic Versioning](https://semver.org/). ## Unreleased + +### Added + +- [#2370](https://github.com/plotly/dash/pull/2370) Added `disable_n_clicks` prop to all html components to make it possible to remove onclick event listeners + ### Updated - [#2367](https://github.com/plotly/dash/pull/2367) Updated the default `favicon.ico` to the current Plotly logo diff --git a/components/dash-html-components/scripts/generate-components.js b/components/dash-html-components/scripts/generate-components.js index 13532f88b8..b548c385e4 100644 --- a/components/dash-html-components/scripts/generate-components.js +++ b/components/dash-html-components/scripts/generate-components.js @@ -138,6 +138,12 @@ function generatePropTypes(element, attributes) { */ 'n_clicks_timestamp': PropTypes.number, + /** + * When True, this will disable the n_clicks prop. Use this to remove + * event listeners that may interfere with screen readers. + */ + 'disable_n_clicks': PropTypes.bool, + /** * A unique identifier for the component, used to improve * performance by React.js while rendering components @@ -264,13 +270,17 @@ const ${Component} = (props) => { dataAttributes['data-dash-is-loading'] = true; } + /* remove unnecessary onClick event listeners */ + const isStatic = props.disable_n_clicks || !props.id; return ( <${element} - onClick={() => props.setProps({ + {...(!isStatic && {onClick: + () => props.setProps({ n_clicks: props.n_clicks + 1, n_clicks_timestamp: Date.now() + }) })} - {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)} + {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)} {...dataAttributes} > {props.children} diff --git a/components/dash-html-components/tests/test_integration.py b/components/dash-html-components/tests/test_integration.py index 21cbbfd2ca..648c869df5 100644 --- a/components/dash-html-components/tests/test_integration.py +++ b/components/dash-html-components/tests/test_integration.py @@ -105,3 +105,35 @@ def update_output(*args): assert call_count.value == 3 assert not dash_duo.get_logs() + + def test_click_static(dash_duo): + app = Dash(__name__) + + app.layout = html.Div( + [ + html.Div("no event listener", className="div-1"), + html.Div("event listener", id="div-2", n_clicks=0), + html.Div("no event listener", id="div-3", n_clicks=0, disable_n_clicks=True), + html.Div("event listener", id="div-4", n_clicks=0, disable_n_clicks=False), + html.Div(id="div-output"), + ] + ) + + @app.callback( + Output("div-output", "children"), + Input("div-2", "n_clicks"), + Input("div-3", "n_clicks"), + Input("div-4", "n_clicks"), + prevent_initial_call=True, + ) + def update(n2, n3, n4): + return f"{n2}, {n3}, {n4}" + + dash_duo.start_server(app) + dash_duo.find_element("#div-2").click() + dash_duo.find_element("#div-3").click() + dash_duo.find_element("#div-4").click() + + dash_duo.wait_for_text_to_equal("#div-output", "1, 0, 1") + + assert not dash_duo.get_logs() From a1b8491330e09a23ee96c9b54c8779c18a04ad36 Mon Sep 17 00:00:00 2001 From: AnnMarieW Date: Tue, 17 Jan 2023 14:15:02 -0700 Subject: [PATCH 09/17] updated CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec582e2a93..76c1600f8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Added -- [#2370](https://github.com/plotly/dash/pull/2370) Added `disable_n_clicks` prop to all html components to make it possible to remove onclick event listeners +- [#2389](https://github.com/plotly/dash/pull/2389) Added `disable_n_clicks` prop to all html components to make it possible to remove onclick event listeners ### Updated From 5815f008fd068cb170505004bc757fe2a9404463 Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 23 Jan 2023 13:26:07 -0500 Subject: [PATCH 10/17] Update plotly.js to 2.18.0 from 2.16.4 --- components/dash-core-components/package-lock.json | 14 +++++++------- components/dash-core-components/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/dash-core-components/package-lock.json b/components/dash-core-components/package-lock.json index 37e2a46619..4c3ab8d3e5 100644 --- a/components/dash-core-components/package-lock.json +++ b/components/dash-core-components/package-lock.json @@ -22,7 +22,7 @@ "mathjax": "^3.2.2", "moment": "^2.29.4", "node-polyfill-webpack-plugin": "^2.0.1", - "plotly.js-dist-min": "2.16.4", + "plotly.js-dist-min": "2.18.0", "prop-types": "^15.8.1", "ramda": "^0.28.0", "rc-slider": "^9.7.5", @@ -6578,9 +6578,9 @@ } }, "node_modules/plotly.js-dist-min": { - "version": "2.16.4", - "resolved": "https://registry.npmjs.org/plotly.js-dist-min/-/plotly.js-dist-min-2.16.4.tgz", - "integrity": "sha512-cebRG7Im/4sp/Ah7hg4mpuNHRUWF8de77c8KyWrkd9ioiLK1W/LRnr67+prGnSrpAiY4lq1el8LG4PBlCQcXAA==" + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/plotly.js-dist-min/-/plotly.js-dist-min-2.18.0.tgz", + "integrity": "sha512-IB++Ow7uvc4PZIH2sNZx/T3Zf/QBJ8M4UauADoz3GBumYuwgH2rqba2b1XS7xpmbnybIQUVnB2pCMeIpu9is7w==" }, "node_modules/postcss": { "version": "8.4.18", @@ -13969,9 +13969,9 @@ } }, "plotly.js-dist-min": { - "version": "2.16.4", - "resolved": "https://registry.npmjs.org/plotly.js-dist-min/-/plotly.js-dist-min-2.16.4.tgz", - "integrity": "sha512-cebRG7Im/4sp/Ah7hg4mpuNHRUWF8de77c8KyWrkd9ioiLK1W/LRnr67+prGnSrpAiY4lq1el8LG4PBlCQcXAA==" + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/plotly.js-dist-min/-/plotly.js-dist-min-2.18.0.tgz", + "integrity": "sha512-IB++Ow7uvc4PZIH2sNZx/T3Zf/QBJ8M4UauADoz3GBumYuwgH2rqba2b1XS7xpmbnybIQUVnB2pCMeIpu9is7w==" }, "postcss": { "version": "8.4.18", diff --git a/components/dash-core-components/package.json b/components/dash-core-components/package.json index 971414394e..52a00f3122 100644 --- a/components/dash-core-components/package.json +++ b/components/dash-core-components/package.json @@ -49,7 +49,7 @@ "mathjax": "^3.2.2", "moment": "^2.29.4", "node-polyfill-webpack-plugin": "^2.0.1", - "plotly.js-dist-min": "2.16.4", + "plotly.js-dist-min": "2.18.0", "prop-types": "^15.8.1", "ramda": "^0.28.0", "rc-slider": "^9.7.5", From dafe0bb364494f0d3297c1f9aeeee601bf5feadc Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 23 Jan 2023 13:43:39 -0500 Subject: [PATCH 11/17] Update json5 --- .../dash-component-plugins/package-lock.json | 24 ++++---- .../package-lock.json | 12 ++-- .../package-lock.json | 12 ++-- .../package-lock.json | 12 ++-- .../dash-test-components/package-lock.json | 12 ++-- .../dash-core-components/package-lock.json | 48 +++++++-------- .../dash-html-components/package-lock.json | 24 ++++---- components/dash-table/package-lock.json | 60 +++++++++---------- dash/dash-renderer/package-lock.json | 24 ++++---- 9 files changed, 114 insertions(+), 114 deletions(-) diff --git a/@plotly/dash-component-plugins/package-lock.json b/@plotly/dash-component-plugins/package-lock.json index d75c92c449..b6768ba865 100644 --- a/@plotly/dash-component-plugins/package-lock.json +++ b/@plotly/dash-component-plugins/package-lock.json @@ -2662,9 +2662,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -2692,9 +2692,9 @@ } }, "node_modules/loader-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", - "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "dependencies": { "big.js": "^5.2.2", @@ -5436,9 +5436,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "kind-of": { @@ -5454,9 +5454,9 @@ "dev": true }, "loader-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", - "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "requires": { "big.js": "^5.2.2", diff --git a/@plotly/dash-generator-test-component-nested/package-lock.json b/@plotly/dash-generator-test-component-nested/package-lock.json index d7be06ed8a..c84ed9d8c6 100644 --- a/@plotly/dash-generator-test-component-nested/package-lock.json +++ b/@plotly/dash-generator-test-component-nested/package-lock.json @@ -3661,9 +3661,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "bin": { "json5": "lib/cli.js" }, @@ -7945,9 +7945,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "kind-of": { "version": "6.0.3", diff --git a/@plotly/dash-generator-test-component-standard/package-lock.json b/@plotly/dash-generator-test-component-standard/package-lock.json index 0d19482d23..1a7dd86850 100644 --- a/@plotly/dash-generator-test-component-standard/package-lock.json +++ b/@plotly/dash-generator-test-component-standard/package-lock.json @@ -3697,9 +3697,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "bin": { "json5": "lib/cli.js" }, @@ -7968,9 +7968,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "kind-of": { "version": "6.0.3", diff --git a/@plotly/dash-generator-test-component-typescript/package-lock.json b/@plotly/dash-generator-test-component-typescript/package-lock.json index bb1a368c13..612f9c2078 100644 --- a/@plotly/dash-generator-test-component-typescript/package-lock.json +++ b/@plotly/dash-generator-test-component-typescript/package-lock.json @@ -6523,9 +6523,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -13469,9 +13469,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "kind-of": { diff --git a/@plotly/dash-test-components/package-lock.json b/@plotly/dash-test-components/package-lock.json index 6221f9957e..d016f5c91c 100644 --- a/@plotly/dash-test-components/package-lock.json +++ b/@plotly/dash-test-components/package-lock.json @@ -3712,9 +3712,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "bin": { "json5": "lib/cli.js" }, @@ -7995,9 +7995,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "kind-of": { "version": "6.0.3", diff --git a/components/dash-core-components/package-lock.json b/components/dash-core-components/package-lock.json index 4c3ab8d3e5..7feefccc7c 100644 --- a/components/dash-core-components/package-lock.json +++ b/components/dash-core-components/package-lock.json @@ -5561,9 +5561,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "bin": { "json5": "lib/cli.js" }, @@ -5645,9 +5645,9 @@ } }, "node_modules/loader-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.3.tgz", - "integrity": "sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "dependencies": { "big.js": "^5.2.2", @@ -8124,9 +8124,9 @@ } }, "node_modules/styled-jsx/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -8417,9 +8417,9 @@ } }, "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -13182,9 +13182,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "jsx-ast-utils": { "version": "3.3.3", @@ -13244,9 +13244,9 @@ "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==" }, "loader-utils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.3.tgz", - "integrity": "sha512-THWqIsn8QRnvLl0shHYVBN9syumU8pYWEHPTmkiVGd+7K5eFNVSY6AJhRvgGF70gg1Dz+l/k8WicvFCxdEs60A==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", "dev": true, "requires": { "big.js": "^5.2.2", @@ -15127,9 +15127,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -15354,9 +15354,9 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" diff --git a/components/dash-html-components/package-lock.json b/components/dash-html-components/package-lock.json index 27f7f84d67..2df84ca2e2 100644 --- a/components/dash-html-components/package-lock.json +++ b/components/dash-html-components/package-lock.json @@ -4799,9 +4799,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -6717,9 +6717,9 @@ } }, "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -10831,9 +10831,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsprim": { @@ -12287,9 +12287,9 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" diff --git a/components/dash-table/package-lock.json b/components/dash-table/package-lock.json index cce250a8b8..9a86754554 100644 --- a/components/dash-table/package-lock.json +++ b/components/dash-table/package-lock.json @@ -3393,9 +3393,9 @@ } }, "node_modules/@storybook/builder-webpack4/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -5281,9 +5281,9 @@ } }, "node_modules/@storybook/core-common/node_modules/loader-utils/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -6071,9 +6071,9 @@ "dev": true }, "node_modules/@storybook/core-server/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -7122,9 +7122,9 @@ } }, "node_modules/@storybook/manager-webpack4/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -18481,9 +18481,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -30134,9 +30134,9 @@ } }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -31578,9 +31578,9 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -32230,9 +32230,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -33082,9 +33082,9 @@ } }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" @@ -41880,9 +41880,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsonfile": { diff --git a/dash/dash-renderer/package-lock.json b/dash/dash-renderer/package-lock.json index 57ca139608..008c22be8d 100644 --- a/dash/dash-renderer/package-lock.json +++ b/dash/dash-renderer/package-lock.json @@ -6411,9 +6411,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -9393,9 +9393,9 @@ } }, "node_modules/tsconfig-paths/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -14779,9 +14779,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsonfile": { @@ -17017,9 +17017,9 @@ }, "dependencies": { "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" From cdecc7fd4084667cc8555891e78a933a4a6147b2 Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 23 Jan 2023 14:11:49 -0500 Subject: [PATCH 12/17] Update decode-uri-components --- @plotly/eslint-config-dash/package-lock.json | 12 ++++++------ components/dash-table/package-lock.json | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/@plotly/eslint-config-dash/package-lock.json b/@plotly/eslint-config-dash/package-lock.json index 752f7540e7..0cb035b623 100644 --- a/@plotly/eslint-config-dash/package-lock.json +++ b/@plotly/eslint-config-dash/package-lock.json @@ -1731,9 +1731,9 @@ "dev": true }, "node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "dependencies": { "minimist": "^1.2.0" @@ -3775,9 +3775,9 @@ "dev": true }, "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", "dev": true, "requires": { "minimist": "^1.2.0" diff --git a/components/dash-table/package-lock.json b/components/dash-table/package-lock.json index 9a86754554..5b253144fe 100644 --- a/components/dash-table/package-lock.json +++ b/components/dash-table/package-lock.json @@ -13346,9 +13346,9 @@ } }, "node_modules/decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true, "engines": { "node": ">=0.10" @@ -37952,9 +37952,9 @@ "dev": true }, "decode-uri-component": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", - "integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", + "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", "dev": true }, "decompress-response": { From 23bf40eb258c6fd885e744430b5d7b70ac2e183c Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 23 Jan 2023 14:40:11 -0500 Subject: [PATCH 13/17] Update changelog. --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5224136239..5da3e5dc57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -[# Change Log for Dash +# Change Log for Dash All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). @@ -15,6 +15,11 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Updated - [#2367](https://github.com/plotly/dash/pull/2367) Updated the default `favicon.ico` to the current Plotly logo +- [#2394](https://github.com/plotly/dash/pull/2394) Update Plotly.js to v2.18.0 from v2.16.4. + - Feature release [2.18.0](https://github.com/plotly/plotly.js/releases/tag/v2.18.0) + - Patch release [2.17.1](https://github.com/plotly/plotly.js/releases/tag/v2.17.1) + - Feature release [2.17.0](https://github.com/plotly/plotly.js/releases/tag/v2.17.0) + - Patch release [2.16.5](https://github.com/plotly/plotly.js/releases/tag/v2.16.5) ## [2.7.1] - 2022-12-12 From 6096582f5f8203528fdfa70b7e5555c93e7e34e3 Mon Sep 17 00:00:00 2001 From: Philippe Duval Date: Mon, 23 Jan 2023 16:27:34 -0500 Subject: [PATCH 14/17] Update CHANGELOG.md Co-authored-by: Alex Johnson --- CHANGELOG.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5da3e5dc57..c85064f91d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,10 +16,9 @@ This project adheres to [Semantic Versioning](https://semver.org/). - [#2367](https://github.com/plotly/dash/pull/2367) Updated the default `favicon.ico` to the current Plotly logo - [#2394](https://github.com/plotly/dash/pull/2394) Update Plotly.js to v2.18.0 from v2.16.4. - - Feature release [2.18.0](https://github.com/plotly/plotly.js/releases/tag/v2.18.0) - - Patch release [2.17.1](https://github.com/plotly/plotly.js/releases/tag/v2.17.1) - - Feature release [2.17.0](https://github.com/plotly/plotly.js/releases/tag/v2.17.0) - - Patch release [2.16.5](https://github.com/plotly/plotly.js/releases/tag/v2.16.5) + - Feature release [2.18.0](https://github.com/plotly/plotly.js/releases/tag/v2.18.0) adds `sync` tickmode, so several axes can share ticks and gridlines + - Feature release [2.17.0](https://github.com/plotly/plotly.js/releases/tag/v2.17.0) adds automargin for multiple Y axes, a grouped mode for `scatter` traces, and rounded corners on `treemap` traces + - Patch releases [2.17.1](https://github.com/plotly/plotly.js/releases/tag/v2.17.1) and [2.16.5](https://github.com/plotly/plotly.js/releases/tag/v2.16.5) fix various bugs ## [2.7.1] - 2022-12-12 From 90a732972fb7beafe1023694ad5179fa2404436c Mon Sep 17 00:00:00 2001 From: philippe Date: Mon, 23 Jan 2023 17:13:00 -0500 Subject: [PATCH 15/17] Update attributes.json --- .../scripts/data/attributes.json | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/components/dash-html-components/scripts/data/attributes.json b/components/dash-html-components/scripts/data/attributes.json index 9f02a5c84c..281df7b774 100644 --- a/components/dash-html-components/scripts/data/attributes.json +++ b/components/dash-html-components/scripts/data/attributes.json @@ -93,7 +93,6 @@ }, "checked": { "elements": [ - "command", "input" ], "description": "Indicates whether the element should be checked on page load." @@ -202,7 +201,6 @@ "disabled": { "elements": [ "button", - "command", "fieldset", "input", "keygen", @@ -344,12 +342,6 @@ ], "description": "Defines a pragma directive." }, - "icon": { - "elements": [ - "command" - ], - "description": "Specifies a picture which represents the command." - }, "id": { "elements": [ "Globalattribute" @@ -539,12 +531,6 @@ ], "description": "Indicates whether the whole resource, parts of it or nothing should be preloaded." }, - "radioGroup": { - "elements": [ - "command" - ], - "description": "" - }, "readOnly": { "elements": [ "input", @@ -733,7 +719,6 @@ "elements": [ "button", "input", - "command", "embed", "object", "ol", @@ -967,13 +952,6 @@ "httpEquiv", "name" ], - "command": [ - "checked", - "disabled", - "icon", - "radioGroup", - "type" - ], "blockquote": [ "cite" ], From 9dfa9c92ea14c084cd17bcdd938f0cc29c7d0de4 Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 24 Jan 2023 09:28:29 -0500 Subject: [PATCH 16/17] Version 2.8.0 --- CHANGELOG.md | 2 +- components/dash-core-components/package-lock.json | 4 ++-- components/dash-core-components/package.json | 2 +- components/dash-html-components/package-lock.json | 4 ++-- components/dash-html-components/package.json | 2 +- components/dash-table/package-lock.json | 4 ++-- components/dash-table/package.json | 2 +- dash/_dash_renderer.py | 4 ++-- dash/dash-renderer/package-lock.json | 4 ++-- dash/dash-renderer/package.json | 2 +- dash/version.py | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c85064f91d..e115cbc2a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). -## Unreleased +## [2.8.0] - 2023-01-24 ### Added diff --git a/components/dash-core-components/package-lock.json b/components/dash-core-components/package-lock.json index 7feefccc7c..784a0864b5 100644 --- a/components/dash-core-components/package-lock.json +++ b/components/dash-core-components/package-lock.json @@ -1,12 +1,12 @@ { "name": "dash-core-components", - "version": "2.7.1", + "version": "2.8.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dash-core-components", - "version": "2.7.1", + "version": "2.8.0", "license": "MIT", "dependencies": { "@fortawesome/fontawesome-svg-core": "1.2.36", diff --git a/components/dash-core-components/package.json b/components/dash-core-components/package.json index 52a00f3122..38696cfe6f 100644 --- a/components/dash-core-components/package.json +++ b/components/dash-core-components/package.json @@ -1,6 +1,6 @@ { "name": "dash-core-components", - "version": "2.7.1", + "version": "2.8.0", "description": "Core component suite for Dash", "repository": { "type": "git", diff --git a/components/dash-html-components/package-lock.json b/components/dash-html-components/package-lock.json index 2df84ca2e2..6db8fa8868 100644 --- a/components/dash-html-components/package-lock.json +++ b/components/dash-html-components/package-lock.json @@ -1,12 +1,12 @@ { "name": "dash-html-components", - "version": "2.0.7", + "version": "2.0.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dash-html-components", - "version": "2.0.7", + "version": "2.0.8", "license": "MIT", "dependencies": { "prop-types": "^15.8.1", diff --git a/components/dash-html-components/package.json b/components/dash-html-components/package.json index 3a65587b36..808d28db80 100644 --- a/components/dash-html-components/package.json +++ b/components/dash-html-components/package.json @@ -1,6 +1,6 @@ { "name": "dash-html-components", - "version": "2.0.7", + "version": "2.0.8", "description": "Vanilla HTML components for Dash", "main": "lib/index.js", "repository": { diff --git a/components/dash-table/package-lock.json b/components/dash-table/package-lock.json index 5b253144fe..1018010f12 100644 --- a/components/dash-table/package-lock.json +++ b/components/dash-table/package-lock.json @@ -1,12 +1,12 @@ { "name": "dash-table", - "version": "5.2.1", + "version": "5.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dash-table", - "version": "5.2.1", + "version": "5.2.2", "license": "MIT", "devDependencies": { "@babel/cli": "^7.19.3", diff --git a/components/dash-table/package.json b/components/dash-table/package.json index 8e56403512..b0f4c6b2df 100644 --- a/components/dash-table/package.json +++ b/components/dash-table/package.json @@ -1,6 +1,6 @@ { "name": "dash-table", - "version": "5.2.1", + "version": "5.2.2", "description": "Dash table", "repository": { "type": "git", diff --git a/dash/_dash_renderer.py b/dash/_dash_renderer.py index 4cd2ab4861..43d5588d6b 100644 --- a/dash/_dash_renderer.py +++ b/dash/_dash_renderer.py @@ -1,4 +1,4 @@ -__version__ = "1.14.4" +__version__ = "1.14.5" _js_dist_dependencies = [ { @@ -39,7 +39,7 @@ { "relative_package_path": "dash-renderer/build/dash_renderer.min.js", "dev_package_path": "dash-renderer/build/dash_renderer.dev.js", - "external_url": "https://unpkg.com/dash-renderer@1.14.4" + "external_url": "https://unpkg.com/dash-renderer@1.14.5" "/build/dash_renderer.min.js", "namespace": "dash", }, diff --git a/dash/dash-renderer/package-lock.json b/dash/dash-renderer/package-lock.json index 008c22be8d..04a64702d5 100644 --- a/dash/dash-renderer/package-lock.json +++ b/dash/dash-renderer/package-lock.json @@ -1,12 +1,12 @@ { "name": "dash-renderer", - "version": "1.14.4", + "version": "1.14.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "dash-renderer", - "version": "1.14.4", + "version": "1.14.5", "license": "MIT", "dependencies": { "@babel/polyfill": "^7.12.1", diff --git a/dash/dash-renderer/package.json b/dash/dash-renderer/package.json index 041047308b..122a795464 100644 --- a/dash/dash-renderer/package.json +++ b/dash/dash-renderer/package.json @@ -1,6 +1,6 @@ { "name": "dash-renderer", - "version": "1.14.4", + "version": "1.14.5", "description": "render dash components in react", "main": "build/dash_renderer.min.js", "scripts": { diff --git a/dash/version.py b/dash/version.py index 7a38ae0629..892994aa6c 100644 --- a/dash/version.py +++ b/dash/version.py @@ -1 +1 @@ -__version__ = "2.7.1" +__version__ = "2.8.0" From bb491b2d3e7c2f2a2a97fc6fad5e975a80a700e2 Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 24 Jan 2023 10:05:31 -0500 Subject: [PATCH 17/17] Artifacts for 2.8.0 --- dash/dash-renderer/build/dash_renderer.dev.js | 13 +- dash/dash-renderer/build/dash_renderer.min.js | 2 +- dash/dash_table/bundle.js | 2 +- dash/dash_table/bundle.js.map | 2 +- dash/dash_table/demo.js | 2 +- dash/dash_table/demo.js.map | 2 +- dash/dash_table/package-info.json | 2 +- dash/dcc/async-plotlyjs.js | 3 +- dash/dcc/dash_core_components.js | 2 +- dash/dcc/dash_core_components.js.map | 2 +- dash/dcc/package-info.json | 4 +- dash/dcc/plotly.min.js | 65 +- dash/html/A.py | 7 + dash/html/Abbr.py | 7 + dash/html/Acronym.py | 7 + dash/html/Address.py | 7 + dash/html/Area.py | 7 + dash/html/Article.py | 7 + dash/html/Aside.py | 7 + dash/html/Audio.py | 7 + dash/html/B.py | 7 + dash/html/Base.py | 7 + dash/html/Basefont.py | 7 + dash/html/Bdi.py | 7 + dash/html/Bdo.py | 7 + dash/html/Big.py | 7 + dash/html/Blink.py | 7 + dash/html/Blockquote.py | 7 + dash/html/Br.py | 7 + dash/html/Button.py | 7 + dash/html/Canvas.py | 7 + dash/html/Caption.py | 7 + dash/html/Center.py | 7 + dash/html/Cite.py | 7 + dash/html/Code.py | 7 + dash/html/Col.py | 7 + dash/html/Colgroup.py | 7 + dash/html/Content.py | 7 + dash/html/Data.py | 7 + dash/html/Datalist.py | 7 + dash/html/Dd.py | 7 + dash/html/Del.py | 7 + dash/html/Details.py | 7 + dash/html/Dfn.py | 7 + dash/html/Dialog.py | 7 + dash/html/Div.py | 7 + dash/html/Dl.py | 7 + dash/html/Dt.py | 7 + dash/html/Em.py | 7 + dash/html/Embed.py | 7 + dash/html/Fieldset.py | 7 + dash/html/Figcaption.py | 7 + dash/html/Figure.py | 7 + dash/html/Font.py | 7 + dash/html/Footer.py | 7 + dash/html/Form.py | 7 + dash/html/Frame.py | 7 + dash/html/Frameset.py | 7 + dash/html/H1.py | 7 + dash/html/H2.py | 7 + dash/html/H3.py | 7 + dash/html/H4.py | 7 + dash/html/H5.py | 7 + dash/html/H6.py | 7 + dash/html/Header.py | 7 + dash/html/Hgroup.py | 7 + dash/html/Hr.py | 7 + dash/html/I.py | 7 + dash/html/Iframe.py | 7 + dash/html/Img.py | 7 + dash/html/Ins.py | 7 + dash/html/Kbd.py | 7 + dash/html/Keygen.py | 7 + dash/html/Label.py | 7 + dash/html/Legend.py | 7 + dash/html/Li.py | 7 + dash/html/Link.py | 7 + dash/html/Main.py | 7 + dash/html/MapEl.py | 7 + dash/html/Mark.py | 7 + dash/html/Marquee.py | 7 + dash/html/Meta.py | 7 + dash/html/Meter.py | 7 + dash/html/Nav.py | 7 + dash/html/Nobr.py | 7 + dash/html/Noscript.py | 7 + dash/html/ObjectEl.py | 7 + dash/html/Ol.py | 7 + dash/html/Optgroup.py | 7 + dash/html/Option.py | 7 + dash/html/Output.py | 7 + dash/html/P.py | 7 + dash/html/Param.py | 7 + dash/html/Picture.py | 7 + dash/html/Plaintext.py | 7 + dash/html/Pre.py | 7 + dash/html/Progress.py | 7 + dash/html/Q.py | 7 + dash/html/Rb.py | 7 + dash/html/Rp.py | 7 + dash/html/Rt.py | 7 + dash/html/Rtc.py | 7 + dash/html/Ruby.py | 7 + dash/html/S.py | 7 + dash/html/Samp.py | 7 + dash/html/Script.py | 7 + dash/html/Section.py | 7 + dash/html/Select.py | 7 + dash/html/Shadow.py | 7 + dash/html/Slot.py | 7 + dash/html/Small.py | 7 + dash/html/Source.py | 7 + dash/html/Spacer.py | 7 + dash/html/Span.py | 7 + dash/html/Strike.py | 7 + dash/html/Strong.py | 7 + dash/html/Sub.py | 7 + dash/html/Summary.py | 7 + dash/html/Sup.py | 7 + dash/html/Table.py | 7 + dash/html/Tbody.py | 7 + dash/html/Td.py | 7 + dash/html/Template.py | 7 + dash/html/Textarea.py | 7 + dash/html/Tfoot.py | 7 + dash/html/Th.py | 7 + dash/html/Thead.py | 7 + dash/html/Time.py | 7 + dash/html/Title.py | 7 + dash/html/Tr.py | 7 + dash/html/Track.py | 7 + dash/html/U.py | 7 + dash/html/Ul.py | 7 + dash/html/Var.py | 7 + dash/html/Video.py | 7 + dash/html/Wbr.py | 7 + dash/html/Xmp.py | 7 + dash/html/dash_html_components.min.js | 2 +- dash/html/dash_html_components.min.js.map | 2 +- dash/html/metadata.json | 875 ++++++++++++++++++ dash/html/package-info.json | 2 +- 141 files changed, 1778 insertions(+), 79 deletions(-) diff --git a/dash/dash-renderer/build/dash_renderer.dev.js b/dash/dash-renderer/build/dash_renderer.dev.js index 42ff463648..422263e1b0 100644 --- a/dash/dash-renderer/build/dash_renderer.dev.js +++ b/dash/dash-renderer/build/dash_renderer.dev.js @@ -5206,10 +5206,17 @@ function computePaths(subTree, startingPath, oldPaths, events) { var values = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.props)(keys, id); var keyStr = keys.join(','); var paths = objs[keyStr] = objs[keyStr] || []; - paths.push({ + var oldie = oldObjs[keyStr] || []; + var item = { values, path: (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(startingPath, itempath) - }); + }; + var index = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.indexOf)(item, oldie); + if (index === -1) { + paths.push(item); + } else { + objs[keyStr] = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.insert)(index, item, paths); + } } else { strs[id] = (0,ramda__WEBPACK_IMPORTED_MODULE_0__.concat)(startingPath, itempath); } @@ -95030,4 +95037,4 @@ window.DashRenderer = _DashRenderer__WEBPACK_IMPORTED_MODULE_0__.DashRenderer; window.dash_renderer = __webpack_exports__; /******/ })() ; -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFzaF9yZW5kZXJlci5kZXYuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsZUFBZSxLQUFpRCxrQkFBa0IsbUJBQU8sQ0FBQyxvQkFBTyxHQUFHLENBQStLLENBQUMscUJBQXFCLG1CQUFtQixTQUFTLGNBQWMsNEJBQTRCLFlBQVkscUJBQXFCLDJEQUEyRCx1Q0FBdUMscUNBQXFDLG9CQUFvQixFQUFFLGlCQUFpQiw0RkFBNEYsZUFBZSx3Q0FBd0MsU0FBUyxFQUFFLG1CQUFtQiw4QkFBOEIscURBQXFELDBCQUEwQiw2Q0FBNkMsc0JBQXNCLDZEQUE2RCxZQUFZLGVBQWUsU0FBUyxpQkFBaUIsaUNBQWlDLGlCQUFpQixZQUFZLFVBQVUsc0JBQXNCLG1CQUFtQixpREFBaUQsaUJBQWlCLGdCQUFnQixZQUFZLGlCQUFpQixhQUFhLDBDQUEwQyxTQUFTLDZDQUE2QyxTQUFTLCtCQUErQixTQU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iAgICAgICAgICAgICAgICAgICAgJ2Agb2YgYSBEYXNoIGNhbGxiYWNrLiBUaGUgaWQgb2YgdGhpcyBvYmplY3QgaXMgJyArXG4gICAgICAgICAgICAgICAgICAgIChpc1N0clxuICAgICAgICAgICAgICAgICAgICAgICAgPyAnYCcgKyBzcGVjLmlkICsgJ2AnXG4gICAgICAgICAgICAgICAgICAgICAgICA6IEpTT04uc3RyaW5naWZ5KHNwZWMuaWQpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYW55VmFscyA/ICcgd2l0aCBNQVRDSCB2YWx1ZXMgJyArIGFueVZhbHMgOiAnJykpICtcbiAgICAgICAgICAgICAgICAgICAgJyBhbmQgdGhlIHByb3BlcnR5IGlzIGAnICtcbiAgICAgICAgICAgICAgICAgICAgc3BlYy5wcm9wZXJ0eSArXG4gICAgICAgICAgICAgICAgICAgIChpc1N0clxuICAgICAgICAgICAgICAgICAgICAgICAgPyAnYC4gVGhlIHN0cmluZyBpZHMgaW4gdGhlIGN1cnJlbnQgbGF5b3V0IGFyZTogWycgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXMocGF0aHMuc3Rycykuam9pbignLCAnKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ10nXG4gICAgICAgICAgICAgICAgICAgICAgICA6ICdgLiBUaGUgd2lsZGNhcmQgaWRzIGN1cnJlbnRseSBhdmFpbGFibGUgYXJlIGxvZ2dlZCBhYm92ZS4nKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIG1zZyA9XG4gICAgICAgICAgICAgICAgJ011bHRpcGxlIG9iamVjdHMgd2VyZSBmb3VuZCBmb3IgYW4gYCcgK1xuICAgICAgICAgICAgICAgICAgICBkZXBUeXBlICtcbiAgICAgICAgICAgICAgICAgICAgJ2Agb2YgYSBjYWxsYmFjayB0aGF0IG9ubHkgdGFrZXMgb25lIHZhbHVlLiBUaGUgaWQgc3BlYyBpcyAnICtcbiAgICAgICAgICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoc3BlYy5pZCkgK1xuICAgICAgICAgICAgICAgICAgICAoYW55VmFscyA/ICcgd2l0aCBNQVRDSCB2YWx1ZXMgJyArIGFueVZhbHMgOiAnJykgK1xuICAgICAgICAgICAgICAgICAgICAnIGFuZCB0aGUgcHJvcGVydHkgaXMgYCcgK1xuICAgICAgICAgICAgICAgICAgICBzcGVjLnByb3BlcnR5ICtcbiAgICAgICAgICAgICAgICAgICAgJ2AuIFRoZSBvYmplY3RzIHdlIGZvdW5kIGFyZTogJyArXG4gICAgICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KG1hcChwaWNrKFsnaWQnLCAncHJvcGVydHknXSksIGlkUHJvcHMpKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gW2lkUHJvcHNbMF0sIG1zZ107XG59XG5mdW5jdGlvbiBmaWxsVmFscyhwYXRocywgbGF5b3V0LCBjYiwgc3BlY3MsIGRlcFR5cGUsIGFsbG93QWxsTWlzc2luZyA9IGZhbHNlKSB7XG4gICAgY29uc3QgZ2V0dGVyID0gZGVwVHlwZSA9PT0gJ0lucHV0JyA/IGNiLmdldElucHV0cyA6IGNiLmdldFN0YXRlO1xuICAgIGNvbnN0IGVycm9ycyA9IFtdO1xuICAgIGxldCBlbXB0eU11bHRpVmFsdWVzID0gMDtcbiAgICBjb25zdCBpbnB1dFZhbHMgPSBnZXR0ZXIocGF0aHMpLm1hcCgoaW5wdXRMaXN0LCBpKSA9PiB7XG4gICAgICAgIGNvbnN0IFtpbnB1dHMsIGlucHV0RXJyb3JdID0gdW53cmFwSWZOb3RNdWx0aShwYXRocywgaW5wdXRMaXN0Lm1hcCgoeyBpZCwgcHJvcGVydHksIHBhdGg6IHBhdGhfIH0pID0+ICh7XG4gICAgICAgICAgICBpZCxcbiAgICAgICAgICAgIHByb3BlcnR5LFxuICAgICAgICAgICAgdmFsdWU6IHBhdGgocGF0aF8sIGxheW91dCkucHJ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gICAgICBjb25zdCBpZFN0ciA9IHN0cmluZ2lmeUlkKGlkKTtcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhRm9ySWQgPSAocmVzdWx0W2lkU3RyXSA9IHJlc3VsdFtpZFN0cl0gfHwge30pO1xuICAgICAgICAgICAgICAgIGlmIChyZXRpaiAhPT0gZGMubm9fdXBkYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGFGb3JJZFtwcm9wZXJ0eV0gPSByZXRpajtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGNhdGNoIChlKSB7XG4gICAgICAgIGlmIChlID09PSBkYy5QcmV2ZW50VXBkYXRlKSB7XG4gICAgICAgICAgICBzdGF0dXMgPSBTVEFUVVMuUFJFVkVOVF9VUERBVEU7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBzdGF0dXMgPSBTVEFUVVMuQ0xJRU5UU0lERV9FUlJPUjtcbiAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZmluYWxseSB7XG4gICAgICAgIGRlbGV0ZSBkYy5jYWxsYmFja19jb250ZXh0O1xuICAgICAgICAvLyBTZXR0aW5nIHNlcnZlciA9IGNsaWVudCBmb3JjZXMgbmV0d29yayA9IDBcbiAgICAgICAgY29uc3QgdG90YWxUaW1lID0gRGF0ZS5ub3coKSAtIHJlcXVlc3RUaW1lO1xuICAgICAgICBjb25zdCByZXNvdXJjZXMgPSB7XG4gICAgICAgICAgICBfX2Rhc2hfc2VydmVyOiB0b3RhbFRpbWUsXG4gICAgICAgICAgICBfX2Rhc2hfY2xpZW50OiB0b3RhbFRpbWUsXG4gICAgICAgICAgICBfX2Rhc2hfdXBsb2FkOiAwLFxuICAgICAgICAgICAgX19kYXNoX2Rvd25sb2FkOiAwXG4gICAgICAgIH07XG4gICAgICAgIGlmIChjb25maWcudWkpIHtcbiAgICAgICAg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leSwgdmFsdWUpKTtcbiAgICAgICAgICAgIG1vcmVBcmdzID0gbW9yZUFyZ3MuZmlsdGVyKChbXywgX18sIHNpbmdsZV0pID0+ICFzaW5nbGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmZXRjaCh1cmwsIG1lcmdlRGVlcFJpZ2h0KGNvbmZpZy5mZXRjaCwge1xuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgICBoZWFkZXJzLFxuICAgICAgICAgICAgYm9keVxuICAgICAgICB9KSk7XG4gICAgfTtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICBjb25zdCBoYW5kbGVPdXRwdXQgPSAocmVzKSA9PiB7XG4gICAgICAgICAgICBjb25zdCB7IHN0YXR1cyB9ID0gcmVzO1xuICAgICAgICAgICAgaWYgKGpvYikge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrSm9iID0gZ2V0U3RhdGUoKS5jYWxsYmFja0pvYnNbam9iXTtcbiAgICAgICAgICAgICAgICBpZiAoY2FsbGJhY2tKb2I/Lm91dGRhdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHJlbW92ZUNhbGxiYWNrSm9iKHsgam9iSWQ6IGpvYiB9KSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHt9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiByZWNvcmRQcm9maWxlKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGlmIChjb25maWcudWkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQ2FsbGJhY2sgcHJvZmlsaW5nIC0gb25seSByZWxldmFudCBpZiB3ZSdyZSBzaG93aW5nIHRoZSBkZWJ1ZyB1aVxuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNvdXJjZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfX2Rhc2hfc2VydmVyOiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgX19kYXNoX2NsaWVudDogRGF0ZS5ub3coKSAtIHJlcXVlc3RUaW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgX19kYXNoX3VwbG9hZDogYm9keS5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBfX2Rhc2hfZG93bmxvYWQ6IE51bWJlcihyZXMuaGVhZGVycy5nZXQoJ0NvbnRlbnQtTGVuZ3RoJykpXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRpbWluZ0hlYWRlcnMgPSByZXMuaGVhZGVycy5nZXQoJ1NlcnZlci1UaW1pbmcnKSB8fCAnJztcbiAgICAgICAgICAgICAgICAgICAgdGltaW5nSGVhZGVycy5zcGxpdCgnLCcpLmZvckVhY2goKGhlYWRlcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmFtZSA9IGhlYWRlci5zcGxpdCgnOycpWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZHVyID0gaGVhZGVyLm1hdGNoKC87ZHVyPVswLTkuXSsvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkdXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXNbbmFtZV0gPSBOdW1iZXIoZHVyWzBdLnNsaWNlKDUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHVwZGF0ZVJlc291cmNlVXNhZ2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBheWxvYWQub3V0cHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgdXNhZ2U6IHJlc291cmNlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0czogcGF5bG9hZC5pbnB1dHMsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZTogcGF5bG9hZC5zdGF0ZVxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgZmluaXNoTGluZSA9IChkYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyBtdWx0aSwgcmVzcG9uc2UgfSA9IGRhdGE7XG4gICAgICAgICAgICAgICAgaWYgKGhvb2tzLnJlcXVlc3RfcG9zdCkge1xuICAgICAgICAgICAgICAgICAgICBob29rcy5yZXF1ZXN0X3Bvc3QocGF5bG9hZCwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0O1xuICAgICAgICAgICAgICAgIGlmIChtdWx0aSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSByZXNwb25zZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgb3V0cHV0IH0gPSBwYXlsb2FkO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBpZCA9IG91dHB1dC5zdWJzdHIoMCwgb3V0cHV0Lmxhc3RJbmRleE9mKCcuJykpO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSB7IFtpZF06IHJlc3BvbnNlLnByb3BzIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJlY29yZFByb2ZpbGUocmVzdWx0KTtcbiAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgY29uc3QgY29tcGxldGVKb2IgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGpvYikge1xuICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChyZW1vdmVDYWxsYmFja0pvYih7IGpvYklkOiBqb2IgfSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocnVubmluZ09mZikge1xuICAgICAgICAgICAgICAgICAgICBzaWRlVXBkYXRlKHJ1bm5pbmdPZmYsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChwcm9ncmVzc0RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgc2lkZVVwZGF0ZShwcm9ncmVzc0RlZmF1bHQsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChzdGF0dXMgPT09IFNUQVRVUy5PSykge1xuICAgICAgICAgICAgICAgIHJlcy5qc29uKCkudGhlbigoZGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWNhY2hlS2V5ICYmIGRhdGEuY2FjaGVLZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlS2V5ID0gZGF0YS5jYWNoZUtleTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWpvYiAmJiBkYXRhLmpvYikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgam9iSW5mbyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqb2JJZDogZGF0YS5qb2IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FjaGVLZXk6IGRhdGEuY2FjaGVLZXksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FuY2VsSW5wdXRzOiBkYXRhLmNhbmNlbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9ncmVzc0RlZmF1bHQ6IGRhdGEucHJvZ3Jlc3NEZWZhdWx0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKGFkZENhbGxiYWNrSm9iKGpvYkluZm8pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGpvYiA9IGRhdGEuam9iO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLnByb2dyZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzaWRlVXBkYXRlKGRhdGEucHJvZ3Jlc3MsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEucnVubmluZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2lkZVVwZGF0ZShkYXRhLnJ1bm5pbmcsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFydW5uaW5nT2ZmICYmIGRhdGEucnVubmluZ09mZikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcnVubmluZ09mZiA9IGRhdGEucnVubmluZ09mZjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIXByb2dyZXNzRGVmYXVsdCAmJiBkYXRhLnByb2dyZXNzRGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvZ3Jlc3NEZWZhdWx0ID0gZGF0YS5wcm9ncmVzc0RlZmF1bHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFsb25nIHx8IGRhdGEucmVzcG9uc2UgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGVKb2IoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbmlzaExpbmUoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBQb2xsIGNoYWluLlxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChoYW5kbGUsIGxvbmcuaW50ZXJ2YWwgIT09IHVuZGVmaW5lZCA/IGxvbmcuaW50ZXJ2YWwgOiA1MDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzdGF0dXMgPT09IFNUQVRVUy5QUkVWRU5UX1VQREFURSkge1xuICAgICAgICAgICAgICAgIGNvbXBsZXRlSm9iKCk7XG4gICAgICAgICAgICAgICAgcmVjb3JkUHJvZmlsZSh7fSk7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSh7fSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb21wbGV0ZUpvYigpO1xuICAgICAgICAgICAgICAgIHJlamVjdChyZXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb25zdCBoYW5kbGVFcnJvciA9ICgpID0+IHtcbiAgICAgICAgICAgIGlmIChjb25maWcudWkpIHtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaCh1cGRhdGVSZXNvdXJjZVVzYWdlKHtcbiAgICAgICAgICAgICAgICAgICAgaWQ6IHBheWxvYWQub3V0cHV0LFxuICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IFNUQVRVUy5OT19SRVNQT05TRSxcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0OiB7fSxcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRzOiBwYXlsb2FkLmlucHV0cyxcbiAgICAgICAgICAgICAgICAgICAgc3RhdGU6IHBheWxvYWQuc3RhdGVcbiAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICB9XG4g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dCBvdXRwdXRzID0gW107XG4gICAgICAgIGNvbnN0IG91dHB1dEVycm9ycyA9IFtdO1xuICAgICAgICBhbGxPdXRwdXRzLmZvckVhY2goKG91dCwgaSkgPT4ge1xuICAgICAgICAgICAgY29uc3QgW291dGksIGVycmldID0gdW53cmFwSWZOb3RNdWx0aShwYXRocywgbWFwKHBpY2soWydpZCcsICdwcm9wZXJ0eSddKSwgb3V0KSwgY2IuY2FsbGJhY2sub3V0cHV0c1tpXSwgY2IuYW55VmFscywgJ091dHB1dCcpO1xuICAgICAgICAgICAgb3V0cHV0cy5wdXNoKG91dGkpO1xuICAgICAgICAgICAgaWYgKGVycmkpIHtcbiAgICAgICAgICAgICAgICBvdXRwdXRFcnJvcnMucHVzaChlcnJpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChvdXRwdXRFcnJvcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoZmxhdHRlbihpblZhbHMpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJlZkVycihvdXRwdXRFcnJvcnMsIHBhdGhzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFRoaXMgY2FzZSBpcyBhbGwtZW1wdHkgbXVsdGl2YWx1ZWQgd2lsZGNhcmQgaW5wdXRzLFxuICAgICAgICAgICAgLy8gd2hpY2ggd2Ugd291bGQgbm9ybWFsbHkgZmlyZSB0aGUgY2FsbGJhY2sgZm9yLCBleGNlcHRcbiAgICAgICAgICAgIC8vIHNvbWUgb3V0cHV0cyBhcmUgbWlzc2luZy4gU28gaW5zdGVhZCB3ZSB0cmVhdCBpdCBsaWtlXG4gICAgICAgICAgICAvLyByZWd1bGFyIG1pc3NpbmcgaW5wdXRzIGFuZCBqdXN0IHNpbGVudGx5IHByZXZlbnQgaXQuXG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLmNiLFxuICAgICAgICAgICAgICAgIGV4ZWN1dGlvblByb21pc2U6IG51bGxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgX19leGVjdXRlID0gYXN5bmMgKCkgPT4ge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXlsb2FkID0ge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQsXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dHM6IGlzTXVsdGlPdXRwdXRQcm9wKG91dHB1dCkgPyBvdXRwdXRzIDogb3V0cHV0c1swXSxcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRzOiBpblZhbHMsXG4gICAgICAgICAgICAgICAgICAgIGNoYW5nZWRQcm9wSWRzOiBrZXlzKGNiLmNoYW5nZWRQcm9wSWRzKSxcbiAgICAgICAgICAgICAgICAgICAgc3RhdGU6IGNiLmNhbGxiYWNrLnN0YXRlLmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgPyBmaWxsVmFscyhwYXRocywgbGF5b3V0LCBjYiwgc3RhdGUsICdTdGF0ZScpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGNsaWVudHNpZGVfZnVuY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCBoYW5kbGVDbGllbnRzaWRlKGRpc3BhdGNoLCBjbGllbnRzaWRlX2Z1bmN0aW9uLCBjb25maWcsIHBheWxvYWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZGF0YSwgcGF5bG9hZCB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZXJyb3IsIHBheWxvYWQgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgbmV3Q29uZmlnID0gY29uZmlnO1xuICAgICAgICAgICAgICAgIGxldCBuZXdIZWFkZXJzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBsZXQgbGFzdEVycm9yO1xuICAgICAgICAgICAgICAgIGNvbnN0IGFkZGl0aW9uYWxBcmdzID0gW107XG4gICAgICAgICAgICAgICAgdmFsdWVzKGdldFN0YXRlKCkuY2FsbGJhY2tKb2JzKS5mb3JFYWNoKChqb2IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNiLmNhbGxiYWNrLm91dHB1dCA9PT0gam9iLm91dHB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGVybWluYXRlIHRoZSBvbGQgam9icyB0aGF0IGFyZSBub3QgY29tcGxldGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgYXMgb3V0ZGF0ZWQgZm9yIHRoZSBjYWxsYmFjayBwcm9taXNlIHRvXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZXNvbHZlIGFuZCByZW1vdmUgYWZ0ZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRpdGlvbmFsQXJncy5wdXNoKFsnb2xkSm9iJywgam9iLmpvYklkLCB0cnVlXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChzZXRDYWxsYmFja0pvYk91dGRhdGVkKHsgam9iSWQ6IGpvYi5qb2JJZCB9KSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFqb2IuY2FuY2VsSW5wdXRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW50ZXIgPSBpbnRlcnNlY3Rpb24oam9iLmNhbmNlbElucHV0cywgY2IuY2FsbGJhY2suaW5wdXRzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGludGVyLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkaXRpb25hbEFyZ3MucHVzaChbJ2NhbmNlbEpvYicsIGpvYi5qb2JJZF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpvYi5wcm9ncmVzc0RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaWRlVXBkYXRlKGpvYi5wcm9ncmVzc0RlZmF1bHQsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCByZXRyeSA9IDA7IHJldHJ5IDw9IE1BWF9BVVRIX1JFVFJJRVM7IHJldHJ5KyspIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCBoYW5kbGVTZXJ2ZXJzaWRlKGRpc3BhdGNoLCBob29rcywgbmV3Q29uZmlnLCBwYXlsb2FkLCBwYXRocywgbG9uZywgYWRkaXRpb25hbEFyZ3MubGVuZ3RoID8gYWRkaXRpb25hbEFyZ3MgOiB1bmRlZmluZWQsIGdldFN0YXRlLCBjYi5jYWxsYmFjay5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5ld0hlYWRlcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChhZGRIdHRwSGVhZGVycyhuZXdIZWFkZXJzKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkYXRhLCBwYXlsb2FkIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKHJlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdEVycm9yID0gcmVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJldHJ5IDw9IE1BWF9BVVRIX1JFVFJJRVMgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmVzLnN0YXR1cyA9PT0gU1RBVFVTLlVOQVVUSE9SSVpFRCB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMuc3RhdHVzID09PSBTVEFUVVMuQkFEX1JFUVVFU1QpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYm9keSA9IGF3YWl0IHJlcy50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJvZHkuaW5jbHVkZXMoSldUX0VYUElSRURfTUVTU0FHRSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3QgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvbGRKd3QgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5mZXRjaC5oZWFkZXJzLkF1dGhvcml6YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGRKd3QgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZmV0Y2guaGVhZGVycy5BdXRob3JpemF0aW9uLnN1YnN0cignQmVhcmVyICcubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld0p3dCA9IGF3YWl0IGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3Qob2xkSnd0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdKd3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdIZWFkZXJzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7bmV3Snd0fWBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbmZpZyA9IG1lcmdlRGVlcFJpZ2h0KGNvbmZpZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmZXRjaDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogbmV3SGVhZGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyB3ZSByZWFjaCBoZXJlIHdoZW4gd2UgcnVuIG91dCBvZiByZXRyaWVzLlxuICAgICAgICAgICAgICAgIHJldHVybiB7IGVycm9yOiBsYXN0RXJyb3IsIHBheWxvYWQ6IG51bGwgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgIHJldHVybiB7IGVyc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sZXQgcmVxdWVzdGVkQ2FsbGJhY2tzID0gW107XG4gICAgICAgIGNvbnN0IHN0b3JlZENhbGxiYWNrcyA9IFtdO1xuICAgICAgICBmb3JFYWNoKGNiID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHByZWRlY2Vzc29ycyA9IGNvbmNhdChjYi5wcmVkZWNlc3NvcnMgPz8gW10sIFtjYi5jYWxsYmFja10pO1xuICAgICAgICAgICAgY29uc3QgeyBjYWxsYmFjazogeyBjbGllbnRzaWRlX2Z1bmN0aW9uLCBvdXRwdXQgfSwgZXhlY3V0aW9uUmVzdWx0IH0gPSBjYjtcbiAgICAgICAgICAgIGlmIChpc05pbChleGVjdXRpb25SZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgeyBkYXRhLCBlcnJvciwgcGF5bG9hZCB9ID0gZXhlY3V0aW9uUmVzdWx0O1xuICAgICAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGZvckVhY2goKFtpZCwgcHJvcHNdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnNlZElkID0gcGFyc2VJZldpbGRjYXJkKGlkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBncmFwaHMsIGxheW91dDogb2xkTGF5b3V0LCBwYXRoczogb2xkUGF0aHMgfSA9IGdldFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgIC8vIENvbXBvbmVudHMgd2lsbCB0cmlnZ2VyIGNhbGxiYWNrcyBvbiB0aGVpciBvd24gYXMgcmVxdWlyZWQgKGVnLiBkZXJpdmVkKVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBhcHBsaWVkUHJvcHMgPSBhcHBseVByb3BzKHBhcnNlZElkLCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgIC8vIEFkZCBjYWxsYmFja3MgZm9yIG1vZGlmaWVkIGlucHV0c1xuICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MgPSBjb25jYXQocmVxdWVzdGVkQ2FsbGJhY2tzLCBmbGF0dGVuKG1hcChwcm9wID0+IGdldENhbGxiYWNrc0J5SW5wdXQoZ3JhcGhzLCBvbGRQYXRocywgcGFyc2VkSWQsIHByb3AsIHRydWUpLCBrZXlzKHByb3BzKSkpLm1hcChyY2IgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZWRlY2Vzc29yc1xuICAgICAgICAgICAgICAgICAgICB9KSkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBiYXNlUGF0aCA9IGdldFBhdGgob2xkUGF0aHMsIHBhcnNlZElkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb2xkT2JqID0gcGF0aChnZXRQYXRoKG9sZFBhdGhzLCBwYXJzZWRJZCksIG9sZExheW91dCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkcmVuUHJvcHMgPSBwYXRoT3IoJ2RlZmF1bHRWYWx1ZScsIFtvbGRPYmoubmFtZXNwYWNlLCBvbGRPYmoudHlwZV0sIHdpbmRvdy5fX2Rhc2hwcml2YXRlX2NoaWxkcmVuUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBoYW5kbGVQYXRocyA9IChjaGlsZHJlbiwgb2xkQ2hpbGRyZW4sIG9sZENoaWxkcmVuUGF0aCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb1BhdGhzID0gZ2V0U3RhdGUoKS5wYXRocztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhdGhzID0gY29tcHV0ZVBhdGhzKGNoaWxkcmVuLCBvbGRDaGlsZHJlblBhdGgsIG9QYXRocyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChzZXRQYXRocyhwYXRocykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2V0IGNhbGxiYWNrcyBmb3IgbmV3IGxheW91dCAody8gZXhlY3V0aW9uIGdyb3VwKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkQ2FsbGJhY2tzID0gY29uY2F0KHJlcXVlc3RlZENhbGxiYWNrcywgZ2V0TGF5b3V0Q2FsbGJhY2tzKGdyYXBocywgcGF0aHMsIGNoaWxkcmVuLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2h1bmtQYXRoOiBvbGRDaGlsZHJlblBhdGhcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLm1hcChyY2IgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5yY2IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGVjZXNzb3JzXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2lsZGNhcmQgY2FsbGJhY2tzIHdpdGggYXJyYXkgaW5wdXRzIChBTEwgLyBBTExTTUFMTEVSKSBuZWVkIHRvIHRyaWdnZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGV2ZW4gZHVlIHRvIHRoZSBkZWxldGlvbiBvZiBjb21wb25lbnRzXG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MgPSBjb25jYXQocmVxdWVzdGVkQ2FsbGJhY2tzLCBnZXRMYXlvdXRDYWxsYmFja3MoZ3JhcGhzLCBvbGRQYXRocywgb2xkQ2hpbGRyZW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVkQXJyYXlJbnB1dHNPbmx5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1BhdGhzOiBwYXRocyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaHVua1BhdGg6IG9sZENoaWxkcmVuUGF0aFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkubWFwKHJjYiA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGxldCByZWNvbXB1dGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGZvckVhY2goY2hpbGRyZW5Qcm9wID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZWNvbXB1dGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoaWxkcmVuUHJvcC5pbmNsdWRlcygnW10nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IFtmcm9udFBhdGhdID0gY2hpbGRyZW5Qcm9wXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdCgnW10nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKHAgPT4gcC5zcGxpdCgnLicpLmZpbHRlcihlID0+IGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBmcm9udE9iaiA9IHBhdGgoZnJvbnRQYXRoLCBhcHBsaWVkUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZnJvbnRPYmopIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDcmF3bCBsYXlvdXQgbmVlZHMgdGhlIG5zL3R5cGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVQYXRocyh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLm9sZE9iaixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLm9sZE9iai5wcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmFwcGxpZWRQcm9wc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgb2xkT2JqLCBiYXNlUGF0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT25seSBkbyBpdCBvbmNlIGZvciB0aGUgY29tcG9uZW50LlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY29tcHV0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hpbGRyZW5Qcm9wUGF0aCA9IGNoaWxkcmVuUHJvcC5zcGxpdCgnLicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkcmVuID0gcGF0aChjaGlsZHJlblByb3BQYXRoLCBhcHBsaWVkUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY2hpbGRyZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRDaGlsZHJlblBhdGggPSBjb25jYXQoZ2V0UGF0aChvbGRQYXRocywgcGFyc2VkSWQpLCBbJ3Byb3BzJ10uY29uY2F0KGNoaWxkcmVuUHJvcFBhdGgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRDaGlsZHJlbiA9IHBhdGgob2xkQ2hpbGRyZW5QYXRoLCBvbGRMYXlvdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZVBhdGhzKGNoaWxkcmVuLCBvbGRDaGlsZHJlbiwgb2xkQ2hpbGRyZW5QYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgWydjaGlsZHJlbiddLmNvbmNhdChjaGlsZHJlblByb3BzKSk7XG4gICAgICAgICAgICAgICAgICAgIC8vIHBlcnNpc3RlbmNlIGVkZ2UgY2FzZTogaWYgeW91IGV4cGxpY2l0bHkgdXBkYXRlIHRoZVxuICAgICAgICAgICAgICAgICAgICAvLyBwZXJzaXN0ZW5jZSBrZXksIG90aGVyIHByb3BzIG1heSBjaGFuZ2UgdGhhdCByZXF1aXJlIHVzXG4gICAgICAgICAgICAgICAgICAgIC8vIHRvIGZpcmUgYWRkaXRpb25hbCBjYWxsYmFja3NcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYWRkZWRQcm9wcyA9IHBpY2tCeSgoXywgaykgPT4gIShrIGluIHByb3BzKSwgYXBwbGllZFByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0VtcHR5KGFkZGVkUHJvcHMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGdyYXBoczogY3VycmVudEdyYXBocywgcGF0aHMgfSA9IGdldFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MgPSBjb25jYXQocmVxdWVzdGVkQ2FsbGJhY2tzLCBpbmNsdWRlT2JzZXJ2ZXJzKGlkLCBhZGRlZFByb3BzLCBjdXJyZW50R3JhcGhzLCBwYXRocykubWFwKHJjYiA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBPYmplY3QuZW50cmllcyhkYXRhKSk7XG4gICAgICAgICAgICAgICAgLy8gQWRkIGluZm9ybWF0aW9uIGFib3V0IHBvdGVudGlhbGx5IHVwZGF0ZWQgb3V0cHV0cyB2cy4gdXBkYXRlZCBvdXRwdXRzLFxuICAgICAgICAgICAgICAgIC8vIHRoaXMgd2lsbCBiZSB1c2VkIHRvIGRyb3AgY2FsbGJhY2tzIGZyb20gZXhlY3V0aW9uIGdyb3VwcyB3aGVuIG5vIG91dHB1dFxuICAgICAgICAgICAgICAgIC8vIG1hdGNoaW5nIHRoZSBkb3duc3RyZWFtIGNhbGxiYWNrJ3MgaW5wdXRzIHdlcmUgbW9kaWZpZWRcbiAgICAgICAgICAgICAgICBzdG9yZWRDYWxsYmFja3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIC4uLmNiLFxuICAgICAgICAgICAgICAgICAgICBleGVjdXRpb25NZXRhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbGxQcm9wczogbWFwKGNvbWJpbmVJZEFuZFByb3AsIGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhnZXRTdGF0ZSgpLnBhdGhzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlZFByb3BzOiBmbGF0dGVuKG1hcCgoW2lkLCB2YWx1ZV0pID0+IG1hcChwcm9wZXJ0eSA9PiBjb21iaW5lSWRBbmRQcm9wKHsgaWQsIHByb3BlcnR5IH0pLCBrZXlzKHZhbHVlKSksIHRvUGFpcnMoZGF0YSkpKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXJyb3IgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IG91dHB1dHMgPSBwYXlsb2FkXG4gICAgICAgICAgICAgICAgICAgID8gbWFwKGNvbWJpbmVJZEFuZFByb3AsIGZsYXR0ZW4oW3BheWxvYWQub3V0cHV0c10pKS5qb2luKCcsICcpXG4gICAgICAgICAgICAgICAgICAgIDogb3V0cHV0O1xuICAgICAgICAgICAgICAgIGxldCBtZXNzYWdlID0gYENhbGxiYWNrIGVycm9yIHVwZGF0aW5nICR7b3V0cHV0c31gO1xuICAgICAgICAgICAgICAgIGlmIChjbGllbnRzaWRlX2Z1bmN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgbmFtZXNwYWNlOiBucywgZnVuY3Rpb25fbmFtZTogZm4gfSA9IGNsaWVudHNpZGVfZnVuY3Rpb247XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgKz0gYCB2aWEgY2xpZW50c2lkZSBmdW5jdGlvbiAke25zfS4ke2ZufWA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGhhbmRsZUFzeW5jRXJyb3IoZXJyb3IsIG1lc3NhZ2UsIGRpc3BhdGNoKTtcbiAgICAgICAgICAgICAgICBzdG9yZWRDYWxsYmFja3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIC4uLmNiLFxuICAgICAgICAgICAgICAgICAgICBleGVjdXRpb25NZXRhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbGxQcm9wczogbWFwKGNvbWJpbmVJZEFuZFByb3AsIGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhnZXRTdGF0ZSgpLnBhdGhzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlZFByb3BzOiBbXVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIGV4ZWN1dGVkKTtcbiAgICAgICAgZGlzcGF0Y2goYWdncmVnYXRlQ2FsbGJhY2tzKFtcbiAgICAgICAgICAgIGV4ZWN1dGVkLmx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AgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXyA9XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5fX2Rhc2hwcml2YXRlX19pZHByb3BzX18gfHwgW107XG4gICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXy5wdXNoKGlkcHJvcCk7XG4gICAgICAgICAgICAgICAgcGF0aC5mb3JFYWNoKChwLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldCA9IHRhcmdldFtwXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRbcF0gPz9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocCA9PT0gJ2NoaWxkcmVuJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlb2YgcGF0aFtpICsgMV0gPT09ICdudW1iZXInXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gW11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB7fSk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5fX2Rhc2hwcml2YXRlX19pZHByb3BzX18gPVxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXyB8fCBbXTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXy5wdXNoKGlkcHJvcCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgLy8gQXNzaWduIG9uZSBhZmZlY3RlZCBwcm9wIGZvciB0aGlzIHBhdGhcbiAgICAgICAgICAgICAgICB0YXJnZXQuX19kYXNocHJpdmF0ZV9faWRwcm9wX18gPVxuICAgICAgICAgICAgICAgICAgICB0YXJnZXQuX19kYXNocHJpdmF0ZV9faWRwcm9wX18gfHwgaWRwcm9wO1xuICAgICAgICAgICAg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sXG4gICAgICAgICAgICBjaXJjdWxhcnMgd2lsbCBiZSByZW1vdmVkIGZvciByZWFsXG4gICAgICAgICovXG4gICAgICAgIHJlcXVlc3RlZCA9IGRpZmZlcmVuY2UocmVxdWVzdGVkLCByQ2lyY3VsYXJzKTtcbiAgICAgICAgLypcbiAgICAgICAgICAgIDEuIFJlbW92ZSBkdXBsaWNhdGVkIGByZXF1ZXN0ZWRgIGNhbGxiYWNrcyAtIGdpdmUgcHJlY2VkZW5jZSB0byBuZXdlciBjYWxsYmFja3Mgb3ZlciBvbGRlciBvbmVzXG4gICAgICAgICovXG4gICAgICAgIGxldCByRHVwbGljYXRlcyA9IFtdO1xuICAgICAgICBjb25zdCByTWVyZ2VkRHVwbGljYXRlcyA9IFtdO1xuICAgICAgICBmb3JFYWNoKGdyb3VwID0+IHtcbiAgICAgICAgICAgIGlmIChncm91cC5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAvLyBrZWVwIGNhbGxiYWNrIGlmIGl0cyB0aGUgb25seSBvbmUgb2YgaXRzIGtpbmRcbiAgICAgICAgICAgICAgICByTWVyZ2VkRHVwbGljYXRlcy5wdXNoKGdyb3VwWzBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IGluaXRpYWwgPSBncm91cC5maW5kKGNiID0+IGNiLmluaXRpYWxDYWxsKTtcbiAgICAgICAgICAgICAgICBpZiAoaW5pdGlhbCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBkcm9wIHRoZSBpbml0aWFsIGNhbGxiYWNrIGlmIGl0J3Mgbm90IGFsb25lXG4gICAgICAgICAgICAgICAgICAgIHJEdXBsaWNhdGVzLnB1c2goaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGdyb3VwV2l0aG91dEluaXRpYWwgPSBncm91cC5maWx0ZXIoY2IgPT4gY2IgIT09IGluaXRpYWwpO1xuICAgICAgICAgICAgICAgIGlmIChncm91cFdpdGhvdXRJbml0aWFsLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGVyZSdzIG9ubHkgb25lIGNhbGxiYWNrIGJlc2lkZSB0aGUgaW5pdGlhbCBvbmUsIGtlZXAgdGhhdCBjYWxsYmFja1xuICAgICAgICAgICAgICAgICAgICByTWVyZ2VkRHVwbGljYXRlcy5wdXNoKGdyb3VwV2l0aG91dEluaXRpYWxbMF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIG1lcmdlIGFsbCByZW1haW5pbmcgY2FsbGJhY2tzIHRvZ2V0aGVyXG4gICAgICAgICAgICAgICAgICAgIHJEdXBsaWNhdGVzID0gY29uY2F0KHJEdXBsaWNhdGVzLCBncm91cFdpdGhvdXRJbml0aWFsKTtcbiAgICAgICAgICAgICAgICAgICAgck1lcmdlZER1cGxpY2F0ZXMucHVzaChtZXJnZUxlZnQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlZFByb3BJZHM6IHJlZHVjZShtZXJnZVdpdGgoTWF0aC5tYXgpLCB7fSwgcGx1Y2soJ2NoYW5nZWRQcm9wSWRzJywgZ3JvdXBXaXRob3V0SW5pdGlhbCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXhlY3V0aW9uR3JvdXA6IGZpbHRlcihleGcgPT4gQm9vbGVhbihleGcpLCBwbHVjaygnZXhlY3V0aW9uR3JvdXAnLCBncm91cFdpdGhvdXRJbml0aWFsKSkuc2xpY2UoLTEpWzBdXG4gICAgICAgICAgICAgICAgICAgIH0sIGdyb3VwV2l0aG91dEluaXRpYWwuc2xpY2UoLTEpWzBdKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LCB2YWx1ZXMoZ3JvdXBCeShnZXRVbmlxdWVJZ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gICBpc19sb2FkaW5nOiB0cnVlLFxuICAgICAgICAgICAgcHJvcF9uYW1lOiBpZHByb3AucHJvcGVydHksXG4gICAgICAgICAgICBjb21wb25lbnRfbmFtZTogc3RyaW5naWZ5SWQoaWRwcm9wLmlkKVxuICAgICAgICB9O1xuICAgIH1cbiAgICBjb25zdCBpZHByb3BzID0gbG9hZGluZ0ZyYWdtZW50Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXz8uWzBdO1xuICAgIGlmIChpZHByb3BzICYmIGlzTG9hZGluZ0NvbXBvbmVudChjb21wb25lbnRMYXlvdXQpKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBpc19sb2FkaW5nOiB0cnVlLFxuICAgICAgICAgICAgcHJvcF9uYW1lOiBpZHByb3BzLnByb3BlcnR5LFxuICAgICAgICAgICAgY29tcG9uZW50X25hbWU6IHN0cmluZ2lmeUlkKGlkcHJvcHMuaWQpXG4gICAgICAgIH07XG4gICAgfVxuICAgIHJldHVybiBOVUxMX0xPQURJTkdfU1RBVEU7XG59XG5leHBvcnQgY29uc3QgZ2V0TG9hZGluZ0hhc2ggPSAoY29tcG9uZW50UGF0aCwgbG9hZGluZ01hcCkgPT4gKChsb2FkaW5nTWFwICYmXG4gICAgcGF0aChjb21wb25lbnRQYXRoLCBsb2FkaW5nTWFwKVxuICAgICAgICA/Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXykgPz9cbiAgICBbXSlcbiAgICAubWFwKCh7IGlkLCBwcm9wZXJ0eSB9KSA9PiBgJHtpZH0uJHtwcm9wZXJ0eX1gKVxuICAgIC5qb2luKCcsJyk7XG5leHBvcnQgZnVuY3Rpb24gdmFsaWRhdGVDb21wb25lbnQoY29tcG9uZW50RGVmaW5pdGlvbikge1xuICAgIGlmICh0eXBlKGNvbXBvbmVudERlZmluaXRpb24pID09PSAnQXJyYXknKSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignVGhlIGNoaWxkcmVuIHByb3BlcnR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b25zdCBldmVudHMgPSB1c2VSZWYobnVsbCk7XG4gICAgaWYgKCFldmVudHMuY3VycmVudCkge1xuICAgICAgICBldmVudHMuY3VycmVudCA9IG5ldyBFdmVudEVtaXR0ZXIoKTtcbiAgICB9XG4gICAgY29uc3QgcmVuZGVyZWRUcmVlID0gdXNlUmVmKGZhbHNlKTtcblxuICAgIGNvbnN0IHByb3BzUmVmID0gdXNlUmVmKHt9KTtcbiAgICBwcm9wc1JlZi5jdXJyZW50ID0gcHJvcHM7XG5cbiAgICBjb25zdCBwcm92aWRlciA9IHVzZVJlZih7XG4gICAgICAgIGZuOiAoKSA9PiAoe1xuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2NvbmZpZzogcHJvcHNSZWYuY3VycmVudC5jb25maWcsXG4gICAgICAgICAgICBfZGFzaHByaXZhdGVfZGlzcGF0Y2g6IHByb3BzUmVmLmN1cnJlbnQuZGlzcGF0Y2gsXG4gICAgICAgICAgICBfZGFzaHByaXZhdGVfZ3JhcGhzOiBwcm9wc1JlZi5jdXJyZW50LmdyYXBocyxcbiAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9sb2FkaW5nTWFwOiBwcm9wc1JlZi5jdXJyZW50LmxvYWRpbmdNYXBcbiAgICAgICAgfSlcbiAgICB9KTtcblxuICAgIHVzZUVmZmVjdChzdG9yZUVmZmVjdC5iaW5kKG51bGwsIHByb3BzLCBldmVudHMsIHNldEVycm9yTG9hZGluZykpO1xuXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcbiAgICAgICAgaWYgKHJlbmRlcmVkVHJlZS5jdXJyZW50KSB7XG4gICAgICAgICAgICAoYXN5bmMgKCkgPT4ge1xuICAgICAgICAgICAgICAgIHJlbmRlcmVkVHJlZS5jdXJyZW50ID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgYXdhaXQgd2FpdCgwKTtcbiAgICAgICAgICAgICAgICBldmVudHMuY3VycmVudC5lbWl0KCdyZW5kZXJlZCcpO1xuICAgICAgICAgICAg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hdGVfbG9hZGluZ1N0YXRlPXtnZXRMb2FkaW5nU3RhdGUoXG4gICAgICAgICAgICAgICAgICAgICAgICBsYXlvdXQsXG4gICAgICAgICAgICAgICAgICAgICAgICBbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRpbmdNYXBcbiAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xvYWRpbmdTdGF0ZUhhc2g9e2dldExvYWRpbmdIYXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgW10sXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2FkaW5nTWFwXG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9wYXRoPXtKU09OLnN0cmluZ2lmeShbXSl9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDwvRGFzaENvbnRleHQuUHJvdmlkZXI+XG4gICAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY29udGVudCA9IDxkaXYgY2xhc3NOYW1lPSdfZGFzaC1sb2FkaW5nJz5Mb2FkaW5nLi4uPC9kaXY+O1xuICAgIH1cblxuICAgIHJldHVybiBjb25maWcgJiYgY29uZmlnLnVpID09PSB0cnVlID8gKFxuICAgICAgICA8R2xvYmFsRXJyb3JDb250YWluZXI+e2NvbnRlbnR9PC9HbG9iYWxFcnJvckNvbnRhaW5lcj5cbiAgICApIDogKFxuICAgICAgICBjb250ZW50XG4gICAgKTtcbn07XG5cbmZ1bmN0aW9uIHN0b3JlRWZmZWN0KHByb3BzLCBldmVudHMsIHNldEVycm9yTG9hZGluZykge1xuICAgIGNvbnN0IHtcbiAgICAgICAgYXBwTGlmZWN5Y2xlLFxuICAgICAgICBkZXBlbmRlbmNpZXNSZXF1ZXN0LFxuICAgICAgICBkaXNwYXRjaCxcbiAgICAgICAgZXJyb3IsXG4gICAgICAgIGdyYXBocyxcbiAgICAgICAgbGF5b3V0LFxuICAgICAgICBsYXlvdXRSZXF1ZXN0XG4gICAgfSA9IHByb3BzO1xuXG4gICAgaWYgKGlzRW1wdHkobGF5b3V0UmVxdWVzdCkpIHtcbiAgICAgICAgZGlzcGF0Y2goYXBpVGh1bmsoJ19kYXNoLWxheW91dCcsICdHRVQnLCAnbGF5b3V0UmVxdWVzdCcpKTtcbiAgICB9IGVsc2UgaWYgKGxheW91dFJlcXVlc3Quc3RhdHVzID09PSBTVEFUVVMuT0spIHtcbiAgICAgICAgaWYgKGlzRW1wdHkobGF5b3V0KSkge1xuICAgICAgICAgICAgY29uc3QgZmluYWxMYXlvdXQgPSBhcHBseVBlcnNpc3RlbmNlKFxuICAgICAgICAgICAgICAgIGxheW91dFJlcXVlc3QuY29udGVudCxcbiAgICAgICAgICAgICAgICBkaXNwYXRjaFxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGRpc3BhdGNoKFxuICAgICAgICAgICAgICAgIHNldFBhdGhzKGNvbXB1dGVQYXRocyhmaW5hbExheW91dCwgW10sIG51bGwsIGV2ZW50cy5jdXJyZW50KSlcbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBkaXNwYXRjaChzZXRMYXlvdXQoZmluYWxMYXlvdXQpKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlmIChpc0VtcHR5KGRlcGVuZGVuY2llc1JlcXVlc3QpKSB7XG4gICAgICAgIGRpc3BhdGNoKGFwaVRodW5rKCdfZGFzaC1kZXBlbmRlbmNpZXMnLCAnR0VUJywgJ2RlcGVuZGVuY2llc1JlcXVlc3QnKSk7XG4gICAgfSBlbHNlIGlmIChkZXBlbmRlbmNpZXNSZXF1ZXN0LnN0YXR1cyA9PT0gU1RBVFVTLk9LICYmIGlzRW1wdHkoZ3JhcGhzKSkge1xuICAgICAgICBkaXNwYXRjaChcbiAgICAgICAgICAgIHNldEdyYXBocyhcbiAgICAgICAgICAgICAgICBjb21wdXRlR3JhcGhzKFxuICAgICAgICAgICAgICAg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sIG1lbW9pemVXaXRoLCBpZGVudGl0eX0gZnJvbSAncmFtZGEnO1xuXG5jbGFzcyBVbmNvbm5lY3RlZEFwcENvbnRhaW5lciBleHRlbmRzIFJlYWN0LkNvbXBvbmVudCB7XG4gICAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICAgICAgc3VwZXIocHJvcHMpO1xuICAgICAgICBpZiAoXG4gICAgICAgICAgICBwcm9wcy5ob29rcy5yZXF1ZXN0X3ByZSAhPT0gbnVsbCB8fFxuICAgICAgICAgICAgcHJvcHMuaG9va3MucmVxdWVzdF9wb3N0ICE9PSBudWxsIHx8XG4gICAgICAgICAgICBwcm9wcy5ob29rcy5jYWxsYmFja19yZXNvbHZlZCAhPT0gbnVsbCB8fFxuICAgICAgICAgICAgcHJvcHMuaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dCAhPT0gbnVsbFxuICAgICAgICApIHtcbiAgICAgICAgICAgIGxldCBob29rcyA9IHByb3BzLmhvb2tzO1xuXG4gICAgICAgICAgICBpZiAoaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dCkge1xuICAgICAgICAgICAgICAgIGhvb2tzID0ge1xuICAgICAgICAgICAgICAgICAgICAuLi5ob29rcyxcbiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdF9yZWZyZXNoX2p3dDogbWVtb2l6ZVdpdGgoXG4gICAgICAgICAgICAgICAgICAgICAgICBpZGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3RcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHByb3BzLmRpc3BhdGNoKHNldEhvb2tzKGhvb2tzKSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBVTlNBRkVfY29tcG9uZW50V2lsbE1vdW50KCkge1xuICAgICAgICBjb25zdCB7ZGlzcGF0Y2h9ID0gdGhpcy5wcm9wcztcbiAgICAgICAgY29uc3QgY29uZmlnID0gZ2V0Q29uZmlnRnJvbURPTSgpO1xuXG4gICAgICAgIC8vIHByZXNldCBjb21tb24gcmVxdWVzdCBwYXJhbXMgaW4gdGhlIGNvbmZpZ1xuICAgICAgICBjb25maWcuZmV0Y2ggPSB7XG4gICAgICAgICAgICBjcmVkZW50aWFsczogJ3NhbWUtb3JpZ2luJyxcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgICAgICBBY2NlcHQ6ICdhcHBsaWNhdGlvbi9qc29uJyxcbiAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgZGlzcGF0Y2goc2V0Q29uZmlnKGNvbmZpZykpO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3Qge2NvbmZpZ30gPSB0aGlzLnByb3BzO1xuICAgICAgICBpZiAodHlwZShjb25maWcpID09PSAnTnVsbCcpIHtcbiAgICAgICAgICAgIHJldHVybiA8ZGl2IGNsYXNzTmFtZT0nX2Rhc2gtbG9hZGluZyc+TG9hZGluZy4uLjwvZGl2PjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB7c2hvd191bmRvX3JlZG99ID0gY29uZmlnO1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAgICAgICAgICAgIHtzaG93X3VuZG9fcmVkbyA/IDxUb29sYmFyIC8+IDogbnVsbH1cbiAgICAgICAgICAgICAgICA8QVBJQ29udHJvbGxlciAvPlxuICAgICAgICAgICAgICAgIDxMb2FkaW5nIC8+XG4gICAgICAgICAgICAgICAgPFJlbG9hZGVyIC8+XG4gICAgICAgICAgICA8L1JlYWN0LkZyYWdtZW50PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuVW5jb25uZWN0ZWRBcHBDb250YWluZXIuc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ocHJvcHMsIGNvbXBvbmVudCwgcGF0aCwga2V5ID0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBpc1NpbXBsZUNvbXBvbmVudChjb21wb25lbnQpID8gKFxuICAgICAgICAgICAgY29tcG9uZW50XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgICA8VHJlZUNvbnRhaW5lclxuICAgICAgICAgICAgICAgIGtleT17XG4gICAgICAgICAgICAgICAgICAgIChjb21wb25lbnQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudC5wcm9wcyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5naWZ5SWQoY29tcG9uZW50LnByb3BzLmlkKSkgfHxcbiAgICAgICAgICAgICAgICAgICAga2V5XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9lcnJvcj17cHJvcHMuX2Rhc2hwcml2YXRlX2Vycm9yfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9sYXlvdXQ9e2NvbXBvbmVudH1cbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbG9hZGluZ1N0YXRlPXtnZXRMb2FkaW5nU3RhdGUoXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCxcbiAgICAgICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgcHJvcHMuX2Rhc2hwcml2YXRlX2xvYWRpbmdNYXBcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9sb2FkaW5nU3RhdGVIYXNoPXtnZXRMb2FkaW5nSGFzaChcbiAgICAgICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgcHJvcHMuX2Rhc2hwcml2YXRlX2xvYWRpbmdNYXBcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9wYXRoPXtKU09OLnN0cmluZ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W5jZVxuICAgICAgICAgICAgcmVjb3JkVWlFZGl0KF9kYXNocHJpdmF0ZV9sYXlvdXQsIG5ld1Byb3BzLCBfZGFzaHByaXZhdGVfZGlzcGF0Y2gpO1xuXG4gICAgICAgICAgICAvLyBPbmx5IGRpc3BhdGNoIGNoYW5nZXMgdG8gRGFzaCBpZiBhIHdhdGNoZWQgcHJvcCBjaGFuZ2VkXG4gICAgICAgICAgICBpZiAod2F0Y2hlZEtleXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2Rpc3BhdGNoKFxuICAgICAgICAgICAgICAgICAgICBub3RpZnlPYnNlcnZlcnMoe1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wczogcGljayh3YXRjaGVkS2V5cywgY2hhbmdlZFByb3BzKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEFsd2F5cyB1cGRhdGUgdGhpcyBjb21wb25lbnQncyBwcm9wc1xuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2Rpc3BhdGNoKFxuICAgICAgICAgICAgICAgIHVwZGF0ZVByb3BzKHtcbiAgICAgICAgICAgICAgICAgICAgcHJvcHM6IGNoYW5nZWRQcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgaXRlbXBhdGg6IF9kYXNocHJpdmF0ZV9wYXRoXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRDaGlsZHJlbihjb21wb25lbnRzLCBwYXRoKSB7XG4gICAgICAgIGlmIChpc05pbChjb21wb25lbnRzKSkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gQXJyYXkuaXNBcnJheShjb21wb25lbnRzKVxuICAgICAgICAgICAgPyBhZGRJbmRleChtYXApKFxuICAgICAgICAgICAgICAgICAgKGNvbXBvbmVudCwgaSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZUNvbnRhaW5lcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBjb25jYXQocGF0aCwgWydwcm9wcycsICdjaGlsZHJlbicsIGldKVxuICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICBjb21wb25lbnRzXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIDogdGhpcy5jcmVhdGVDb250YWluZXIoXG4gICAgICAgICAgICAgICAgICB0aGlzLnByb3BzLFxuICAgICAgICAgICAgICAgICAgY29tcG9uZW50cyxcbiAgICAgICAgICAgICAgICAgIGNvbmNhdChwYXRoLCBbJ3Byb3BzJywgJ2NoaWxkcmVuJ10pXG4gICAgICAgICAgICAgICk7XG4gICAgfVxuXG4gICAgd3JhcENoaWxkcmVuUHJvcChub2RlLCBjaGlsZHJlblByb3ApIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkobm9kZSkpIHtcbiAgICAgICAgICAgIHJldHVybiBub2RlLm1hcCgobiwgaSkgPT5cbiAgICAgICAgICAgICAgICBpc0RyeUNvbXBvbmVudChuKVxuICAgICAgICAgICAgICAgICAgICA/IHRoaXMuY3JlYXRlQ29udGFpbmVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBjb25jYXQodGhpcy5wcm9wcy5fZGFzaHByaXZhdGVfcGF0aCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3Byb3BzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmNoaWxkcmVuUHJvcCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIDogblxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIWlzRHJ5Q29tcG9uZW50KG5vZGUpKSB7XG4gICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVDb250YWluZXIoXG4gICAgICAgICAgICB0aGlzLnByb3BzLFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIGNvbmNhdCh0aGlzLnByb3BzLl9kYXNocHJpdmF0ZV9wYXRoLCBbJ3Byb3BzJywgLi4uY2hpbGRyZW5Qcm9wXSlcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBnZXRDb21wb25lbnQoX2Rhc2hwcml2YXRlX2xheW91dCwgY2hpbGRyZW4sIGxvYWRpbmdfc3RhdGUsIHNldFByb3BzKSB7XG4gICAgICAgIGNvbnN0IHtfZGFzaHByaXZhdGVfY29uZmlnLCBfZGFzaHByaXZhdGVfZGlzcGF0Y2gsIF9kYXNocHJpdmF0ZV9lcnJvcn0gPVxuICAgICAgICAgICAgdGhpcy5wcm9wcztcblxuICAgICAgICBpZiAoaXNFbXB0eShfZGFzaHByaXZhdGVfbGF5b3V0KSkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaXNTaW1wbGVDb21wb25lbnQoX2Rhc2hwcml2YXRlX2xheW91dCkpIHtcbiAgICAgICAgICAgIHJldHVybiBfZGFzaHByaXZhdGVfbGF5b3V0O1xuICAgICAgICB9XG4gICAgICAgIHZhbGlkYXRlQ29tcG9uZW50KF9kYXNocHJpdmF0ZV9sYXlvdXQpO1xuXG4gICAgICAgIGNvbnN0IGVsZW1lbnQgPSBSZWdpc3RyeS5yZXNvbHZlKF9kYXNocHJpdmF0ZV9sYXlvdXQpO1xuXG4gICAgICAgIC8vIEh5ZHJhdGUgY29tcG9uZW50cyBwcm9wc1xuICAgICAgICBjb25zdCBjaGlsZHJlblByb3BzID0gcGF0aE9yKFxuICAgICAgICAgICAgW10sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgJ2NoaWxkcmVuX3Byb3BzJyxcbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbGF5b3V0Lm5hbWVzcGFjZSxcbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbGF5b3V0LnR5cGVcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICBfZGFzaHByaXZhdGVfY29uZmlnXG4gICAgICAgICk7XG4gICAgICAgIGxldCBwcm9wcyA9IGRpc3NvYygnY2hpbGRyZW4nLCBfZGFzaHByaXZhdGVfbGF5b3V0LnByb3BzKTtcblxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNoaWxkcmVuUHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGNvbnN0IGNoaWxkcmVuUHJvcCA9IGNoaWxkcmVuUHJvcHNbaV07XG4gICAgICAgICAgICBpZiAoY2hpbGRyZW5Qcm9wLmluY2x1ZGVzKCcuJykpIHtcbiAgICAgICAgICAgICAgICBsZXQgcGF0aCA9IGNoaWxkcmVuUHJvcC5zcGxpdCgnLicpO1xuICAgICAgICAgICAgICAgIGxldCBub2RlO1xuICAgICAgICAgICAgICAgIGxldCBub2RlVmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKGNoaWxkcmVuUHJvcC5pbmNsdWRlcygnW10nKSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZnJvbnRQYXRoID0gW10sXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrUGF0aCA9IFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm91bmQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcGF0aC5mb3JFYWNoKHAgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFmb3VuZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwLmluY2x1ZGVzKCdbXScpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2gocC5yZXBsYWNlKCdbXScsICcnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2gocCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrUGF0aC5wdXNoKHApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBub2RlID0gcnBhdGgoZnJvbnRQYXRoLCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChub2RlID09PSB1bmRlZmluZWQgfHwgIW5vZGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBmaXJzdE5vZGUgPSBycGF0aChiYWNrUGF0aCwgbm9kZVswXSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghZmlyc3ROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBub2RlVmFsdWUgPSBub2RlLm1hcCgoZWxlbWVudCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudFBhdGggPSBjb25jYXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmNhdChbaV0sIGJhY2tQYXRoKVxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhc3NvY1BhdGgoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja1BhdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy53cmFwQ2hpbGRyZW5Qcm9wKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBycGF0aChiYWNrUGF0aCwgZWxlbWVudCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRQYXRoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50XG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcGF0aCA9IGZyb250UGF0aDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBub2RlID0gcnBhdGgocGF0aCwgcHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobm9kZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBub2RlVmFsdWUgPSB0aGlzLndyYXBDaGlsZHJlblByb3Aobm9kZSwgcGF0aCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHByb3BzID0gYXNzb2NQYXRoKHBhdGgsIG5vZGVWYWx1ZSwgcHJvcHMpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3Qgbm9kZSA9IHByb3BzW2NoaWxkcmVuUHJvcF07XG4gICAgICAgICAgICBpZiAobm9kZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgcHJvcHMgPSBhc3NvYyhcbiAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW5Qcm9wLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLndyYXBDaGlsZHJlblByb3Aobm9kZSwgW2NoaWxkcmVuUHJvcF0pLFxuICAgICAgICAgICAgICAgICAgICBwcm9wc1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZShwcm9wcy5pZCkgPT09ICdPYmplY3QnKSB7XG4gICAgICAgICAgICAvLyBUdXJuIG9iamVjdCBpZHMgKGZvciB3aWxkY2FyZHMpIGludG8gdW5pcXVlIHN0cmluZ3MuXG4gICAgICAgICAgICAvLyBCZWNhdXNlIG9mIHRoZSBgZGlzc29jYCBhYm92ZSB3ZSdyZSBub3QgbXV0YXRpbmcgdGhlIGxheW91dCxcbiAgICAgICAgICAgIC8vIGp1c3QgdGhlIGlkIHdlIHBhc3Mgb24gdG8gdGhlIHJlbmRlcmVkIGNvbXBvbmVudFxuICAgICAgICAgICAgcHJvcHMuaWQgPSBzdHJpbmdpZnlJZChwcm9wcy5pZCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgZXh0cmFQcm9wcyA9IHtcbiAgICAgICAgICAgIGxvYWRpbmdfc3RhdGU6IGxvYWRpbmdfc3RhdGUgfHwgTk9UX0xPQURJTkcsXG4gICAgICAgICAgICBzZXRQcm9wc1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8Q29tcG9uZW50RXJyb3JCb3VuZGFyeVxuICAgICAgICAgICAgICAgIGNvbXBvbmVudFR5cGU9e19kYXNocHJpdmF0ZV9sYXlvdXQudHlwZX1cbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZD17cHJvcHMuaWR9XG4gICAgICAgICAgICAgICAga2V5PXtwcm9wcy5pZH1cbiAgICAgICAgICAgICAgICBkaXNwYXRjaD17X2Rhc2hwcml2YXRlX2Rpc3BhdGNofVxuICAgICAgICAgICAgICAgIGVycm9yPXtfZGFzaHByaXZhdGVfZXJyb3J9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge19kYXNocHJpdmF0ZV9jb25maWcucHJvcHNfY2hlY2sgPyAoXG4gICAgICAgICAgICAgICAgICAgIDxDaGVja2VkQ29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGlsZHJlbj17Y2hpbGRyZW59XG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50PXtlbGVtZW50fVxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM9e3Byb3BzfVxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmFQcm9wcz17ZXh0cmFQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9e19kYXNocHJpdmF0ZV9sYXlvdXQudHlwZX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgICBjcmVhdGVFbGVtZW50KGVsZW1lbnQsIHByb3BzLCBleHRyYVByb3BzLCBjaGlsZHJlbilcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgPC9Db21wb25lbnRFcnJvckJvdW5kYXJ5PlxuICAgICAgICApO1xuICAgIH1cblxuICAgIGdldExheW91dFByb3BzKCkge1xuICAgICAgICByZXR1cm4gcHJvcE9yKHt9LCAncHJvcHMnLCB0aGlzLnByb3BzLl9kYXNocHJpdmF0ZV9sYXlvdXQpO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xheW91dCxcbiAgICAgICAgICAgIF9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AgfSlcbiAgICApO1xufVxuXG5mdW5jdGlvbiBQT1NUKHBhdGgsIGZldGNoQ29uZmlnLCBib2R5ID0ge30pIHtcbiAgICByZXR1cm4gZmV0Y2goXG4gICAgICAgIHBhdGgsXG4gICAgICAgIG1lcmdlRGVlcFJpZ2h0KGZldGNoQ29uZmlnLCB7XG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcbiAgICAgICAgICAgIGhlYWRlcnM6IGdldENTUkZIZWFkZXIoKSxcbiAgICAgICAgICAgIGJvZHk6IGJvZHkgPyBKU09OLnN0cmluZ2lmeShib2R5KSA6IG51bGxcbiAgICAgICAgfSlcbiAgICApO1xufVxuXG5jb25zdCByZXF1ZXN0ID0ge0dFVCwgUE9TVH07XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGFwaVRodW5rKGVuZHBvaW50LCBtZXRob2QsIHN0b3JlLCBpZCwgYm9keSkge1xuICAgIHJldHVybiBhc3luYyAoZGlzcGF0Y2gsIGdldFN0YXRlKSA9PiB7XG4gICAgICAgIGxldCB7Y29uZmlnLCBob29rc30gPSBnZXRTdGF0ZSgpO1xuICAgICAgICBsZXQgbmV3SGVhZGVycyA9IG51bGw7XG5cbiAgICAgICAgY29uc3QgdXJsID0gYCR7dXJsQmFzZShjb25maWcpfSR7ZW5kcG9pbnR9YDtcblxuICAgICAgICBmdW5jdGlvbiBzZXRDb25uZWN0aW9uU3RhdHVzKGNvbm5lY3RlZCkge1xuICAgICAgICAgICAgaWYgKGdldFN0YXRlKCkuZXJyb3IuYmFja0VuZENvbm5lY3RlZCAhPT0gY29ubmVjdGVkKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2goe1xuICAgICAgICAgICAgICAgICAgICB0eXBlOiAnU0VUX0NPTk5FQ1RJT05fU1RBVFVTJyxcbiAgICAgICAgICAgICAgICAgICAgcGF5bG9hZDogY29ubmVjdGVkXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBkaXNwYXRjaCh7XG4gICAgICAgICAgICB0eXBlOiBzdG9yZSxcbiAgICAgICAgICAgIHBheWxvYWQ6IHtpZCwgc3RhdHVzOiAnbG9hZGluZyd9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBsZXQgcmVzO1xuICAgICAgICAgICAgZm9yIChsZXQgcmV0cnkgPSAwOyByZXRyeSA8PSBNQVhfQVVUSF9SRVRSSUVTOyByZXRyeSsrKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gYXdhaXQgcmVxdWVzdFttZXRob2RdKHVybCwgY29uZmlnLmZldGNoLCBib2R5KTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGZldGNoIHJlamVjdGlvbiAtIHRoaXMgbWVhbnMgdGhlIHJlcXVlc3QgZGlkbid0IHJldHVybixcbiAgICAgICAgICAgICAgICAgICAgLy8gd2UgZG9uJ3QgZ2V0IGhlcmUgZnJvbSA0MDAvNTAwIGVycm9ycywgb25seSBuZXR3b3JrXG4gICAgICAgICAgICAgICAgICAgIC8vIGVycm9ycyBvciB1bnJlc3BvbnNpdmUgc2VydmVycy5cbiAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2ZldGNoIGVycm9yJywgcmVzKTtcbiAgICAgICAgICAgICAgICAgICAgc2V0Q29ubmVjdGlvblN0YXR1cyhmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHJlcy5zdGF0dXMgPT09IFNUQVRVUy5VTkFVVEhPUklaRUQgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLnN0YXR1cyA9PT0gU1RBVFVTLkJBRF9SRVFVRVNUXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChob29rcy5yZXF1ZXN0X3JlZnJlc2hfand0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBib2R5ID0gYXdhaXQgcmVzLnRleHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChib2R5LmluY2x1ZGVzKEpXVF9FWFBJUkVEX01FU1NBR0UpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV3Snd0ID0gYXdhaXQgaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmZldGNoLmhlYWRlcnMuQXV0aG9yaXphdGlvbi5zdWJzdHIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQmVhcmVyICcubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdKd3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3SGVhZGVycyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEF1dGhvcml6YXRpb246IGBCZWFyZXIgJHtuZXdKd3R9YFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IG1lcmdlRGVlcFJpZ2h0KGNvbmZpZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmV0Y2g6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBuZXdIZWFkZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgY29udGVudFR5cGUgPSByZXMuaGVhZGVycy5nZXQoJ2NvbnRlbnQtdHlwZScpO1xuXG4gICAgICAgICAgICBpZiAobmV3SGVhZGVycykge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoKGFkZEh0dHBIZWFkZXJzKG5ld0hlYWRlcnMpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNldENvbm5lY3Rpb25TdGF0dXModHJ1ZSk7XG4gICAgICAgICAgICBpZiAoY29udGVudFR5cGUgJiYgY29udGVudFR5cGUuaW5kZXhPZignYXBwbGljYXRpb24vanNvbicpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpLnRoZW4oanNvbiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHN0b3JlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF5bG9hZDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogcmVzLnN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBqc29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ganNvbjtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxvZ1dhcm5pbmdPbmNlKFxuICAgICAgICAgICAgICAgICdSZXNwb25zZSBpcyBtaXNzaW5nIGhlYWRlcjogY29udGVudC10eXBlOiBhcHBsaWNhdGlvbi9qc29uJ1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHJldHVybiBkaXNwYXRjaCh7XG4gICAgICAgICAgICAgICAgdHlwZTogc3RvcmUsXG4gICAgICAgICAgICAgICAgcGF5bG9hZDoge1xuICAgICAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiByZXMuc3RhdHVzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgY29uc3QgbWVzc2FnZSA9ICdFcnJvciBmcm9tIEFQSSBjYWxsOiAnICsgZW5kcG9pbnQ7XG4gICAgICAgICAgICBoYW5kbGVBc3luY0Vycm9yKGVyciwgbWVzc2FnZSwgZGlzcGF0Y2gpO1xuICAgICAgICB9XG4gICAgfTtcbn1cbiIsImNvbnN0IGFjdGlvbkxpc3QgPSB7XG4gICAgT05fUFJPUF9DSEFOR0U6IDEsXG4gICAgU0VUX1JFUVVFU1RfUVVFVUU6IDEsXG4gICAgU0VUX0dSQVBIUzogMSxcbiAgICBTRVRfUEFUSFM6IDEsXG4gICAgU0VUX0xBWU9VVDogMSxcbiAgICBTRVRfQVBQX0xJRkVDWUNMRTogMSxcbiAgICBTRVRfQ09ORklHOiAxLFxuICAgIEFERF9IVFRQX0hFQURFUlM6IDEsXG4gICAgT05fRVJST1I6IDEsXG4gICAgU0VUX0hPT0tTOiAxXG59O1xuXG5leHBvcnQgY29uc3QgZ2V0QWN0aW9uID0gYWN0aW9uID0+IHtcbiAgICBpZiAoYWN0aW9uTGlzdFthY3Rpb25dKSB7XG4gICAgICAgIHJldHVybiBhY3Rpb247XG4gICAgfVxuICAgIHRocm93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gICAgICAgICAnUGxlYXNlIHByb3ZpZGUgYW4gb3V0cHV0IGZvciB0aGlzIGNhbGxiYWNrOicsXG4gICAgICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoZGVwLCBudWxsLCAyKVxuICAgICAgICAgICAgXSk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBoZWFkID1cbiAgICAgICAgICAgICdJbiB0aGUgY2FsbGJhY2sgZm9yIG91dHB1dChzKTpcXG4gICcgK1xuICAgICAgICAgICAgb3V0cHV0cy5tYXAoY29tYmluZUlkQW5kUHJvcCkuam9pbignXFxuICAnKTtcblxuICAgICAgICBpZiAoIWlucHV0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0EgY2FsbGJhY2sgaXMgbWlzc2luZyBJbnB1dHMnLCBbXG4gICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAndGhlcmUgYXJlIG5vIGBJbnB1dGAgZWxlbWVudHMuJyxcbiAgICAgICAgICAgICAgICAnV2l0aG91dCBgSW5wdXRgIGVsZW1lbnRzLCBpdCB3aWxsIG5ldmVyIGdldCBjYWxsZWQuJyxcbiAgICAgICAgICAgICAgICAnJyxcbiAgICAgICAgICAgICAgICAnU3Vic2NyaWJpbmcgdG8gYElucHV0YCBjb21wb25lbnRzIHdpbGwgY2F1c2UgdGhlJyxcbiAgICAgICAgICAgICAgICAnY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW5ldmVyIHRoZWlyIHZhbHVlcyBjaGFuZ2UuJ1xuICAgICAgICAgICAgXSk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBzcGVjID0gW1xuICAgICAgICAgICAgW291dHB1dHMsICdPdXRwdXQnXSxcbiAgICAgICAgICAgIFtpbnB1dHMsICdJbnB1dCddLFxuICAgICAgICAgICAgW3N0YXRlLCAnU3RhdGUnXVxuICAgICAgICBdO1xuICAgICAgICBzcGVjLmZvckVhY2goKFthcmdzLCBjbHNdKSA9PiB7XG4gICAgICAgICAgICBpZiAoY2xzID09PSAnT3V0cHV0JyAmJiAhaGFzT3V0cHV0cykge1xuICAgICAgICAgICAgICAgIC8vIGp1c3QgYSBxdWlyayBvZiBob3cgd2UgcGFzcyAmIHBhcnNlIG91dHB1dHMgLSBpZiB5b3UgZG9uJ3RcbiAgICAgICAgICAgICAgICAvLyBwcm92aWRlIG9uZSwgaXQgbG9va3MgbGlrZSBhIHNpbmdsZSBibGFuayBvdXRwdXQuIFRoaXMgaXNcbiAgICAgICAgICAgICAgICAvLyBhY3R1YWxseSB1c2VmdWwgZm9yIGdyYWNlZnVsIGZhaWx1cmUsIHNvIHdlIHdvcmsgYXJvdW5kIGl0LlxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KGFyZ3MpKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2hFcnJvcihgQ2FsbGJhY2sgJHtjbHN9KHMpIG11c3QgYmUgYW4gQXJyYXlgLCBbXG4gICAgICAgICAgICAgICAgICAgIGhlYWQsXG4gICAgICAgICAgICAgICAgICAgIGBGb3IgJHtjbHN9KHMpIHdlIGZvdW5kOmAsXG4gICAgICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KGFyZ3MpLFxuICAgICAgICAgICAgICAgICAgICAnYnV0IHdlIGV4cGVjdGVkIGFuIEFycmF5LidcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGFyZ3MuZm9yRWFjaCgoaWRQcm9wLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgdmFsaWRhdGVBcmcoaWRQcm9wLCBoZWFkLCBjbHMsIGksIGRpc3BhdGNoRXJyb3IpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGZpbmREdXBsaWNhdGVPdXRwdXRzKG91dHB1dHMsIGhlYWQsIGRp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gICAgICBkaXNwYXRjaEVycm9yKCdDYWxsYmFjayB3aWxkY2FyZCBJRCBlcnJvcicsIFtcbiAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgYCR7Y2xzfVske2l9XS5pZCBoYXMga2V5IFwiJHtrfVwiYCxcbiAgICAgICAgICAgICAgICAgICAgJ0tleXMgbXVzdCBiZSBub24tZW1wdHkgc3RyaW5ncy4nXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgdiA9PT0gJ29iamVjdCcgJiYgdi53aWxkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGFsbG93ZWRXaWxkY2FyZHNbY2xzXVt2LndpbGRdICE9PSB2KSB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0NhbGxiYWNrIHdpbGRjYXJkIElEIGVycm9yJywgW1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGAke2Nsc31bJHtpfV0uaWRbXCIke2t9XCJdID0gJHt2LndpbGR9YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGBBbGxvd2VkIHdpbGRjYXJkcyBmb3IgJHtjbHN9cyBhcmU6YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleXMoYWxsb3dlZFdpbGRjYXJkc1tjbHNdKS5qb2luKCcsICcpXG4gICAgICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIWluY2x1ZGVzKHR5cGVvZiB2LCB3aWxkY2FyZFZhbFR5cGVzKSkge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0NhbGxiYWNrIHdpbGRjYXJkIElEIGVycm9yJywgW1xuICAgICAgICAgICAgICAgICAgICBoZWFkLFxuICAgICAgICAgICAgICAgICAgICBgJHtjbHN9WyR7aX1dLmlkW1wiJHtrfVwiXSA9ICR7SlNPTi5zdHJpbmdpZnkodil9YCxcbiAgICAgICAgICAgICAgICAgICAgJ1dpbGRjYXJkIGNhbGxiYWNrIElEIHZhbHVlcyBtdXN0IGJlIGVpdGhlciB3aWxkY2FyZHMnLFxuICAgICAgICAgICAgICAgICAgICAnb3IgY29uc3RhbnRzIG9mIG9uZSBvZiB0aGVzZSB0eXBlczonLFxuICAgICAgICAgICAgICAgICAgICB3aWxkY2FyZFZhbFR5cGVzLmpvaW4oJywgJylcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgaWQpO1xuICAgIH0gZWxzZSBpZiAodHlwZW9mIGlkID09PSAnc3RyaW5nJykge1xuICAgICAgICBpZiAoIWlkKSB7XG4gICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdDYWxsYmFjayBpdGVtIG1pc3NpbmcgSUQnLCBbXG4gICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICBgJHtjbHN9WyR7aX1dLmlkID0gXCIke2lkfVwiYCxcbiAgICAgICAgICAgICAgICAnRXZlcnkgaXRlbSBsaW5rZWQgdG8gYSBjYWxsYmFjayBuZWVkcyBhbiBJRCdcbiAgICAgICAgICAgIF0pO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGludmFsaWRDaGFycyA9IGlkSW52YWxpZENoYXJzLmZpbHRlcihjID0+IGluY2x1ZGVzKGMsIGlkKSk7XG4gICAgICAgIGlmIChpbnZhbGlkQ2hhcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdDYWxsYmFjayBpbnZhbGlkIElEIHN0cmluZycsIFtcbiAgICAgICAgICAgICAgICBoZWFkLFxuICAgICAgICAgICAgICAgIGAke2Nsc31bJHtpfV0uaWQgPSAnJHtpZH0nYCxcbiAgICAgICAgICAgICAgICBgY2hhcmFjdGVycyAnJHtpbnZhbGlkQ2hhcnMuam9pbihcIicsICdcI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FByb3BdKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2hFcnJvcignRHVwbGljYXRlIGNhbGxiYWNrIG91dHB1dHMnLCBbXG4gICAgICAgICAgICAgICAgICAgIGhlYWQsXG4gICAgICAgICAgICAgICAgICAgIGBPdXRwdXQgJHtpfSAoJHtpZFByb3B9KSBpcyBhbHJlYWR5IGluIHVzZS5gLFxuICAgICAgICAgICAgICAgICAgICAnQW55IGdpdmVuIG91dHB1dCBjYW4gb25seSBoYXZlIG9uZSBjYWxsYmFjayB0aGF0IHNldHMgaXQuJyxcbiAgICAgICAgICAgICAgICAgICAgJ1RvIHJlc29sdmUgdGhpcyBzaXR1YXRpb24sIHRyeSBjb21iaW5pbmcgdGhlc2UgaW50bycsXG4gICAgICAgICAgICAgICAgICAgICdvbmUgY2FsbGJhY2sgZnVuY3Rpb24sIGRpc3Rpbmd1aXNoaW5nIHRoZSB0cmlnZ2VyJyxcbiAgICAgICAgICAgICAgICAgICAgJ2J5IHVzaW5nIGBkYXNoLmNhbGxiYWNrX2NvbnRleHRgIGlmIG5lY2Vzc2FyeS4nXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld091dHB1dFN0cnNbaWRQcm9wXSA9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBpZE9iaiA9IHtpZCwgcHJvcGVydHl9O1xuICAgICAgICAgICAgY29uc3Qgc2VsZk92ZXJsYXAgPSB3aWxkY2FyZE92ZXJsYXAoaWRPYmosIG5ld091dHB1dE9ianMpO1xuICAgICAgICAgICAgY29uc3Qgb3RoZXJPdmVybGFwID0gc2VsZk92ZXJsYXAgfHwgd2lsZGNhcmRPdmVybGFwKGlkT2JqLCBvdXRPYmpzKTtcbiAgICAgICAgICAgIGlmIChzZWxmT3ZlcmxhcCB8fCBvdGhlck92ZXJsYXApIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpZFByb3AgPSBjb21iaW5lSWRBbmRQcm9wKGlkT2JqKTtcbiAgICAgICAgICAgICAgICBjb25zdCBpZFByb3AyID0gY29tYmluZUlkQW5kUHJvcChzZWxmT3ZlcmxhcCB8fCBvdGhlck92ZXJsYXApO1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ092ZXJsYXBwaW5nIHdpbGRjYXJkIGNhbGxiYWNrIG91dHB1dHMnLCBbXG4gICAgICAgICAgICAgICAgICAgIGhlYWQsXG4gICAgICAgICAgICAgICAgICAgIGBPdXRwdXQgJHtpfSAoJHtpZFByb3B9KWAsXG4gICAgICAgICAgICAgICAgICAgIGBvdmVybGFwcyBhbm90aGVyIG91dHB1dCAoJHtpZFByb3AyfSlgLFxuICAgICAgICAgICAgICAgICAgICBgdXNlZCBpbiAke3NlbGZPdmVybGFwID8gJ3RoaXMnIDogJ2EgZGlmZmVyZW50J30gY2FsbGJhY2suYFxuICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBuZXdPdXRwdXRPYmpzLnB1c2goaWRPYmopO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG4gICAga2V5cyhuZXdPdXRwdXRTdHJzKS5mb3JFYWNoKGsgPT4ge1xuICAgICAgICBvdXRTdHJzW2tdID0gMTtcbiAgICB9KTtcbiAgICBuZXdPdXRwdXRPYmpzLmZvckVhY2goaWRPYmogPT4ge1xuICAgICAgICBvdXRPYmpzLnB1c2goaWRPYmopO1xuICAgIH0pO1xufVxuXG5mdW5jdGlvbiBjaGVja0luT3V0T3ZlcmxhcChvdXQsIGlucHV0cykge1xuICAgIGNvbnN0IHtpZDogb3V0SWQsIHByb3BlcnR5OiBvdXRQcm9wfSA9IG91dDtcbiAgICByZXR1cm4gaW5wdXRzLnNvbWUoaW5fID0+IHtcbiAgICAgICAgY29uc3Qge2lkOiBpbklkLCBwcm9wZXJ0eTogaW5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Byb3AoYXJnKX0pYCxcbiAgICAgICAgICAgICAgICAgICAgYGhhcyBNQVRDSCBvciBBTExTTUFMTEVSIG9uIGtleShzKSAke2RpZmYuam9pbignLCAnKX1gLFxuICAgICAgICAgICAgICAgICAgICBgd2hlcmUgT3V0cHV0IDAgKCR7Y29tYmluZUlkQW5kUHJvcChvdXRwdXRzWzBdKX0pYCxcbiAgICAgICAgICAgICAgICAgICAgJ2RvZXMgbm90IGhhdmUgYSBNQVRDSCB3aWxkY2FyZC4gSW5wdXRzIGFuZCBTdGF0ZSBkbyBub3QnLFxuICAgICAgICAgICAgICAgICAgICAnbmVlZCBldmVyeSBNQVRDSCBmcm9tIHRoZSBPdXRwdXQocyksIGJ1dCB0aGV5IGNhbm5vdCBoYXZlJyxcbiAgICAgICAgICAgICAgICAgICAgJ2V4dHJhcyBiZXlvbmQgdGhlIE91dHB1dChzKS4nXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0pO1xufVxuXG5jb25zdCBtYXRjaFdpbGRLZXlzID0gKFthLCBiXSkgPT4ge1xuICAgIGNvbnN0IGFXaWxkID0gYSAmJiBhLndpbGQ7XG4gICAgY29uc3QgYldpbGQgPSBiICYmIGIud2lsZDtcbiAgICBpZiAoYVdpbGQgJiYgYldpbGQpIHtcbiAgICAgICAgLy8gRXZlcnkgd2lsZGNhcmQgY29tYmluYXRpb24gb3ZlcmxhcHMgZXhjZXB0IE1BVENIPC0+QUxMU01BTExFUlxuICAgICAgICByZXR1cm4gIShcbiAgICAgICAgICAgIChhID09PSBNQVRDSCAmJiBiID09PSBBTExTTUFMTEVSKSB8fFxuICAgICAgICAgICAgKGEgPT09IEFMTFNNQUxMRVIgJiYgYiA9PT0gTUFUQ0gpXG4gICAgICAgICk7XG4gICAgfVxuICAgIHJldHVybiBhID09PSBiIHx8IGFXaWxkIHx8IGJXaWxkO1xufTtcblxuZnVuY3Rpb24gd2lsZGNhcmRPdmVybGFwKH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N0cigwLCBsYXN0KVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3Qge3R5cGUsIG5hbWVzcGFjZX0gPSBjb21wb25lbnQ7XG4gICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdJbnZhbGlkIHByb3AgZm9yIHRoaXMgY29tcG9uZW50JywgW1xuICAgICAgICAgICAgICAgIGBQcm9wZXJ0eSBcIiR7cHJvcH1cIiB3YXMgdXNlZCB3aXRoIGNvbXBvbmVudCBJRDpgLFxuICAgICAgICAgICAgICAgIGAgICR7SlNPTi5zdHJpbmdpZnkoaWQpfWAsXG4gICAgICAgICAgICAgICAgYGluIG9uZSBvZiB0aGUgJHtjbHN9IGl0ZW1zIG9mIGEgY2FsbGJhY2suYCxcbiAgICAgICAgICAgICAgICBgVGhpcyBJRCBpcyBhc3NpZ25lZCB0byBhICR7bmFtZXNwYWNlfS4ke3R5cGV9IGNvbXBvbmVudGAsXG4gICAgICAgICAgICAgICAgJ2luIHRoZSBsYXlvdXQsIHdoaWNoIGRvZXMgbm90IHN1cHBvcnQgdGhpcyBwcm9wZXJ0eS4nLFxuICAgICAgICAgICAgICAgIHRhaWwoY2FsbGJhY2tzKVxuICAgICAgICAgICAgXSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiB2YWxpZGF0ZUlkUGF0dGVyblByb3AoaWQsIHByb3BlcnR5LCBjbHMsIGNhbGxiYWNrcykge1xuICAgICAgICByZXNvbHZlRGVwcygpKHBhdGhzKSh7aWQsIHByb3BlcnR5fSkuZm9yRWFjaChkZXAgPT4ge1xuICAgICAgICAgICAgY29uc3Qge2lkOiBpZFJlc29sdmVkLCBwYXRoOiBpZFBhdGh9ID0gZGVwO1xuICAgICAgICAgICAgdmFsaWRhdGVQcm9wKGlkUmVzb2x2ZWQsIGlkUGF0aCwgcHJvcGVydHksIGNscywgY2FsbGJhY2tzKTtcbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgY29uc3QgY2FsbGJhY2tJZHNDaGVja2VkRm9yU3RhdGUgPSB7fTtcblxuICAgIGZ1bmN0aW9uIHZhbGlkYXRlU3RhdGUoY2FsbGJhY2spIHtcbiAgICAgICAgY29uc3Qge3N0YXRlLCBvdXRwdXR9ID0gY2FsbGJhY2s7XG5cbiAgICAgICAgLy8gZW5zdXJlIHdlIGRvbid0IGNoZWNrIHRoZSBzYW1lIGNhbGxiYWNrIGZvciBzdGF0ZSBtdWx0aXBsZSB0aW1lc1xuICAgICAgICBpZiAoY2FsbGJhY2tJZHNDaGVja2VkRm9yU3RhdGVbb3V0cHV0XSkge1xuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGNhbGxiYWNrSWRzQ2hlY2tlZEZvclN0YXRlW291dHB1dF0gPSAxO1xuXG4gICAgICAgIGNvbnN0IGNscyA9ICdTdGF0ZSc7XG5cbiAgICAgICAgc3RhdGUuZm9yRWFjaCgoe2lkLCBwcm9wZXJ0eX0pID0+IHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgaWRQYXRoID0gZ2V0UGF0aChwYXRocywgaWQpO1xuICAgICAgICAgICAgICAgIGlmICghaWRQYXRoKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWxpZGF0ZUlkcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWlzc2luZ0lkKGlkLCBjbHMsIFtjYWxsYmFja10pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFsaWRhdGVQcm9wKGlkLCBpZFBhdGgsIHByb3BlcnR5LCBjbHMsIFtjYWxsYmFja10pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgIC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O1xuICAgICAgICAgICAgICAgICAgICBpZiAoZG9TdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSXQgd291bGQgYmUgcmVkdW5kYW50IHRvIGNoZWNrIHN0YXRlIG9uIGJvdGggaW5wdXRzXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhbmQgb3V0cHV0cyAtIHNvIG9ubHkgc2V0IGRvU3RhdGUgZm9yIG91dHB1dHMuXG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja3MuZm9yRWFjaCh2YWxpZGF0ZVN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHZhbGlkYXRlTWFwKG91dHB1dE1hcCwgJ091dHB1dCcsIHRydWUpO1xuICAgIHZhbGlkYXRlTWFwKGlucHV0TWFwLCAnSW5wdXQnKTtcblxuICAgIGZ1bmN0aW9uIHZhbGlkYXRlUGF0dGVybnMocGF0dGVybnMsIGNscywgZG9TdGF0ZSkge1xuICAgICAgICBmb3IgKGNvbnN0IGtleVN0ciBpbiBwYXR0ZXJucykge1xuICAgICAgICAgICAgY29uc3Qga2V5UGF0dGVybnMgPSBwYXR0ZXJuc1trZXlTdHJdO1xuICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBrZXlQYXR0ZXJucykge1xuICAgICAgICAgICAgICAgIGtleVBhdHRlcm5zW3Byb3BlcnR5XS5mb3JFYWNoKCh7a2V5cywgdmFsdWVzLCBjYWxsYmFja3N9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGlkID0gemlwT2JqKGtleXMsIHZhbHVlcyk7XG4gICAgICAgICAgICAgICAgICAgIHZhbGlkYXRlSWRQYXR0ZXJuUHJvcChpZCwgcHJvcGVydHksIGNscywgY2FsbGJhY2tzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRvU3RhdGUpIH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AgICAgICByZXR1cm4gZmluYWxHcmFwaHM7XG4gICAgfVxuXG4gICAgcGFyc2VkRGVwZW5kZW5jaWVzLmZvckVhY2goZGVwZW5kZW5jeSA9PiB7XG4gICAgICAgIGNvbnN0IHtvdXRwdXRzLCBpbnB1dHN9ID0gZGVwZW5kZW5jeTtcblxuICAgICAgICBvdXRwdXRzLmNvbmNhdChpbnB1dHMpLmZvckVhY2goaXRlbSA9PiB7XG4gICAgICAgICAgICBjb25zdCB7aWR9ID0gaXRlbTtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgZm9yRWFjaE9iakluZGV4ZWQoKHZhbCwga2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghd2lsZGNhcmRQbGFjZWhvbGRlcnNba2V5XSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgd2lsZGNhcmRQbGFjZWhvbGRlcnNba2V5XSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleGFjdDogW10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwYW5kOiAwXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleVBsYWNlaG9sZGVycyA9IHdpbGRjYXJkUGxhY2Vob2xkZXJzW2tleV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWwgJiYgdmFsLndpbGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWwuZXhwYW5kKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5UGxhY2Vob2xkZXJzLmV4cGFuZCArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleVBsYWNlaG9sZGVycy5leGFjdC5pbmRleE9mKHZhbCkgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrZXlQbGFjZWhvbGRlcnMuZXhhY3QucHVzaCh2YWwpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgaWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcblxuICAgIGZvckVhY2hPYmpJbmRleGVkKGtleVBsYWNlaG9sZGVycyA9PiB7XG4gICAgICAgIGNvbnN0IHtleGFjdCwgZXhwYW5kfSA9IGtleVBsYWNlaG9sZGVycztcbiAgICAgICAgY29uc3QgdmFscyA9IGV4YWN0LnNsaWNlKCkuc29ydChpZFZhbFNvcnQpO1xuICAgICAgICBpZiAoZXhwYW5kKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGV4cGFuZDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4YWN0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB2YWxzLnNwbGljZSgwLCAwLCBbdmFsQmVmb3JlKHZhbHNbMF0pXSk7XG4gICAgICAgICAgICAgICAgICAgIHZhbHMucHVzaCh2YWxBZnRlcih2YWxzW3ZhbHMubGVuZ3RoIC0gMV0pKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YWxzLnB1c2goaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKCFleGFjdC5sZW5ndGgpIHtcbiAgICAgICAgICAgIC8vIG9ubHkgTUFUQ0gvQUxMIC0gc3RpbGwgbmVlZCBhIHZhbHVlXG4gICAgICAgICAgICB2YWxzLnB1c2goMCk7XG4gICAgICAgIH1cbiAgICAgICAga2V5UGxhY2Vob2xkZXJzLnZhbHMgPSB2YWxzO1xuICAgIH0sIHdpbGRjYXJkUGxhY2Vob2xkZXJzKTtcblxuICAgIGZ1bmN0aW9uIG1ha2VBbGxJZHMoaWRTcGVjLCBvdXRJZEZpbmFsKSB7XG4gICAgICAgIGxldCBpZExpc3QgPSBbe31dO1xuICAgICAgICBmb3JFYWNoT2JqSW5kZXhlZCgodmFsLCBrZXkpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHRlc3RWYWxzID0gd2lsZGNhcmRQbGFjZWhvbGRlcnNba2V5XS52YWxzO1xuICAgICAgICAgICAgY29uc3Qgb3V0VmFsSW5kZXggPSB0ZXN0VmFscy5pbmRleE9mKG91dElkRmluYWxba2V5XSk7XG4gICAgICAgICAgICBsZXQgbmV3VmFscyA9IFt2YWxdO1xuICAgICAgICAgICAgaWYgKHZhbCAmJiB2YWwud2lsZCkge1xuICAgICAgICAgICAgICAgIGlmICh2YWwgPT09IEFMTFNNQUxMRVIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG91dFZhbEluZGV4ID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV3VmFscyA9IHRlc3RWYWxzLnNsaWNlKDAsIG91dFZhbEluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vIHNtYWxsZXIgaXRlbXMgLSBkZWxldGUgYWxsIG91dHB1dHMuXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWxzID0gW107XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBNQVRDSCBvciBBTExcbiAgICAgICAgICAgICAgICAgICAgLy8gTUFUQ0ggKmlzKiBBTEwgZm9yIG91dHB1dHMsIGllIHdlIGRvbid0IGFscmVhZHkgaGF2ZSBhXG4gICAgICAgICAgICAgICAgICAgIC8vIHZhbHVlIHNwZWNpZmllZCBpbiBgb3V0SWRGaW5hbGBcbiAgICAgICAgICAgICAgICAgICAgbmV3VmFscyA9XG4gICAgICAgICAgICAgICAgICAgICAgICBvdXRWYWxJbmRleCA9PT0gLTEgfHwgdmFsID09PSBBTExcb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c3Qge291dHB1dHMsIGlucHV0c30gPSBkZXBlbmRlbmN5O1xuXG4gICAgICAgIC8vIG5ldyBjYWxsYmFjaywgYWRkIGFuIGVtcHR5IGFycmF5IGZvciBpdHMgaW5wdXRzIGFuZCBvdXRwdXRzXG4gICAgICAgIGNiSW4ucHVzaChbXSk7XG4gICAgICAgIGNiT3V0LnB1c2goW10pO1xuXG4gICAgICAgIGZ1bmN0aW9uIGFkZE91dHB1dFRvTXVsdGkob3V0SWRGaW5hbCwgb3V0SWRQcm9wKSB7XG4gICAgICAgICAgICBtdWx0aUdyYXBoLmFkZE5vZGUob3V0SWRQcm9wKTtcbiAgICAgICAgICAgIGlucHV0cy5mb3JFYWNoKGluT2JqID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB7aWQ6IGluSWQsIHByb3BlcnR5fSA9IGluT2JqO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaW5JZCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5JZExpc3QgPSBtYWtlQWxsSWRzKGluSWQsIG91dElkRmluYWwpO1xuICAgICAgICAgICAgICAgICAgICBpbklkTGlzdC5mb3JFYWNoKGlkID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZElucHV0VG9NdWx0aShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21iaW5lSWRBbmRQcm9wKHtpZCwgcHJvcGVydHl9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRJZFByb3BcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGFkZElucHV0VG9NdWx0aShjb21iaW5lSWRBbmRQcm9wKGluT2JqKSwgb3V0SWRQcm9wKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAg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0aGUgc2FtZSBjYWxsYmFja1xuICAgICAgICAgICAgY29uc3QgYWxzb0lucHV0ID0gY2hlY2tJbk91dE92ZXJsYXAob3V0SWRQcm9wLCBpbnB1dHMpO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBvdXRJZCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBvdXRJZExpc3QgPSBtYWtlQWxsSWRzKG91dElkLCB7fSk7XG4gICAgICAgICAgICAgICAgb3V0SWRMaXN0LmZvckVhY2goaWQgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0ZW1wT3V0SWRQcm9wID0ge2lkLCBwcm9wZXJ0eX07XG4gICAgICAgICAgICAgICAgICAgIGxldCBvdXRJZE5hbWUgPSBjb21iaW5lSWRBbmRQcm9wKHRlbXBPdXRJZFByb3ApO1xuICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGlzIG91dHB1dCBpcyBhbHNvIGFuIGlucHV0LCBhZGQgYG91dHB1dFRhZ2AgdG8gdGhlIG5hbWVcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFsc29JbnB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZHVwbGljYXRlT3V0cHV0cy5wdXNoKHRlbXBPdXRJZFByb3ApO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0SWROYW1lICs9IG91dHB1dFRhZztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBhZGRPdXRwdXRUb011bHRpKGlkLCBvdXRJZE5hbWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGFkZFBhdHRlcm4ob3V0cHV0UGF0dGVybnMsIG91dElkLCBwcm9wZXJ0eSwgZmluYWxEZXBlbmRlbmN5KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGV0IG91dElkTmFtZSA9IGNvbWJpbmVJZEFuZFByb3Aob3V0SWRQcm9wKTtcbiAg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T3V0SWRQcm9wID0+IHtcbiAgICAgICAgY29uc3Qgb3JpZ2luYWxOYW1lID0gY29tYmluZUlkQW5kUHJvcChkdXBlT3V0SWRQcm9wKTtcbiAgICAgICAgY29uc3QgbmV3TmFtZSA9IG9yaWdpbmFsTmFtZS5jb25jYXQob3V0cHV0VGFnKTtcbiAgICAgICAgZm9yICh2YXIgY250ID0gMDsgY250IDwgY2JJbi5sZW5ndGg7IGNudCsrKSB7XG4gICAgICAgICAgICAvLyBjaGVjayBpZiBpbnB1dCB0byB0aGUgY2FsbGJhY2tcbiAgICAgICAgICAgIGlmIChjYkluW2NudF0uc29tZShpbk5hbWUgPT4gaW5OYW1lID09PSBvcmlnaW5hbE5hbWUpKSB7XG4gICAgICAgICAgICAgICAgLyogbWFrZSBzdXJlIGl0J3Mgbm90IGFsc28gYW4gb3V0cHV0IG9mIHRoZSBjYWxsYmFja1xuICAgICAgICAgICAgICAgICAqICh0aGlzIHdpbGwgYmUgdGhlIG9yaWdpbmFsIGNhbGxiYWNrKVxuICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgIGlmICghY2JPdXRbY250XS5zb21lKG91dE5hbWUgPT4gb3V0TmFtZSA9PT0gbmV3TmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY2JPdXRbY250XS5mb3JFYWNoKG91dE5hbWUgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkSW5wdXRUb011bHRpKG5ld05hbWUsIG91dE5hbWUsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gZmluYWxHcmFwaHM7XG59XG5cbmZ1bmN0aW9uIGZpbmRXaWxkY2FyZEtleXMoaWQpIHtcbiAgICBjb25zdCBtYXRjaEtleXMgPSBbXTtcbiAgICBjb25zdCBhbGxzbWFsbGVyS2V5cyA9IFtdO1xuICAgIG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FsID09PSBBTExTTUFMTEVSKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgICdpbnZhbGlkIHdpbGRjYXJkIGlkIHBhaXI6ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0dGVyblZhbHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZktleXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZlBhdHRlcm5WYWxzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZWYWxzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICBpZFZhbFNvcnQodmFsLCByZWZWYWxzW3JlZkluZGV4XSkgIT09XG4gICAgICAgICAgICAgICAgICAgIChwYXR0ZXJuVmFsID09PSBBTExTTUFMTEVSXG4gICAgICAgICAgICAgICAgICAgICAgICA/IC0xXG4gICAgICAgICAgICAgICAgICAgICAgICA6IHJlZlBhdHRlcm5WYWwgPT09IEFMTFNNQUxMRVJcbiAgICAgICAgICAgICAgICAgICAgICAgID8gMVxuICAgICAgICAgICAgICAgICAgICAgICAgOiAwKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKHZhbCAhPT0gcGF0dGVyblZhbCkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO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9uXG4gICAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhpZCkuc29ydCgpO1xuICAgICAgICBjb25zdCB2YWxzID0gcHJvcHMoa2V5cywgaWQpO1xuICAgICAgICBjb25zdCBrZXlTdHIgPSBrZXlzLmpvaW4oJywnKTtcbiAgICAgICAgY29uc3QgcGF0dGVybnMgPSAoZ3JhcGhzLm91dHB1dFBhdHRlcm5zW2tleVN0cl0gfHwge30pW3Byb3BdO1xuICAgICAgICBpZiAocGF0dGVybnMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGF0dGVybnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXR0ZXJuVmFscyA9IHBhdHRlcm5zW2ldLnZhbHVlcztcbiAgICAgICAgICAgICAgICBpZiAoaWRNYXRjaChrZXlzLCB2YWxzLCBwYXR0ZXJuVmFscykpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sgPSBwYXR0ZXJuc1tpXS5jYWxsYmFja3NbMF07XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUgPSByZXNvbHZlRGVwcyhrZXlzLCB2YWxzLCBwYXR0ZXJuVmFscyk7XG4gICAgICAgICAgICAgICAgICAgIGFueVZhbHMgPSBnZXRBbnlWYWxzKHBhdHRlcm5WYWxzLCB2YWxzKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGlmICghcmVzb2x2ZSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1ha2VSZXNvbHZlZENhbGxiYWNrKGNhbGxiYWNrLCByZXNvbHZlLCBhbnlWYWxzKTtcbn1cblxuZnVuY3Rpb24gYWRkUmVzb2x2ZWRGcm9tT3V0cHV0cyhjYWxsYmFjaywgb3V0UGF0dGVybiwgb3V0cywgbW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dCBzaW5nbGVPdXRQYXR0ZXJuID0gb3V0cHV0c1tmaXJzdFNpbmdsZU91dHB1dF07XG4gICAgICAgICAgICBpZiAoc2luZ2xlT3V0UGF0dGVybikge1xuICAgICAgICAgICAgICAgIGFkZFJlc29sdmVkRnJvbU91dHB1dHMoXG4gICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrLFxuICAgICAgICAgICAgICAgICAgICBzaW5nbGVPdXRQYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHBhdGhzKShzaW5nbGVPdXRQYXR0ZXJuKSxcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlc1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgICogSWYgZXZlcnkgb3V0cHV0IGhhcyBBTEwgd2UgbmVlZCB0byByZWR1Y2UgcmVzb2x2ZWQgc2V0XG4gICAgICAgICAgICAgICAgICogdG8gb25lIGl0ZW0gcGVyIGNvbWJpbmF0aW9uIG9mIE1BVENIIHZhbHVlcy5cbiAgICAgICAgICAgICAgICAgKiBUaGF0IHdpbGwgZ2l2ZSBvbmUgcmVzdWx0IHBlciBjYWxsYmFjayBpbnZvY2F0aW9uLlxuICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgIGNvbnN0IGFueVNlZW4gPSB7fTtcbiAgICAgICAgICAgICAgICBvdXRwdXRzLmZvckVhY2gob3V0UGF0dGVybiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG91dFNldCA9IHJlc29sdmUocGF0aHMpKG91dFBhdHRlcm4pLmZpbHRlcihpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoU3RyID0gSlNPTi5zdHJpbmdpZnkocHJvcHMobWF0Y2hLZXlzLCBpLmlkKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWFueVNlZW5bbWF0Y2hTdHJdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYW55U2VlblttYXRjaFN0cl0gPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgYWRkUmVzb2x2ZWRGcm9tT3V0cHV0cyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrLFxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0UGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dFNldCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZXNcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnN0IGNiID0gbWFrZVJlc29sdmVkQ2FsbGJhY2soY2FsbGJhY2ssIHJlc29sdmUsICcnKTtcbiAgICAgICAgICAgIGlmIChmbGF0dGVuKGNiLmdldE91dHB1dHMocGF0aHMpKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBtYXRjaGVzLnB1c2goY2IpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbn1cblxuLypcbiAqIEZvciBhIGdpdmVuIGlkIGFuZCBwcm9wIGZpbmQgYWxsIGNhbGxiYWNrcyBpdCdzIGFuIGlucHV0IG9mLlxuICpcbiAqIFJldHVybnMgYW4gYXJyYXkgb2Ygb2JqZWN0czpcbiAqICAge2NhbGxiYWNrLCByZXNvbHZlZElkLCBnZXRPdXRwdXRzLCBnZXRJbnB1dHMsIGdldFN0YXRlfVxuICogICBTZWUgZ2V0Q2FsbGJhY2tCeU91dHB1dCBmb3IgZGV0YWlscy5cbiAqXG4gKiBOb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mRDYi5jaGFuZ2VkUHJvcElkcyxcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2suY2hhbmdlZFByb3BJZHNcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjay5pbml0aWFsQ2FsbCkge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZENiLmluaXRpYWxDYWxsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZvdW5kQ2JJZHNbY2FsbGJhY2sucmVzb2x2ZWRJZF0gPSBjYWxsYmFja3MubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrcy5wdXNoKGNhbGxiYWNrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGFkZENhbGxiYWNrSWZBcnJheShpZFN0cikge1xuICAgICAgICByZXR1cm4gY2IgPT5cbiAgICAgICAgICAgIGNiLmdldElucHV0cyhwYXRocykuc29tZShpbmkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShpbmkpICYmXG4gICAgICAgICAgICAgICAgICAgIGluaS5zb21lKGluaWogPT4gc3RyaW5naWZ5SWQoaW5pai5pZCkgPT09IGlkU3RyKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGNhbGxiYWNrIHNob3VsZCB0cmlnZ2VyIGV2ZW4gd2l0aCBubyBjaGFuZ2VkUHJvcHMsXG4gICAgICAgICAgICAgICAgICAgIC8vIHNpbmNlIHRoZSBwcm9wcyB0aGF0IGNoYW5nZWQgbm8gbG9uZ2VyIGV4aXN0LlxuICAgICAgICAgICAgICAgICAgICAvLyBXZSdyZSBraW5kIG9mIGFidXNpbmcgdGhlIGBpbml0aWFsQ2FsbGAgZmxhZyBoZXJlLCBpdCdzXG4gICAgICAgICAgICAgICAgICAgIC8vIG1vcmUgbGlrZSBhIFwiZmluYWwgY2FsbFwiIGZvciB0aGUgcmVtb3ZlZCBpbnB1dHMsIGJ1dFxuICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGNhc2UgaXMgbm90IHN1YmplY3QgdG8gYHByZXZlbnRfaW5pdGlhbF9jYWxsYC5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhuZXdQYXRocykpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2IuaW5pdGlhbENhbGwgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2IuY2hhbmdlZFByb3BJZHMgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZENhbGxiYWNrKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaGFuZGxlT25lSWQoaWQsIG91dElkQ2FsbGJhY2tzLCBpbklkQ2FsbGJhY2tzKSB7XG4gICAgICAgIGlmIChvdXRJZENhbGxiYWNrcykge1xuICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBvdXRJZENhbGxiYWNrcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNiID0gZ2V0Q2FsbGJhY2tCeU91dHB1dChncmFwaHMsIHBhdGhzLCBpZCwgcHJvcGVydHkpO1xuICAgICAgICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgICAgICAgICAvLyBjYWxsYmFja3MgZm91bmQgaW4gdGhlIGxheW91dCBieSBvdXRwdXQgc2hvdWxkIGFsd2F5cyBydW5cbiAgICAgICAgICAgICAgICAgICAgLy8gdW5sZXNzIHNwZWNpZmljYWxseSByZXF1ZXN0ZWQgbm90IHRvLlxuICAgICAgICAgICAgICAgICAgICAvLyBpZSB0aGlzIGlzIHRoZSBpbml0aWFsIGNhbGwgb2YgdGhpcyBjYWxsYmFjayBldmVuIGlmIGl0J3NcbiAgICAgICAgICAgICAgICAgICAgLy8gbm90IHRoZSBwYWdlIGluaXRpYWxpemF0aW9uIGJ1dCBqdXN0IGEgbmV3IGxheW91dCBjaHVua1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWNiLmNhbGxiYWNrLnByZXZlbnRfaW5pdGlhbF9jYWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYi5pbml0aWFsQ2FsbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRDYWxsYmFjayhjYik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFvdXRwdXRzT25seSAmJiBpbklkQ2FsbGJhY2tzKSB7XG4gICAgICAgICAgICBjb25zdCBtYXliZUFkZENhbGxiYWNrID0gcmVtb3ZlZEFycmF5SW5wdXRzT25seVxuICAgICAgICAgICAgICAgID8gYWRkQ2FsbGJhY2tJZkFycmF5KHN0cmluZ2lmeUlkKGlkKSlcbiAgICAgICAgICAgICAgICA6IGFkZENhbGxiYWNrO1xuICAgICAgICAgICAgbGV0IGhhbmRsZVRoaXNDYWxsYmFjayA9IG1heWJlQWRkQ2FsbGJhY2s7XG4gICAgICAgICAgICBpZiAoY2h1bmtQYXRoKSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlVGhpc0NhbGxiYWNrID0gY2IgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAhYWxsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0c1dpdGgoY2h1bmtQYXRoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbHVjaygncGF0aCcsIGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhwYXRocykpKVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heWJlQWRkQ2FsbGJhY2soY2IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAoY29uc3QgcHJvcGVydHkgaW4gaW5JZENhbGxiYWNrcykge1xuICAgICAgICAgICAgICAgIGdldENhbGxiYWNrc0J5SW5wdXQoXG4gICAgICAgICAgICAgICAgICAgIGdyYXBocyxcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMsXG4gICAgICAgICAgICAgICAgICAgIGlkLFxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eSxcbiAgICAgICAgICAgICAgICAgICAgSU5ESVJFQ1RcbiAgICAgICAgICAgICAgICApLmZvckVhY2goaGFuZGxlVGhpc0NhbGxiYWNrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNyYXdsTGF5b3V0KGxheW91dENodW5rLCBjaGlsZCA9PiB7XG4gICAgICAgIGNvbnN0IGlkID0gcGF0aChbJ3Byb3BzJywgJ2lkJ10sIGNoaWxkKTtcbiAgICAgICAgaWYgKGlkKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGlkID09PSAnc3RyaW5nJyAmJiAhcmVtb3ZlZEFycmF5SW5wdXRzT25seSkge1xuICAgICAgICAgICAgICAgIGhhbmRsZU9uZUlkKGlkLCBncmFwaHMub3V0cHV0TWFwW2lkXSwgZ3JhcGhzLmlucHV0TWFwW2lkXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IGtleVN0ciA9IE9iamVjdC5rZXlzKGlkKS5zb3J0KCkuam9pbignLCcpO1xuICAgICAgICAgICAgIC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vbHZlUmVuZGVyZWQpO1xuICAgIH0pO1xuXG4gICAgdGFyZ2V0cy5mb3JFYWNoKGlkID0+IHtcbiAgICAgICAgY29uc3QgcGF0aE9mSWQgPSBnZXRQYXRoKHBhdGhzLCBpZCk7XG4gICAgICAgIGlmICghcGF0aE9mSWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRhcmdldCA9IHBhdGgocGF0aE9mSWQsIGxheW91dCk7XG4gICAgICAgIGlmICghdGFyZ2V0KSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBjb21wb25lbnQgPSBSZWdpc3RyeS5yZXNvbHZlKHRhcmdldCk7XG4gICAgICAgIGNvbnN0IHJlYWR5ID0gaXNSZWFkeShjb21wb25lbnQpO1xuXG4gICAgICAgIGlmIChyZWFkeSAmJiB0eXBlb2YgcmVhZHkudGhlbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgcHJvbWlzZXMucHVzaChcbiAgICAgICAgICAgICAgICBQcm9taXNlLnJhY2UoW1xuICAgICAgICAgICAgICAgICAgICByZWFkeSxcbiAgICAgICAgICAgICAgICAgICAgcmVuZGVyZWQudGhlbihcbiAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHN0cmluZ2lmeUlkKGlkKSkgJiYgcmVhZHlcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gcHJvbWlzZXMubGVuZ3RoID8gUHJvbWlzZS5hbGwocHJvbWlzZXMpIDogdHJ1ZTtcbn07XG4iLCJpbXBvcnQge1xuICAgIGNvbmNhdCxcbiAgICBmaWx0ZXIsXG4gICAgZmluZCxcbiAgICBmb3JFYWNoT2JqSW5kZXhlZCxcbiAgICBwYXRoLF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gICAgIGZvckVhY2hPYmpJbmRleGVkKChvbGRWYWxQYXRocywgb2xkS2V5cykgPT4ge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFscyA9IGZpbHRlcigoe3BhdGh9KSA9PiBkaWZmSGVhZChwYXRoKSwgb2xkVmFsUGF0aHMpO1xuICAgICAgICAgICAgaWYgKG5ld1ZhbHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgb2Jqc1tvbGRLZXlzXSA9IG5ld1ZhbHM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIG9sZE9ianMpO1xuICAgIH1cblxuICAgIGNyYXdsTGF5b3V0KHN1YlRyZWUsIChjaGlsZCwgaXRlbXBhdGgpID0+IHtcbiAgICAgICAgY29uc3QgaWQgPSBwYXRoKFsncHJvcHMnLCAnaWQnXSwgY2hpbGQpO1xuICAgICAgICBpZiAoaWQpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKGlkKS5zb3J0KCk7XG4gICAgICAgICAgICAgICAgY29uc3QgdmFsdWVzID0gcHJvcHMoa2V5cywgaWQpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGtleVN0ciA9IGtleXMuam9pbignLCcpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHBhdGhzID0gKG9ianNba2V5U3RyXSA9IG9ianNba2V5U3RyXSB8fCBbXSk7XG4gICAgICAgICAgICAgICAgcGF0aHMucHVzaCh7dmFsdWVzLCBwYXRoOiBjb25jYXQoc3RhcnRpbmdQYXRoLCBpdGVtcGF0aCl9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgc3Ryc1tpZF0gPSBjb25jYXQoc3RhcnRpbmdQYXRoLCBpdGVtcGF0aCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcblxuICAgIC8vIFdlIGluY2x1ZGUg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KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IGNoaWxkcmVuUHJvcHMgPSBwYXRoT3IoXG4gICAgICAgICAgICBbXSxcbiAgICAgICAgICAgIFtvYmplY3QubmFtZXNwYWNlLCBvYmplY3QudHlwZV0sXG4gICAgICAgICAgICB3aW5kb3cuX19kYXNocHJpdmF0ZV9jaGlsZHJlblByb3BzXG4gICAgICAgICk7XG4gICAgICAgIGNoaWxkcmVuUHJvcHMuZm9yRWFjaChjaGlsZHJlblByb3AgPT4ge1xuICAgICAgICAgICAgaWYgKGNoaWxkcmVuUHJvcC5pbmNsdWRlcygnW10nKSkge1xuICAgICAgICAgICAgICAgIGxldCBbZnJvbnRQYXRoLCBiYWNrUGF0aF0gPSBjaGlsZHJlblByb3BcbiAgICAgICAgICAgICAgICAgICAgLnNwbGl0KCdbXScpXG4gICAgICAgICAgICAgICAgICAgIC5tYXAocCA9PiBwLnNwbGl0KCcuJykuZmlsdGVyKGUgPT4gZSkpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGZyb250ID0gY29uY2F0KFsncHJvcHMnXSwgZnJvbnRQYXRoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBiYXNlUGF0aCA9IGNvbmNhdChjdXJyZW50UGF0aCwgZnJvbnQpO1xuICAgICAgICAgICAgICAgIGNyYXdsTGF5b3V0KHBhdGgoZnJvbnQsIG9iamVjdCksIGZ1bmMsIGJhc2VQYXRoLCBiYWNrUGF0aCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IG5ld1BhdGggPSBjb25jYXQoY3VycmVudFBhdGgsIFtcbiAgICAgICAgICAgICAgICAgICAgJ3Byb3BzJyxcbiAgICAgICAgICAgICAgICAgICAgLi4uY2hpbGRyZW5Qcm9wLnNwbGl0KCcuJylcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgICAgICBjcmF3bExheW91dChcbiAgICAgICAgICAgICAgICAgICAgcGF0aChbJ3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IGJlZW4gY2xlYW5lZCB1cCwgd2UnbGwgbGV0IHRoZW0gdGhyb3cuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgaW50ZW50aW9uYWxseSBhbiBpbnZhcmlhbnQgdGhhdCBnZXRzIGNhdWdodC4gSXQncyB0aGUgc2FtZVxuICAgICAgICAgICAgICAgIC8vIGJlaGF2aW9yIGFzIHdpdGhvdXQgdGhpcyBzdGF0ZW1lbnQgZXhjZXB0IHdpdGggYSBiZXR0ZXIgbWVzc2FnZS5cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHR5cGVTcGVjc1t0eXBlU3BlY05hbWVdICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0gRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAoY29tcG9uZW50TmFtZSB8fCAnUmVhY3QgY2xhc3MnKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJzogJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24gK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICcgdHlwZSBgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZVNwZWNOYW1lICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYCBpcyBpbnZhbGlkOyAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnaXQgbXVzdCBiZSBhIGZ1bmN0aW9uLCB1c3VhbGx5IGZyb20gdGhlIGBwcm9wLXR5cGVzYCBwYWNrYWdlLCBidXQgcmVjZWl2ZWQgYCcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiB0eXBlU3BlY3NbdHlwZVNwZWNOYW1lXSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2AuJ1xuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBlcnJvci5uYW1lID0gJ0ludmFyaWFudCBWaW9sYXRpb24nO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yID0gdHlwZVNwZWNzW3R5cGVTcGVjTmFtZV0oXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXMsXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlU3BlY05hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnROYW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICBudWxsLFxuICAgICAgICAgICAgICAgICAgICAgICAgUmVhY3RQcm9wVHlwZXNTZWNyZXRcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGNhdGNoIChleCkge1xuICAgICAgICAgICAgICAgIGVycm9yID0gZXg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXJyb3IgJiYgIShlcnJvciBpbnN0YW5jZW9mIEVycm9yKSkge1xuICAgICAgICAgICAgICAgIGVycm9ycy5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAoY29tcG9uZW50TmFtZSB8fCAnUmVhY3QgY2xhc3MnKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAnOiB0eXBlIHNwZWNpZmljYXRpb24gb2YgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbiArXG4gICAgICAgICAgICAgICAgICAgICAgICAnIGAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVTcGVjTmFtZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAnYCBpcyBpbnZhbGlkOyB0aGUgdHlwZSBjaGVja2VyICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2Z1bmN0aW9uIG11c3QgcmV0dXJuIGBudWxsYCBvciBhbiBgRXJyb3JgIGJ1dCByZXR1cm5lZCBhICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZW9mIGVycm9yICtcbiAgICAgICAgICAgICAgICAgICAgICAgICcuICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJ1lvdSBtYXkgaGF2ZSBmb3Jnb3R0ZW4gdG8gcGFzcyBhbiBhcmd1bWVudCB0byB0aGUgdHlwZSBjaGVja2VyICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJ2NyZWF0b3IgKGFycmF5T2YsIGluc3RhbmNlT2YsIG9iamVjdE9mLCBvbmVPZiwgb25lT2ZUeXBlLCBhbmQgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAnc2hhcGUgYWxsIHJlcXVpcmUgYW4gYXJndW1lbnQpLidcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGVycm9yIGluc3RhbmNlb2YgRXJyb3IpIHtcbiAgICAgICAgICAgICAgICB2YXIgc3RhY2sgPSAoZ2V0U3RhY2sgJiYgZ2V0U3RhY2soKSkgfHwgJyc7XG5cbiAgICAgICAgICAgICAgICBlcnJvcnMucHVzaChcbiAgICAgICAgICAgICAgICAgICAgJ0ZhaWxlZCAnICsgbG9jYXRpb24gKyAnIHR5cGU6ICcgKyBlcnJvci5tZXNzYWdlICsgc3RhY2tcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBlcnJvcnMuam9pbignXFxuXFxuJyk7XG59XG4iLCJpbXBvcnQge2Nvbm5lY3R9IGZyb20gJ3JlYWN0LXJlZHV4JztcbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuXG5mdW5jdGlvbiBMb2FkaW5nKHByb3BzKSB7XG4gICAgaWYgKHByb3BzLmlzTG9hZGluZykge1xuICAgICAgICByZXR1cm4gPGRpdiBjbGFzc05hbWU9J19kYXNoLWxvYWRpbmctY2FsbG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C5zdGF0dXMgPT09IDIwMCAmJlxuICAgICAgICAgICAgcGF0aChbJ2NvbnRlbnQnLCAncmVsb2FkSGFzaCddLCByZWxvYWRSZXF1ZXN0KSAhPT1cbiAgICAgICAgICAgICAgICBwYXRoKFsncmVsb2FkUmVxdWVzdCcsICdjb250ZW50JywgJ3JlbG9hZEhhc2gnXSwgcHJldlN0YXRlKVxuICAgICAgICApIHtcbiAgICAgICAgICAgIC8vIENoZWNrIGZvciBDU1MgKCFjb250ZW50LmhhcmQpIG9yIG5ldyBwYWNrYWdlIGFzc2V0c1xuICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgIHJlbG9hZFJlcXVlc3QuY29udGVudC5oYXJkIHx8XG4gICAgICAgICAgICAgICAgIWVxdWFscyhcbiAgICAgICAgICAgICAgICAgICAgcmVsb2FkUmVxdWVzdC5jb250ZW50LnBhY2thZ2VzLmxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgcGF0aE9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgW10sXG4gICAgICAgICAgICAgICAgICAgICAgICBbJ3JlbG9hZFJlcXVlc3QnLCAnY29udGVudCcsICdwYWNrYWdlcyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHJldlN0YXRlXG4gICAgICAgICAgICAgICAgICAgICkubGVuZ3RoXG4gICAgICAgICAgICAgICAgKSB8fFxuICAgICAgICAgICAgICAgICFlcXVhbHMoXG4gICAgICAgICAgICAgICAgICAgIHNvcnQoY29tcGFyYXRvcihsdCksIHJlbG9hZFJlcXVlc3QuY29udGVudC5wYWNrYWdlcyksXG4gICAgICAgICAgICAgICAgICAgIHNvcnQoXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wYXJhdG9yKGx0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhdGhPcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBbJ3JlbG9hZFJlcXVlc3QnLCAnY29udGVudCcsICdwYWNrYWdlcyddLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZXZTdGF0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgLy8gTG9vayBpZiBpdCB3YXMgYSBjc3MgZmlsZS5cbiAgICAgICAgICAgICAgICBsZXQgd2FzX2NzcyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBwcmVmZXItY29uc3RcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBhIG9mIHJlbG9hZFJlcXVlc3QuY29udGVudC5maWxlcykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoYS5pc19jc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHdhc19jc3MgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgbm9kZXNUb0Rpc2FibGUgPSBbXTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2VhcmNoIGZvciB0aGUgb2xkIGZpbGUgYnkgeHBhdGguXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpdCA9IGRvY3VtZW50LmV2YWx1YXRlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGAvL2xpbmtbY29udGFpbnMoQGhyZWYsIFwiJHthLnVybH1cIildYCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLl9oZWFkXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vZGUgPSBpdC5pdGVyYXRlTmV4dCgpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAobm9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVzVG9EaXNhYmxlLnB1c2gobm9kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZSA9IGl0Lml0ZXJhdGVOZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGZvckVhY2goXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbiA9PiBuLnNldEF0dHJpYnV0ZSgnZGlzYWJsZWQnLCAnZGlzYWJsZWQnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2Rlc1RvRGlzYWJsZVxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGEubW9kaWZpZWQgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGluayA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2xpbmsnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rLmhyZWYgPSBgJHthLnVybH0/bT0ke2EubW9kaWZpZWR9YDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rLnR5cGUgPSAndGV4dC9jc3MnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsucmVsID0gJ3N0eWxlc2hlZXQnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2hlYWQuYXBwZW5kQ2hpbGQobGluayk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gRWxzZSB0aGUgZmlsZSB3YXMgZGVsZXRlZC5cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlJ3MgYW5vdGhlciBraW5kIG9mIGZpbGUgaGVyZSBkbyBhIGhhcmQgcmVsb2FkLlxuICAgICAgICAgICAgICAgICAgICAgICAgd2FzX2NzcyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCF3YXNfY3NzKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEFzc2V0cyBmaWxlIGhhdmUgY2hhbmdlZFxuICAgICAgICAgICAgICAgICAgICAvLyBvciBhIGNvbXBvbmVudCBsaWIgaGFzIGJlZW4gYWRkZWQvcmVtb3ZlZCAtXG4gICAgICAgICAgICAgICAgICAgIC8vIE11c3QgZG8gYSBoYXJkIHJlbG9hZFxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cubG9jYXRpb24ucmVsb2FkKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBCYWNrZW5kIGNvZGUgY2hhbmdlZCAtIGNhbiBkbyBhIHNvZnQgcmVsb2FkIGluIHBsYWNlXG4gICAgICAgICAgICAgICAgZGlzcGF0Y2goe3R5cGU6ICdSRUxPQUQnfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICB0aGlzLnN0YXRlLmludGVydmFsSWQgIT09IG51bGwgJiZcbiAgICAgICAgICAgIHJlbG9hZFJlcXVlc3Quc3RhdHVzID09PSA1MDBcbiAgICAgICAgKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5fcmV0cnkgPiB0aGlzLnN0YXRlLm1heF9yZXRyeSkge1xuICAgICAgICAgICAgICAgIHRoaXMuY2xlYXJJbnRlcnZhbCgpO1xuICAgICAgICAgICAgICAgIC8vIEludGVncmF0ZSB3aXRoIGRldiB0b29scyB1aT8hXG4gICAgICAgICAgICAgICAgd2luZG93LmFsZXJ0KFxuICAgICAgICAgICAgICAgICAgICBgSG90IHJlbG9hZGluZyBpcyBkaXNhYmxlZCBhZnRlciBmYWlsaW5nICR7dGhpcy5fcmV0cnl9IHRpbWVzLiBgICtcbiAgICAgICAgICAgICAgICAgICAgICAgICdQbGVhc2U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kb0xpbmsgPSAoXG4gICAgICAgIDxzcGFuXG4gICAgICAgICAgICBrZXk9J3VuZG9MaW5rJ1xuICAgICAgICAgICAgY2xhc3NOYW1lPSdfZGFzaC11bmRvLXJlZG8tbGluaydcbiAgICAgICAgICAgIG9uQ2xpY2s9eygpID0+IGRpc3BhdGNoKHVuZG8pfVxuICAgICAgICA+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nX2Rhc2gtaWNvbi11bmRvJz7ihro8L2Rpdj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdfZGFzaC11bmRvLXJlZG8tbGFiZWwnPnVuZG88L2Rpdj5cbiAgICAgICAgPC9zcGFuPlxuICAgICk7XG5cbiAgICBjb25zdCByZWRvTGluayA9IChcbiAgICAgICAgPHNwYW5cbiAgICAgICAgICAgIGtleT0ncmVkb0xpbmsnXG4gICAgICAgICAgICBjbGFzc05hbWU9J19kYXNoLXVuZG8tcmVkby1saW5rJ1xuICAgICAgICAgICAgb25DbGljaz17KCkgPT4gZGlzcGF0Y2gocmVkbyl9XG4gICAgICAgID5cbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdfZGFzaC1pY29uLXJlZG8nPuKGuzwvZGl2PlxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J19kYXNoLXVuZG8tcmVkby1sYWJlbCc+cmVkbzwvZGl2PlxuICAgICAgICA8L3NwYW4+XG4gICAgKTtcblxuICAgIHJldHVybiAoXG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPSdfZGFzaC11bmRvLXJlZG8nPlxuICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICB7aGlzdG9yeS5wYXN0Lmxlbmd0aCA+IDAgPyB1bmRvTGluayA6IG51bGx9XG4gICAgICAgICAgICAgICAge2hpc3RvcnkuZnV0dXJlLmxlbmd0aCA+IDAgPyByZWRvTGluayA6IG51bGx9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaX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zdCBwYXJlbnRJZCA9IGlkU3RyO1xuICAgICAgICBjb25zdCBjaGlsZElkID0gYCR7cGFyZW50SWR9Llgke3Byb3BlcnR5fWA7XG5cbiAgICAgICAgaWYgKCFjb25zdW1lZC5pbmNsdWRlcyhwYXJlbnRJZCkpIHtcbiAgICAgICAgICAgIGNvbnN1bWVkLnB1c2gocGFyZW50SWQpO1xuICAgICAgICAgICAgZWxlbWVudHMucHVzaCh7XG4gICAgICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgICAgICBpZDogcGFyZW50SWQsXG4gICAgICAgICAgICAgICAgICAgIGxhYmVsOiBpZFN0cixcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogaWRUeXBlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzdHJ1Y3R1cmVbcGFyZW50SWRdID0gW107XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWNvbnN1bWVkLmluY2x1ZGVzKGNoaWxkSWQpKSB7XG4gICAgICAgICAgICBjb25zdW1lZC5wdXNoKGNoaWxkSWQpO1xuICAgICAgICAgICAgZWxlbWVudHMucHVzaCh7XG4gICAgICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgICAgICBpZDogY2hpbGRJZCxcbiAgICAgICAgICAgICAgICAgICAgbGFiZWw6IHByb3BlcnR5LFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnQ6IHBhcmVudElkLFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiAncHJvcGVydHknXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBzdHJ1Y3R1cmVbcGFyZW50SWRdLnB1c2goY2hpbGRJZCk7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gY2hpbGRJZDtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiByZWNvcmRFZGdlKHNvdXJjZSwgdGFyZ2V0LCB0eXBlKSB7XG4gICAgICAgIGVsZW1lbnRzLnB1c2goe1xuICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgIHNvdXJjZTogc291cmNlLFxuICAgICAgICAgICAgICAgIHRhcmdldDogdGFyZ2V0LFxuICAgICAgICAgICAgICAgIHR5cGU6IHR5cGVcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgKGdyYXBocy5jYWxsYmFja3MgfHwgW10pLmZvckVhY2goKGNhbGxiYWNrLCBpKSA9PiB7XG4gICAgICAgIGNvbnN0IGNiID0gYF9fZGFzaF9jYWxsYmFja19fLiR7Y2FsbGJhY2sub3V0cHV0fWA7XG4gICAgICAgIGNvbnN0IGNiUHJvZmlsZSA9IHByb2ZpbGUuY2FsbGJhY2tzW2NhbGxiYWNrLm91dHB1dF0gfHwge307XG4gICAgICAgIGNvbnN0IGNvdW50ID0gY2JQcm9maWxlLmNvdW50IHx8IDA7XG4gICAgICAgIGNvbnN0IHRpbWUgPSBjYlByb2ZpbGUudG90YWwgfHwgMDtcblxuICAgICAgICBlbGVtZW50cy5wdXNoKHtcbiAgICAgICAgICAgIGRhdGE6IHtcbiAgICAgICAgICAgICAgICBpZDogY2IsXG4gICAgICAgICAgICAgICAgbGFiZWw6IGBjYWxsYmFjay4ke2l9YCxcbiAgICAgICAgICAgICAgICB0eXBlOiAnY2FsbGJhY2snLFxuICAgICAgICAgICAgICAgIG1vZGU6IGNhbGxiYWNrLmNsaWVudHNpZGVfZnVuY3Rpb24gPyAnY2xpZW50JyA6ICdzZXJ2ZXInLFxuICAgICAgICAgICAgICAgIGNvdW50OiBjb3VudCxcbiAgICAgICAgICAgICAgICB0aW1lOiBjb3VudCA+IDAgPyBNYXRoLnJvdW5kKHRpbWUgLyBjb3VudCkgOiAwLFxuICAgICAgICAgICAgICAgIGxvYWRpbmdTZXQ6IERhdGUubm93KCksXG4gICAgICAgICAgICAgICAgZXJyb3JTZXQ6IERhdGUubm93KClcbiAgICAgICAgICAgIH1cbiAgICA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ICAgLy8gRklYTUU6IE1vdmUgdG8gYSBuZXcgY29tcG9uZW50P1xuICAgIC8vIEdlbmVyYXRlIHRoZSBlbGVtZW50IGludHJvc3BlY3Rpb24gZGF0YS5cbiAgICBsZXQgZWxlbWVudE5hbWUgPSAnJztcbiAgICBsZXQgZWxlbWVudEluZm8gPSB7fTtcbiAgICBsZXQgaGFzUGF0dGVybnMgPSBmYWxzZTtcblxuICAgIGlmIChzZWxlY3RlZCkge1xuICAgICAgICBjb25zdCBkYXRhID0gc2VsZWN0ZWQuZGF0YSgpO1xuXG4gICAgICAgIHN3aXRjaCAoZGF0YS50eXBlKSB7XG4gICAgICAgICAgICBjYXNlICdjb21wb25lbnQnOiB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmVzdCA9IG9taXQoWydpZCddLCBnZXRDb21wb25lbnQoZGF0YS5pZCk/LnByb3BzKTtcbiAgICAgICAgICAgICAgICBlbGVtZW50SW5mbyA9IHJlc3Q7XG4gICAgICAgICAgICAgICAgZWxlbWVudE5hbWUgPSBkYXRhLmlkO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlICdwcm9wZXJ0eSc6IHtcbiAgICAgICAgICAgICAgICBlbGVtZW50TmFtZSA9IGRhdGEucGFyZW50O1xuICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvW2RhdGEubGFiZWxdID0gZ2V0UHJvcFZhbHVlKGRhdGEpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyBjYWxsYmFja1xuICAgICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvLnR5cGUgPSBkYXRhLm1vZGU7XG5cbiAgICAgICAgICAgICAgICAvLyBSZW1vdmUgdWlkIGFuZCBzZXQgcHJvZmlsZS5cbiAgICAgICAgICAgICAgICBjb25zdCBjYWxsYmFja091dHB1dElkID0gZGF0YS5pZC5zbGljZShjYlByZWZpeExlbik7XG4gICAgICAgICAgICAgICAgZWxlbWVudE5hbWUgPSBjYWxsYmFja091dHB1dElkLnJlcGxhY2UoLyheXFwuXFwufFxcLlxcLiQpL2csICcnKTtcbiAgICAgICAgICAgICAgICBjb25zdCBjYlByb2ZpbGUgPSBwcm9maWxlLmNhbGxiYWNrc1tjYWxsYmFja091dHB1dElkXTtcbiAgICAgICAgICAgICAgICBpZiAoY2JQcm9maWxlKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzLFxuICAgICAgICAgICAgICAgICAgICAgICAgbmV0d29yayxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc291cmNlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvdGFsLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29tcHV0ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0cyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlXG4gICAgICAgICAgICAgICAgICAgIH0gPSBjYlByb2ZpbGU7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYXZnID0gdiA9PiBNYXRoLnJvdW5kKHYgLyAoY291bnQgfHwgMSkpO1xuXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvWydjYWxsIGNvdW50J10gPSBjb3VudDtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEluZm8uc3RhdHVzID0gcmVkdWNlU3RhdHVzKHN0YXR1cyk7XG5cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdGltaW5nID0gKGVsZW1lbnRJbmZvWyd0aW1lIChhdmcgbWlsbGlzZWNvbmRzKSddID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdG90YWw6IGF2Zyh0b3RhbCksXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlOiBhdmcoY29tcHV0ZSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLm1vZGUgPT09ICdzZXJ2ZXInKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aW1pbmcubmV0d29yayA9IGF2ZyhuZXR3b3JrLnRpbWUpO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mb1snZGF0YSB0cmFuc2ZlciAoYXZnIGJ5dGVzKSddID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkOiBhdmcobmV0d29yay5kb3dubG9hZCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXBsb2FkOiBhdmcobmV0d29yay51cGxvYWQpXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHJlc291cmNlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGltaW5nWyd1c2VyOiAnICsga2V5XSA9IGF2ZyhyZXNvdXJjZXNba2V5XSk7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5vdXRwdXRzID0gZmxhdHRlbk91dHB1dHMocmVzdWx0KTtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEluZm8uaW5wdXRzID0gZmxhdHRlbklucHV0cyhpbnB1dHMsIHt9KTtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEluZm8uc3RhdGUgPSBmbGF0dGVuSW5wdXRzKHN0YXRlLCB7fSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEluZm9bJ2NhbGwgY291bnQnXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgY29uc3QgY3lMYXlvdXQgPVxuICAgICAgICBjaG9zZW5UeXBlID09PSBsYXlvdXRUeXBlXG4gICAgICAgICAgICA/IGdyYXBoTGF5b3V0XG4gICAgICAgICAgICA6IG1lcmdlUmlnaHQobGF5b3V0c1tsYXlvdXRUeXBlXSwge3JlYWR5OiBzZXRQcmVzZXRMYXlvdXR9KTtcblxuICAgIHJldHVybiAoXG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWNhbGxiYWNrLWRhZy0tY29udGFpbmVyJz5cbiAgICAgICAgICAgIDxDeXRvc2NhcGVDb21wb25lbnRcbiAgICAgICAgICAgICAgICBzdHlsZT17e3dpZHRoOiAnMTAwJScsIGhlaWdodDogJzEwMCUnfX1cbiAgICAgICAgICAgICAgICBjeT17c2V0Q3l0b3NjYXBlfVxuICAgICAgICAgICAgICAgIGVsZW1lbnRzPXtlbGVtZW50c31cbiAgICAgICAgICAgICAgICBsYXlvdXQ9e2N5TGF5b3V0fVxuICAgICAgICAgICAgICAgIHN0eWxlc2hlZXQ9e3N0eWxlc2hlZXR9XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAge3NlbGVjdGVkID8gKFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWNhbGxiYWNrLWRhZy0taW5mbyc+XG4gICAgICAgICAgICAgICAgICAgIHtoYXNQYXR0ZXJucyA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5mbyBpc24ndCBzdXBwb3J0ZWQgZm9yIHBhdHRlcm4tbWF0Y2hpbmcgSURzIGF0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcyB0aW1lXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgICAgICAgICAgIDxKU09OVHJlZVxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YT17ZWxlbWVudEluZm99XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGVtZT0nc3VtbWVyZnJ1aXQnXG4gICAgICAgICAgICAgICAgICAgICAgICBsYWJlbFJlbmRlcmVyPXtfa2V5cyA9PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9rZXlzLmxlbmd0aCA9PT0gMSA/IGVsZW1lbnROYW1lIDogX2tleXNbMF1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGdldEl0ZW1TdHJpbmc9eyh0eXBlLCBkYXRhLCBpdGVtVHlwZSkgPT4gKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuPntpdGVtVHlwZX08L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkRXhwYW5kTm9kZT17KGtleU5hbWUsIGRhdGEsIGxldmVsKSA9PiBsZXZlbCA8IDF9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgIDxzZWxlY3RcbiAgICAgICAgICAgICAgICBjbGFzc05hbWU9J2Rhc2gtY2FsbGJhY2stZGFnLS1sYXlvdXRTZWxlY3RvcidcbiAgICAgICAgICAgICAgICBvbkNoYW5nZT17ZSA9PiBzZXRMYXlvdXRUeXBlKGUudGFyZ2V0LnZhbHVlKX1cbiAgICAgICAgICAgICAgICB2YWx1ZT17bGF5b3V0VHlwZX1cbiAgICAgICAgICAgICAgICByZWY9e2xheW91dFNlbGVjdG9yfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIHtrZXlzKGxheW91dHMpLm1hcChrID0+IChcbiAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2YWx1ZT17a30ga2V5PXtrfT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtrfVxuICAgICAgICAgICAgICAgICAgICA8L29wdGlvbj5cbiAgICAgICAgICAgICAgICApKX1cbiAgICAgICAgICAgIDwvc2VsZWN0PlxuICAgICAgICA8L2Rpdj5cbiAgICApO1xufVxuXG5DYWxsYmFja0dyYXBoLnByb3BUeXBlcyA9IHt9O1xuXG5jbGFzcyBVbmNvbm5lY3RlZENhbGxiYWNrR3JhcGhDb250YWluZXIgZXh0ZW5kcyBDb21wb25lbnQge1xuICAgIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgICAgIHN1cGVyKHByb3BzKTtcbiAgICAgICAgdGhpcy5zdGF0ZSA9IHtoYXNFcnJvcjogZmFsc2V9O1xuICAgIH1cblxuICAgIHN0YXRpYyBnZXREZXJpdmVkU3RhdGVGcm9tRXJyb3IoXykge1xuICAgICAgICByZXR1cm4ge2hhc0Vycm9yOiB0cnVlfTtcbiAgICB9XG5cbiAgICBjb21wb25lbnREaWRDYXRjaChlcnJvciwgaW5mbykge1xuICAgICAgICBjb25zdCB7ZGlzcGF0Y2h9ID0gdGhpcy5wcm9wcztcbiAgICAgICAgZGlzcGF0Y2goXG4gICAgICAgICAgICBvbkVycm9yKHtcbiAgICAgICAgICAgICAgICBteUlEOiB0aGlzLnN0YXRlLm15SUQsXG4gICAgICAgICAgICAgICAgdHlwZTogJ2Zyb250RW5kJyxcbiAgICAgICAgICAgICAgICBlcnJvcixcbiAgICAgICAgICAgICAgICBpbmZvXG4gICAgICAgICAgICB9KVxuICAgICAgICApO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMuc3RhdGUuaGFzRXJyb3IgPyAoXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1jYWxsYmFjay1kYWctLWNvbnRhaW5lcic+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtY2FsbGJhY2stZGFnLS1tZXNzYWdlJz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj5Pb3BzISBUaGUgY2FsbGJhY2sgZ3JhcGggdGhyZXcgYW4gZXJyb3IuPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXY+Q2hlY2sgdGhlIGVycm9yIGxpc3QgZm9yIGRldGFpbHMuPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDxDYWxsYmFja0dyYXBoIC8+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5VbmNvbm5lY3RlZENhbGxiYWNrR3JhcGhDb250YWluZXIucHJvcFR5cGVzID0ge1xuICAgIGRpc3BhdGNoOiBQcm9wVHlwZXMuZnVuY1xufTtcblxuY29uc3QgQ2FsbGJhY2tHcmFwaENvbnRhaW5lciA9IGNvbm5lY3QobnVsbCwgZGlzcGF0Y2ggPT4gKHtkaXNwYXRjaH0pKShcbiAgICBVbmNvbm5lY3RlZENhbGxiYWNrR3JhcGhDb250YWluZXJcbik7XG5cbmV4cG9ydCB7Q2FsbGJhY2tHcmFwaENvbnRhaW5lcn07XG4iLCJjb25zdCBzdHlsZXNoZWV0ID0gW1xuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICcqJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgICdmb250LXNpemUnOiAxMixcbiAgICAgICAgICAgICdmb250LWZhbWlseSc6ICdcIkFyaWFsXCIsIHNhbnMtc2VyaWYnXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJ2VkZ2UnLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgd2lkdGg6IDIsXG4gICAgICAgICAgICAnbGluZS1jb2xvcic6ICcjODg4ODg4JyxcbiAgICAgICAgICAgICd0YXJnZXQtYXJyb3ctY29sb3InOiAnIzg4ODg4OCcsXG4gICAgICAgICAgICAndGFyZ2V0LWFycm93LXNoYXBlJzogJ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FwiXScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICBjb2xvcjogJyMzMjMzMzAnLFxuICAgICAgICAgICAgJ2JhY2tncm91bmQtY29sb3InOiAnI0YwREI0RidcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnbm9kZVt0eXBlPVwiY2FsbGJhY2tcIl1bbW9kZT1cInNlcnZlclwiXScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICBjb2xvcjogJyMzMjMzMzAnLFxuICAgICAgICAgICAgJ2JhY2tncm91bmQtY29sb3InOiAnIzAwQ0M5NidcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnbm9kZVt0eXBlPVwiY29tcG9uZW50XCJdLCBub2RlW3R5cGU9XCJ3aWxkY2FyZFwiXScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICB3aWR0aDogJ2xhYmVsJyxcbiAgICAgICAgICAgIC8vIGhlaWdodDogJ2xhYmVsJyxcbiAgICAgICAgICAgIHNoYXBlOiAncmVjdGFuZ2xlJyxcbiAgICAgICAgICAgIGNvbnRlbnQ6IGUgPT4gZS5kYXRhKCkubGFiZWwucmVwbGFjZSgvXCIvZywgJycpLFxuICAgICAgICAgICAgJ3RleHQtdmFsaWduJzogJ3RvcCcsXG4gICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcic6ICcjQjlDMkNFJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdub2RlW3R5cGU9XCJwcm9wZXJ0eVwiXScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICB3aWR0aDogJ2xhYmVsJyxcbiAgICAgICAgICAgIGhlaWdodDogMjAsXG4gICAgICAgICAgICBzaGFwZTogJ3JlY3RhbmdsZScsXG4gICAgICAgICAgICBjb250ZW50OiAnZGF0YShsYWJlbCknLFxuICAgICAgICAgICAgY29sb3I6ICd3aGl0ZScsXG4gICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcic6ICcjMTA5REZGJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICcuc2VsZWN0ZWQtbm9kZScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICBnaG9zdDogJ3llcycsXG4gICAgICAgICAgICAnZ2hvc3Qtb2Zmc2V0LXgnOiAyLFxuICAgICAgICAgICAgJ2dob3N0LW9mZnNldC15JzogMixcbiAgICAgICAgICAgICdnaG9zdC1vcGFjaXR5JzogMC4yNSxcbiAgICAgICAgICAgICdib3JkZXItb3BhY2l0eSc6IDFcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnLnByb3AtY2hhbmdlZCwgLmNhbGxiYWNrLWxvYWRpbmcnLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgJ2JvcmRlci1jb2xvcic6ICcjQ0M0M0I3JyxcbiAgICAgICAgICAgICdib3JkZXItd2lkdGgnOiAyLFxuICAgICAgICAgICAgJ2JvcmRlci1vcGFjaXR5JzogMVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICcuY2FsbGJhY2stZXJyb3InLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgJ2JhY2tncm91bmQtY29sb3InOiAnI0UxMzMyRSdcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnLnRyaWdnZXJlZCcsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICAnbGluZS1jb2xvcic6ICcjQ0M0M0I3JyxcbiAgICAgICAgICAgICd0YXJnZXQtYXJyb3ctY29sb3InOiAnI0NDNDNCNydcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOi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3J0IHtDb21wb25lbnR9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQge29uRXJyb3IsIHJldmVydH0gZnJvbSAnLi4vLi4vYWN0aW9ucyc7XG5cbmNsYXNzIENvbXBvbmVudEVycm9yQm91bmRhcnkgZXh0ZW5kcyBDb21wb25lbnQge1xuICAgIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgICAgIHN1cGVyKHByb3BzKTtcbiAgICAgICAgdGhpcy5zdGF0ZSA9IHtcbiAgICAgICAgICAgIG15SUQ6IHByb3BzLmNvbXBvbmVudElkLFxuICAgICAgICAgICAgb2xkQ2hpbGRyZW46IG51bGwsXG4gICAgICAgICAgICBoYXNFcnJvcjogZmFsc2VcbiAgICAgICAgfTtcbiAgICB9XG5cbiAgICBzdGF0aWMgZ2V0RGVyaXZlZFN0YXRlRnJvbUVycm9yKF8pIHtcbiAgICAgICAgcmV0dXJuIHtoYXNFcnJvcjogdHJ1ZX07XG4gICAgfVxuXG4gICAgY29tcG9uZW50RGlkQ2F0Y2goZXJyb3IsIGluZm8pIHtcbiAgICAgICAgY29uc3Qge2Rpc3BhdGNofSA9IHRoaXMucHJvcHM7XG4gICAgICAgIGRpc3BhdGNoKFxuICAgICAgICAgICAgb25FcnJvcih7XG4gICAgICAgICAgICAgICAgbXlJRDogdGhpcy5zdGF0ZS5teUlELFxuICAgICAgICAgICAgICAgIHR5cGU6ICdmcm9udEVuZCcsXG4gICAgICAgICAgICAgICAgZXJyb3IsXG4gICAgICAgICAgICAgICAgaW5mb1xuICAgICAgICAgICAgfSlcbiAgICAgICAgKTtcbiAgICAgICAgZGlzcGF0Y2gocmV2ZXJ0KTtcbiAgICB9XG5cbiAgICBjb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUpIHtcbiAgICAgICAgY29uc3QgcHJldkNoaWxkcmVuID0gcHJldlByb3BzLmNoaWxkcmVuO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eygpID0+IHRoaXMuc2V0U3RhdGUoe2NvbGxhcHNlZDogIWNvbGxhcHNlZH0pfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvci10b3BfX2dyb3VwJz5cbiAgICAgICAgICAgICAgICAgICAg4puR77iPXG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9fdGl0bGUnPlxuICAgICAgICAgICAgICAgICAgICAgICAge2UuZXJyb3IubWVzc2FnZSB8fCAnRXJyb3InfVxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvci10b3BfX2dyb3VwJz5cbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX190aW1lc3RhbXAgcGVyY3ktaGlkZSc+XG4gICAgICAgICAgICAgICAgICAgICAgICB7YCR7ZS50aW1lc3RhbXAudG9Mb2NhbGVUaW1lU3RyaW5nKCl9YH1cbiAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9J2Rhc2gtZmUtZXJyb3JfX3RpbWVzdGFtcCBwZXJjeS1zaG93Jz5cbiAgICAgICAgICAgICAgICAgICAgICAgIHsvKiBTcGVjaWFsIHBlcmN5IHRpbWVzdGFtcCBmb3IgdmlzdWFsIHRlc3RpbmcuXG4gICAgICAgICAgICAgICAgICAgICAgICAgKiBIaWRkZW4gZHVyaW5nIHJlZ3VsYXIgdXNhZ2UuXG4gICAgICAgICAgICAgICAgICAgICAgICAgKi99XG4gICAgICAgICAgICAgICAgICAgICAgICAwMDowMDowMCBQTVxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG5cbiAgICAgICAgICAgICAgICAgICAgPENvbGxhcHNlSWNvblxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPXtgZGFzaC1mZS1lcnJvcl9fY29sbGFwc2UgJHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xsYXBzZWQgPyAnZGFzaC1mZS1lcnJvcl9fY29sbGFwc2UtLWZsaXBwZWQnIDogJydcbiAgICAgICAgICAgICAgICAgICAgICAgIH1gfVxuICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gdGhpcy5zZXRTdGF0ZSh7Y29sbGFwc2VkOiAhY29sbGFwc2VkfSl9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgICAgIC8qIGVzbGludC1lbmFibGUgbm8taW5saW5lLWNvbW1lbnRzICovXG5cbiAgICAgICAgcmV0dXJuIGNvbGxhcHNlZCA/IChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWVycm9yLWNhcmRfX2xpc3QtaXRlbSc+e2Vycm9ySGVhZGVyfTwvZGl2PlxuICAgICAgICApIDogKFxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9e2NhcmRDbGFzc2VzfT5cbiAgICAgICAgICAgICAgICB7ZXJyb3JIZWFkZXJ9XG4gICAgICAgICAgICAgICAgPEVycm9yQ29udGVudCBlcnJvcj17ZS5lcnJvcn0gLz5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuY29uc3QgTUFYX01FU1NBR0VfTEVOR1RIID0gNDA7XG4vKiBlc2xpbnQtZGlzYWJsZSBuby1pbmxpbmUtY29tbWVudHMgKi9cbmZ1bmN0aW9uIFVuY29ubmVjdGVkRXJyb3JDb250ZW50KHtlcnJvciwgYmFzZX0pIHtcbiAgICByZXR1cm4gKFxuICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZXJyb3ItY29udGFpbmVyJz5cbiAgICAgICAgICAgIHsvKlxuICAgICAgICAgICAgICogNDAgaXMgYSByb3VnaCBoZXVyaXN0aWMgLSBpZiBsb25nZXIgdGhhbiA0MCB0aGVuIHRoZVxuICAgICAgICAgICAgICogbWVzc2FnZSBtaWdodCBvdmVyZmxvdyBpbnRvIGVsbGlwc2VzIGluIHRoZSB0aXRsZSBhYm92ZSAmXG4gICAgICAgICAgICAgKiB3aWxsIG5lZWQgdG8gYmUgZGlzcGxheWVkIGluIGZ1bGwgaW4gdGhpcyBlcnJvciBib2R5XG4gICAgICAgICAgICAgKi99XG4gICAgICAgICAgICB7dHlwZW9mIGVycm9yLm1lc3NhZ2UgIT09ICdzdHJpbmcnIHx8XG4gICAgICAgICAgICBlcnJvci5tZXNzYWdlLmxlbmd0aCA8IE1BWF9NRVNTQUdFX0xFTkdUSCA/IG51bGwgOiAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZmUtZXJyb3JfX3N0Jz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZmUtZXJyb3JfX2luZm8gZGFzaC1mZS1lcnJvcl9fY3VydmVkJz5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtlcnJvci5tZXNzYWdlfVxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICl9XG5cbiAgICAgICAgICAgIHt0eXBlb2YgZXJyb3Iuc3RhY2sgIT09ICdzdHJpbmcnID8gbnVsbCA6IChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9fc3QnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9faW5mbyc+XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGV0YWlscz5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3VtbWFyeT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGk+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoVGhpcyBlcnJvciBvcmlnaW5hdGVkIGZyb20gdGhlIGJ1aWx0LWluXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKYXZhU2NyaXB0IGNvZGUgdGhhdCBydW5zIERhc2ggYXBwcy4gQ2xpY2tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHNlZSB0aGUgZnVsbCBzdGFjayB0cmFjZSBvciBvcGVuIHlvdXJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyb3dzZXIncyBjb25zb2xlLilcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9pPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3VtbWFyeT5cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtlcnJvci5zdGFjay5zcGxpdCgnXFxuJykubWFwKChsaW5lLCBpKSA9PiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwIGtleT17aX0+e2xpbmV9PC9wPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkpfVxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kZXRhaWxzPlxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgICB7LyogQmFja2VuZCBFcnJvciAqL31cbiAgICAgICAgICAgIHt0eXBlb2YgZXJyb3IuaHRtbCAhPT0gJ3N0cmluZycgPyBudWxsIDogZXJyb3IuaHRtbFxuICAgICAgICAgICAgICAgICAgLnN1YnN0cmluZygwLCAnPCFkb2N0eXBlJy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgICAudG9Mb3dlckNhc2UoKSA9PT0gJzwhZG9jdHlwZScgPyAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtYmUtZXJyb3JfX3N0Jz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtYmFja2VuZC1lcnJvcic+XG4gICAgICAgICAgICAgICAgICAgICAgICB7LyogRW1iZWQgd2Vya3pldWcgZGVidWdnZXIgaW4gYW4gaWZyYW1lIHRvIHByZXZlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgIENTUyBsZWFraW5nIC0gd2Vya3pldWcgSFRNTCBpbmNsdWRlcyBhIGJ1bmNoXG4gICAgICAgICAgICAgICAgICAgICAgICBvZiBDU1Mgb24gYmFzZSBodG1sIGVsZW1lbnRzIGxpa2UgYDxib2R5Lz5gXG4gICAgICAgICAgICAgICAgICAgICAgKi99XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxpZnJhbWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcmNEb2M9e2Vycm9yLmh0bWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPC9oZWFkPicsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgPHN0eWxlIHR5cGU9XCJ0ZXh0L2Nzc1wiPiR7d2Vya3pldWdDc3N9PC9zdHlsZT48L2hlYWQ+YFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJz1cIj9fX2RlYnVnZ2VyX18nLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYD1cIiR7YmFzZX0/X19kZWJ1Z2dlcl9fYFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlPXt7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIDY3cHggb2YgcGFkZGluZyBhbmQgbWFyZ2luIGJldHdlZW4gdGhpc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBpZnJhbWUgYW5kIHRoZSBwYXJlbnQgY29udGFpbmVyLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiA2NyB3YXMgZGV0ZXJtaW5lZCBtYW51YWxseSBpbiB0aGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogYnJvd3NlcidzIGRldiB0b29scy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAnY2FsYyg2MDBweCAtIDY3cHgpJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAnNzV2aCcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogJ25vbmUnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1iZS1lcnJvcl9fc3RyJz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtYmFja2VuZC1lcnJvcic+e2Vycm9yLmh0bWx9PC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApfVxuICAgICAgICA8L2Rpdj5cbiAgICApO1xufVxuLyogZXNsaW50LWVuYWJsZSBuby1pbmxpbmUtY29tbWVudHMgKi9cblxuY29uc3QgZXJyb3JQc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FyZENsYXNzZXN9PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWVycm9yLWNhcmRfX3RvcGJhcic+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWVycm9yLWNhcmRfX21lc3NhZ2UnPlxuICAgICAgICAgICAgICAgICAgICAgICAg8J+bkSBFcnJvcnMgKFxuICAgICAgICAgICAgICAgICAgICAgICAgPHN0cm9uZyBjbGFzc05hbWU9J3Rlc3QtZGV2dG9vbHMtZXJyb3ItY291bnQnPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtlcnJvcnNMZW5ndGh9XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3N0cm9uZz5cbiAgICAgICAgICAgICAgICAgICAgICAgICl7Y29ubmVjdGVkID8gbnVsbCA6ICdcXHUwMGEwIPCfmqsgU2VydmVyIFVuYXZhaWxhYmxlJ31cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9faWNvbi14J1xuICAgICAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gY2xpY2tIYW5kbGVyKCl9XG4gICAgICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgICAgIMOXXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWVycm9yLWNhcmRfX2xpc3QnPntlcnJvckVsZW1lbnRzfTwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5Gcm9udEVuZEVycm9yQ29udGFpbmVyLnByb3BUeXBlcyA9IHtcbiAgICBpZDogUHJvcFR5cGVzLnN0cmluZyxcbiAgICBlcnJ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lZCwgY2xpY2tIYW5kbGVyfSA9IHRoaXMucHJvcHM7XG5cbiAgICAgICAgbGV0IGZyb250RW5kRXJyb3JzO1xuICAgICAgICBpZiAoZXJyb3JzT3BlbmVkKSB7XG4gICAgICAgICAgICBjb25zdCBlcnJvcnMgPSBjb25jYXQoZXJyb3IuZnJvbnRFbmQsIGVycm9yLmJhY2tFbmQpO1xuXG4gICAgICAgICAgICBmcm9udEVuZEVycm9ycyA9IChcbiAgICAgICAgICAgICAgICA8RnJvbnRFbmRFcnJvckNvbnRhaW5lclxuICAgICAgICAgICAgICAgICAgICBlcnJvcnM9e2Vycm9yc31cbiAgICAgICAgICAgICAgICAgICAgY29ubmVjdGVkPXtlcnJvci5iYWNrRW5kQ29ubmVjdGVkfVxuICAgICAgICAgICAgICAgICAgICBlcnJvcnNPcGVuZWQ9e2Vycm9yc09wZW5lZH1cbiAgICAgICAgICAgICAgICAgICAgY2xpY2tIYW5kbGVyPXtjbGlja0hhbmRsZXJ9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgICAgPGRpdj57dGhpcy5wcm9wcy5jaGlsZHJlbn08L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1lcnJvci1tZW51Jz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9e3Zpc2libGUgPyAnZGFzaC1mZS1lcnJvcnMnIDogJyd9PlxuICAgICAgICAgICAgICAgICAgICAgICAge2Zyb250RW5kRXJyb3JzfVxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuICAgIH1cbn1cblxuR2xvYmFsRXJyb3JPdmVybGF5LnByb3BUeXBlcyA9IHtcbiAgICBjaGlsZH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gJHtiYXNlfS0tJHt2YXJpYW50Mn1gIDogJycpO1xuXG5jb25zdCBidXR0b25GYWN0b3J5ID0gKFxuICAgIGVuYWJsZWQsXG4gICAgYnV0dG9uVmFyaWFudCxcbiAgICB0b2dnbGUsXG4gICAgX0ljb24sXG4gICAgaWNvblZhcmlhbnQsXG4gICAgbGFiZWxcbikgPT4gKFxuICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLW1lbnVfX2J1dHRvbi1jb250YWluZXInPlxuICAgICAgICA8ZGl2XG4gICAgICAgICAgICBjbGFzc05hbWU9e2NsYXNzZXMoXG4gICAgICAgICAgICAgICAgJ2Rhc2gtZGVidWctbWVudV9fYnV0dG9uJyxcbiAgICAgICAgICAgICAgICBidXR0b25WYXJpYW50LFxuICAgICAgICAgICAgICAgIGVuYWJsZWQgJiYgJ2VuYWJsZWQnXG4gICAgICAgICAgICApfVxuICAgICAgICAgICAgb25DbGljaz17dG9nZ2xlfVxuICAgICAgICA+XG4gICAgICAgICAgICA8X0ljb24gY2xhc3NOYW1lPXtjbGFzc2VzKCdkYXNoLWRlYnVnLW1lbnVfX2ljb24nLCBpY29uVmFyaWFudCl9IC8+XG4gICAgICAgICAgICB7bGFiZWwgPyAoXG4gICAgICAgICAgICAgICAgPGxhYmVsIGNsYXNzTmFtZT0nZGFzaC1kZWJ1Zy1tZW51X19idXR0b24tbGFiZWwnPntsYWJlbH08L2xhYmVsPlxuICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuKTtcblxuY2xhc3MgRGVidWdNZW51IGV4dGVuZHMgQ29tcG9uZW50IHtcbiAgICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgICAgICBzdXBlcihwcm9wcyk7XG5cbiAgICAgICAgdGhpcy5zdGF0ZSA9IHtcbiAgICAgICAgICAgIG9wZW5lZDogZmFsc2UsXG4gICAgICAgICAgICBjYWxsYmFja0dyYXBoT3BlbmVkOiBmYWx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2FsbGJhY2tHcmFwaE9wZW5lZCA/IDxDYWxsYmFja0dyYXBoQ29udGFpbmVyIC8+IDogbnVsbH1cbiAgICAgICAgICAgICAgICB7YnV0dG9uRmFjdG9yeShcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2tHcmFwaE9wZW5lZCxcbiAgICAgICAgICAgICAgICAgICAgJ2NhbGxiYWNrcycsXG4gICAgICAgICAgICAgICAgICAgICgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0U3RhdGUoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrR3JhcGhPcGVuZWQ6ICFjYWxsYmFja0dyYXBoT3BlbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgR3JhcGhJY29uLFxuICAgICAgICAgICAgICAgICAgICAnZ3JhcGgnLFxuICAgICAgICAgICAgICAgICAgICAnQ2FsbGJhY2tzJ1xuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAge2J1dHRvbkZhY3RvcnkoXG4gICAgICAgICAgICAgICAgICAgIGVycm9yc09wZW5lZCxcbiAgICAgICAgICAgICAgICAgICAgJ2Vycm9ycycsXG4gICAgICAgICAgICAgICAgICAgIHRvZ2dsZUVycm9ycyxcbiAgICAgICAgICAgICAgICAgICAgQmVsbEljb24sXG4gICAgICAgICAgICAgICAgICAgICdiZWxsJyxcbiAgICAgICAgICAgICAgICAgICAgZXJyQ291bnQgKyAnIEVycm9yJyArIChlcnJDb3VudCA9PT0gMSA/ICcnIDogJ3MnKVxuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAge2J1dHRvbkZhY3RvcnkoXG4gICAgICAgICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBzdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgIF9TdGF0dXNJY29uLFxuICAgICAgICAgICAgICAgICAgICAnaW5kaWNhdG9yJyxcbiAgICAgICAgICAgICAgICAgICAgJ1NlcnZlcidcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1kZWJ1Zy1tZW51X19jb250ZW50JyAvPlxuICAgICAgICApO1xuXG4gICAgICAgIGNvbnN0IGFsZXJ0c0xhYmVsID1cbiAgICAgICAgICAgIChlcnJDb3VudCB8fCAhY29ubmVjdGVkKSAmJiAhb3BlbmVkID8gKFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLWFsZXJ0LWxhYmVsJz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZGVidWctYWxlcnQnIG9uQ2xpY2s9e3RvZ2dsZUVycm9yc30+XG4gICAgICAgICAgICAgICAgICAgICAgICB7ZXJyQ291bnQgPyAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZGVidWctZXJyb3ItY291bnQnPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7J/Cfm5EgJyArIGVyckNvdW50fVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgKSA6IG51bGx9XG4gICAgICAgICAgICAgICAgICAgICAgICB7Y29ubmVjdGVkID8gbnVsbCA6IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1kZWJ1Zy1kaXNjb25uZWN0ZWQnPvCfmqs8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgKSA6IG51bGw7XG5cbiAgICAgICAgY29uc3Qgb3BlblZhcmlhbnQgPSBvcGVuZWQgPyAnb3BlbicgOiAnY2xvc2VkJztcblxuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICB7YWxlcnRzTGFiZWx9XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9e2NsYXNzZXMoJ2Rhc2gtZGVidWctbWVudV9fb3V0ZXInLCBvcGVuVmFyaWFudCl9PlxuICAgICAgICAgICAgICAgICAgICB7bWVudUNvbnRlbnR9XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2NsYXNzZXMoJ2Rhc2gtZGVidWctbWVudScsIG9wZW5WYXJpYW50KX1cbiAgICAgICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZSh7b3BlbmVkOiAhb3BlbmVkfSk7XG4gICAgICAgICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgICA8RGVidWdJY29uXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2NsYXNzZXMoJ2Rhc2gtZGVidWctbWVudV9faWNvbicsICdkZWJ1ZycpfVxuICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxHbG9iYWxFcnJvck92ZXJsYXlcbiAgICAgICAgICAgICAgICAgICAgZXJyb3I9e2Vycm9yfVxuICAgICAgICAgICAgICAgICAgICB2aXNpYmxlPXtlcnJDb3VudCA+IDB9XG4gICAgICAgICAgICAgICAgICAgIGVycm9yc09wZW5lZD17ZXJyb3JzT3BlbmVkfVxuICAgICAgICAgICAgICAgICAgICBjbGlja0hhbmRsZXI9e3RvZ2dsZUVycm9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GVycm9yIG1lc3NhZ2VzIGluY2x1ZGUgdGhlIHR5cGVcbiAgICAgICAgICogSW4gcGFydGljdWxhciwgb25lT2ZUeXBlLlxuICAgICAgICAgKiBodHRwczovL2dpdGh1Yi5jb20vZmFjZWJvb2svcHJvcC10eXBlcy9ibG9iL3YxNS43LjIvZmFjdG9yeVdpdGhUeXBlQ2hlY2tlcnMuanMjTDM4OFxuICAgICAgICAgKi9cbiAgICAgICAgaWYgKGluY2x1ZGVzKCcgb2YgdHlwZSBgJywgbWVzc2FnZSkpIHtcbiAgICAgICAgICAgIGNvbnN0IGludmFsaWRQcm9wVHlwZVByb3ZpZGVkID0gbWVzc2FnZVxuICAgICAgICAgICAgICAgIC5zcGxpdCgnIG9mIHR5cGUgYCcpWzFdXG4gICAgICAgICAgICAgICAgLnNwbGl0KCdgJylbMF07XG4gICAgICAgICAgICBlcnJvck1lc3NhZ2UgKz0gYFxcbldhcyBzdXBwbGllZCB0eXBlIFxcYCR7aW52YWxpZFByb3BUeXBlUHJvdmlkZWR9XFxgLmA7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaGFzKGludmFsaWRQcm9wUGF0aCwgcHJvcHMpKSB7XG4gICAgICAgICAgICAvKlxuICAgICAgICAgICAgICogaW52YWxpZFByb3BQYXRoIG1heSBiZSBuZXN0ZWQgbGlrZSBgb3B0aW9uc1swXS52YWx1ZWAuXG4gICAgICAgICAgICAgKiBGb3Igbm93LCB3ZSB3b24ndCB0cnkgdG8gdW5wYWNrIHRoZXNlIG5lc3RlZCBvcHRpb25zXG4gICAgICAgICAgICAgKiBidXQgd2UgY291bGQgaW4gdGhlIGZ1dHVyZS5cbiAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgY29uc3QganNvblN1cHBsaWVkVmFsdWUgPSBKU09OLnN0cmluZ2lmeShcbiAgICAgICAgICAgICAgICBwcm9wc1tpbnZhbGlkUHJvcFBhdGhdLFxuICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGlmIChqc29uU3VwcGxpZWRWYWx1ZSkge1xuICAgICAgICAgICAgICAgIGlmIChpbmNsdWRlcygnXFxuJywganNvblN1cHBsaWVkVmFsdWUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSArPSBgXFxuVmFsdWUgcHJvdmlkZWQ6IFxcbiR7anNvblN1cHBsaWVkVmFsdWV9YDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlcnJvck1lc3NhZ2UgKz0gYFxcblZhbHVlIHByb3ZpZGVkOiAke2pzb25TdXBwbGllZFZhbHVlfWA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgLypcbiAgICAgICAgICogTm90IGF3YXJlIG9mIG90aGVyIHByb3AgdHlwZSB3YXJuaW5nIG1lc3NhZ2VzLlxuICAgICAgICAgKiBCdXQsIGlmIHRoZXkgZXhpc3QsIHRoZW4gYXQgbGVhc3QgdGhyb3cgdGhlIGRlZmF1bHRcbiAgICAgICAgICogcmVhY3QgcHJvcCB0eXBlcyBlcnJvclxuICAgICAgICAgKi9cbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKG1lc3NhZ2UpO1xuICAgIH1cblxuICAgIHRocm93IG5ldyBFcnJvcihlcnJvck1lc3NhZ2UpO1xufVxuIiwiaW1wb3J0IHtpbmNsdWRlcywgdHlwZX0gZnJvbSAncmFtZGEnO1xuXG5jb25zdCBTSU1QTEVfQ09NUE9ORU5UX1RZUEVTID0gWydTdHJpbmcnLCAnTnVtYmVyJywgJ051bGwnLCAnQm9vbGVhbiddO1xuXG5leHBvcnQgZGVmYXVsdCBjb21wb25lbnQgPT4gaW5jbHVkZXModHlwZShjb21wb25lbnQpLCBTSU1QTEVfQ09NUE9ORU5UX1RZUEVTKTtcbiIsIi8qKlxuICogR2VuZXJhb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JzaXN0ZW5jZSxcbiAgICAgICAgcGVyc2lzdGVkX3Byb3BzLFxuICAgICAgICBwZXJzaXN0ZW5jZV90eXBlXG4gICAgfSA9IGdldFByb3BzKGNvbXBvbmVudCk7XG5cbiAgICBsZXQgbGF5b3V0T3V0ID0gbGF5b3V0O1xuICAgIGlmIChjYW5QZXJzaXN0ICYmIHBlcnNpc3RlbmNlKSB7XG4gICAgICAgIGNvbnN0IHN0b3JhZ2UgPSBnZXRTdG9yZShwZXJzaXN0ZW5jZV90eXBlLCBkaXNwYXRjaCk7XG4gICAgICAgIGNvbnN0IHVwZGF0ZSA9IHt9O1xuICAgICAgICBmb3JFYWNoKFxuICAgICAgICAgICAgcGVyc2lzdGVkUHJvcCA9PlxuICAgICAgICAgICAgICAgIG1vZFByb3AoXG4gICAgICAgICAgICAgICAgICAgIGdldFZhbHNLZXkoaWQsIHBlcnNpc3RlZFByb3AsIHBlcnNpc3RlbmNlKSxcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZSxcbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudCxcbiAgICAgICAgICAgICAgICAgICAgcHJvcHMsXG4gICAgICAgICAgICAgICAgICAgIHBlcnNpc3RlZFByb3AsXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZVxuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICBwZXJzaXN0ZWRfcHJvcHNcbiAgICAgICAgKTtcblxuICAgICAgICBmb3IgKGNvbnN0IHByb3BOYW1lIGluIHVwZGF0ZSkge1xuICAgICAgICAgICAgbGF5b3V0T3V0ID0gc2V0KFxuICAgICAgICAgICAgICAgIGxlbnNQYXRoKHBhdGguY29uY2F0KCdwcm9wcycsIHByb3BOYW1lKSksXG4gICAgICAgICAgICAgICAgdXBkYXRlW3Byb3BOYW1lXSxcbiAgICAgICAgICAgICAgICBsYXlvdXRPdXRcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvLyByZWN1cnNlIGlud2FyZFxuICAgIGNvbnN0IHtjaGlsZHJlbn0gPSBwcm9wcztcbiAgICBpZiAoQXJyYXkuaXNBcnJheShjaGlsZHJlbikpIHtcbiAgICAgICAgY2hpbGRyZW4uZm9yRWFjaCgoY2hpbGQsIGkpID0+IHtcbiAgICAgICAgICAgIGlmICh0eXBlKGNoaWxkKSA9PT0gJ09iamVjdCcgJiYgY2hpbGQucHJvcHMpIHtcbiAgICAgICAgICAgICAgICBsYXlvdXRPdXQgPSBwZXJzaXN0ZW5jZU1vZHMoXG4gICAgICAgICAgICAgICAgICAgIGxheW91dE91dCxcbiAgICAgICAgICAgICAgICAgICAgY2hpbGQsXG4gICAgICAgICAgICAgICAgICAgIHBhdGguY29uY2F0KCdwcm9wcycsICdjaGlsZHJlbicsIGkpLFxuICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSBpZiAodHlwZShjaGlsZHJlbikgPT09ICdPYmplY3QnICYmIGNoaWxkcmVuLnByb3BzKSB7XG4gICAgICAgIGxheW91dE91dCA9IHBlcnNpc3RlbmNlTW9kcyhcbiAgICAgICAgICAgIGxheW91dE91dCxcbiAgICAgICAgICAgIGNoaWxkcmVuLFxuICAgICAgICAgICAgcGF0aC5jb25jYXQoJ3Byb3BzJywgJ2NoaWxkcmVuJyksXG4gICAgICAgICAgICBkaXNwYXRjaFxuICAgICAgICApO1xuICAgIH1cbiAgICByZXR1cm4gbGF5b3V0T3V0O1xufVxuXG4vKlxuICogV2hlbiB3ZSByZWNlaXZlIG5ldyBleHBsaWNpdCBwcm9wcyBmcm9tIGEgY2FsbGJhY2ssXG4gKiB0aGVzZSBvdmVycmlkZSBVSS1kcml2ZW4gZWRpdHMgb2YgdGhvc2UgZXhhY3QgcHJvcHNcbiAqIGJ1dCBub3QgZm9yIHByb3BzIG5lc3RlZCBpbnNpZGUgY2hpbGRyZW5cbiAqL1xuZXhw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XG4gICAgaWYgKGZpbmFsUGVyc2lzdGVuY2UpIHtcbiAgICAgICAgY29uc3QgZmluYWxTdG9yYWdlID0gZ2V0U3RvcmUoZmluYWxQZXJzaXN0ZW5jZVR5cGUsIGRpc3BhdGNoKTtcblxuICAgICAgICBpZiAocGVyc2lzdGVuY2VDaGFuZ2VkKSB7XG4gICAgICAgICAgICAvLyBhcHBseSBuZXcgcGVyc2lzdGVuY2VcbiAgICAgICAgICAgIGZvckVhY2goXG4gICAgICAgICAgICAgICAgcGVyc2lzdGVkUHJvcCA9PlxuICAgICAgICAgICAgICAgICAgICBtb2RQcm9wKFxuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0VmFsc0tleShpZCwgcGVyc2lzdGVkUHJvcCwgZmluYWxQZXJzaXN0ZW5jZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBmaW5hbFN0b3JhZ2UsXG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVwZXJzaXN0ZWRQcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBlcnNpc3RlZFByb3AsXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVcbiAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICBmaWx0ZXIobm90SW5OZXdQcm9wcywgZmluYWxQZXJzaXN0ZWRQcm9wcylcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBub3cgdGhlIG1haW4gcG9pbnQgLSBjbGVhciBhbnkgZWRpdCBvZiBhIHByb3AgdGhhdCBjaGFuZ2VkXG4gICAgICAgIC8vIG5vdGUgdGhhdCB0aGlzIGlzIGluZGVwZW5kZW50IG9mIHRoZSBuZXcgcHJvcCB2YWx1ZS5cbiAgICAgICAgY29uc3QgdHJhbnNmb3JtcyA9IGVsZW1lbnQucGVyc2lzdGVuY2VUcmFuc2Zvcm1zIHx8IHt9O1xuICAgICAgICBmb3IgKGNvbnN0IHByb3BOYW1lIGluIG5ld1Byb3BzKSB7XG4gICAgICAgICAgICBjb25zdCBwcm9wVHJhbnNmb3JtcyA9IHRyYW5zZm9ybXNbcHJvcE5hbWVdO1xuICAgICAgICAgICAgaWYgKHByb3BUcmFuc2Zvcm1zKSB7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wUGFydCBpbiBwcm9wVHJhbnNmb3Jtcykge1xuICAgICAgICAgICAgICAgICAgICBmaW5hbFN0b3JhZ2UucmVtb3ZlSXRlbShcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldFZhbHNLZXkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYCR7cHJvcE5hbWV9LiR7cHJvcFBhcnR9YCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaW5hbFBlcnNpc3RlbmNlXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBmaW5hbFN0b3JhZ2UucmVtb3ZlSXRlbShcbiAgICAgICAgICAgICAgICAgICAgZ2V0VmFsc0tleShpZCwgcHJvcE5hbWUsIGZpbmFsUGVyc2lzdGVuY2UpXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gcGVyc2lzdGVuY2VDaGFuZ2VkID8gbWVyZ2VSaWdodChuZXdQcm9wcywgdXBkYXRlKSA6IG5ld1Byb3BzO1xufVxuIiwiaW1wb3J0IHthc3NvYywgYXNzb2NQYXRoLCBtZXJnZVJpZ2h0fSBmcm9tICdyYW1kYSc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIGNyZWF0ZUFwaVJlZHVjZXIoc3RvcmUpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24gQ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2h0fSBmcm9tICdyYW1kYSc7XG5cbmNvbnN0IGluaXRpYWxFcnJvciA9IHtcbiAgICBmcm9udEVuZDogW10sXG4gICAgYmFja0VuZDogW10sXG4gICAgYmFja0VuZENvbm5lY3RlZDogdHJ1ZVxufTtcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gZXJyb3Ioc3RhdGUgPSBpbml0aWFsRXJyb3IsIGFjdGlvbikge1xuICAgIHN3aXRjaCAoYWN0aW9uLnR5cGUpIHtcbiAgICAgICAgY2FzZSAnT05fRVJST1InOiB7XG4gICAgICAgICAgICBjb25zdCB7ZnJvbnRFbmQsIGJhY2tFbmQsIGJhY2tFbmRDb25uZWN0ZWR9ID0gc3RhdGU7XG4gICAgICAgICAgICAvLyBsb2cgZXJyb3JzIHRvIHRoZSBjb25zb2xlIGZvciBzdGFjayB0cmFjaW5nIGFuZCBzbyB0aGV5J3JlXG4gICAgICAgICAgICAvLyBhdmFpbGFibGUgZXZlbiB3aXRoIGRlYnVnZ2luZyBvZmZcbiAgICAgICAgICAgIC8qIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1jb25zb2xlICovXG4gICAgICAgICAgICBjb25zb2xlLmVycm9yKGFjdGlvbi5wYXlsb2FkLmVycm9yKTtcblxuICAgICAgICAgICAgaWYgKGFjdGlvbi5wYXlsb2FkLnR5cGUgPT09ICdmcm9udEVuZCcpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgICAgICBmcm9udEVuZDogW1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVyZ2VSaWdodChhY3Rpb24ucGF5bG9hZCwge3RpbWVzdGFtcDogbmV3IERhdGUoKX0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgLi4uZnJvbnRFbmRcbiAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgYmFja0VuZCxcbiAgICAgICAgICAgICAgICAgICAgYmFja0VuZENvbm5lY3RlZFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbi5wYXlsb2FkLnR5cGUgPT09ICdiYWNrRW5kJykge1xuICAgICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgICAgIGZyb250RW5kLFxuICAgICAgICAgICAgICAgICAgICBiYWNrRW5kOiBbXG4gICAgICAgICAgICAgICAgICAgICAgICBtZXJnZVJpZ2h0KGFjdGlvbi5wYXlsb2FkLCB7dGltZXN0YW1wOiBuZXcgRGF0ZSgpfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAuLi5iYWNrRW5kXG4gICAgICAgICAgICAgICAgICAgIF0sXG4gICAgICAgICAgICAgICAgICAgIGJhY2tFbmRDb25uZWN0ZWRcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICB9XG4gICAgICAgIGNhc2UgJ1NFVF9DT05ORUNUSU9OX1NUQVRVUyc6IHtcbiAgICAgICAgICAgIHJldHVybiBtZXJnZVJpZ2h0KHN0YXRlLCB7YmFja0VuZENvbm5lY3RlZDogYWN0aW9uLnBheWxvYWR9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfVxuICAgIH1cbn1cbiIsImNvbnN0IGluaXRpYWxIaXN0b3J5ID0ge1xuICAgIHBhc3Q6IFtdLFxuICAgIHByZXNlbnQ6IHt9LFxuICAgIGZ1dHVyZTogW11cbn07XG5cbmZ1bmN0aW9uIGhpc3Rvcnkoc3RhdGUgPSBpbml0aWFsSGlzdG9yeSwgYWN0aW9uKSB7XG4gICAgc3dpdGNoIChhY3Rpb24udHlwZSkge1xuICAgICAgICBjYXNlICdVTkRPJzoge1xuICAgICAgICAgICAgY29uc3Qge3Bhc3QsIHByZXNlbnQsIGZ1dHVyZX0gPSBzdGF0ZTtcbiAgICAgICAgICAgIGNvbnN0IHByZXZpb3VzID0gcGFzdFtwYXN0Lmxlbmd0aCAtIDFdO1xuICAgICAgICAgICAgY29uc3QgbmV3UGFzdCA9IHBhc3Quc2xpY2UoMCwgcGFzdC5sZW5ndGggLSAxKTtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgcGFzdDogbmV3UGFzdCxcbiAgICAgICAgICAgICAgICBwcmVzZW50OiBwcmV2aW91cyxcbiAgICAgICAgICAgICAgICBmdXR1cmU6IFtwcmVzZW50LCAuLi5mdXR1cmVdXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgY2FzZSAnUkVETyc6IHtcbiAgICAgICAgICAgIGNvbnN0IHtwYXN0LCBwcmVzZW50LCBmdXR1cmV9ID0gc3RhdGU7XG4gICAgICAgICAgICBjb25zdCBuZXh0ID0gZnV0dXJlWzBdO1xuICAgICAgICAgICAgY29uc3QgbmV3RnV0dXJlID0gZnV0dXJlLnNsaWNlKDEpO1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBwYXN0OiBbLi4ucGFzdCwgcHJlc2VudF0sXG4gICAgICAgICAgICAgICAgcHJlc2VudDogbmV4dCxcbiAgICAgICAgICAgICAgICBmdXR1cmU6IG5ld0Z1dHVyZVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNhc2UgJ1JFVkVSVCc6IHtcbiAgICAgICAgICAgIGNvbnN0IHtwYXN0LCBmdXR1cmV9ID0gc3RhdGU7XG4gICAgICAgICAgICBjb25zdCBwcmV2aW91cyA9IHBhc3RbcGFzdC5sZW5ndGggLSAxXTtcbiAgICAgICAgICAgIGNvbnN0IG5ld1Bhc3QgPSBwYXN0LnNsaWNlKDAsIHBhc3QubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHBhc3Q6IG5ld1Bhc3QsXG4gICAgICAgICAgICAgICAg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iLnN0YXR1c1tzdGF0dXNNYXBwZWRdIHx8IDApICsgMTtcbiAgICAgICAgY2IucmVzdWx0ID0gYWN0aW9uLnBheWxvYWQucmVzdWx0O1xuICAgICAgICBjYi5pbnB1dHMgPSBhY3Rpb24ucGF5bG9hZC5pbnB1dHM7XG4gICAgICAgIGNiLnN0YXRlID0gYWN0aW9uLnBheWxvYWQuc3RhdGU7XG5cbiAgICAgICAgaWYgKHVzYWdlKSB7XG4gICAgICAgICAgICBjb25zdCB7XG4gICAgICAgICAgICAgICAgX19kYXNoX2NsaWVudCxcbiAgICAgICAgICAgICAgICBfX2Rhc2hfc2VydmVyLFxuICAgICAgICAgICAgICAgIF9fZGFzaF91cGxvYWQsXG4gICAgICAgICAgICAgICAgX19kYXNoX2Rvd25sb2FkLFxuICAgICAgICAgICAgICAgIC4uLnVzZXJcbiAgICAgICAgICAgIH0gPSB1c2FnZTtcblxuICAgICAgICAgICAgY2IudG90YWwgKz0gX19kYXNoX2NsaWVudDtcbiAgICAgICAgICAgIGNiLmNvbXB1dGUgKz0gX19kYXNoX3NlcnZlcjtcbiAgICAgICAgICAgIGNiLm5ldHdvcmsudGltZSArPSBfX2Rhc2hfY2xpZW50IC0gX19kYXNoX3NlcnZlcjtcbiAgICAgICAgICAgIGNiLm5ldHdvcmsudXBsb2FkICs9IF9fZGFzaF91cGxvYWQ7XG4gICAgICAgICAgICBjYi5uZXR3b3JrLmRvd25sb2FkICs9IF9fZGFzaF9kb3dubG9hZDtcblxuICAgICAgICAgICAgZm9yIChjb25zdCByIGluIHVzZXIpIHtcbiAgICAgICAgICAgICAgICBpZiAodXNlci5oYXNPd25Qcm9wZXJ0eShyKSkge1xuICAgICAgICAgICAgICAgICAgICBjYlJlc291cmNlc1tyXSA9IChjYlJlc291cmNlc1tyXSB8fCAwKSArIHVzZXJbcl07XG4gICAgICAgICAgICAgICAgICAgIHRvdGFsUmVzb3VyY2VzW3JdID0gKHRvdGFsUmVzb3VyY2VzW3JdIHx8IDApICsg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oaGlzdG9yeUVudHJ5LnByb3BzKSkge1xuICAgICAgICAgICAgICAgIHN0YXRlLmhpc3RvcnkucHJlc2VudCA9IGhpc3RvcnlFbnRyeTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IG5leHRTdGF0ZSA9IHJlZHVjZXIoc3RhdGUsIGFjdGlvbik7XG5cbiAgICAgICAgaWYgKHR5cGUgPT09ICdPTl9QUk9QX0NIQU5HRScgJiYgcGF5bG9hZC5zb3VyY2UgIT09ICdyZXNwb25zZScpIHtcbiAgICAgICAgICAgIC8qXG4gICAgICAgICAgICAgKiBpZiB0aGUgcHJvcCBjaGFuZ2UgaXMgYW4gaW5wdXQsIHRoZW5cbiAgICAgICAgICAgICAqIHJlY29yZCBpdCBzbyB0aGF0IGl0IGNhbiBiZSBwbGF5ZWQgYmFja1xuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBjb25zdCBoaXN0b3J5RW50cnkgPSBnZXRJbnB1dEhpc3RvcnlTdGF0ZShwYXlsb2FkLCBuZXh0U3RhdGUpO1xuICAgICAgICAgICAgaWYgKGhpc3RvcnlFbnRyeSAmJiAhaXNFbXB0eShoaXN0b3J5RW50cnkucHJvcHMpKSB7XG4gICAgICAgICAgICAgICAgbmV4dFN0YXRlLmhpc3RvcnkgPSB7XG4gICAgICAgICAgICAgICAgICAgIHBhc3Q6IFsuLi5uZXh0U3RhdGUuaGlzdG9yeS5wYXN0LCBzdGF0ZS5oaXN0b3J5LnByZXNlbnRdLFxuICAgICAgICAgICAgICAgICAgICBwcmVzZW50OiBoaXN0b3J5RW50cnksXG4gICAgICAgICAgICAgICAgICAgIGZ1dHVyZTogW11cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG5leHRTdGF0ZTtcbiAgICB9O1xufVxuXG5mdW5jdGlvbiByZWxvYWRlclJlZHVjZXIocmVkdWNlcikge1xuICAgIHJldHV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mcgaXMgZW5hYmxlZFxuICAgICAgICAgIHZhciB0b3BNb3N0Tm9kZXMgPSBhdXguZ2V0VG9wTW9zdE5vZGVzKG9wdGlvbnMuZWxlcy5ub2RlcygpKTtcbiAgICAgICAgICBjb21wb25lbnRzID0gYXV4LmNvbm5lY3RDb21wb25lbnRzKGN5LCBvcHRpb25zLmVsZXMsIHRvcE1vc3ROb2Rlcyk7XG5cbiAgICAgICAgICAvL3NlbmQgZWFjaCBjb21wb25lbnQgdG8gc3BlY3RyYWwgbGF5b3V0XG4gICAgICAgICAgaWYgKG9wdGlvbnMucmFuZG9taXplKSB7XG4gICAgICAgICAgICBjb21wb25lbnRzLmZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICBvcHRpb25zLmVsZXMgPSBjb21wb25lbnQ7XG4gICAgICAgICAgICAgIHNwZWN0cmFsUmVzdWx0LnB1c2goc3BlY3RyYWxMYXlvdXQob3B0aW9ucykpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG9wdGlvbnMucXVhbGl0eSA9PSBcImRlZmF1bHRcIiB8fCBvcHRpb25zLnF1YWxpdHkgPT0gXCJwcm9vZlwiKSB7XG4gICAgICAgICAgICB2YXIgdG9CZVRpbGVkTm9kZXMgPSBjeS5jb2xsZWN0aW9uKCk7XG4gICAgICAgICAgICBpZiAob3B0aW9ucy50aWxlKSB7XG4gICAgICAgICAgICAgIC8vIGJlaGF2ZSBub2RlcyB0byBiZSB0aWxlZCBhcyBvbmUgY29tcG9uZW50XG4gICAgICAgICAgICAgIHZhciBub2RlSW5kZXhlcyA9IG5ldyBNYXAoKTtcbiAgICAgICAgICAgICAgdmFyIF94Q29vcmRzID0gW107XG4gICAgICAgICAgICAgIHZhciBfeUNvb3JkcyA9IFtdO1xuICAgICAgICAgICAgICB2YXIgY291bnQgPSAwO1xuICAgICAgICAgICAgICB2YXIgdGVtcFNwZWN0cmFsUmVzdWx0ID0geyBub2RlSW5kZXhlczogbm9kZUluZGV4ZXMsIHhDb29yZHM6IF94Q29vcmRzLCB5Q29vcmRzOiBfeUNvb3JkcyB9O1xuICAgICAgICAgICAgICB2YXIgaW5kZXhlc1RvQmVEZWxldGVkID0gW107XG4gICAgICAgICAgICAgIGNvbXBvbmVudHMuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50LCBpbmRleCkge1xuICAgICAgICAgICAgICAgIGlmIChjb21wb25lbnQuZWRnZXMoKS5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgY29tcG9uZW50Lm5vZGVzKCkuZm9yRWFjaChmdW5jdGlvbiAobm9kZSwgaSkge1xuICAgICAgICAgICAgICAgICAgICB0b0JlVGlsZWROb2Rlcy5tZXJnZShjb21wb25lbnQubm9kZXMoKVtpXSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghbm9kZS5pc1BhcmVudCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgdGVtcFNwZWN0cmFsUmVzdWx0Lm5vZGVJbmRleGVzLnNldChjb21wb25lbnQubm9kZXMoKVtpXS5pZCgpLCBjb3VudCsrKTtcbiAgICAgICAgICAgICAgICAgICAgICB0ZW1wU3BlY3RyYWxSZXN1bHQueENvb3Jkcy5wdXNoKGNvbXBvbmVudC5ub2RlcygpWzBdLnBvc2l0aW9uKCkueCk7XG4gICAgICAgICAgICAgICAgICAgICAgdGVtcFNwZWN0cmFsUmVzdWx0LnlDb29yZHMucHVzaChjb21wb25lbnQubm9kZXMoKVswXS5wb3NpdGlvbigpLnkpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgIGluZGV4ZXNUb0JlRGVsZXRlZC5wdXNoKGluZGV4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBpZiAodG9CZVRpbGVkTm9kZXMubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgICAgIGNvbXBvbmVudHMucHVzaCh0b0JlVGlsZWROb2Rlcyk7XG4gICAgICAgICAgICAgICAgc3BlY3RyYWxSZXN1bHQucHVzaCh0ZW1wU3BlY3RyYWxSZXN1bHQpO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSBpbmRleGVzVG9CZURlbGV0ZWQubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICAgIGNvbXBvbmVudHMuc3BsaWNlKGluZGV4ZXNUb0JlRGVsZXRlZFtpXSwgMSk7XG4gICAgICAgICAgICAgICAgICBzcGVjdHJhbFJlc3VsdC5zcGxpY2UoaW5kZXhlc1RvQmVEZWxldGVkW2ldLCAxKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb21wb25lbnRzLmZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgLy8gc2VuZCBlYWNoIGNvbXBvbmVudCB0byBjb3NlIGxheW91dFxuICAgICAgICAgICAgICBvcHRpb25zLmVsZXMgPSBjb21wb25lbnQ7XG4gICAgICAgICAgICAgIGNvc2VSZXN1bHQucHVzaChjb3NlTGF5b3V0KG9wdGlvbnMsIHNwZWN0cmFsUmVzdWx0W2luZGV4XSkpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLy8gcGFja2luZ1xuICAgICAgICAgIGlmIChjb21wb25lbnRzLmxlbmd0aCA+IDEpIHtcbiAgICAgICAgICAgIHZhciBzdWJncmFwaHMgPSBbXTtcbiAgICAgICAgICAgIGNvbXBvbmVudHMuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50LCBpbmRleCkge1xuICAgICAgICAgICAgICB2YXIgbm9kZUluZGV4ZXMgPSB2b2lkIDA7XG4gICAgICAgICAgICAgIGlmIChvcHRpb25zLnF1YWxpdHkgPT0gXCJkcmFmdFwiKSB7XG4gICAgICAgICAgICAgICAgbm9kZUluZGV4ZXMgPSBzcGVjdHJhbFJlc3VsdFtpbmRleF0ubm9kZUluZGV4ZXM7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgdmFyIHN1YmdyYXBoID0ge307XG4gICAgICAgICAgICAgIHN1YmdyYXBoLm5vZGVzID0gW107XG4gICAgICAgICAgICAgIHN1YmdyYXBoLmVkZ2VzID0gW107XG4gICAgICAgICAgICAgIHZhciBub2RlSW5kZXggPSB2b2lkIDA7XG4gICAgICAgICAgICAgIGNvbXBvbmVudC5ub2RlcygpLmZvckVhY2goZnVuY3Rpb24gKG5vZGUpIHtcbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5xdWFsaXR5ID09IFwiZHJhZnRcIikge1xuICAgICAgICAgICAgICAgICAgaWYgKCFub2RlLmlzUGFyZW50KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZUluZGV4ID0gbm9kZUluZGV4ZXMuZ2V0KG5vZGUuaWQoKSk7XG4gICAgICAgICAgICAgICAgICAgIHN1YmdyYXBoLm5vZGVzLnB1c2goeyB4OiBzcGVjdHJhbFJlc3VsdFtpbmRleF0ueENvb3Jkc1tub2RlSW5kZXhdIC0gbm9kZS5ib3VuZGluZ2JveCgpLncgLyAyLCB5OiBzcGVjdHJhbFJlc3VsdFtpbmRleF0ueUNvb3Jkc1tub2RlSW5kZXhdIC0gbm9kZS5ib3VuZGluZ2JveCgpLmggLyAyLCB3aWR0aDogbm9kZS5ib3VuZGluZ2JveCgpLncsIGhlaWdodDogbm9kZS5ib3VuZGluZ2JveCgpLmggfSk7XG4gICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyZW50SW5mbyA9IGF1eC5jYWxjQm91bmRpbmdCb3gobm9kZSwgc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnhDb29yZHMsIHNwZWN0cmFsUmVzdW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gICAgICAgICAgICAgICAgdmFyIHNvdXJjZUNlbnRlciA9IFtdO1xuICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldENlbnRlciA9IFtdO1xuICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZS5pc1BhcmVudCgpKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRJbmZvID0gYXV4LmNhbGNCb3VuZGluZ0JveChzb3VyY2UsIHNwZWN0cmFsUmVzdWx0W2luZGV4XS54Q29vcmRzLCBzcGVjdHJhbFJlc3VsdFtpbmRleF0ueUNvb3Jkcywgbm9kZUluZGV4ZXMpO1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2VDZW50ZXIucHVzaChwYXJlbnRJbmZvLnRvcExlZnRYICsgcGFyZW50SW5mby53aWR0aCAvIDIpO1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2VDZW50ZXIucHVzaChwYXJlbnRJbmZvLnRvcExlZnRZICsgcGFyZW50SW5mby5oZWlnaHQgLyAyKTtcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZUNlbnRlci5wdXNoKHNwZWN0cmFsUmVzdWx0W2luZGV4XS54Q29vcmRzW3NvdXJjZU5vZGVJbmRleF0pO1xuICAgICAgICAgICAgICAgICAgICBzb3VyY2VDZW50ZXIucHVzaChzcGVjdHJhbFJlc3VsdFtpbmRleF0ueUNvb3Jkc1tzb3VyY2VOb2RlSW5kZXhdKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIGlmICh0YXJnZXQuaXNQYXJlbnQoKSkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgX3BhcmVudEluZm8gPSBhdXguY2FsY0JvdW5kaW5nQm94KHRhcmdldCwgc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnhDb29yZHMsIHNwZWN0cmFsUmVzdWx0W2luZGV4XS55Q29vcmRzLCBub2RlSW5kZXhlcyk7XG4gICAgICA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ICAgICB9KTtcbiAgICAgICAgICAgICAgc3ViZ3JhcGhzLnB1c2goc3ViZ3JhcGgpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB2YXIgc2hpZnRSZXN1bHQgPSBsYXlVdGlsLnBhY2tDb21wb25lbnRzKHN1YmdyYXBocywgb3B0aW9ucy5yYW5kb21pemUpLnNoaWZ0cztcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnF1YWxpdHkgPT0gXCJkcmFmdFwiKSB7XG4gICAgICAgICAgICAgIHNwZWN0cmFsUmVzdWx0LmZvckVhY2goZnVuY3Rpb24gKHJlc3VsdCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICB2YXIgbmV3WENvb3JkcyA9IHJlc3VsdC54Q29vcmRzLm1hcChmdW5jdGlvbiAoeCkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHggKyBzaGlmdFJlc3VsdFtpbmRleF0uZHg7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgdmFyIG5ld1lDb29yZHMgPSByZXN1bHQueUNvb3Jkcy5tYXAoZnVuY3Rpb24gKHkpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiB5ICsgc2hpZnRSZXN1bHRbaW5kZXhdLmR5O1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHJlc3VsdC54Q29vcmRzID0gbmV3WENvb3JkcztcbiAgICAgICAgICAgICAgICByZXN1bHQueUNvb3JkcyA9IG5ld1lDb29yZHM7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgY29zZVJlc3VsdC5mb3JFYWNoKGZ1bmN0aW9uIChyZXN1bHQsIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVzdWx0KS5mb3JFYWNoKGZ1bmN0aW9uIChpdGVtKSB7XG4gICAgICAgICAgICAgICAgICB2YXIgbm9kZVJlY3RhbmdsZSA9IHJ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ICBpZiAodmFsdWUgPiBtYXhYQ29vcmQpIG1heFhDb29yZCA9IHZhbHVlO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgcmVzdWx0LnlDb29yZHMuZm9yRWFjaChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgPCBtaW5ZQ29vcmQpIG1pbllDb29yZCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA+IG1heFlDb29yZCkgbWF4WUNvb3JkID0gdmFsdWU7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB2YXIgYm91bmRpbmdCb3ggPSBvcHRpb25zLmVsZXMuYm91bmRpbmdCb3goKTtcbiAgICAgICAgICAgIHZhciBkaWZmT25YID0gYm91bmRpbmdCb3gueDEgKyBib3VuZGluZ0JveC53IC8gMiAtIChtYXhYQ29vcmQgKyBtaW5YQ29vcmQpIC8gMjtcbiAgICAgICAgICAgIHZhciBkaWZmT25ZID0gYm91bmRpbmdCb3gueTEgKyBib3VuZGluZ0JveC5oIC8gMiAtIChtYXhZQ29vcmQgKyBtaW5ZQ29vcmQpIC8gMjtcbiAgICAgICAgICAgIHNwZWN0cmFsUmVzdWx0LmZvckVhY2goZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICByZXN1bHQueENvb3JkcyA9IHJlc3VsdC54Q29vcmRzLm1hcChmdW5jdGlvbiAoeCkge1xuICAgICAgICAgICAgICAgIHJldHVybiB4ICsgZGlmZk9uWDtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIHJlc3VsdC55Q29vcmRzID0gcmVzdWx0LnlDb29yZHMubWFwKGZ1bmN0aW9uICh5KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHkgKyBkaWZmT25ZO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb3NlUmVzdWx0LmZvckVhY2goZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgICBPYmplY3Qua2V5cyhyZXN1bHQpLmZvckVhY2goZnVuY3Rpb24gKGl0ZW0pIHtcbiAgICAgICAgICAgICAgICB2YXIgbm9kZSA9IHJlc3VsdFtpdGVtXTtcbiAgICAgICAgICAgICAgICBpZiAobm9kZS5nZXRDZW50ZXJYKCkgPCBtaW5YQ29vcmQpIG1pblhDb29yZCA9IG5vZGUuZ2V0Q2VudGVyWCgpO1xuICAgICAgICAgICAgICAgIGlmIChub2RlLmdldENlbnRlclgoKSA+IG1heFhDb29yZCkgbWF4WENvb3JkID0gbm9kZS5nZXRDZW50ZXJYKCk7XG4gICAgICAgICAgICAgICAgaWYgKG5vZGUuZ2V0Q2VudGVyWSgpIDwgbWluWUNvb3JkKSBtaW5ZQ29vcmQgPSBub2RlLmdldENlbnRlclkoKTtcbiAgICAgICAgICAgICAgICBpZiAobm9kZS5nZXRDZW50ZXJZKCkgPiBtYXhZQ29vcmQpIG1heFlDb29yZCA9IG5vZGUuZ2V0Q2VudGVyWSgpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdmFyIF9ib3VuZGluZ0JveCA9IG9wdGlvbnMuZWxlcy5ib3VuZGluZ0JveCgpO1xuICAgICAgICAgICAgdmFyIF9kaWZmT25YID0gX2JvdW5kaW5nQm94LngxICsgX2JvdW5kaW5nQm94LncgLyAyIC0gKG1heFhDb29yZCArIG1pblhDb29yZCkgLyAyO1xuICAgICAgICAgICAgdmFyIF9kaWZmT25ZID0gX2JvdW5kaW5nQm94LnkxICsgX2JvdW5kaW5nQm94LmggLyAyIC0gKG1heFlDb29yZCArIG1pbllDb29yZCkgLyAyO1xuICAgICAgICAgICAgY29zZVJlc3VsdC5mb3JFYWNoKGZ1bmN0aW9uIChyZXN1bHQsIGluZGV4KSB7XG4gICAgICAgICAgICAgIE9iam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UlkXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgICBpZiAob3B0aW9ucy5ub2RlRGltZW5zaW9uc0luY2x1ZGVMYWJlbHMpIHtcbiAgICAgICAgICAgIGlmIChub2RlLmxhYmVsV2lkdGgpIHtcbiAgICAgICAgICAgICAgaWYgKG5vZGUubGFiZWxQb3NIb3Jpem9udGFsID09IFwibGVmdFwiKSB7XG4gICAgICAgICAgICAgICAgcG9zLnggKz0gbm9kZS5sYWJlbFdpZHRoIC8gMjtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChub2RlLmxhYmVsUG9zSG9yaXpvbnRhbCA9PSBcInJpZ2h0XCIpIHtcbiAgICAgICAgICAgICAgICBwb3MueCAtPSBub2RlLmxhYmVsV2lkdGggLyAyO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAobm9kZS5sYWJlbEhlaWdodCkge1xuICAgICAgICAgICAgICBpZiAobm9kZS5sYWJlbFBvc1ZlcnRpY2FsID09IFwidG9wXCIpIHtcbiAgICAgICAgICAgICAgICBwb3MueSArPSBub2RlLmxhYmVsSGVpZ2h0IC8gMjtcbiAgICAgICAgICAgICAgfSBlbHNlIGlmIChub2RlLmxhYmVsUG9zVmVydGljYWwgPT0gXCJib3R0b21cIikge1xuICAgICAgICAgICAgICAgIHBvcy55IC09IG5vZGUubGFiZWxIZWlnaHQgLyAyO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB4OiBwb3MueCxcbiAgICAgICAgICAgIHk6IHBvcy55XG4gICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICB2YXIgX3BvcyA9IHZvaWQgMDtcbiAgICAgICAgICBzcGVjdHJhbFJlc3VsdC5mb3JFYWNoKGZ1bmN0aW9uIChyZXN1bHQpIHtcbiAgICAgICAgICAgIHZhci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1hdGguYWJzKGN1cnJlbnQgLyBwcmV2aW91cyk7XG5cbiAgICAgIGlmICh0ZW1wIDw9IDEgKyBwaVRvbCAmJiB0ZW1wID49IDEpIHtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICAgIHByZXZpb3VzID0gY3VycmVudDtcbiAgICB9XG5cbiAgICBmb3IgKHZhciBfaTEwID0gMDsgX2kxMCA8IG5vZGVTaXplOyBfaTEwKyspIHtcbiAgICAgIFYxW19pMTBdID0gWTFbX2kxMF07XG4gICAgfVxuXG4gICAgY291bnQgPSAwO1xuICAgIHByZXZpb3VzID0gc21hbGw7XG4gICAgd2hpbGUgKHRydWUpIHtcbiAgICAgIGNvdW50Kys7XG5cbiAgICAgIGZvciAodmFyIF9pMTEgPSAwOyBfaTExIDwgbm9kZVNpemU7IF9pMTErKykge1xuICAgICAgICBWMltfaTExXSA9IFkyW19pMTFdO1xuICAgICAgfVxuXG4gICAgICBWMiA9IE1hdHJpeC5taW51c09wKFYyLCBNYXRyaXgubXVsdENvbnMoVjEsIE1hdHJpeC5kb3RQcm9kdWN0KFYxLCBWMikpKTtcbiAgICAgIFkyID0gTWF0cml4Lm11bHRHYW1tYShNYXRyaXgubXVsdEwoTWF0cml4Lm11bHRHYW1tYShWMiksIEMsIElOVikpO1xuICAgICAgdGhldGEyID0gTWF0cml4LmRvdFByb2R1Y3QoVjIsIFkyKTtcbiAgICAgIFkyID0gTWF0cml4Lm5vcm1hbGl6ZShZMik7XG5cbiAgICAgIGN1cnJlbnQgPSBNYXRyaXguZG90UHJvZHVjdChWMiwgWTIpO1xuXG4gICAgICB0ZW1wID0gTWF0aC5hYnMoY3VycmVudCAvIHByZXZpb3VzKTtcblxuICAgICAgaWYgKHRlbXAgPD0gMSArIHBpVG9sICYmIHRlbXAgPj0gMSkge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgcHJldmlvdXMgPSBjdXJyZW50O1xuICAgIH1cblxuICAgIGZvciAodmFyIF9pMT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ICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGlmICghX2l0ZXJhdG9yTm9ybWFsQ29tcGxldGlvbjIgJiYgX2l0ZXJhdG9yMi5yZXR1cm4pIHtcbiAgICAgICAgICAgICAgICBfaXRlcmF0b3IyLnJldHVybigpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICBpZiAoX2RpZEl0ZXJhdG9yRXJyb3IyKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgX2l0ZXJhdG9yRXJyb3IyO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFpc0ZpeGVkQ29tcG9uZW50KSB7XG4gICAgICAgICAgICB2YXIgaXNFeGlzdCA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIGV4aXN0QXQgPSB2b2lkIDA7XG4gICAgICAgICAgICBfY29tcG9uZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGluZGV4KSB7XG4gICAgICAgICAgICAgIGlmIChjb21wb25lbnQuaGFzKFtdLmNvbmNhdChfdG9Db25zdW1hYmxlQXJyYXkodmFsdWUpKVswXSkpIHtcbiAgICAgICAgICAgICAgICBpc0V4aXN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICBleGlzdEF0ID0gaW5kZXg7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgaWYgKCFpc0V4aXN0KSB7XG4gICAgICAgICAgICAgIF9jb21wb25lbnRzLnB1c2gobmV3IFNldCh2YWx1ZSkpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdmFsdWUuZm9yRWFjaChmdW5jdGlvbiAoZWxlKSB7XG4gICAgICAgICAgICAgICAgX2NvbXBvbmVudHNbZXhpc3RBdF0uYWRkKGVsZSk7XG4gIC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yB4Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXSA6IGR1bW15UG9zaXRpb25zLmdldChub2RlSWQpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcG9zQmVmb3JlID0gbm9kZUluZGV4ZXMuaGFzKG5vZGVJZCkgPyB5Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXSA6IGR1bW15UG9zaXRpb25zLmdldChub2RlSWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHBvc0FmdGVyID0gcG9zaXRpb25NYXAuZ2V0KG5vZGVJZCk7XG4gICAgICAgICAgICBpZiAocG9zQmVmb3JlIDwgbWluQmVmb3JlKSB7XG4gICAgICAgICAgICAgIG1pbkJlZm9yZSA9IHBvc0JlZm9yZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChwb3NCZWZvcmUgPiBtYXhCZWZvcmUpIHtcbiAgICAgICAgICAgICAgbWF4QmVmb3JlID0gcG9zQmVmb3JlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHBvc0FmdGVyIDwgbWluQWZ0ZXIpIHtcbiAgICAgICAgICAgICAgbWluQWZ0ZXIgPSBwb3NBZnRlcjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChwb3NBZnRlciA+IG1heEFmdGVyKSB7XG4gICAgICAgICAgICAgIG1heEFmdGVyID0gcG9zQWZ0ZXI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICBfZGlkSXRlcmF0b3JFcnJvcjMgPSB0cnVlO1xuICAgICAgICAgIF9pdGVyYXRvckVycm9yMyA9IGVycjtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgaWYgKCFfaXRlcmF0b3JOb3JtYWxDb21wbGV0aW9uMyAmJiBfaXRlcmF0b3IzLnJldHVyb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NlY3Rpb24uc2l6ZSA+IDApIHhQb3MgPSB4Q29vcmRzW25vZGVJbmRleGVzLmdldChpbnRlcnNlY3Rpb24udmFsdWVzKCkubmV4dCgpLnZhbHVlKV07ZWxzZSB4UG9zID0gY2FsY3VsYXRlQXZnUG9zaXRpb24oYWxpZ25tZW50U2V0KS54O1xuXG4gICAgICAgICAgICB2ZXJ0aWNhbEFsaWduW19pNF0uZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICAgIHRhcmdldE1hdHJpeFtjb3VudF0gPSBbeFBvcywgeUNvb3Jkc1tub2RlSW5kZXhlcy5nZXQobm9kZUlkKV1dO1xuICAgICAgICAgICAgICBzb3VyY2VNYXRyaXhbY291bnRdID0gW3hDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KG5vZGVJZCldLCB5Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXV07XG4gICAgICAgICAgICAgIGNvdW50Kys7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgZm9yICh2YXIgX2k0ID0gMDsgX2k0IDwgdmVydGljYWxBbGlnbi5sZW5ndGg7IF9pNCsrKSB7XG4gICAgICAgICAgICBfbG9vcDIoX2k0KTtcbiAgICAgICAgICB9XG4gICAgICAgICAgc3RhbmRhcmRUcmFuc2Zvcm1hdGlvbiA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQuaG9yaXpvbnRhbCkge1xuICAgICAgICAgIHZhciBob3Jpem9udGFsQWxpZ24gPSBjb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50Lmhvcml6b250YWw7XG5cbiAgICAgICAgICB2YXIgX2xvb3AzID0gZnVuY3Rpb24gX2xvb3AzKF9pNSkge1xuICAgICAgICAgICAgdmFyIGFsaWdubWVudFNldCA9IG5ldyBTZXQoKTtcbiAgICAgICAgICAgIGhvcml6b250YWxBbGlnbltfaTVdLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICBhbGlnbm1lbnRTZXQuYWRkKG5vZGVJZCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciBpbnRlcnNlY3Rpb24gPSBuZXcgU2V0KFtdLmNvbmNhdChfdG9Db25zdW1hYmxlQXJyYXkoYWxpZ25tZW50U2V0KSkuZmlsdGVyKGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICAgIHJldHVybiBmaXhlZE5vZGVzLmhhcyh4KTtcbiAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgIHZhciB5UG9zID0gdm9pZCAwO1xuICAgICAgICAgICAgaWYgKGludGVyc2VjdGlvbi5zaXplID4gMCkgeVBvcyA9IHhDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KGludGVyc2VjdGlvbi52YWx1ZXMoKS5uZXh0KCkudmFsdWUpXTtlbHNlIHlQb3MgPSBjYWxjdWxhdGVBdmdQb3NpdGlvbihhbGlnbm1lbnRTZXQpLnk7XG5cbiAgICAgICAgICAgIGhvcml6b250YWxBbGlnbltfaTVdLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICB0YXJnZXRNYXRyaXhbY291bnRdID0gW3hDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KG5vZGVJZCldLCB5UG9zXTtcbiAgICAgICAgICAgICAgc291cmNlTWF0cml4W2NvdW50XSA9IFt4Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXSwgeUNvb3Jkc1tub2RlSW5kZXhlcy5nZXQobm9kZUlkKV1dO1xuICAgICAgICAgICAgICBjb3VudCsrO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfTtcblxuICAgICAgICAgIGZvciAodmFyIF9pNSA9IDA7IF9pNSA8IGhvcml6b250YWxBbGlnbi5sZW5ndGg7IF9pNSsrKSB7XG4gICAgICAgICAgICBfbG9v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gICAgICAgICAgICAgaWYgKCFzdWJHcmFwaE9uSG9yaXpvbnRhbC5oYXMoYWRqYWNlbnQuaWQpKSB7XG4gICAgICAgICAgICAgICAgc3ViR3JhcGhPbkhvcml6b250YWwuc2V0KGFkamFjZW50LmlkLCBbXSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgY29uc3RyYWludHNJbmxhcmdlc3RDb21wb25lbnQucHVzaCh7IGxlZnQ6IG5vZGVJZCwgcmlnaHQ6IGFkamFjZW50LmlkIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgaWYgKHN1YkdyYXBoT25WZXJ0aWNhbC5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgICAgIHN1YkdyYXBoT25WZXJ0aWNhbC5nZXQobm9kZUlkKS5wdXNoKGFkamFjZW50KTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBzdWJHcmFwaE9uVmVydGljYWwuc2V0KG5vZGVJZCwgW2FkamFjZW50XSk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKCFzdWJHcmFwaE9uVmVydGljYWwuaGFzKGFkamFjZW50LmlkKSkge1xuICAgICAgICAgICAgICAgIHN1YkdyYXBoT25WZXJ0aWNhbC5zZXQoYWRqYWNlbnQuaWQsIFtdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBjb25zdHJhaW50c0lubGFyZ2VzdENvbXBvbmVudC5wdXNoKHsgdG9wOiBub2RlSWQsIGJvdHRvbTogYWRqYWNlbnQuaWQgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGFwcGx5UmVmbGVjdGlvbkZvclJlbGF0aXZlUGxhY2VtZW50KGNvbnN0cmFpbnRzSW5sYXJnZXN0Q29tcG9uZW50KTtcbiAgICAgICAgcmVmbGVjdGlvblR5cGUgPSBmYWxzZTtcblxuICAgICA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XG4gICAgLyogdGhlbiBlbmZvcmNlIGFsaWdubWVudCBjb25zdHJhaW50ICovXG5cbiAgICBpZiAoY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludCkge1xuICAgICAgaWYgKGNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQudmVydGljYWwpIHtcbiAgICAgICAgdmFyIHhBbGlnbiA9IGNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQudmVydGljYWw7XG5cbiAgICAgICAgdmFyIF9sb29wNCA9IGZ1bmN0aW9uIF9sb29wNChfaTkpIHtcbiAgICAgICAgICB2YXIgYWxpZ25tZW50U2V0ID0gbmV3IFNldCgpO1xuICAgICAgICAgIHhBbGlnbltfaTldLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgYWxpZ25tZW50U2V0LmFkZChub2RlSWQpO1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHZhciBpbnRlcnNlY3Rpb24gPSBuZXcgU2V0KFtdLmNvbmNhdChfdG9Db25zdW1hYmxlQXJyYXkoYWxpZ25tZW50U2V0KSkuZmlsdGVyKGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICByZXR1cm4gZml4ZWROb2Rlcy5oYXMoeCk7XG4gICAgICAgICAgfSkpO1xuICAgICAgICAgIHZhciB4UG9zID0gdm9pZCAwO1xuICAgICAgICAgIGlmIChpbnRlcnNlY3Rpb24uc2l6ZSA+IDApIHhQb3MgPSB4Q29vcmRzW25vZGVJbmRleGVzLmdldChpbnRlcnNlY3Rpb24udmFsdWVzKCkubmV4dCgpLnZhbHVlKV07ZWxzZSB4UG9zID0gY2FsY3VsYXRlQXZnUG9zaXRpb24oYWxpZ25tZW50U2V0KS54O1xuXG4gICAgICAgICAgYWxpZ25tZW50U2V0LmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgaWYgKCFmaXhlZE5vZGVzLmhhcyhub2RlSWQpKSB4Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXSA9IHhQb3M7XG4gICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgZm9yICh2YXIgX2k5ID0gMDsgX2k5IDwgeEFsaWduLmxlbmd0aDsgX2k5KyspIHtcbiAgICAgICAgICBfbG9vcDQoX2k5KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKGNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQuaG9yaXpvbnRhbCkge1xuICAgICAgICB2YXIgeUFsaWduID0gY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC5ob3Jpem9udGFsO1xuXG4gICAgICAgIHZhciBfbG9vcDUgPSBmdW5jdGlvbiBfbG9vcDUoX2kxMCkge1xuICAgICAgICAgIHZhciBhbGlnbm1lbnRTZXQgPSBuZXcgU2V0KCk7XG4gICAgICAgICAgeUFsaWduW19pMTBdLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgYWxpZ25tZW50U2V0LmFkZChub2RlSWQpO1xuICAgICAgICAgIH0pO1xuICAgICAgICAgIHZhciBpbnRlcnNlY3Rpb24gPSBuZXcgU2V0KFtdLmNvbmNhdChfdG9Db25zdW1hYmxlQXJyYXkoYWxpZ25tZW50U2V0KSkuZmlsdGVyKGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICByZXR1cm4gZml4ZWROb2Rlcy5oYXMoeCk7XG4gICAgICAgICAgfSkpO1xuICAgICAgICAgIHZhciB5UG9zID0gdm9pZCAwO1xuICAgICAgICAgIGlmIChpbnRlcnNlY3Rpb24uc2l6ZSA+IDApIHlQb3MgPSB5Q29vcmRzW25vZGVJbmRleGVzLmdldChpbnRlcnNlY3Rpb24udmFsdWVzKCkubmV4dCgpLnZhbHVlKV07ZWxzZSB5UG9zID0gY2FsY3VsYXRlQXZnUG9zaXRpb24oYWxpZ25tZW50U2V0KS55O1xuXG4gICAgICAgICAg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ml6b250YWwuYWRkKFwiZHVtbXlcIiArIF9pMTEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGR1bW15UG9zaXRpb25zRm9yVmVydGljYWxBbGlnbm1lbnQuc2V0KFwiZHVtbXlcIiArIF9pMTEsIHhDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KHZlcnRpY2FsQWxpZ25tZW50W19pMTFdWzBdKV0pO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgZm9yICh2YXIgX2kxMSA9IDA7IF9pMTEgPCB2ZXJ0aWNhbEFsaWdubWVudC5sZW5ndGg7IF9pMTErKykge1xuICAgICAgICAgICAgICBfbG9vcDYoX2kxMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIGlmIChjb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50Lmhvcml6b250YWwpIHtcbiAgICAgICAgICAgIHZhciBob3Jpem9udGFsQWxpZ25tZW50ID0gY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC5ob3Jpem9udGFsO1xuXG4gICAgICAgICAgICB2YXIgX2xvb3A3ID0gZnVuY3Rpb24gX2xvb3A3KF9pMTIpIHtcbiAgICAgICAgICAgICAgZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LnNldChcImR1bW15XCIgKyBfaTEyLCBbXSk7XG4gICAgICAgICAgICAgIGhvcml6b250YWxBbGlnbm1lbnRbX2kxMl0uZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICAgICAgbm9kZVRvRHVtbXlGb3JIb3Jpem9udGFsQWxpZ25tZW50LnNldChub2RlSWQsIFwiZHVtbXlcIiArIF9pMTIpO1xuICAgICAgICAgICAgICAgIGR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5nZXQoXCJkdW1teVwiICsgX2kxMikucHVzaChub2RlSWQpO1xuICAgICAgICAgICAgICAgIGlmIChmaXhlZE5vZGVzLmhhcyhub2RlSWQpKSB7XG4gICAgICAgICAgICAgICAgICBmaXhlZE5vZGVzT25WZXJ0aWNhbC5hZGQoXCJkdW1teVwiICsgX2kxMik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgZHVtbXlQb3NpdGlvbnNGb3JIb3Jpem9udGFsQWxpZ25tZW50LnNldChcImR1bW15XCIgKyBfaTEyLCB5Q29vcmRzW25vZGVJbmRleGVzLmdldChob3Jpem9udGFsQWxpZ25tZW50W19pMTJdWzBdKV0pO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgZm9yICh2YXIgX2kxMiA9IDA7IF9pMTIgPCBob3Jpem9udGFsQWxpZ25tZW50Lmxlbmd0aDsgX2kxMisrKSB7XG4gICAgICAgICAgICAgIF9sb29wNyhfaTEyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvLyBjb25zdHJ1Y3QgaG9yaXpvbnRhbCBhbmQgdmVydGljYWwgZGFncyAoc3ViZ3JhcGhzKSBmcm9tIG92ZXJhbGwgZGFnXG4gICAgICAgIHZhciBkYWdPbkhvcml6b250YWwgPSBuZXcgTWFwKCk7XG4gICAgICAgIHZhciBkYWdPblZlcnRpY2FsID0gbmV3IE1hcCgpO1xuXG4gICAgICAgIHZhciBfbG9vcDggPSBmdW5jdGlvbiBfbG9vcDgobm9kZUlkKSB7XG4gICAgICAgICAgZGFnLmdldChub2RlSWQpLmZvckVhY2goZnVuY3Rpb24gKGFkamFjZW50KSB7XG4gICAgICAgICAgICB2YXIgc291cmNlSWQgPSB2b2lkIDA7XG4gICAgICAgICAgICB2YXIgdGFyZ2V0Tm9kZSA9IHZvaWQgMDtcbiAgICAgICAgICAgIGlmIChhZGphY2VudFtcImRpcmVjdGlvblwiXSA9PSBcImhvcml6b250YWxcIikge1xuICAgICAgICAgICAgICBzb3VyY2VJZCA9IG5vZGVUb0R1bW15Rm9yVmVydGljYWxBbGlnbm1lbnQuZ2V0KG5vZGVJZCkgPyBub2RlVG9EdW1teUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChub2RlSWQpIDogbm9kZUlkO1xuICAgICAgICAgICAgICBpZiAobm9kZVRvRHVtbXlGb3JWZXJ0aWNhbEFsaWdubWVudC5nZXQoYWRqYWNlbnQuaWQpKSB7XG4gICAgICAgICAgICAgICAgdGFyZ2V0Tm9kZSA9IHsgaWQ6IG5vZGVUb0R1bW15Rm9yVmVydGljYWxBbGlnbm1lbnQuZ2V0KGFkamFjZW50LmlkKSwgZ2FwOiBhZGphY2VudC5nYXAsIGRpcmVjdGlvbjogYWRqYWNlbnQuZGlyZWN0aW9uIH07XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGFyZ2V0Tm9kZSA9IGFkamFjZW50O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChkYWdPbkhvcml6b250YWwuaGFzKHNvdXJjZUlkKSkge1xuICAgICAgICAgICAgICAgIGRhZ09uSG9yaXpvbnRhbC5nZXQoc291cmNlSWQpLnB1c2godGFyZ2V0Tm9kZSk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgZGFnT25Ib3Jpem9udGFsLnNldChzb3VyY2VJZCwgW3RhcmdldE5vZGVdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoIWRhZ09uSG9yaXpvbnRhbC5oYXModGFyZ2V0Tm9kZS5pZCkpIHtcbiAgICAgICAgICAgICAgICBkYWdPbkhvcml6b250YWwuc2V0KHRhcmdldE5vZGUuaWQsIFtdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgc291cmNlSWQgPSBub2RlVG9EdW1teUZvckhvcml6b250YWxBbGlnbm1lbnQuZ2V0KG5vZGVJZCkgPyBub2RlVG9EdW1teUZvckhvcml6b250YWxBbGlnbm1lbnQuZ2V0KG5vZGVJZCkgOiBub2RlSWQ7XG4gICAgICAgICAgICAgIGlmIChub2RlVG9EdW1teUZvckhvcml6b250YWxBbGlnbm1lbnQuZ2V0KGFkamFjZW50LmlkKSkge1xuICAgICAgICAgICAgICAgIHRhcmdldE5vZGUgPSB7IGlkOiBub2RlVG9EdW1teUZvckhvcml6b250YWxBbGlnbm1lbnQuZ2V0KGFkamFjZW50LmlkKSwgZ2FwOiBhZGphY2VudC5nYXAsIGRpcmVjdGlvbjogYWRqYWNlbnQuZGlyZWN0aW9uIH07XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGFyZ2V0Tm9kZSA9IGFkamFjZW50O1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmIChkYWdPblZlcnRpY2FsLmhhcyhzb3VyY2VJZCkpIHtcbiAgICAgICAgICAgICAgICBkYWdPblZlcnRpY2FsLmdldChzb3VyY2VJZCkucHVzaCh0YXJnZXROb2RlKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkYWdPblZlcnRpY2FsLnNldChzb3VyY2VJZCwgW3RhcmdldE5vZGVdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoIWRhZ09uVmVydGljYWwuaGFzKHRhcmdldE5vZGUuaWQpKSB7XG4gICAgICAgICAgICAgICAgZGFnT25WZXJ0aWNhbC5zZXQodGFyZ2V0Tm9kZS5pZCwgW10pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgIH07XG5cbiAgICAgICAgdmFyIF9pdGVyYXRvck5vcm1hbENvbXBsZXRpb241ID0gdHJ1ZTtcbiAgICAgICAgdmFyIF9kaWRJdGVyYXRvckVycm9yNSA9IGZhbHNlO1xuICAgICAgICB2YXIgX2l0ZXJhdG9yRXJyb3I1ID0gd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jpem9udGFsKTtcbiAgICAgICAgdmFyIHVuZGlyZWN0ZWRPblZlcnRpY2FsID0gZGFnVG9VbmRpcmVjdGVkKGRhZ09uVmVydGljYWwpO1xuICAgICAgICB2YXIgY29tcG9uZW50c09uSG9yaXpvbnRhbCA9IGZpbmRDb21wb25lbnRzKHVuZGlyZWN0ZWRPbkhvcml6b250YWwpO1xuICAgICAgICB2YXIgY29tcG9uZW50c09uVmVydGljYWwgPSBmaW5kQ29tcG9uZW50cyh1bmRpcmVjdGVkT25WZXJ0aWNhbCk7XG4gICAgICAgIHZhciByZXZlcnNlZERhZ09uSG9yaXpvbnRhbCA9IGRhZ1RvUmV2ZXJzZWQoZGFnT25Ib3Jpem9udGFsKTtcbiAgICAgICAgdmFyIHJldmVyc2VkRGFnT25WZXJ0aWNhbCA9IGRhZ1RvUmV2ZXJzZWQoZGFnT25WZXJ0aWNhbCk7XG4gICAgICAgIHZhciBjb21wb25lbnRTb3VyY2VzT25Ib3Jpem9udGFsID0gW107XG4gICAgICAgIHZhciBjb21wb25lbnRTb3VyY2VzT25WZXJ0aWNhbCA9IFtdO1xuXG4gICAgICAgIGNvbXBvbmVudHNPbkhvcml6b250YWwuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50LCBpbmRleCkge1xuICAgICAgICAgIGNvbXBvbmVudFNvdXJjZXNPbkhvcml6b250YWxbaW5kZXhdID0gW107XG4gICAgICAgICAgY29tcG9uZW50LmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgaWYgKHJldmVyc2VkRGFnT25Ib3Jpem9udGFsLmdldChub2RlSWQpLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICAgIGNvbXBvbmVudFNvdXJjZXNPbkhvcml6b250YWxbaW5kZXhdLnB1c2gobm9kZUlkKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY29tcG9uZW50c09uVmVydGljYWwuZm9yR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9pdGVyYXRvck5vcm1hbENvbXBsZXRpb243ID0gdHJ1ZTtcbiAgICAgICAgdmFyIF9kaWRJdGVyYXRvckVycm9yNyA9IGZhbHNlO1xuICAgICAgICB2YXIgX2l0ZXJhdG9yRXJyb3I3ID0gdW5kZWZpbmVkO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgZm9yICh2YXIgX2l0ZXJhdG9yNyA9IHBvc2l0aW9uTWFwVmVydGljYWwua2V5cygpW1N5bWJvbC5pdGVyYXRvcl0oKSwgX3N0ZXA3OyAhKF9pdGVyYXRvck5vcm1hbENvbXBsZXRpb243ID0gKF9zdGVwNyA9IF9pdGVyYXRvcjcubmV4dCgpKS5kb25lKTsgX2l0ZXJhdG9yTm9ybWFsQ29tcGxldGlvbjcgPSB0cnVlKSB7XG4gICAgICAgICAgICB2YXIga2V5ID0gX3N0ZXA3LnZhbHVlO1xuXG4gICAgICAgICAgICBfbG9vcDEwKGtleSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICBfZGlkSXRlcmF0b3JFcnJvcjcgPSB0cnVlO1xuICAgICAgICAgIF9pdGVyYXRvckVycm9yNyA9IGVycjtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgaWYgKCFfaXRlcmF0b3JOb3JtYWxDb21wbGV0aW9uNyAmJiBfaXRlcmF0b3I3LnJldHVybikge1xuICAgICAgICAgICAgICBfaXRlcmF0b3I3LnJldHVybigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICBpZiAoX2RpZEl0ZXJhdG9yRXJyb3I3KSB7XG4gICAgICAgICAgICAgIHRocm93IF9pdGVyYXRvckVycm9yNztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pKCk7XG4gICAgfVxuICB9XG5cbiAgLy8gYXNzaWduIG5ldyBjb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ZE5vZGVzT25Ib3Jpem9udGFsLmFkZChub2RlSWQpO1xuICAgICAgc2VsZi5maXhlZE5vZGVzT25WZXJ0aWNhbC5hZGQobm9kZUlkKTtcbiAgICB9KTtcblxuICAgIGlmICh0aGlzLmNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQpIHtcbiAgICAgIGlmICh0aGlzLmNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQudmVydGljYWwpIHtcbiAgICAgICAgdmFyIHZlcnRpY2FsQWxpZ25tZW50ID0gdGhpcy5jb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50LnZlcnRpY2FsO1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHZlcnRpY2FsQWxpZ25tZW50Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgdGhpcy5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LnNldChcImR1bW15XCIgKyBpLCBbXSk7XG4gICAgICAgICAgdmVydGljYWxBbGlnbm1lbnRbaV0uZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICBub2RlVG9EdW1teUZvclZlcnRpY2FsQWxpZ25tZW50LnNldChub2RlSWQsIFwiZHVtbXlcIiArIGkpO1xuICAgICAgICAgICAgc2VsZi5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChcImR1bW15XCIgKyBpKS5wdXNoKG5vZGVJZCk7XG4gICAgICAgICAgICBpZiAoc2VsZi5maXhlZE5vZGVTZXQuaGFzKG5vZGVJZCkpIHtcbiAgICAgICAgICAgICAgc2VsZi5maXhlZE5vZGVzT25Ib3Jpem9udGFsLmFkZChcImR1bW15XCIgKyBpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgICAgaWYgKHRoaXMuY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC5ob3Jpem9udGF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ChsZWZ0KS5wdXNoKHJpZ2h0KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc3ViR3JhcGhPbkhvcml6b250YWwuc2V0KGxlZnQsIFtyaWdodF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc3ViR3JhcGhPbkhvcml6b250YWwuaGFzKHJpZ2h0KSkge1xuICAgICAgICAgICAgc3ViR3JhcGhPbkhvcml6b250YWwuZ2V0KHJpZ2h0KS5wdXNoKGxlZnQpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzdWJHcmFwaE9uSG9yaXpvbnRhbC5zZXQocmlnaHQsIFtsZWZ0XSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciB0b3AgPSBub2RlVG9EdW1teUZvckhvcml6b250YWxBbGlnbm1lbnQuaGFzKGNvbnN0cmFpbnQudG9wKSA/IG5vZGVUb0R1bW15Rm9ySG9yaXpvbnRhbEFsaWdubWVudC5nZXQoY29uc3RyYWludC50b3ApIDogY29uc3RyYWludC50b3A7XG4gICAgICAgICAgdmFyIGJvdHRvbSA9IG5vZGVUb0R1bW15Rm9ySG9yaXpvbnRhbEFsaWdubWVudC5oYXMoY29uc3RyYWludC5ib3R0b20pID8gbm9kZVRvRHVtbXlGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChjb25zdHJhaW50LmJvdHRvbSkgOiBjb25zdHJhaW50LmJvdHRvbTtcbiAgICAgICAgICBpZiAoc3ViR3JhcGhPblZlcnRpY2FsLmhhcyh0b3ApKSB7XG4gICAgICAgICAgICBzdWJHcmFwaE9uVmVydGljYWwuZ2V0KHRvcCkucHVzaChib3R0b20pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzdWJHcmFwaE9uVmVydGljYWwuc2V0KHRvcCwgW2JvdHRvbV0pO1xuICAgICAgICAgIH1cbiAgICAgICAgICBpZiAoc3ViR3JhcGhPblZlcnRpY2FsLmhhcyhib3R0b20pKSB7XG4gICAgICAgICAgICBzdWJHcmFwaE9uVmVydGljYWwuZ2V0KGJvdHRvbSkucHVzaCh0b3ApO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBzdWJHcmFwaE9uVmVydGljYWwuc2V0KGJvdHRvbSwgW3RvcF0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG5cbiAgICAgIC8vIGZ1bmN0aW9uIHRvIGNvbnN0cnVjdCBjb21wb25lbnRzIGZyb20gYSBnaXZlbiBncmFwaCBcbiAgICAgIC8vIGFsc28gcmV0dXJucyBhbiBhcnJheSB0aGF0IGtlZXBzIHdoZXRoZXIgZWFjaCBjb21wb25lbnQgY29udGFpbnMgZml4ZWQgbm9kZVxuICAgICAgdmFyIGNvbnN0cnVjdENvbXBvbmVudHMgPSBmdW5jdGlvbiBjb25zdHJ1Y3RDb21wb25lbnRzKGdyYXBoLCBmaXhlZE5vZGVzKSB7XG4gICAgICAgIHZhciBjb21wb25lbnRzID0gW107XG4gICAgICAgIHZhciBpc0ZpeGVkID0gW107XG4gICAgICAgIHZhciBxdWV1ZSA9IG5ldyBMaW5rZWRMaXN0KCk7XG4gICAgICAgIHZhciB2aXNpdGVkID0gbmV3IFNldCgpO1xuICAgICAgICB2YXIgY291bnQgPSAwO1xuXG4gICAgICAgIGdyYXBoLmZvckVhY2goZnVuY3Rpb24gKHZhbHVlLCBrZXkpIHtcbiAgICAgICAgICBpZiAoIXZpc2l0ZWQuaGFzKGtleSkpIHtcbiAgICAgICAgICAgIGNvbXBvbmVudHNbY291bnRdID0gW107XG4gICAgICAgICAgICBpc0ZpeGVkW2NvdW50XSA9IGZhbHNlO1xuICAgICAgICAgICAgdmFyIGN1cnJlbnROb2RlID0ga2V5O1xuICAgICAgICAgICAgcXVldWUucHVzaChjdXJyZW50Tm9kZSk7XG4gICAgICAgICAgICB2aXNpdGVkLmFkZChjdXJyZW50Tm9kZSk7XG4gICAgICAgICAgICBjb21wb25lbnRzW2NvdW50XS5wdXNoKGN1cnJlbnROb2RlKTtcblxuICAgICAgICAgICAgd2hpbGUgKHF1ZXVlLmxlbmd0aCAhPSAwKSB7XG4gICAgICAgICAgICAgIGN1cnJlbnROb2RlID0gcXVldWUuc2hpZnQoKTtcbiAgICAgICAgICAgICAgaWYgKGZpeGVkTm9kZXMuaGFzKGN1cnJlbnROb2RlKSkge1xuICAgICAgICAgICAgICAgIGlzRml4ZWRbY291bnRdID0gdHJ1ZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgbmVpZ2hib3JzID0gZ3JhcGguZ2V0KGN1cnJlbnROb2RlKTtcbiAgICAgICAgICAgICAgbmVpZ2hib3JzLmZvckVhY2goZnVuY3Rpb24gKG5laWdoYm9yKSB7XG4gICAgICAgICAgICAgICAgaWYgKCF2aXNpdGVkLmhhcyhuZWlnaGJvcikpIHtcbiAgICAgICAgICAgICAgICAgIHF1ZXVlLnB1c2gobmVpZ2hib3IpO1xuICAgICAgICAgICAgICAgICAgdmlzaXRlZC5hZGQobmVpZ2hib3IpO1xuICAgICAgICAgICAgICAgICAgY29tcG9uZW50c1tjb3VudF0ucHVzaChuZWlnaGJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvdW50Kys7XG4gICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICByZXR1cm4geyBjb21wb25lbnRzOiBjb21wb25lbnRzLCBpc0ZpeGVkOiBpc0ZpeGVkIH07XG4gICAgICB9O1xuXG4gICAgICB2YXIgcmVzdWx0T25Ib3Jpem9udGFsID0gY29uc3RydWN0Q29tcG9uZW50cyhzdWJHcmFwaE9uSG9yaXpvbnRhbCwgc2VsZi5maXhlZE5vZGVzT25Ib3Jpem9udGFsKTtcbiAgICAgIHRoaXMuY29tcG9uZW50c09uSG9yaXpvbnRhbCA9IHJlc3VsdE9uSG9yaXp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CkpIHtcbiAgICAgICAgICAgIHNlbGYuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChub2RlSWQpLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICBzZWxmLmlkVG9Ob2RlTWFwLmdldChub2RlSWQpLmRpc3BsYWNlbWVudFkgPSBkaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc2VsZi5pZFRvTm9kZU1hcC5nZXQobm9kZUlkKS5kaXNwbGFjZW1lbnRZID0gZGlzcGxhY2VtZW50O1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSk7XG4gICAgfSBlbHNlIHtcbiAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5jb21wb25lbnRzT25Ib3Jpem9udGFsLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBjb21wb25lbnQgPSB0aGlzLmNvbXBvbmVudHNPbkhvcml6b250YWxbaV07XG4gICAgICAgIGlmICh0aGlzLmZpeGVkQ29tcG9uZW50c09uSG9yaXpvbnRhbFtpXSkge1xuICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgY29tcG9uZW50Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50Lmhhcyhjb21wb25lbnRbal0pKSB7XG4gICAgICAgICAgICAgIHRoaXMuZHVtbXlUb05vZGVGb3JWZXJ0aWNhbEFsaWdubWVudC5nZXQoY29tcG9uZW50W2pdKS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmlkVG9Ob2RlTWFwLmdldChub2RlSWQpLmRpc3BsYWNlbWVudFggPSAwO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRoaXMuaWRUb05vZGVNYXAuZ2V0KGNvbXBvbmVudFtqXSkuZGlzcGxhY2VtZW50WCA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBzdW0gPSAwO1xuICAgICAgICAgIHZhciBjb3VudCA9IDA7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9yVmVydGljYWxBbGlnbm1lbnQuaGFzKGNvbXBvbmVudFtqXSkpIHtcbiAgICAgICAgICAgICAgdmFyIGFjdHVhbE5vZGVzID0gdGhpcy5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChjb21wb25lbnRbal0pO1xuICAgICAgICAgICAgICBzdW0gKz0gYWN0dWFsTm9kZXMubGVuZ3RoICogdGhpcy5pZFRvTm9kZU1hcC5nZXQoYWN0dWFsTm9kZXNbMF0pLmRpc3BsYWNlbWVudFg7XG4gICAgICAgICAgICAgIGNvdW50ICs9IGFjdHVhbE5vZGVzLmxlbmd0aDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHN1bSArPSB0aGlzLmlkVG9Ob2RlTWFwLmdldChjb21wb25lbnRbal0pLmRpc3BsYWNlbWVudFg7XG4gICAgICAgICAgICAgIGNvdW50Kys7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBhdmVyYWdlRGlzcGxhY2VtZW50ID0gc3VtIC8gY291bnQ7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9yVmVydGljYWxBbGlnbm1lbnQuaGFzKGNvbXBvbmVudFtqXSkpIHtcbiAgICAgICAgICAgICAgdGhpcy5kdW1teVRvTm9kZUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChjb21wb25lbnRbal0pLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaWRUb05vZGVNYXAuZ2V0KG5vZGVJZCkuZGlzcGxhY2VtZW50WCA9IGF2ZXJhZ2VEaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5pZFRvTm9kZU1hcC5nZXQoY29tcG9uZW50W2pdKS5kaXNwbGFjZW1lbnRYID0gYXZlcmFnZURpc3BsYWNlbWVudDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzLmNvbXBvbmVudHNPblZlcnRpY2FsLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBjb21wb25lbnQgPSB0aGlzLmNvbXBvbmVudHNPblZlcnRpY2FsW2ldO1xuICAgICAgICBpZiAodGhpcy5maXhlZENvbXBvbmVudHNPblZlcnRpY2FsW2ldKSB7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5oYXMoY29tcG9uZW50W2pdKSkge1xuICAgICAgICAgICAgICB0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5nZXQoY29tcG9uZW50W2pdKS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgICBzZWxmLmlkVG9Ob2RlTWFwLmdldChub2RlSWQpLmRpc3BsYWNlbWVudFkgPSAwO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHRoaXMuaWRUb05vZGVNYXAuZ2V0KGNvbXBvbmVudFtqXSkuZGlzcGxhY2VtZW50WSA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBzdW0gPSAwO1xuICAgICAgICAgIHZhciBjb3VudCA9IDA7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb25lbnQubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5oYXMoY29tcG9uZW50W2pdKSkge1xuICAgICAgICAgICAgICB2YXIgYWN0dWFsTm9kZXMgPSB0aGlzLmR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5nZXQoY29tcG9uZW50W2pdKTtcbiAgICAgICAgICAgICAgc3VtICs9IGFjdHVhbE5vZGVzLmxlbmd0aCAqIHRoaXMuaWRUb05vZGVNYXAuZ2V0KGFjdHVhbE5vZGVzWzBdKS5kaXNwbGFjZW1lbnRZO1xuICAgICAgICAgICAgICBjb3VudCArPSBhY3R1YWxOb2Rlcy5sZW5ndGg7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzdW0gKz0gdGhpcy5pZFRvTm9kZU1hcC5nZXQoY29tcG9uZW50W2pdKS5kaXNwbGFjZW1lbnRZO1xuICAgICAgICAgICAgICBjb3VudCsrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgYXZlcmFnZURpc3BsYWNlbWVudCA9IHN1bSAvIGNvdW50O1xuICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgY29tcG9uZW50Lmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5kdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbn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IChjb250cm9sUmVnaW9uc1swXSA9PSAwICYmIGNvbnRyb2xSZWdpb25zWzFdID09IDApIHtcbiAgICAgICAgO1xuICAgICAgICBpZiAocmFuZG9tID09IDApIHtcbiAgICAgICAgICBncmlkRm9yUHJ1bmVkTm9kZSA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZ3JpZEZvclBydW5lZE5vZGUgPSAxO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKGNvbnRyb2xSZWdpb25zWzBdID09IDAgJiYgY29udHJvbFJlZ2lvbnNbMl0gPT0gMCkge1xuICAgICAgICBpZiAocmFuZG9tID09IDApIHtcbiAgICAgICAgICBncmlkRm9yUHJ1bmVkTm9kZSA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZ3JpZEZvclBydW5lZE5vZGUgPSAyO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKGNvbnRyb2xSZWdpb25zWzBdID09IDAgJiYgY29udHJvbFJlZ2lvbnNbM10gPT0gMCkge1xuICAgICAgICBpZiAocmFuZG9tID09IDApIHtcbiAgICAgICAgICBncmlkRm9yUHJ1bmVkTm9kZSA9IDA7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZ3JpZEZvclBydW5lZE5vZGUgPSAzO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKGNvbnRyb2xSZWdpb25zWzFdID09IDAgJiYgY29udHJvbFJlZ2lvbnNbMl0gPT0gMCkge1xuICAgICAgICBpZiAocmFuZG9tID09IDApIHtcbiAgICAgICAgICBncmlkRm9yUHJ1bmVkTm9kZSA9IDE7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZ3JpZEZvclBydW5lZE5vZGUgPSAyO1xuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKGNvbnRyb2xSZWdpb25zWzFdID09IDAgJiYgY29udHJvbFJlZ2lvbnNbM10gPT0gMCkge1xuICAgICAgICBpZiAoc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JnRWxlKGZyb20pO1xuICAgICAgICB2YXIgaiA9IGluZGV4T2ZBcmdFbGUodG8pO1xuICAgICAgICByZXR1cm4gZGlzdFtpICogTiArIGpdO1xuICAgICAgfSxcbiAgICAgIHBhdGg6IGZ1bmN0aW9uIHBhdGgoZnJvbSwgdG8pIHtcbiAgICAgICAgdmFyIGkgPSBpbmRleE9mQXJnRWxlKGZyb20pO1xuICAgICAgICB2YXIgaiA9IGluZGV4T2ZBcmdFbGUodG8pO1xuICAgICAgICB2YXIgZnJvbU5vZGUgPSBhdEluZGV4KGkpO1xuXG4gICAgICAgIGlmIChpID09PSBqKSB7XG4gICAgICAgICAgcmV0dXJuIGZyb21Ob2RlLmNvbGxlY3Rpb24oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChuZXh0W2kgKiBOICsgal0gPT0gbnVsbCkge1xuICAgICAgICAgIHJldHVybiBjeS5jb2xsZWN0aW9uKCk7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcGF0aCA9IGN5LmNvbGxlY3Rpb24oKTtcbiAgICAgICAgdmFyIHByZXYgPSBpO1xuICAgICAgICB2YXIgZWRnZTtcbiAgICAgICAgcGF0aC5tZXJnZShmcm9tTm9kZSk7XG5cbiAgICAgICAgd2hpbGUgKGkgIT09IGopIHtcbiAgICAgICAgICBwcmV2ID0gaTtcbiAgICAgICAgICBpID0gbmV4dFtpICogTiArIGpdO1xuICAgICAgICAgIGVkZ2UgPSBlZGdlTmV4dFtwcmV2ICogTiArIGldO1xuICAgICAgICAgIHBhdGgubWVyZ2UoZWRnZSk7XG4gICAgICAgICAgcGF0aC5tZXJnZShhdEluZGV4KGkpKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBwYXRoO1xuICAgICAgfVxuICAgIH07XG4gICAgcmV0dXJuIHJlcztcbiAgfSAvLyBmbG95ZFdhcnNoYWxsXG5cbn07IC8vIGVsZXNmblxuXG52YXIgYmVsbG1hbkZvcmREZWZhdWx0cyA9IGRlZmF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lID0gdHJ1ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAob3B0aW9ucy5maW5kTmVnYXRpdmVXZWlnaHRDeWNsZXMgIT09IGZhbHNlKSB7XG4gICAgICAgICAgICB2YXIgbmVnYXRpdmVOb2RlcyA9IFtdO1xuXG4gICAgICAgICAgICBpZiAoc3JjRGlzdCArIF93ZWlnaHQyIDwgdGd0RGlzdCkge1xuICAgICAgICAgICAgICBuZWdhdGl2ZU5vZGVzLnB1c2goX3NyYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghZGlyZWN0ZWQgJiYgdGd0RGlzdCArIF93ZWlnaHQyIDwgc3JjRGlzdCkge1xuICAgICAgICAgICAgICBuZWdhdGl2ZU5vZGVzLnB1c2goX3RndCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBudW1OZWdhdGl2ZU5vZGVzID0gbmVnYXRpdmVOb2Rlcy5sZW5ndGg7XG5cbiAgICAgICAgICAgIGZvciAodmFyIG4gPSAwOyBuIDwgbnVtTmVnYXRpdmVOb2RlczsgbisrKSB7XG4gICAgICAgICAgICAgIHZhciBzdGFydCA9IG5lZ2F0aXZlTm9kZXNbbl07XG4gICAgICAgICAgICAgIHZhciBjeWNsZSA9IFtzdGFydF07XG4gICAgICAgICAgICAgIGN5Y2xlLnB1c2goZ2V0SW5mbyhzdGFydCkuZWRnZSk7XG4gICAgICAgICAgICAgIHZhciBfbm9kZSA9IGdldEluZm8oc3RhcnQpLnByZWQ7XG5cbiAgICAgICAgICAgICAgd2hpbGUgKGN5Y2xlLmluZGV4T2YoX25vZGUpID09PSAtMSkge1xuICAgICAgICAgICAgICAgIGN5Y2xlLnB1c2goX25vZGUpO1xuICAgICAgICAgICAgICAgIGN5Y2xlLnB1c2goZ2V0SW5mbyhfbm9kZSkuZWRnZSk7XG4gICAgICAgICAgICAgICAgX25vZGUgPSBnZXRJbmZvKF9ub2RlKS5wcmVkO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgY3ljbGUgPSBjeWNsZS5zbGljZShjeWNsZS5pbmRleE9mKF9ub2RlKSk7XG4gICAgICAgICAgICAgIHZhciBzbWFsbGVzdElkID0gY3ljbGVbMF0uaWQoKTtcbiAgICAgICAgICAgICAgdmFyIHNtYWxsZXN0SW5kZXggPSAwO1xuXG4gICAgICAgICAgICAgIGZvciAodmFyIGMgPSAyOyBjIDwgY3ljbGUubGVuZ3RoOyBjICs9IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAoY3ljbGVbY10uaWQoKSA8IHNtYWxsZXN0SWQpIHtcbiAgICAgICAgICAgICAgICAgIHNtYWxsZXN0SWQgPSBjeWNsZVtjXS5pZCgpO1xuICAgICAgICAgICAgICAgICAgc21hbGxlc3RJbmRleCA9IGM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgY3ljbGUgPSBjeWNsZS5zbGljZShzbWFsbGVzdEluZGV4KS5jb25jYXQoY3ljbGUuc2xpY2UoMCwgc21hbGxlc3RJbmRleCkpO1xuICAgICAgICAgICAgICBjeWNsZS5wdXNoKGN5Y2xlWzBdKTtcbiAgICAgICAgICAgICAgdmFyIGN5Y2xlSWQgPSBjeWNsZS5tYXAoZnVuY3Rpb24gKGVsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVsLmlkKCk7XG4gICAgICAgICAgICAgIH0pLmpvaW4oXCIsXCIpO1xuXG4gICAgICAgICAgICAgIGlmIChuZWdhdGl2ZVdlaWdodEN5Y2xlSWRzLmluZGV4T2YoY3ljbGVJZCkgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgbmVnYXRpdmVXZWlnaHRDeWNsZXMucHVzaChlbGVzLnNwYXduKGN5Y2xlKSk7XG4gICAgICAgICAgICAgICAgbmVnYXRpdmVXZWlnaHRDeWNsZUlkcy5wdXNoKGN5Y2xlSWQpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9X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2VzIGEgZnVsbCBiYiAoeDEsIHkxLCB4MiwgeTIsIHcsIGgpIGZyb20gaW1wbGljaXQgcGFyYW1zXG5cbnZhciBtYWtlQm91bmRpbmdCb3ggPSBmdW5jdGlvbiBtYWtlQm91bmRpbmdCb3goYmIpIHtcbiAgaWYgKGJiID09IG51bGwpIHtcbiAgICByZXR1cm4ge1xuICAgICAgeDE6IEluZmluaXR5LFxuICAgICAgeTE6IEluZmluaXR5LFxuICAgICAgeDI6IC1JbmZpbml0eSxcbiAgICAgIHkyOiAtSW5maW5pdHksXG4gICAgICB3OiAwLFxuICAgICAgaDogMFxuICAgIH07XG4gIH0gZWxzZSBpZiAoYmIueDEgIT0gbnVsbCAmJiBiYi55MSAhPSBudWxsKSB7XG4gICAgaWYgKGJiLngyICE9IG51bGwgJiYgYmIueTIgIT0gbnVsbCAmJiBiYi54MiA+PSBiYi54MSAmJiBiYi55MiA+PSBiYi55MSkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgeDE6IGJiLngxLFxuICAgICAgICB5MTogYmIueTEsXG4gICAgICAgIHgyOiBiYi54MixcbiAgICAgICAgeTI6IGJiLnkyLFxuICAgICAgICB3OiBiYi54MiAtIGJiLngxLFxuICAgICAgICBoOiBiYi55MiAtIGJiLnkxXG4gICAgICB9O1xuICAgIH0gZWxzZSBpZiAoYmIudyAhPSBudWxsICYmIGJiLmggIT0gbnVsbCAmJiBiYi53ID49IDAgJiYgYmIuaCA+PSAwKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB4MTogYmIueDEsXG4gICAgICAgIHkxOiBiYi55MSxcbiAgICAgICAgeDI6IGJiLngxICsgYmIudyxcbiAgICAgICAgeTI6IGJiLnkxICsgYmIuaCxcbiAgICAgICAgdzogYmIudyxcbiAgICAgICAgaDogYmIuaFxuICAgICAgfTtcbiAgICB9XG4gIH1cbn07XG52YXIgY29weUJvdW5kaW5nQm94ID0gZnVuY3Rpb24gY29weUJvdW5kaW5nQm94KGJiKSB7XG4gI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AgICB2YXIgX3YgPSBRLnBvcCgpO1xuXG4gICAgICAgIFMucHVzaChfdik7XG5cbiAgICAgICAgaWYgKHdlaWdodGVkKSB7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBBW192XS5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgdmFyIHcgPSBBW192XVtqXTtcbiAgICAgICAgICAgIHZhciB2RWxlID0gY3kuZ2V0RWxlbWVudEJ5SWQoX3YpO1xuICAgICAgICAgICAgdmFyIGVkZ2UgPSB2b2lkIDA7XG5cbiAgICAgICAgICAgIGlmICh2RWxlLmVkZ2VzVG8odykubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICBlZGdlID0gdkVsZS5lZGdlc1RvKHcpWzBdO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZWRnZSA9IHcuZWRnZXNUbyh2RWxlKVswXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGVkZ2VXZWlnaHQgPSB3ZWlnaHQoZWRnZSk7XG4gICAgICAgICAgICB3ID0gdy5pZCgpO1xuXG4gICAgICAgICAgICBpZiAoZFt3XSA+IGRbX3ZdICsgZWRnZVdlaWdodCkge1xuICAgICAgICAgICAgICBkW3ddID0gZFtfdl0gKyBlZGdlV2VpZ2h0O1xuXG4gICAgICAgICAgICAgIGlmIChRLm5vZGVzLmluZGV4T2YodykgPCAwKSB7XG4gICAgICAgICAgICAgICAgLy9pZiB3IGlzIG5vdCBpbiBRXG4gICAgICAgICAgICAgICAgUS5wdXNoKHcpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSBwb3NpdGlvbiBpZiB3IGlzIGluIFFcbiAgICAgICAgICAgICAgICBRLnVwZGF0ZUl0ZW0odyk7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBnW3ddID0gMDtcbiAgICAgICAgICAgICAgUFt3XSA9IFtdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZFt3XSA9PSBkW192XSArIGVkZ2VXZWlnaHQpIHtcbiAgICAgICAgICAgICAgZ1t3XSA9IGdbd10gKyBnW192XTtcbiAgICAgICAgICAgICAgUFt3XS5wdXNoKF92KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZm9yICh2YXIgX2ogPSAwOyBfaiA8IEFbX3ZdLmxlbmd0aDsgX2orKykge1xuICAgICAgICAgICAgdmFyIF93ID0gQVtfdl1bX2pdLmlkKCk7XG5cbiAgICAgICAgICAgIGlmIChkW193XSA9PSBJbmZpbml0eSkge1xuICAgICAgICAgICAgICBRLnB1c2goX3cpO1xuICAgICAgICAgICAgICBkW193XSA9IGRbX3ZdICsgMTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGRbX3ddID09IGRbX3ZdICsgMSkge1xuICAgICAgICAgICAgICBnW193XSA9IGdbX3ddICsgZ1tfdl07XG5cbiAgICAgICAgICAgICAgUFtfd10ucHVzaChfdik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHZhciBlID0ge307XG5cbiAgICAgIGZvciAodmFyIF9pMiA9IDA7IF9pMiA8IFYubGVuZ3RoOyBfaTIrKykge1xuICAgICAgICBlW1ZbX2kyXS5pZCgpXSA9IDA7XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChTLmxlbmd0aCA+IDApIHtcbiAgICAgICAgdmFyIF93MiA9IFMucG9wKCk7XG5cbiAgICAgICAgZm9yICh2YXIgX2oyID0gMDsgX2oyIDwgUFtfdzJdLmxlbmd0aDsgX2oyKyspIHtcbiAgICAgICAgICB2YXIgX3YyID0gUFtfdzJdW19qMl07XG4gICAgICAgICAgZVtfdjJdID0gZVtfdjJdICsgZ1tfdjJdIC8gZ1tfdzJdICogKDEgKyBlW193Ml0pO1xuICAgICAgICB9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DAuMDtcblxuICAgICAgZm9yICh2YXIgX2ogPSAwOyBfaiA8IG47IF9qKyspIHtcbiAgICAgICAgb2xkW19qXSA9IFJbX2k4ICogbiArIF9qXTtcbiAgICAgICAgQVMgPSBBW19pOCAqIG4gKyBfal0gKyBTW19pOCAqIG4gKyBfal07XG5cbiAgICAgICAgaWYgKEFTID49IG1heCkge1xuICAgICAgICAgIG1heDIgPSBtYXg7XG4gICAgICAgICAgbWF4ID0gQVM7XG4gICAgICAgICAgbWF4SSA9IF9qO1xuICAgICAgICB9IGVsc2UgaWYgKEFTID4gbWF4Mikge1xuICAgICAgICAgIG1heDIgPSBBUztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBmb3IgKHZhciBfajIgPSAwOyBfajIgPCBuOyBfajIrKykge1xuICAgICAgICBSW19pOCAqIG4gKyBfajJdID0gKDEgLSBvcHRzLmRhbXBpbmcpICogKFNbX2k4ICogbiArIF9qMl0gLSBtYXgpICsgb3B0cy5kYW1waW5nICogb2xkW19qMl07XG4gICAgICB9XG5cbiAgICAgIFJbX2k4ICogbiArIG1heEldID0gKDEgLSBvcHRzLmRhbXBpbmcpICogKFNbX2k4ICogbiArIG1heEldIC0gbWF4MikgKyBvcHRzLmRhbXBpbmcgKiBvbGRbbWF4SV07XG4gICAgfSAvLyBVcGRhdGUgQSBhdmFpbGFiaWxpdHkgbWF0cml4XG5cblxuICAgIGZvciAodmFyIF9pOSA9IDA7IF9pOSA8IG47IF9pOSsrKSB7XG4gICAgICB2YXIgc3VtID0gMDtcblxuICAgICAgZm9yICh2YXIgX2ozID0gMDsgX2ozIDwgbjsgX2ozKyspIHtcbiAgICAgICAgb2xkW19qM10gPSBBW19qMyAqIG4gKyBfaTldO1xuICAgICAgICBScFtfajNdID0gTWF0aC5tYXgoMCwgUltfajMgKiBuICsgX2k5XSk7XG4gICAgICAgIHN1bSArPSBScFtfajNdO1xuICAgICAgfVxuXG4gICAgICBzdW0gLT0gUnBbX2k5XTtcbiAgICAgIF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RcblxuXG4gICAgICB2YXIgY2VudGVyID0gcHJvcGVydGllcy5jZW50ZXIgfHwgcHJvcGVydGllcy5jZW50cmU7XG5cbiAgICAgIGlmIChpc0NvcmUgJiYgY2VudGVyICE9IG51bGwpIHtcbiAgICAgICAgdmFyIGNlbnRlclBhbiA9IGN5LmdldENlbnRlclBhbihjZW50ZXIuZWxlcywgcHJvcGVydGllcy56b29tKTtcblxuICAgICAgICBpZiAoY2VudGVyUGFuICE9IG51bGwpIHtcbiAgICAgICAgICBwcm9wZXJ0aWVzLnBhbiA9IGNlbnRlclBhbjtcbiAgICAgICAgfVxuICAgICAgfSAvLyBvdmVycmlkZSBwYW4gJiB6b29tIHcvIGZpdCBpZiBzZXRcblxuXG4gICAgICBpZiAoaXNDb3JlICYmIHByb3BlcnRpZXMuZml0ICE9IG51bGwpIHtcbiAgICAgICAgdmFyIGZpdCA9IHByb3BlcnRpZXMuZml0O1xuICAgICAgICB2YXIgZml0VnAgPSBjeS5nZXRGaXRWaWV3cG9ydChmaXQuZWxlcyB8fCBmaXQuYm91bmRpbmdCb3gsIGZpdC5wYWRkaW5nKTtcblxuICAgICAgICBpZiAoZml0VnAgIT0gbnVsbCkge1xuICAgICAgICAgIHByb3BlcnRpZXMucGFuID0gZml0VnAucGFuO1xuICAgICAgICAgIHByb3BlcnRpZXMuem9vbSA9IGZpdFZwLnpvb207XG4gICAgICAgIH1cbiAgICAgIH0gLy8gb3ZlcnJpZGUgem9vbSAoJiBwb3RlbnRpYWxseSBwYW4pIHcvIHpvb20gb2JqIGlmIHNldFxuXG5cbiAgICAgIGlmIChpc0NvcmUgJiYgcGxhaW5PYmplY3QocHJvcGVydGllcy56b29tKSkge1xuICAgICAgICB2YXIgdnAgPSBjeS5nZXRab29tZWRWaWV3cG9ydChwcm9wZXJ0aWVzLnpvb20pO1xuXG4gICAgICAgIGlmICh2cCAhPSBudWxsKSB7XG4gICAgICAgICAgaWYgKHZwLnpvb21lZCkge1xuICAgICAgICAgICAgcHJvc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gICAgICAgICAgICBpZiAocC5zZXR0aW5nVHJpZ2dlcnNFdmVudCkge1xuICAgICAgICAgICAgICBzZWxmW3AudHJpZ2dlckZuTmFtZV0ocC5zZXR0aW5nRXZlbnQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyAuZGF0YSh7ICdmb28nOiAnYmFyJyB9KVxuXG4gICAgICB9IGVsc2UgaWYgKHAuYWxsb3dTZXR0aW5nICYmIHBsYWluT2JqZWN0KG5hbWUpKSB7XG4gICAgICAgIC8vIGV4dGVuZFxuICAgICAgICB2YXIgb2JqID0gbmFtZTtcbiAgICAgICAgdmFyIGssIHY7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMob2JqKTtcbiAgICAgICAgcC5iZWZvcmVTZXQoc2VsZiwgb2JqKTtcblxuICAgICAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwga2V5cy5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICBrID0ga2V5c1tfaV07XG4gICAgICAgICAgdiA9IG9ialtrXTtcblxuICAgICAgICAgIHZhciBfdmFsaWQgPSAhcC5pbW11dGFibGVLZXlzW2tdO1xuXG4gICAgICAgICAgaWYgKF92YWxpZCkge1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBhbGwubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgdmFyIF9lbGUgPSBhbGxbal07XG5cbiAgICAgICAgICAgICAgaWYgKHAuY2FuU2V0KF9lbGUpKSB7XG4gICAgICAgICAgICAgICAgX2VsZS5fcHJpdmF0ZVtwLmZpZWxkXVtrXSA9IHY7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gLy8gdXBkYXRlIG1hcHBlcnMgaWYgYXNrZWRcblxuXG4gICAgICAgIGlmIChwLnVwZGF0ZVN0eWxlKSB7XG4gICAgICAgICAgc2VsZi51cGRhdGVTdHlsZSgpO1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AgICAgIGlmICh2YWxpZCkge1xuICAgICAgICAgICAgZm9yICh2YXIgaV9hID0gMCwgbF9hID0gYWxsLmxlbmd0aDsgaV9hIDwgbF9hOyBpX2ErKykge1xuICAgICAgICAgICAgICBhbGxbaV9hXS5fcHJpdmF0ZVtwLmZpZWxkXVtrZXldID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChwLnRyaWdnZXJFdmVudCkge1xuICAgICAgICAgIHNlbGZbcC50cmlnZ2VyRm5OYW1lXShwLmV2ZW50KTtcbiAgICAgICAgfSAvLyAucmVtb3ZlRGF0YSgpXG5cbiAgICAgIH0gZWxzZSBpZiAobmFtZXMgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAvLyB0aGVuIGRlbGV0ZSBhbGwga2V5c1xuICAgICAgICBmb3IgKHZhciBfaV9hID0gMCwgX2xfYSA9IGFsbC5sZW5ndGg7IF9pX2EgPCBfbF9hOyBfaV9hKyspIHtcbiAgICAgICAgICB2YXIgX3ByaXZhdGVGaWVsZHMgPSBhbGxbX2lfYV0uX3ByaXZhdGVbcC5maWVsZF07XG5cbiAgICAgICAgICB2YXIgX2tleXMgPSBPYmplY3Qua2V5cyhfcHJpdmF0ZUZpZWxkcyk7XG5cbiAgICAgICAgICBmb3IgKHZhciBfaTIgPSAwOyBfaTIgPCBfa2V5cy5sZW5ndGg7IF9pMisrKSB7XG4gICAgICAgICAgICB2YXIgX2tleSA9IF9rZXlzW19pMl07XG4gICAgICAgICAgICB2YXIgdmFsaWRLZXlUb0RlbGV0ZSA9ICFwLmltbXV0YWJsZUtleXNbX2tleV07XG5cbiAgICAgICAgICAgIGlmICh2YWxpZEtleVRvRGVsZXRlKSB7XG4gICAgICAgICAgICAgIF9wcml2YXRlRmllbGRzW19rZXldID0gdW5kZWZpbmVkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIG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dHlwZSA9IGNoZWNrLnR5cGUsXG4gICAgICAgIHZhbHVlID0gY2hlY2sudmFsdWU7XG5cbiAgICBzd2l0Y2ggKHR5cGUpIHtcbiAgICAgIGNhc2UgVHlwZS5HUk9VUDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBncm91cCA9IGNsZWFuKHZhbHVlKTtcbiAgICAgICAgICByZXR1cm4gZ3JvdXAuc3Vic3RyaW5nKDAsIGdyb3VwLmxlbmd0aCAtIDEpO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgVHlwZS5EQVRBX0NPTVBBUkU6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgZmllbGQgPSBjaGVjay5maWVsZCxcbiAgICAgICAgICAgICAgb3BlcmF0b3IgPSBjaGVjay5vcGVyYXRvcjtcbiAgICAgICAgICByZXR1cm4gJ1snICsgZmllbGQgKyBzcGFjZShjbGVhbihvcGVyYXRvcikpICsgY2xlYW5WYWwodmFsdWUpICsgJ10nO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgVHlwZS5EQVRBX0JPT0w6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX29wZXJhdG9yID0gY2hlY2sub3BlcmF0b3IsXG4gICAgICAgICAgICAgIF9maWVsZCA9IGNoZWNrLmZpZWxkO1xuICAgICAgICAgIHJldHVybiAnWycgKyBjbGVhbihfb3BlcmF0b3IpICsgX2ZpZWxkICsgJ10nO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgVHlwZS5EQVRBX0VYSVNUOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIF9maWVsZDIgPSBjaGVjay5maWVsZDtcbiAgICAgICAgICByZXR1cm4gJ1snICsgX2ZpZWxkMiArICddJztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFR5cGUuTUVUQV9DT01QQVJFOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIF9vcGVyYXRvcjIgPSBjaGVjay5vcGVyYXRvcixcbiAgICAgICAgICAgICAgX2Zp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aW9uXG4gICAgICBpZiAoc2V0dGluZykge1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICB2YXIgX2VsZTIgPSB0aGlzW2ldO1xuICAgICAgICAgIHZhciBwYXJlbnQgPSBoYXNDb21wb3VuZE5vZGVzID8gX2VsZTIucGFyZW50KCkgOiBudWxsO1xuICAgICAgICAgIHZhciBoYXNQYXJlbnQgPSBwYXJlbnQgJiYgcGFyZW50Lmxlbmd0aCA+IDA7XG4gICAgICAgICAgdmFyIHJlbGF0aXZlVG9QYXJlbnQgPSBoYXNQYXJlbnQ7XG5cbiAgICAgICAgICBpZiAoaGFzUGFyZW50KSB7XG4gICAgICAgICAgICBwYXJlbnQgPSBwYXJlbnRbMF07XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG9yaWdpbiA9IHJlbGF0aXZlVG9QYXJlbnQgPyBwYXJlbnQucG9zaXRpb24oKSA6IHtcbiAgICAgICAgICAgIHg6IDAsXG4gICAgICAgICAgICB5OiAwXG4gICAgICAgICAgfTtcblxuICAgICAgICAgIGlmICh2YWwgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgLy8gc2V0IG9uZSBkaW1lbnNpb25cbiAgICAgICAgICAgIF9lbGUyLnBvc2l0aW9uKGRpbSwgdmFsICsgb3JpZ2luW2RpbV0pO1xuICAgICAgICAgIH0gZWxzZSBpZiAocHBvcyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAvLyBzZXQgd2hvbGUgcG9zaXRpb25cbiAgICAgICAgICAgIF9lbGUyLnBvc2l0aW9uKHtcbiAgICAgICAgICAgICAgeDogcHBvcy54ICsgb3JpZ2luLngsXG4gICAgICAgICAgICAgIHk6IHBwb3MueSArIG9yaWdpbi55XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIC8vIGdldHRpbmdcbiAgICAgICAgdmFyIHBvcyA9IGVsZS5wb3NpdGlvbigpO1xuXG4gICAgICAgIHZhciBfcGFyZW50ID0gaGFzQ29tcG91bmROb2RlcyA/IGVsZS5wYXJlbnQoKSA6IG51bGw7XG5cbiAgICAgICAgdmFyIF9oYXNQYXJlbnQgPSBfcGFyZW50ICYmIF9wYXJlbnQubGVuZ3RoID4gMDtcblxuICAgICAgICB2YXIgX3JlbGF0aXZlVG9QYXJlbnQgPSBfaGFzUGFyZW50O1xuXG4gICAgICAgIGlmIChfaGFzUGFyZW50KSB7XG4gICAgICAgICAgX3BhcmVudCA9IF9wYXJlbnRbMF07XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgX29yaWdpbiA9IF9yZWxhdGl2ZVRvUGFyZW50ID8gX3BhcmVudC5wb3NpdGlvbigpIDoge1xuICAgICAgICAgIHg6IDAsXG4gICAgICAgICAgeTogMFxuICAgICAgICB9O1xuXG4gICAgICAgIHBwb3MgPSB7XG4gICAgICAgICAgeDogcG9zLnggLSBfb3JpZ2luLngsXG4gICAgICAgICAgeTogcG9zLnkgLSBfb3JpZ2luLnlcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoZGltID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAvLyB0aGVuIHJldHVybiB0aGUgd2hvbGUgcmVuZGVyZWQgcG9zaXRpb25cbiAgICAgICAgICByZXR1cm4gcHBvcztcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvLyB0aGVuIHJldHVybiB0aGUgc3BlY2lmaWVkIGRpbWVuc2lvblxuICAgICAgICAgIHJldHVybiBwcG9zW2RpbV07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9IGVsc2UgaWYgKCFzZXR0aW5nKSB7XG4gICAgICByZXR1cm4gdW5kZWZpbmVkOyAvLyBmb3IgZW1wdHkgY29sbGVjdGlvbiBjYXNlXG4gICAgfVxuXG4gICAgcmV0dXJuIHRoaXM7IC8vIGNoYWluaW5nXG4gIH1cb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ICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ3JpZ2h0JzpcbiAgICAgICAgICAgIHhvID0gbHgxO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBzd2l0Y2ggKHZhbGlnbi52YWx1ZSkge1xuICAgICAgICAgIGNhc2UgJ3RvcCc6XG4gICAgICAgICAgICB5byA9IGx5MjtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAnYm90dG9tJzpcbiAgICAgICAgICAgIHlvID0gbHkxO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgdmFyIHJvdGF0ZSA9IGZ1bmN0aW9uIHJvdGF0ZSh4LCB5KSB7XG4gICAgICAgIHggPSB4IC0geG87XG4gICAgICAgIHkgPSB5IC0geW87XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgeDogeCAqIGNvcyAtIHkgKiBzaW4gKyB4byxcbiAgICAgICAgICB5OiB4ICogc2luICsgeSAqIGNvcyArIHlvXG4gICAgICAgIH07XG4gICAgICB9O1xuXG4gICAgICB2YXIgcHgxeTEgPSByb3RhdGUobHgxLCBseTEpO1xuICAgICAgdmFyIHB4MXkyID0gcm90YXRlKGx4MSwgbHkyKTtcbiAgICAgIHZhciBweDJ5MSA9IHJvdGF0ZShseDIsIGx5MSk7XG4gICAgICB2YXIgcHgyeTIgPSByb3RhdGUobHgyLCBseTIpO1xuICAgICAgbHgxID0gTWF0aC5taW4ocHgxeTEueCwgcHgxeTIueCwgcHgyeTEueCwgcHgyeTIueCk7XG4gICAgICBseDIgPSBNYXRoLm1heChweDF5MS54LCBweDF5Mi54LCBweDJ5MS54LCBweDJ5Mi54KTtcbiAgICAgIGx5MSA9IE1hdGgubWluKHB4MXkxLnksIHB4MXkyLnksIHB4MnkxLnksIHB4MnkyLnkpO1xuICAgICAgbHkyID0gTWF0aC5tYXgocHgxeTEueSwgcHgxeTIueSwgcH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WSwgcnN0eWxlLm1pZFksIHJzdHlsZS50Z3RZKTsgLy8gdGFrZSBpbnRvIGFjY291bnQgZWRnZSB3aWR0aFxuXG4gICAgICAgIGV4MSAtPSB3SGFsZjtcbiAgICAgICAgZXgyICs9IHdIYWxmO1xuICAgICAgICBleTEgLT0gd0hhbGY7XG4gICAgICAgIGV5MiArPSB3SGFsZjtcbiAgICAgICAgdXBkYXRlQm91bmRzKGJvdW5kcywgZXgxLCBleTEsIGV4MiwgZXkyKTsgLy8gcHJlY2lzZSBlZGdlc1xuICAgICAgICAvLy8vLy8vLy8vLy8vLy8vXG5cbiAgICAgICAgaWYgKGN1cnZlU3R5bGUgPT09ICdoYXlzdGFjaycpIHtcbiAgICAgICAgICB2YXIgaHB0cyA9IHJzdHlsZS5oYXlzdGFja1B0cztcblxuICAgICAgICAgIGlmIChocHRzICYmIGhwdHMubGVuZ3RoID09PSAyKSB7XG4gICAgICAgICAgICBleDEgPSBocHRzWzBdLng7XG4gICAgICAgICAgICBleTEgPSBocHRzWzBdLnk7XG4gICAgICAgICAgICBleDIgPSBocHRzWzFdLng7XG4gICAgICAgICAgICBleTIgPSBocHRzWzFdLnk7XG5cbiAgICAgICAgICAgIGlmIChleDEgPiBleDIpIHtcbiAgICAgICAgICAgICAgdmFyIHRlbXAgPSBleDE7XG4gICAgICAgICAgICAgIGV4MSA9IGV4MjtcbiAgICAgICAgICAgICAgZXgyID0gdGVtcDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGV5MSA+IGV5Mikge1xuICAgICAgICAgICAgICB2YXIgX3RlbXAgPSBleTE7XG4gICAgICAgICAgICAgIGV5MSA9IGV5MjtcbiAgICAgICAgICAgICAgZXkyID0gX3RlbXA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHVwZGF0ZUJvdW5kcyhib3VuZHMsIGV4MSAtIHdIYWxmLCBleTEgLSB3SGFsZiwgZXgyICsgd0hhbGYsIGV5MiArIHdIYWxmKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAoY3VydmVTdHlsZSA9PT0gJ2JlemllcicgfHwgY3VydmVTdHlsZSA9PT0gJ3VuYnVuZGxlZC1iZXppZXInIHx8IGN1cnZlU3R5bGUgPT09ICdzZWdtZW50cycgfHwgY3VydmVTdHlsZSA9PT0gJ3RheGknKSB7XG4gICAgICAgICAgdmFyIHB0cztcblxuICAgICAgICAgIHN3aXRjaCAoY3VydmVTdHlsZSkge1xuICAgICAgICAgICAgY2FzZSAnYmV6aWVyJzpcbiAgICAgICAgICAgIGNhc2UgJ3VuYnVuZGxlZC1iZXppZXInOlxuICAgICAgICAgICAgICBwdHMgPSByc3R5bGUuYmV6aWVyUHRzO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnc2VnbWVudHMnOlxuICAgICAgICAgICAgY2FzZSAndGF4aSc6XG4gICAgICAgICAgICAgIHB0cyA9IHJzdHlsZS5saW5lUHRzO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAocHRzICE9IG51bGwpIHtcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgcHRzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgIHZhciBwdCA9IHB0c1tqXTtcbiAgICAgICAgICAgICAgZXgxID0gcHQueCAtIHdIYWxmO1xuICAgICAgICAgICAgICBleDIgPSBwdC54ICsgd0hhbGY7XG4gICAgICAgICAgICAgIGV5MSA9IHB0LnkgLSB3SGFsZjtcbiAgICAgICAgICAgICAgZXkyID0gcHQueSArIHdIYWxmO1xuICAgICAgICAgICAgICB1cGRhdGVCb3VuZHMoYm91bmRzLCBleDEsIGV5MSwgZXgyLCBleTIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyBiZXppZXItbGlrZSBvciBzZWdtZW50LWxpa2UgZWRnZVxuXG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBoZWFkbGVzcyBvciBzdHlsZSBkaXNhYmxlZFxuICAgICAgICAvLyBmYWxsYmFjayBvbiBzb3VyY2UgYW5kIHRhcmdldCBwb3NpdGlvbnNcbiAgICAgICAgLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vXG4gICAgICAgIHZhciBuMSA9IGVsZS5zb3VyY2UoKTtcbiAgICAgICAgdmFyIG4xcG9zID0gbjEucG9zaXRpb24oKTtcbiAgICAgICAgdmFyIG4yID0gZWxlLnRhcmdldCgpO1xuICAgICAgICB2YXIgbjJwb3MgPSBuMi5wb3NpdGlvbigpO1xuICAgICAgICBleDEgPSBuMXBvcy54O1xuICAgICAgICBleDIgPSBuMnBvcy54O1xuICAgICAgICBleTEgPSBuMXBvcy55O1xuICAgICAgICBleTIgPSBuMnBvcy55O1xuXG4gICAgICAgIGlmIChleDEgPiBleDIpIHtcbiAgICAgICAgICB2YXIgX3RlbXAyID0gZXgxO1xuICAgICAgICAgIGV4MSA9IGV4MjtcbiAgICAgICAgICBleDIgPSBfdGVtcDI7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZXkxID4gZXkyKSB7XG4gICAgICAgICAgdmFyIF90ZW1wMyA9IGV5MTtcbiAgICAgICAgICBleTEgPSBleTI7XG4gICAgICAgICAgZXkyID0gX3RlbXAzO1xuICAgICAgICB9IC8vIHRha2UgaW50byBhY2NvdW50IGVkZ2Ugd2lkdGhcblxuXG4gICAgICAgIGV4MSAtPSB3SGFsZjtcbiAgICAgICAgZXgyICs9IHdIYWxmO1xuICAgICAgICBleTEgLT0gd0hhbGY7XG4gICAgICAgIGV5MiArPSB3SGFsZjtcbiAgICAgICAgdXBkYXRlQm91bmRzKGJvdW5kcywgZXgxLCBleTEsIGV4MiwgZXkyKTtcbiAgICAgIH0gLy8gaGVhZGxlc3Mgb3Igc3R5bGUgZGlzYWJsZWRcblxuICAgIH0gLy8gZWRnZXNcbiAgICAvLyBoYW5kbG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cbiAgICAgIHJldHVybiBuZXdQb3M7XG4gICAgfSwgZ2V0TWVtb2l6ZUtleSk7XG5cbiAgICBpZiAob3B0aW9ucy5hbmltYXRlKSB7XG4gICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG5vZGVzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBub2RlID0gbm9kZXNbaV07XG4gICAgICAgIHZhciBuZXdQb3MgPSBnZXRGaW5hbFBvcyhub2RlLCBpKTtcbiAgICAgICAgdmFyIGFuaW1hdGVOb2RlID0gb3B0aW9ucy5hbmltYXRlRmlsdGVyID09IG51bGwgfHwgb3B0aW9ucy5hbmltYXRlRmlsdGVyKG5vZGUsIGkpO1xuXG4gICAgICAgIGlmIChhbmltYXRlTm9kZSkge1xuICAgICAgICAgIHZhciBhbmkgPSBub2RlLmFuaW1hdGlvbih7XG4gICAgICAgICAgICBwb3NpdGlvbjogbmV3UG9zLFxuICAgICAgICAgICAgZHVyYXRpb246IG9wdGlvbnMuYW5pbWF0aW9uRHVyYXRpb24sXG4gICAgICAgICAgICBlYXNpbmc6IG9wdGlvbnMuYW5pbWF0aW9uRWFzaW5nXG4gICAgICAgICAgfSk7XG4gICAgICAgICAgbGF5b3V0LmFuaW1hdGlvbnMucHVzaChhbmkpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIG5vZGUucG9zaXRpb24obmV3UG9zKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAob3B0aW9ucy5maXQpIHtcbiAgICAgICAgdmFyIGZpdEFuaSA9IGN5LmFuaW1hdGlvbih7XG4gICAgICAgICAgZml0OiB7XG4gICAgICAgICAgICBib3VuZGluZ0JveDogbGF5b3V0RWxlcy5ib3VuZGluZ0JveEF0KGdldEZpbmFsUG9zKSxcbiAgICAgICAgICAgIHBhZGRpbmc6IG9wdGlvbnMucGFkZGluZ1xuICAgICAgICAgIH0sXG4gICAgICAgICAgZHVyYXRpb246IG9wdGlvbnMuYW5pbWF0aW9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QpIHtcbiAgICAgICAgICBzcGVjLnRhcmdldCA9ICcnICsgdGd0OyAvLyBpZCBtdXN0IGJlIHN0cmluZ1xuXG4gICAgICAgICAgbW92ZSA9IHRydWU7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobW92ZSkge1xuICAgICAgICAgIGVsZSA9IGVsZS5tb3ZlKHNwZWMpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICAvLyBwYXJlbnQgaXMgaW1tdXRhYmxlIHZpYSBkYXRhKClcbiAgICAgICAgdmFyIG5ld1BhcmVudFZhbFNwZWNkID0gKCdwYXJlbnQnIGluIG9iai5kYXRhKTtcbiAgICAgICAgdmFyIHBhcmVudCA9IG9iai5kYXRhLnBhcmVudDtcblxuICAgICAgICBpZiAobmV3UGFyZW50VmFsU3BlY2QgJiYgKHBhcmVudCAhPSBudWxsIHx8IF9kYXRhMi5wYXJlbnQgIT0gbnVsbCkgJiYgcGFyZW50ICE9IF9kYXRhMi5wYXJlbnQpIHtcbiAgICAgICAgICBpZiAocGFyZW50ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIC8vIGNhbid0IHNldCB1bmRlZmluZWQgaW1wZXJhdGl2ZWx5LCBzbyB1c2UgbnVsbFxuICAgICAgICAgICAgcGFyZW50ID0gbnVsbDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAocGFyZW50ICE9IG51bGwpIHtcbiAgICAgICAgICAgIHBhcmVudCA9ICcnICsgcGFyZW50OyAvLyBpZCBtdXN0IGJlIHN0cmluZ1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGVsZSA9IGVsZS5tb3ZlKHtcbiAgICAgICAgICAgIHBhcmVudDogcGFyZW50XG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAob2JqLnBvc2l0aW9uKSB7XG4gICAgICBlbGUucG9zaXRpb24ob2JqLnBvc2l0aW9uKTtcbiAgICB9IC8vIGln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U7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIGZpZWxkV2lkdGggPSBwcm9wLmZpZWxkTWF4IC0gcHJvcC5maWVsZE1pbjtcblxuICAgICAgICAgIGlmIChmaWVsZFdpZHRoID09PSAwKSB7XG4gICAgICAgICAgICAvLyBzYWZldHkgY2hlY2sgLS0gbm90IHN0cmljdGx5IG5lY2Vzc2FyeSBhcyBubyBwcm9wcyBvZiB6ZXJvIHJhbmdlIHNob3VsZCBiZSBwYXNzZWQgaGVyZVxuICAgICAgICAgICAgcGVyY2VudCA9IDA7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHBlcmNlbnQgPSAoZmllbGRWYWwgLSBwcm9wLmZpZWxkTWluKSAvIGZpZWxkV2lkdGg7XG4gICAgICAgICAgfVxuICAgICAgICB9IC8vIG1ha2Ugc3VyZSB0byBib3VuZCBwZXJjZW50IHZhbHVlXG5cblxuICAgICAgICBpZiAocGVyY2VudCA8IDApIHtcbiAgICAgICAgICBwZXJjZW50ID0gMDtcbiAgICAgICAgfSBlbHNlIGlmIChwZXJjZW50ID4gMSkge1xuICAgICAgICAgIHBlcmNlbnQgPSAxO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKHR5cGUuY29sb3IpIHtcbiAgICAgICAgICB2YXIgcjEgPSBwcm9wLnZhbHVlTWluWzBdO1xuICAgICAgICAgIHZhciByMiA9IHByb3AudmFsdWVNYXhbMF07XG4gICAgICAgICAgdmFyIGcxID0gcHJvcC52YWx1ZU1pblsxXTtcbiAgICAgICAgICB2YXIgZzIgPSBwcm9wLnZhbHVlTWF4WzFdO1xuICAgICAgICAgIHZhciBiMSA9IHByb3AudmFsdWVNaW5bMl07XG4gICAgICAgICAgdmFyIGIyID0gcHJvcC52YWx1ZU1heFsyXTtcbiAgICAgICAgICB2YXIgYTEgPSBwcm9wLnZhbHVlTWluWzNdID09IG51bGwgPyAxIDogcHJvcC52YWx1ZU1pblszXTtcbiAgICAgICAgICB2YXIgYTIgPSBwcm9wLnZhbHVlTWF4WzNdID09IG51bGwgPyAxIDogcHJvcC52YWx1ZU1heFszXTtcbiAgICAgICAgICB2YXIgY2xyID0gW01hdGgucm91bmQocjEgKyAocjIgLSByMSkgKiBwZXJjZW50KSwgTWF0aC5yb3VuZChnMSArIChnMiAtIGcxKSAqIHBlcmNlbnQpLCBNYXRoLnJvdW5kKGIxICsgKGIyIC0gYjEpICogcGVyY2VudCksIE1hdGgucm91bmQoYTEgKyAoYTIgLSBhMSkgKiBwZXJjZW50KV07XG4gICAgICAgICAgZmxhdFByb3AgPSB7XG4gICAgICAgICAgICAvLyBjb2xvdXJzIGFyZSBzaW1wbGUsIHNvIGp1c3QgY3JlYXRlIHRoZSBmbGF0IHByb3BlcnR5IGluc3RlYWQgb2YgZXhwZW5zaXZlIHN0cmluZyBwYXJzaW5nXG4gICAgICAgICAgICBieXBhc3M6IHByb3AuYnlwYXNzLFxuICAgICAgICAgICAgLy8gd2UncmUgYSBieXBhc3MgaWYgdGhlIG1hcHBpbmcgcHJvcGVydHkgaXMgYSBieXBhc3NcbiAgICAgICAgICAgIG5hbWU6IHByb3AubmFtZSxcbiAgICAgICAgICAgIHZhbHVlOiBjbHIsXG4gICAgICAgICAgICBzdHJWYWx1ZTogJ3JnYignICsgY2xyWzBdICsgJywgJyArIGNsclsxXSArICcsICcgKyBjbHJbMl0gKyAnKSdcbiAgICAgICAgICB9O1xuICAgICAgICB9IGVsc2UgaWYgKHR5cGUubnVtYmVyKSB7XG4gICAgICAgICAgdmFyIGNhbGNWYWx1ZSA9IHByb3AudmFsdWVNaW4gKyAocHJvcC52YWx1ZU1heCAtIHByb3AudmFsdWVNaW4pICogcGVyY2VudDtcbiAgICAgICAgICBmbGF0UHJvcCA9IHRoaXMucGFyc2UocHJvcC5uYW1lLCBjYWxjVmFsdWUsIHByb3AuYnlwYXNzLCBmbGF0UHJvcE1hcHBpbmcpO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJ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YXRhKHByZWZpeCkge1xuICAgIHZhciBtYXBBcmcgPSBudW1iZXIkMSArICd8XFxcXHcrfCcgKyByZ2JhICsgJ3wnICsgaHNsYSArICd8JyArIGhleDMkMSArICd8JyArIGhleDYkMTtcbiAgICByZXR1cm4gJ14nICsgcHJlZml4ICsgJ1xcXFxzKlxcXFwoKFtcXFxcd1xcXFwuXSspXFxcXHMqXFxcXCxcXFxccyooJyArIG51bWJlciQxICsgJylcXFxccypcXFxcLFxcXFxzKignICsgbnVtYmVyJDEgKyAnKVxcXFxzKixcXFxccyooJyArIG1hcEFyZyArICcpXFxcXHMqXFxcXCxcXFxccyooJyArIG1hcEFyZyArICcpXFxcXCkkJztcbiAgfTtcblxuICB2YXIgdXJsUmVnZXhlcyA9IFsnXnVybFxcXFxzKlxcXFwoXFxcXHMqW1xcJ1wiXT8oLis/KVtcXCdcIl0/XFxcXHMqXFxcXCkkJywgJ14obm9uZSkkJywgJ14oLispJCddOyAvLyBlYWNoIHZpc3VhbCBzdHlsZSBwcm9wZXJ0eSBoYXMgYSB0eXBlIGFuZCBuZWVkcyB0byBiZSB2YWxpZGF0ZWQgYWNjb3JkaW5nIHRvIGl0XG5cbiAgc3R5Zm4kMi50eXBlcyA9IHtcbiAgICB0aW1lOiB7XG4gICAgICBudW1iZXI6IHRydWUsXG4gICAgICBtaW46IDAsXG4gICAgICB1bml0czogJ3N8bXMnLFxuICAgICAgaW1wbGljaXRVbml0czogJ21zJ1xuICAgIH0sXG4gICAgcGVyY2VudDoge1xuICAgICAgbnVtYmVyOiB0cnVlLFxuICAgICAgbWluOiAwLFxuICAgICAgbWF4OiAxMDAsXG4gICAgICB1bml0czogJyUnLFxuICAgICAgaW1wbGljaXRVbml0czogJyUnXG4gICAgfSxcbiAgICBwZXJjZW50YWdlczoge1xuICAgICAgbnVtYmVyOiB0cnVlLFxuICAgICAgbWluOiAwLFxuICAgICAgbWF4OiAxMDAsXG4gICAgICB1bml0czogJyUnLFxuICAgICAgaW1wbGljaXR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gICAgICBzaW5nbGVFbnVtOiB0cnVlLFxuICAgICAgdmFsaWRhdGU6IGZ1bmN0aW9uIHZhbGlkYXRlKHZhbEFyciwgdW5pdHNBcnIpIHtcbiAgICAgICAgc3dpdGNoICh2YWxBcnIubGVuZ3RoKSB7XG4gICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgLy8gY2FuIGJlICUgb3IgcHggb25seVxuICAgICAgICAgICAgcmV0dXJuIHVuaXRzQXJyWzBdICE9PSAnZGVnJyAmJiB1bml0c0FyclswXSAhPT0gJ3JhZCcgJiYgdW5pdHNBcnJbMV0gIT09ICdkZWcnICYmIHVuaXRzQXJyWzFdICE9PSAncmFkJztcblxuICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgIC8vIGNhbiBiZSBlbnVtLCBkZWcsIG9yIHJhZCBvbmx5XG4gICAgICAgICAgICByZXR1cm4gc3RyaW5nKHZhbEFyclswXSkgfHwgdW5pdHNBcnJbMF0gPT09ICdkZWcnIHx8IHVuaXRzQXJyWzBdID09PSAncmFkJztcblxuICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuICAgIGVhc2luZzoge1xuICAgICAgcmVnZXhlczogWydeKHNwcmluZylcXFxccypcXFxcKFxcXFxzKignICsgbnVtYmVyJDEgKyAnKVxcXFxzKixcXFxccyooJyArIG51bWJlciQxICsgJylcXFxccypcXFxcKSQnLCAnXihjdWJpYy1iZXppZXIpXFxcXHMqXFxcXChcXFxccyooJyArIG51bWJlciQxICsgJylcXFxccyosXFxcXHMqKCcgKyBudW1iZXIkMSArICcpXFxcXHMqLFxcXFxzKignICsgbnVtYmVyJDEgKyAnKVxcXFxzKixcXFxccyooJyArIG51bWJlciQxICsgJylcXFxccypcXFxcKSQnXSxcbiAgICAgIGVudW1zOiBbJ2xpbmVhcicsICdlYXNlJywgJ2Vhc2UtaW4nLCAnZWFzZS1vdXQ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uKCkge1xuICAgIHZhciBhcmdzID0gYXJndW1lbnRzO1xuICAgIHZhciBwYW4gPSB0aGlzLl9wcml2YXRlLnBhbjtcbiAgICB2YXIgZGltLCB2YWwsIGRpbXMsIHgsIHk7XG5cbiAgICBzd2l0Y2ggKGFyZ3MubGVuZ3RoKSB7XG4gICAgICBjYXNlIDA6XG4gICAgICAgIC8vIC5wYW4oKVxuICAgICAgICByZXR1cm4gcGFuO1xuXG4gICAgICBjYXNlIDE6XG4gICAgICAgIGlmIChzdHJpbmcoYXJnc1swXSkpIHtcbiAgICAgICAgICAvLyAucGFuKCd4JylcbiAgICAgICAgICBkaW0gPSBhcmdzWzBdO1xuICAgICAgICAgIHJldHVybiBwYW5bZGltXTtcbiAgICAgICAgfSBlbHNlIGlmIChwbGFpbk9iamVjdChhcmdzWzBdKSkge1xuICAgICAgICAgIC8vIC5wYW4oeyB4OiAwLCB5OiAxMDAgfSlcbiAgICAgICAgICBpZiAoIXRoaXMuX3ByaXZhdGUucGFubmluZ0VuYWJsZWQpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGRpbXMgPSBhcmdzWzBdO1xuICAgICAgICAgIHggPSBkaW1zLng7XG4gICAgICAgICAgeSA9IGRpbXMueTtcblxuICAgICAgICAgIGlmIChudW1iZXIkMSh4KSkge1xuICAgICAgICAgICAgcGFuLnggPSB4O1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChudW1iZXIkMSh5KSkge1xuICAgICAgICAgICAgcGFuLnkgPSB5O1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHRoaXMuZW1pdCgncGFuIHZpZXdwb3J0Jyk7XG4gICAgICAgIH1cblxuICAgICAgICBicmVhaztcblxuICAgICAgY2FzZSAyOlxuICAgICAgICAvLyAucGFuKCd4JywgMTAwKVxuICAgICAgICBpZiAoIXRoaXMuX3ByaXZhdGUucGFubmluZ0VuYWJsZWQpIHtcbiAgICAgICAgICByZXR1c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cbiAgICBpZiAobnVtYmVyJDEoZWxlbWVudHMpICYmIHBhZGRpbmcgPT09IHVuZGVmaW5lZCkge1xuICAgICAgLy8gZWxlbWVudHMgaXMgb3B0aW9uYWxcbiAgICAgIHBhZGRpbmcgPSBlbGVtZW50cztcbiAgICAgIGVsZW1lbnRzID0gdW5kZWZpbmVkO1xuICAgIH1cblxuICAgIGlmICghdGhpcy5fcHJpdmF0ZS5wYW5uaW5nRW5hYmxlZCB8fCAhdGhpcy5fcHJpdmF0ZS56b29taW5nRW5hYmxlZCkge1xuICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHZhciBiYjtcblxuICAgIGlmIChzdHJpbmcoZWxlbWVudHMpKSB7XG4gICAgICB2YXIgc2VsID0gZWxlbWVudHM7XG4gICAgICBlbGVtZW50cyA9IHRoaXMuJChzZWwpO1xuICAgIH0gZWxzZSBpZiAoYm91bmRpbmdCb3goZWxlbWVudHMpKSB7XG4gICAgICAvLyBhc3N1bWUgYmJcbiAgICAgIHZhciBiYmUgPSBlbGVtZW50cztcbiAgICAgIGJiID0ge1xuICAgICAgICB4MTogYmJlLngxLFxuICAgICAgICB5MTogYmJlLnkxLFxuICAgICAgICB4MjogYmJlLngyLFxuICAgICAgICB5MjogYmJlLnkyXG4gICAgICB9O1xuICAgICAgYmIudyA9IGJiLngyIC0gYmIueDE7XG4gICAgICBiYi5oID0gYmIueTIgLSBiYi55MTtcbiAgICB9IGVsc2UgaWYgKCFlbGVtZW50T3JDb2xsZWN0aW9uKGVsZW1lbnRzKSkge1xuICAgICAgZWxlbWVudHMgPSB0aGlzLm11dGFibGVFbGVtZW50cygpO1xuICAgIH1cblxuICAgIGlmIChlbGVtZW50T3JDb2xsZWN0aW9uKGVsZW1lbnRzKSAmJiBlbGVtZW50cy5lbXB0eSgpKSB7XG4gICAgICByZXR1cm47XG4gICAgfSAvLyBjYW4ndCBmaXQgdG8gbm90aGluZ1xuXG5cbiAgICBiYiA9IGJiIHx8IGVsZW1lbnRzLmJ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m9vbSA6IHpvb207XG4gICAgem9vbSA9IHpvb20gPCBfcC5taW5ab29tID8gX3AubWluWm9vbSA6IHpvb207IC8vIGNhbid0IHpvb20gd2l0aCBpbnZhbGlkIHBhcmFtc1xuXG4gICAgaWYgKGJhaWwgfHwgIW51bWJlciQxKHpvb20pIHx8IHpvb20gPT09IGN1cnJlbnRab29tIHx8IHBvcyAhPSBudWxsICYmICghbnVtYmVyJDEocG9zLngpIHx8ICFudW1iZXIkMShwb3MueSkpKSB7XG4gICAgICByZXR1cm4gbnVsbDtcbiAgICB9XG5cbiAgICBpZiAocG9zICE9IG51bGwpIHtcbiAgICAgIC8vIHNldCB6b29tIGFib3V0IHBvc2l0aW9uXG4gICAgICB2YXIgcGFuMSA9IGN1cnJlbnRQYW47XG4gICAgICB2YXIgem9vbTEgPSBjdXJyZW50Wm9vbTtcbiAgICAgIHZhciB6b29tMiA9IHpvb207XG4gICAgICB2YXIgcGFuMiA9IHtcbiAgICAgICAgeDogLXpvb20yIC8gem9vbTEgKiAocG9zLnggLSBwYW4xLngpICsgcG9zLngsXG4gICAgICAgIHk6IC16b29tMiAvIHpvb20xICogKHBvcy55IC0gcGFuMS55KSArIHBvcy55XG4gICAgICB9O1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgem9vbWVkOiB0cnVlLFxuICAgICAgICBwYW5uZWQ6IHRydWUsXG4gICAgICAgIHpvb206IHpvb20yLFxuICAgICAgICBwYW46IHBhbjJcbiAgICAgIH07XG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIGp1c3Qgc2V0IHRoZSB6b29tXG4gICAgICByZXR1cm4ge1xuICAgICAgICB6b29tZWQ6IHRydWUsXG4gICAgICAgIHBhbm5lZDogZmFsc2UsXG4gICAgICAgIHpvb206IHpvb20sXG4gICAgICAgIHBhbjogY3VycmVudFBhblxuICAgICAgfTtcbiAgICB9XG4gIH0sXG4gIHpvb206IGZ1bmN0aW9uIHpvb20ocGFyYW1zKSB7XG4gICAgaWYgKHBhcmFt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gICB9XG5cbiAgICBpZiAoIXBsYWluT2JqZWN0KG9wdHMucGFuKSkge1xuICAgICAgcGFuRGVmZCA9IGZhbHNlO1xuICAgIH1cblxuICAgIGlmICghem9vbURlZmQgJiYgIXBhbkRlZmQpIHtcbiAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIGlmICh6b29tRGVmZCkge1xuICAgICAgdmFyIHogPSBvcHRzLnpvb207XG5cbiAgICAgIGlmICh6IDwgX3AubWluWm9vbSB8fCB6ID4gX3AubWF4Wm9vbSB8fCAhX3Auem9vbWluZ0VuYWJsZWQpIHtcbiAgICAgICAgem9vbUZhaWxlZCA9IHRydWU7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBfcC56b29tID0gejtcbiAgICAgICAgZXZlbnRzLnB1c2goJ3pvb20nKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAocGFuRGVmZCAmJiAoIXpvb21GYWlsZWQgfHwgIW9wdHMuY2FuY2VsT25GYWlsZWRab29tKSAmJiBfcC5wYW5uaW5nRW5hYmxlZCkge1xuICAgICAgdmFyIHAgPSBvcHRzLnBhbjtcblxuICAgICAgaWYgKG51bWJlciQxKHAueCkpIHtcbiAgICAgICAgX3AucGFuLnggPSBwLng7XG4gICAgICAgIHBhbkZhaWxlZCA9IGZhbHNlO1xuICAgICAgfVxuXG4gICAgICBpZiAobnVtYmVyJDEocC55KSkge1xuICAgICAgICBfcC5wYW4ueSA9IHAueTtcbiAgICAgICAgcGFuRmFpbGVkID0gZmFsc2U7XG4gICAgICB9XG5cbiAgICAgIGlmICghcGFuRmFpbGVkKSB7XG4gICAgICAgIGV2ZW50cy5wdXNoKCdwYW4nKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoZXZlbnRzLmxlbmd0aCA+IDApIHtcbiAgICAgIGV2ZW50cy5wdXNoKCd2aWV3cG9ydCcpO1xuICAgICAgdGhpcy5lbWl0KGV2ZW50cy5qb2luKCcgJykpO1xuICAgICAgdGhpc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dCBoYW5kbGUgZWxlbWVudHMgd2l0aG91dCBhbiBJRCBhdHRyaWJ1dGUnKTtcbiAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBpZCA9ICcnICsganNvbi5kYXRhLmlkOyAvLyBpZCBtdXN0IGJlIHN0cmluZ1xuXG4gICAgICAgICAgICB2YXIgZWxlID0gY3kuZ2V0RWxlbWVudEJ5SWQoaWQpO1xuICAgICAgICAgICAgaWRJbkpzb25baWRdID0gdHJ1ZTtcblxuICAgICAgICAgICAgaWYgKGVsZS5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgICAgLy8gZXhpc3RpbmcgZWxlbWVudCBzaG91bGQgYmUgdXBkYXRlZFxuICAgICAgICAgICAgICB0b01vZC5wdXNoKHtcbiAgICAgICAgICAgICAgICBlbGU6IGVsZSxcbiAgICAgICAgICAgICAgICBqc29uOiBqc29uXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIHNob3VsZCBiZSBhZGRlZFxuICAgICAgICAgICAgICBpZiAoZ3IpIHtcbiAgICAgICAgICAgICAgICBqc29uLmdyb3VwID0gZ3I7XG4gICAgICAgICAgICAgICAgdG9BZGQucHVzaChqc29uKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0b0FkZC5wdXNoKGpzb24pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgY3kuYWRkKHRvQWRkKTtcblxuICAgICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCB0b01vZC5sZW5ndGg7IF9pKyspIHtcbiAgICAgICAgICAgIHZhciBfdG9Nb2QkX2kgPSB0b01vZFtfaV0sXG4gICAgICAgICAgICAgICAgX2VsZSA9IF90b01vZCRfaS5lbGUsXG4gICAgICAgICAgICAgICAgX2pzb24gPSBfdG9Nb2QkX2kuanNvbjtcblxuICAgICAgICAgICAgX2VsZS5qc29uKF9qc29uKTtcbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKGFycmF5KG9iai5lbGVtZW50cykpIHtcbiAgICAgICAgICAvLyBlbGVtZW50czogW11cbiAgICAgICAgICB1cGRhdGVFbGVzKG9iai5lbGVtZW50cyk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gZWxlbWVudHM6IHsgbm9kZXM6IFtdLCBlZGdlczogW10gfVxuICAgICAgICAgIHZhciBncnMgPSBbJ25vZGVzJywgJ2VkZ2VzJ107XG5cbiAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGdycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgdmFyIGdyID0gZ3JzW2ldO1xuICAgICAgICAgICAgdmFyIGVsZW1lbnRzID0gb2JqLmVsZW1lbnRzW2dyXTtcblxuICAgICAgICAgICAgaWYgKGFycmF5KGVsZW1lbnRzKSkge1xuICAgICAgICAgICAgICB1cGRhdGVFbGVzKGVsZW1lbnRzLCBncik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHBhcmVudHNUb1JlbW92ZSA9IGN5LmNvbGxlY3Rpb24oKTtcbiAgICAgICAgZWxlcy5maWx0ZXIoZnVuY3Rpb24gKGVsZSkge1xuICAgICAgICAgIHJldHVybiAhaWRJbkpzb25bZWxlLmlkKCldO1xuICAgICAgICB9KS5mb3JFYWNoKGZ1bmN0aW9uIChlbGUpIHtcbiAgICAgICAgICBpZiAoZWxlLmlzUGFyZW50KCkpIHtcbiAgICAgICAgICAgIHBhcmVudHNUb1JlbW92ZS5tZXJnZShlbGUpO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBlbGUucmVtb3ZlKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9KTsgLy8gc28gdGhhdCBjaGlsZHJlbiBhcmUgbm90IHJlbW92ZWQgdy9wYXJlbnRcblxuICAgICAgICBwYXJlbnRzVG9SZW1vdmUuZm9yRWFjaChmdW5jdGlvbiAoZWxlKSB7XG4gICAgICAgICAgcmV0dXJuIGVsZS5jaGlsZHJlbigpLm1vdmUoe1xuICAgICAgICAgICAgcGFyZW50OiBudWxsXG4gICAgICAgICAgfSk7XG4gICAgICAgIH0pOyAvLyBpbnRlcm1lZGlhdGUgcGFyZW50cyBtYXkgYmUgbW92ZWQgYnkgcHJpb3IgbGluZSwgc28gbWFrZSBzdXJlIHdlIHJlbW92ZSBieSBmcmVzaCByZWZzXG5cbiAgICAgICAgcGFyZW50c1RvUmVtb3ZlLmZvckVhY2goZnVuY3Rpb24gKGVsZSkge1xuICAgICAgICAgIHJldHVybiBnZXRGcmVzaFJlZihlbGUpLnJlbW92ZSgpO1xuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgaWYgKG9iai5zdHlsZSkge1xuICAgICAgICBjeS5zdHlsZShvYmouc3R5bGUpO1xuICAgICAgfVxuXG4gICAgICBpZiAob2JqLnpvb20gIT0gbnVsbCAmJiBvYmouem9vbSAhPT0gX3Auem9vbSkge1xuICAgICAgICBjeS56b29tKG9iai56b29tKTtcbiAgICAgIH1cblxuICAgICAgaWYgKG9iai5wYW4pIHtcbiAgICAgICAgaWYgKG9iai5wYW4ueCAhPT0gX3AucGFuLnggfHwgb2JqLnBhbi55ICE9PSBfcC5wYW4ueSkge1xuICAgICAgICAgIGN5LnBhbihvYmoucGFuKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAob2JqLmRhdGEpIHtcbiAgICAgICAgY3kuZGF0YShvYmouZGF0YSk7XG4gICAgICB9XG5cbiAgICAgIHZhciBmaWVsZHMgPSBbJ21pblpvb20nLCAnbWF4Wm9vbScsICd6b29taW5nRW5hYmxlZCcsICd1c2VyWm9vbWluZ0VuYWJsZWQnLCAncGFubmluZ0VuYWJsZWQnLCAndXNlclBhbm5pbmdFbmFibGVkJywgJ2JveFNlbGVjdGlvbkVuYWJsZWQnLCAnYXV0b2xvY2snLCAnYXV0b3VuZ3JhYmlmeScsICdhdXRvdW5zZWxlY3RpZnknLCAnbXVsdGlDbGlja0RlYm91bmNlVGltZSddO1xuXG4gICAgICBmb3IgKHZhciBfaTIgPSAwOyBfaTIgPCBmaWVsZHMubGVuZ3RoOyBfaTIrKykge1xuICAgICAgICB2YXIgZiA9IGZpZWxkc1tfaTJdO1xuXG4gICAgICAgIGlmIChvYmpbZl0gIT0gbnVsbCkge1xuICAgICAgICAgIGN5W2ZdKG9ialtmXSk7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgY3kuZW5kQmF0Y2goKTtcbiAgICAgIHJldHVybiB0aGlzOyAvLyBjaGFpbmluZ1xuICAgIH0gZWxzZSB7XG4gICAgICAvLyBnZXRcbiAgICAgIHZhciBmbGF0ID0gISFvYmo7XG4gICAgICB2YXIganNvbiA9IHt9O1xuXG4gICAgICBpZiAoZmxhdCkge1xuICAgICAgICBqc29uLmVsZW1lbnRzID0gdGhpcy5lbGVtZW50cygpLm1hcChmdW5jdGlvbiAoZWxlKSB7XG4gICAgICAgICAgcmV0dXJuIGVsZS5qc29uKCk7XG4gICAgICAgIH0pO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAganNvbi5lbGVtZW50cyA9IHt9O1xuICAgICAgICBlbGVzLmZvckVhY2goZnVuY3Rpb24gKGVsZSkge1xuICAgICAgICAgIHZhciBncm91cCA9IGVsZS5ncm91cCgpO1xuXG4gICAgICAgICAgaWYgKCFqc29uLmVsZW1lbnRzW2dyb3VwXSkge1xuICAgICAgICAgICAganNvbi5lbGVtZW50c1tncm91cF0gPSBbXTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBqc29uLmVsZW1lbnRzW2dyb3VwXS5wdXNoKGVsZS5qc29uKCkpO1xuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgaWYgKHRoaXMuX3ByaXZhdGU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mVhZHkgaW5jbHVkZXMgbWFyZ2luXG5cbiAgICB2YXIgbHgyID0gYmIueDIgKyB0aCAtIG94OyAvLyBhbmQgcm90YXRpb24gaXMgYWJvdXQgKGx4LCBseSlcblxuICAgIHZhciBseTEgPSBiYi55MSAtIHRoIC0gb3k7XG4gICAgdmFyIGx5MiA9IGJiLnkyICsgdGggLSBveTtcblxuICAgIGlmICh0aGV0YSkge1xuICAgICAgdmFyIGNvcyA9IE1hdGguY29zKHRoZXRhKTtcbiAgICAgIHZhciBzaW4gPSBNYXRoLnNpbih0aGV0YSk7XG5cbiAgICAgIHZhciByb3RhdGUgPSBmdW5jdGlvbiByb3RhdGUoeCwgeSkge1xuICAgICAgICB4ID0geCAtIGx4O1xuICAgICAgICB5ID0geSAtIGx5O1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHg6IHggKiBjb3MgLSB5ICogc2luICsgbHgsXG4gICAgICAgICAgeTogeCAqIHNpbiArIHkgKiBjb3MgKyBseVxuICAgICAgICB9O1xuICAgICAgfTtcblxuICAgICAgdmFyIHB4MXkxID0gcm90YXRlKGx4MSwgbHkxKTtcbiAgICAgIHZhciBweDF5MiA9IHJvdGF0ZShseDEsIGx5Mik7XG4gICAgICB2YXIgcHgyeTEgPSByb3RhdGUobHgyLCBseTEpO1xuICAgICAgdmFyIHB4MnkyID0gcm90YXRlKGx4MiwgbHkyKTtcbiAgICAgIHZhciBwb2ludHMgPSBbLy8gd2l0aCB0aGUgbWFyZ2luIGFkZGVkIGFmdGVyIHRoZSByb3RhdGlvbiBpcyBhcHBsaWVkXG4gICAgICBweDF5MS54ICsgb3gsIHB4MXkxLnkgKyBveSwgcHgyeTEueCArIG94LCBweDJ5MS55ICsgb3ksIHB4MnkyLnggKyBveCwgcHgyeTIueSArIG95LCBweDF5Mi54ICsgb3gsIHB4MXkyLnkgKyBveV07XG5cbiAgICAgIGlmIChwb2ludEluc2lkZVBvbHlnb25Qb2ludHMoeCwgeSwgcG9pbnRzKSkge1xu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VjdGlvblB0cyA9IHtcbiAgICAgICAgICB4MTogc3JjT3V0c2lkZVswXSxcbiAgICAgICAgICB4MjogdGd0T3V0c2lkZVswXSxcbiAgICAgICAgICB5MTogc3JjT3V0c2lkZVsxXSxcbiAgICAgICAgICB5MjogdGd0T3V0c2lkZVsxXVxuICAgICAgICB9O1xuICAgICAgICB2YXIgcG9zUHRzID0gcGFpckluZm8ucG9zUHRzID0ge1xuICAgICAgICAgIHgxOiBzcmNQb3MueCxcbiAgICAgICAgICB4MjogdGd0UG9zLngsXG4gICAgICAgICAgeTE6IHNyY1Bvcy55LFxuICAgICAgICAgIHkyOiB0Z3RQb3MueVxuICAgICAgICB9O1xuICAgICAgICB2YXIgZHkgPSB0Z3RPdXRzaWRlWzFdIC0gc3JjT3V0c2lkZVsxXTtcbiAgICAgICAgdmFyIGR4ID0gdGd0T3V0c2lkZVswXSAtIHNyY091dHNpZGVbMF07XG4gICAgICAgIHZhciBsID0gTWF0aC5zcXJ0KGR4ICogZHggKyBkeSAqIGR5KTtcbiAgICAgICAgdmFyIHZlY3RvciA9IHBhaXJJbmZvLnZlY3RvciA9IHtcbiAgICAgICAgICB4OiBkeCxcbiAgICAgICAgICB5OiBkeVxuICAgICAgICB9O1xuICAgICAgICB2YXIgdmVjdG9yTm9ybSA9IHBhaXJJbmZvLnZlY3Rvck5vcm0gPSB7XG4gICAgICAgICAgeDogdmVjdG9yLnggLyBsLFxuICAgICAgICAgIHk6IHZlY3Rvci55IC8gbFxuICAgICAgICB9O1xuICAgICAgICB2YXIgdmVjdG9yTm9ybUludmVyc2UgPSB7XG4gICAgICAgICAgeDogLXZlY3Rvck5vcm0ueSxcbiAgICAgICAgICB5OiB2ZWN0b3JOb3JtLnhcbiAgICAgICAgfTsgLy8gaWYgbm9kZSBzaGFwZXMgb3ZlcmxhcCwgdGhlbiBubyBjdHJsIHB0cyB0byBkcmF3XG5cbiAgICAgICAgcGFpckluZm8ubm9kZXNPdmVybGFwID0gIW51bWJlciQxKGwp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B5MTogcG9zUHRzLnkyLFxuICAgICAgICAgICAgeDI6IHBvc1B0cy54MSxcbiAgICAgICAgICAgIHkyOiBwb3NQdHMueTFcbiAgICAgICAgICB9LFxuICAgICAgICAgIGludGVyc2VjdGlvblB0czoge1xuICAgICAgICAgICAgeDE6IGludGVyc2VjdGlvblB0cy54MixcbiAgICAgICAgICAgIHkxOiBpbnRlcnNlY3Rpb25QdHMueTIsXG4gICAgICAgICAgICB4MjogaW50ZXJzZWN0aW9uUHRzLngxLFxuICAgICAgICAgICAgeTI6IGludGVyc2VjdGlvblB0cy55MVxuICAgICAgICAgIH0sXG4gICAgICAgICAgdmVjdG9yOiB7XG4gICAgICAgICAgICB4OiAtdmVjdG9yLngsXG4gICAgICAgICAgICB5OiAtdmVjdG9yLnlcbiAgICAgICAgICB9LFxuICAgICAgICAgIHZlY3Rvck5vcm06IHtcbiAgICAgICAgICAgIHg6IC12ZWN0b3JOb3JtLngsXG4gICAgICAgICAgICB5OiAtdmVjdG9yTm9ybS55XG4gICAgICAgICAgfSxcbiAgICAgICAgICB2ZWN0b3JOb3JtSW52ZXJzZToge1xuICAgICAgICAgICAgeDogLXZlY3Rvck5vcm1JbnZlcnNlLngsXG4gICAgICAgICAgICB5OiAtdmVjdG9yTm9ybUludmVyc2UueVxuICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgIH1cblxuICAgICAgdmFyIHBhc3NlZFBhaXJJbmZvID0gZWRnZUlzU3dhcHBlZCA/IHN3YXBwZWRwYWlySW5mbyA6IHBhaXJJbmZvO1xuICAgICAgcnMubm9kZXNPdmVybGFwID0gcGFzc2VkUGFpckluZm8ubm9kZXNPdmVybGFwO1xuICAgICAgcnMuc3JjSW50biA9IHBhc3NlZFBhaXJJbmZvLnNyY0ludG47XG4gICAgICBycy50Z3RJbnRuID0gcGFzc2VkUGFpckluZm8udGd0SW50bjtcblxuICAgICAgaWYgKGhhc0NvbXBvdW5kcyAmJiAoc3JjLmlzUGFyZW50KCkgfHwgc3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mxwdHNbX2kgLSAxXTtcblxuICAgICAgaWYgKHByZXZDcCkge1xuICAgICAgICBjcC5zdGFydERpc3QgPSBwcmV2Q3Auc3RhcnREaXN0ICsgcHJldkNwLmxlbmd0aDtcbiAgICAgIH1cblxuICAgICAgYWRkU2VnbWVudChjcCwgY3AucDAsIGJwdHNbX2kgKiBuUHJvanNdLCAwLCByLmJlemllclByb2pQY3RzWzBdKTsgLy8gZmlyc3RcblxuICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBuUHJvanMgLSAxOyBqKyspIHtcbiAgICAgICAgYWRkU2VnbWVudChjcCwgYnB0c1tfaSAqIG5Qcm9qcyArIGpdLCBicHRzW19pICogblByb2pzICsgaiArIDFdLCByLmJlemllclByb2pQY3RzW2pdLCByLmJlemllclByb2pQY3RzW2ogKyAxXSk7XG4gICAgICB9XG5cbiAgICAgIGFkZFNlZ21lbnQoY3AsIGJwdHNbX2kgKiBuUHJvanMgKyBuUHJvanMgLSAxXSwgY3AucDIsIHIuYmV6aWVyUHJvalBjdHNbblByb2pzIC0gMV0sIDEpOyAvLyBsYXN0XG4gICAgfVxuXG4gICAgcmV0dXJuIGNyZWF0ZUNvbnRyb2xQb2ludEluZm8uY2FjaGUgPSBjdHJscHRzO1xuICB9O1xuXG4gIHZhciBjYWxjdWxhdGVFbmRQcm9qZWN0aW9uID0gZnVuY3Rpb24gY2FsY3VsYXRlRW5kUHJvamVjdGlvbihwcmVmaXgpIHtcbiAgICB2YXIgYW5nbGU7XG4gICAgdmFyIGlzU3JjID0gcHJlZml4ID09PSAnc291cmNlJztcblxuICAgIGlmICghY29udGVudFtwcmVmaXhdKSB7XG4gICAgICByZXR1cm47XG4gICAgfVxuXG4gICAgdmFyIG9mZnNldCA9IGVkZ2UucHN0eWxlKHByZWZpeCArICctdGV4dC1vZmZzZXQnKS5wZlZhbHVlO1xuXG4gICAgc3dpdGNoIChycy5lZGdlVHlwZSkge1xuICAgICAgY2FzZSAnc2VsZic6XG4gICAgICBjYXNlICdjb21wb3VuZCc6XG4gICAgICBjYXNlICdiZXppZXInOlxuICAgICAgY2FzZSAnbXVsdGliZXppZXInOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGNwcyA9IGNyZWF0ZUNvbnRyb2xQb2ludEluZm8oKTtcbiAgICAgICAgICB2YXIgc2VsZWN0ZWQ7XG4gICAgICAgICAgdmFyIHN0YXJ0RGlzdCA9IDA7XG4gICAgICAgICAgdmFyIHRvdGFsRGlzdCA9IDA7IC8vIGZpbmQgdGhlIHNlZ21lbnQgd2UncmUgb25cblxuICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY3BzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgX2NwID0gY3BzW2lzU3JjID8gaSA6IGNwcy5sZW5ndGggLSAxIC0gaV07XG5cbiAgICAgICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgX2NwLnNlZ21lbnRzLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICAgIHZhciBfc2VnID0gX2NwLnNlZ21lbnRzW2lzU3JjID8gaiA6IF9jcC5zZWdtZW50cy5sZW5ndGggLSAxIC0gal07XG4gICAgICAgICAgICAgIHZhciBsYXN0U2VnID0gaSA9PT0gY3BzLmxlbmd0aCAtIDEgJiYgaiA9PT0gX2NwLnNlZ21lbnRzLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgIHN0YXJ0RGlzdCA9IHRvdGFsRGlzdDtcbiAgICAgICAgICAgICAgdG90YWxEaXN0ICs9IF9zZWcubGVuZ3RoO1xuXG4gICAgICAgICAgICAgIGlmICh0b3RhbERpc3QgPj0gb2Zmc2V0IHx8IGxhc3RTZWcpIHtcbiAgICAgICAgICAgICAgICBzZWxlY3RlZCA9IHtcbiAgICAgICAgICAgICAgICAgIGNwOiBfY3AsXG4gICAgICAgICAgICAgICAgICBzZWdtZW50OiBfc2VnXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoc2VsZWN0ZWQpIHtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIGNwID0gc2VsZWN0ZWQuY3A7XG4gICAgICAgICAgdmFyIHNlZyA9IHNlbGVjdGVkLnNlZ21lbnQ7XG4gICAgICAgICAgdmFyIHRTZWdtZW50ID0gKG9mZnNldCAtIHN0YXJ0RGlzdCkgLyBzZWcubGVuZ3RoO1xuICAgICAgICAgIHZhciBzZWdEdCA9IHNlZy50MSAtIHNlZy50MDtcbiAgICAgICAgICB2YXIgdCA9IGlzU3JjID8gc2VnLnQwICsgc2VnRHQgKiB0U2VnbWVudCA6IHNlZy50MSAtIHNlZ0R0ICogdFNlZ21lbnQ7XG4gICAgICAgICAgdCA9IGJvdW5kKDAsIHQsIDEpO1xuICAgICAgICAgIHAgPSBxYmV6aWVyUHRBdChjcC5wMCwgY3AucDEsIGNwLnAyLCB0KTtcbiAgICAgICAgICBhbmdsZSA9IGJlemllckFuZ2xlKGNwLnAwLCBjcC5wMSwgY3AucDIsIHQpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3N0cmFpZ2h0JzpcbiAgICAgIGNhc2UgJ3NlZ21lbnRzJzpcbiAgICAgIGNhc2UgJ2hheXN0YWNrJzpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBkID0gMCxcbiAgICAgICAgICAgICAgZGksXG4gICAgICAgICAgICAgIGQwO1xuICAgICAgICAgIHZhciBwMCwgcDE7XG4gICAgICAgICAgdmFyIGwgPSBycy5hbGxwdHMubGVuZ3RoO1xuXG4gICAgICAgICAgZm9yICh2YXIgX2kyID0gMDsgX2kyICsgMyA8IGw7IF9pMiArPSAyKSB7XG4gICAgICAgICAgICBpZiAoaXNTcmMpIHtcbiAgICAgICAgICAgICAgcDAgPSB7XG4gICAgICAgICAgICAgICAgeDogcnMuYWxscHRzW19pMl0sXG4gICAgICAgICAgICAgICAgeTogcnMuYWxscHRzW19pMiArIDFdXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIHAxID0ge1xuICAgICAgICAgICAgICAgIHg6IHJzLmFsbHB0c1tfaTIgKyAyXSxcbiAgICAgICAgICAgICAgICB5OiBycy5hbGxwdHNbX2kyICsgM11cbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHAwID0ge1xuICAgICAgICAgICAgICAgIHg6IHJzLmFsbHB0c1tsIC0gMiAtIF9pMl0sXG4gICAgICAgICAgICAgICAgeTogcnMuYWxscHRzW2wgLSAxIC0gX2kyXVxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICBwMSA9IHtcbiAgICAgICAgICAgICAgICB4OiBycy5hbGxwdHNbbCAtIDQgLSBfaTJdLFxuICAgICAgICAgICAgICAgIHk6IHJzLmFsbHB0c1tsIC0gMyAtIF9pMl1cbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZGkgPSBkaXN0KHAwLCBwMSk7XG4gICAgICAgICAgICBkMCA9IGQ7XG4gICAgICAgICAgICBkICs9IGRpO1xuXG4gICAgICAgICAgICBpZiAoZCA+PSBvZmZzZXQpIHtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIHBEID0gb2Zmc2V0IC0gZDA7XG5cbiAgICAgICAgICB2YXIgX3QgPSBwRCAvIGRpO1xuXG4gICAgICAgICAgX3QgPSBib3VuZCgwLCBfdCwgMSk7XG4gICAgICAgICAgcCA9IGxpbmVBdChwMCwgcDEsIF90KTtcbiAgICAgICAgICBhbmdsZSA9IGxpbmVBbmdsZShwMCwgcDEpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAg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m1kb3duUG9zID0gcG9zO1xuICAgIHIuaG92ZXJEYXRhLm1kb3duR1BvcyA9IGdwb3M7XG5cbiAgICB2YXIgY2hlY2tGb3JUYXBob2xkID0gZnVuY3Rpb24gY2hlY2tGb3JUYXBob2xkKCkge1xuICAgICAgci5ob3ZlckRhdGEudGFwaG9sZENhbmNlbGxlZCA9IGZhbHNlO1xuICAgICAgY2xlYXJUaW1lb3V0KHIuaG92ZXJEYXRhLnRhcGhvbGRUaW1lb3V0KTtcbiAgICAgIHIuaG92ZXJEYXRhLnRhcGhvbGRUaW1lb3V0ID0gc2V0VGltZW91dChmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmIChyLmhvdmVyRGF0YS50YXBob2xkQ2FuY2VsbGVkKSB7XG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHZhciBlbGUgPSByLmhvdmVyRGF0YS5kb3duO1xuXG4gICAgICAgICAgaWYgKGVsZSkge1xuICAgICAgICAgICAgZWxlLmVtaXQoe1xuICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgICB0eXBlOiAndGFwaG9sZCcsXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgY3kuZW1pdCh7XG4gICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICAgIHR5cGU6ICd0YXBob2xkJyxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAg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Skge1xuICAgICAgICAgICAgdmFyIG1ha2VFdmVudCA9IGZ1bmN0aW9uIG1ha2VFdmVudCh0eXBlKSB7XG4gICAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLFxuICAgICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICB2YXIgdHJpZ2dlckdyYWIgPSBmdW5jdGlvbiB0cmlnZ2VyR3JhYihlbGUpIHtcbiAgICAgICAgICAgICAgZWxlLmVtaXQobWFrZUV2ZW50KCdncmFiJykpO1xuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgc2V0R3JhYlRhcmdldChuZWFyKTtcblxuICAgICAgICAgICAgaWYgKCFuZWFyLnNlbGVjdGVkKCkpIHtcbiAgICAgICAgICAgICAgZHJhZ2dlZEVsZW1lbnRzID0gci5kcmFnRGF0YS5wb3NzaWJsZURyYWdFbGVtZW50cyA9IGN5LmNvbGxlY3Rpb24oKTtcbiAgICAgICAgICAgICAgYWRkTm9kZVRvRHJhZyhuZWFyLCB7XG4gICAgICAgICAgICAgICAgYWRkVG9MaXN0OiBkcmFnZ2VkRWxlbWVudHNcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIG5lYXIuZW1pdChtYWtlRXZlbnQoJ2dyYWJvbicpKS5lbWl0KG1ha2VFdmVudCgnZ3JhYicpKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGRyYWdnZWRFbGVtZW50cyA9IHIuZHJhZ0RhdGEucG9zc2libGVEcmFnRWxlbWVudHMgPSBjeS5jb2xsZWN0aW9uKCk7XG4gICAgICAgICAgICAgIHZhciBzZWxlY3RlZE5vZGVzID0gY3kuJChmdW5jdGlvbiAoZWxlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGVsZS5pc05vZGUoKSAmJiBlbGUuc2VsZWN0ZWQoKSAmJiByLm5vZGVJc0dyYWJiYWJsZShlbGUpO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgYWRkTm9kZXNUb0RyYWcoc2VsZWN0ZWROb2Rlcywge1xuICAgICAgICAgICAgICAgIGFkZFRvTGlzdDogZHJhZ2dlZEVsZW1lbnRzXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBuZWFyLmVtaXQobWFrZUV2ZW50KCdncmFib24nKSk7XG4gICAgICAgICAgICAgIHNlbGVjdGVkTm9kZXMuZm9yRWFjaCh0cmlnZ2VyR3JhYik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHIucmVkcmF3SGludCgnZWxlcycsIHRydWUpO1xuICAgICAgICAgICAgci5yZWRyYXdIaW50KCdkcmFnJywgdHJ1ZSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgci5ob3ZlckRhdGEuZG93biA9IG5lYXI7XG4gICAgICAgIHIuaG92ZXJEYXRhLmRvd25zID0gbmVhcnM7XG4gICAgICAgIHIuaG92ZXJEYXRhLmRvd25UaW1lID0gbmV3IERhdGUoKS5nZXRUaW1lKCk7XG4gICAgICB9XG4gICAgICB0cmlnZ2VyRXZlbnRzKG5lYXIsIFsnbW91c2Vkb3duJywgJ3RhcHN0YXJ0JywgJ3Ztb3VzZWRvd24nXSwgZSwge1xuICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgIHk6IHBvc1sxXVxuICAgICAgfSk7XG5cbiAgICAgIGlmIChuZWFyID09IG51bGwpIHtcbiAgICAgICAgc2VsZWN0WzRdID0gMTtcbiAgICAgICAgci5kYXRhLmJnQWN0aXZlUG9zaXN0aW9uID0ge1xuICAgICAgICAgIHg6IHBvc1swXSxcbi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ICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHNlbGVjdFs0XSA9IDE7XG4gICAgICByLmhvdmVyRGF0YS5zZWxlY3RpbmcgPSB0cnVlO1xuICAgICAgci5yZWRyYXdIaW50KCdzZWxlY3QnLCB0cnVlKTtcbiAgICAgIHIucmVkcmF3KCk7XG4gICAgfTsgLy8gdHJpZ2dlciBjb250ZXh0IGRyYWcgaWYgcm1vdXNlIGRvd25cblxuXG4gICAgaWYgKHIuaG92ZXJEYXRhLndoaWNoID09PSAzKSB7XG4gICAgICAvLyBidXQgb25seSBpZiBvdmVyIHRocmVzaG9sZFxuICAgICAgaWYgKGlzT3ZlclRocmVzaG9sZERyYWcpIHtcbiAgICAgICAgdmFyIGN4dEV2dCA9IHtcbiAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgIHR5cGU6ICdjeHRkcmFnJyxcbiAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChkb3duKSB7XG4gICAgICAgICAgZG93bi5lbWl0KGN4dEV2dCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY3kuZW1pdChjeHRFdnQpO1xuICAgICAgICB9XG5cbiAgICAgICAgci5ob3ZlckRhdGEuY3h0RHJhZ2dlZCA9IHRydWU7XG5cbiAgICAgICAgaWYgKCFyLmhvdmVyRGF0YS5jeHRPdmVyIHx8IG5lYXIgIT09IHIuaG92ZXJEYXRhLmN4dE92ZXIpIHtcbiAgICAgICAgICBpZiAoci5ob3ZlckRhdGEuY3h0T3Zlcikge1xuICAgICAgICAgICAgci5ob3ZlckRhdGEuY3h0T3Zlci5lbWl0KHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogJ2N4dGRyYWdvdXQnLFxuICAgICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgci5ob3ZlckRhdGEuY3h0T3ZlciA9IG5lYXI7XG5cbiAgICAgICAgICBpZiAobmVhcikge1xuICAgICAgICAgICAgbmVhci5lbWl0KHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogJ2N4dGRyYWdvdmVyJyxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSAvLyBDaGVjayBpZiB3ZSBhcmUgZHJhZyBwYW5uaW5nIHRoZSBlbnRpcmUgZ3JhcGhcblxuICAgIH0gZWxzZSBpZiAoci5ob3ZlckRhdGEuZHJhZ2dpbmcpIHtcbiAgICAgIHByZXZlbnREZWZhdWx0ID0gdHJ1ZTtcblxuICAgICAgaWYgKGN5LnBhbm5pbmdFbmFibGVkKCkgJiYgY3kudXNlclBhbm5pbmdFbmFibGVkKCkpIHtcbiAgICAgICAgdmFyIGRlbHRhUDtcblxuICAgICAgICBpZiAoci5ob3ZlckRhdGEuanVzdFN0YXJ0ZWRQYW4pIHtcbiAgICAgICAgICB2YXIgbWRQb3MgPSByLmhvdmVyRGF0YS5tZG93blBvcztcbiAgICAgICAgICBkZWx0YVAgPSB7XG4gICAgICAgICAgICB4OiAocG9zWzBdIC0gbWRQb3NbMF0pICogem9vbSxcbiAgICAgICAgICAgIHk6IChwb3NbMV0gLSBtZFBvc1sxXSkgKiB6b29tXG4gICAgICAgICAgfTtcbiAgICAgICAgICByLmhvdmV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2dlckV2ZW50cyhuZWFyLCBbJ21vdXNlb3ZlcicsICd0YXBkcmFnb3ZlciddLCBlLCB7XG4gICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHIuaG92ZXJEYXRhLmxhc3QgPSBuZWFyO1xuICAgICAgfVxuXG4gICAgICBpZiAoZG93bikge1xuICAgICAgICBpZiAoaXNPdmVyVGhyZXNob2xkRHJhZykge1xuICAgICAgICAgIC8vIHRoZW4gd2UgY2FuIHRha2UgYWN0aW9uXG4gICAgICAgICAgaWYgKGN5LmJveFNlbGVjdGlvbkVuYWJsZWQoKSAmJiBtdWx0U2VsS2V5RG93bikge1xuICAgICAgICAgICAgLy8gdGhlbiBzZWxlY3Rpb24gb3ZlcnJpZGVzXG4gICAgICAgICAgICBpZiAoZG93biAmJiBkb3duLmdyYWJiZWQoKSkge1xuICAgICAgICAgICAgICBmcmVlRHJhZ2dlZEVsZW1lbnRzKGRyYWdnZWRFbGVtZW50cyk7XG4gICAgICAgICAgICAgIGRvd24uZW1pdCgnZnJlZW9uJyk7XG4gICAgICAgICAgICAgIGRyYWdnZWRFbGVtZW50cy5lbWl0KCdmcmVlJyk7XG5cbiAgICAgICAgICAgICAgaWYgKHIuZHJhZ0RhdGEuZGlkRHJhZykge1xuICAgICAgICAgICAgICAgIGRvd24uZW1pdCgnZHJhZ2ZyZWVvbicpO1xuICAgICAgICAgICAgICAgIGRyYWdnZWRFbGVtZW50cy5lbWl0KCdkcmFnZnJlZScpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGdvSW50b0JveE1vZGUoKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGRvd24gJiYgZG93bi5ncmFiYmVkKCkgJiYgci5ub2RlSXNEcmFnZ2FibGUoZG93bikpIHtcbiAgICAgICAgICAgIC8vIGRyYWcgbm9kZVxuICAgICAgICAgICAgdmFyIGp1c3RTdGFydGVkRHJhZyA9ICFyLmRyYWdEYXRhLmRpZERyYWc7XG5cbiAgICAgICAgICAgIGlmIChqdXN0U3RhcnRlZERyYWcpIHtcbiAgICAgICAgICAgICAgci5yZWRyYXdIaW50KCdlbGVzJywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHIuZHJhZ0RhdGEuZGlkRHJhZyA9IHRydWU7IC8vIGluZGljYXRlIHRoYXQgd2UgYWN0dWFsbHkgZGlkIGRyYWcgdGhlIG5vZGVcbiAgICAgICAgICAgIC8vIG5vdywgYWRkIHRoZSBlbGVtZW50cyB0byB0aGUgZHJhZyBsYXllciBpZiBub3QgZG9uZSBhbHJlYWR5XG5cbiAgICAgICAgICAgIGlmICghci5ob3ZlckRhdGEuZHJhZ2dpbmdFbGVzKSB7XG4gICAgICAgICAgICAgIGFkZE5vZGVzVG9EcmFnKGRyYWdnZWRFbGVtZW50cywge1xuICAgICAgICAgICAgICAgIGluRHJhZ0xheWVyOiB0cnVlXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgdG90YWxTaGlmdCA9IHtcbiAgICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgICAgeTogMFxuICAgICAgICAgICAgfTtcblxuICAgICAgICAgICAgaWYgKG51bWJlciQxKGRpc3BbMF0pICYmIG51bWJlciQxKGRpc3BbMV0pKSB7XG4gICAgICAgICAgICAgIHRvdGFsU2hpZnQueCArPSBkaXNwWzBdO1xuICAgICAgICAgICAgICB0b3RhbFNoaWZ0LnkgKz0gZGlzcFsxXTtcblxuICAgICAgICAgICAgICBpZiAoanVzdFN0YXJ0ZWREcmFnKSB7XG4gICAgICAgICAgICAgICAgdmFyIGRyYWdEZWx0YSA9IHIuaG92ZXJEYXRhLmRyYWdEZWx0YTtcblxuICAgICAgICAgICAgICAgIGlmIChkcmFnRGVsdGEgJiYgbnVtYmVyJDEoZHJhZ0R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hdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB1bmRlZmluZWQ7IC8vIG5vdCBhY3RpdmUgYmcgbm93XG5cbiAgICBpZiAoZG93bikge1xuICAgICAgZG93bi51bmFjdGl2YXRlKCk7XG4gICAgfVxuXG4gICAgaWYgKHIuaG92ZXJEYXRhLndoaWNoID09PSAzKSB7XG4gICAgICB2YXIgY3h0RXZ0ID0ge1xuICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICB0eXBlOiAnY3h0dGFwZW5kJyxcbiAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChkb3duKSB7XG4gICAgICAgIGRvd24uZW1pdChjeHRFdnQpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY3kuZW1pdChjeHRFdnQpO1xuICAgICAgfVxuXG4gICAgICBpZiAoIXIuaG92ZXJEYXRhLmN4dERyYWdnZWQpIHtcbiAgICAgICAgdmFyIGN4dFRhcCA9IHtcbiAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgIHR5cGU6ICdjeHR0YXAnLFxuICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKGRvd24pIHtcbiAgICAgICAgICBkb3duLmVtaXQoY3h0VGFwKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjeS5lbWl0KGN4dFRhcCk7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgci5ob3ZlckRhdGEuY3h0RHJhZ2dlZCA9IGZhbHNlO1xuICAgICAgci5ob3ZlckRhdGEud2hpY2ggPSBudWxsO1xuICAgIH0gZWxzZSBpZiAoci5ob3ZlckRhdGEud2h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CkuZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgdHlwZTogJ2N4dHRhcHN0YXJ0JyxcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSk7XG4gICAgICAgICAgci50b3VjaERhdGEuc3RhcnQgPSBuZWFyMjtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjeS5lbWl0KHtcbiAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICB0eXBlOiAnY3h0dGFwc3RhcnQnLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChyLnRvdWNoRGF0YS5zdGFydCkge1xuICAgICAgICAgIHIudG91Y2hEYXRhLnN0YXJ0Ll9wcml2YXRlLmdyYWJiZWQgPSBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHIudG91Y2hEYXRhLmN4dCA9IHRydWU7XG4gICAgICAgIHIudG91Y2hEYXRhLmN4dERyYWdnZWQgPSBmYWxzZTtcbiAgICAgICAgci5kYXRhLmJnQWN0aXZlUG9zaXN0aW9uID0gdW5kZWZpbmVkO1xuICAgICAgICByLnJlZHJhdygpO1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKGUudG91Y2hlc1syXSkge1xuICAgICAgLy8gaWdub3JlXG4gICAgICAvLyBzYWZhcmkgb24gaW9zIHBhbnMgdGhlIHBhZ2Ugb3RoZXJ3aXNlIChub3JtYWxseSB5b3Ugc2hvdWxkIGJlIGFibGUgdG8gcHJldmVudGRlZmF1bHQ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gIH0pO1xuICAgICAgICAgICAgYWRkTm9kZXNUb0RyYWcoc2VsZWN0ZWROb2Rlcywge1xuICAgICAgICAgICAgICBhZGRUb0xpc3Q6IGRyYWdnZWRFbGVzXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgYWRkTm9kZVRvRHJhZyhuZWFyLCB7XG4gICAgICAgICAgICAgIGFkZFRvTGlzdDogZHJhZ2dlZEVsZXNcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHNldEdyYWJUYXJnZXQobmVhcik7XG5cbiAgICAgICAgICB2YXIgbWFrZUV2ZW50ID0gZnVuY3Rpb24gbWFrZUV2ZW50KHR5cGUpIHtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICAgIHR5cGU6IHR5cGUsXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9O1xuICAgICAgICAgIH07XG5cbiAgICAgICAgICBuZWFyLmVtaXQobWFrZUV2ZW50KCdncmFib24nKSk7XG5cbiAgICAgICAgICBpZiAoc2VsZWN0ZWROb2Rlcykge1xuICAgICAgICAgICAgc2VsZWN0ZWROb2Rlcy5mb3JFYWNoKGZ1bmN0aW9uIChuKSB7XG4gICAgICAgICAgICAgIG4uZW1pdChtYWtlRXZlbnQoJ2dyYWInKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbmVhci5lbWl0KG1ha2VFdmVudCgnZ3JhYicpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgdHJpZ2dlckV2ZW50cyhuZWFyLCBbJ3RvdWNoc3RhcnQnLCAndGFwc3RhcnQnLCAndm1vdXNlZG93biddLCBlLCB7XG4gICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgeTogbm93WzFdXG4gICAgICB9KTtcblxuICAgICAgaWYgKG5lYXIgPT0gbnVsbCkge1xuICAgICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB7XG4gICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICB9O1xuICAgICAgICByLnJlZHJhd0hpbnQoJ3NlbGVjdCcsIHRydWUpO1xuICAgICAgICByLnJlZHJhdygpO1xuICAgICAgfSAvLyBUYXAsIHRhcGhvbGRcbiAgICAgIC8vIC0tLS0tXG5cblxuICAgICAgci50b3VjaERhdGEuc2luZ2xlVG91Y2hNb3ZlZCA9IGZhbHNlO1xuICAgICAgci50b3VjaERhdGEuc2luZ2xlVG91Y2hTdGFydFRpbWUgPSArbmV3IERhdGUoKTtcbiAgICAgIGNsZWFyVGltZW91dChyLnRvdWNoRGF0YS50YXBob2xkVGltZW91dCk7XG4gICAgICByLnRvdWNoRGF0YS50YXBob2xkVGltZW91dCA9IHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICBpZiAoci50b3VjaERhdGEuc2luZ2xlVG91Y2hNb3ZlZCA9PT0gZmFsc2UgJiYgIXIucGluY2hpbmcgLy8gaWYgcGluY2hpbmcsIHRoZW4gdGFwaG9sZCB1bnNlbGVjdCBzaG91bGRuJ3QgdGFrZSBlZmZlY3RcbiAgICAgICAgJiYgIXIudG91Y2hEYXRhLnNlbGVjdGluZyAvLyBib3ggc2VsZWN0aW9uIHNob3VsZG4ndCBhbGxvdyB0YXBob2xkIHRocm91Z2hcbiAgICAgICAgKSB7XG4gICAgICAgICAgdHJpZ2dlckV2ZW50cyhyLnRvdWNoRGF0YS5zdGFydCwgWyd0YXBob2xkJ10sIGUsIHtcbiAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgIHk6IG5v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0aGUgZGlzdGFuY2UgYi90IHRoZSBmaW5nZXJzIGluY3JlYXNlc1xuXG4gICAgICBpZiAoZmFjdG9yU3EgPj0gZmFjdG9yVGhyZXNob2xkU3EgfHwgZGlzdGFuY2UyU3EgPj0gZGlzdFRocmVzaG9sZFNxKSB7XG4gICAgICAgIHIudG91Y2hEYXRhLmN4dCA9IGZhbHNlO1xuICAgICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB1bmRlZmluZWQ7XG4gICAgICAgIHIucmVkcmF3SGludCgnc2VsZWN0JywgdHJ1ZSk7XG4gICAgICAgIHZhciBjeHRFdnQgPSB7XG4gICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICB0eXBlOiAnY3h0dGFwZW5kJyxcbiAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChyLnRvdWNoRGF0YS5zdGFydCkge1xuICAgICAgICAgIHIudG91Y2hEYXRhLnN0YXJ0LnVuYWN0aXZhdGUoKS5lbWl0KGN4dEV2dCk7XG4gICAgICAgICAgci50b3VjaERhdGEuc3RhcnQgPSBudWxsO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGN5LmVtaXQoY3h0RXZ0KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gLy8gY29udGV4dCBzd2lwZVxuXG5cbiAgICBpZiAoY2FwdHVyZSAmJiByLnRvdWNoRGF0YS5jeHQpIHtcbiAgICAgIHZhciBjeHRFdnQgPSB7XG4gICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgIHR5cGU6ICdjeHRkcmFnJyxcbiAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgeTogbm93WzFdXG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB1bmRlZmluZWQ7XG4gICAgICByLnJlZHJhd0hpbnQoJ3NlbGVjdCcsIHRydWUpO1xuXG4gICAgICBpZiAoci50b3VjaERhdGEuc3RhcnQpIHtcbiAgICAgICAgci50b3VjaERhdGEuc3RhcnQuZW1pdChjeHRFdnQpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY3kuZW1pdChjeHRFdnQpO1xuICAgICAgfVxuXG4gICAgICBpZiAoci50b3VjaERhdGEuc3RhcnQpIHtcbiAgICAgICAgci50b3VjaERhdGEuc3RhcnQuX3ByaXZhdGUuZ3JhYmJlZCA9IGZhbHNlO1xuICAgICAgfVxuXG4gICAgICByLnRvdWNoRGF0YS5jeHREcmFnZ2VkID0gdHJ1ZTtcbiAgICAgIHZhciBuZWFyID0gci5maW5kTmVhcmVzdEVsZW1lbnQobm93WzBdLCBub3dbMV0sIHRydWUsIHRydWUpO1xuXG4gICAgICBpZiAoIXIudG91Y2hEYXRhLmN4dE92ZXIgfHwgbmVhciAhPT0gci50b3VjaERhdGEuY3h0T3Zlcikge1xuICAgICAgICBpZiAoci50b3VjaERhdGEuY3h0T3Zlcikge1xuICAgICAgICAgIHIudG91Y2hEYXRhLmN4dE92ZXIuZW1pdCh7XG4gICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgdHlwZTogJ2N4dGRyYWdvdXQnLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuXG4gICAgICAgIHIudG91Y2hEYXRhLmN4dE92ZXIgPSBuZWFyO1xuXG4gICAgICAgIGlmIChuZWFyKSB7XG4gICAgICAgICAgbmVhci5lbWl0KHtcbiAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICB0eXBlOiAnY3h0ZHJhZ292ZXInLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfSAvLyBib3ggc2VsZWN0aW9uXG5cbiAgICB9IGVsc2UgaWYgKGNhcHR1cmUgJiYgZS50b3VjaGVzWzJdICYmIGN5LmJveFNlbGVjdGlvbkVuYWJsZWQoKSkge1xuICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgci5kYXRhLmJnQWN0aXZlUG9zaXN0aW9uID0gdW5kZWZpbmVkO1xuICAgICAgdGhpcy5sYXN0VGhyZWVUb3VjaCA9ICtuZXcgRGF0ZSgpO1xuXG4gICAgICBpZiAoIXIudG91Y2hEYXRhLnNlbGVjdGluZykge1xuICAgICAgICBjeS5lbWl0KHtcbiAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgIHR5cGU6ICdib3hzdGFydCcsXG4gICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICB9XG5cbiAgICAgIHIudG91Y2hEYXRhLnNlbGVjdGluZyA9IHRydWU7XG4gICAgICByLnRvdWNoRGF0YS5kaWRTZWxlY3QgPSB0cnVlO1xuICAgICAgc2VsZWN0WzRdID0gMTtcblxuICAgICAgaWYgKCFzZWxlY3QgfHwgc2VsZWN0Lmxlbmd0aCA9PT0gMCB8fCBzZWxlY3RbMF0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICBzZWxlY3RbMF0gPSAobm93WzBdICsgbm93WzJdICsgbm93WzRdKSAvIDM7XG4gICAgICAgIHNlbGVjdFsxXSA9IChub3dbMV0gKyBub3dbM10gKyBub3dbNV0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cHR1cmUgJiYgc3RhcnQgIT0gbnVsbCkge1xuICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICB9IC8vIGRyYWdnaW5nIG5vZGVzXG5cblxuICAgICAgaWYgKGNhcHR1cmUgJiYgc3RhcnQgIT0gbnVsbCAmJiByLm5vZGVJc0RyYWdnYWJsZShzdGFydCkpIHtcbiAgICAgICAgaWYgKGlzT3ZlclRocmVzaG9sZERyYWcpIHtcbiAgICAgICAgICAvLyB0aGVuIGRyYWdnaW5nIGNhbiBoYXBwZW5cbiAgICAgICAgICB2YXIgZHJhZ2dlZEVsZXMgPSByLmRyYWdEYXRhLnRvdWNoRHJhZ0VsZXM7XG4gICAgICAgICAgdmFyIGp1c3RTdGFydGVkRHJhZyA9ICFyLmRyYWdEYXRhLmRpZERyYWc7XG5cbiAgICAgICAgICBpZiAoanVzdFN0YXJ0ZWREcmFnKSB7XG4gICAgICAgICAgICBhZGROb2Rlc1RvRHJhZyhkcmFnZ2VkRWxlcywge1xuICAgICAgICAgICAgICBpbkRyYWdMYXllcjogdHJ1ZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgci5kcmFnRGF0YS5kaWREcmFnID0gdHJ1ZTtcbiAgICAgICAgICB2YXIgdG90YWxTaGlmdCA9IHtcbiAgICAgICAgICAgIHg6IDAsXG4gICAgICAgICAgICB5OiAwXG4gICAgICAgICAgfTtcblxuICAgICAgICAgIGlmIChudW1iZXIkMShkaXNwWzBdKSAmJiBudW1iZXIkMShkaXNwWzFdKSkge1xuICAgICAgICAgICAgdG90YWxTaGlmdC54ICs9IGRpc3BbMF07XG4gICAgICAgICAgICB0b3RhbFNoaWZ0LnkgKz0gZGlzcFsxXTtcblxuICAgICAgICAgICAgaWYgKGp1c3RTdGFydGVkRHJhZykge1xuICAgICAgICAgICAgICByLnJlZHJhd0hpbnQoJ2VsZXMnLCB0cnVlKTtcbiAgICAgICAgICAgICAgdmFyIGRyYWdEZWx0YSA9IHIudG91Y2hEYXRhLmRyYWdEZWx0YTtcblxuICAgICAgICAgICAgICBpZiAoZHJhZ0RlbHRhICYmIG51bWJlciQxKGRyYWdEZWx0YVswXSkgJiYgbnVtYmVyJDEoZHJhZ0RlbHRhWzFdKSkge1xuICAgICAgICAgICAgICAgIHRvdGFsU2hpZnQueCArPSBkcmFnRGVsdGFbMF07XG4gICAgICAgICAgICAgICAgdG90YWxTaGlmdC55ICs9IGRyYWdEZWx0YVsxXTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHIuaG92ZXJEYXRhLmRyYWdnaW5nRWxlcyA9IHRydWU7XG4gICAgICAgICAgZHJhZ2dlZEVsZXMuc2lsZW50U2hpZnQodG90YWxTaGlmdCkuZW1pdCgncG9zaXRpb24gZHJhZycpO1xuICAgICAgICAgIHIucmVkcmF3SGludCgnZHJhZycsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKHIudG91Y2hEYXRhLnN0YXJ0UG9zaXRpb25bMF0gPT0gZWFybGllclswXSAmJiByLnRvdWNoRGF0YS5zdGFydFBvc2l0aW9uWzFdID09IGVhcmxpZXJbMV0pIHtcbiAgICAgICAgICAgIHIucmVkcmF3SGludCgnZWxlcycsIHRydWUpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHIucmVkcmF3KCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gb3RoZXJpc2Uga2VlcCB0cmFjayBvZiBkcmFnIGRlbHRhIGZvciBsYXRlclxuICAgICAgICAgIHZhciBkcmFnRGVsdGEgPSByLnRvdWNoRGF0YS5kcmFnRGVsdGEgPSByLnRvdWNoRGF0YS5kcmFnRGVsdGEgfHwgW107XG5cbiAgICAgICAgICBpZiAoZHJhZ0RlbHRhLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgZHJhZ0RlbHRhLnB1c2goZGlzcFswXSk7XG4gICAgICAgICAgICBkcmFnRGVsdGEucHVzaChkaXNwWzFdKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgZHJhZ0RlbHRhWzBdICs9IGRpc3BbMF07XG4gICAgICAgICAgICBkcmFnRGVsdGFbMV0gKz0gZGlzcFsxXTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gLy8gdG91Y2htb3ZlXG5cblxuICAgICAge1xuICAgICAgICB0cmlnZ2VyRXZlbnRzKHN0YXJ0IHx8IG5lYXIsIFsndG91Y2htb3ZlJywgJ3RhcGRyYWcnLCAndm1vdXNlbW92ZSddLCBlLCB7XG4gICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoKCFzdGFydCB8fCAhc3RhcnQuZ3JhYmJlZCgpKSAmJiBuZWFyICE9IGxhc3QpIHtcbiAgICAgICAgICBpZiAobGFzdCkge1xuICAgICAgICAgICAgbGFzdC5lbWl0KHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogJ3RhcGRyYWdvdXQnLFxuICAgICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG5lYXIpIHtcbiAgICAgICAgICAgIG5lYXIuZW1pdCh7XG4gICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICAgIHR5cGU6ICd0YXBkcmFnb3ZlcicsXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG4gIC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B5OiBkaXNwWzFdICogem9vbVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBjeS5lbWl0KCdkcmFncGFuJyk7XG4gICAgICAgICAgfSBlbHNlIGlmIChpc092ZXJUaHJlc2hvbGREcmFnKSB7XG4gICAgICAgICAgICByLnN3aXBlUGFubmluZyA9IHRydWU7XG4gICAgICAgICAgICBjeS5wYW5CeSh7XG4gICAgICAgICAgICAgIHg6IGR4ICogem9vbSxcbiAgICAgICAgICAgICAgeTogZHkgKiB6b29tXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGN5LmVtaXQoJ2RyYWdwYW4nKTtcblxuICAgICAgICAgICAgaWYgKHN0YXJ0KSB7XG4gICAgICAgICAgICAgIHN0YXJ0LnVuYWN0aXZhdGUoKTtcbiAgICAgICAgICAgICAgci5yZWRyYXdIaW50KCdzZWxlY3QnLCB0cnVlKTtcbiAgICAgICAgICAgICAgci50b3VjaERhdGEuc3RhcnQgPSBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyBSZS1wcm9qZWN0XG5cblxuICAgICAgICB2YXIgcG9zID0gci5wcm9qZWN0SW50b1ZpZXdwb3J0KGUudG91Y2hlc1swXS5jbGllbnRYLCBlLnRvdWNoZXNbMF0uY2xpZW50WSk7XG4gICAgICAgIG5vd1swXSA9IHBvc1swXTtcbiAgICAgICAgbm93WzFdID0gcG9zWzFdO1xuICAgICAgfVxuICAgIH1cblxuICAgIGZvciAodmFyIGogPSAwOyBqIDwgbm93Lmxlbmd0aDsgaisrKSB7XG4gICAgICBlYXJsaWVyW2pdID0gbm93W2pdO1xuICAgIH0gLy8gdGhlIGFjdGl2ZSBiZyBpbmRpY2F0b3Igc2hvdWxkIGJlIHJlbW92ZWQgd2hlbiBtYWtpbmcgYSBzd2lwZSB0aGF0IGlzIG5laXRoZXIgZm9yIGRyYWdnaW5nIG5vZGVzIG9yIHBhbm5pbmdcblxuXG4gICAgaWYgKGNhcHR1cm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4gICAgICBub3dbNF0gPSBwb3NbMF07XG4gICAgICBub3dbNV0gPSBwb3NbMV07XG4gICAgfVxuXG4gICAgaWYgKHN0YXJ0KSB7XG4gICAgICBzdGFydC51bmFjdGl2YXRlKCk7XG4gICAgfVxuXG4gICAgdmFyIGN0eFRhcGVuZDtcblxuICAgIGlmIChyLnRvdWNoRGF0YS5jeHQpIHtcbiAgICAgIGN0eFRhcGVuZCA9IHtcbiAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgdHlwZTogJ2N4dHRhcGVuZCcsXG4gICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBpZiAoc3RhcnQpIHtcbiAgICAgICAgc3RhcnQuZW1pdChjdHhUYXBlbmQpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY3kuZW1pdChjdHhUYXBlbmQpO1xuICAgICAgfVxuXG4gICAgICBpZiAoIXIudG91Y2hEYXRhLmN4dERyYWdnZWQpIHtcbiAgICAgICAgdmFyIGN0eFRhcCA9IHtcbiAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgIHR5cGU6ICdjeHR0YXAnLFxuICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKHN0YXJ0KSB7XG4gICAgICAgICAgc3RhcnQuZW1pdChjdHhUYXApO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGN5LmVtaXQoY3R4VGFwKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAoci50b3VjaERhdGEuc3RhcnQpIHtcbiAgICAgICAgci50b3VjaERhdGEuc3RhcnQuX3ByaXZhdGUuZ3JhYmJlZCA9IGZhbH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gICB2YXIgdDIgPSAwLjg1O1xuICAgICAgdmFyIGJQdHMgPSB0aGlzLmdlbmVyYXRlQmFycmVsQmV6aWVyUHRzKHdpZHRoICsgMiAqIHBhZGRpbmcsIGhlaWdodCArIDIgKiBwYWRkaW5nLCBub2RlWCwgbm9kZVkpO1xuXG4gICAgICB2YXIgYXBwcm94aW1hdGVCYXJyZWxDdXJ2ZVB0cyA9IGZ1bmN0aW9uIGFwcHJveGltYXRlQmFycmVsQ3VydmVQdHMocHRzKSB7XG4gICAgICAgIC8vIGFwcHJveGltYXRlIGN1cnZlIHB0cyBiYXNlZCBvbiB0aGUgdHdvIHQgdmFsdWVzXG4gICAgICAgIHZhciBtMCA9IHFiZXppZXJQdEF0KHtcbiAgICAgICAgICB4OiBwdHNbMF0sXG4gICAgICAgICAgeTogcHRzWzFdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICB4OiBwdHNbMl0sXG4gICAgICAgICAgeTogcHRzWzNdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICB4OiBwdHNbNF0sXG4gICAgICAgICAgeTogcHRzWzVdXG4gICAgICAgIH0sIHQwKTtcbiAgICAgICAgdmFyIG0xID0gcWJlemllclB0QXQoe1xuICAgICAgICAgIHg6IHB0c1swXSxcbiAgICAgICAgICB5OiBwdHNbMV1cbiAgICAgICAgfSwge1xuICAgICAgICAgIHg6IHB0c1syXSxcbiAgICAgICAgICB5OiBwdHNbM11cbiAgICAgICAgfSwge1xuICAgICAgICAgIHg6IHB0c1s0XSxcbiAgICAgICAgICB5OiBwdHNbNV1cbiAgICAgICAgfSwgdDEpO1xuICAgICAgICB2YXIgbTIgPSBxYmV6aWVyUHRBdCh7XG4gICAgICAgICAgeDogcHRzWzBdLFxuICAgICAgICAgIHk6IHB0c1sxXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgeDogcHRzWzJdLFxuICAgICAgICAgIHk6IHB0c1szXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgeDogcHRzWzRdLFxuICAgICA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H1cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgaWYgKHdpbGxEcmF3KSB7XG4gICAgICAgICAgICAgIGlmIChkdXJhdGlvbiA+PSBvcHRzLmRlcUNvc3QgKiByZW5kZXJUaW1lIHx8IGR1cmF0aW9uID49IG9wdHMuZGVxQXZnQ29zdCAqIGF2Z1JlbmRlclRpbWUpIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIGlmIChmcmFtZUR1cmF0aW9uID49IG9wdHMuZGVxTm9EcmF3Q29zdCAqIGZ1bGxGcHNUaW1lKSB7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciB0aGlzRGVxZCA9IG9wdHMuZGVxKHNlbGYsIHBpeGVsUmF0aW8sIGV4dGVudCk7XG5cbiAgICAgICAgICBpZiAodGhpc0RlcWQubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCB0aGlzRGVxZC5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICBkZXFkLnB1c2godGhpc0RlcWRbaV0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH0gLy8gY2FsbGJhY2tzIG9uIGRlcXVldWVcblxuXG4gICAgICAgIGlmIChkZXFkLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICBvcHRzLm9uRGVxZChzZWxmLCBkZXFkKTtcblxuICAgICAgICAgIGlmICghd2lsbERyYXcgJiYgb3B0cy5zaG91bGRSZWRyYXcoc2VsZiwgZGVxZCwgcGl4ZWxSYXRpbywgZXh0ZW50KSkge1xuICAgICAgICAgICAgcXVldWVSZWRyYXcoKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIHZh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FyIHRleHRCb3JkZXJTdHlsZSA9IGVsZS5wc3R5bGUoJ3RleHQtYm9yZGVyLXN0eWxlJykudmFsdWU7XG4gICAgICAgIGNvbnRleHQuc3Ryb2tlU3R5bGUgPSAncmdiYSgnICsgdGV4dEJvcmRlckNvbG9yWzBdICsgJywnICsgdGV4dEJvcmRlckNvbG9yWzFdICsgJywnICsgdGV4dEJvcmRlckNvbG9yWzJdICsgJywnICsgYm9yZGVyT3BhY2l0eSAqIHBhcmVudE9wYWNpdHkgKyAnKSc7XG4gICAgICAgIGNvbnRleHQubGluZVdpZHRoID0gdGV4dEJvcmRlcldpZHRoO1xuXG4gICAgICAgIGlmIChjb250ZXh0LnNldExpbmVEYXNoKSB7XG4gICAgICAgICAgLy8gZm9yIHZlcnkgb3V0b2ZkYXRlIGJyb3dzZXJzXG4gICAgICAgICAgc3dpdGNoICh0ZXh0Qm9yZGVyU3R5bGUpIHtcbiAgICAgICAgICAgIGNhc2UgJ2RvdHRlZCc6XG4gICAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goWzEsIDFdKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2Rhc2hlZCc6XG4gICAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goWzQsIDJdKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICAgIGNhc2UgJ2RvdWJsZSc6XG4gICAgICAgICAgICAgIGNvbnRleHQubGluZVdpZHRoID0gdGV4dEJvcmRlcldpZHRoIC8gNDsgLy8gNTAlIHJlc2VydmVkIGZvciB3aGl0ZSBiZXR3ZWVuIHRoZSB0d28gYm9yZGVyc1xuXG4gICAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goW10pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnc29saWQnOlxuICAgICAgICAgICAgICBjb250ZXh0LnNldExpbmVEYXNoKFtdKTtcbiAgICAgICA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2l0eSA9IChkYXJrbmVzcyA+IDAgPyBkYXJrbmVzcyA6IC1kYXJrbmVzcykgKiBkYXJrZW5PcGFjaXR5O1xuICAgIHZhciBjID0gZGFya25lc3MgPiAwID8gMCA6IDI1NTtcblxuICAgIGlmIChkYXJrbmVzcyAhPT0gMCkge1xuICAgICAgci5jb2xvckZpbGxTdHlsZShjb250ZXh0LCBjLCBjLCBjLCBvcGFjaXR5KTtcblxuICAgICAgaWYgKHVzZVBhdGhzKSB7XG4gICAgICAgIGNvbnRleHQuZmlsbChwYXRoKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvbnRleHQuZmlsbCgpO1xuICAgICAgfVxuICAgIH1cbiAgfTtcblxuICB2YXIgZHJhd0JvcmRlciA9IGZ1bmN0aW9uIGRyYXdCb3JkZXIoKSB7XG4gICAgaWYgKGJvcmRlcldpZHRoID4gMCkge1xuICAgICAgY29udGV4dC5saW5lV2lkdGggPSBib3JkZXJXaWR0aDtcbiAgICAgIGNvbnRleHQubGluZUNhcCA9ICdidXR0JztcblxuICAgICAgaWYgKGNvbnRleHQuc2V0TGluZURhc2gpIHtcbiAgICAgICAgLy8gZm9yIHZlcnkgb3V0b2ZkYXRlIGJyb3dzZXJzXG4gICAgICAgIHN3aXRjaCAoYm9yZGVyU3R5bGUpIHtcbiAgICAgICAgICBjYXNlICdkb3R0ZWQnOlxuICAgICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbMSwgMV0pO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdkYXNoZWQnOlxuICAgICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbNCwgMl0pO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdzb2xpZCc6XG4gICAgICAgICAgY2FzZSAnZG91YmxlJzpcbiAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goW10pO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1c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1xuICAgIH0gZWxzZSBpZiAoIWxheW91dFByb3RvLnN0YXJ0ICYmIGxheW91dFByb3RvLnJ1bikge1xuICAgICAgbGF5b3V0UHJvdG8uc3RhcnQgPSBmdW5jdGlvbiAoKSB7XG4gICAgICAgIHRoaXMucnVuKCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfTtcbiAgICB9XG5cbiAgICB2YXIgcmVnU3RvcCA9IHJlZ2lzdHJhbnQucHJvdG90eXBlLnN0b3A7XG5cbiAgICBsYXlvdXRQcm90by5zdG9wID0gZnVuY3Rpb24gKCkge1xuICAgICAgdmFyIG9wdHMgPSB0aGlzLm9wdGlvbnM7XG5cbiAgICAgIGlmIChvcHRzICYmIG9wdHMuYW5pbWF0ZSkge1xuICAgICAgICB2YXIgYW5pcyA9IHRoaXMuYW5pbWF0aW9ucztcblxuICAgICAgICBpZiAoYW5pcykge1xuICAgICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBhbmlzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgYW5pc1tfaV0uc3RvcCgpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAocmVnU3RvcCkge1xuICAgICAgICByZWdTdG9wLmNhbGwodGhpcyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB0aGlzLmVtaXQoJ2xheW91dHN0b3AnKTtcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfTtcblxuICAgIGlmICghbGF5b3V0UHJvdG8uZGVzdHJveSkge1xuICAgICAgbGF5b3V0UHJvdG8uZGVzdHJveSA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICB9O1xuICAgIH1cblxuICAgIGxheW91dFByb3RvLmN5ID0gZnVuY3Rpb24gKCkge1xuICAgICAgcmV0dXJuIHRoaXMuX3ByaXZhdGUuY3k7XG4gICAgfTtcblxuICAgIHZhciBnZXRDeSA9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RCeShzdWJncmFwaHMsIFwib3JkZXJcIiksIGZ1bmN0aW9uKHByZXYsIGN1cnIpIHtcbiAgICAgICAgY2cuc2V0RWRnZShwcmV2LnYsIGN1cnIudik7XG4gICAgICAgIHJldHVybiBjdXJyO1xuICAgICAgfSk7XG4gICAgICByZXR1cm4gbWluO1xuICAgIH1cbiAgICByZXR1cm4gZy5ub2RlKHYpLm9yZGVyO1xuICB9XG4gIGRmcyh1bmRlZmluZWQpO1xuICAqL1xufVxuIiwidmFyIF8gPSByZXF1aXJlKFwiLi4vbG9kYXNoXCIpO1xuXG5tb2R1bGUuZXhwb3J0cyA9IGJhcnljZW50ZXI7XG5cbmZ1bmN0aW9uIGJhcnljZW50ZXIoZywgbW92YWJsZSkge1xuICByZXR1cm4gXy5tYXAobW92YWJsZSwgZnVuY3Rpb24odikge1xuICAgIHZhciBpblYgPSBnLmluRWRnZXModik7XG4gICAgaWYgKCFpblYubGVuZ3RoKSB7XG4gICAgICByZXR1cm4geyB2OiB2IH07XG4gICAgfSBlbHNlIHtcbiAgICAgIHZhciByZXN1bHQgPSBfLnJlZHVjZShpblYsIGZ1bmN0aW9uKGFjYywgZSkge1xuICAgICAgICB2YXIgZWRnZSA9IGcuZWRnZShlKSxcbiAgICAgICAgICBub2RlVSA9IGcubm9kZShlLnYpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIHN1bTogYWNjLnN1bSArIChlZGdlLndlaWdodCAqIG5vZGVVLm9yZGVyKSxcbiAgICAgICAgICB3ZWlnaHQ6IGFjYy53ZWlnaHQgKyBlZGdlLndlaWdodFxuICAgICAgICB9O1xuICAgICAgfSwgeyBzdW06IDAsIHdlaWdodDogMCB9KTtcblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdjogdixcbiAgICAgICAgYmFyeWNlbnRlcjogcmVzdWx0LnN1bSAvIHJlc3VsdC53ZWlnaHQsXG4gICAgICAgIHdlaWdodDogcmVzdWx0LndlaWdodFxuICAgICAgfTtcbiAgICB9XG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AgICBfX19fX19fX18gICAgICB8XG4gICAgKiBcdHwgICAgICAgIHwgICAgICAgfCAgICAgIHxcbiAgICAqIFx0fF9fX19fX19ffF9fX19fX198X19fX19ffFxuICAgICogXHRcdFx0IHwgICAgICAgfFxuICAgICogICAgICAgICAgIHwgICAgICAgfFxuICAgICogICAgICAgIHJlY3RCXG4gICAgKi9cbiAgICBvdmVybGFwQW1vdW50WzBdICs9IE1hdGgubWluKHJlY3RCLmdldFgoKSAtIHJlY3RBLmdldFgoKSwgcmVjdEEuZ2V0UmlnaHQoKSAtIHJlY3RCLmdldFJpZ2h0KCkpO1xuICB9IGVsc2UgaWYgKHJlY3RCLmdldFgoKSA8PSByZWN0QS5nZXRYKCkgJiYgcmVjdEIuZ2V0UmlnaHQoKSA+PSByZWN0QS5nZXRSaWdodCgpKSB7XG4gICAgLyogQ2FzZSB4LjI6XG4gICAgKlxuICAgICogcmVjdEJcbiAgICAqIFx0fCAgICAgICAgICAgICAgICAgICAgICAgfFxuICAgICogXHR8ICAgICAgICBfX19fX19fX18gICAgICB8XG4gICAgKiBcdHwgICAgICAgIHwgICAgICAgfCAgICAgIHxcbiAgICAqIFx0fF9fX19fX19ffF9fX19fX198X19fX19ffFxuICAgICogXHRcdFx0IHwgICAgICAgfFxuICAgICogICAgICAgICAgIHwgICAgICAgfFxuICAgICogICAgICAgIHJlY3RBXG4gICAgKi9cbiAgICBvdmVybGFwQW1vdW50WzBdICs9IE1hdGgubWluKHJlY3RBLmdldFgoKSAtIHJlY3RCLmdldFgoKSwgcmVjdEIuZ2V0UmlnaHQoKSAtIHJlY3RBLmdldFJpZ2h0KCkpO1xuICB9XG4gIGlmIChyZWN0QS5nZXRZKCkgPD0gcmVjdEIuZ2V0WSgpICYmIHJlY3RBLmdldEJvdHRvbSgpID49IHJlY3RCLmdldEJvdHRvbSgpKSB7XG4gICAgLyogQ2FzZSB5LjE6XG4gICAgICogICAgICAgICAgX19fX19fX18gcmVjdEFcbiAgICAgKiAgICAgICAgIHxcbiAgICAgKiAgICAgICAgIHxcbiAgICAgKiAgIF9fX19fX3xfX19fICByZWN0QlxuICAgICAqICAgICAgICAgfCAgICB8XG4gICAgICogICAgICAgICB8ICAgIHxcbiAgICAgKiAgIF9fX19fX3xfX19ffFxuICAgICAqICAgICAgICAgfFxuICAgICAqICAgICAgICAgfFxuICAgICAqICAgICAgICAgfF9fX19fX19fXG4gICAgICpcbiAgICAgKi9cbiAgICBvdmVybGFwQW1vdW50WzFdICs9IE1hdGgubWluKHJlY3RCLmdldFkoKSAtIHJlY3RBLmdldFkoKSwgcmVjdEEuZ2V0Qm90dG9tKCkgLSByZWN0Qi5nZXRCb3R0b20oKSk7XG4gIH0gZWxzZSBpZiAocmVjdEIuZ2V0WSgpIDw9IHJlY3RBLmdldFkoKSAmJiByZWN0Qi5nZXRCb3R0b20oKSA+PSByZWN0QS5nZXRCb3R0b20oKSkge1xuICAgIC8qIENhc2UgeS4yOlxuICAgICogICAgICAgICAgX19fX19fX18gcmVjdEJcbiAgICAqICAgICAgICAgfFxuICAgICogICAgICAgICB8XG4gICAgKiAgIF9fX19fX3xfX19fICByZWN0QVxuICAgICogICAgICAgICB8ICAgIHxcbiAgICAqICAgICAgICAgfCAgICB8XG4gICAgKiAgIF9fX19fX3xfX19ffFxuICAgICogICAgICAgICB8XG4gICAgKiAgICAgICAgIHxcbiAgICAqICAgICAgICAgfF9fX19fX19fXG4gICAgKlxuICAgICovXG4gICAgb3ZlcmxhcEFtb3VudFsxXSArPSBNYXRoLm1pbihyZWN0QS5nZXRZKCkgLSByZWN0Qi5nZXRZKCksIHJlY3RCLmdldEJvdHRvbSgpIC0gcmVjdEEuZ2V0Qm90dG9tKCkpO1xuICB9XG5cbiAgLy8gZmluZCBzbG9wZSBvZiB0aGUgbGluZSBwYXNzZXMgdHdvIGNlbnRlcnNcbiAgdmFyIHNsb3BlID0gTWF0aC5hYnMoKHJlY3RCLmdldENlbnRlclkoKSAtIHJlY3RBLmdldENlbnRlclkoKSkgLyA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ICAgICAgICAgICAgcmVzdWx0WzFdID0gdGVtcFBvaW50QXk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICB0ZW1wUG9pbnRBeCA9IGJvdHRvbUxlZnRBeDtcbiAgICAgICAgICAgIHRlbXBQb2ludEF5ID0gcDF5ICsgLWhhbGZXaWR0aEEgKiBzbG9wZVByaW1lO1xuICAgICAgICAgICAgcmVzdWx0WzBdID0gdGVtcFBvaW50QXg7XG4gICAgICAgICAgICByZXN1bHRbMV0gPSB0ZW1wUG9pbnRBeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBpZiAoIWNsaXBQb2ludEJGb3VuZCkge1xuICAgICAgICBzd2l0Y2ggKGNhcmRpbmFsRGlyZWN0aW9uQikge1xuICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgIHRlbXBQb2ludEJ5ID0gdG9wTGVmdEJ5O1xuICAgICAgICAgICAgdGVtcFBvaW50QnggPSBwMnggKyAtaGFsZkhlaWdodEIgLyBzbG9wZVByaW1lO1xuICAgICAgICAgICAgcmVzdWx0WzJdID0gdGVtcFBvaW50Qng7XG4gICAgICAgICAgICByZXN1bHRbM10gPSB0ZW1wUG9pbnRCeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIHRlbXBQb2ludEJ4ID0gYm90dG9tUmlnaHRCeDtcbiAgICAgICAgICAgIHRlbXBQb2ludEJ5ID0gcDJ5ICsgaGFsZldpZHRoQiAqIHNsb3BlUHJpbWU7XG4gICAgICAgICAgICByZXN1bHRbMl0gPSB0ZW1wUG9pbnRCeDtcbiAgICAgICAgICAgIHJlc3VsdFszXSA9IHRlbXBQb2ludEJ5O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgdGVtcFBvaW50QnkgPSBib3R0b21MZWZ0Qn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AgICAgai0tO1xuICAgICAgICAgICAgICAgIH13aGlsZSAodGhpcy5jb21wYXJlRnVuY3Rpb24odGhpcy5fZ2V0KEEsIGkpLCB4KSkge1xuICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgfWlmIChpIDwgaikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLl9zd2FwKEEsIGksIGopO1xuICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgIGotLTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgcmV0dXJuIGo7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9LCB7XG4gICAgICAgIGtleTogJ19nZXQnLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX2dldChvYmplY3QsIGluZGV4KSB7XG4gICAgICAgICAgICBpZiAob2JqZWN0IGluc3RhbmNlb2YgTGlua2VkTGlzdCkgcmV0dXJuIG9iamVjdC5nZXRfb2JqZWN0X2F0KGluZGV4KTtlbHNlIHJldHVybiBvYmplY3RbaW5kZXhdO1xuICAgICAgICB9XG4gICAgfSwge1xuICAgICAgICBrZXk6ICdfc2V0JyxcbiAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIF9zZXQob2JqZWN0LCBpbmRleCwgdmFsdWUpIHtcbiAgICAgICAgICAgIGlmIChvYmplY3QgaW5zdGFuY2VvZiBMaW5rZWRMaXN0KSBvYmplY3Quc2V0X29iamVjdF9hdChpbmRleCwgdmFsdWUpO2Vsc2Ugb2JqZWN0W2luZGV4XSA9IHZhbHVlO1xuICAgICAgICB9XG4gICAgfSwge1xuICAgICAgICBrZXk6ICdfc3dhcCcsXG4gICAgICAgIHZhbHVlOiBmdW5jdGlvbiBfc3dhcChBLCBpLCBqKSB7XG4gICAgICAgICAgICB2YXIgdGVtcCA9IHRoaXMuX2dldChBLCBpKTtcbiAgICAgICAgICAgIHRoaXMuX3NldChBLCBpLCB0aGlzLl9nZXQoQSwgaikpO1xuICAgICAgIC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iAobGhzLCByaHMpIHtcbiAgICAgICAgcmV0dXJuIGxocyAmJiByaHM7XG4gICAgICB9KGsgPCBuY3QsIHRoaXMuc1trXSAhPT0gMC4wKSkge1xuICAgICAgICB2YXIgdCA9IDA7XG4gICAgICAgIGZvciAodmFyIF9pMiA9IGs7IF9pMiA8IHRoaXMubTsgX2kyKyspIHtcbiAgICAgICAgICB0ICs9IEFbX2kyXVtrXSAqIEFbX2kyXVtqXTtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICAgIHQgPSAtdCAvIEFba11ba107XG4gICAgICAgIGZvciAodmFyIF9pMyA9IGs7IF9pMyA8IHRoaXMubTsgX2kzKyspIHtcbiAgICAgICAgICBBW19pM11bal0gKz0gdCAqIEFbX2kzXVtrXTtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICB9XG4gICAgICBlW2pdID0gQVtrXVtqXTtcbiAgICB9XG4gICAgO1xuICAgIGlmIChmdW5jdGlvbiAobGhzLCByaHMpIHtcbiAgICAgIHJldHVybiBsaHMgJiYgcmhzO1xuICAgIH0od2FudHUsIGsgPCBuY3QpKSB7XG4gICAgICBmb3IgKHZhciBfaTQgPSBrOyBfaTQgPCB0aGlzLm07IF9pNCsrKSB7XG4gICAgICAgIHRoaXMuVVtfaTRdW2tdID0gQVtfaTRdW2tdO1xuICAgICAgfVxuICAgICAgO1xuICAgIH1cbiAgICBpZiAoayA8IG5ydCkge1xuICAgICAgZVtrXSA9IDA7XG4gICAgICBmb3IgKHZhciBfaTUgPSBrICsgMTsgX2k1IDwgdGhpcy5uOyBfaTUrKykge1xuICAgICAgICBlW2tdID0gU1ZELmh5cG90KGVba10sIGVbX2k1XSk7XG4gICAgICB9XG4gICAgICA7XG4gICAgICBpZiAoZVtrXSAhPT0gMC4wKSB7XG4gICAgICAgIGlmIChlW2sgKyAxXSA8IDAuMCkge1xuICAgICAgICAgIGVba10gPSAtZVtrXTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKHZhciBfaTYgPSBrICsgMTsgX2k2IDwgdGhpcy5uOyBfaTYrKykge1xuICAgICAgICAgIGVbX2k2XSAvPSBlW2tdO1xuICAgICAgICB9XG4gICAgICAgIDtcbiAgICAgICAgZVtrICsgMV0gKz0gMS4wO1xuICAgICAgfVxuICAgICAgZVtrXSA9IC1lW2tdO1xuICAgICAgaWYgKGZ1bmN0aW9uIChsaHMsIHJocykge1xuICAgICAgICByZXR1cm4gbGhzICYmIHJocztcbiAgICAgIH0oayArIDEgPCB0aGlzLm0sIGVba10gIT09IDAuMCkpIHtcbiAgICAgICAgZm9yICh2YXIgX2k3ID0gayArIDE7IF9pNyA8IHRoaXMubTsgX2k3KyspIHtcbiAgICAgICAgICB3b3JrW19pN10gPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgO1xuICAgICAgICBmb3IgKHZhciBfaiA9IGsgKyAxOyBfaiA8IHRoaXMubjsgX2orKykge1xuICAgICAgICAgIGZvciAodmFyIF9pOCA9IGsgKyAxOyBfaTggPCB0aGlzLm07IF9pOCsrKSB7XG4gICAgICAgICAgICB3b3JrW19pOF0gKz0gZVtfal0gKiBBW19pOF1bX2pdO1xuICAgICAgICAgIH1cbiAgICAgICAgICA7XG4gICAgICAgIH1cbiAgICAgICAgO1xuICAgICAgICBmb3IgKHZhciBfajIgPSBrICsgMTsgX2oyIDwgdGhpcy5uOyBfajIrKykge1xuICAgICAgICAgIHZhciBfdCA9IC1lW19qMl0gLyBlW2sgKyAxXTtcbiAgICAgICAgICBmb3IgKHZhciBfaTkgPSBrICsgMTsgX2k5IDwgdGhpcy5tOyBfaTkrKykge1xuICAgICAgICAgICAgQVtfaTldW19qMl0gKz0gX3QgKiB3b3JrW19pOV07XG4gICAgICAgICAgfVxuICAgICAgICAgIDtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICB9XG4gICAgICBpZiAod2FudHYpIHtcbiAgICAgICAgZm9yICh2YXIgX2kxMCA9IGsgKyAxOyBfaTEwIDwgdGhpcy5uOyBfaTEwKyspI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gX2kxMyA9IF9rOyBfaTEzIDwgdGhpcy5tOyBfaTEzKyspIHtcbiAgICAgICAgICAgIHRoaXMuVVtfaTEzXVtfajRdICs9IF90MiAqIHRoaXMuVVtfaTEzXVtfa107XG4gICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgZm9yICh2YXIgX2kxNCA9IF9rOyBfaTE0IDwgdGhpcy5tOyBfaTE0KyspIHtcbiAgICAgICAgICB0aGlzLlVbX2kxNF1bX2tdID0gLXRoaXMuVVtfaTE0XVtfa107XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuVVtfa11bX2tdID0gMS4wICsgdGhpcy5VW19rXVtfa107XG4gICAgICAgIGZvciAodmFyIF9pMTUgPSAwOyBfaTE1IDwgX2sgLSAxOyBfaTE1KyspIHtcbiAgICAgICAgICB0aGlzLlVbX2kxNV1bX2tdID0gMC4wO1xuICAgICAgICB9O1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgZm9yICh2YXIgX2kxNiA9IDA7IF9pMTYgPCB0aGlzLm07IF9pMTYrKykge1xuICAgICAgICAgIHRoaXMuVVtfaTE2XVtfa10gPSAwLjA7XG4gICAgICAgIH07XG4gICAgICAgIHRoaXMuVVtfa11bX2tdID0gMS4wO1xuICAgICAgfVxuICAgIH07XG4gIH1cbiAgaWYgKHdhbnR2KSB7XG4gICAgZm9yICh2YXIgX2syID0gdGhpcy5uIC0gMTsgX2syID49IDA7IF9rMi0tKSB7XG4gICAgICBpZiAoZnVuY3Rpb24gKGxocywgcmhzKSB7XG4gICAgICAgIHJldHVybiBsaHMgJiYgcmhzO1xuICAgICAgfShfazIgPCBucnQsIGVbX2syXSAhPT0gMC4wKSkge1xuICAgICAgICBmb3IgKHZhciBfajUgPSBfazIgKyAxOyBfajUgPCBudTsgX2o1KyspIHtcbiAgICAgICAgICB2YXIgX3QzID0gMDtcbiAgICAgICAgICBmb3IgKHZhciBfaTE3ID0gX2syICsgMTsgX2kxNyA8IHRoaXMubjsgX2kxNysrKSB7XG4gICAgICAgICAgICBfdDMgKz0gdGhpcy5WW19pMTddW19rMl0gKiB0aGlzLlZbX2kxN11bX2o1XTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIF90MyA9IC1fdDMgLyB0aGlzLlZbX2syICsgMV1bX2syXTtcbiAgICAgICAgICBmb3IgKHZhciBfaTE4ID0gX2syICsgMTsgX2kxOCA8IHRoaXMubjsgX2kxOCsrKSB7XG4gICAgICAgICAgICB0aGlzLlZbX2kxOF1bX2o1XSArPSBfdDMgKiB0aGlzLlZbX2kxOF1bX2syXTtcbiAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgfVxuICAgICAgZm9yICh2YXIgX2kxOSA9IDA7IF9pMTkgPCB0aGlzLm47IF9pMTkrKykge1xuICAgICAgICB0aGlzLlZbX2kxOV1bX2syXSA9IDAuMDtcbiAgICAgIH07XG4gICAgICB0aGlzLlZbX2syXVtfazJdID0gMS4wO1xuICAgIH07XG4gIH1cbiAgdmFyIHBwID0gcCAtIDE7XG4gIHZhciBpdGVyID0gMDtcbiAgdmFyIGVwcyA9IE1hdGgucG93KDIuMCwgLTUyLjApO1xuICB2YXIgdGlueSA9IE1hdGgucG93KDIuMCwgLTk2Ni4wKTtcbiAgd2hpbGUgKHAgPiAwKSB7XG4gICAgdmFyIF9rMyA9IHZvaWQgMDtcbiAgICB2YXIga2FzZSA9IHZvaWQgMDtcbiAgICBmb3IgKF9rMyA9IHAgLSAyOyBfazMgPj0gLTE7IF9rMy0tKSB7XG4gICAgICBpZiAoX2szID09PSAtMSkge1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICAgIGlmIChNYXRoLmFicyhlW19rM10pIDw9IHRpbnkgKyBlcHMgKiAoTWF0aC5hYnModGhpcy5zW19rM10pICsgTWF0aC5hYnModGhpcy5zW19rMyArIDFdKSkpIHtcbiAgICAgICAgZVtfazNdID0gMC4wO1xuICAgICAgICBicmVhaztcbiAgICAgIH1cbiAgICB9O1xuICAgIGlmIChfazMgPT09IHAgLSAyKSB7XG4gICAgICBrYXNlID0gNDtcbiAgICB9IGVsc2Uge1xuICAgICAgdmFyIGtzID0gdm9pZCAwO1xuICAgICAgZm9yIChrcyA9IHAgLSAxOyBrcyA+PSBfazM7IGtzLS0pIHtcbiAgICAgICAgaWYgKGtzID09PSBfazMpIHtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICB2YXIgX3Q0ID0gKGtzICE9PSBwID8gTWF0aC5hYnMoZVtrc10pIDogMC4wKSArIChrcyAhPT0gX2szICsgMSA/IE1hdGguYWJzKGVba3MgLSAxXSkgOiAwLjApO1xuICAgICAgICBpZiAoTWF0aC5hYnModGhpcy5zW2tzXSkgPD0gdGlueSArIGVwcyAqIF90NCkge1xuICAgICAgICAgIHRoaXMuc1trc10gPSAwLjA7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH07XG4gICAgICBpZiAoa3MgPT09IF9rMykge1xuICAgICAgICBrYXNlID0gMztcbiAgICAgIH0gZWxzZSBpZiAoa3MgPT09IHAgLSAxKSB7XG4gICAgICAgIGthc2UgPSAxO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAga2FzZSA9IDI7XG4gICAgICAgIF9rMyA9IGtzO1xuICAgICAgfVxuICAgIH1cbiAgICBfazMrKztcbiAgICBzd2l0Y2ggKGthc2UpIHtcbiAgICAgIGNhc2UgMTpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBmID0gZVtwIC0gMl07XG4gICAgICAgICAgZVtwIC0gMl0gPSAwLjA7XG4gICAgICAgICAgZm9yICh2YXIgX2o2ID0gcCAtIDI7IF9qNiA+PSBfazM7IF9qNi0tKSB7XG4gICAgICAgICAgICB2YXIgX3Q1ID0gU1ZELmh5cG90KHRoaXMuc1tfajZdLCBmKTtcbiAgICAgICAgICAgIHZhciBjcyA9IHRoaXMuc1tfajZdIC8gX3Q1O1xuICAgICAgICAgICAgdmFyIHNuID0gZiAvIF90NTtcbiAgICAgICAgICAgIHRoaXMuc1tfajZdID0gX3Q1O1xuICAgICAgICAgICAgaWYgKF9qNiAhPT0gX2szKSB7XG4gICAgICAgICAgICAgIGYgPSAtc24gKiBlW19qNiAtIDFdO1xuICAgICAgICAgICAgICBlW19qNiAtIDFdID0gY3MgKiBlW19qNiAtIDFdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHdhbnR2KSB7XG4gICAgICAgICAgICAgIGZvciAodmFyIF9pMjAgPSAwOyBfaTIwIDwgdGhpcy5uOyBfaTIwKyspIHtcbiAgICAgICAgICAgICAgICBfdDUgPSBjcyAqIHRoaXMuVltfaTIwXVtfajZdICsgc24gKiB0aGlzLlZbX2kyMF1bcCAtIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTIwXVtwIC0gMV0gPSAtc24gKiB0aGlzLlZbX2kyMF1bX2o2XSArIGNzICogdGhpcy5WW19pMjBdW3AgLSAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlZbX2kyMF1bX2o2XSA9IF90NTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgMjpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBfZiA9IGVbX2szIC0gMV07XG4gICAgICAgICAgZVtfazMgLSAxXSA9IDAuMDtcbiAgICAgICAgICBmb3IgKHZhciBfajcgPSBfazM7IF9qNyA8IHA7IF9qNysrKSB7XG4gICAgICAgICAgICB2YXIgX3Q2ID0gU1ZELmh5cG90KHRoaXMuc1tfajddLCBfZik7XG4gICAgICAgICAgICB2YXIgX2NzID0gdGhpcy5zW19qN10gLyBfdDY7XG4gICAgICAgICAgICB2YXIgX3NuID0gX2YgLyBfdDY7XG4gICAgICAgICAgICB0aGlzLnNbX2o3XSA9IF90NjtcbiAgICAgICAgICAgIF9mID0gLV9zbiAqIGVbX2o3XTtcbiAgICAgICAgICAgIGVbX2o3XSA9IF9jcyAqIGVbX2o3XTtcbiAgICAgICAgICAgIGlmICh3YW50dSkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTIxID0gMDsgX2kyMSA8IHRoaXMubTsgX2kyMSsrKSB7XG4gICAgICAgICAgICAgICAgX3Q2ID0gX2NzICogdGhpcy5VW19pMjFdW19qN10gKyBfc24gKiB0aGlzLlVbX2kyMV1bX2szIC0gMV07XG4gICAgICAgICAgICAgICAgdGhpcy5VW19pMjFdW19rMyAtIDFdID0gLV9zbiAqIHRoaXMuVVtfaTIxXVtfajddICsgX2NzICogdGhpcy5VW19pMjFdW19rMyAtIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVVtfaTIxXVtfajddID0gX3Q2O1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAzOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHNjYWxlID0gTWF0aC5tYXgoTWF0aC5tYXgoTWF0aC5tYXgoTWF0aC5tYXgoTWF0aC5hYnModGhpcy5zW3AgLSAxXSksIE1hdGguYWJzKHRoaXMuc1twIC0gMl0pKSwgTWF0aC5hYnMoZVtwIC0gMl0pKSwgTWF0aC5hYnModGhpcy5zW19rM10pKSwgTWF0aC5hYnMoZVtfazNdKSk7XG4gICAgICAgICAgdmFyIHNwID0gdGhpcy5zW3AgLSAxXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBzcG0xID0gdGhpcy5zW3AgLSAyXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBlcG0xID0gZVtwIC0gMl0gLyBzY2FsZTtcbiAgICAgICAgICB2YXIgc2sgPSB0aGlzLnNbX2szXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBlayA9IGVbX2szXSAvIHNjYWxlO1xuICAgICAgICAgIHZhciBiID0gKChzcG0xICsgc3ApICogKHNwbTEgLSBzcCkgKyBlcG0xICogZXBtMSkgLyAyLjA7XG4gICAgICAgICAgdmFyIGMgPSBzcCAqIGVwbTEgKiAoc3AgKiBlcG0xKTtcbiAgICAgICAgICB2YXIgc2hpZnQgPSAwLjA7XG4gICAgICAgICAgaWYgKGZ1bmN0aW9uIChsaHMsIHJocykge1xuICAgICAgICAgICAgcmV0dXJuIGxocyB8fCByaHM7XG4gICAgICAgICAgfShiICE9PSAwLjAsIGMgIT09IDAuMCkpIHtcbiAgICAgICAgICAgIHNoaWZ0ID0gTWF0aC5zcXJ0KGIgKiBiICsgYyk7XG4gICAgICAgICAgICBpZiAoYiA8IDAuMCkge1xuICAgICAgICAgICAgICBzaGlmdCA9IC1zaGlmdDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNoaWZ0ID0gYyAvIChiICsgc2hpZnQpO1xuICAgICAgICAgIH1cbiAgICAgICAgICB2YXIgX2YyID0gKHNrICsgc3ApICogKHNrIC0gc3ApICsgc2hpZnQ7XG4gICAgICAgICAgdmFyIGcgPSBzayAqIGVrO1xuICAgICAgICAgIGZvciAodmFyIF9qOCA9IF9rMzsgX2o4IDwgcCAtIDE7IF9qOCsrKSB7XG4gICAgICAgICAgICB2YXIgX3Q3ID0gU1ZELmh5cG90KF9mMiwgZyk7XG4gICAgICAgICAgICB2YXIgX2NzMiA9IF9mMiAvIF90NztcbiAgICAgICAgICAgIHZhciBfc24yID0gZyAvIF90NztcbiAgICAgICAgICAgIGlmIChfajggIT09IF9rMykge1xuICAgICAgICAgICAgICBlW19qOCAtIDFdID0gX3Q3O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgX2YyID0gX2NzMiAqIHRoaXMuc1tfajhdICsgX3NuMiAqIGVbX2o4XTtcbiAgICAgICAgICAgIGVbX2o4XSA9IF9jczIgKiBlW19qOF0gLSBfc24yICogdGhpcy5zW19qOF07XG4gICAgICAgICAgICBnID0gX3NuMiAqIHRoaXMuc1tfajggKyAxXTtcbiAgICAgICAgICAgIHRoaXMuc1tfajggKyAxXSA9IF9jczIgKiB0aGlzLnNbX2o4ICsgMV07XG4gICAgICAgICAgICBpZiAod2FudHYpIHtcbiAgICAgICAgICAgICAgZm9yICh2YXIgX2kyMiA9IDA7IF9pMjIgPCB0aGlzLm47IF9pMjIrKykge1xuICAgICAgICAgICAgICAgIF90NyA9IF9jczIgKiB0aGlzLlZbX2kyMl1bX2o4XSArIF9zbjIgKiB0aGlzLlZbX2kyMl1bX2o4ICsgMV07XG4gICAgICAgICAgICAgICAgdGhpcy5WW19pMjJdW19qOCArIDFdID0gLV9zbjIgKiB0aGlzLlZbX2kyMl1bX2o4XSArIF9jczIgKiB0aGlzLlZbX2kyMl1bX2o4ICsgMV07XG4gICAgICAgICAgICAgICAgdGhpcy5WW19pMjJdW19qOF0gPSBfdDc7XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfdDcgPSBTVkQuaHlwb3QoX2YyLCBnKTtcbiAgICAgICAgICAgIF9jczIgPSBfZjIgLyBfdDc7XG4gICAgICAgICAgICBfc24yID0gZyAvIF90NztcbiAgICAgICAgICAgIHRoaXMuc1tfajhdID0gX3Q3O1xuICAgICAgICAgICAgX2YyID0gX2NzMiAqIGVbX2o4XSArIF9zbjIgKiB0aGlzLnNbX2o4ICsgMV07XG4gICAgICAgICAgICB0aGlzLnNbX2o4ICsgMV0gPSAtX3NuMiAqIGVbX2o4XSArIF9jczIgKiB0aGlzLnNbX2o4ICsgMV07XG4gICAgICAgICAgICBnID0gX3NuMiAqIGVbX2o4ICsgMV07XG4gICAgICAgICAgICBlW19qOCArIDFdID0gX2NzMiAqIGVbX2o4ICsgMV07XG4gICAgICAgICAgICBpZiAod2FudHUgJiYgX2o4IDwgdGhpcy5tIC0gMSkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTIzID0gMDsgX2kyMyA8IHRoaXMubTsgX2kyMysrKSB7XG4gICAgICAgICAgICAgICAgX3Q3ID0gX2NzMiAqIHRoaXMuVVtfaTIzXVtfajhdICsgX3NuMiAqIHRoaXMuVVtfaTIzXVtfajggKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyM11bX2o4ICsgMV0gPSAtX3NuMiAqIHRoaXMuVVtfaTIzXVtfajhdICsgX2NzMiAqIHRoaXMuVVtfaTIzXVtfajggKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyM11bX2o4XSA9IF90NztcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9O1xuICAgICAgICAgIGVbcCAtIDJdID0gX2YyO1xuICAgICAgICAgIGl0ZXIgPSBpdGVyICsgMTtcbiAgICAgICAgfTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlIDQ6XG4gICAgICAgIHtcbiAgICAgICAgICBpZiAodGhpcy5zW19rM10gPD0gMC4wKSB7XG4gICAgICAgICAgICB0aGlzLnNbX2szXSA9IHRoaXMuc1tfazNdIDwgMC4wID8gLXRoaXMuc1tfazNdIDogMC4wO1xuICAgICAgICAgICAgaWYgKHdhbnR2KSB7XG4gICAgICAgICAgICAgIGZvciAodmFyIF9pMjQgPSAwOyBfaTI0IDw9IHBwOyBfaTI0KyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLlZbX2kyNF1bX2szXSA9IC10aGlzLlZbX2kyNF1bX2szXTtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgd2hpbGUgKF9rMyA8IHBwKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5zW19rM10gPj0gdGhpcy5zW19rMyArIDFdKSB7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIF90OCA9IHRoaXMuc1tfazNdO1xuICAgICAgICAgICAgdGhpcy5zW19rM10gPSB0aGlzLnNbX2szICsgMV07XG4gICAgICAgICAgICB0aGlzLnNbX2szICsgMV0gPSBfdDg7XG4gICAgICAgICAgICBpZiAod2FudHYgJiYgX2szIDwgdGhpcy5uIC0gMSkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTI1ID0gMDsgX2kyNSA8IHRoaXMubjsgX2kyNSsrKSB7XG4gICAgICAgICAgICAgICAgX3Q4ID0gdGhpcy5WW19pMjVdW19rMyArIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTI1XVtfazMgKyAxXSA9IHRoaXMuVltfaTI1XVtfazNdO1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTI1XVtfazNdID0gX3Q4O1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHdhbnR1ICYmIF9rMyA8IHRoaXMubSAtIDEpIHtcbiAgICAgICAgICAgICAgZm9yICh2YXIgX2kyNiA9IDA7IF9pMjYgPCB0aGlzLm07IF9pMjYrKykge1xuICAgICAgICAgICAgICAgIF90OCA9IHRoaXMuVVtfaTI2XVtfazMgKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyNl1bX2szICsgMV0gPSB0aGlzLlVbX2kyNl1bX2szXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyNl1bX2szXSA9IF90ODtcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF9rMysrO1xuICAgICAgICAgIH07XG4gICAgICAgICAgaXRlciA9IDA7XG4gICAgICAgICAgcC0tO1xuICAgICAgICB9O1xuICAgICAgICBicmVhaztcbiAgICB9XG4gIH07XG4gIHZhciByZXN1bHQgPSB7IFU6IHRoaXMuVSwgVjogdGhpcy5WLCBTOiB0aGlzLnMgfTtcbiAgcmV0dXJuIHJlc3VsdDtcbn07XG5cbi8vIHNxcnQoYV4yICsgYl4yKSB3aXRob3V0IHVuZGVyL292ZXJmbG93LlxuU1ZELmh5cG90ID0gZnVuY3Rpb24gKGEsIGIpIHtcbiAgdmFyIHIgPSB2b2lkIDA7XG4gIGlmIChNYXRoLmFicyhhKSA+IE1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AgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHdoaWxlIChpblByb2Nlc3NBbGlnbm1lbnRzWzBdKSB7XG4gICAgICAgICAgICAgICAgdmFyIGN1cnJlbnQgPSBpblByb2Nlc3NBbGlnbm1lbnRzWzBdO1xuICAgICAgICAgICAgICAgIHZhciBkaXJlY3Rpb25zID0gdGhpcy50cmFjZWJhY2tHcmlkW2N1cnJlbnQucG9zWzBdXVtjdXJyZW50LnBvc1sxXV07XG5cbiAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uc1swXSkge1xuICAgICAgICAgICAgICAgICAgICBpblByb2Nlc3NBbGlnbm1lbnRzLnB1c2goeyBwb3M6IFtjdXJyZW50LnBvc1swXSAtIDEsIGN1cnJlbnQucG9zWzFdIC0gMV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXExOiB0aGlzLnNlcXVlbmNlMVtjdXJyZW50LnBvc1swXSAtIDFdICsgY3VycmVudC5zZXExLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VxMjogdGhpcy5zZXF1ZW5jZTJbY3VycmVudC5wb3NbMV0gLSAxXSArIGN1cnJlbnQuc2VxMlxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGRpcmVjdGlvbnNbMV0pIHtcbiAgICAgICAgICAgICAgICAgICAgaW5Qcm9jZXNzQWxpZ25tZW50cy5wdXNoKHsgcG9zOiBbY3VycmVudC5wb3NbMF0gLSAxLCBjdXJyZW50LnBvc1sxXV0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXExOiB0aGlzLnNlcXVlbmNlMVtjdXJyZW50LnBvc1swXSAtIDFdICsgY3VycmVudC5zZXExLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VxMjogJy0nICsgY3VycmVudC5zZXEyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uc1syXSkge1xuICAgICAgICAgICAgICAgICAgICBpblByb2Nlc3NBbGlnbm1lbnRzLnB1c2goeyBwb3M6IFtjdXJyZW50LnBvc1swXSwgY3VycmVudC5wb3NbMV0gLSAxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcTE6ICctJyArIGN1cnJlbnQuc2VxMSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcTI6IHRoaXMuc2VxdWVuY2UyW2N1cnJlbnQucG9zWzFdIC0gMV0gKyBjdXJyZW50LnNlcTJcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnQucG9zWzBdID09PSAwICYmIGN1cnJlbnQucG9zWzFdID09PSAwKSB0aGlzLmFsaWdubWVudHMucHVzaCh7IHNlcXVlbmNlMTogY3VycmVudC5zZXExLFxuICAgICAgICAgICAgICAgICAgICBzZXF1ZW5jZTI6IGN1cnJlbnQuc2VxMlxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgaW5Qcm9jZXNzQWxpZ25tZW50cy5zaGlmdCgpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hbGlnbm1lbnRzO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gSGVscGVyIEZ1bmN0aW9uc1xuXG4gICAgfSwge1xuICAgICAgICBrZXk6IFwiZ2V0QWxsSW5kZXhlc1wiLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0QWxsSW5kZXhlcyhhcnIsIHZhbCkge1xuICAgICAgICAgICAgdmFyIGluZGV4ZXMgPSBbXSxcbiAgICAgICAgICAgICAgICBpID0gLTE7XG4gICAgICAgICAgICB3aGlsZSAoKGkgPSBhcnIuaW5kZXhPZih2YWwsIGkgKyAxKSkgIT09IC0xKSB7XG4gICAgICAgICAgICAgICAgaW5kZXhlcy5wdXNoKGkpO1xuICA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BleHBhbmRlZCA/ICdyb3RhdGVaKDkwZGVnKScgOiAncm90YXRlWigwZGVnKScsXG4gICAgICAgICAgdHJhbnNmb3JtOiBleHBhbmRlZCA/ICdyb3RhdGVaKDkwZGVnKScgOiAncm90YXRlWigwZGVnKScsXG4gICAgICAgICAgdHJhbnNmb3JtT3JpZ2luOiAnNDUlIDUwJScsXG4gICAgICAgICAgV2Via2l0VHJhbnNmb3JtT3JpZ2luOiAnNDUlIDUwJScsXG4gICAgICAgICAgTW96VHJhbnNmb3JtT3JpZ2luOiAnNDUlIDUwJScsXG4gICAgICAgICAgcG9zaXRpb246ICdyZWxhdGl2ZScsXG4gICAgICAgICAgbGluZUhlaWdodDogJzEuMWVtJyxcbiAgICAgICAgICBmb250U2l6ZTogJzAuNzVlbSdcbiAgICAgICAgfSlcbiAgICAgIH07XG4gICAgfSxcbiAgICBhcnJvd0NvbnRhaW5lcjogZnVuY3Rpb24gYXJyb3dDb250YWluZXIoX3JlZjQsIGFycm93U3R5bGUpIHtcbiAgICAgIHZhciBzdHlsZSA9IF9yZWY0LnN0eWxlO1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgc3R5bGU6IF9vYmplY3RTcHJlYWQoX29iamVjdFNwcmVhZCh7fSwgc3R5bGUpLCB7fSwge1xuICAgICAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgICAgIHBhZGRpbmdSaWdodDogJzAuNWVtJyxcbiAgICAgICAgICBwYWRkaW5nTGVmdDogYXJyb3dTdHlsZSA9PT0gJ2RvdWJsZScgPyAnMWVtJyA6IDAsXG4gICAgICAgICAgY3Vyc29yOiAncG9pbnRlcidcbiAgICAgICAgfSlcbiAgICAgIH07XG4gICAgfSxcbiAgICBhcnJvd1NpZ246IHtcbiAgICAgIGNvbG9yOiBjb2xvcnMuQVJST1dfQ09MT1JcbiAgICB9LFxuICAgIGFycm93U2lnbklubmVyOiB7XG4gICAgICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcb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yBmcm9tLFxuICAgICAgICAgIHZhbHVlOiB2YWxcbiAgICAgICAgfTtcbiAgICAgIH0pXG4gICAgfTtcbiAgfSBlbHNlIHtcbiAgICB2YXIgaWR4ID0gMDtcbiAgICB2YXIgZW50cmllcyA9IFtdO1xuICAgIHZhciBkb25lID0gdHJ1ZTtcbiAgICB2YXIgaXNNYXAgPSBpc0l0ZXJhYmxlTWFwKGNvbGxlY3Rpb24pO1xuXG4gICAgdmFyIF9pdGVyYXRvciA9IF9jcmVhdGVGb3JPZkl0ZXJhdG9ySGVscGVyKGNvbGxlY3Rpb24pLFxuICAgICAgICBfc3RlcDtcblxuICAgIHRyeSB7XG4gICAgICBmb3IgKF9pdGVyYXRvci5zKCk7ICEoX3N0ZXAgPSBfaXRlcmF0b3IubigpKS5kb25lOykge1xuICAgICAgICB2YXIgaXRlbSA9IF9zdGVwLnZhbHVlO1xuXG4gICAgICAgIGlmIChpZHggPiB0bykge1xuICAgICAgICAgIGRvbmUgPSBmYWxzZTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChmcm9tIDw9IGlkeCkge1xuICAgICAgICAgIGlmIChpc01hcCAmJiBBcnJheS5pc0FycmF5KGl0ZW0pKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGl0ZW1bMF0gPT09ICdzdHJpbmcnIHx8IHR5cGVvZiBpdGVtWzBdID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgICBlbnRyaWVzLnB1c2goe1xuICAgICAgICAgICAgICAgIGtleTogaXRlbVswXSxcbiAgICAgICAgICAgICAgICB2YWx1ZTogaXRlbVsxXVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIGVudHJpZXMucHVzaCh7XG4gICAgICAgICAgICAgICAga2V5OiBcIltlbnRyeSBcIi5jb25jYXQoaWR4LCBcIl1cIiksXG4gICAgICAgICAgICAgICAgdmFsdWU6IHtcbiAgICAgICA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pdGVtc1t0eXBlXSA9IHt9O1xuICAgICAgICAgICAgc2V0Ll9pdGVtc1t0eXBlXVtpdGVtXSA9IHRydWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9IGVsc2UgaWYgKGl0ZW0gaW4gc2V0Ll9pdGVtc1t0eXBlXSkge1xuICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChzaG91bGRBZGQpIHtcbiAgICAgICAgICAgIHNldC5faXRlbXNbdHlwZV1baXRlbV0gPSB0cnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgY2FzZSAnYm9vbGVhbic6XG4gICAgICAvLyBzZXQuX2l0ZW1zWydib29sZWFuJ10gaG9sZHMgYSB0d28gZWxlbWVudCBhcnJheVxuICAgICAgLy8gcmVwcmVzZW50aW5nIFsgZmFsc2VFeGlzdHMsIHRydWVFeGlzdHMgXVxuICAgICAgaWYgKHR5cGUgaW4gc2V0Ll9pdGVtcykge1xuICAgICAgICB2YXIgYklkeCA9IGl0ZW0gPyAxIDogMDtcblxuICAgICAgICBpZiAoc2V0Ll9pdGVtc1t0eXBlXVtiSWR4XSkge1xuICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChzaG91bGRBZGQpIHtcbiAgICAgICAgICAgIHNldC5faXRlbXNbdHlwZV1bYklkeF0gPSB0cnVlO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgIHNldC5faXRlbXNbdHlwZV0gPSBpdGVtID8gW2ZhbHNlLCB0cnVlXSA6IFt0cnVlLCBmYWxzZV07XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICB9XG5cbiAgICBjYXNlICdmdW5jdGlvbic6XG4gICAgICAvLyBjb21wYXJlIGZ1bmN0aW9ucyBmb3IgcmVmZXJlbmNlIGVxdWFsaXR5XG4gICAgICBpZiAoc2V0Ll9uYXRpdmVTZXQgIT09IG51bGwpIHtcbiAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgIHByZXZTaXplID0gc2V0Ll9uYXRpdmVTZXQuc2l6ZTtcblxuICAgICAgICAgIHNldC5fbmF0aXZlU2V0LmFkZChpdGVtKTtcblxuICAgICAgICAgIG5ld1NpemUgPSBzZXQuX25hdGl2ZVNldC5zaXplO1xuICAgICAgICAgIHJldHVybiBuZXdTaXplID09PSBwcmV2U2l6ZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICByZXR1cm4gc2V0Ll9uYXRpdmVTZXQuaGFzKGl0ZW0pO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpZiAoISh0eXBlIGluIHNldC5faXRlbXMpKSB7XG4gICAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgICAgc2V0Ll9pdGVtc1t0eXBlXSA9IFtpdGVtXTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIV9pbmNsdWRlcyhpdGVtLCBzZXQuX2l0ZW1zW3R5cGVdKSkge1xuICAgICAgICAgIGlmIChzaG91bGRBZGQpIHtcbiAgICAgICAgICAgIHNldC5faXRlbXNbdHlwZV0ucHVzaChpdGVtKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cblxuICAgIGNhc2UgJ3VuZGVmaW5lZCc6XG4gICAgICBpZiAoc2V0Ll9pdGVtc1t0eXBlXSkge1xuICA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JldHVybiBmbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfTtcblxuICAgIGNhc2UgMzpcbiAgICAgIHJldHVybiBmdW5jdGlvbiAoYTAsIGExLCBhMikge1xuICAgICAgICByZXR1cm4gZm4uYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH07XG5cbiAgICBjYXNlIDQ6XG4gICAgICByZXR1cm4gZnVuY3Rpb24gKGEwLCBhMSwgYTIsIGEzKSB7XG4gICAgICAgIHJldHVybiBmbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfTtcblxuICAgIGNhc2UgNTpcbiAgICAgIHJldHVybiBmdW5jdGlvbiAoYTAsIGExLCBhMiwgYTMsIGE0KSB7XG4gICAgICAgIHJldHVybiBmbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfTtcblxuICAgIGNhc2UgNjpcbiAgICAgIHJldHVybiBmdW5jdGlvbiAoYTAsIGExLCBhMiwgYTMsIGE0LCBhNSkge1xuICAgICAgICByZXR1cm4gZm4uYXBwbHkodGhpcywgYXJndW1lbnRzKTtcbiAgICAgIH07XG5cbiAgICBjYXNlIDc6XG4gICAgICByZXR1cm4gZnVuY3Rpb24gKGEwLCBhMSwgYTIsIGEzLCBhNCwgYTUsIGE2KSB7XG4gICAgICAgIHJldHVybiBmbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfTtcblxuICAgIGNhc2UgODpcbiAgICAgIHJldHVybiBmdW5jdGlvbiAoYTAsIGExLCBhMiwgYTMsIGE0LCBhNSwgYTYsIGE3KSB7XG4gICAgICAgIHJldHVybiBmbi5hcHBseSh0aGlzLCBhcmd1bWVudHMpO1xuICAgICAgfTtcblxuICAgIGNhc2UgOTpcbiAgICAgIHJldHVybiBmdW5jdGlvbiAoYTAsIGExLCBhMiwgYTMsIGE0LCBhNSwgYTYsIGE3LCBhOCkge1xuICAgICAgICByZXR1cm4gZm4uYXBwbHkodGhpc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HMuanNcIjtcbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIF9pbmRleE9mKGxpc3QsIGEsIGlkeCkge1xuICB2YXIgaW5mLCBpdGVtOyAvLyBBcnJheS5wcm90b3R5cGUuaW5kZXhPZiBkb2Vzbid0IGV4aXN0IGJlbG93IElFOVxuXG4gIGlmICh0eXBlb2YgbGlzdC5pbmRleE9mID09PSAnZnVuY3Rpb24nKSB7XG4gICAgc3dpdGNoICh0eXBlb2YgYSkge1xuICAgICAgY2FzZSAnbnVtYmVyJzpcbiAgICAgICAgaWYgKGEgPT09IDApIHtcbiAgICAgICAgICAvLyBtYW51YWxseSBjcmF3bCB0aGUgbGlzdCB0byBkaXN0aW5ndWlzaCBiZXR3ZWVuICswIGFuZCAtMFxuICAgICAgICAgIGluZiA9IDEgLyBhO1xuXG4gICAgICAgICAgd2hpbGUgKGlkeCA8IGxpc3QubGVuZ3RoKSB7XG4gICAgICAgICAgICBpdGVtID0gbGlzdFtpZHhdO1xuXG4gICAgICAgICAgICBpZiAoaXRlbSA9PT0gMCAmJiAxIC8gaXRlbSA9PT0gaW5mKSB7XG4gICAgICAgICAgICAgIHJldHVybiBpZHg7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlkeCArPSAxO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgfSBlbHNlIGlmIChhICE9PSBhKSB7XG4gICAgICAgICAgLy8gTmFOXG4gICAgICAgICAgd2hpbGUgKGlkeCA8IGxpc3QubGVuZ3RoKSB7XG4gICAgICAgICAgICBpdGVtID0gbGlzdFtpZHhdO1xuXG4gICAgICAgICAgICBpZiAodHlwZW9mIGl0ZW0gPT09ICdudW1iZXInICYmIGl0ZW0gIT09IGl0ZW0pIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGlkeDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWR4ICs9IDE7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV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MykgLSA0KSA9IC0xMFxuICogICAgICAvLyAgICAgICAgICAtICAgICAgICAgICAgICAgLTEwXG4gKiAgICAgIC8vICAgICAgICAgLyBcXCAgICAgICAgICAgICAgLyBcXFxuICogICAgICAvLyAgICAgICAgLSAgIDQgICAgICAgICAgIC02ICAgNFxuICogICAgICAvLyAgICAgICAvIFxcICAgICAgICAgICAgICAvIFxcXG4gKiAgICAgIC8vICAgICAgLSAgIDMgICA9PT4gICAgIC0zICAgM1xuICogICAgICAvLyAgICAgLyBcXCAgICAgICAgICAgICAgLyBcXFxuICogICAgICAvLyAgICAtICAgMiAgICAgICAgICAgLTEgICAyXG4gKiAgICAgIC8vICAgLyBcXCAgICAgICAgICAgICAgLyBcXFxuICogICAgICAvLyAgMCAgIDEgICAgICAgICAgICAwICAgMVxuICpcbiAqIEBzeW1iIFIucmVkdWNlKGYsIGEsIFtiLCBjLCBkXSkgPSBmKGYoZihhLCBiKSwgYyksIGQpXG4gKi9cblxudmFyIHJlZHVjZSA9XG4vKiNfX1BVUkVfXyovXG5fY3VycnkzKF9yZWR1Y2UpO1xuXG5leHBvcnQgZGVmYXVsdCByZWR1Y2U7IiwiaW1wb3J0IF9jbG9uZSBmcm9tIFwiLi9pbnRlcm5hbC9fY2xvbmUuanNcIjtcbmltcG9ydCBfY3VycnlOIGZyb20gXCIuL2ludGVybmFsL19jdXJyeU4uanNcIjtcbmltcG9ydCBfZGlzcGF0Y2hhYmxlIGZyb20gXCIuL2ludGVybmFsL19kaXNwYXRjaGFibGUuanNcIjtcbmltcG9ydCBfaGFzIGZyb20gXCIuL2ludGVybmFsL19oYXMuanNcIjtcbmltcG9ydCBfcmVkdWNlIGZyb20gXCIuL2ludGVybmFsL19yZWR1Y2UuanNcIjtcbmltcG9ydCBfcmVkdWNlZCBmcm9tIFwiLi9pbnRlcm5hbC9fcmVkdWNlZC5qc1wiO1xuaW1wb3J0IF94cmVkdWNlQnkgZnJvbSBcIi4vaW50ZXJuYWwvX3hyZWR1Y2VC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AgICAgbXNnID1cbiAgICAgICAgICAgICAgICAnQSBub25leGlzdGVudCBvYmplY3Qgd2FzIHVzZWQgaW4gYW4gYCcgK1xuICAgICAgICAgICAgICAgICAgICBkZXBUeXBlICtcbiAgICAgICAgICAgICAgICAgICAgJ2Agb2YgYSBEYXNoIGNhbGxiYWNrLiBUaGUgaWQgb2YgdGhpcyBvYmplY3QgaXMgJyArXG4gICAgICAgICAgICAgICAgICAgIChpc1N0clxuICAgICAgICAgICAgICAgICAgICAgICAgPyAnYCcgKyBzcGVjLmlkICsgJ2AnXG4gICAgICAgICAgICAgICAgICAgICAgICA6IEpTT04uc3RyaW5naWZ5KHNwZWMuaWQpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYW55VmFscyA/ICcgd2l0aCBNQVRDSCB2YWx1ZXMgJyArIGFueVZhbHMgOiAnJykpICtcbiAgICAgICAgICAgICAgICAgICAgJyBhbmQgdGhlIHByb3BlcnR5IGlzIGAnICtcbiAgICAgICAgICAgICAgICAgICAgc3BlYy5wcm9wZXJ0eSArXG4gICAgICAgICAgICAgICAgICAgIChpc1N0clxuICAgICAgICAgICAgICAgICAgICAgICAgPyAnYC4gVGhlIHN0cmluZyBpZHMgaW4gdGhlIGN1cnJlbnQgbGF5b3V0IGFyZTogWycgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXMocGF0aHMuc3Rycykuam9pbignLCAnKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ10nXG4gICAgICAgICAgICAgICAgICAgICAgICA6ICdgLiBUaGUgd2lsZGNhcmQgaWRzIGN1cnJlbnRseSBhdmFpbGFibGUgYXJlIGxvZ2dlZCBhYm92ZS4nKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIG1zZyA9XG4gICAgICAgICAgICAgICAgJ011bHRpcGxlIG9iamVjdHMgd2VyZSBmb3VuZCBmb3IgYW4gYCcgK1xuICAgICAgICAgICAgICAgICAgICBkZXBUe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CByZXRpKS5mb3JFYWNoKChbb3V0aWosIHJldGlqXSkgPT4ge1xuICAgICAgICAgICAgICAgIGNvbnN0IHsgaWQsIHByb3BlcnR5IH0gPSBvdXRpajtcbiAgICAgICAgICAgICAgICBjb25zdCBpZFN0ciA9IHN0cmluZ2lmeUlkKGlkKTtcbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhRm9ySWQgPSAocmVzdWx0W2lkU3RyXSA9IHJlc3VsdFtpZFN0cl0gfHwge30pO1xuICAgICAgICAgICAgICAgIGlmIChyZXRpaiAhPT0gZGMubm9fdXBkYXRlKSB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGFGb3JJZFtwcm9wZXJ0eV0gPSByZXRpajtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG4gICAgfVxuICAgIGNhdGNoIChlKSB7XG4gICAgICAgIGlmIChlID09PSBkYy5QcmV2ZW50VXBkYXRlKSB7XG4gICAgICAgICAgICBzdGF0dXMgPSBTVEFUVVMuUFJFVkVOVF9VUERBVEU7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBzdGF0dXMgPSBTVEFUVVMuQ0xJRU5UU0lERV9FUlJPUjtcbiAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgIH1cbiAgICB9XG4gICAgZmluYWxseSB7XG4gICAgICAgIGRlbGV0ZSBkYy5jYWxsYmFja19jb250ZXh0O1xuICAgICAgICAvLyBTZXR0aW5nIHNlcnZlciA9IGNsaWVudCBmb3JjZXMgbmV0d29yayA9IDBcbiAgICAgICAgY29uc3QgdG90YWxUaW1lID0gRGF0ZS5ub3coKSAtIHJlcXVlc3RUaW1lO1xuICAgICAgICBjb25zdCByZXNvdXJjZXMgPSB7XG4gICAgICAgICAgICBfX2Rhc2hfc2VydmVyOiB0b3RhbFRpbWUsXG4gICAgICAgICAgICBfX2Rhc2hfY2xpZW50OiB0b3RhbFRpbWUsXG4gICAgICAgICAg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KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobW9yZUFyZ3MpIHtcbiAgICAgICAgICAgIG1vcmVBcmdzLmZvckVhY2goKFtrZXksIHZhbHVlXSkgPT4gYWRkQXJnKGtleSwgdmFsdWUpKTtcbiAgICAgICAgICAgIG1vcmVBcmdzID0gbW9yZUFyZ3MuZmlsdGVyKChbXywgX18sIHNpbmdsZV0pID0+ICFzaW5nbGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmZXRjaCh1cmwsIG1lcmdlRGVlcFJpZ2h0KGNvbmZpZy5mZXRjaCwge1xuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXG4gICAgICAgICAgICBoZWFkZXJzLFxuICAgICAgICAgICAgYm9keVxuICAgICAgICB9KSk7XG4gICAgfTtcbiAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUsIHJlamVjdCkgPT4ge1xuICAgICAgICBjb25zdCBoYW5kbGVPdXRwdXQgPSAocmVzKSA9PiB7XG4gICAgICAgICAgICBjb25zdCB7IHN0YXR1cyB9ID0gcmVzO1xuICAgICAgICAgICAgaWYgKGpvYikge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrSm9iID0gZ2V0U3RhdGUoKS5jYWxsYmFja0pvYnNbam9iXTtcbiAgICAgICAgICAgICAgICBpZiAoY2FsbGJhY2tKb2I/Lm91dGRhdGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHJlbW92ZUNhbGxiYWNrSm9iKHsgam9iSWQ6IGpvYiB9KSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNvbHZlKHt9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiByZWNvcmRQcm9maWxlKHJlc3VsdCkge1xuICAgICAgICAgICAgICAgIGlmIChjb25maWcudWkpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQ2FsbGJhY2sgcHJvZmlsaW5nIC0gb25seSByZWxldmFudCBpZiB3ZSdyZSBzaG93aW5nIHRoZSBkZWJ1ZyB1aVxuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXNvdXJjZXMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBfX2Rhc2hfc2VydmVyOiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgX19kYXNoX2NsaWVudDogRGF0ZS5ub3coKSAtIHJlcXVlc3RUaW1lLFxuICAgICAgICAgICAgICAgICAgICAgICAgX19kYXNoX3VwbG9hZDogYm9keS5sZW5ndGgsXG4gICAgICAgICAgICAgICAgICAgICAgICBfX2Rhc2hfZG93bmxvYWQ6IE51bWJlcihyZXMuaGVhZGVycy5nZXQoJ0NvbnRlbnQtTGVuZ3RoJykpXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHRpbWluZ0hlYWRlcnMgPSByZXMuaGVhZGVycy5nZXQoJ1NlcnZlci1UaW1pbmcnKSB8fCAnJztcbiAgICAgICAgICAgICAgICAgICAgdGltaW5nSGVhZGVycy5zcGxpdCgnLCcpLmZvckVhY2goKGhlYWRlcikgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmFtZSA9IGhlYWRlci5zcGxpdCgnOycpWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZHVyID0gaGVhZGVyLm1hdGNoKC87ZHVyPVswLTkuXSsvKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkdXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXNbbmFtZV0gPSBOdW1iZXIoZHVyWzBdLnNsaWNlKDUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHVwZGF0ZVJlc291cmNlVXNhZ2Uoe1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBheWxvYWQub3V0cHV0LFxuICAgICAgICAgICAgICAgICAgICAgICAgdXNhZ2U6IHJlc291cmNlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0czogcGF5bG9hZC5pbnB1dHMsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZTogcGF5bG9hZC5zdGF0ZVxuICAgICAgICAgICAgICAgICAgICB9KSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgZmluaXNoTGluZSA9IChkYXRhKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgeyBtdWx0aSwgcmVzcG9uc2UgfSA9IGRhdGE7XG4gICAgICAgICAgICAgICAgaWYgKGhvb2tzLnJlcXVlc3RfcG9zdCkge1xuICAgICAgICAgICAgICAgICAgICBob29rcy5yZXF1ZXN0X3Bvc3QocGF5bG9hZCwgcmVzcG9uc2UpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0O1xuICAgICAgICAgICAgICAgIGlmIChtdWx0aSkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSByZXNwb25zZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgb3V0cHV0IH0gPSBwYXlsb2FkO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBpZCA9IG91dHB1dC5zdWJzdHIoMCwgb3V0cHV0Lmxhc3RJbmRleE9mKCcuJykpO1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSB7IFtpZF06IHJlc3BvbnNlLnByb3BzIH07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJlY29yZFByb2ZpbGUocmVzdWx0KTtcbiAgICAgICAgICAgICAgICByZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgY29uc3QgY29tcGxldGVKb2IgPSAoKSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGpvYikge1xuICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChyZW1vdmVDYWxsYmFja0pvYih7IGpvYklkOiBqb2IgfSkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocnVubmluZ09mZikge1xuICAgICAgICAgICAgICAgICAgICBzaWRlVXBkYXRlKHJ1bm5pbmdPZmYsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChwcm9ncmVzc0RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgc2lkZVVwZGF0ZShwcm9ncmVzc0RlZmF1bHQsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGlmIChzdGF0dXMgPT09IFNUQVRVUy5PSykge1xuICAgICAgICAgICAgICAgIHJlcy5qc29uKCkudGhlbigoZGF0YSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWNhY2hlS2V5ICYmIGRhdGEuY2FjaGVLZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlS2V5ID0gZGF0YS5jYWNoZUtleTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWpvYiAmJiBkYXRhLmpvYikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgam9iSW5mbyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqb2JJZDogZGF0YS5qb2IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FjaGVLZXk6IGRhdGEuY2FjaGVLZXksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FuY2VsSW5wdXRzOiBkYXRhLmNhbmNlbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9ncmVzc0RlZmF1bHQ6IGRhdGEucHJvZ3Jlc3NEZWZhdWx0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKGFkZENhbGxiYWNrSm9iKGpvYkluZm8pKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGpvYiA9IGRhdGEuam9iO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLnByb2dyZXNzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzaWRlVXBkYXRlKGRhdGEucHJvZ3Jlc3MsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEucnVubmluZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2lkZVVwZGF0ZShkYXRhLnJ1bm5pbmcsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFydW5uaW5nT2ZmICYmIGRhdGEucnVubmluZ09mZikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcnVubmluZ09mZiA9IGRhdGEucnVubmluZ09mZjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIXByb2dyZXNzRGVmYXVsdCAmJiBkYXRhLnByb2dyZXNzRGVmYXVsdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJvZ3Jlc3NEZWZhdWx0ID0gZGF0YS5wcm9ncmVzc0RlZmF1bHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFsb25nIHx8IGRhdGEucmVzcG9uc2UgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGVKb2IoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbmlzaExpbmUoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBQb2xsIGNoYWluLlxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChoYW5kbGUsIGxvbmcuaW50ZXJ2YWwgIT09IHVuZGVmaW5lZCA/IGxvbmcuaW50ZXJ2YWwgOiA1MDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzdGF0dXMgPT09IFNUQVRVUy5QUkVWRU5UX1VQREFURSkge1xuICAgICAgICAgICAgICAgIGNvbXBsZXRlSm9iKCk7XG4gICAgICAgICAgICAgICAgcmVjb3JkUHJvZmlsZSh7fSk7XG4gICAgICAgICAgICAgICAgcmVzb2x2ZSh7fSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb21wbGV0ZUpvYigpO1xuICAgICAgICAgICAgICAgIHJlamVjdChyZXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb25zdCBoYW5kbGVFcnJvciA9ICgpID0+IHtcbiAgICAgICAgICAgIGlmIChjb25maWcudWkpIHtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaCh1cGRhdGVSZXNvdXJjZVVzYWdlKHtcbiAgICAgICAgICAgICAgICAgICAgaWQ6IHBheWxvYWQub3V0cHV0LFxuICAgICAgICAgICAgICAgICAgICBzdGF0dXM6IFNUQVRVUy5OT19SRVNQT05TRSxcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0OiB7fSxcbiAgICAgICAgICAgICAgICAgICAgaW5wdXR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gICAgICAgICAgICAgICAgLi4uY2IsXG4gICAgICAgICAgICAgICAgZXhlY3V0aW9uUHJvbWlzZTogbnVsbFxuICAgICAgICAgICAgfTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBvdXRwdXRzID0gW107XG4gICAgICAgIGNvbnN0IG91dHB1dEVycm9ycyA9IFtdO1xuICAgICAgICBhbGxPdXRwdXRzLmZvckVhY2goKG91dCwgaSkgPT4ge1xuICAgICAgICAgICAgY29uc3QgW291dGksIGVycmldID0gdW53cmFwSWZOb3RNdWx0aShwYXRocywgbWFwKHBpY2soWydpZCcsICdwcm9wZXJ0eSddKSwgb3V0KSwgY2IuY2FsbGJhY2sub3V0cHV0c1tpXSwgY2IuYW55VmFscywgJ091dHB1dCcpO1xuICAgICAgICAgICAgb3V0cHV0cy5wdXNoKG91dGkpO1xuICAgICAgICAgICAgaWYgKGVycmkpIHtcbiAgICAgICAgICAgICAgICBvdXRwdXRFcnJvcnMucHVzaChlcnJpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChvdXRwdXRFcnJvcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICBpZiAoZmxhdHRlbihpblZhbHMpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJlZkVycihvdXRwdXRFcnJvcnMsIHBhdGhzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIFRoaXMgY2FzZSBpcyBhbGwtZW1wdHkgbXVsdGl2YWx1ZWQgd2lsZGNhcmQgaW5wdXRzLFxuICAgICAgICAgICAgLy8gd2hpY2ggd2Ugd291bGQgbm9ybWFsbHkgZmlyZSB0aGUgY2FsbGJhY2sgZm9yLCBleGNlcHRcbiAgICAgICAgICAgIC8vIHNvbWUgb3V0cHV0cyBhcmUgbWlzc2luZy4gU28gaW5zdGVhZCB3ZSB0cmVhdCBpdCBsaWtlXG4gICAgICAgICAgICAvLyByZWd1bGFyIG1pc3NpbmcgaW5wdXRzIGFuZCBqdXN0IHNpbGVudGx5IHByZXZlbnQgaXQuXG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLmNiLFxuICAgICAgICAgICAgICAgIGV4ZWN1dGlvblByb21pc2U6IG51bGxcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgX19leGVjdXRlID0gYXN5bmMgKCkgPT4ge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXlsb2FkID0ge1xuICAgICAgICAgICAgICAgICAgICBvdXRwdXQsXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dHM6IGlzTXVsdGlPdXRwdXRQcm9wKG91dHB1dCkgPyBvdXRwdXRzIDogb3V0cHV0c1swXSxcbiAgICAgICAgICAgICAgICAgICAgaW5wdXRzOiBpblZhbHMsXG4gICAgICAgICAgICAgICAgICAgIGNoYW5nZWRQcm9wSWRzOiBrZXlzKGNiLmNoYW5nZWRQcm9wSWRzKSxcbiAgICAgICAgICAgICAgICAgICAgc3RhdGU6IGNiLmNhbGxiYWNrLnN0YXRlLmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgPyBmaWxsVmFscyhwYXRocywgbGF5b3V0LCBjYiwgc3RhdGUsICdTdGF0ZScpXG4gICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgaWYgKGNsaWVudHNpZGVfZnVuY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCBoYW5kbGVDbGllbnRzaWRlKGRpc3BhdGNoLCBjbGllbnRzaWRlX2Z1bmN0aW9uLCBjb25maWcsIHBheWxvYWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZGF0YSwgcGF5bG9hZCB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgZXJyb3IsIHBheWxvYWQgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgbmV3Q29uZmlnID0gY29uZmlnO1xuICAgICAgICAgICAgICAgIGxldCBuZXdIZWFkZXJzID0gbnVsbDtcbiAgICAgICAgICAgICAgICBsZXQgbGFzdEVycm9yO1xuICAgICAgICAgICAgICAgIGNvbnN0IGFkZGl0aW9uYWxBcmdzID0gW107XG4gICAgICAgICAgICAgICAgdmFsdWVzKGdldFN0YXRlKCkuY2FsbGJhY2tKb2JzKS5mb3JFYWNoKChqb2IpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNiLmNhbGxiYWNrLm91dHB1dCA9PT0gam9iLm91dHB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGVybWluYXRlIHRoZSBvbGQgam9icyB0aGF0IGFyZSBub3QgY29tcGxldGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBzZXQgYXMgb3V0ZGF0ZWQgZm9yIHRoZSBjYWxsYmFjayBwcm9taXNlIHRvXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyByZXNvbHZlIGFuZCByZW1vdmUgYWZ0ZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRpdGlvbmFsQXJncy5wdXNoKFsnb2xkSm9iJywgam9iLmpvYklkLCB0cnVlXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChzZXRDYWxsYmFja0pvYk91dGRhdGVkKHsgam9iSWQ6IGpvYi5qb2JJZCB9KSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKCFqb2IuY2FuY2VsSW5wdXRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW50ZXIgPSBpbnRlcnNlY3Rpb24oam9iLmNhbmNlbElucHV0cywgY2IuY2FsbGJhY2suaW5wdXRzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGludGVyLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkaXRpb25hbEFyZ3MucHVzaChbJ2NhbmNlbEpvYicsIGpvYi5qb2JJZF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpvYi5wcm9ncmVzc0RlZmF1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaWRlVXBkYXRlKGpvYi5wcm9ncmVzc0RlZmF1bHQsIGRpc3BhdGNoLCBwYXRocyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCByZXRyeSA9IDA7IHJldHJ5IDw9IE1BWF9BVVRIX1JFVFJJRVM7IHJldHJ5KyspIHtcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRhdGEgPSBhd2FpdCBoYW5kbGVTZXJ2ZXJzaWRlKGRpc3BhdGNoLCBob29rcywgbmV3Q29uZmlnLCBwYXlsb2FkLCBwYXRocywgbG9uZywgYWRkaXRpb25hbEFyZ3MubGVuZ3RoID8gYWRkaXRpb25hbEFyZ3MgOiB1bmRlZmluZWQsIGdldFN0YXRlLCBjYi5jYWxsYmFjay5vdXRwdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5ld0hlYWRlcnMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChhZGRIdHRwSGVhZGVycyhuZXdIZWFkZXJzKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBkYXRhLCBwYXlsb2FkIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKHJlcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGFzdEVycm9yID0gcmVzO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJldHJ5IDw9IE1BWF9BVVRIX1JFVFJJRVMgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmVzLnN0YXR1cyA9PT0gU1RBVFVTLlVOQVVUSE9SSVpFRCB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMuc3RhdHVzID09PSBTVEFUVVMuQkFEX1JFUVVFU1QpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYm9keSA9IGF3YWl0IHJlcy50ZXh0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGJvZHkuaW5jbHVkZXMoSldUX0VYUElSRURfTUVTU0FHRSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3QgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvbGRKd3QgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5mZXRjaC5oZWFkZXJzLkF1dGhvcml6YXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbGRKd3QgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZmV0Y2guaGVhZGVycy5BdXRob3JpemF0aW9uLnN1YnN0cignQmVhcmVyICcubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld0p3dCA9IGF3YWl0IGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3Qob2xkSnd0KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdKd3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdIZWFkZXJzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBdXRob3JpemF0aW9uOiBgQmVhcmVyICR7bmV3Snd0fWBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbmZpZyA9IG1lcmdlRGVlcFJpZ2h0KGNvbmZpZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmZXRjaDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogbmV3SGVhZGVyc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyB3ZSByZWFjaCBoZXJlIHdoZW4gd2UgcnVuIG91dCBvZiByZXRyaWVzLlxuICAgICAgICAgICAgICAgIHJldHVybiB7IGVycm9yOiB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cbiAgICAgICAgICAgICAgICBzb3VyY2U6ICdyZXNwb25zZSdcbiAgICAgICAgICAgIH0pKTtcbiAgICAgICAgICAgIHJldHVybiBwcm9wcztcbiAgICAgICAgfVxuICAgICAgICBsZXQgcmVxdWVzdGVkQ2FsbGJhY2tzID0gW107XG4gICAgICAgIGNvbnN0IHN0b3JlZENhbGxiYWNrcyA9IFtdO1xuICAgICAgICBmb3JFYWNoKGNiID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHByZWRlY2Vzc29ycyA9IGNvbmNhdChjYi5wcmVkZWNlc3NvcnMgPz8gW10sIFtjYi5jYWxsYmFja10pO1xuICAgICAgICAgICAgY29uc3QgeyBjYWxsYmFjazogeyBjbGllbnRzaWRlX2Z1bmN0aW9uLCBvdXRwdXQgfSwgZXhlY3V0aW9uUmVzdWx0IH0gPSBjYjtcbiAgICAgICAgICAgIGlmIChpc05pbChleGVjdXRpb25SZXN1bHQpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgeyBkYXRhLCBlcnJvciwgcGF5bG9hZCB9ID0gZXhlY3V0aW9uUmVzdWx0O1xuICAgICAgICAgICAgaWYgKGRhdGEgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGZvckVhY2goKFtpZCwgcHJvcHNdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnNlZElkID0gcGFyc2VJZldpbGRjYXJkKGlkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgeyBncmFwaHMsIGxheW91dDogb2xkTGF5b3V0LCBwYXRoczogb2xkUGF0aHMgfSA9IGdldFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgIC8vIENvbXBvbmVudHMgd2lsbCB0cmlnZ2VyIGNhbGxiYWNrcyBvbiB0aGVpciBvd24gYXMgcmVxdWlyZWQgKGVnLiBkZXJpdmVkKVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBhcHBsaWVkUHJvcHMgPSBhcHBseVByb3BzKHBhcnNlZElkLCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgIC8vIEFkZCBjYWxsYmFja3MgZm9yIG1vZGlmaWVkIGlucHV0c1xuICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MgPSBjb25jYXQocmVxdWVzdGVkQ2FsbGJhY2tzLCBmbGF0dGVuKG1hcChwcm9wID0+IGdldENhbGxiYWNrc0J5SW5wdXQoZ3JhcGhzLCBvbGRQYXRocywgcGFyc2VkSWQsIHByb3AsIHRydWUpLCBrZXlzKHByb3BzKSkpLm1hcChyY2IgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgIHByZWRlY2Vzc29yc1xuICAgICAgICAgICAgICAgICAgICB9KSkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBiYXNlUGF0aCA9IGdldFBhdGgob2xkUGF0aHMsIHBhcnNlZElkKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb2xkT2JqID0gcGF0aChnZXRQYXRoKG9sZFBhdGhzLCBwYXJzZWRJZCksIG9sZExheW91dCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkcmVuUHJvcHMgPSBwYXRoT3IoJ2RlZmF1bHRWYWx1ZScsIFtvbGRPYmoubmFtZXNwYWNlLCBvbGRPYmoudHlwZV0sIHdpbmRvdy5fX2Rhc2hwcml2YXRlX2NoaWxkcmVuUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBoYW5kbGVQYXRocyA9IChjaGlsZHJlbiwgb2xkQ2hpbGRyZW4sIG9sZENoaWxkcmVuUGF0aCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgb1BhdGhzID0gZ2V0U3RhdGUoKS5wYXRocztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhdGhzID0gY29tcHV0ZVBhdGhzKGNoaWxkcmVuLCBvbGRDaGlsZHJlblBhdGgsIG9QYXRocyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkaXNwYXRjaChzZXRQYXRocyhwYXRocykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2V0IGNhbGxiYWNrcyBmb3IgbmV3IGxheW91dCAody8gZXhlY3V0aW9uIGdyb3VwKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGVkQ2FsbGJhY2tzID0gY29uY2F0KHJlcXVlc3RlZENhbGxiYWNrcywgZ2V0TGF5b3V0Q2FsbGJhY2tzKGdyYXBocywgcGF0aHMsIGNoaWxkcmVuLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2h1bmtQYXRoOiBvbGRDaGlsZHJlblBhdGhcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLm1hcChyY2IgPT4gKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAuLi5yY2IsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZGVjZXNzb3JzXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2lsZGNhcmQgY2FsbGJhY2tzIHdpdGggYXJyYXkgaW5wdXRzIChBTEwgLyBBTExTTUFMTEVSKSBuZWVkIHRvIHRyaWdnZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGV2ZW4gZHVlIHRvIHRoZSBkZWxldGlvbiBvZiBjb21wb25lbnRzXG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MgPSBjb25jYXQocmVxdWVzdGVkQ2FsbGJhY2tzLCBnZXRMYXlvdXRDYWxsYmFja3MoZ3JhcGhzLCBvbGRQYXRocywgb2xkQ2hpbGRyZW4sIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZW1vdmVkQXJyYXlJbnB1dHNPbmx5OiB0cnVlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1BhdGhzOiBwYXRocyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaHVua1BhdGg6IG9sZENoaWxkcmVuUGF0aFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkubWFwKHJjYiA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIGxldCByZWNvbXB1dGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGZvckVhY2goY2hpbGRyZW5Qcm9wID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZWNvbXB1dGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoaWxkcmVuUHJvcC5pbmNsdWRlcygnW10nKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IFtmcm9udFBhdGhdID0gY2hpbGRyZW5Qcm9wXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdCgnW10nKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubWFwKHAgPT4gcC5zcGxpdCgnLicpLmZpbHRlcihlID0+IGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBmcm9udE9iaiA9IHBhdGgoZnJvbnRQYXRoLCBhcHBsaWVkUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZnJvbnRPYmopIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBDcmF3bCBsYXlvdXQgbmVlZHMgdGhlIG5zL3R5cGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoYW5kbGVQYXRocyh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLm9sZE9iaixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLm9sZE9iai5wcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmFwcGxpZWRQcm9wc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgb2xkT2JqLCBiYXNlUGF0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gT25seSBkbyBpdCBvbmNlIGZvciB0aGUgY29tcG9uZW50LlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY29tcHV0ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hpbGRyZW5Qcm9wUGF0aCA9IGNoaWxkcmVuUHJvcC5zcGxpdCgnLicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoaWxkcmVuID0gcGF0aChjaGlsZHJlblByb3BQYXRoLCBhcHBsaWVkUHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY2hpbGRyZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRDaGlsZHJlblBhdGggPSBjb25jYXQoZ2V0UGF0aChvbGRQYXRocywgcGFyc2VkSWQpLCBbJ3Byb3BzJ10uY29uY2F0KGNoaWxkcmVuUHJvcFBhdGgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvbGRDaGlsZHJlbiA9IHBhdGgob2xkQ2hpbGRyZW5QYXRoLCBvbGRMYXlvdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZVBhdGhzKGNoaWxkcmVuLCBvbGRDaGlsZHJlbiwgb2xkQ2hpbGRyZW5QYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSwgWydjaGlsZHJlbiddLmNvbmNhdChjaGlsZHJlblByb3BzKSk7XG4gICAgICAgICAgICAgICAgICAgIC8vIHBlcnNpc3RlbmNlIGVkZ2UgY2FzZTogaWYgeW91IGV4cGxpY2l0bHkgdXBkYXRlIHRoZVxuICAgICAgICAgICAgICAgICAgICAvLyBwZXJzaXN0ZW5jZSBrZXksIG90aGVyIHByb3BzIG1heSBjaGFuZ2UgdGhhdCByZXF1aXJlIHVzXG4gICAgICAgICAgICAgICAgICAgIC8vIHRvIGZpcmUgYWRkaXRpb25hbCBjYWxsYmFja3NcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYWRkZWRQcm9wcyA9IHBpY2tCeSgoXywgaykgPT4gIShrIGluIHByb3BzKSwgYXBwbGllZFByb3BzKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0VtcHR5KGFkZGVkUHJvcHMpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB7IGdyYXBoczogY3VycmVudEdyYXBocywgcGF0aHMgfSA9IGdldFN0YXRlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ZWRDYWxsYmFja3MgPSBjb25jYXQocmVxdWVzdGVkQ2FsbGJhY2tzLCBpbmNsdWRlT2JzZXJ2ZXJzKGlkLCBhZGRlZFByb3BzLCBjdXJyZW50R3JhcGhzLCBwYXRocykubWFwKHJjYiA9PiAoe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLnJjYixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVkZWNlc3NvcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LCBPYmplY3QuZW50cmllcyhkYXRhKSk7XG4gICAgICAgICAgICAgICAgLy8gQWRkIGluZm9ybWF0aW9uIGFib3V0IHBvdGVudGlhbGx5IHVwZGF0ZWQgb3V0cHV0cyB2cy4gdXBkYXRlZCBvdXRwdXRzLFxuICAgICAgICAgICAgICAgIC8vIHRoaXMgd2lsbCBiZSB1c2VkIHRvIGRyb3AgY2FsbGJhY2tzIGZyb20gZXhlY3V0aW9uIGdyb3VwcyB3aGVuIG5vIG91dHB1dFxuICAgICAgICAgICAgICAgIC8vIG1hdGNoaW5nIHRoZSBkb3duc3RyZWFtIGNhbGxiYWNrJ3MgaW5wdXRzIHdlcmUgbW9kaWZpZWRcbiAgICAgICAgICAgICAgICBzdG9yZWRDYWxsYmFja3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIC4uLmNiLFxuICAgICAgICAgICAgICAgICAgICBleGVjdXRpb25NZXRhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbGxQcm9wczogbWFwKGNvbWJpbmVJZEFuZFByb3AsIGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhnZXRTdGF0ZSgpLnBhdGhzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlZFByb3BzOiBmbGF0dGVuKG1hcCgoW2lkLCB2YWx1ZV0pID0+IG1hcChwcm9wZXJ0eSA9PiBjb21iaW5lSWRBbmRQcm9wKHsgaWQsIHByb3BlcnR5IH0pLCBrZXlzKHZhbHVlKSksIHRvUGFpcnMoZGF0YSkpKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXJyb3IgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IG91dHB1dHMgPSBwYXlsb2FkXG4gICAgICAgICAgICAgICAgICAgID8gbWFwKGNvbWJpbmVJZEFuZFByb3AsIGZsYXR0ZW4oW3BheWxvYWQub3V0cHV0c10pKS5qb2luKCcsICcpXG4gICAgICAgICAgICAgICAgICAgIDogb3V0cHV0O1xuICAgICAgICAgICAgICAgIGxldCBtZXNzYWdlID0gYENhbGxiYWNrIGVycm9yIHVwZGF0aW5nICR7b3V0cHV0c31gO1xuICAgICAgICAgICAgICAgIGlmIChjbGllbnRzaWRlX2Z1bmN0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHsgbmFtZXNwYWNlOiBucywgZnVuY3Rpb25fbmFtZTogZm4gfSA9IGNsaWVudHNpZGVfZnVuY3Rpb247XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgKz0gYCB2aWEgY2xpZW50c2lkZSBmdW5jdGlvbiAke25zfS4ke2ZufWA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGhhbmRsZUFzeW5jRXJyb3IoZXJyb3IsIG1lc3NhZ2UsIGRpc3BhdGNoKTtcbiAgICAgICAgICAgICAgICBzdG9yZWRDYWxsYmFja3MucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIC4uLmNiLFxuICAgICAgICAgICAgICAgICAgICBleGVjdXRpb25NZXRhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhbGxQcm9wczogbWFwKGNvbWJpbmVJZEFuZFByb3AsIGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhnZXRTdGF0ZSgpLnBhdGhzKSkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlZFByb3BzOiBbXVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAg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XJ0eSB9O1xuICAgICAgICAgICAgICAgIC8vIEFzc2lnbiBhbGwgYWZmZWN0ZWQgcHJvcHMgZm9yIHRoaXMgcGF0aCBhbmQgbmVzdGVkIHBhdGhzXG4gICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXyA9XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5fX2Rhc2hwcml2YXRlX19pZHByb3BzX18gfHwgW107XG4gICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXy5wdXNoKGlkcHJvcCk7XG4gICAgICAgICAgICAgICAgcGF0aC5mb3JFYWNoKChwLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldCA9IHRhcmdldFtwXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRbcF0gPz9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAocCA9PT0gJ2NoaWxkcmVuJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlb2YgcGF0aFtpICsgMV0gPT09ICdudW1iZXInXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gW11cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB7fSk7XG4gICAgICAgICAgICAgICAgICAgIHRhcmdldC5fX2Rhc2hwcml2YXRlX19pZHByb3BzX18gPVxuICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXyB8fCBbXTtcbiAgICAgICAgICAgICAgICAgICAgdGFyZ2V0Ll9fZGFzaHByaXZhdGVfX2lkcHJvcHNfXy5wdXNoKGlkcHJvcCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgLy8gQXNzaWduIG9uZSBhZmZlY3RlZCBwcm9wIGZvciB0aGlzIHBhdGhcbiAgICAgICAgICAgICAgICB0YXJnZXQuX19k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gLypcbiAgICAgICAgICAgIFRPRE8/XG4gICAgICAgICAgICBDbGVhbiB1cCB0aGUgYHJlcXVlc3RlZGAgbGlzdCAtIGR1cmluZyB0aGUgZGlzcGF0Y2ggcGhhc2UsXG4gICAgICAgICAgICBjaXJjdWxhcnMgd2lsbCBiZSByZW1vdmVkIGZvciByZWFsXG4gICAgICAgICovXG4gICAgICAgIHJlcXVlc3RlZCA9IGRpZmZlcmVuY2UocmVxdWVzdGVkLCByQ2lyY3VsYXJzKTtcbiAgICAgICAgLypcbiAgICAgICAgICAgIDEuIFJlbW92ZSBkdXBsaWNhdGVkIGByZXF1ZXN0ZWRgIGNhbGxiYWNrcyAtIGdpdmUgcHJlY2VkZW5jZSB0byBuZXdlciBjYWxsYmFja3Mgb3ZlciBvbGRlciBvbmVzXG4gICAgICAgICovXG4gICAgICAgIGxldCByRHVwbGljYXRlcyA9IFtdO1xuICAgICAgICBjb25zdCByTWVyZ2VkRHVwbGljYXRlcyA9IFtdO1xuICAgICAgICBmb3JFYWNoKGdyb3VwID0+IHtcbiAgICAgICAgICAgIGlmIChncm91cC5sZW5ndGggPT09IDEpIHtcbiAgICAgICAgICAgICAgICAvLyBrZWVwIGNhbGxiYWNrIGlmIGl0cyB0aGUgb25seSBvbmUgb2YgaXRzIGtpbmRcbiAgICAgICAgICAgICAgICByTWVyZ2VkRHVwbGljYXRlcy5wdXNoKGdyb3VwWzBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IGluaXRpYWwgPSBncm91cC5maW5kKGNiID0+IGNiLmluaXRpYWxDYWxsKTtcbiAgICAgICAgICAgICAgICBpZiAoaW5pdGlhbCkge1xuICAgICAgICAgICAgICAgICAgICAvLyBkcm9wIHRoZSBpbml0aWFsIGNhbGxiYWNrIGlmIGl0J3Mgbm90IGFsb25lXG4gICAgICAgICAgICAgICAgICAgIHJEdXBsaWNhdGVzLnB1c2goaW5pdGlhbCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IGdyb3VwV2l0aG91dEluaXRpYWwgPSBncm91cC5maWx0ZXIoY2IgPT4gY2IgIT09IGluaXRpYWwpO1xuICAgICAgICAgICAgICAgIGlmIChncm91cFdpdGhvdXRJbml0aWFsLmxlbmd0aCA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGVyZSdzIG9ubHkgb25lIGNhbGxiYWNrIGJlc2lkZSB0aGUgaW5pdGlhbCBvbmUsIGtlZXAgdGhhdCBjYWxsYmFja1xuICAgICAgICAgICAgICAgICAgICByTWVyZ2VkRHVwbGljYXRlcy5wdXNoKGdyb3VwV2l0aG91dEluaXRpYWxbMF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gb3RoZXJ3aXNlIG1lcmdlIGFsbCByZW1haW5pbmcgY2FsbGJhY2tzIHRvZ2V0aGVyXG4gICAgICAgICAgICAgICAgICAgIHJEdXBsaWNhdGVzID0gY29uY2F0KHJEdXBsaWNhdGVzLCBncm91cFdpdGhvdXRJbml0aWFsKTtcbiAgICAgICAgICAgICAgICAgICAgck1lcmdlZER1cGxpY2F0ZXMucHVzaChtZXJnZUxlZnQoe1xuICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlZFByb3BJZHM6IHJlZHVjZShtZXJnZVdpdGgoTWF0aC5tYXgpLCB7fSwgcGx1Y2soJ2NoYW5nZWRQcm9wSWRzJywgZ3JvdXBXaXRob3V0SW5pdGlhbCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXhlY3V0aW9uR3JvdXA6IGZpbHRlcihleGcgPT4gQm9vbGVhbihleGcpLCBwbHVjaygnZXhlY3V0aW9uR3JvdXAnLCBncm91cFdpdGhvdXRJbml0aWFsKSkuc2xpY2UoLTEpWzBdXG4gICAgICAgICAgICAgICAgICAgIH0sIGdyb3VwV2l0aG91d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ml2YXRlX2Vycm9yPXtlcnJvcn1cbiAgICAgICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xheW91dD17bGF5b3V0fVxuICAgICAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbG9hZGluZ1N0YXRlPXtnZXRMb2FkaW5nU3RhdGUoXG4gICAgICAgICAgICAgICAgICAgICAgICBsYXlvdXQsXG4gICAgICAgICAgICAgICAgICAgICAgICBbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvYWRpbmdNYXBcbiAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xvYWRpbmdTdGF0ZUhhc2g9e2dldExvYWRpbmdIYXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgW10sXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2FkaW5nTWFwXG4gICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9wYXRoPXtKU09OLnN0cmluZ2lmeShbXSl9XG4gICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgIDwvRGFzaENvbnRleHQuUHJvdmlkZXI+XG4gICAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgY29udGVudCA9IDxkaXYgY2xhc3NOYW1lPSdfZGFzaC1sb2FkaW5nJz5Mb2FkaW5nLi4uPC9kaXY+O1xuICAgIH1cblxuICAgIHJldHVybiBjb25maWcgJiYgY29uZmlnLnVpID09PSB0cnVlID8gKFxuICAgICAgICA8R2xvYmFsRXJyb3JDb250YWluZXI+e2NvbnRlbnR9PC9HbG9iYWxFcnJvckNvbnRhaW5lcj5cbiAgICApIDogKFxuICAgICAgICBjb250ZW50XG4gICAgKTtcbn07XG5cbmZ1bmN0aW9uIHN0b3JlRWZmZWN0KHByb3BzLCBldmVudHMsIHNldEVycm9yTG9hZGluZykge1xuICAgIGNvbnN0IHtcbiAgICAgICAgYXBwTGlmZWN5Y2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lnRnJvbURPTSBmcm9tICcuL2NvbmZpZyc7XG5pbXBvcnQge3NldEhvb2tzLCBzZXRDb25maWd9IGZyb20gJy4vYWN0aW9ucy9pbmRleCc7XG5pbXBvcnQge3R5cGUsIG1lbW9pemVXaXRoLCBpZGVudGl0eX0gZnJvbSAncmFtZGEnO1xuXG5jbGFzcyBVbmNvbm5lY3RlZEFwcENvbnRhaW5lciBleHRlbmRzIFJlYWN0LkNvbXBvbmVudCB7XG4gICAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICAgICAgc3VwZXIocHJvcHMpO1xuICAgICAgICBpZiAoXG4gICAgICAgICAgICBwcm9wcy5ob29rcy5yZXF1ZXN0X3ByZSAhPT0gbnVsbCB8fFxuICAgICAgICAgICAgcHJvcHMuaG9va3MucmVxdWVzdF9wb3N0ICE9PSBudWxsIHx8XG4gICAgICAgICAgICBwcm9wcy5ob29rcy5jYWxsYmFja19yZXNvbHZlZCAhPT0gbnVsbCB8fFxuICAgICAgICAgICAgcHJvcHMuaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dCAhPT0gbnVsbFxuICAgICAgICApIHtcbiAgICAgICAgICAgIGxldCBob29rcyA9IHByb3BzLmhvb2tzO1xuXG4gICAgICAgICAgICBpZiAoaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dCkge1xuICAgICAgICAgICAgICAgIGhvb2tzID0ge1xuICAgICAgICAgICAgICAgICAgICAuLi5ob29rcyxcbiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdF9yZWZyZXNoX2p3dDogbWVtb2l6ZVdpdGgoXG4gICAgICAgICAgICAgICAgICAgICAgICBpZGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhvb2tzLnJlcXVlc3RfcmVmcmVzaF9qd3RcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHByb3BzLmRpc3BhdGNoKHNldEhvb2tzKGhvb2tzKSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBVTlNBRkVfY29tcG9uZW50V2lsbE1vdW50KCkge1xuICAgICAgICBjb25zdCB7ZGlzcGF0Y2h9ID0gdGhpcy5wcm9wcztcbiAgICAgICAgY29uc3QgY29uZmlnID0gZ2V0Q29uZmlnRnJvbURPTSgpO1xuXG4gICAgICAgIC8vIHByZXNldCBjb21tb24gcmVxdWVzdCBwYXJhbXMgaW4gdGhlIGNvbmZpZ1xuICAgICAgICBjb25maWcuZmV0Y2ggPSB7XG4gICAgICAgICAgICBjcmVkZW50aWFsczogJ3NhbWUtb3JpZ2luJyxcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgICAgICBBY2NlcHQ6ICdhcHBsaWNhdGlvbi9qc29uJyxcbiAgICAgICAgICAgICAgICAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgZGlzcGF0Y2goc2V0Q29uZmlnKGNvbmZpZykpO1xuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3Qge2NvbmZpZ30gPSB0aGlzLnByb3BzO1xuICAgICAgICBpZiAodHlwZShjb25maWcpID09PSAnTnVsbCcpIHtcbiAgICAgICAgICAgIHJldHVybiA8ZGl2IGNsYXNzTmFtZT0nX2Rhc2gtbG9hZGluZyc+TG9hZGluZy4uLjwvZGl2PjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB7c2hvd191bmRvX3JlZG99ID0gY29uZmlnO1xuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAgICAgICAgICAgIHtzaG93X3VuZG9fcmVkbyA/IDxUb29sYmFyIC8+IDogbnVsbH1cbiAgICAgICAgICAgICAgICA8QVBJQ29udHJvbGxlciAvPlxuICAgICAgICAgICAgICAgIDxMb2FkaW5nIC8+XG4gICAgICAgICAg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Blcihwcm9wcyk7XG5cbiAgICAgICAgdGhpcy5zZXRQcm9wcyA9IHRoaXMuc2V0UHJvcHMuYmluZCh0aGlzKTtcbiAgICB9XG5cbiAgICBjcmVhdGVDb250YWluZXIocHJvcHMsIGNvbXBvbmVudCwgcGF0aCwga2V5ID0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHJldHVybiBpc1NpbXBsZUNvbXBvbmVudChjb21wb25lbnQpID8gKFxuICAgICAgICAgICAgY29tcG9uZW50XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgICA8VHJlZUNvbnRhaW5lclxuICAgICAgICAgICAgICAgIGtleT17XG4gICAgICAgICAgICAgICAgICAgIChjb21wb25lbnQgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudC5wcm9wcyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5naWZ5SWQoY29tcG9uZW50LnByb3BzLmlkKSkgfHxcbiAgICAgICAgICAgICAgICAgICAga2V5XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9lcnJvcj17cHJvcHMuX2Rhc2hwcml2YXRlX2Vycm9yfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9sYXlvdXQ9e2NvbXBvbmVudH1cbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbG9hZGluZ1N0YXRlPXtnZXRMb2FkaW5nU3RhdGUoXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudCxcbiAgICAgICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgcHJvcHMuX2Rhc2hwcml2YXRlX2xvYWRpbmdNYXBcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9sb2FkaW5nU3RhdGVIYXNoPXtnZXRMb2FkaW5nSGFzaChcbiAgICAgICAgICAgICAgICAgICAgcGF0aCxcbiAgICAgICAgICAgICAgICAgICAgcHJvcHMuX2Rhc2hwcml2YXRlX2xvYWRpbmdNYXBcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9wYXRoPXtKU09OLnN0cmluZ2lmeShwYXRoKX1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgc2V0UHJvcHMobmV3UHJvcHMpIHtcbiAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2dyYXBocyxcbiAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9kaXNwYXRjaCxcbiAgICAgICAgICAgIF9kYXNocHJpdmF0ZV9wYXRoLFxuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2xheW91dFxuICAgICAgICB9ID0gdGhpcy5wcm9wcztcblxuICAgICAgICBjb25zdCBvbGRQcm9wcyA9IHRoaXMuZ2V0TGF5b3V0UHJvcHMoKTtcbiAgICAgICAgY29uc3Qge2lkfSA9IG9sZFByb3BzO1xuICAgICAgICBjb25zdCBjaGFuZ2VkUHJvcHMgPSBwaWNrQnkoXG4gICAgICAgICAgICAodmFsLCBrZXkpID0+ICFlcXVhbHModmFsLCBvbGRQcm9wc1trZXldKSxcbiAgICAgICAgICAgIG5ld1Byb3BzXG4gICAgICAgICk7XG4gICAgICAgIGlmICghaXNFbXB0eShjaGFuZ2VkUHJvcHMpKSB7XG4gICAgICAgICAgICAvLyBJZGVudGlmeSB0aGUgbW9kaWZpZWQgcHJvcHMgdGhhdCBhcmUgcmVxdWlyZWQgZm9yIGNhbGxiYWNrc1xuICAgICAgICAgICAgY29uc3Qgd2F0Y2hlZEtleXMgPSBnZXRXYXRjaGVkS2V5cyhcbiAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICBrZXlzKGNoYW5nZWRQcm9wcyksXG4gICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2dyYXBoc1xuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgLy8gc2V0UHJvcHMgaGVyZSBpcyB0cmlnZ2VyZWQgYnkgdGhlIFVJIC0gcmVjb3JkIHRoZXNlIGNoYW5nZXNcbiAgICAgICAgICAgIC8vIGZvciBwZXJzaXN0ZW5jZVxuICAgICAgICAgICAgcmVjb3JkVWlFZGl0KF9kYXNocHJpdmF0ZV9sYXlvdXQsIG5ld1Byb3BzLCBfZGFzaHByaXZhdGVfZGlzcGF0Y2gpO1xuXG4gICAgICAgICAgICAvLyBPbmx5IGRpc3BhdGNoIGNoYW5nZXMgdG8gRGFzaCBpZiBhIHdhdGNoZWQgcHJvcCBjaGFuZ2VkXG4gICAgICAgICAgICBpZiAod2F0Y2hlZEtleXMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2Rpc3BhdGNoKFxuICAgICAgICAgICAgICAgICAgICBub3RpZnlPYnNlcnZlcnMoe1xuICAgICAgICAgICAgICAgICAgICAgICAgaWQsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wczogcGljayh3YXRjaGVkS2V5cywgY2hhbmdlZFByb3BzKVxuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEFsd2F5cyB1cGRhdGUgdGhpcyBjb21wb25lbnQncyBwcm9wc1xuICAgICAgICAgICAgX2Rhc2hwcml2YXRlX2Rpc3BhdGNoKFxuICAgICAgICAgICAgICAgIHVwZGF0ZVByb3BzKHtcbiAgICAgICAgICAgICAgICAgICAgcHJvcHM6IGNoYW5nZWRQcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgaXRlbXBhdGg6IF9kYXNocHJpdmF0ZV9wYXRoXG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBnZXRDaGlsZHJlbihjb21wb25lbnRzLCBwYXRoKSB7XG4gICAgICAgIGlmIChpc05pbChjb21wb25lbnRzKSkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gQXJyYXkuaXNBcnJheShjb21wb25lbnRzKVxuICAgICAgICAgICAgPyBhZGRJbmRleChtYXApKFxuICAgICAgICAgICAgICAgICAgKGNvbXBvbmVudCwgaSkgPT5cbiAgICAgICAgICAgICAgICAgICAgICB0aGlzLmNyZWF0ZUNvbnRhaW5lcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LFxuICAgICAgICAgICAgICAgICAgICAgICAgICBjb25jYXQocGF0aCwgWydwcm9wcycsICdjaGlsZHJlbicsIGldKVxuICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICBjb21wb25lbnRzXG4gICAgICAgICAgICAgIClcbiAgICAgICAgICAgIDogdGhpcy5jcmVhdGVDb250YWluZXIoXG4gICAgICAgICAgICAgICAgICB0aGlzLnByb3BzLFxuICAgICAgICAgICAgICAgICAgY29tcG9uZW50cyxcbiAgICAgICAgICAgICAgICAgIGNvbmNhdChwYXRoLCBbJ3Byb3BzJywgJ2NoaWxkcmVuJ10pXG4gICAgICAgICAgICAgICk7XG4gICAgfVxuXG4gICAgd3JhcENoaWxkcmVuUHJvcChub2RlLCBjaGlsZHJlblByb3ApIHtcbiAgICAgICAgaWYgKEFycmF5LmlzQXJyYXkobm9kZSkpIHtcbiAgICAgICAgICAgIHJldHVybiBub2RlLm1hcCgobiwgaSkgPT5cbiAgICAgICAgICAgICAgICBpc0RyeUNvbXBvbmVudChuKVxuICAgICAgICAgICAgICAgICAgICA/IHRoaXMuY3JlYXRlQ29udGFpbmVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBjb25jYXQodGhpcy5wcm9wcy5fZGFzaHByaXZhdGVfcGF0aCwgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3Byb3BzJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4uLmNoaWxkcmVuUHJvcCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGlcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIDogblxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAoIWlzRHJ5Q29tcG9uZW50KG5vZGUpKSB7XG4gICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVDb250YWluZXIoXG4gICAgICAgICAgICB0aGlzLnByb3BzLFxuICAgICAgICAgICAgbm9kZSxcbiAgICAgICAgICAgIGNvbmNhdCh0aGlzLnByb3BzLl9kYXNocHJpdmF0ZV9wYXRoLCBbJ3Byb3BzJywgLi4uY2hpbGRyZW5Qcm9wXSlcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICBnZXRDb21wb25lbnQoX2Rhc2hwcml2YXRlX2xheW91dCwgY2hpbGRyZW4sIGxvYWRpbmdfc3RhdGUsIHNldFByb3BzKSB7XG4gICAgICAgIGNvbnN0IHtfZGFzaHByaXZhdGVfY29uZmlnLCBfZGFzaHByaXZhdGVfZGlzcGF0Y2gsIF9kYXNocHJpdmF0ZV9lcnJvcn0gPVxuICAgICAgICAgICAgdGhpcy5wcm9wcztcblxuICAgICAgICBpZiAoaXNFbXB0eShfZGFzaHByaXZhdGVfbGF5b3V0KSkge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaXNTaW1wbGVDb21wb25lbnQoX2Rhc2hwcml2YXRlX2xheW91dCkpIHtcbiAgICAgICAgICAgIHJldHVybiBfZGFzaHByaXZhdGVfbGF5b3V0O1xuICAgICAgICB9XG4gICAgICAgIHZhbGlkYXRlQ29tcG9uZW50KF9kYXNocHJpdmF0ZV9sYXlvdXQpO1xuXG4gICAgICAgIGNvbnN0IGVsZW1lbnQgPSBSZWdpc3RyeS5yZXNvbHZlKF9kYXNocHJpdmF0ZV9sYXlvdXQpO1xuXG4gICAgICAgIC8vIEh5ZHJhdGUgY29tcG9uZW50cyBwcm9wc1xuICAgICAgICBjb25zdCBjaGlsZHJlblByb3BzID0gcGF0aE9yKFxuICAgICAgICAgICAgW10sXG4gICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgJ2NoaWxkcmVuX3Byb3BzJyxcbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbGF5b3V0Lm5hbWVzcGFjZSxcbiAgICAgICAgICAgICAgICBfZGFzaHByaXZhdGVfbGF5b3V0LnR5cGVcbiAgICAgICAgICAgIF0sXG4gICAgICAgICAgICBfZGFzaHByaXZhdGVfY29uZmlnXG4gICAgICAgICk7XG4gICAgICAgIGxldCBwcm9wcyA9IGRpc3NvYygnY2hpbGRyZW4nLCBfZGFzaHByaXZhdGVfbGF5b3V0LnByb3BzKTtcblxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNoaWxkcmVuUHJvcHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGNvbnN0IGNoaWxkcmVuUHJvcCA9IGNoaWxkcmVuUHJvcHNbaV07XG4gICAgICAgICAgICBpZiAoY2hpbGRyZW5Qcm9wLmluY2x1ZGVzKCcuJykpIHtcbiAgICAgICAgICAgICAgICBsZXQgcGF0aCA9IGNoaWxkcmVuUHJvcC5zcGxpdCgnLicpO1xuICAgICAgICAgICAgICAgIGxldCBub2RlO1xuICAgICAgICAgICAgICAgIGxldCBub2RlVmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKGNoaWxkcmVuUHJvcC5pbmNsdWRlcygnW10nKSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZnJvbnRQYXRoID0gW10sXG4gICAgICAgICAgICAgICAgICAgICAgICBiYWNrUGF0aCA9IFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgZm91bmQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgcGF0aC5mb3JFYWNoKHAgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFmb3VuZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwLmluY2x1ZGVzKCdbXScpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2gocC5yZXBsYWNlKCdbXScsICcnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLnB1c2gocCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrUGF0aC5wdXNoKHApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgICAgICAgICBub2RlID0gcnBhdGgoZnJvbnRQYXRoLCBwcm9wcyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChub2RlID09PSB1bmRlZmluZWQgfHwgIW5vZGUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBmaXJzdE5vZGUgPSBycGF0aChiYWNrUGF0aCwgbm9kZVswXSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghZmlyc3ROb2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBub2RlVmFsdWUgPSBub2RlLm1hcCgoZWxlbWVudCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudFBhdGggPSBjb25jYXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbnRQYXRoLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmNhdChbaV0sIGJhY2tQYXRoKVxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhc3NvY1BhdGgoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja1BhdGgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy53cmFwQ2hpbGRyZW5Qcm9wKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBycGF0aChiYWNrUGF0aCwgZWxlbWVudCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRQYXRoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50XG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcGF0aCA9IGZyb250UGF0aDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBub2RlID0gcnBhdGgocGF0aCwgcHJvcHMpO1xuICAgICAgICAgICAgICAgICAgICBpZiAobm9kZSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBub2RlVmFsdWUgPSB0aGlzLndyYXBDaGlsZHJlblByb3Aobm9kZSwgcGF0aCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHByb3BzID0gYXNzb2NQYXRoKHBhdGgsIG5vZGVWYWx1ZSwgcHJvcHMpO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3Qgbm9kZSA9IHByb3BzW2NoaWxkcmVuUHJvcF07XG4gICAgICAgICAgICBpZiAobm9kZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgcHJvcHMgPSBhc3NvYyhcbiAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW5Qcm9wLFxuICAgICAgICAgICAgICAgICAgICB0aGlzLndyYXBDaGlsZHJlblByb3Aobm9kZSwgW2NoaWxkcmVuUHJvcF0pLFxuICAgICAgICAgICAgICAgICAgICBwcm9wc1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZShwcm9wcy5pZCkgPT09ICdPYmplY3QnKSB7XG4gICAgICAgICAgICAvLyBUdXJuIG9iamVjdCBpZHMgKGZvciB3aWxkY2FyZHMpIGludG8gdW5pcXVlIHN0cmluZ3MuXG4gICAgICAgICAgICAvLyBCZWNhdXNlIG9mIHRoZSBgZGlzc29jYCBhYm92ZSB3ZSdyZSBub3QgbXV0YXRpbmcgdGhlIGxheW91dCxcbiAgICAgICAgICAgIC8vIGp1c3QgdGhlIGlkIHdlIHBhc3Mgb24gdG8gdGhlIHJlbmRlcmVkIGNvbXBvbmVudFxuICAgICAgICAgICAgcHJvcHMuaWQgPSBzdHJpbmdpZnlJZChwcm9wcy5pZCk7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgZXh0cmFQcm9wcyA9IHtcbiAgICAgICAgICAgIGxvYWRpbmdfc3RhdGU6IGxvYWRpbmdfc3RhdGUgfHwgTk9UX0xPQURJTkcsXG4gICAgICAgICAgICBzZXRQcm9wc1xuICAgICAgICB9O1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8Q29tcG9uZW50RXJyb3JCb3VuZGFyeVxuICAgICAgICAgICAgICAgIGNvbXBvbmVudFR5cGU9e19kYXNocHJpdmF0ZV9sYXlvdXQudHlwZX1cbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZD17cHJvcHMuaWR9XG4gICAgICAgICAgICAgICAga2V5PXtwcm9wcy5pZH1cbiAgICAgICAgICAgICAgICBkaXNwYXRjaD17X2Rhc2hwcml2YXRlX2Rpc3BhdGNofVxuICAgICAgICAgICAgICAgIGVycm9yPXtfZGFzaHByaXZhdGVfZXJyb3J9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge19kYXNocHJpdmF0ZV9jb25maWcucHJvcHNfY2hlY2sgPyAoXG4gICAgICAgICAgICAgICAgICAgIDxDaGVja2VkQ29tcG9uZW50XG4gICAgICAgICAgICAgICAgICAgICAgICBjaGlsZHJlbj17Y2hpbGRyZW59XG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50PXtlbGVtZW50fVxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM9e3Byb3BzfVxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmFQcm9wcz17ZXh0cmFQcm9wc31cbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU9e19kYXNocHJpdmF0ZV9sYXlvdXQudHlwZX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAgICAgICBjcmVhdGVFbGVtZW50KGVsZW1lbnQsIHByb3BzLCBleHRyYVByb3BzLCBjaGlsZHJlbilcbiAgICAgICAgICAgICAgICApfVxuICAgICAgICAgICAgPC9Db21wb25lbnRFcnJvckJvdW5kYXJ5PlxuICAgICAgICApO1xuICAgIH1cblxuICAgIGdldExheW91dFByb3BzKCkge1xuICAgICAgICByZXR1cm4gcHJvcE9yKHt9LCAncHJvcHMnLCB0aGlzLnByb3BzLl9kYXNocHJpdmF0ZV9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PTk5FQ1RJT05fU1RBVFVTJyxcbiAgICAgICAgICAgICAgICAgICAgcGF5bG9hZDogY29ubmVjdGVkXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBkaXNwYXRjaCh7XG4gICAgICAgICAgICB0eXBlOiBzdG9yZSxcbiAgICAgICAgICAgIHBheWxvYWQ6IHtpZCwgc3RhdHVzOiAnbG9hZGluZyd9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBsZXQgcmVzO1xuICAgICAgICAgICAgZm9yIChsZXQgcmV0cnkgPSAwOyByZXRyeSA8PSBNQVhfQVVUSF9SRVRSSUVTOyByZXRyeSsrKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gYXdhaXQgcmVxdWVzdFttZXRob2RdKHVybCwgY29uZmlnLmZldGNoLCBib2R5KTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGZldGNoIHJlamVjdGlvbiAtIHRoaXMgbWVhbnMgdGhlIHJlcXVlc3QgZGlkbid0IHJldHVybixcbiAgICAgICAgICAgICAgICAgICAgLy8gd2UgZG9uJ3QgZ2V0IGhlcmUgZnJvbSA0MDAvNTAwIGVycm9ycywgb25seSBuZXR3b3JrXG4gICAgICAgICAgICAgICAgICAgIC8vIGVycm9ycyBvciB1bnJlc3BvbnNpdmUgc2VydmVycy5cbiAgICAgICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWNvbnNvbGVcbiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2ZldGNoIGVycm9yJywgcmVzKTtcbiAgICAgICAgICAgICAgICAgICAgc2V0Q29ubmVjdGlvblN0YXR1cyhmYWxzZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIHJlcy5zdGF0dXMgPT09IFNUQVRVUy5VTkFVVEhPUklaRUQgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLnN0YXR1cyA9PT0gU1RBVFVTLkJBRF9SRVFVRVNUXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChob29rcy5yZXF1ZXN0X3JlZnJlc2hfand0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBib2R5ID0gYXdhaXQgcmVzLnRleHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChib2R5LmluY2x1ZGVzKEpXVF9FWFBJUkVEX01FU1NBR0UpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV3Snd0ID0gYXdhaXQgaG9va3MucmVxdWVzdF9yZWZyZXNoX2p3dChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmZldGNoLmhlYWRlcnMuQXV0aG9yaXphdGlvbi5zdWJzdHIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQmVhcmVyICcubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdKd3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3SGVhZGVycyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEF1dGhvcml6YXRpb246IGBCZWFyZXIgJHtuZXdKd3R9YFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IG1lcmdlRGVlcFJpZ2h0KGNvbmZpZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmV0Y2g6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBuZXdIZWFkZXJzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY29uc3QgY29udGVudFR5cGUgPSByZXMuaGVhZGVycy5nZXQoJ2NvbnRlbnQtdHlwZScpO1xuXG4gICAgICAgICAgICBpZiAobmV3SGVhZGVycykge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoKGFkZEh0dHBIZWFkZXJzKG5ld0hlYWRlcnMpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNldENvbm5lY3Rpb25TdGF0dXModHJ1ZSk7XG4gICAgICAgICAgICBpZiAoY29udGVudFR5cGUgJiYgY29udGVudFR5cGUuaW5kZXhPZignYXBwbGljYXRpb24vanNvbicpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZXMuanNvbigpLnRoZW4oanNvbiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IHN0b3JlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF5bG9hZDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1czogcmVzLnN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBqc29uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4ganNvbjtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxvZ1dhcm5pbmdPbmNlKFxuICAgICAgICAgICAgICAgICdSZXNwb25zZSBpcyBtaXNzaW5nIGhlYWRlcjogY29udGVudC10eXBlOiBhcHBsaWNhdGlvbi9qc29uJ1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIHJldHVybiBkaXNwYXRjaCh7XG4gICAgICAgICAgICAgICAgdHlwZTogc3RvcmUsXG4gICAgICAgICAgICAgICAgcGF5bG9hZDoge1xuICAgICAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICAgICAgc3RhdHVzOiByZXMuc3RhdHVzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgY29uc3QgbWVzc2FnZSA9ICdFcnJvciBmcm9tIEFQSSBjYWxsOiAnICsgZW5kcG9pbnQ7XG4gICAgICAgICAgICBoYW5kbGVBc3luY0Vycm9yKGVyciwgbWVzc2FnZSwgZGlzcGF0Y2gpO1xuICAgICAgICB9XG4gICAgfTtcbn1cbiIsImNvbnN0IGFjdGlvbkxpc3QgPSB7XG4gICAgT05fUFJPUF9DSEFOR0U6IDEsXG4gICAgU0VUX1JFUVVFU1RfUVVFVUU6IDEsXG4gICAgU0VUX0dSQVBIUzogMSxcbiAgICBTRVRfUEFUSFM6IDEsXG4gICAgU0VUX0xBWU9VVDogMSxcbiAgICBTRVRfQVBQX0xJRkVDWUNMRTogMSxcbiAgICBTRVRfQ09ORklHOiAxLFxuICAgIEFERF9IVFRQX0hFQURFUlM6IDEsXG4gICAgT05fRVJST1I6IDEsXG4gICAgU0VUX0hPT0tTOiAxXG59O1xuXG5leHBvcnQgY29uc3Qg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ICAgICBoYXNPdXRwdXRzID0gZmFsc2U7XG4gICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdBIGNhbGxiYWNrIGlzIG1pc3NpbmcgT3V0cHV0cycsIFtcbiAgICAgICAgICAgICAgICAnUGxlYXNlIHByb3ZpZGUgYW4gb3V0cHV0IGZvciB0aGlzIGNhbGxiYWNrOicsXG4gICAgICAgICAgICAgICAgSlNPTi5zdHJpbmdpZnkoZGVwLCBudWxsLCAyKVxuICAgICAgICAgICAgXSk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBoZWFkID1cbiAgICAgICAgICAgICdJbiB0aGUgY2FsbGJhY2sgZm9yIG91dHB1dChzKTpcXG4gICcgK1xuICAgICAgICAgICAgb3V0cHV0cy5tYXAoY29tYmluZUlkQW5kUHJvcCkuam9pbignXFxuICAnKTtcblxuICAgICAgICBpZiAoIWlucHV0cy5sZW5ndGgpIHtcbiAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0EgY2FsbGJhY2sgaXMgbWlzc2luZyBJbnB1dHMnLCBbXG4gICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAndGhlcmUgYXJlIG5vIGBJbnB1dGAgZWxlbWVudHMuJyxcbiAgICAgICAgICAgICAgICAnV2l0aG91dCBgSW5wdXRgIGVsZW1lbnRzLCBpdCB3aWxsIG5ldmVyIGdldCBjYWxsZWQuJyxcbiAgICAgICAgICAgICAgICAnJyxcbiAgICAgICAgICAgICAgICAnU3Vic2NyaWJpbmcgdG8gYElucHV0YCBjb21wb25lbnRzIHdpbGwgY2F1c2UgdGhlJyxcbiAgICAgICAgICAgICAgICAnY2FsbGJhY2sgdG8gYmUgY2FsbGVkIHdoZW5ldmVyIHRoZWlyIHZhbHVlcyBjaGFuZ2UuJ1xuICAgICAgICAgICAgXSk7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBzcGVjID0gW1xuICAgICAgICAgICAgW291dHB1dHMsICdPdXRwdXQnXSxcbiAgICAgICAgICAgIFtpbnB1dHMsICdJbnB1dCddLFxuICAgICAgICAgICAgW3N0YXRlLCAnU3RhdGUnXVxuICAgICAgICBdO1xuICAgICAgICBzcGVjLmZvckVhY2goKFthcmdzLCBjbHNdKSA9PiB7XG4gICAgICAgICAgICBpZiAoY2xzID09PSAnT3V0cHV0JyAmJiAhaGFzT3V0cHV0cykge1xuICAgICAgICAgICAgICAgIC8vIGp1c3QgYSBxdWlyayBvZiBob3cgd2UgcGFzcyAmIHBhcnNlIG91dHB1dHMgLSBpZiB5b3UgZG9uJ3RcbiAgICAgICAgICAgICAgICAvLyBwcm92aWRlIG9uZSwgaXQgbG9va3MgbGlrZSBhIHNpbmdsZSBibGFuayBvdXRwdXQuIFRoaXMgaXNcbiAgICAgICAgICAgICAgICAvLyBhY3R1YWxseSB1c2VmdWwgZm9yIGdyYWNlZnVsIGZhaWx1cmUsIHNvIHdlIHdvcmsgYXJvdW5kIGl0LlxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFBcnJheS5pc0FycmF5KGFyZ3MpKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2hFcnJvcihgQ2FsbGJhY2sgJHtjbHN9KHMpIG11c3QgYmUgYW4gQXJyYXlgLCBbXG4gICAgICAgICAgICAgICAgICAgIGhlYWQsXG4gICAgICAgICAgICAgICAgICAgIGBGb3IgJHtjbHN9KHMpIHdlIGZvdW5kOmAsXG4gICAgICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KGFyZ3MpLFxuICAgICAgICAgICAgICAgICAgICAnYnV0IHdlIGV4cGVjdGVkIGFuIEFycmF5LidcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGFyZ3MuZm9yRWFjaCgoaWRQcm9wLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgdmFsaWRhdGVBcmcoaWRQcm9wLCBoZWFkLCBjbHMsIGksIG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AgICAgICAgICBdKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZvckVhY2hPYmpJbmRleGVkKCh2LCBrKSA9PiB7XG4gICAgICAgICAgICBpZiAoIWspIHtcbiAgICAgICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdDYWxsYmFjayB3aWxkY2FyZCBJRCBlcnJvcicsIFtcbiAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgYCR7Y2xzfVske2l9XS5pZCBoYXMga2V5IFwiJHtrfVwiYCxcbiAgICAgICAgICAgICAgICAgICAgJ0tleXMgbXVzdCBiZSBub24tZW1wdHkgc3RyaW5ncy4nXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgdiA9PT0gJ29iamVjdCcgJiYgdi53aWxkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGFsbG93ZWRXaWxkY2FyZHNbY2xzXVt2LndpbGRdICE9PSB2KSB7XG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0NhbGxiYWNrIHdpbGRjYXJkIElEIGVycm9yJywgW1xuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGAke2Nsc31bJHtpfV0uaWRbXCIke2t9XCJdID0gJHt2LndpbGR9YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGBBbGxvd2VkIHdpbGRjYXJkcyBmb3IgJHtjbHN9cyBhcmU6YCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleXMoYWxsb3dlZFdpbGRjYXJkc1tjbHNdKS5qb2luKCcsICcpXG4gICAgICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoIWluY2x1ZGVzKHR5cGVvZiB2LCB3aWxkY2FyZFZhbFR5cGVzKSkge1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ0NhbGxiYWNrIHdpbGRjYXJkIElEIGVycm9yJywgW1xuICAgICAgICAgICAgICAgICAgICBoZWFkLFxuICAgICAgICAgICAgICAgICAgICBgJHtjbHN9WyR7aX1dLmlkW1wiJHtrfVwiXSA9ICR7SlNPTi5zdHJpbmdpZnkodil9YCxcbiAgICAgICAgICAgICAgICAgICAgJ1dpbGRjYXJkIGNhbGxiYWNrIElEIHZhbHVlcyBtdXN0IGJlIGVpdGhlciB3aWxkY2FyZHMnLFxuICAgICAgICAgICAgICAgICAgICAnb3IgY29uc3RhbnRzIG9mIG9uZSBvZiB0aGVzZSB0eXBlczonLFxuICAgICAgICAgICAgICAgICAgICB3aWxkY2FyZFZhbFR5cGVzLmpvaW4oJywgJylcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSwgaWQpO1xuICAgIH0gZWxzZSBpZiAodHlwZW9mIGlkID09PSAnc3RyaW5nJykge1xuICAgICAgICBpZiAoIWlkKSB7XG4gICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdDYWxsYmFjayBpdGVtIG1pc3NpbmcgSUQnLCBbXG4gICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICBgJHtjbHN9WyR7aX1dLmlkID0gXCIke2lkfVwiYCxcbiAgICAgICAgICAgICAgICAnRXZlcnkgaXRlbSBsaW5rZWQgdG8gYSBjYWxsYmFjayBuZWVkcyBhbiBJRCdcbiAgICAgICAgICAgIF0pO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGludmFsaWRDaGFycyA9IGlkSW52YWxpZENoYXJzLmZpbHRlcihjID0+IGluY2x1ZGVzKGMsIGlkKSk7XG4gICAgICAgIGlmIChpbnZhbGlkQ2hhcnMubGVuZ3RoKSB7XG4gICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdDYWxsYmFjayBpbnZhbGlkIElEIHN0cmluZycsIFtcbiAgICAgICAgICAgICAgICBoZWFkLFxuICAgICAg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vcH0pIGlzIGFscmVhZHkgdXNlZCBieSB0aGlzIGNhbGxiYWNrLmBcbiAgICAgICAgICAgICAgICBdKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAob3V0U3Ryc1tpZFByb3BdKSB7XG4gICAgICAgICAgICAgICAgZGlzcGF0Y2hFcnJvcignRHVwbGljYXRlIGNhbGxiYWNrIG91dHB1dHMnLCBbXG4gICAgICAgICAgICAgICAgICAgIGhlYWQsXG4gICAgICAgICAgICAgICAgICAgIGBPdXRwdXQgJHtpfSAoJHtpZFByb3B9KSBpcyBhbHJlYWR5IGluIHVzZS5gLFxuICAgICAgICAgICAgICAgICAgICAnQW55IGdpdmVuIG91dHB1dCBjYW4gb25seSBoYXZlIG9uZSBjYWxsYmFjayB0aGF0IHNldHMgaXQuJyxcbiAgICAgICAgICAgICAgICAgICAgJ1RvIHJlc29sdmUgdGhpcyBzaXR1YXRpb24sIHRyeSBjb21iaW5pbmcgdGhlc2UgaW50bycsXG4gICAgICAgICAgICAgICAgICAgICdvbmUgY2FsbGJhY2sgZnVuY3Rpb24sIGRpc3Rpbmd1aXNoaW5nIHRoZSB0cmlnZ2VyJyxcbiAgICAgICAgICAgICAgICAgICAgJ2J5IHVzaW5nIGBkYXNoLmNhbGxiYWNrX2NvbnRleHRgIGlmIG5lY2Vzc2FyeS4nXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIG5ld091dHB1dFN0cnNbaWRQcm9wXSA9IDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBpZE9iaiA9IHtpZCwgcHJvcGVydHl9O1xuICAgICAgICAgICAgY29uc3Qgc2VsZk92ZXJsYXAgPSB3aWxkY2FyZE92ZXJsYXAoaWRPYmosIG5ld091dHB1dE9ianMpO1xuICAgICAgICAgICAgY29uc3Qgb3RoZXJPdmVybGFwID0gc2VsZk92ZXJsYXAgfHwgd2lsZGNhcmRPdmVybGFwKGlkT2JqLCBvdXRPYmpzKTtcbiAgICAgICAgICAgIGlmIChzZWxmT3ZlcmxhcCB8fCBvdGhlck92ZXJsYXApIHtcbiAgICAgICAgICAgICAgICBjb25zdCBpZFByb3AgPSBjb21iaW5lSWRBbmRQcm9wKGlkT2JqKTtcbiAgICAgICAgICAgICAgICBjb25zdCBpZFByb3AyID0gY29tYmluZUlkQW5kUHJvcChzZWxmT3ZlcmxhcCB8fCBvdGhlck92ZXJsYXApO1xuICAgICAgICAgICAgICAgIGRpc3BhdGNoRXJyb3IoJ092ZXJsYXBwaW5nIHdpbGRjYXJkIGNhbGxiYWNrIG91dHB1dHMnLCBbXG4gICAgICAgICAgICAgICAgICAgIGhlYWQsXG4gICAgICAgICAgICAgICAgICAgIGBPdXRwdXQgJHtpfSAoJHtpZFByb3B9KWAsXG4gICAgICAgICAgICAgICAgICAgIGBvdmVybGFwcyBhbm90aGVyIG91dHB1dCAoJHtpZFByb3AyfSlgLFxuICAgICAgICAgICAgICAgICAgICBgdXNlZCBpbiAke3NlbGZPdmVybGFwID8gJ3RoaXMnIDogJ2EgZGlmZmVyZW50J30gY2FsbGJhY2suYFxuICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBuZXdPdXRwdXRPYmpzLnB1c2goaWRPYmopO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG4gICAga2V5cyhuZXdPdXRwdXRTdHJzKS5mb3JFYWNoKGsgPT4ge1xuICAgICAgICBvdXRTdHJzW2tdID0gMTtcbiAgICB9KTtcbiAgICBuZXdPdXRwdXRPYmpzLmZvckVhY2goaWRPYmogPT4ge1xuICAgICAgICBvdXRPYmpzLnB1c2goaWRPYmopO1xuICAgIH0pO1xufVxuXG5mdW5jdGlvbiBjaGVja0luT3V0T3ZlcmxhcChvdXQsIGlucHV0cykge1xuICAgIGNvbnN0IHtpZDogb3V0SWQsIHByb3Bl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Mgbm90IGluIGBPdXRwdXRgcycsIFtcbiAgICAgICAgICAgICAgICAgICAgaGVhZCxcbiAgICAgICAgICAgICAgICAgICAgYCR7Y2xzfSAke2l9ICgke2NvbWJpbmVJZEFuZFByb3AoYXJnKX0pYCxcbiAgICAgICAgICAgICAgICAgICAgYGhhcyBNQVRDSCBvciBBTExTTUFMTEVSIG9uIGtleShzKSAke2RpZmYuam9pbignLCAnKX1gLFxuICAgICAgICAgICAgICAgICAgICBgd2hlcmUgT3V0cHV0IDAgKCR7Y29tYmluZUlkQW5kUHJvcChvdXRwdXRzWzBdKX0pYCxcbiAgICAgICAgICAgICAgICAgICAgJ2RvZXMgbm90IGhhdmUgYSBNQVRDSCB3aWxkY2FyZC4gSW5wdXRzIGFuZCBTdGF0ZSBkbyBub3QnLFxuICAgICAgICAgICAgICAgICAgICAnbmVlZCBldmVyeSBNQVRDSCBmcm9tIHRoZSBPdXRwdXQocyksIGJ1dCB0aGV5IGNhbm5vdCBoYXZlJyxcbiAgICAgICAgICAgICAgICAgICAgJ2V4dHJhcyBiZXlvbmQgdGhlIE91dHB1dChzKS4nXG4gICAgICAgICAgICAgICAgXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0pO1xufVxuXG5jb25zdCBtYXRjaFdpbGRLZXlzID0gKFthLCBiXSkgPT4ge1xuICAgIGNvbnN0IGFXaWxkID0gYSAmJiBhLndpbGQ7XG4gICAgY29uc3QgYldpbGQgPSBiICYmIGIud2lsZDtcbiAgICBpZiAoYVdpbGQgJiYgYldpbGQpIHtcbiAgICAgICAgLy8gRXZlcnkgd2lsZGNhcmQgY29tYmluYXRpb24gb3ZlcmxhcHMgZXhjZXB0IE1BVENIPC0+QUxMU01BTExFUlxuICAgICAgICByZXR1cm4gIShcbiAgICAgICAgICAgIChhID09PSBNQVRDSCAmJiBiID09PSBBTExTTUFMTEVSKSB8fFxuICAgICAgICAgICAgKGEgPT09IEFMTFNNQUxMRVIgJiYgYiA9PT0gTUF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ICAgICAgcHJvcE5hbWUuY2hhckF0KGxhc3QpID09PSAnKicgJiZcbiAgICAgICAgICAgICAgICAgICAgcHJvcC5zdWJzdHIoMCwgbGFzdCkgPT09IHByb3BOYW1lLnN1YnN0cigwLCBsYXN0KVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3Qge3R5cGUsIG5hbWVzcGFjZX0gPSBjb21wb25lbnQ7XG4gICAgICAgICAgICBkaXNwYXRjaEVycm9yKCdJbnZhbGlkIHByb3AgZm9yIHRoaXMgY29tcG9uZW50JywgW1xuICAgICAgICAgICAgICAgIGBQcm9wZXJ0eSBcIiR7cHJvcH1cIiB3YXMgdXNlZCB3aXRoIGNvbXBvbmVudCBJRDpgLFxuICAgICAgICAgICAgICAgIGAgICR7SlNPTi5zdHJpbmdpZnkoaWQpfWAsXG4gICAgICAgICAgICAgICAgYGluIG9uZSBvZiB0aGUgJHtjbHN9IGl0ZW1zIG9mIGEgY2FsbGJhY2suYCxcbiAgICAgICAgICAgICAgICBgVGhpcyBJRCBpcyBhc3NpZ25lZCB0byBhICR7bmFtZXNwYWNlfS4ke3R5cGV9IGNvbXBvbmVudGAsXG4gICAgICAgICAgICAgICAgJ2luIHRoZSBsYXlvdXQsIHdoaWNoIGRvZXMgbm90IHN1cHBvcnQgdGhpcyBwcm9wZXJ0eS4nLFxuICAgICAgICAgICAgICAgIHRhaWwoY2FsbGJhY2tzKVxuICAgICAgICAgICAgXSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBmdW5jdGlvbiB2YWxpZGF0ZUlkUGF0dGVyblByb3AoaWQsIHByb3BlcnR5LCBjbHMsIGNhbGxiYWNrcykge1xuICAgICAgICByZXNvbHZlRGVwcygpKHBhdGhzKSh7aWQsIHByb3BlcnR5fSkuZm9yRWFjaChkZXAgPT4ge1xuICAgICAgICAgICAgY29uc3Qge2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zID0gaWRQcm9wc1twcm9wZXJ0eV07XG4gICAgICAgICAgICAgICAgICAgIHZhbGlkYXRlUHJvcChpZCwgaWRQYXRoLCBwcm9wZXJ0eSwgY2xzLCBjYWxsYmFja3MpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZG9TdGF0ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSXQgd291bGQgYmUgcmVkdW5kYW50IHRvIGNoZWNrIHN0YXRlIG9uIGJvdGggaW5wdXRzXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhbmQgb3V0cHV0cyAtIHNvIG9ubHkgc2V0IGRvU3RhdGUgZm9yIG91dHB1dHMuXG4gICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFja3MuZm9yRWFjaCh2YWxpZGF0ZVN0YXRlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIHZhbGlkYXRlTWFwKG91dHB1dE1hcCwgJ091dHB1dCcsIHRydWUpO1xuICAgIHZhbGlkYXRlTWFwKGlucHV0TWFwLCAnSW5wdXQnKTtcblxuICAgIGZ1bmN0aW9uIHZhbGlkYXRlUGF0dGVybnMocGF0dGVybnMsIGNscywgZG9TdGF0ZSkge1xuICAgICAgICBmb3IgKGNvbnN0IGtleVN0ciBpbiBwYXR0ZXJucykge1xuICAgICAgICAgICAgY29uc3Qga2V5UGF0dGVybnMgPSBwYXR0ZXJuc1trZXlTdHJdO1xuICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBrZXlQYXR0ZXJucykge1xuICAgICAgICAgICAgICAgIGtleVBhdHRlcm5zW3Byb3BlcnR5XS5mb3JFYWNoKCh7a2V5cywgdmFsdWVzLCBjYWxsYmFja3N9KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGlkID0gemlwT2JqKGtleXMsIHZhbHVlcyk7XG4gICAgICAgICAgIC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MgZW1wdHkgaWYgd2UgZm91bmQgYW4gZXJyb3IsIHNvIHdlIGRvbid0IHRyeSB0b1xuICAgICAgICAvLyBleGVjdXRlIHRoZSBicm9rZW4gY2FsbGJhY2tzLlxuICAgICAgICByZXR1cm4gZmluYWxHcmFwaHM7XG4gICAgfVxuXG4gICAgcGFyc2VkRGVwZW5kZW5jaWVzLmZvckVhY2goZGVwZW5kZW5jeSA9PiB7XG4gICAgICAgIGNvbnN0IHtvdXRwdXRzLCBpbnB1dHN9ID0gZGVwZW5kZW5jeTtcblxuICAgICAgICBvdXRwdXRzLmNvbmNhdChpbnB1dHMpLmZvckVhY2goaXRlbSA9PiB7XG4gICAgICAgICAgICBjb25zdCB7aWR9ID0gaXRlbTtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgZm9yRWFjaE9iakluZGV4ZWQoKHZhbCwga2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghd2lsZGNhcmRQbGFjZWhvbGRlcnNba2V5XSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgd2lsZGNhcmRQbGFjZWhvbGRlcnNba2V5XSA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleGFjdDogW10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwYW5kOiAwXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleVBsYWNlaG9sZGVycyA9IHdpbGRjYXJkUGxhY2Vob2xkZXJzW2tleV07XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWwgJiYgdmFsLndpbGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2YWwuZXhwYW5kKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5UGxhY2Vob2xkZXJzLmV4cGFuZCArPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleVBsYWNlaG9sZGVycy5leGFjdC5pbmRleE9mKHZhbCkgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrZXlQbGFjZWhvbGRlcnMuZXhhY3QucHVzaCh2YWwpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSwgaWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcblxuICAgIGZvckVhY2hPYmpJbmRleGVkKGtleVBsYWNlaG9sZGVycyA9PiB7XG4gICAgICAgIGNvbnN0IHtleGFjdCwgZXhwYW5kfSA9IGtleVBsYWNlaG9sZGVycztcbiAgICAgICAgY29uc3QgdmFscyA9IGV4YWN0LnNsaWNlKCkuc29ydChpZFZhbFNvcnQpO1xuICAgICAgICBpZiAoZXhwYW5kKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGV4cGFuZDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgaWYgKGV4YWN0Lmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB2YWxzLnNwbGljZSgwLCAwLCBbdmFsQmVmb3JlKHZhbHNbMF0pXSk7XG4gICAgICAgICAgICAgICAgICAgIHZhbHMucHVzaCh2YWxBZnRlcih2YWxzW3ZhbHMubGVuZ3RoIC0gMV0pKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB2YWxzLnB1c2goaSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKCFleGFjdC5sZW5ndGgpIHtcbiAgICAgICAgICAgIC8vIG9ubHkgTUFUQ0gvQUxMIC0gc3RpbGwgbmVlZCBhIHZhbHVlXG4gICAgICAgICAgICB2YWxzLnB1c2goMCk7XG4gICAgICAgIH1cbiAgICAgICAga2V5UGxhY2Vob2xkZXJzLnZhbHMgPSB2YWxzO1xuICAgIH0sIHdpbGRjYXJkUGxhY2Vob2xkZXJzKTtcblxuICAgIGZ1bmN0aW9uIG1ha2VBbGxJZHMoaWRTcGVjLCBvdXRJZEZpbmFsKSB7XG4gICAgICAgIGxldCBpZExpc3QgPSBbe31dO1xuICAgICAgICBmb3JFYWNoT2JqSW5kZXhlZCgodmFsLCBrZXkpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IHRlc3RWYWxzID0gd2lsZGNhcmRQbGFjZWhvbGRlcnNba2V5XS52YWxzO1xuICAgICAgICAgICAgY29uc3Qgb3V0VmFsSW5kZXggPSB0ZXN0VmFscy5pbmRleE9mKG91dElkRmluYWxba2V5XSk7XG4gICAgICAgICAgICBsZXQgbmV3VmFscyA9IFt2YWxdO1xuICAgICAgICAgICAgaWYgKHZhbCAmJiB2YWwud2lsZCkge1xuICAgICAgICAgICAgICAgIGlmICh2YWwgPT09IEFMTFNNQUxMRVIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG91dFZhbEluZGV4ID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV3VmFscyA9IHRlc3RWYWxzLnNsaWNlKDAsIG91dFZhbEluZGV4KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5vIHNtYWxsZXIgaXRlbXMgLSBkZWxldGUgYWxsIG91dHB1dHMuXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdWYWxzID0gW107XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBNQVRDSCBvciBBTExcbiAgICAgICAgICAgICAgICAgICAgLy8gTUFUQ0ggKmlzKiBBTEwgZm9yIG91dHB1dHMsIGllIHdlIGRvbid0IGFscmVhZHkgaGF2ZSBhXG4gICAgICAgICAgICAgICAgICAgIC8vIHZhbHVlIHNwZWNpZmllZCBpbiBgb3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XNoKG91dElkUHJvcCk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBwYXJzZWREZXBlbmRlbmNpZXMuZm9yRWFjaChkZXBlbmRlbmN5ID0+IHtcbiAgICAgICAgY29uc3Qge291dHB1dHMsIGlucHV0c30gPSBkZXBlbmRlbmN5O1xuXG4gICAgICAgIC8vIG5ldyBjYWxsYmFjaywgYWRkIGFuIGVtcHR5IGFycmF5IGZvciBpdHMgaW5wdXRzIGFuZCBvdXRwdXRzXG4gICAgICAgIGNiSW4ucHVzaChbXSk7XG4gICAgICAgIGNiT3V0LnB1c2goW10pO1xuXG4gICAgICAgIGZ1bmN0aW9uIGFkZE91dHB1dFRvTXVsdGkob3V0SWRGaW5hbCwgb3V0SWRQcm9wKSB7XG4gICAgICAgICAgICBtdWx0aUdyYXBoLmFkZE5vZGUob3V0SWRQcm9wKTtcbiAgICAgICAgICAgIGlucHV0cy5mb3JFYWNoKGluT2JqID0+IHtcbiAgICAgICAgICAgICAgICBjb25zdCB7aWQ6IGluSWQsIHByb3BlcnR5fSA9IGluT2JqO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgaW5JZCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaW5JZExpc3QgPSBtYWtlQWxsSWRzKGluSWQsIG91dElkRmluYWwpO1xuICAgICAgICAgICAgICAgICAgICBpbklkTGlzdC5mb3JFYWNoKGlkID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZElucHV0VG9NdWx0aShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21iaW5lSWRBbmRQcm9wKHtpZCwgcHJvcGVydHl9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRJZFByb3BcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGFkZElucHV0VG9N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2lkOiBvdXRJZCwgcHJvcGVydHl9ID0gb3V0SWRQcm9wO1xuICAgICAgICAgICAgLy8gY2hlY2sgaWYgdGhpcyBvdXRwdXQgaXMgYWxzbyBhbiBpbnB1dCB0byB0aGUgc2FtZSBjYWxsYmFja1xuICAgICAgICAgICAgY29uc3QgYWxzb0lucHV0ID0gY2hlY2tJbk91dE92ZXJsYXAob3V0SWRQcm9wLCBpbnB1dHMpO1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBvdXRJZCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBvdXRJZExpc3QgPSBtYWtlQWxsSWRzKG91dElkLCB7fSk7XG4gICAgICAgICAgICAgICAgb3V0SWRMaXN0LmZvckVhY2goaWQgPT4ge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0ZW1wT3V0SWRQcm9wID0ge2lkLCBwcm9wZXJ0eX07XG4gICAgICAgICAgICAgICAgICAgIGxldCBvdXRJZE5hbWUgPSBjb21iaW5lSWRBbmRQcm9wKHRlbXBPdXRJZFByb3ApO1xuICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGlzIG91dHB1dCBpcyBhbHNvIGFuIGlucHV0LCBhZGQgYG91dHB1dFRhZ2AgdG8gdGhlIG5hbWVcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFsc29JbnB1dCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZHVwbGljYXRlT3V0cHV0cy5wdXNoKHRlbXBPdXRJZFByb3ApO1xuICAgICAgICAgICAgICAgICAgICAgICAgb3V0SWROYW1lICs9IG91dHB1dFRhZztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBhZGRPdXRwdXRUb011bHRpKGlkLCBvdXRJZE5hbWUpO1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGFkZFBhdHRlcm4ob3V0cHV0UGF0dGVybnMsIG91dElkLCBwcm9wZXJ0eSwgZmluYWxEZXBlbmRlbmN5KTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgbGV0IG91dElkTmFtZSA9IGNvbWJpbmVJZEFuZFByb3Aob3V0SWRQcm9wKTtcbiAgICAgICAgICAgICAgICAvLyBpZiB0aGlzIG91dHB1dCBpcyBhbHNvIGFuIGlucHV0LCBhZGQgYG91dHB1dFRhZ2AgdG8gdGhlIG5hbWVcbiAgICAgICAgICAgICAgICBpZiAoYWxzb0lucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgIGR1cGxpY2F0ZU91dHB1dHMucHVzaChvdXRJZFByb3ApO1xuICAgICAgICAgICAgICAgICAgICBvdXRJZE5hbWUgKz0gb3V0cHV0VGFnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhZGRPdXRwdXRUb011bHRpKHt9LCBvdXRJZE5hbWUpO1xuICAgICAgICAgICAgICAgIGFkZE1hcChvdXRwdXRNYXAsIG91dElkLCBwcm9wZXJ0eSwgZmluYWxEZXBlbmRlbmN5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG5cbiAgICAgICAgaW5wdXRzLmZvckVhY2goaW5wdXRPYmplY3QgPT4ge1xuICAgICAgICAgICAgY29uc3Qge2lkOiBpbklkLCBwcm9wZXJ0eTogaW5Qcm9wfSA9IGlucHV0T2JqZWN0O1xuICAgICAgICAgICAgaWYgKHR5cGVvZiBpbklkID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgIGFkZFBhdHRlcm4oaW5wdXRQYXR0ZXJucywgaW5JZCwgaW5Qcm9wLCBmaW5hbERlcGVuZGVuY3kpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBhZGRNYXAoaW5wdXRNYXAsIGluSWQsIGluUHJvcCwgZmluYWxEZXBlbmRlbmN5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfSk7XG5cbiAgICAvLyBzZWNvbmQgcGFzcyBmb3IgYWRkaW5nIG5ldyBvdXRwdXQgbm9kZXMgYXMgZGVwZW5kZW5jaWVzIHdoZXJlIG5lZWRlZFxuICAgIGR1cGxpY2F0ZU91dHB1dHMuZm9yRWFjaChkdXBlT3V0SWRQcm9wID0+IHtcbiAgICAgICAgY29uc3Qgb3JpZ2luYWxOYW1lID0gY29tYmluZUlkQW5kUHJvcChkdXBlT3V0SWRQcm9wKTtcbiAgICAgICAgY29uc3QgbmV3TmFtZSA9IG9yaWdpbmFsTmFtZS5jb25jYXQob3V0cHV0VGFnKTtcbiAgICAgICAgZm9yICh2YXIgY250ID0gMDsgY250IDwgY2JJbi5sZW5ndGg7IGNudCsrKSB7XG4gICAgICAgICAgICAvLyBjaGVjayBpZiBpbnB1dCB0byB0aGUgY2FsbGJhY2tcbiAgICAgICAgICAgIGlmIChjYkluW2NudF0uc29tZShpbk5hbWUgPT4gaW5OYW1lID09PSBvcmlnaW5hbE5hbWUpKSB7XG4gICAgICAgICAgICAgICAgLyogbWFrZSBzdXJlIGl0J3Mgbm90IGFsc28gYW4gb3V0cHV0IG9mIHRoZSBjYWxsYmFja1xuICAgICAgICAgICAgICAgICAqICh0aGlzIHdpbGwgYmUgdGhlIG9yaWdpbmFsIGNhbGxiYWNrKVxuICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgIGlmICghY2JPdXRbY250XS5zb21lKG91dE5hbWUgPT4gb3V0TmFtZSA9PT0gbmV3TmFtZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY2JPdXRbY250XS5mb3JFYWNoKG91dE5hbWUgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkSW5wdXRUb011bHRpKG5ld05hbWUsIG91dE5hbWUsIGZhbHNlKTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gZmluYWxHcmFwaHM7XG59XG5cbmZ1bmN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ExTTUFMTEVSJ3Mgd291bGRuJ3QgbWFrZSBzZW5zZSFcbiAgICAgICAgICAgICAgICBpZiAocGF0dGVyblZhbCA9PT0gQUxMU01BTExFUiAmJiByZWZQYXR0ZXJuVmFsID09PSBBTExTTUFMTEVSKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgICdpbnZhbGlkIHdpbGRjYXJkIGlkIHBhaXI6ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0dGVyblZhbHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZktleXMsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZlBhdHRlcm5WYWxzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZWYWxzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICBpZFZhbFNvcnQodmFsLCByZWZWYWxzW3JlZkluZGV4XSkgIT09XG4gICAgICAgICAgICAgICAgICAgIChwYXR0ZXJuVmFsID09PSBBTExTTUFMTEVSXG4gICAgICAgICAgICAgICAgICAgICAgICA/IC0xXG4gICAgICAgICAgICAgICAgICAgICAgICA6IHJlZlBhdHRlcm5WYWwgPT09IEFMTFNNQUxMRVJcbiAgICAgICAgICAgICAgICAgICAgICAgID8gMVxuICAgICAgICAgICAgICAgICAgICAgICAgOiAwKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4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zBdO1xuICAgICAgICAgICAgcmVzb2x2ZSA9IHJlc29sdmVEZXBzKCk7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICAvLyB3aWxkY2FyZCB2ZXJzaW9uXG4gICAgICAgIGNvbnN0IGtleXMgPSBPYmplY3Qua2V5cyhpZCkuc29ydCgpO1xuICAgICAgICBjb25zdCB2YWxzID0gcHJvcHMoa2V5cywgaWQpO1xuICAgICAgICBjb25zdCBrZXlTdHIgPSBrZXlzLmpvaW4oJywnKTtcbiAgICAgICAgY29uc3QgcGF0dGVybnMgPSAoZ3JhcGhzLm91dHB1dFBhdHRlcm5zW2tleVN0cl0gfHwge30pW3Byb3BdO1xuICAgICAgICBpZiAocGF0dGVybnMpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcGF0dGVybnMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXR0ZXJuVmFscyA9IHBhdHRlcm5zW2ldLnZhbHVlcztcbiAgICAgICAgICAgICAgICBpZiAoaWRNYXRjaChrZXlzLCB2YWxzLCBwYXR0ZXJuVmFscykpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sgPSBwYXR0ZXJuc1tpXS5jYWxsYmFja3NbMF07XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmUgPSByZXNvbHZlRGVwcyhrZXlzLCB2YWxzLCBwYXR0ZXJuVmFscyk7XG4gICAgICAgICAgICAgICAgICAgIGFueVZhbHMgPSBnZXRBbnlWYWxzKHBhdHRlcm5WYWxzLCB2YWxzKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGlmICghcmVzb2x2ZSkge1xuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgcmV0dXJuIG1ha2VSZXNvbHZlZENhbGxiYWNrKGNhbGxiYW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2V5cywgZmlyc3RTaW5nbGVPdXRwdXQsIG91dHB1dHN9ID0gY2FsbGJhY2s7XG4gICAgICAgIGlmIChtYXRjaEtleXMubGVuZ3RoKSB7XG4gICAgICAgICAgICBjb25zdCBzaW5nbGVPdXRQYXR0ZXJuID0gb3V0cHV0c1tmaXJzdFNpbmdsZU91dHB1dF07XG4gICAgICAgICAgICBpZiAoc2luZ2xlT3V0UGF0dGVybikge1xuICAgICAgICAgICAgICAgIGFkZFJlc29sdmVkRnJvbU91dHB1dHMoXG4gICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrLFxuICAgICAgICAgICAgICAgICAgICBzaW5nbGVPdXRQYXR0ZXJuLFxuICAgICAgICAgICAgICAgICAgICByZXNvbHZlKHBhdGhzKShzaW5nbGVPdXRQYXR0ZXJuKSxcbiAgICAgICAgICAgICAgICAgICAgbWF0Y2hlc1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8qXG4gICAgICAgICAgICAgICAgICogSWYgZXZlcnkgb3V0cHV0IGhhcyBBTEwgd2UgbmVlZCB0byByZWR1Y2UgcmVzb2x2ZWQgc2V0XG4gICAgICAgICAgICAgICAgICogdG8gb25lIGl0ZW0gcGVyIGNvbWJpbmF0aW9uIG9mIE1BVENIIHZhbHVlcy5cbiAgICAgICAgICAgICAgICAgKiBUaGF0IHdpbGwgZ2l2ZSBvbmUgcmVzdWx0IHBlciBjYWxsYmFjayBpbnZvY2F0aW9uLlxuICAgICAgICAgICAgICAgICAqL1xuICAgICAgICAgICAgICAgIGNvbnN0IGFueVNlZW4gPSB7fTtcbiAgICAgICAgICAgICAgICBvdXRwdXRzLmZvckVhY2gob3V0UGF0dGVybiA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG91dFNldCA9IHJlc29sdmUocGF0aHMpKG91dFBhdHRlcm4pLmZpbHRlcihpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG1hdGNoU3RyID0gSlNPTi5zdHJpbmdpZnkocHJvcHMobWF0Y2hLZXlzLCBpLmlkKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWFueVNlZW5bbWF0Y2hTdHJdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYW55U2VlblttYXRjaFN0cl0gPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgYWRkUmVzb2x2ZWRGcm9tT3V0cHV0cyhcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrLFxuICAgICAgICAgICAgICAgICAgICAgICAgb3V0UGF0dGVybixcbiAgICAgICAgICAgICAgICAgICAgICAgIG91dFNldCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZXNcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnN0IGNiID0gbWFrZVJlc29sdmVkQ2FsbGJhY2soY2FsbGJhY2ssIHJlc29sdmUsICcnKTtcbiAgICAgICAgICAgIGlmIChmbGF0dGVuKGNiLmdldE91dHB1dHMocGF0aHMpKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBtYXRjaGVzLnB1c2goY2IpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbn1cblxuLypcbiAqIEZvciBhIGdpdmVuIGlkIGFuZCBwcm9wIGZpbmQgYWxsIGNhbGxiYWNrcyBpdCdzIGFuIGlucHV0IG9mLlxuICpcbiAqIFJldHVybnMgYW4gYXJyYXkgb2Ygb2JqZWN0czpcbiAqICAge2NhbGxiYWNrLCByZXNvbHZl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bGJhY2tzW2ZvdW5kSW5kZXhdO1xuICAgICAgICAgICAgICAgIGZvdW5kQ2IuY2hhbmdlZFByb3BJZHMgPSBtZXJnZU1heChcbiAgICAgICAgICAgICAgICAgICAgZm91bmRDYi5jaGFuZ2VkUHJvcElkcyxcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2suY2hhbmdlZFByb3BJZHNcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjay5pbml0aWFsQ2FsbCkge1xuICAgICAgICAgICAgICAgICAgICBmb3VuZENiLmluaXRpYWxDYWxsID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZvdW5kQ2JJZHNbY2FsbGJhY2sucmVzb2x2ZWRJZF0gPSBjYWxsYmFja3MubGVuZ3RoO1xuICAgICAgICAgICAgICAgIGNhbGxiYWNrcy5wdXNoKGNhbGxiYWNrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGZ1bmN0aW9uIGFkZENhbGxiYWNrSWZBcnJheShpZFN0cikge1xuICAgICAgICByZXR1cm4gY2IgPT5cbiAgICAgICAgICAgIGNiLmdldElucHV0cyhwYXRocykuc29tZShpbmkgPT4ge1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgQXJyYXkuaXNBcnJheShpbmkpICYmXG4gICAgICAgICAgICAgICAgICAgIGluaS5zb21lKGluaWogPT4gc3RyaW5naWZ5SWQoaW5pai5pZCkgPT09IGlkU3RyKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAvLyBUaGlzIGNhbGxiYWNrIHNob3VsZCB0cmlnZ2VyIGV2ZW4gd2l0aCBubyBjaGFuZ2VkUHJvcHMsXG4gICAgICAgICAgICAgICAgICAgIC8vIHNpbmNlIHRoZSBwcm9wcyB0aGF0IGNoYW5nZWQgbm8gbG9uZ2VyIGV4aXN0LlxuICAgICAgICAgICAgICAgICAgICAvLyBXZSdyZSBraW5kIG9mIGFidXNpbmcgdGhlIGBpbml0aWFsQ2FsbGAgZmxhZyBoZXJlLCBpdCdzXG4gICAgICAgICAgICAgICAgICAgIC8vIG1vcmUgbGlrZSBhIFwiZmluYWwgY2FsbFwiIGZvciB0aGUgcmVtb3ZlZCBpbnB1dHMsIGJ1dFxuICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGNhc2UgaXMgbm90IHN1YmplY3QgdG8gYHByZXZlbnRfaW5pdGlhbF9jYWxsYC5cbiAgICAgICAgICAgICAgICAgICAgaWYgKGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhuZXdQYXRocykpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2IuaW5pdGlhbENhbGwgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2IuY2hhbmdlZFByb3BJZHMgPSB7fTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZENhbGxiYWNrKGNiKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfSk7XG4gICAgfVxuXG4gICAgZnVuY3Rpb24gaGFuZGxlT25lSWQoaWQsIG91dElkQ2FsbGJhY2tzLCBpbklkQ2FsbGJhY2tzKSB7XG4gICAgICAgIGlmIChvdXRJZENhbGxiYWNrcykge1xuICAgICAgICAgICAgZm9yIChjb25zdCBwcm9wZXJ0eSBpbiBvdXRJZENhbGxiYWNrcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGNiID0gZ2V0Q2FsbGJhY2tCeU91dHB1dChncmFwaHMsIHBhdGhzLCBpZCwgcHJvcGVydHkpO1xuICAgICAgICAgICAgICAgIGlmIChjYikge1xuICAgICAgICAgICAgICAgICAgICAvLyBjYWxsYmFja3MgZm91bmQgaW4gdGhlIGxheW91dCBieSBvdXRwdXQgc2hvdWxkIGFsd2F5cyBydW5cbiAgICAgICAgICAgICAgICAgICAgLy8gdW5sZXNzIHNwZWNpZmljYWxseSByZXF1ZXN0ZWQgbm90IHRvLlxuICAgICAgICAgICAgICAgICAgICAvLyBpZSB0aGlzIGlzIHRoZSBpbml0aWFsIGNhbGwgb2YgdGhpcyBjYWxsYmFjayBldmVuIGlmIGl0J3NcbiAgICAgICAgICAgICAgICAgICAgLy8gbm90IHRoZSBwYWdlIGluaXRpYWxpemF0aW9uIGJ1dCBqdXN0IGEgbmV3IGxheW91dCBjaHVua1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWNiLmNhbGxiYWNrLnByZXZlbnRfaW5pdGlhbF9jYWxsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYi5pbml0aWFsQ2FsbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRDYWxsYmFjayhjYik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKCFvdXRwdXRzT25seSAmJiBpbklkQ2FsbGJhY2tzKSB7XG4gICAgICAgICAgICBjb25zdCBtYXliZUFkZENhbGxiYWNrID0gcmVtb3ZlZEFycmF5SW5wdXRzT25seVxuICAgICAgICAgICAgICAgID8gYWRkQ2FsbGJhY2tJZkFycmF5KHN0cmluZ2lmeUlkKGlkKSlcbiAgICAgICAgICAgICAgICA6IGFkZENhbGxiYWNrO1xuICAgICAgICAgICAgbGV0IGhhbmRsZVRoaXNDYWxsYmFjayA9IG1heWJlQWRkQ2FsbGJhY2s7XG4gICAgICAgICAgICBpZiAoY2h1bmtQYXRoKSB7XG4gICAgICAgICAgICAgICAgaGFuZGxlVGhpc0NhbGxiYWNrID0gY2IgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAhYWxsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0c1dpdGgoY2h1bmtQYXRoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbHVjaygncGF0aCcsIGZsYXR0ZW4oY2IuZ2V0T3V0cHV0cyhwYXRocykpKVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1heWJlQWRkQ2FsbGJhY2soY2IpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZvciAoY29uc3QgcHJvcGVydHkgaW4gaW5JZENhbGxiYWNrcykge1xuICAgICAgICAgICAgICAgIGdldENhbGxiYWNrc0J5SW5wdXQoXG4gICAgICAgICAgICAgICAgICAgIGdyYXBocyxcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMsXG4gICAgICAgICAgICAgICAgICAgIGlkLFxuICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eSxcbiAgICAgICAgICAgICAgICAgICAgSU5ESVJFQ1RcbiAgICAgICAgICAgICAgICApLmZvckVhY2goaGFuZGxlVGhpc0NhbGxiYWNrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGNyYXdsTGF5b3V0KGxheW91dENodW5rLCBjaGlsZCA9PiB7XG4gICAgICAgIGNvbnN0IGlkID0gcGF0aChbJ3Byb3BzJywgJ2lkJ10sIGNoaWxkKTtcbiAgICAgICAgaWYgKGlkKSB7XG4gICAgICAgICAgICBpZiAodHlwZW9mIGlkID09PSAnc3RyaW5nJyAmJiAhcmVtb3ZlZEFycmF5SW5wdXRzT25seSkge1xuICAgICAgICAgICAgICAgIGhhbmRsZU9uZUlkKGlkLCBncmFwaHMub3V0cHV0TWFwW2lkXSwgZ3JhcGhzLmlucHV0TWFwW2lkXSk7XG4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0aHM7XG4gICAgY29uc3QgcmVuZGVyZWQgPSBuZXcgUHJvbWlzZShyZXNvbHZlUmVuZGVyZWQgPT4ge1xuICAgICAgICBldmVudHMub25jZSgncmVuZGVyZWQnLCByZXNvbHZlUmVuZGVyZWQpO1xuICAgIH0pO1xuXG4gICAgdGFyZ2V0cy5mb3JFYWNoKGlkID0+IHtcbiAgICAgICAgY29uc3QgcGF0aE9mSWQgPSBnZXRQYXRoKHBhdGhzLCBpZCk7XG4gICAgICAgIGlmICghcGF0aE9mSWQpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IHRhcmdldCA9IHBhdGgocGF0aE9mSWQsIGxheW91dCk7XG4gICAgICAgIGlmICghdGFyZ2V0KSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBjb25zdCBjb21wb25lbnQgPSBSZWdpc3RyeS5yZXNvbHZlKHRhcmdldCk7XG4gICAgICAgIGNvbnN0IHJlYWR5ID0gaXNSZWFkeShjb21wb25lbnQpO1xuXG4gICAgICAgIGlmIChyZWFkeSAmJiB0eXBlb2YgcmVhZHkudGhlbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgcHJvbWlzZXMucHVzaChcbiAgICAgICAgICAgICAgICBQcm9taXNlLnJhY2UoW1xuICAgICAgICAgICAgICAgICAgICByZWFkeSxcbiAgICAgICAgICAgICAgICAgICAgcmVuZGVyZWQudGhlbihcbiAgICAgICAgICAgICAgICAgICAgICAgICgpID0+IGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKHN0cmluZ2lmeUlkKGlkKSkgJiYgcmVhZHlcbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgIF0pXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgfSk7XG5cbiAgICByZXR1cm4gcHJvbWlzZXMubGVuZ3RoID8gUHJvbWlzZS5hbGwocHJvbWlzZXMpIDogdHJ1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9mIHRoZSBleGlzdGluZyBpdGVtc1xuICAgIGNvbnN0IHN0cnMgPSBzcExlbiA/IGZpbHRlcihkaWZmSGVhZCwgb2xkU3RycykgOiB7fTtcbiAgICBjb25zdCBvYmpzID0ge307XG4gICAgaWYgKHNwTGVuKSB7XG4gICAgICAgIGZvckVhY2hPYmpJbmRleGVkKChvbGRWYWxQYXRocywgb2xkS2V5cykgPT4ge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFscyA9IGZpbHRlcigoe3BhdGh9KSA9PiBkaWZmSGVhZChwYXRoKSwgb2xkVmFsUGF0aHMpO1xuICAgICAgICAgICAgaWYgKG5ld1ZhbHMubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgb2Jqc1tvbGRLZXlzXSA9IG5ld1ZhbHM7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sIG9sZE9ianMpO1xuICAgIH1cblxuICAgIGNyYXdsTGF5b3V0KHN1YlRyZWUsIChjaGlsZCwgaXRlbXBhdGgpID0+IHtcbiAgICAgICAgY29uc3QgaWQgPSBwYXRoKFsncHJvcHMnLCAnaWQnXSwgY2hpbGQpO1xuICAgICAgICBpZiAoaWQpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgaWQgPT09ICdvYmplY3QnKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5cyA9IE9iamVjdC5rZXlzKGlkKS5zb3J0KCk7XG4gICAgICAgICAgICAgICAgY29uc3QgdmFsdWVzID0gcHJvcHMoa2V5cywgaWQpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGtleVN0ciA9IGtleXMuam9pbignLCcpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHBhdGhzID0gKG9ianNba2V5U3RyXSA9IG9ianNba2V5U3RyXSB8fCBbXSk7XG4gICAgICAgICAgICAgICAgY29uc3Qgb2xkaWUgPSBvbGRPYmpzW2tleVN0cl0gfHwgW107XG4gICAgICAgICAgICAgICAgY29uc3QgaXRlbSA9IHt2YWx1ZXMsIH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iAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBjcmF3bExheW91dChjaGlsZCwgZnVuYywgYXBwZW5kKGksIGN1cnJlbnRQYXRoKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH0gZWxzZSBpZiAodHlwZShvYmplY3QpID09PSAnT2JqZWN0Jykge1xuICAgICAgICBmdW5jKG9iamVjdCwgY3VycmVudFBhdGgpO1xuXG4gICAgICAgIGNvbnN0IGNoaWxkcmVuID0gcGF0aChwcm9wc0NoaWxkcmVuLCBvYmplY3QpO1xuICAgICAgICBpZiAoY2hpbGRyZW4pIHtcbiAgICAgICAgICAgIGNvbnN0IG5ld1BhdGggPSBjb25jYXQoY3VycmVudFBhdGgsIHByb3BzQ2hpbGRyZW4pO1xuICAgICAgICAgICAgY3Jhd2xMYXlvdXQoY2hpbGRyZW4sIGZ1bmMsIG5ld1BhdGgpO1xuICAgICAgICB9XG5cbiAgICAgICAgY29uc3QgY2hpbGRyZW5Qcm9wcyA9IHBhdGhPcihcbiAgICAgICAgICAgIFtdLFxuICAgICAgICAgICAgW29iamVjdC5uYW1lc3BhY2UsIG9iamVjdC50eXBlXSxcbiAgICAgICAgICAgIHdpbmRvdy5fX2Rhc2hwcml2YXRlX2NoaWxkcmVuUHJvcHNcbiAgICAgICAgKTtcbiAgICAgICAgY2hpbGRyZW5Qcm9wcy5mb3JFYWNoKGNoaWxkcmVuUHJvcCA9PiB7XG4gICAgICAgICAgICBpZiAoY2hpbGRyZW5Qcm9wLmluY2x1ZGVzKCdbXScpKSB7XG4gICAgICAgICAgICAgICAgbGV0IFtmcm9udFBhdGgsIGJhY2tQYXRoXSA9IGNoaWxkcmVuUHJvcFxuICAgICAgICAgICAgICAgICAgICAuc3BsaXQoJ1tdJylcbiAgICAgICAgICAgICAgICAgICAgLm1hcChwID0+IHAuc3BsaXQoJy4nKS5maWx0ZXIoZSA9PiBlKSk7XG4gICAgICAgICAgICAgICAgY29uc3QgZnJvbnQgPSBjb25jYXQoWydwcm9wcyddLCBmcm9udFBhdGgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGJhc2VQYXRoID0gY29uY2F0KGN1cnJlbnRQYXRoLCBmcm9udCk7XG4gICAgICAgICAgICAgICAgY3Jhd2xMYXlvdXQocGF0aChmcm9udCwgb2JqZWN0KSwgZnVuYywgYmFzZVBhdGgsIGJhY2tQYXRoKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbmV3UGF0aCA9IGNvbmNhdChjdXJyZW50UGF0aCwgW1xuICAgICAgICAgICAgICAgICAgICAncHJvcHMnLFxuICAgICAgICAgICAgICAgICAgICAuLi5jaGlsZHJlblByb3Auc3BsaXQoJy4nKVxuICAgICAgICAgICAgICAgIF0pO1xuICAgICAgICAgICAgICAgIGNyYXdsTGF5b3V0KFxuICAgICAgICAgICAgICAgICAgICBwYXRoKFsncHJvcHMnLCAuLi5jaGlsZHJlblByb3Auc3BsaXQoJy4nKV0sIG9iamVjdCksXG4gICAgICAgICAgICAgICAgICAgIGZ1bmMsXG4gICAgICAgICAgICAgICAgICAgIG5ld1BhdGhcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG59O1xuXG4vLyBUaGVyZSBhcmUgcGFja2FnZXMgZm9yIHRoaXMgYnV0IGl0J3Mgc2ltcGxlIGVub3VnaCwgSSBqdXN0XG4vLyBhZGFwdGVkIGl0IGZyb20gaHR0cHM6Ly9naXN0LmdpdGh1Yi5jb20vbXVkZ2UvNTgzMDM4MlxuZXhwb3J0IGNsYXNzIEV2ZW50RW1pdHRlciB7XG4gICAgY29uc3RydWN0b3IoKSB7XG4gICAgICAgIHRoaXMuX2V2ID0ge307XG4gICAgfVxuICAgIG9uKGV2ZW50LCBsaXN0ZW5lcikge1xuICAgICAgICBjb25zdCBldmVudHMgPSAodGhpcy5fZXZbZXZlbnRdID0gdGhpcy5fZXZbZXZlbnRdIHx8IFtdKTtcbiAgICAgICAgZXZlbnRzLnB1c2gobGlzdGVuZXIpO1xuICAgICAgICByZXR1cm4gKCkgPT4gdGhpcy5yZW1vdmVMaXN0ZW5lcihldmVudCwgbGlzdGVuZXIpO1xuICAgIH1cbiAgICByZW1vdmVMaXN0ZW5lcihldmVudCwgbGlzdGVuZXIpIHtcbiAgICAgICAgY29uc3QgZXZlbnRzID0gdGhpcy5fZXZbZXZlbnRdO1xuICAgICAgICBpZiAoZXZlbnRzKSB7XG4gICAgICAgICAgICBjb25zdCBpZHggPSBldmVudHMuaW5kZXhPZihsaXN0ZW5lcik7XG4gICAgICAgICAgICBpZiAoaWR4ID4gLTEpIHtcbiAgICAgICAgICAgICAgICBldmVudHMuc3BsaWNlKGlkeCwgMSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gICAgZW1pdChldmVudCwgLi4uYXJncykge1xuICAgICAgICBjb25zdCBldmVudHMgPSB0aGlzLl9ldltldmVudF07XG4gICAgICAgIGlmIChldmVudHMpIHtcbiAgICAgICAgICAgIGV2ZW50cy5mb3JFYWNoKGxpc3RlbmVyID0+IGxpc3RlbmVyLmFwcGx5KHRoaXMsIGFyZ3MpKTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBvbmNlKGV2ZW50LCBsaXN0ZW5lcikge1xuICAgICAgICBjb25zdCByZW1vdmUgPSB0aGlzLm9uKGV2ZW50LCAoLi4uYXJncykgPT4ge1xuICAgICAgICAgICAgcmVtb3ZlKCk7XG4gICAgICAgICAgICBsaXN0ZW5lci5hcHBseSh0aGlzLCBhcmdzKTtcbiAgICAgICAgfSk7XG4gICAgfVxufVxuIiwiLypcbiAqIENvcGllZCBvdXQgb2YgcHJvcC10eXBlcyBhbmQgbW9kaWZpZWQgLSBpbnNwaXJlZCBieSBjaGVjay1wcm9wLXR5cGVzLCBidXRcbiAqIHNpbXBsaWZpZWQgYW5kIHR3ZWFrZWQgdG8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ICBsb2NhdGlvbixcbiAgICBjb21wb25lbnROYW1lLFxuICAgIGdldFN0YWNrID0gbnVsbFxuKSB7XG4gICAgY29uc3QgZXJyb3JzID0gW107XG4gICAgZm9yIChjb25zdCB0eXBlU3BlY05hbWUgaW4gdHlwZVNwZWNzKSB7XG4gICAgICAgIGlmICh0eXBlU3BlY3MuaGFzT3duUHJvcGVydHkodHlwZVNwZWNOYW1lKSkge1xuICAgICAgICAgICAgbGV0IGVycm9yO1xuICAgICAgICAgICAgLy8gUHJvcCB0eXBlIHZhbGlkYXRpb24gbWF5IHRocm93LiBJbiBjYXNlIHRoZXkgZG8sIHdlIGRvbid0IHdhbnQgdG9cbiAgICAgICAgICAgIC8vIGZhaWwgdGhlIHJlbmRlciBwaGFzZSB3aGVyZSBpdCBkaWRuJ3QgZmFpbCBiZWZvcmUuIFNvIHdlIGxvZyBpdC5cbiAgICAgICAgICAgIC8vIEFmdGVyIHRoZXNlIGhhdmUgYmVlbiBjbGVhbmVkIHVwLCB3ZSdsbCBsZXQgdGhlbSB0aHJvdy5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgLy8gVGhpcyBpcyBpbnRlbnRpb25hbGx5IGFuIGludmFyaWFudCB0aGF0IGdldHMgY2F1Z2h0LiBJdCdzIHRoZSBzYW1lXG4gICAgICAgICAgICAgICAgLy8gYmVoYXZpb3IgYXMgd2l0aG91dCB0aGlzIHN0YXRlbWVudCBleGNlcHQgd2l0aCBhIGJldHRlciBtZXNzYWdlLlxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgdHlwZVNwZWNzW3R5cGVTcGVjTmFtZV0gIT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgIChjb21wb25lbnROYW1lIHx8ICdSZWFjdCBjbGFzcycpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnOiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJyB0eXBlIGAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlU3BlY05hbWUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdgIGlzIGludmFsaWQ7ICcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdpdCBtdXN0IGJlIGEgZnVuY3Rpb24sIHVzdWFsbHkgZnJvbSB0aGUgYHByb3AtdHlwZXNgIHBhY2thZ2UsIGJ1dCByZWNlaXZlZCBgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZW9mIHR5cGVTcGVjc1t0eXBlU3BlY05hbWVdICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYC4nXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yLm5hbWUgPSAnSW52YXJpYW50IFZpb2xhdGlvbic7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3IgPSB0eXBlU3BlY3NbdHlwZVNwZWNOYW1lXShcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlcyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVTcGVjTmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudE5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICBSZWFjdFByb3BUeXBlc1NlY3JldFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGV4KSB7XG4gICAgICAgICAgICAgICAgZXJyb3IgPSBleDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChlcnJvciAmJiAhKGVycm9yIGluc3RhbmNlb2YgRXJyb3IpKSB7XG4gICAgICAgICAgICAgICAgZXJyb3JzLnB1c2goXG4gICAgICAgICAgICAgICAgICAgIChjb21wb25lbnROYW1lIHx8ICdSZWFjdCBjbGFzcycpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICc6IHR5cGUgc3BlY2lmaWNhdGlvbiBvZiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uICtcbiAgICAgICAgICAgICAgICAgICAgICAgICcgYCcgK1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZVNwZWNOYW1lICtcbiAgICAgICAgICAgICAgICAgICAgICAgICdgIGlzIGludmFsaWQ7IHRoZSB0eXBlIGNoZWNrZXIgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAnZnVuY3Rpb24gbXVzdCByZXR1cm4gYG51bGxgIG9yIGFuIGBFcnJvcmAgYnV0IHJldHVybmVkIGEgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlb2YgZXJyb3IgK1xuICAgICAgICAgICAgICAgICAgICAgICAgJy4gJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAnWW91IG1heSBoYXZlIGZvcmdvdHRlbiB0byBwYXNzIGFuIGFyZ3VtZW50IHRvIHRoZSB0eXBlIGNoZWNrZXIgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAnY3JlYXRvciAoYXJyYXlPZiwgaW5zdGFuY2VPZiwgb2JqZWN0T2YsIG9uZU9mLCBvbmVPZlR5cGUsIGFuZCAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICdzaGFwZSBhbGwgcmVxdWlyZSBhbiBhcmd1bWVudCkuJ1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoZXJyb3IgaW5zdGFuY2VvZiBFcnJvcikge1xuICAgICAgICAgICAgICAgIHZhciBzdGFjayA9IChnZXRTdGFjayAmJiBnZXRTdGFjaygpKSB8fCAnJztcblxuICAgICAgICAgICA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3JlYWN0LXJlZHV4JztcbmltcG9ydCBhcGlUaHVuayBmcm9tICcuLi8uLi9hY3Rpb25zL2FwaSc7XG5cbmNsYXNzIFJlbG9hZGVyIGV4dGVuZHMgUmVhY3QuQ29tcG9uZW50IHtcbiAgICBjb25zdHJ1Y3Rvcihwcm9wcykge1xuICAgICAgICBzdXBlcihwcm9wcyk7XG4gICAgICAgIGlmIChwcm9wcy5jb25maWcuaG90X3JlbG9hZCkge1xuICAgICAgICAgICAgY29uc3Qge2ludGVydmFsLCBtYXhfcmV0cnl9ID0gcHJvcHMuY29uZmlnLmhvdF9yZWxvYWQ7XG4gICAgICAgICAgICB0aGlzLnN0YXRlID0ge1xuICAgICAgICAgICAgICAgIGludGVydmFsLFxuICAgICAgICAgICAgICAgIGRpc2FibGVkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBpbnRlcnZhbElkOiBudWxsLFxuICAgICAgICAgICAgICAgIHBhY2thZ2VzOiBudWxsLFxuICAgICAgICAgICAgICAgIG1heF9yZXRyeVxuICAgICAgICAgICAgfTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRoaXMuc3RhdGUgPSB7XG4gICAgICAgICAgICAgICAgZGlzYWJsZWQ6IHRydWVcbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5fcmV0cnkgPSAwO1xuICAgICAgICB0aGlzLl9oZWFkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignaGVhZCcpO1xuICAgICAgICB0aGlzLmNsZWFySW50ZXJ2YWwgPSB0aGlzLmNsZWFySW50ZXJ2YWwuYmluZCh0aGlzKTtcbiAgICB9XG5cbiAgICBjbGVhckludGVydmFsKCkge1xuICAgICAgICB3aW5kb3cuY2xlYXJJbnRlcnZhbCh0aGlzLnN0YXRlLmludGVydmFsSWQpO1xuICAgICAgICB0aGlzLnNldFN0YXRlKHtpbnRlcnZhbElkOiBudWxsfSk7XG4gICAgfVxuXG4gICAgc3RhdGljIGd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ICAgICAgICB9XG5cbiAgICAgICAgLypcbiAgICAgICAgICogV2hlbiByZWxvYWRSZXF1ZXN0IGlzIGZpcnN0IGRlZmluZWQsIHByZXZTdGF0ZSB3b24ndCBiZSBkZWZpbmVkXG4gICAgICAgICAqIGZvciBvbmUgcmVuZGVyIGxvb3AuXG4gICAgICAgICAqIFRoZSBmaXJzdCByZWxvYWRSZXF1ZXN0IGRlZmluZXMgdGhlIGluaXRpYWwvYmFzZWxpbmUgaGFzaCAtXG4gICAgICAgICAqIGl0IGRvZXNuJ3QgcmVxdWlyZSBhIHJlbG9hZFxuICAgICAgICAgKi9cbiAgICAgICAgaWYgKCFoYXMoJ3JlbG9hZFJlcXVlc3QnLCBwcmV2U3RhdGUpKSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoXG4gICAgICAgICAgICByZWxvYWRSZXF1ZXN0LnN0YXR1cyA9PT0gMjAwICYmXG4gICAgICAgICAgICBwYXRoKFsnY29udGVudCcsICdyZWxvYWRIYXNoJ10sIHJlbG9hZFJlcXVlc3QpICE9PVxuICAgICAgICAgICAgICAgIHBhdGgoWydyZWxvYWRSZXF1ZXN0JywgJ2NvbnRlbnQnLCAncmVsb2FkSGFzaCddLCBwcmV2U3RhdGUpXG4gICAgICAgICkge1xuICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIENTUyAoIWNvbnRlbnQuaGFyZCkgb3IgbmV3IHBhY2thZ2UgYXNzZXRzXG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgcmVsb2FkUmVxdWVzdC5jb250ZW50LmhhcmQgfHxcbiAgICAgICAgICAgICAgICAhZXF1YWxzKFxuICAgICAgICAgICAgICAgICAgICByZWxvYWRSZXF1ZXN0LmNvbnRlbnQucGFja2FnZXMubGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBwYXRoT3IoXG4gICAgICAgICAgICAgICAgICAgICAgICBbXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIFsncmVsb2FkUmVxdWVzdCcsICdjb250ZW50JywgJ3BhY2thZ2VzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICBwcmV2U3RhdGVcbiAgICAgICAgICAgICAgICAgICAgKS5sZW5ndGhcbiAgICAgICAgICAgICAgICApIHx8XG4gICAgICAgICAgICAgICAgIWVxdWFscyhcbiAgICAgICAgICAgICAgICAgICAgc29ydChjb21wYXJhdG9yKGx0KSwgcmVsb2FkUmVxdWVzdC5jb250ZW50LnBhY2thZ2VzKSxcbiAgICAgICAgICAgICAgICAgICAgc29ydChcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBhcmF0b3IobHQpLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGF0aE9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsncmVsb2FkUmVxdWVzdCcsICdjb250ZW50JywgJ3BhY2thZ2VzJ10sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJldlN0YXRlXG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAvLyBMb29rIGlmIGl0IHdhcyBhIGNzcyBmaWxlLlxuICAgICAgICAgICAgICAgIGxldCB3YXNfY3NzID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIHByZWZlci1jb25zdFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGEgb2YgcmVsb2FkUmVxdWVzdC5jb250ZW50LmZpbGVzKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhLmlzX2Nzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgd2FzX2NzcyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBub2Rlc1RvRGlzYWJsZSA9IFtdO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBTZWFyY2ggZm9yIHRoZSBvbGQgZmlsZSBieSB4cGF0aC5cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGl0ID0gZG9jdW1lbnQuZXZhbHVhdGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYC8vbGlua1tjb250YWlucyhAaHJlZiwgXCIke2EudXJsfVwiKV1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuX2hlYWRcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IGl0Lml0ZXJhdGVOZXh0KCk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXNUb0Rpc2FibGUucHVzaChub2RlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlID0gaXQuaXRlcmF0ZU5leHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yRWFjaChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID0+IG4uc2V0QXR0cmlidXRlKCdkaXNhYmxlZCcsICdkaXNhYmxlZCcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVzVG9EaXNhYmxlXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYS5tb2RpZmllZCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBsaW5rID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnbGluaycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsuaHJlZiA9IGAke2EudXJsfT9tPSR7YS5tb2RpZmllZH1gO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsudHlwZSA9ICd0ZXh0L2Nzcyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluay5yZWwgPSAnc3R5bGVzaGVldCc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5faGVhZC5hcHBlbmRDaGlsZChsaW5rKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBFbHNlIHRoZSBmaWxlIHdhcyBkZWxldGVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gSWYgdGhlcmUncyBhbm90aGVyIGtpbmQgb2YgZmlsZSBoZXJlIGRvIGEgaGFyZCByZWxvYWQuXG4gICAgICAgICAgICAgICAgICAgICAgICB3YXNfY3NzID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIXdhc19jc3MpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gQXNzZXRzIGZpbGUgaGF2ZSBjaGFuZ2VkXG4gICAgICAgICAgICAgICAgICAgIC8vIG9yIGEgY29tcG9uZW50IGxpYiBoYXMgYmVlbiBhZGRlZC9yZW1vdmVkIC1cbiAgICAgICAgICAgICAgICAgICAgLy8gTXVzdCBkbyBhIGhhcmQgcmVsb2FkXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5sb2NhdGlvbi5yZWxvYWQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIEJhY2tlbmQgY29kZSBjaGFuZ2VkIC0gY2FuIGRvIGEgc29mdCByZWxvYWQgaW4gcGxhY2VcbiAgICAgICAgICAgICAgICBkaXNwYXRjaCh7dHlwZTogJ1JFTE9BRCd9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChcbiAgICA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nB1c2goY2hpbGRJZCk7XG4gICAgICAgICAgICBlbGVtZW50cy5wdXNoKHtcbiAgICAgICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgICAgICAgIGlkOiBjaGlsZElkLFxuICAgICAgICAgICAgICAgICAgICBsYWJlbDogcHJvcGVydHksXG4gICAgICAgICAgICAgICAgICAgIHBhcmVudDogcGFyZW50SWQsXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6ICdwcm9wZXJ0eSdcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHN0cnVjdHVyZVtwYXJlbnRJZF0ucHVzaChjaGlsZElkKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBjaGlsZElkO1xuICAgIH1cblxuICAgIGZ1bmN0aW9uIHJlY29yZEVkZ2Uoc291cmNlLCB0YXJnZXQsIHR5cGUpIHtcbiAgICAgICAgZWxlbWVudHMucHVzaCh7XG4gICAgICAgICAgICBkYXRhOiB7XG4gICAgICAgICAgICAgICAgc291cmNlOiBzb3VyY2UsXG4gICAgICAgICAgICAgICAgdGFyZ2V0OiB0YXJnZXQsXG4gICAgICAgICAgICAgICAgdHlwZTogdHlwZVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICAoZ3JhcGhzLmNhbGxiYWNrcyB8fCBbXSkuZm9yRWFjaCgoY2FsbGJhY2ssIGkpID0+IHtcbiAgICAgICAgY29uc3QgY2IgPSBgX19kYXNoX2NhbGxiYWNrX18uJHtjYWxsYmFjay5vdXRwdXR9YDtcbiAgICAgICAgY29uc3QgY2JQcm9maWxlID0gcHJvZmlsZS5jYWxsYmFja3NbY2FsbGJhY2sub3V0cHV0XSB8fCB7fTtcbiAgICAgICAgY29uc3QgY291bnQgPSBjYlByb2ZpbGUuY291bnQgfHwgMDtcbiAgICAgICAgY29uc3QgdGltZSA9IGNiUHJvZmlsZS50b3RhbCB8fCAwO1xuXG4gICAgICAgIGVsZW1lbnRzLnB1c2goe1xuICAgICAgICAgICAgZGF0YToge1xuICAgICAgICAgICAgICAgIGlkOiBjYixcbiAgICAgICAgICAgICAgICBsYWJlbDogYGNhbGxiYWNrLiR7aX1gLFxuICAgICAgICAgICAgICAgIHR5cGU6ICdjYWxsYmFjaycsXG4gICAgICAgICAgICAgICAgbW9kZTogY2FsbGJhY2suY2xpZW50c2lkZV9mdW5jdGlvbiA/ICdjbGllbnQnIDogJ3NlcnZlcicsXG4gICAgICAgICAgICAgICAgY291bnQ6IGNvdW50LFxuICAgICAgICAgICAgICAgIHRpbWU6IGNvdW50ID4gMCA/IE1hdGgucm91bmQodGltZSAvIGNvdW50KSA6IDAsXG4gICAgICAgICAgICAgICAgbG9hZGluZ1NldDogRGF0ZS5ub3coKSxcbiAgICAgICAgICAgICAgICBlcnJvclNldDogRGF0ZS5ub3coKVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBjYWxsYmFjay5vdXRwdXRzLm1hcCgoe2lkLCBwcm9wZXJ0eX0pID0+IHtcbiAgICAgICAgICAgIGNvbnN0IG5vZGVJZCA9IHJlY29yZE5vZGUoaWQsIHByb3BlcnR5KTtcbiAgICAgICAgICAgIHJlY29yZEVkZ2UoY2IsIG5vZGVJZCwgJ291dHB1dCcpO1xuICAgICAgICB9KTtcblxuICAgICAgICBjYWxsYmFjay5pbnB1dHMubWFwKCh7aWQsIHByb3BlcnR5fSkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgbm9kZUlkID0gcmVjb3JkTm9kZShpZCwgcHJvcGVydHkpO1xuICAgICAgICAgICAgcmVjb3JkRWRnZShub2RlSWQsIGNiLCAnaW5wdXQnKTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgY2FsbGJhY2suc3RhdGUubWFwKCh7aWQsIHByb3BlcnR5fSkgPT4ge1xuICAgICAgICAgICAgY29uc3Qgbm9kZUlkID0gcmVjb3JkTm9kZShpZCwgcHJvcGVydHkpO1xuICAgICAgICAgIC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sYXlvdXQuXG4gICAgICAgIHByb2ZpbGUuZ3JhcGhMYXlvdXQgPSB7XG4gICAgICAgICAgICBuYW1lOiAncHJlc2V0JyxcbiAgICAgICAgICAgIGZpdDogZmFsc2UsXG4gICAgICAgICAgICBwb3NpdGlvbnMsXG4gICAgICAgICAgICB6b29tOiBjeS56b29tKCksXG4gICAgICAgICAgICBwYW46IGN5LnBhbigpLFxuICAgICAgICAgICAgX2Nob3NlblR5cGU6IGxheW91dFNlbGVjdG9yLmN1cnJlbnQ/LnZhbHVlXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgLy8gQWRkcyBjYWxsYmFja3Mgb25jZSBjeWN0b3NjYXBlIGlzIGluaXRpYWxpemVkLlxuICAgIHVzZUN5dG9zY2FwZUVmZmVjdChcbiAgICAgICAgY3kgPT4ge1xuICAgICAgICAgICAgY3l0b3NjYXBlLm9uKCd0YXAnLCAnbm9kZScsIGUgPT4gc2V0U2VsZWN0ZWQoZS50YXJnZXQpKTtcbiAgICAgICAgICAgIGN5dG9zY2FwZS5vbigndGFwJywgZSA9PiB7XG4gICAgICAgICAgICAgICAgaWYgKGUudGFyZ2V0ID09PSBjeSkge1xuICAgICAgICAgICAgICAgICAgICBzZXRTZWxlY3RlZChudWxsKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGN5dG9zY2FwZS5vbignem9vbScsIHNldFByZXNldExheW91dCk7XG4gICAgICAgICAgICBjeXRvc2NhcGUub24oJ3BhbicsIHNldFByZXNldExheW91dCk7XG4gICAgICAgICAgICBjeXRvc2NhcGUubm9kZXMoKS5vbigncG9zaXRpb24nLCBzZXRQcmVzZXRMYXlvdXQpO1xuICAgICAgICB9LFxuICAgICAgICBbY3l0b3NjYXBlXVxuICAgICk7XG5cbiAgICAvLyBTZXQgbm9kZSBjbGFzc2VzIG9uIHNlbGVjdGVkLlxuICAgIHVzZUN5dG9zY2FwZUVmZmVjdChcbiAgICAgICAgY3kgPT4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3Byb3BlcnR5Jzoge1xuICAgICAgICAgICAgICAgIGVsZW1lbnROYW1lID0gZGF0YS5wYXJlbnQ7XG4gICAgICAgICAgICAgICAgZWxlbWVudEluZm9bZGF0YS5sYWJlbF0gPSBnZXRQcm9wVmFsdWUoZGF0YSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIGNhbGxiYWNrXG4gICAgICAgICAgICBkZWZhdWx0OiB7XG4gICAgICAgICAgICAgICAgZWxlbWVudEluZm8udHlwZSA9IGRhdGEubW9kZTtcblxuICAgICAgICAgICAgICAgIC8vIFJlbW92ZSB1aWQgYW5kIHNldCBwcm9maWxlLlxuICAgICAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrT3V0cHV0SWQgPSBkYXRhLmlkLnNsaWNlKGNiUHJlZml4TGVuKTtcbiAgICAgICAgICAgICAgICBlbGVtZW50TmFtZSA9IGNhbGxiYWNrT3V0cHV0SWQucmVwbGFjZSgvKF5cXC5cXC58XFwuXFwuJCkvZywgJycpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGNiUHJvZmlsZSA9IHByb2ZpbGUuY2FsbGJhY2tzW2NhbGxiYWNrT3V0cHV0SWRdO1xuICAgICAgICAgICAgICAgIGlmIChjYlByb2ZpbGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge1xuICAgICAgICAgICAgICAgICAgICAgICAgY291bnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0dXMsXG4gICAgICAgICAgICAgICAgICAgICAgICBuZXR3b3JrLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzb3VyY2VzLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG90YWwsXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wdXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXRzLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGVcbiAgICAgICAgICAgICAgICAgICAgfSA9IGNiUHJvZmlsZTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCBhdmcgPSB2ID0+IE1hdGgucm91bmQodiAvIChjb3VudCB8fCAxKSk7XG5cbiAgICAgICAgICAgICAgICAgICAgZWxlbWVudEluZm9bJ2NhbGwgY291bnQnXSA9IGNvdW50O1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5zdGF0dXMgPSByZWR1Y2VTdGF0dXMoc3RhdHVzKTtcblxuICAgICAgICAgICAgICAgICAgICBjb25zdCB0aW1pbmcgPSAoZWxlbWVudEluZm9bJ3RpbWUgKGF2ZyBtaWxsaXNlY29uZHMpJ10gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b3RhbDogYXZnKHRvdGFsKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXB1dGU6IGF2Zyhjb21wdXRlKVxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEubW9kZSA9PT0gJ3NlcnZlcicpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpbWluZy5uZXR3b3JrID0gYXZnKG5ldHdvcmsudGltZSk7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvWydkYXRhIHRyYW5zZmVyIChhdmcgYnl0ZXMpJ10gPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWQ6IGF2ZyhuZXR3b3JrLmRvd25sb2FkKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGxvYWQ6IGF2ZyhuZXR3b3JrLnVwbG9hZClcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcmVzb3VyY2VzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aW1pbmdbJ3VzZXI6ICcgKyBrZXldID0gYXZnKHJlc291cmNlc1trZXldKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGVsZW1lbnRJbmZvLm91dHB1dHMgPSBmbGF0dGVuT3V0cHV0cyhyZXN1bHQpO1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5pbnB1dHMgPSBmbGF0dGVuSW5wdXRzKGlucHV0cywge30pO1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mby5zdGF0ZSA9IGZsYXR0ZW5JbnB1dHMoc3RhdGUsIHt9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBlbGVtZW50SW5mb1snY2FsbCBjb3VudCddID0gMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICBjb25zdCBjeUxheW91dCA9XG4gICAgICAgIGNob3NlblR5cGUgPT09IGxheW91dFR5cGVcbiAgICAgICAgICAgID8gZ3JhcGhMYXlvdXRcbiAgICAgICAgICAgIDogbWVyZ2VSaWdodChsYXlvdXRzW2xheW91dFR5cGVdLCB7cmVhZHk6IHNldFByZXNldExheW91dH0pO1xuXG4gICAgcmV0dXJuIChcbiAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtY2FsbGJhY2stZGFnLS1jb250YWluZXInPlxuICAgICAgICAgICAgPEN5dG9zY2FwZUNvbXBvbmVudFxuICAgICAgICAgICAgICAgIHN0eWxlPXt7d2lkdGg6ICcxMDAlJywgaGVpZ2h0OiAnMTAwJSd9fVxuICAgICAgICAgICAgICAgIGN5PXtzZXRDeXRvc2NhcGV9XG4gICAgICAgICAgICAgICAgZWxlbWVudHM9e2VsZW1lbnRzfVxuICAgICAgICAgICAgICAgIGxheW91dD17Y3lMYXlvdXR9XG4gICAgICAgICAgICAgICAgc3R5bGVzaGVldD17c3R5bGVzaGVldH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICB7c2VsZWN0ZWQgPyAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtY2FsbGJhY2stZGFnLS1pbmZvJz5cbiAgICAgICAgICAgICAgICAgICAge2hhc1BhdHRlcm5zID8gKFxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbmZvIGlzbid0IHN1cHBvcnRlZCBmb3IgcGF0dGVybi1tYXRjaGluZyBJRHMgYXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIHRpbWVcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgICAgICAgICAgPEpTT05UcmVlXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhPXtlbGVtZW50SW5mb31cbiAgICAgICAgICAgICAgICAgICAgICAgIHRoZW1lPSdzdW1tZXJmcnVpdCdcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhYmVsUmVuZGVyZXI9e19rZXlzID0+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX2tleXMubGVuZ3RoID09PSAxID8gZWxlbWVudE5hbWUgOiBfa2V5c1swXVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0SXRlbVN0cmluZz17KHR5cGUsIGRhdGEsIGl0ZW1UeXBlKSA9PiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4+e2l0ZW1UeXBlfTwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICBzaG91bGRFeHBhbmROb2RlPXsoa2V5TmFtZSwgZGF0YSwgbGV2ZWwpID0+IGxldmVsIDwgMX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICkgOiBudWxsfVxuICAgICAgICAgICAgPHNlbGVjdFxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT0nZGFzaC1jYWxsYmFjay1kYWctLWxheW91dFNlbGVjdG9yJ1xuICAgICAgICAgICAgICAgIG9uQ2hhbmdlPXtlID0+IHNldExheW91dFR5cGUoZS50YXJnZXQudmFsdWUpfVxuICAgICAgICAgICAgICAgIHZhbHVlPXtsYXlvdXRUeXBlfVxuICAgICAgICAgICAgICAgIHJlZj17bGF5b3V0U2VsZWN0b3J9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAge2tleXMobGF5b3V0cykubWFwKGsgPT4gKFxuICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHZhbHVlPXtrfSBrZXk9e2t9PlxuICAgICAgICAgICAgICAgICAgICAgICAge2t9XG4gICAgICAgICAgICAgICAgICAgIDwvb3B0aW9uPlxuICAgICAgICAgICAgICAgICkpfVxuICAgICAgICAgICAgPC9zZWxlY3Q+XG4gICAgICAgIDwvZGl2PlxuICAgICk7XG59XG5cbkNhbGxiYWNrR3JhcGgucHJvcFR5cGVzID0ge307XG5cbmNsYXNzIFVuY29ubmVjdGVkQ2FsbGJhY2tHcmFwaENvbnRhaW5lciBleHRlbmRzIENvbXBvbmVudCB7XG4gICAgY29uc3RydWN0b3IocHJvcHMpIHtcbiAgICAgICAgc3VwZXIocHJvcHMpO1xuICAgICAgICB0aGlzLnN0YXRlID0ge2hhc0Vycm9yOiBmYWxzZX07XG4gICAgfVxuXG4gICAgc3RhdGljIGdldERlcml2ZWRTdGF0ZUZyb21FcnJvcihfKSB7XG4gICAgICAgIHJldHVybiB7aGFzRXJyb3I6IHRydWV9O1xuICAgIH1cblxuICAgIGNvbXBvbmVudERpZENhdGNoKGVycm9yLCBpbmZvKSB7XG4gICAgICAgIGNvbnN0IHtkaXNwYXRjaH0gPSB0aGlzLnByb3BzO1xuICAgICAgICBkaXNwYXRjaChcbiAgICAgICAgICAgIG9uRXJyb3Ioe1xuICAgICAgICAgICAgICAgIG15SUQ6IHRoaXMuc3RhdGUubXlJRCxcbiAgICAgICAgICAgICAgICB0eXBlOiAnZnJvbnRFbmQnLFxuICAgICAgICAgICAgICAgIGVycm9yLFxuICAgICAgICAgICAgICAgIGluZm9cbiAgICAgICAgICAgIH0pXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgcmVuZGVyKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5zdGF0ZS5oYXNFcnJvciA/IChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWNhbGxiYWNrLWRhZy0tY29udGFpbmVyJz5cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1jYWxsYmFjay1kYWctLW1lc3NhZ2UnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2Pk9vcHMhIFRoZSBjYWxsYmFjayBncmFwaCB0aHJldyBhbiBlcnJvci48L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdj5DaGVjayB0aGUgZXJyb3IgbGlzdCBmb3IgZGV0YWlscy48L2Rpdj5cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICApIDogKFxuICAgICAgICAgICAgPENhbGxiYWNrR3JhcGggLz5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cblVuY29ubmVjdGVkQ2FsbGJhY2tHcmFwaENvbnRhaW5lci5wcm9wVHlwZXMgPSB7XG4gICAgZGlzcGF0Y2g6IFByb3BUeXBlcy5mdW5jXG59O1xuXG5jb25zdCBDYWxsYmFja0dyYXBoQ29udGFpbmVyID0gY29ubmVjdChudWxsLCBkaXNwYXRjaCA9PiAoe2Rpc3BhdGNofSkpKFxuICAgIFVuY29ubmVjdGVkQ2FsbGJhY2tHcmFwaENvbnRhaW5lclxuKTtcblxuZXhwb3J0IHtDYWxsYmFja0dyYXBoQ29udGFpbmVyfTtcbiIsImNvbnN0IHN0eWxlc2hlZXQgPSBbXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJyonLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgJ2ZvbnQtc2l6ZSc6IDEyLFxuICAgICAgICAgICAgJ2ZvbnQtZmFtaWx5JzogJ1wiQXJpYWxcIiwgc2Fucy1zZXJpZidcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnZWRnZScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICB3aWR0aDogMixcbiAgICAgICAgICAgICdsaW5lLWNvbG9yJzogJyM4ODg4ODgnLFxuICAgICAgICAgICAgJ3RhcmdldC1hcnJvdy1jb2xvcic6ICcjODg4ODg4JyxcbiAgICAgICAgICAgICd0YXJnZXQtYXJyb3ctc2hhcGUnOiAndHJpYW5nbGUnLFxuICAgICAgICAgICAgJ3RhcmdldC1hcnJvdy1maWxsJzogJ2ZpbGxlZCcsXG4gICAgICAgICAgICAnYXJyb3ctc2NhbGUnOiAxLFxuICAgICAgICAgICAgJ2N1cnZlLXN0eWxlJzogJ2JlemllcicsXG4gICAgICAgICAgICAnY29udHJvbC1wb2ludC1zdGVwLXNpemUnOiA0MCxcbiAgICAgICAgICAgICd0cmFuc2l0aW9uLXByb3BlcnR5JzogJ2xpbmUtY29sb3IsIHRhcmdldC1hcnJvdy1jb2xvcicsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi1kdXJhdGlvbic6ICcwLjI1cycsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi10aW1pbmctZnVuY3Rpb24nOiAnZWFzZS1pbi1vdXQtc2luZSdcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnZWRnZVt0eXBlPVwiaGlkZGVuXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGRpc3BsYXk6ICdub25lJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdlZGdlW3R5cGU9XCJvdXRwdXRcIl0nLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgJ2xpbmUtY29sb3InOiAnIzAwODBEMCcsXG4gICAgICAgICAgICAndGFyZ2V0LWFycm93LWNvbG9yJzogJyMwMDgwRDAnXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJ2VkZ2VbdHlwZT1cInN0YXRlXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgICdsaW5lLXN0eWxlJzogJ2Rhc2hlZCdcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnbm9kZScsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICBjb2xvcjogJyMzMzMzMzMnLFxuICAgICAgICAgICAgcGFkZGluZzogNixcbiAgICAgICAgICAgICd0ZXh0LXZhbGlnbic6ICdjZW50ZXInLFxuICAgICAgICAgICAgJ3RleHQtaGFsaWduJzogJ2NlbnRlcicsXG4gICAgICAgICAgICAnYm9yZGVyLXdpZHRoJzogMixcbiAgICAgICAgICAgICdib3JkZXItb3BhY2l0eSc6IDAsXG4gICAgICAgICAgICAnYm9yZGVyLXN0eWxlJzogJ3NvbGlkJyxcbiAgICAgICAgICAgICdib3JkZXItY29sb3InOiAnIzg4ODg4OCcsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi1wcm9wZXJ0eSc6ICdib3JkZXItb3BhY2l0eScsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi1kdXJhdGlvbic6ICcwLjI1cycsXG4gICAgICAgICAgICAndHJhbnNpdGlvbi10aW1pbmctZnVuY3Rpb24nOiAnZWFzZS1pbi1vdXQtc2luZSdcbiAgICAgICAgfVxuICAgIH0sXG5cbiAgICB7XG4gICAgICAgIHNlbGVjdG9yOiAnbm9kZVt0eXBlPVwiY2FsbGJhY2tcIl0nLFxuICAgICAgICBzdHlsZToge1xuICAgICAgICAgICAgd2lkdGg6IDM1LFxuICAgICAgICAgICAgaGVpZ2h0OiAyNSxcbiAgICAgICAgICAgIHNoYXBlOiAncm91bmQtcmVjdGFuZ2xlJyxcbiAgICAgICAgICAgIGxhYmVsOiBlID0+IGAke2UuZGF0YSgpLmNvdW50fVxcbiR7ZS5kYXRhKCkudGltZX0gbXNgLFxuICAgICAgICAgICAgJ3RleHQtd3JhcCc6ICd3cmFwJyxcbiAgICAgICAgICAgICd0ZXh0LWp1c3RpZmljYXRpb24nOiAnY2VudGVyJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdub2RlW3R5cGU9XCJjYWxsYmFja1wiXVttb2RlPVwiY2xpZW50XCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnIzMyMzMzMCcsXG4gICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcic6ICcjRjBEQjRGJ1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdub2RlW3R5cGU9XCJjYWxsYmFja1wiXVttb2RlPVwic2VydmVyXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnIzMyMzMzMCcsXG4gICAgICAgICAgICAnYmFja2dyb3VuZC1jb2xvcic6ICcjMDBDQzk2J1xuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICdub2RlW3R5cGU9XCJjb21wb25lbnRcIl0sIG5vZGVbdHlwZT1cIndpbGRjYXJkXCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIHdpZHRoOiAnbGFiZWwnLFxuICAgICAgICAgICAgLy8gaGVpZ2h0OiAnbGFiZWwnLFxuICAgICAgICAgICAgc2hhcGU6ICdyZWN0YW5nbGUnLFxuICAgICAgICAgICAgY29udGVudDogZSA9PiBlLmRhdGEoKS5sYWJlbC5yZXBsYWNlKC9cIi9nLCAnJyksXG4gICAgICAgICAgICAndGV4dC12YWxpZ24nOiAndG9wJyxcbiAgICAgICAgICAgICdiYWNrZ3JvdW5kLWNvbG9yJzogJyNCOUMyQ0UnXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJ25vZGVbdHlwZT1cInByb3BlcnR5XCJdJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIHdpZHRoOiAnbGFiZWwnLFxuICAgICAgICAgICAgaGVpZ2h0OiAyMCxcbiAgICAgICAgICAgIHNoYXBlOiAncmVjdGFuZ2xlJyxcbiAgICAgICAgICAgIGNvbnRlbnQ6ICdkYXRhKGxhYmVsKScsXG4gICAgICAgICAgICBjb2xvcjogJ3doaXRlJyxcbiAgICAgICAgICAgICdiYWNrZ3JvdW5kLWNvbG9yJzogJyMxMDlERkYnXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAge1xuICAgICAgICBzZWxlY3RvcjogJy5zZWxlY3RlZC1ub2RlJyxcbiAgICAgICAgc3R5bGU6IHtcbiAgICAgICAgICAgIGdob3N0OiAneWVzJyxcbiAgICAgICAgICAgICdnaG9zdC1vZmZzZXQteCc6IDIsXG4gICAgICAgICAgICAnZ2hvc3Qtb2Zmc2V0LXknOiAyLFxuICAgICAgICAgICAgJ2dob3N0LW9wYWNpdHknOiAwLjI1LFxuICAgICAgICAgICAgJ2JvcmRlci1vcGFjaXR5JzogMVxuICAgICAgICB9XG4gICAgfSxcblxuICAgIHtcbiAgICAgICAgc2VsZWN0b3I6ICcucHJvcC1jaGFuZ2VkLCAuY2FsbGJhY2stbG9hZGluZycsXG4gICAgICAgIHN0eWxlOiB7XG4gICAgICAgICAgICAnYm9yZGVyLWNvbG9yJzogJyNDQzQzQjcnLFxuICAgICAgICAgICAgJ2JvcmRlci13aWR0aCc6IDIsXG4gICAgICAgICAgICAnYm9yZGVyLW9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tzLlxuICAgIGlmIChsYXRlc3QgPT09ICdsb2FkaW5nJykge1xuICAgICAgICBub2RlLmRhdGEoJ2xvYWRpbmdTZXQnLCBEYXRlLm5vdygpKTtcbiAgICAgICAgbm9kZS5hZGRDbGFzcygnY2FsbGJhY2stbG9hZGluZycpO1xuICAgIH0gZWxzZSBpZiAobm9kZS5oYXNDbGFzcygnY2FsbGJhY2stbG9hZGluZycpKSB7XG4gICAgICAgIGNvbnN0IHRpbWVMZWZ0ID0gbm9kZS5kYXRhKCdsb2FkaW5nU2V0JykgKyBmbGFzaFRpbWUgLSBEYXRlLm5vdygpO1xuICAgICAgICBzZXRUaW1lb3V0KFxuICAgICAgICAgICAgKCkgPT4gbm9kZS5yZW1vdmVDbGFzcygnY2FsbGJhY2stbG9hZGluZycpLFxuICAgICAgICAgICAgTWF0aC5tYXgodGltZUxlZnQsIDApXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgaWYgKFxuICAgICAgICBsYXRlc3QgIT09ICdsb2FkaW5nJyAmJlxuICAgICAgICBsYXRlc3QgIT09IFNUQVRVU01BUFtTVEFUVVMuT0tdICYmXG4gICAgICAgIGxhdGVzdCAhPT0gU1RBVFVTTUFQW1NUQVRVUy5QUkVWRU5UX1VQREFURV1cbiAgICApIHtcbiAgICAgICAgbm9kZS5kYXRhKCdlcnJvclNldCcsIERhdGUubm93KCkpO1xuICAgICAgICBub2RlLmFkZENsYXNzKCdjYWxsYmFjay1lcnJvcicpO1xuICAgIH0gZWxzZSBpZiAobm9kZS5oYXNDbGFzcygnY2FsbGJhY2stZXJyb3InKSkge1xuICAgICAgICBjb25zdCB0aW1lTGVmdCA9IG5vZGUuZGF0YSgnZXJyb3JTZXQnKSArIGZsYXNoVGltZSAtIERhdGUubm93KCk7XG4gICAgICAgIHNldFRpbWVvdXQoXG4gICAgICAgICAgICAoKSA9PiBub2RlLnJlbW92ZUNsYXNzKCdjYWxsYmFjay1lcnJvcicpLFxuICAgICAgICAgICAgTWF0aC5tYXgod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9yKHtcbiAgICAgICAgICAgICAgICBteUlEOiB0aGlzLnN0YXRlLm15SUQsXG4gICAgICAgICAgICAgICAgdHlwZTogJ2Zyb250RW5kJyxcbiAgICAgICAgICAgICAgICBlcnJvcixcbiAgICAgICAgICAgICAgICBpbmZvXG4gICAgICAgICAgICB9KVxuICAgICAgICApO1xuICAgICAgICBkaXNwYXRjaChyZXZlcnQpO1xuICAgIH1cblxuICAgIGNvbXBvbmVudERpZFVwZGF0ZShwcmV2UHJvcHMsIHByZXZTdGF0ZSkge1xuICAgICAgICBjb25zdCBwcmV2Q2hpbGRyZW4gPSBwcmV2UHJvcHMuY2hpbGRyZW47XG4gICAgICAgIGlmIChcbiAgICAgICAgICAgICF0aGlzLnN0YXRlLmhhc0Vycm9yICYmXG4gICAgICAgICAgICBwcmV2Q2hpbGRyZW4gIT09IHByZXZTdGF0ZS5vbGRDaGlsZHJlbiAmJlxuICAgICAgICAgICAgcHJldkNoaWxkcmVuICE9PSB0aGlzLnByb3BzLmNoaWxkcmVuXG4gICAgICAgICkge1xuICAgICAgICAgICAgLyogZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIHJlYWN0L25vLWRpZC11cGRhdGUtc2V0LXN0YXRlICovXG4gICAgICAgICAgICB0aGlzLnNldFN0YXRlKHtcbiAgICAgICAgICAgICAgICBvbGRDaGlsZHJlbjogcHJldkNoaWxkcmVuXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIHJlbmRlcigpIHtcbiAgICAgICAgY29uc3Qge2hhc0Vycm9yLCBvbGRDaGlsZHJlbn0gPSB0aGlzLnN0YXRlO1xuICAgICAgICByZXR1cm4gaGFzRXJyb3IgPyBvbGRDaGlsZHJlbiA6IHRoaXMucHJvcHMuY2hpbGRyZW47XG4gICAgfVxufVxuXG5Db21wb25lbnRFcnJvckJvdW5kYXJ5LnByb3BUeXBlcyA9IHtcbiAgICBjaGlsZHJlbjogUHJvcFR5cGVzLm9iamVjdCxcbiAgICB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KGluQWxlcnRzVHJheSA/ICcgZGFzaC1lcnJvci1jYXJkLS1hbGVydHMtdHJheScgOiAnJyk7XG5cbiAgICAgICAgLyogZXNsaW50LWRpc2FibGUgbm8taW5saW5lLWNvbW1lbnRzICovXG4gICAgICAgIGNvbnN0IGVycm9ySGVhZGVyID0gKFxuICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvci10b3AgdGVzdC1kZXZ0b29scy1lcnJvci10b2dnbGUnXG4gICAgICAgICAgICAgICAgb25DbGljaz17KCkgPT4gdGhpcy5zZXRTdGF0ZSh7Y29sbGFwc2VkOiAhY29sbGFwc2VkfSl9XG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yLXRvcF9fZ3JvdXAnPlxuICAgICAgICAgICAgICAgICAgICDim5HvuI9cbiAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX190aXRsZSc+XG4gICAgICAgICAgICAgICAgICAgICAgICB7ZS5lcnJvci5tZXNzYWdlIHx8ICdFcnJvcid9XG4gICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yLXRvcF9fZ3JvdXAnPlxuICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9J2Rhc2gtZmUtZXJyb3JfX3RpbWVzdGFtcCBwZXJjeS1oaWRlJz5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtgJHtlLnRpbWVzdGFtcC50b0xvY2FsZVRpbWVTdHJpbmcoKX1gfVxuICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9fdGltZXN0YW1wIHBlcmN5LXNob3cnPlxuICAgICAgICAgICAgICAgICAgICAgICAgey8qIFNwZWNpYWwgcGVyY3kgdGltZXN0YW1wIGZvciB2aXN1YWwgdGVzdGluZy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAqIEhpZGRlbiBkdXJpbmcgcmVndWxhciB1c2FnZS5cbiAgICAgICAgICAgICAgICAgICAgICAgICAqL31cbiAgICAgICAgICAgICAgICAgICAgICAgIDAwOjAwOjAwIFBNXG4gICAgICAgICAgICAgICAgICAgIDwvc3Bhbj5cblxuICAgICAgICAgICAgICAgICAgICA8Q29sbGFwc2VJY29uXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGFzc05hbWU9e2BkYXNoLWZlLWVycm9yX19jb2xsYXBzZSAke1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbGxhcHNlZCA/ICdkYXNoLWZlLWVycm9yX19jb2xsYXBzZS0tZmxpcHBlZCcgOiAnJ1xuICAgICAgICAgICAgICAgICAgICAgICAgfWB9XG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB0aGlzLnNldFN0YXRlKHtjb2xsYXBzZWQ6ICFjb2xsYXBzZWR9KX1cbiAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICAgICAgLyogZXNsaW50LWVuYWJsZSBuby1pbmxpbmUtY29tbWVudHMgKi9cblxuICAgICAgICByZXR1cm4gY29sbGFwc2VkID8gKFxuICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZXJyb3ItY2FyZF9fbGlzdC1pdGVtJz57ZXJyb3JIZWFkZXJ9PC9kaXY+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT17Y2FyZENsYXNzZXN9PlxuICAgICAgICAgICAgICAgIHtlcnJvckhlYWRlcn1cbiAgICAgICAgICAgICAgICA8RXJyb3JDb250ZW50IGVycm9yPXtlLmVycm9yfSAvPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG4gICAgfVxufVxuXG5jb25zdCBNQVhfTUVTU0FHRV9MRU5HVEggPSA0MDtcbi8qIGVzbGludC1kaXNhYmxlIG5vLWlubGluZS1jb21tZW50cyAqL1xuZnVuY3Rpb24gVW5jb25uZWN0ZWRFcnJvckNvbnRlbnQoe2Vycm9yLCBiYXNlfSkge1xuICAgIHJldHVybiAoXG4gICAgICAgIDxkaXYgY2xhc3NOYW1lPSdlcnJvci1jb250YWluZXInPlxuICAgICAgICAgICAgey8qXG4gICAgICAgICAgICAgKiA0MCBpcyBhIHJvdWdoIGhldXJpc3RpYyAtIGlmIGxvbmdlciB0aGFuIDQwIHRoZW4gdGhlXG4gICAgICAgICAgICAgKiBtZXNzYWdlIG1pZ2h0IG92ZXJmbG93IGludG8gZWxsaXBzZXMgaW4gdGhlIHRpdGxlIGFib3ZlICZcbiAgICAgICAgICAgICAqIHdpbGwgbmVlZCB0byBiZSBkaXNwbGF5ZWQgaW4gZnVsbCBpbiB0aGlzIGVycm9yIGJvZHlcbiAgICAgICAgICAgICAqL31cbiAgICAgICAgICAgIHt0eXBlb2YgZXJyb3IubWVzc2FnZSAhPT0gJ3N0cmluZycgfHxcbiAgICAgICAgICAgIGVycm9yLm1lc3NhZ2UubGVuZ3RoIDwgTUFYX01FU1NBR0VfTEVOR1RIID8gbnVsbCA6IChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9fc3QnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1mZS1lcnJvcl9faW5mbyBkYXNoLWZlLWVycm9yX19jdXJ2ZWQnPlxuICAgICAgICAgICAgICAgICAgICAgICAge2Vycm9yLm1lc3NhZ2V9XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgKX1cblxuICAgICAgICAgICAge3R5cGVvZiBlcnJvci5zdGFjayAhPT0gJ3N0cmluZycgPyBudWxsIDogKFxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX19zdCc+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX19pbmZvJz5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxkZXRhaWxzPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzdW1tYXJ5PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8aT5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChUaGlzIGVycm9yIG9yaWdpbmF0ZWQgZnJvbSB0aGUgYnVpbHQtaW5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEphdmFTY3JpcHQgY29kZSB0aGF0IHJ1bnMgRGFzaCBhcHBzLiBDbGlja1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gc2VlIHRoZSBmdWxsIHN0YWNrIHRyYWNlIG9yIG9wZW4geW91clxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJvd3NlcidzIGNvbnNvbGUuKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2k+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zdW1tYXJ5PlxuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge2Vycm9yLnN0YWNrLnNwbGl0KCdcXG4nKS5tYXAoKGxpbmUsIGkpID0+IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHAga2V5PXtpfT57bGluZX08L3A+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSl9XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2RldGFpbHM+XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIHsvKiBCYWNrZW5kIEVycm9yICovfVxuICAgICAgICAgICAge3R5cGVvZiBlcnJvci5odG1sICE9PSAnc3RyaW5nJyA/IG51bGwgOiBlcnJvci5odG1sXG4gICAgICAgICAgICAgICAgICAuc3Vic3RyaW5nKDAsICc8IWRvY3R5cGUnLmxlbmd0aClcbiAgICAgICAgICAgICAgICAgIC50b0xvd2VyQ2FzZSgpID09PSAnPCFkb2N0eXBlJyA/IChcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1iZS1lcnJvcl9fc3QnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1iYWNrZW5kLWVycm9yJz5cbiAgICAgICAgICAgICAgICAgICAgICAgIHsvKiBFbWJlZCB3ZXJremV1ZyBkZWJ1Z2dlciBpbiBhbiBpZnJhbWUgdG8gcHJldmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgQ1NTIGxlYWtpbmcgLSB3ZXJremV1ZyBIVE1MIGluY2x1ZGVzIGEgYnVuY2hcbiAgICAgICAgICAgICAgICAgICAgICAgIG9mIENTUyBvbiBiYXNlIGh0bWwgZWxlbWVudHMgbGlrZSBgPGJvZHkvPmBcbiAgICAgICAgICAgICAgICAgICAgICAqL31cblxuICAgICAgICAgICAgICAgICAgICAgICAgPGlmcmFtZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNyY0RvYz17ZXJyb3IuaHRtbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICc8L2hlYWQ+JyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGA8c3R5bGUgdHlwZT1cInRleHQvY3NzXCI+JHt3ZXJremV1Z0Nzc308L3N0eWxlPjwvaGVhZD5gXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnPVwiP19fZGVidWdnZXJfXycsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgPVwiJHtiYXNlfT9fX2RlYnVnZ2VyX19gXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGU9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLypcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogNjdweCBvZiBwYWRkaW5nIGFuZCBtYXJnaW4gYmV0d2VlbiB0aGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIGlmcmFtZSBhbmQgdGhlIHBhcmVudCBjb250YWluZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIDY3IHdhcyBkZXRlcm1pbmVkIG1hbnVhbGx5IGluIHRoZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBicm93c2VyJ3MgZGV2IHRvb2xzLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICdjYWxjKDYwMHB4IC0gNjdweCknLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6ICc3NXZoJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyOiAnbm9uZSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApIDogKFxuICAgICAgICAgICAgICAg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0+IHtcbiAgICAgICAgICAgIHJldHVybiA8RnJvbnRFbmRFcnJvciBlPXtlcnJvcn0gaXNMaXN0SXRlbT17dHJ1ZX0ga2V5PXtpfSAvPjtcbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChpbkFsZXJ0c1RyYXkpIHtcbiAgICAgICAgICAgIGNhcmRDbGFzc2VzICs9ICcgZGFzaC1lcnJvci1jYXJkLS1hbGVydHMtdHJheSc7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPXtjYXJkQ2xhc3Nlc30+XG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZXJyb3ItY2FyZF9fdG9wYmFyJz5cbiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZXJyb3ItY2FyZF9fbWVzc2FnZSc+XG4gICAgICAgICAgICAgICAgICAgICAgICDwn5uRIEVycm9ycyAoXG4gICAgICAgICAgICAgICAgICAgICAgICA8c3Ryb25nIGNsYXNzTmFtZT0ndGVzdC1kZXZ0b29scy1lcnJvci1jb3VudCc+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge2Vycm9yc0xlbmd0aH1cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Ryb25nPlxuICAgICAgICAgICAgICAgICAgICAgICAgKXtjb25uZWN0ZWQgPyBudWxsIDogJ1xcdTAwYTAg8J+aqyBTZXJ2ZXIgVW5hdmFpbGFibGUnfVxuICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgPGRpdlxuICAgICAgICAgICAgICAgICAgICAgICAgY2xhc3NOYW1lPSdkYXNoLWZlLWVycm9yX19pY29uLXgnXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBjbGlja0hhbmRsZXIoKX1cbiAgICAgICAgICAgICAgICAgICAgPlxuICAgICAgICAgICAgICAgICAgIC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m9udEVuZEVycm9yQ29udGFpbmVyfSBmcm9tICcuL0Zyb250RW5kL0Zyb250RW5kRXJyb3JDb250YWluZXIucmVhY3QnO1xuXG5leHBvcnQgZGVmYXVsdCBjbGFzcyBHbG9iYWxFcnJvck92ZXJsYXkgZXh0ZW5kcyBDb21wb25lbnQge1xuICAgIGNvbnN0cnVjdG9yKHByb3BzKSB7XG4gICAgICAgIHN1cGVyKHByb3BzKTtcbiAgICB9XG5cbiAgICByZW5kZXIoKSB7XG4gICAgICAgIGNvbnN0IHt2aXNpYmxlLCBlcnJvciwgZXJyb3JzT3BlbmVkLCBjbGlja0hhbmRsZXJ9ID0gdGhpcy5wcm9wcztcblxuICAgICAgICBsZXQgZnJvbnRFbmRFcnJvcnM7XG4gICAgICAgIGlmIChlcnJvcnNPcGVuZWQpIHtcbiAgICAgICAgICAgIGNvbnN0IGVycm9ycyA9IGNvbmNhdChlcnJvci5mcm9udEVuZCwgZXJyb3IuYmFja0VuZCk7XG5cbiAgICAgICAgICAgIGZyb250RW5kRXJyb3JzID0gKFxuICAgICAgICAgICAgICAgIDxGcm9udEVuZEVycm9yQ29udGFpbmVyXG4gICAgICAgICAgICAgICAgICAgIGVycm9ycz17ZXJyb3JzfVxuICAgICAgICAgICAgICAgICAgICBjb25uZWN0ZWQ9e2Vycm9yLmJhY2tFbmRDb25uZWN0ZWR9XG4gICAgICAgICAgICAgICAgICAgIGVycm9yc09wZW5lZD17ZXJyb3JzT3BlbmVkfVxuICAgICAgICAgICAgICAgICAgICBjbGlja0hhbmRsZXI9e2NsaWNrSGFuZGxlcn1cbiAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgPGRpdj5cbiAgICAgICAgICAgICAgICA8ZGl2Pnt0aGlzLnByb3BzLmNoaWxkcmVufTwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWVycm9yLW1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dGF0dXNJY29uID0gaG90UmVsb2FkXG4gICAgICAgICAgICA/IGNvbm5lY3RlZFxuICAgICAgICAgICAgICAgID8gQ2hlY2tJY29uXG4gICAgICAgICAgICAgICAgOiBPZmZJY29uXG4gICAgICAgICAgICA6IENsb2NrSWNvbjtcblxuICAgICAgICBjb25zdCBtZW51Q29udGVudCA9IG9wZW5lZCA/IChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLW1lbnVfX2NvbnRlbnQnPlxuICAgICAgICAgICAgICAgIHtjYWxsYmFja0dyYXBoT3BlbmVkID8gPENhbGxiYWNrR3JhcGhDb250YWluZXIgLz4gOiBudWxsfVxuICAgICAgICAgICAgICAgIHtidXR0b25GYWN0b3J5KFxuICAgICAgICAgICAgICAgICAgICBjYWxsYmFja0dyYXBoT3BlbmVkLFxuICAgICAgICAgICAgICAgICAgICAnY2FsbGJhY2tzJyxcbiAgICAgICAgICAgICAgICAgICAgKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRTdGF0ZSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2tHcmFwaE9wZW5lZDogIWNhbGxiYWNrR3JhcGhPcGVuZWRcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBHcmFwaEljb24sXG4gICAgICAgICAgICAgICAgICAgICdncmFwaCcsXG4gICAgICAgICAgICAgICAgICAgICdDYWxsYmFja3MnXG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICB7YnV0dG9uRmFjdG9yeShcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzT3BlbmVkLFxuICAgICAgICAgICAgICAgICAgICAnZXJyb3JzJyxcbiAgICAgICAgICAgICAgICAgICAgdG9nZ2xlRXJyb3JzLFxuICAgICAgICAgICAgICAgICAgICBCZWxsSWNvbixcbiAgICAgICAgICAgICAgICAgICAgJ2JlbGwnLFxuICAgICAgICAgICAgICAgICAgICBlcnJDb3VudCArICcgRXJyb3InICsgKGVyckNvdW50ID09PSAxID8gJycgOiAncycpXG4gICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICB7YnV0dG9uRmFjdG9yeShcbiAgICAgICAgICAgICAgICAgICAgZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIHN0YXR1cyxcbiAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgX1N0YXR1c0ljb24sXG4gICAgICAgICAgICAgICAgICAgICdpbmRpY2F0b3InLFxuICAgICAgICAgICAgICAgICAgICAnU2VydmVyJ1xuICAgICAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKSA6IChcbiAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLW1lbnVfX2NvbnRlbnQnIC8+XG4gICAgICAgICk7XG5cbiAgICAgICAgY29uc3QgYWxlcnRzTGFiZWwgPVxuICAgICAgICAgICAgKGVyckNvdW50IHx8ICFjb25uZWN0ZWQpICYmICFvcGVuZWQgPyAoXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzc05hbWU9J2Rhc2gtZGVidWctYWxlcnQtbGFiZWwnPlxuICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1kZWJ1Zy1hbGVydCcgb25DbGljaz17dG9nZ2xlRXJyb3JzfT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHtlcnJDb3VudCA/IChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT0nZGFzaC1kZWJ1Zy1lcnJvci1jb3VudCc+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsn8J+bkSAnICsgZXJyQ291bnR9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICApIDogbnVsbH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHtjb25uZWN0ZWQgPyBudWxsIDogKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3NOYW1lPSdkYXNoLWRlYnVnLWRpc2Nvbm5lY3RlZCc+8J+aqzwvZGl2PlxuICAgICAgICAgICAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICApIDogbnVsbDtcblxuICAgICAgICBjb25zdCBvcGVuVmFyaWFudCA9IG9wZW5lZCA/ICdvcGVuJyA6ICdjbG9zZWQnO1xuXG4gICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICA8ZGl2PlxuICAgICAgICAgICAgICAgIHthbGVydHNMYWJlbH1cbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzTmFtZT17Y2xhc3NlcygnZGFzaC1kZWJ1Zy1tZW51X19vdXRlcicsIG9wZW5WYXJpYW50KX0+XG4gICAgICAgICAgICAgICAgICAgIHttZW51Q29udGVudH1cbiAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y2xhc3NlcygnZGFzaC1kZWJ1Zy1tZW51Jywgb3BlblZhcmlhbnQpfVxuICAgICAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFN0YXRlKHtvcGVuZWQ6ICFvcGVuZWR9KTtcbiAgICAgICAgICAgICAgICAgICAgfX1cbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIDxEZWJ1Z0ljb25cbiAgICAgICAgICAgICAgICAgICAgICAgIGNsYXNzTmFtZT17Y2xhc3NlcygnZGFzaC1kZWJ1Zy1tZW51X19pY29uJywgJ2RlYnVnJyl9XG4gICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgPEdsb2JhbEVycm9yT3ZlcmxheVxuICAgICAgICAgICAgICAgICAgICBlcnJvcj17ZXJyb3J9XG4gICAgICAgICAgICAgICAgICAgIHZpc2libGU9e2VyckNvdW50ID4gMH1cbiAgICAgICAgICAgICAgICAgICAgZXJyb3JzT3BlbmVkPXtlcnJvcnNPcGVuZWR9XG4gICAgICAgICAgICAgICAgICAgIGNsaWNrSGFuZGxlcj17dG9nZ2xlRXJyb3JzfVxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAge3RoaXMucHJvcHMuY2hpbGRyZW59XG4gICAgICAgICAgICAgICAgPC9HbG9iYWxFcnJvck92ZXJsYXk+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgKTtcbiAgICB9XG59XG5cbkRlYnVnTWVudS5wcm9wVHlwZXMgPSB7XG4gICAgY2hpbGRyZW46IFByb3BUeXBlcy5vYmplY3QsXG4gICAgZXJyb3I6IFByb3BUeXBlcy5vYmplY3QsXG4gICAgaG90UmVsb2FkOiBQcm9wVHlwZXMuYm9vbFxufTtcblxuZXhwb3J0IHtEZWJ1Z01lbnV9O1xuIiwiLy8gV2Vya3pldWcgY3NzIGluY2x1ZGVkIGFzIGEgc3RyaW5nLCBiZWNhdXNlIHdlIHdhbnQgdG8gaW5qZWN0XG4vLyBpdCBpbnRvIGFuIGlmcmFtZSBzcmNEb2NcblxuZXhwb3J0IGRlZmF1bHQgYFxuYm9keSB7XG4gICAgbWFyZ2luOiAwcHg7XG4gICAgbWFyZ2luLXRvcDogMTBweDtcbn1cblxuLmVycm9yLWNvbnRhaW5lciB7XG4gICAgZm9udC1mYW1pbHk6IFJvYm90bztcbn1cblxuLnRyYWNlYmFjayB7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogd2hpdGU7XG4gICAgYm9yZGVyOiAycHggc29saWQgI2RmZThmMztcbiAgICBib3JkZX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ICAgICAgICAqIEZvciBub3csIHdlIHdvbid0IHRyeSB0byB1bnBhY2sgdGhlc2UgbmVzdGVkIG9wdGlvbnNcbiAgICAgICAgICAgICAqIGJ1dCB3ZSBjb3VsZCBpbiB0aGUgZnV0dXJlLlxuICAgICAgICAgICAgICovXG4gICAgICAgICAgICBjb25zdCBqc29uU3VwcGxpZWRWYWx1ZSA9IEpTT04uc3RyaW5naWZ5KFxuICAgICAgICAgICAgICAgIHByb3BzW2ludmFsaWRQcm9wUGF0aF0sXG4gICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICApO1xuICAgICAgICAgICAgaWYgKGpzb25TdXBwbGllZFZhbHVlKSB7XG4gICAgICAgICAgICAgICAgaWYgKGluY2x1ZGVzKCdcXG4nLCBqc29uU3VwcGxpZWRWYWx1ZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgZXJyb3JNZXNzYWdlICs9IGBcXG5WYWx1ZSBwcm92aWRlZDogXFxuJHtqc29uU3VwcGxpZWRWYWx1ZX1gO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGVycm9yTWVzc2FnZSArPSBgXFxuVmFsdWUgcHJvdmlkZWQ6ICR7anNvblN1cHBsaWVkVmFsdWV9YDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICAvKlxuICAgICAgICAgKiBOb3QgYXdhcmUgb2Ygb3RoZXIgcHJvcCB0eXBlIHdhcm5pbmcgbWVzc2FnZXMuXG4gICAgICAgICAqIEJ1dCwgaWYgdGhleSBleGlzdCwgdGhlbiBhdCBsZWFzdCB0aHJvdyB0aGUgZGVmYXVsdFxuICAgICAgICAgKiByZWFjdCBwcm9wIHR5cGVzIGVycm9yXG4gICAgICAgICAqL1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IobWVzc2FnZSk7XG4gICAgfVxuXG4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4gICAgICAgICAgICAvLyBpbiB0aGlzIGNhc2UuXG4gICAgICAgICAgICBpZiAob3JpZ2luYWxWYWwgIT09IG5ld1ZhbCkge1xuICAgICAgICAgICAgICAgIGlmIChzdG9yYWdlLmhhc0l0ZW0odmFsc0tleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgb3JpZ2luYWxWYWwgPSBzdG9yYWdlLmdldEl0ZW0odmFsc0tleSlbMV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHZhbHMgPVxuICAgICAgICAgICAgICAgICAgICBvcmlnaW5hbFZhbCA9PT0gdW5kZWZpbmVkXG4gICAgICAgICAgICAgICAgICAgICAgICA/IFtuZXdWYWxdXG4gICAgICAgICAgICAgICAgICAgICAgICA6IFtuZXdWYWwsIG9yaWdpbmFsVmFsXTtcbiAgICAgICAgICAgICAgICBzdG9yYWdlLnNldEl0ZW0odmFsc0tleSwgdmFscywgZGlzcGF0Y2gpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfSwgcGVyc2lzdGVkX3Byb3BzKTtcbn1cblxuLypcbiAqIFVzZWQgZm9yIGVudGlyZSBsYXlvdXRzIChvbiBsb2FkKSBvciBwYXJ0aWFsIGxheW91dHMgKGZyb20gY2hpbGRyZW5cbiAqIGNhbGxiYWNrcykgdG8gYXBwbHkgcHJldmlvdXNseS1zdG9yZWQgVUkgZWRpdHMgdG8gY29tcG9uZW50c1xuICovXG5leHBvcnQgZnVuY3Rpb24gYXBwbHlQZXJzaXN0ZW5jZShsYXlvdXQsIGRpc3BhdGNoKSB7XG4gICAgaWYgKHR5cGUobGF5b3V0KSAhPT0gJ09iamVjdCcgfHwgIWxheW91dC5wcm9wcykge1xuICAgICAgICByZXR1cm4gbGF5b3V0O1xuICAgIH1cblxuICAgIHJldHVybiBwZXJzaXN0ZW5jZU1vZHMobGF5b3V0LCBsYXlvdXQsIFtdLCBkaXNwYXRjaCk7XG59XG5cbmNvbnN0IFVORE8gPS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kpO1xuICAgICAgICB9XG4gICAgfVxufVxuXG5mdW5jdGlvbiBwZXJzaXN0ZW5jZU1vZHMobGF5b3V0LCBjb21wb25lbnQsIHBhdGgsIGRpc3BhdGNoKSB7XG4gICAgY29uc3Qge1xuICAgICAgICBjYW5QZXJzaXN0LFxuICAgICAgICBpZCxcbiAgICAgICAgcHJvcHMsXG4gICAgICAgIGVsZW1lbnQsXG4gICAgICAgIHBlcnNpc3RlbmNlLFxuICAgICAgICBwZXJzaXN0ZWRfcHJvcHMsXG4gICAgICAgIHBlcnNpc3RlbmNlX3R5cGVcbiAgICB9ID0gZ2V0UHJvcHMoY29tcG9uZW50KTtcblxuICAgIGxldCBsYXlvdXRPdXQgPSBsYXlvdXQ7XG4gICAgaWYgKGNhblBlcnNpc3QgJiYgcGVyc2lzdGVuY2UpIHtcbiAgICAgICAgY29uc3Qgc3RvcmFnZSA9IGdldFN0b3JlKHBlcnNpc3RlbmNlX3R5cGUsIGRpc3BhdGNoKTtcbiAgICAgICAgY29uc3QgdXBkYXRlID0ge307XG4gICAgICAgIGZvckVhY2goXG4gICAgICAgICAgICBwZXJzaXN0ZWRQcm9wID0+XG4gICAgICAgICAgICAgICAgbW9kUHJvcChcbiAgICAgICAgICAgICAgICAgICAgZ2V0VmFsc0tleShpZCwgcGVyc2lzdGVkUHJvcCwgcGVyc2lzdGVuY2UpLFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlLFxuICAgICAgICAgICAgICAgICAgICBlbGVtZW50LFxuICAgICAgICAgICAgICAgICAgICBwcm9wcyxcbiAgICAgICAgICAgICAgICAgICAgcGVyc2lzdGVkUHJvcCxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIHBlcnNpc3RlZF9wcm9wc1xuICAgICAgICApO1xuXG4gICAgICAgIGZvciAoY29uc3QgcHJvcE5hbWUgaW4gdXBkYXRlKSB7XG4gICAgICAgICAgICBsYXlvdXRPdXQgPSBzZXQoXG4gICAgICAgICAgICAgICAgbGVuc1BhdGgocGF0aC5jb25jYXQoJ3Byb3BzJywgcHJvcE5hbWUpKSxcbiAgICAgICAgICAgICAgICB1cGRhdGVbcHJvcE5hbWVdLFxuICAgICAgICAgICAgICAgIGxheW91dE91dFxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8vIHJlY3Vyc2UgaW53YXJkXG4gICAgY29uc3Qge2NoaWxkcmVufSA9IHByb3BzO1xuICAgIGlmIChBcnJheS5pc0FycmF5KGNoaWxkcmVuKSkge1xuICAgICAgICBjaGlsZHJlbi5mb3JFYWNoKChjaGlsZCwgaSkgPT4ge1xuICAgICAgICAgICAgaWYgKHR5cGUoY2hpbGQpID09PSAnT2JqZWN0JyAmJiBjaGlsZC5wcm9wcykge1xuICAgICAgICAgICAgICAgIGxheW91dE91dCA9IHBlcnNpc3RlbmNlTW9kcyhcbiAgICAgICAgICAgICAgICAgICAgbGF5b3V0T3V0LFxuICAgICAgICAgICAgICAgICAgICBjaGlsZCxcbiAgICAgICAgICAgICAgICAgICAgcGF0aC5jb25jYXQoJ3Byb3BzJywgJ2NoaWxkcmVuJywgaSksXG4gICAgICAgICAgICAgICAgICAgIGRpc3BhdGNoXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfSBlbHNlIGlmICh0eXBlKGNoaWxkcmVuKSA9PT0gJ09iamVjdCcgJiYgY2hpbGRyZW4ucHJvcHMpIHtcbiAgICAgICAgbGF5b3V0T3V0ID0gcGVyc2lzdGVuY2VNb2RzKFxuICAgICAgICAgICAgbGF5b3V0T3V0LFxuICAgICAgICAgICAgY2hpbGRyZW4sXG4gICAgICAgICAgICBwYXRoLmNvbmNhdCgncHJvcHMnLCAnY2hpbGRyZW4nKSxcbiAgICAgICAgICAgIGRpc3BhdGNoXG4gICAgICAgICk7XG4gICAgfVxuICAgIHJldHVybiBsYXlvdXRPdXQ7XG59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cbiAgICAgICAgICAgICAgICAgICAgVU5ET1xuICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICBmaWx0ZXIobm90SW5OZXdQcm9wcywgcGVyc2lzdGVkX3Byb3BzKVxuICAgICAgICApO1xuICAgICAgICBkZXBlcnNpc3RlZFByb3BzID0gbWVyZ2VSaWdodChwcm9wcywgdXBkYXRlKTtcbiAgICB9XG5cbiAgICBpZiAoZmluYWxQZXJzaXN0ZW5jZSkge1xuICAgICAgICBjb25zdCBmaW5hbFN0b3JhZ2UgPSBnZXRTdG9yZShmaW5hbFBlcnNpc3RlbmNlVHlwZSwgZGlzcGF0Y2gpO1xuXG4gICAgICAgIGlmIChwZXJzaXN0ZW5jZUNoYW5nZWQpIHtcbiAgICAgICAgICAgIC8vIGFwcGx5IG5ldyBwZXJzaXN0ZW5jZVxuICAgICAgICAgICAgZm9yRWFjaChcbiAgICAgICAgICAgICAgICBwZXJzaXN0ZWRQcm9wID0+XG4gICAgICAgICAgICAgICAgICAgIG1vZFByb3AoXG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRWYWxzS2V5KGlkLCBwZXJzaXN0ZWRQcm9wLCBmaW5hbFBlcnNpc3RlbmNlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsU3RvcmFnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1lbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXBlcnNpc3RlZFByb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGVyc2lzdGVkUHJvcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgIGZpbHRlcihub3RJbk5ld1Byb3BzLCBmaW5hbFBlcnNpc3RlZFByb3BzKVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIG5vdyB0aGUgbWFpbiBwb2ludCAtIGNsZWFyIGFueSBlZGl0IG9mIGEgcHJvcCB0aGF0IGNoYW5nZWRcbiAgICAgICAgLy8gbm90ZSB0aGF0IHRoaXMgaXMgaW5kZXBlbmRlbnQgb2YgdGhlIG5ldyBwcm9wIHZhbHVlLlxuICAgICAgICBjb25zdCB0cmFuc2Zvcm1zID0gZWxlbWVudC5wZXJzaXN0ZW5jZVRyYW5zZm9ybXMgfHwge307XG4gICAgICAgIGZvciAoY29uc3QgcHJvcE5hbWUgaW4gbmV3UHJvcHMpIHtcbiAgICAgICAgICAgIGNvbnN0IHByb3BUcmFuc2Zvcm1zID0gdHJhbnNmb3Jtc1twcm9wTmFtZV07XG4gICAgICAgICAgICBpZiAocHJvcFRyYW5zZm9ybXMpIHtcbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IHByb3BQYXJ0IGluIHByb3BUcmFuc2Zvcm1zKSB7XG4gICAgICAgICAgICAgICAgICAgIGZpbmFsU3RvcmFnZS5yZW1vdmVJdGVtKFxuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0VmFsc0tleShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBgJHtwcm9wTmFtZX0uJHtwcm9wUGFydH1gLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsUGVyc2lzdGVuY2VcbiAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGZpbmFsU3RvcmFnZS5yZW1vdmVJdGVtKFxuICAgICAgICAgICAgICAgICAgICBnZXRWYWxzS2V5KGlkLCBwcm9wTmFtZSwgZmluYWxQZXJzaXN0ZW5jZSlcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIHJldHVybiBwZXJzaXN0ZW5jZUNoYW5nZWQgPyBtZXJnZVJpZ2h0KG5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wYXlsb2FkLCB7dGltZXN0YW1wOiBuZXcgRGF0ZSgpfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAuLi5mcm9udEVuZFxuICAgICAgICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgICAgICAgICBiYWNrRW5kLFxuICAgICAgICAgICAgICAgICAgICBiYWNrRW5kQ29ubmVjdGVkXG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoYWN0aW9uLnBheWxvYWQudHlwZSA9PT0gJ2JhY2tFbmQnKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICAgICAgZnJvbnRFbmQsXG4gICAgICAgICAgICAgICAgICAgIGJhY2tFbmQ6IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lcmdlUmlnaHQoYWN0aW9uLnBheWxvYWQsIHt0aW1lc3RhbXA6IG5ldyBEYXRlKCl9KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIC4uLmJhY2tFbmRcbiAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgYmFja0VuZENvbm5lY3RlZFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH1cbiAgICAgICAgY2FzZSAnU0VUX0NPTk5FQ1RJT05fU1RBVFVTJzoge1xuICAgICAgICAgICAgcmV0dXJuIG1lcmdlUmlnaHQoc3RhdGUsIHtiYWNrRW5kQ29ubmVjdGVkOiBhY3Rpb24ucGF5bG9hZH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgcmV0dXJuIHN0YXRlO1xuICAgICAgICB9XG4gICAgfVxufVxuIiwiY29uc3QgaW5pdGlhbEhpc3RvcnkgPSB7XG4gICAgcGFzdDogW10sXG4gICAgcHJlc2VudDoge30sXG4gICAgZnV0dXJlOiBbXVxufTtcblxuZnVuY3Rpb24gaGlzdG9yeShzdGF0ZSA9IGluaXRpYWxIaXN0b3J5LCBhY3Rpb24pIHtcbiAgICBzd2l0Y2ggKGFjdGlvbi50eXBlKSB7XG4gICAgICAgIGNhc2UgJ1VORE8nOiB7XG4gICAgICAgICAgICBjb25zdCB7cGFzdCwgcHJlc2VudCwgZnV0dXJlfSA9IHN0YXRlO1xuICAgICAgICAgICAgY29uc3QgcHJldmlvdXMgPSBwYXN0W3Bhc3QubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICBjb25zdCBuZXdQYXN0ID0gcGFzdC5zbGljZSgwLCBwYXN0Lmxlbmd0aCAtIDEpO1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgICBwYXN0OiBuZXdQYXN0LFxuICAgICAgICAgICAgICAgIHByZXNlbnQ6IHByZXZpb3VzLFxuICAgICAgICAgICAgICAgIGZ1dHVyZTogW3ByZXNlbnQsIC4uLmZ1dHVyZV1cbiAgICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBjYXNlICdSRURPJzoge1xuICAgICAgICAgICAgY29uc3Qge3Bhc3QsIHByZXNlbnQsIGZ1dHVyZX0gPSBzdGF0ZTtcbiAgICAgICAgICAgIGNvbnN0IG5leHQgPSBmdXR1cmVbMF07XG4gICAgICAgICAgICBjb25zdCBuZXdGdXR1cmUgPSBmdXR1cmUuc2xpY2UoMSk7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIHBhc3Q6IFsuLi5wYXN0LCBwcmVzZW50XSxcbiAgICAgICAgICAgICAgICBwcmVzZW50OiBuZXh0LFxuICAgICAgICAgICAgICAgIGZ1dHVyZTogbmV3RnV0dXJlXG4gICAgICAgICAgICB9O1xuICAgICAgICB9XG5cbiAgICAgICAgY2FzZSAnUkVWRVJUJzoge1xuICAgICAgICAgICAgY29uc3Qge3Bhc3QsIGZ1dHVyZX0gPSBzdGF0ZTtcbiAgICAgICAgICAgIGNvbnN0IHByZXZpb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dWx0XCIgfHwgb3B0aW9ucy5xdWFsaXR5ID09IFwicHJvb2ZcIikge1xuICAgICAgICAgICAgY29zZVJlc3VsdC5wdXNoKGNvc2VMYXlvdXQob3B0aW9ucywgc3BlY3RyYWxSZXN1bHRbMF0pKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgLy8gcGFja2luZyBpcyBlbmFibGVkXG4gICAgICAgICAgdmFyIHRvcE1vc3ROb2RlcyA9IGF1eC5nZXRUb3BNb3N0Tm9kZXMob3B0aW9ucy5lbGVzLm5vZGVzKCkpO1xuICAgICAgICAgIGNvbXBvbmVudHMgPSBhdXguY29ubmVjdENvbXBvbmVudHMoY3ksIG9wdGlvbnMuZWxlcywgdG9wTW9zdE5vZGVzKTtcblxuICAgICAgICAgIC8vc2VuZCBlYWNoIGNvbXBvbmVudCB0byBzcGVjdHJhbCBsYXlvdXRcbiAgICAgICAgICBpZiAob3B0aW9ucy5yYW5kb21pemUpIHtcbiAgICAgICAgICAgIGNvbXBvbmVudHMuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgIG9wdGlvbnMuZWxlcyA9IGNvbXBvbmVudDtcbiAgICAgICAgICAgICAgc3BlY3RyYWxSZXN1bHQucHVzaChzcGVjdHJhbExheW91dChvcHRpb25zKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAob3B0aW9ucy5xdWFsaXR5ID09IFwiZGVmYXVsdFwiIHx8IG9wdGlvbnMucXVhbGl0eSA9PSBcInByb29mXCIpIHtcbiAgICAgICAgICAgIHZhciB0b0JlVGlsZWROb2RlcyA9IGN5LmNvbGxlY3Rpb24oKTtcbiAgICAgICAgICAgIGlmIChvcHRpb25zLnRpbGUpIHtcbiAgICAgICAgICAgICAgLy8gYmVoYXZlIG5vZGVzIHRvIGJlIHRpbGVkIGFzIG9uZSBjb21wb25lbnRcbiAgICAgICAgICAgICAgdmFyIG5vZGVJbmRleGVzID0gbmV3IE1hcCgpO1xuICAgICAgICAgICAgICB2YXIgX3hDb29yZHMgPSBbXTtcbiAgICAgICAgICAgICAgdmFyIF95Q29vcmRzID0gW107XG4gICAgICAgICAgICAgIHZhciBjb3VudCA9IDA7XG4gICAgICAgICAgICAgIHZhciB0ZW1wU3BlY3RyYWxSZXN1bHQgPSB7IG5vZGVJbmRleGVzOiBub2RlSW5kZXhlcywgeENvb3JkczogX3hDb29yZHMsIHlDb29yZHM6IF95Q29vcmRzIH07XG4gICAgICAgICAgICAgIHZhciBpbmRleGVzVG9CZURlbGV0ZWQgPSBbXTtcbiAgICAgICAgICAgICAgY29tcG9uZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGluZGV4KSB7XG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudC5lZGdlcygpLmxlbmd0aCA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICBjb21wb25lbnQubm9kZXMoKS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlLCBpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRvQmVUaWxlZE5vZGVzLm1lcmdlKGNvbXBvbmVudC5ub2RlcygpW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFub2RlLmlzUGFyZW50KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICB0ZW1wU3BlY3RyYWxSZXN1bHQubm9kZUluZGV4ZXMuc2V0KGNvbXBvbmVudC5ub2RlcygpW2ldLmlkKCksIGNvdW50KyspO1xuICAgICAgICAgICAgICAgICAgICAgIHRlbXBTcGVjdHJhbFJlc3VsdC54Q29vcmRzLnB1c2goY29tcG9uZW50Lm5vZGVzKClbMF0ucG9zaXRpb24oKS54KTtcbiAgICAgICAgICAgICAgICAgICAgICB0ZW1wU3BlY3RyYWxSZXN1bHQueUNvb3Jkcy5wdXNoKGNvbXBvbmVudC5ub2RlcygpWzBdLnBvc2l0aW9uKCkueSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgaW5kZXhlc1RvQmVEZWxldGVkLnB1c2goaW5kZXgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgIGlmICh0b0JlVGlsZWROb2Rlcy5sZW5ndGggPiAxKSB7XG4gICAgICAgICAgICAgICAgY29tcG9uZW50cy5wdXNoKHRvQmVUaWxlZE5vZGVzKTtcbiAgICAgICAgICAgICAgICBzcGVjdHJhbFJlc3VsdC5wdXNoKHRlbXBTcGVjdHJhbFJlc3VsdCk7XG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IGluZGV4ZXNUb0JlRGVsZXRlZC5sZW5ndGggLSAxOyBpID49IDA7IGktLSkge1xuICAgICAgICAgICAgICAgICAgY29tcG9uZW50cy5zcGxpY2UoaW5kZXhlc1RvQmVEZWxldGVkW2ldLCAxKTtcbiAgICAgICAgICAgICAgICAgIHNwZWN0cmFsUmVzdWx0LnNwbGljZShpbmRleGVzVG9CZURlbGV0ZWRbaV0sIDEpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbXBvbmVudHMuZm9yRWFjaChmdW5jdGlvbiAoY29tcG9uZW50LCBpbmRleCkge1xuICAgICAgICAgICAgICAvLyBzZW5kIGVhY2ggY29tcG9uZW50IHRvIGNvc2UgbGF5b3V0XG4gICAgICAgICAgICAgIG9wdGlvbnMuZWxlcyA9IGNvbXBvbmVudDtcbiAgICAgICAgICAgICAgY29zZVJlc3VsdC5wdXNoKGNvc2VMYXlvdXQob3B0aW9ucywgc3BlY3RyYWxSZXN1bHRbaW5kZXhdKSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBwYWNraW5nXG4gICAgICAgICAgaWYgKGNvbXBvbmVudHMubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgdmFyIHN1YmdyYXBocyA9IFtdO1xuICAgICAgICAgICAgY29tcG9uZW50cy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGluZGV4KSB7XG4gICAgICAgICAgICAgIHZhciBub2RlSW5kZXhlcyA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgaWYgKG9wdGlvbnMucXVhbGl0eSA9PSBcImRyYWZ0XCIpIHtcbiAgICAgICAgICAgICAgICBub2RlSW5kZXhlcyA9IHNwZWN0cmFsUmVzdWx0W2luZGV4XS5ub2RlSW5kZXhlcztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB2YXIgc3ViZ3JhcGggPSB7fTtcbiAgICAgICAgICAgICAgc3ViZ3JhcGgubm9kZXMgPSBbXTtcbiAgICAgICAgICAgICAgc3ViZ3JhcGguZWRnZXMgPSBbXTtcbiAgICAgICAgICAgICAgdmFyIG5vZGVJbmRleCA9IHZvaWQgMDtcbiAgICAgICAgICAgICAgY29tcG9uZW50Lm5vZGVzKCkuZm9yRWFjaChmdW5jdGlvbiAobm9kZSkge1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLnF1YWxpdHkgPT0gXCJkcmFmdFwiKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoIW5vZGUuaXNQYXJlbnQoKSkge1xuICAgICAgICAgICAgICAgICAgICBub2RlSW5kZXggPSBub2RlSW5kZXhlcy5nZXQobm9kZS5pZCgpKTtcbiAgICAgICAgICAgICAgICAgICAgc3ViZ3JhcGgubm9kZXMucHVzaCh7IHg6IHNwZWN0cmFsUmVzdWx0W2luZGV4XS54Q29vcmRzW25vZGVJbmRleF0gLSBub2RlLmJvdW5kaW5nYm94KCkudyAvIDIsIHk6IHNwZWN0cmFsUmVzdWx0W2luZGV4XS55Q29vcmRzW25vZGVJbmRleF0gLSBub2RlLmJvdW5kaW5nYm94KCkuaCAvIDIsIHdpZHRoOiBub2RlLmJvdW5kaW5nYm94KCkudywgaG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eSA9PSBcImRyYWZ0XCIpIHtcbiAgICAgICAgICAgICAgICAgIHZhciBzb3VyY2VOb2RlSW5kZXggPSBub2RlSW5kZXhlcy5nZXQoc291cmNlLmlkKCkpO1xuICAgICAgICAgICAgICAgICAgdmFyIHRhcmdldE5vZGVJbmRleCA9IG5vZGVJbmRleGVzLmdldCh0YXJnZXQuaWQoKSk7XG4gICAgICAgICAgICAgICAgICB2YXIgc291cmNlQ2VudGVyID0gW107XG4gICAgICAgICAgICAgICAgICB2YXIgdGFyZ2V0Q2VudGVyID0gW107XG4gICAgICAgICAgICAgICAgICBpZiAoc291cmNlLmlzUGFyZW50KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhcmVudEluZm8gPSBhdXguY2FsY0JvdW5kaW5nQm94KHNvdXJjZSwgc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnhDb29yZHMsIHNwZWN0cmFsUmVzdWx0W2luZGV4XS55Q29vcmRzLCBub2RlSW5kZXhlcyk7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZUNlbnRlci5wdXNoKHBhcmVudEluZm8udG9wTGVmdFggKyBwYXJlbnRJbmZvLndpZHRoIC8gMik7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZUNlbnRlci5wdXNoKHBhcmVudEluZm8udG9wTGVmdFkgKyBwYXJlbnRJbmZvLmhlaWdodCAvIDIpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc291cmNlQ2VudGVyLnB1c2goc3BlY3RyYWxSZXN1bHRbaW5kZXhdLnhDb29yZHNbc291cmNlTm9kZUluZGV4XSk7XG4gICAgICAgICAgICAgICAgICAgIHNvdXJjZUNlbnRlci5wdXNoKHNwZWN0cmFsUmVzdWx0W2luZGV4XS55Q29vcmRzW3NvdXJjZU5vZGVJbmRleF0pO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgaWYgKHRhcmdldC5pc1BhcmVudCgpK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LmdldENlbnRlclkoKSwgZW5kWDogY29zZVJlc3VsdFtpbmRleF1bdGFyZ2V0LmlkKCldLmdldENlbnRlclgoKSwgZW5kWTogY29zZVJlc3VsdFtpbmRleF1bdGFyZ2V0LmlkKCldLmdldENlbnRlclkoKSB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICBzdWJncmFwaHMucHVzaChzdWJncmFwaCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciBzaGlmdFJlc3VsdCA9IGxheVV0aWwucGFja0NvbXBvbmVudHMoc3ViZ3JhcGhzLCBvcHRpb25zLnJhbmRvbWl6ZSkuc2hpZnRzO1xuICAgICAgICAgICAgaWYgKG9wdGlvbnMucXVhbGl0eSA9PSBcImRyYWZ0XCIpIHtcbiAgICAgICAgICAgICAgc3BlY3RyYWxSZXN1bHQuZm9yRWFjaChmdW5jdGlvbiAocmVzdWx0LCBpbmRleCkge1xuICAgICAgICAgICAgICAgIHZhciBuZXdYQ29vcmRzID0gcmVzdWx0LnhDb29yZHMubWFwKGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICAgICAgICByZXR1cm4geCArIHNoaWZ0UmVzdWx0W2luZGV4XS5keDtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB2YXIgbmV3WUNvb3JkcyA9IHJlc3VsdC55Q29vcmRzLm1hcChmdW5jdGlvbiAoeSkge1xuICAgICAgICAgICAgICAgICAgcmV0dXJuIHkgKyBzaGlmdFJlc3VsdFtpbmRleF0uZHk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmVzdWx0LnhDb29yZHMgPSBuZXdYQ29vcmRzO1xuICAgICAgICAgICAgICAgIHJlc3VsdC55Q29vcmRzID0gbmV3WUNvb3JkcztcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb3NlUmVzdWx0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yZXN1bHQpIHtcbiAgICAgICAgICAgICAgcmVzdWx0LnhDb29yZHMuZm9yRWFjaChmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICBpZiAodmFsdWUgPCBtaW5YQ29vcmQpIG1pblhDb29yZCA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA+IG1heFhDb29yZCkgbWF4WENvb3JkID0gdmFsdWU7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICByZXN1bHQueUNvb3Jkcy5mb3JFYWNoKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA8IG1pbllDb29yZCkgbWluWUNvb3JkID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKHZhbHVlID4gbWF4WUNvb3JkKSBtYXhZQ29vcmQgPSB2YWx1ZTtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciBib3VuZGluZ0JveCA9IG9wdGlvbnMuZWxlcy5ib3VuZGluZ0JveCgpO1xuICAgICAgICAgICAgdmFyIGRpZmZPblggPSBib3VuZGluZ0JveC54MSArIGJvdW5kaW5nQm94LncgLyAyIC0gKG1heFhDb29yZCArIG1pblhDb29yZCkgLyAyO1xuICAgICAgICAgICAgdmFyIGRpZmZPblkgPSBib3VuZGluZ0JveC55MSArIGJvdW5kaW5nQm94LmggLyAyIC0gKG1heFlDb29yZCArIG1pbllDb29yZCkgLyAyO1xuICAgICAgICAgICAgc3BlY3RyYWxSZXN1bHQuZm9yRWFjaChmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgIHJlc3VsdC54Q29vcmRzID0gcmVzdWx0LnhDb29yZHMubWFwKGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHggKyBkaWZmT25YO1xuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgcmVzdWx0LnlDb29yZHMgPSByZXN1bHQueUNvb3Jkcy5tYXAoZnVuY3Rpb24gKHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4geSArIGRpZmZPblk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvc2VSZXN1bHQuZm9yRWFjaChmdW5jdGlvbiAocmVzdWx0KSB7XG4gICAgICAgICAgICAgIE9iamVjdC5rZXlzKHJlc3VsdCkuZm9yRWFjaChmdW5jdGlvbiAoaXRlbSkge1xuICAgICAgICAgICAgICAgIHZhciBub2RlID0gcmVzdWx0W2l0ZW1dO1xuICAgICAgICAgICAgICAgIGlmIChub2RlLmdldENlbnRlclgoKSA8IG1pblhDb29yZCkgbWluWENvb3JkID0gbm9kZS5nZXRDZW50ZXJYKCk7XG4gICAgICAgICAgICAgICAgaWYgKG5vZGUuZ2V0Q2VudGVyWCgpID4gbWF4WENvb3JkKSBtYXhYQ29vcmQgPSBub2RlLmdldENlbnRlclgoKTtcbiAgICAgICAgICAgICAgICBpZiAobm9kZS5nZXRDZW50ZXJZKCkgPCBtaW5ZQ29vcmQpIG1pbllDb29yZCA9IG5vZGUuZ2V0Q2VudGVyWSgpO1xuICAgICAgICAgICAgICAgIGlmIChub2RlLmdldENlbnRlclkoKSA+IG1heFlDb29yZCkgbWF4WUNvb3JkID0gbm9kZS5nZXRDZW50ZXJZKCk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB2YXIgX2JvdW5kaW5nQm94ID0gb3B0aW9ucy5lbGVzLmJvdW5kaW5nQm94KCk7XG4gICAgICAgICAgICB2YXIgX2RpZmZPblggPSBfYm91bmRpbmdCb3gueDEgKyBfYm91bmRpbmdCb3gudyAvIDIgLSAobWF4WENvb3JkICsgbWluWENvb3JkKSAvIDI7XG4gICAgICAgICAgICB2YXIgX2RpZmZPblkgPSBfYm91bmRpbmdCb3gueTEgKyBfYm91bmRpbmdCb3guaCAvIDIgLSAobWF4WUNvb3JkICsgbWluWUNvb3JkKSAvIDI7XG4gICAgICAgICAgICBjb3NlUmVzdWx0LmZvckVhY2goZnVuY3Rpb24gKHJlc3VsdCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgT2JqZWN0LmtleXMocmVzdWx0KS5mb3JFYWNoKGZ1bmN0aW9uIChpdGVtKSB7XG4gICAgICAgICAgICAgICAgdmFyIG5vZGUgPSByZXN1bHRbaXRlbV07XG4gICAgICAgICAgICAgICAgbm9kZS5zZXRDZW50ZXIobm9kZS5nZXRDZW50ZXJYKCkgKyBfZGlmZk9uWCwgbm9kZS5nZXRDZW50ZXJZKCkgKyBfZGlmZk9uWSk7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIC8vIGdldCBlYWNoIGVsZW1lbnQncyBjYWxjdWxhdGVkIHBvc2l0aW9uXG4gICAgICB2YXIgZ2V0UG9zaXRpb25zID0gZnVuY3Rpb24gZ2V0UG9zaXRpb25zKGVsZSwgaSkge1xuICAgICAgICBpZiAob3B0aW9ucy5xdWFsaXR5ID09IFwiZGVmYXVsdFwiIHx8IG9wdGlvbnMucXVhbGl0eSA9PSBcInByb29mXCIpIHtcbiAgICAgICAgICBpZiAodHlwZW9mIGVsZSA9PT0gXCJudW1iZXJcIikge1xuICAgICAgICAgICAgZWxlID0gaTtcbiAgICAgICAgICB9XG4gICAgICAgICAgdmFyIHBvcyA9IHZvaWQgMDtcbiAgICAgICAgICB2YXIgbm9kZSA9IHZvaWQgMDtcbiAgICAgICAgICB2YXIgdGhlSWQgPSBlbGUuZGF0YSgnaWQnKTtcbiAgICAgICAgICBjb3NlUmVzdWx0LmZvckVhY2goZnVuY3Rpb24gKHJlc3VsdCkge1xuICAgICAgICAgICAgaWYgKHRoZUlkIGluIHJlc3VsdCkge1xuICAgICAgICAgICAgICBwb3MgPSB7IHg6IHJlc3VsdFt0aGVJZF0uZ2V0UmVjdCgpLmdldENlbnRlclgoKSwgeTogcmVzdWx0W3RoZUlkXS5nZXRSZWN0KCkuZ2V0Q2VudGVyWSgpIH07XG4gICAgICAgICAgICAgIG5vZGUgPSByZXN1bHRbdGhlSWRdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIGlmIChvcHRpb25zLm5vZGVEaW1lbnNpb25zSW5jbHVkZUxhYmVscykge1xuICAgICAgICAgICAgaWYgKG5vZGUubGFiZWxXaWR0aCkge1xuICAgICAgICAgICAgICBpZiAobm9kZS5sYWJlbFBvc0hvcml6b250YWwgPT0gXCJsZWZ0XCIpIHtcbiAgICAgICAgICAgICAgICBwb3MueCArPSBub2RlLmxhYmVsV2lkdGggLyAyO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5vZGUubGFiZWxQb3NIb3Jpem9udGFsID09IFwicmlnaHRcIikge1xuICAgICAgICAgICAgICAgIHBvcy54IC09IG5vZGUubGFiZWxXaWR0aCAvIDI7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChub2RlLmxhYmVsSGVpZ2h0KSB7XG4gICAgICAgICAgICAgIGlmIChub2RlLmxhYmVsUG9zVmVydGljYWwgPT0gXCJ0b3BcIikge1xuICAgICAgICAgICAgICAgIHBvcy55ICs9IG5vZGUubGFiZWxIZWlnaHQgLyAyO1xuICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5vZGUubGFiZWxQb3NWZXJ0aWNhbCA9PSBcImJvdHRvbVwiKSB7XG4gICAgICAgICAgICAgICAgcG9zLnkgLT0gbm9kZS5sYWJlbEhlaWdodCAvIDI7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHg6IHBvcy54LFxuICAgICAgICAgICAgeTogcG9zLnlcbiAgICAgICA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SBjaGVjayAoPT09KS5cbiAgICBpZiAoXG4gICAgICBkaWZmID09PSBzaGFsbG93T2JqRGlmZiB8fFxuICAgICAgaXNEaWZmQXRLZXkoanNvbjEsIGpzb24yLCBkaWZmLCAnZWxlbWVudHMnKVxuICAgICkge1xuICAgICAgcGF0Y2hFbGVtZW50cyhcbiAgICAgICAgY3ksXG4gICAgICAgIGF0S2V5KGpzb24xLCAnZWxlbWVudHMnKSxcbiAgICAgICAgYXRLZXkoanNvbjIsICdlbGVtZW50cycpLFxuICAgICAgICB0b0pzb24sXG4gICAgICAgIGdldCxcbiAgICAgICAgZm9yRWFjaCxcbiAgICAgICAgZGlmZlxuICAgICAgKTtcbiAgICB9XG5cbiAgICBpZiAoaXNEaWZmQXRLZXkoanNvbjEsIGpzb24yLCBkaWZmLCAnc3R5bGVzaGVldCcpKSB7XG4gICAgICBwYXRjaFN0eWxlKFxuICAgICAgICBjeSxcbiAgICAgICAgYXRLZXkoanNvbjEsICdzdHlsZXNoZWV0JyksXG4gICAgICAgIGF0S2V5KGpzb24yLCAnc3R5bGVzaGVldCcpLFxuICAgICAgICB0b0pzb25cbiAgICAgICk7XG4gICAgfVxuXG4gICAgW1xuICAgICAgLy8gc2ltcGxlIGtleXMgdGhhdCBjYW4gYmUgcGF0Y2hlZCBkaXJlY3RseSAoa2V5IHNhbWUgYXMgZm4gbmFtZSlcbiAgICAgICd6b29tJyxcbiAgICAgICdtaW5ab29tJyxcbiAgICAgICdtYXhab29tJyxcbiAgICAgICd6b29taW5nRW5hYmxlZCcsXG4gICAgICAndXNlclpvb21pbmdFbmFibGVkJyxcbiAgICAgICdwYW4nLFxuICAgICAgJ3Bhbm5pbmdFbmFibGVkJyxcbiAgICAgICd1c2VyUGFubmluZ0VuYWJsZWQnLFxuICAgICAgJ2JveFNlbGVjdGlvbkVuYWJsZWQnLFxuICAgICAgJ2F1dG91bmdyYWJpZnknLFxuICAgICAgJ2F1dG9sb2NrJyxcbiAgICAgICdhdXRvdW5zZWxl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ZvckVhY2goZnVuY3Rpb24gKHZhbHVlLCBrZXkpIHtcbiAgICAgIGlmICh2YWx1ZSA9PSAwKSB7XG4gICAgICAgIHF1ZXVlLnB1c2goa2V5KTtcbiAgICAgICAgaWYgKCFmaXhlZE5vZGVzKSB7XG4gICAgICAgICAgaWYgKGRpcmVjdGlvbiA9PSBcImhvcml6b250YWxcIikge1xuICAgICAgICAgICAgcG9zaXRpb25NYXAuc2V0KGtleSwgbm9kZUluZGV4ZXMuaGFzKGtleSkgPyB4Q29vcmRzW25vZGVJbmRleGVzLmdldChrZXkpXSA6IGR1bW15UG9zaXRpb25zLmdldChrZXkpKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcG9zaXRpb25NYXAuc2V0KGtleSwgbm9kZUluZGV4ZXMuaGFzKGtleSkgPyB5Q29vcmRzW25vZGVJbmRleGVzLmdldChrZXkpXSA6IGR1bW15UG9zaXRpb25zLmdldChrZXkpKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHBvc2l0aW9uTWFwLnNldChrZXksIE51bWJlci5ORUdBVElWRV9JTkZJTklUWSk7XG4gICAgICB9XG4gICAgICBpZiAoZml4ZWROb2Rlcykge1xuICAgICAgICBwYXN0TWFwLnNldChrZXksIG5ldyBTZXQoW2tleV0pKTtcbiAgICAgIH1cbiAgICB9KTtcblxuICAgIC8vIGFsaWduIHNvdXJjZXMgb2YgZWFjaCBjb21wb25lbnQgaW4gZW5mb3JjZW1lbnQgcGhhc2VcbiAgICBpZiAoZml4ZWROb2Rlcykge1xuICAgICAgY29tcG9uZW50U291cmNlcy5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQpIHtcbiAgICAgICAgdmFyIGZpeGVkSWRzID0gW107XG4gICAgICAgIGNvbXBvbmVudC5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICBpZiAoZml4ZWROb2Rlcy5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgZml4ZWRJZHMucHVzaChub2RlSWQpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGlmIChmaXhlZElkcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgdmFyIHBvc2l0aW9uID0gMDtcbiAgICAgICAgICBmaXhlZElkcy5mb3JFYWNoKGZ1bmN0aW9uIChmaXhlZElkKSB7XG4gICAgICAgICAgICBpZiAoZGlyZWN0aW9uID09IFwiaG9yaXpvbnRhbFwiKSB7XG4gICAgICAgICAgICAgIHBvc2l0aW9uTWFwLnNldChmaXhlZElkLCBub2RlSW5kZXhlcy5oYXMoZml4ZWRJZCkgPyB4Q29vcmRzW25vZGVJbmRleGVzLmdldChmaXhlZElkKV0gOiBkdW1teVBvc2l0aW9ucy5nZXQoZml4ZWRJZCkpO1xuICAgICAgICAgICAgICBwb3NpdGlvbiArPSBwb3NpdGlvbk1hcC5nZXQoZml4ZWRJZCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBwb3NpdGlvbk1hcC5zZXQoZml4ZWRJZCwgbm9kZUluZGV4ZXMuaGFzKGZpeGVkSWQpID8geUNvb3Jkc1tub2RlSW5kZXhlcy5nZXQoZml4ZWRJZCldIDogZHVtbXlQb3NpdGlvbnMuZ2V0KGZpeGVkSWQpKTtcbiAgICAgICAgICAgICAgcG9zaXRpb24gKz0gcG9zaXRpb25NYXAuZ2V0KGZpeGVkSWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICAgIHBvc2l0aW9uID0gcG9zaXRpb24gLyBmaXhlZElkcy5sZW5ndGg7XG4gICAgICAgICAgY29tcG9uZW50LmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgaWYgKCFmaXhlZE5vZGVzLmhhcyhub2RlSWQpKSB7XG4gICAgICAgICAgICAgIHBvc2l0aW9uTWFwLnNldChub2RlSWQsIHBvc2l0aW9uK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XJhdG9yRXJyb3IyID0gdHJ1ZTtcbiAgICAgICAgICAgIF9pdGVyYXRvckVycm9yMiA9IGVycjtcbiAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgaWYgKCFfaXRlcmF0b3JOb3JtYWxDb21wbGV0aW9uMiAmJiBfaXRlcmF0b3IyLnJldHVybikge1xuICAgICAgICAgICAgICAgIF9pdGVyYXRvcjIucmV0dXJuKCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgIGlmIChfZGlkSXRlcmF0b3JFcnJvcjIpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBfaXRlcmF0b3JFcnJvcjI7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoIWlzRml4ZWRDb21wb25lbnQpIHtcbiAgICAgICAgICAgIHZhciBpc0V4aXN0ID0gZmFsc2U7XG4gICAgICAgICAgICB2YXIgZXhpc3RBdCA9IHZvaWQgMDtcbiAgICAgICAgICAgIF9jb21wb25lbnRzLmZvckVhY2goZnVuY3Rpb24gKGNvbXBvbmVudCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudC5oYXMoW10uY29uY2F0KF90b0NvbnN1bWFibGVBcnJheSh2YWx1ZSkpWzBdKSkge1xuICAgICAgICAgICAgICAgIGlzRXhpc3QgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGV4aXN0QXQgPSBpbmRleDtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBpZiAoIWlzRXhpc3QpIHtcbiAgICAgICAgICAgICAgX2NvbXBvbmVudHMucHVzaChuZXcgU2V0KHZhbHVlKSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YWx1ZS5mb3JFYWNoKGZ1bmN0aW9uI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tub2RlRGF0YS5wb3NpdGlvbi54LCBub2RlRGF0YS5wb3NpdGlvbi55XTtcbiAgICAgICAgc291cmNlTWF0cml4W2ldID0gW3hDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KG5vZGVEYXRhLm5vZGVJZCldLCB5Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlRGF0YS5ub2RlSWQpXV07XG4gICAgICB9KTtcbiAgICAgIHN0YW5kYXJkVHJhbnNmb3JtYXRpb24gPSB0cnVlO1xuICAgIH0gZWxzZSBpZiAoY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludCkge1xuICAgICAgKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgLy8gdGhlbiBjaGVjayBhbGlnbm1lbnQgY29uc3RyYWludFxuICAgICAgICB2YXIgY291bnQgPSAwO1xuICAgICAgICBpZiAoY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC52ZXJ0aWNhbCkge1xuICAgICAgICAgIHZhciB2ZXJ0aWNhbEFsaWduID0gY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludC52ZXJ0aWNhbDtcblxuICAgICAgICAgIHZhciBfbG9vcDIgPSBmdW5jdGlvbiBfbG9vcDIoX2k0KSB7XG4gICAgICAgICAgICB2YXIgYWxpZ25tZW50U2V0ID0gbmV3IFNldCgpO1xuICAgICAgICAgICAgdmVydGljYWxBbGlnbltfaTRdLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICBhbGlnbm1lbnRTZXQuYWRkKG5vZGVJZCk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHZhciBpbnRlcnNlY3Rpb24gPSBuZXcgU2V0KFtdLmNvbmNhdChfdG9Db25zdW1hYmxlQXJyYXkoYWxpZ25tZW50U2V0KSkuZmlsdGVyKGZ1bmN0aW9uICh4KSB7XG4gICAgICAgICAgICAgIHJldHVybiBmaXhlZE5vZGVzLmhhcyh4KTtcbiAgICAgICAgICAg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1KSB7XG4gICAgICAgICAgICB2YXIgYWxpZ25tZW50U2V0ID0gbmV3IFNldCgpO1xuICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWduW19pNV0uZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICAgIGFsaWdubWVudFNldC5hZGQobm9kZUlkKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgdmFyIGludGVyc2VjdGlvbiA9IG5ldyBTZXQoW10uY29uY2F0KF90b0NvbnN1bWFibGVBcnJheShhbGlnbm1lbnRTZXQpKS5maWx0ZXIoZnVuY3Rpb24gKHgpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGZpeGVkTm9kZXMuaGFzKHgpO1xuICAgICAgICAgICAgfSkpO1xuICAgICAgICAgICAgdmFyIHlQb3MgPSB2b2lkIDA7XG4gICAgICAgICAgICBpZiAoaW50ZXJzZWN0aW9uLnNpemUgPiAwKSB5UG9zID0geENvb3Jkc1tub2RlSW5kZXhlcy5nZXQoaW50ZXJzZWN0aW9uLnZhbHVlcygpLm5leHQoKS52YWx1ZSldO2Vsc2UgeVBvcyA9IGNhbGN1bGF0ZUF2Z1Bvc2l0aW9uKGFsaWdubWVudFNldCkueTtcblxuICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWduW19pNV0uZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICAgIHRhcmdldE1hdHJpeFtjb3VudF0gPSBbeENvb3Jkc1tub2RlSW5kZXhlcy5nZXQobm9kZUlkKV0sIHlQb3NdO1xuICAgICAgICAgICAgICBzb3VyY2VNYXRyaXhbY291bnRdID0gW3hDb29yZHNbbm9kZUluZGV4ZXMuZ2V0KG5vZGVJZCldLCB5Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXV07XG4gICAgICAgICAgICAgIGNvdW50Kys7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgZm9yICh2YXI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9yaXpvbnRhbC5zZXQobm9kZUlkLCBbYWRqYWNlbnRdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoIXN1YkdyYXBoT25Ib3Jpem9udGFsLmhhcyhhZGphY2VudC5pZCkpIHtcbiAgICAgICAgICAgICAgICBzdWJHcmFwaE9uSG9yaXpvbnRhbC5zZXQoYWRqYWNlbnQuaWQsIFtdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBjb25zdHJhaW50c0lubGFyZ2VzdENvbXBvbmVudC5wdXNoKHsgbGVmdDogbm9kZUlkLCByaWdodDogYWRqYWNlbnQuaWQgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBpZiAoc3ViR3JhcGhPblZlcnRpY2FsLmhhcyhub2RlSWQpKSB7XG4gICAgICAgICAgICAgICAgc3ViR3JhcGhPblZlcnRpY2FsLmdldChub2RlSWQpLnB1c2goYWRqYWNlbnQpO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHN1YkdyYXBoT25WZXJ0aWNhbC5zZXQobm9kZUlkLCBbYWRqYWNlbnRdKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBpZiAoIXN1YkdyYXBoT25WZXJ0aWNhbC5oYXMoYWRqYWNlbnQuaWQpKSB7XG4gICAgICAgICAgICAgICAgc3ViR3JhcGhPblZlcnRpY2FsLnNldChhZGphY2VudC5pZCwgW10pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGNvbnN0cmFpbnRzSW5sYXJnZXN0Q29tcG9uZW50LnB1c2goeyB0b3A6IG5vZGVJZCwgYm90dG9tOiBhZGphY2VudC5pZCB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfSk7XG5cbiAgICAgICAgYXBwbHlSZWZsZWN0aW9uRm9yUmVsYXRpdmVQbGFjZW1lbnQoY29uc3RyYWludHNJbmxhcmdlc3RD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gU2V0KCk7XG4gICAgICAgIHZhciBmaXhlZE5vZGVzT25WZXJ0aWNhbCA9IG5ldyBTZXQoKTtcblxuICAgICAgICAvLyBmaWxsIG1hcHMgYW5kIHNldHMgICAgICBcbiAgICAgICAgZml4ZWROb2Rlcy5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICBmaXhlZE5vZGVzT25Ib3Jpem9udGFsLmFkZChub2RlSWQpO1xuICAgICAgICAgIGZpeGVkTm9kZXNPblZlcnRpY2FsLmFkZChub2RlSWQpO1xuICAgICAgICB9KTtcblxuICAgICAgICBpZiAoY29uc3RyYWludHMuYWxpZ25tZW50Q29uc3RyYWludCkge1xuICAgICAgICAgIGlmIChjb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50LnZlcnRpY2FsKSB7XG4gICAgICAgICAgICB2YXIgdmVydGljYWxBbGlnbm1lbnQgPSBjb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50LnZlcnRpY2FsO1xuXG4gICAgICAgICAgICB2YXIgX2xvb3A2ID0gZnVuY3Rpb24gX2xvb3A2KF9pMTEpIHtcbiAgICAgICAgICAgICAgZHVtbXlUb05vZGVGb3JWZXJ0aWNhbEFsaWdubWVudC5zZXQoXCJkdW1teVwiICsgX2kxMSwgW10pO1xuICAgICAgICAgICAgICB2ZXJ0aWNhbEFsaWdubWVudFtfaTExXS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgICBub2RlVG9EdW1teUZvclZlcnRpY2FsQWxpZ25tZW50LnNldChub2RlSWQsIFwiZHVtbXlcIiArIF9pMTEpO1xuICAgICAgICAgICAgICAgIGR1bW15VG9Ob2RlRm9yVmVydGljYWxBbGlnbm1lbnQuZ2V0KFwiZHVtbXlcIiArIF9pMTEpLnB1c2gobm9kZUlkKTtcbiAgICAgICAgICAgICAgICBpZiAoZml4ZWROb2Rlcy5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgICAgICAgZml4ZWROb2Rlc09uSG9yaXpvbnRhbC5hZGQoXCJkdW1teVwiICsgX2kxMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgZHVtbXlQb3NpdGlvbnNGb3JWZXJ0aWNhbEFsaWdubWVudC5zZXQoXCJkdW1teVwiICsgX2kxMSwgeENvb3Jkc1tub2RlSW5kZXhlcy5nZXQodmVydGljYWxBbGlnbm1lbnRbX2kxMV1bMF0pXSk7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBmb3IgKHZhciBfaTExID0gMDsgX2kxMSA8IHZlcnRpY2FsQWxpZ25tZW50Lmxlbmd0aDsgX2kxMSsrKSB7XG4gICAgICAgICAgICAgIF9sb29wNihfaTExKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgaWYgKGNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQuaG9yaXpvbnRhbCkge1xuICAgICAgICAgICAgdmFyIGhvcml6b250YWxBbGlnbm1lbnQgPSBjb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50Lmhvcml6b250YWw7XG5cbiAgICAgICAgICAgIHZhciBfbG9vcDcgPSBmdW5jdGlvbiBfbG9vcDcoX2kxMikge1xuICAgICAgICAgICAgICBkdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbnQuc2V0KFwiZHVtbXlcIiArIF9pMTIsIFtdKTtcbiAgICAgICAgICAgICAgaG9yaXpvbnRhbEFsaWdubWVudFtfaTEyXS5mb3JFYWNoKGZ1bmN0aW9uIChub2RlSWQpIHtcbiAgICAgICAgICAgICAgICBub2RlVG9EdW1teUZvckhvcml6b250YWxBbGlnbm1lbnQuc2V0KG5vZGVJZCwgXCJkdW1teVwiICsgX2kxMik7XG4gICAgICAgICAgICAgICAgZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChcImR1bW15XCIg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WN0aW9uXCJdID09IFwiaG9yaXpvbnRhbFwiKSB7XG4gICAgICAgICAgICAgIHNvdXJjZUlkID0gbm9kZVRvRHVtbXlGb3JWZXJ0aWNhbEFsaWdubWVudC5nZXQobm9kZUlkKSA/IG5vZGVUb0R1bW15Rm9yVmVydGljYWxBbGlnbm1lbnQuZ2V0KG5vZGVJZCkgOiBub2RlSWQ7XG4gICAgICAgICAgICAgIGlmIChub2RlVG9EdW1teUZvclZlcnRpY2FsQWxpZ25tZW50LmdldChhZGphY2VudC5pZCkpIHtcbiAgICAgICAgICAgICAgICB0YXJnZXROb2RlID0geyBpZDogbm9kZVRvRHVtbXlGb3JWZXJ0aWNhbEFsaWdubWVudC5nZXQoYWRqYWNlbnQuaWQpLCBnYXA6IGFkamFjZW50LmdhcCwgZGlyZWN0aW9uOiBhZGphY2VudC5kaXJlY3Rpb24gfTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0YXJnZXROb2RlID0gYWRqYWNlbnQ7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgaWYgKGRhZ09uSG9yaXpvbnRhbC5oYXMoc291cmNlSWQpKSB7XG4gICAgICAgICAgICAgICAgZGFnT25Ib3Jpem9udGFsLmdldChzb3VyY2VJZCkucHVzaCh0YXJnZXROb2RlKTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkYWdPbkhvcml6b250YWwuc2V0KHNvdXJjZUlkLCBbdGFyZ2V0Tm9kZV0pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGlmICghZGFnT25Ib3Jpem9udGFsLmhhcyh0YXJnZXROb2RlLmlkKSkge1xuICAgICAgICAgICAgICAgIGRhZ09uSG9yaXpvbnRhbC5zZXQodGFyZ2V0Tm9kZS5pZCwgW10pO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzb3VyY2VJZCA9IG5vZGV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XJlY3RlZE9uSG9yaXpvbnRhbCA9IGRhZ1RvVW5kaXJlY3RlZChkYWdPbkhvcml6b250YWwpO1xuICAgICAgICB2YXIgdW5kaXJlY3RlZE9uVmVydGljYWwgPSBkYWdUb1VuZGlyZWN0ZWQoZGFnT25WZXJ0aWNhbCk7XG4gICAgICAgIHZhciBjb21wb25lbnRzT25Ib3Jpem9udGFsID0gZmluZENvbXBvbmVudHModW5kaXJlY3RlZE9uSG9yaXpvbnRhbCk7XG4gICAgICAgIHZhciBjb21wb25lbnRzT25WZXJ0aWNhbCA9IGZpbmRDb21wb25lbnRzKHVuZGlyZWN0ZWRPblZlcnRpY2FsKTtcbiAgICAgICAgdmFyIHJldmVyc2VkRGFnT25Ib3Jpem9udGFsID0gZGFnVG9SZXZlcnNlZChkYWdPbkhvcml6b250YWwpO1xuICAgICAgICB2YXIgcmV2ZXJzZWREYWdPblZlcnRpY2FsID0gZGFnVG9SZXZlcnNlZChkYWdPblZlcnRpY2FsKTtcbiAgICAgICAgdmFyIGNvbXBvbmVudFNvdXJjZXNPbkhvcml6b250YWwgPSBbXTtcbiAgICAgICAgdmFyIGNvbXBvbmVudFNvdXJjZXNPblZlcnRpY2FsID0gW107XG5cbiAgICAgICAgY29tcG9uZW50c09uSG9yaXpvbnRhbC5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGluZGV4KSB7XG4gICAgICAgICAgY29tcG9uZW50U291cmNlc09uSG9yaXpvbnRhbFtpbmRleF0gPSBbXTtcbiAgICAgICAgICBjb21wb25lbnQuZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICBpZiAocmV2ZXJzZWREYWdPbkhvcml6b250YWwuZ2V0KG5vZGVJZCkubGVuZ3RoID09IDApIHtcbiAgICAgICAgICAgICAgY29tcG9uZW50U291cmNlc09uSG9yaXpvbnRhbFtpbmRleF0ucHVzaChub2RlSWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICBjb21wb25lbnRzT25WZXJ0aWNhbC5mb3JFYWNoKGZ1bmN0aW9uIChjb21wb25lbnQsIGluZGV4KSB7XG4gICAgICAgICAgY29tcG9uZW50U291cmNlc09uVmVydGljYWxbaW5kZXhdID0gW107XG4gICAgICAgICAgY29tcG9uZW50LmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgaWYgKHJldmVyc2VkRGFnT25WZXJ0aWNhbC5nZXQobm9kZUlkKS5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICBjb21wb25lbnRTb3VyY2VzT25WZXJ0aWNhbFtpbmRleF0ucHVzaChub2RlSWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcblxuICAgICAgICAvLyBjYWxjdWxhdGUgYXBwcm9wcmlhdGUgcG9zaXRpb25pbmcgZm9yIHN1YmdyYXBoc1xuICAgICAgICB2YXIgcG9zaXRpb25NYXBIb3Jpem9udGFsID0gZmluZEFwcHJvcHJpYXRlUG9zaXRpb25Gb3JSZWxhdGl2ZVBsYWNlbWVudChkYWdPbkhvcml6b250YWwsIFwiaG9yaXpvbnRhbFwiLCBmaXhlZE5vZGVzT25Ib3Jpem9udGFsLCBkdW1teVBvc2l0aW9uc0ZvclZlcnRpY2FsQWxpZ25tZW50LCBjb21wb25lbnRTb3VyY2VzT25Ib3Jpem9udGFsKTtcbiAgICAgICAgdmFyIHBvc2l0aW9uTWFwVmVydGljYWwgPSBmaW5kQXBwcm9wcmlhdGVQb3NpdGlvbkZvclJlbGF0aXZlUGxhY2VtZW50KGRhZ09uVmVydGljYWwsIFwidmVydGljYWxcIiwgZml4ZWROb2Rlc09uVmVydGljYWwsIGR1bW15UG9zaXRpb25zRm9ySG9yaXpvbnRhbEFsaWdubWVudCwgY29tcG9uZW50U291cmNlc09uVmVydGljYWwpO1xuXG4gICAgICAgIC8vIHVwZGF0ZSBwb3NpdGlvbnMgb2YgdG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GVwNi52YWx1ZTtcblxuICAgICAgICAgICAgX2xvb3A5KGtleSk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgICBfZGlkSXRlcmF0b3JFcnJvcjYgPSB0cnVlO1xuICAgICAgICAgIF9pdGVyYXRvckVycm9yNiA9IGVycjtcbiAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgaWYgKCFfaXRlcmF0b3JOb3JtYWxDb21wbGV0aW9uNiAmJiBfaXRlcmF0b3I2LnJldHVybikge1xuICAgICAgICAgICAgICBfaXRlcmF0b3I2LnJldHVybigpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICBpZiAoX2RpZEl0ZXJhdG9yRXJyb3I2KSB7XG4gICAgICAgICAgICAgIHRocm93IF9pdGVyYXRvckVycm9yNjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgX2xvb3AxMCA9IGZ1bmN0aW9uIF9sb29wMTAoa2V5KSB7XG4gICAgICAgICAgaWYgKGR1bW15VG9Ob2RlRm9ySG9yaXpvbnRhbEFsaWdubWVudC5nZXQoa2V5KSkge1xuICAgICAgICAgICAgZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChrZXkpLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICB5Q29vcmRzW25vZGVJbmRleGVzLmdldChub2RlSWQpXSA9IHBvc2l0aW9uTWFwVmVydGljYWwuZ2V0KGtleSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgeUNvb3Jkc1tub2RlSW5kZXhlcy5nZXQoa2V5KV0gPSBwb3NpdGlvbk1hcFZlcnRpY2FsLmdldChrZXkpO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAg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B9XG4gICAgICB9XG4gICAgICBpZiAodGhpcy5jb25zdHJhaW50cy5hbGlnbm1lbnRDb25zdHJhaW50Lmhvcml6b250YWwpIHtcbiAgICAgICAgdmFyIGhvcml6b250YWxBbGlnbm1lbnQgPSB0aGlzLmNvbnN0cmFpbnRzLmFsaWdubWVudENvbnN0cmFpbnQuaG9yaXpvbnRhbDtcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBob3Jpem9udGFsQWxpZ25tZW50Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgdGhpcy5kdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbnQuc2V0KFwiZHVtbXlcIiArIGksIFtdKTtcbiAgICAgICAgICBob3Jpem9udGFsQWxpZ25tZW50W2ldLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgbm9kZVRvRHVtbXlGb3JIb3Jpem9udGFsQWxpZ25tZW50LnNldChub2RlSWQsIFwiZHVtbXlcIiArIGkpO1xuICAgICAgICAgICAgc2VsZi5kdW1teVRvTm9kZUZvckhvcml6b250YWxBbGlnbm1lbnQuZ2V0KFwiZHVtbXlcIiArIGkpLnB1c2gobm9kZUlkKTtcbiAgICAgICAgICAgIGlmIChzZWxmLmZpeGVkTm9kZVNldC5oYXMobm9kZUlkKSkge1xuICAgICAgICAgICAgICBzZWxmLmZpeGVkTm9kZXNPblZlcnRpY2FsLmFkZChcImR1bW15XCIgKyBpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIGlmIChDb1NFQ29uc3RhbnRzLlJFTEFYX01PVkVNRU5UX09OX0NPTlNUUkFJTlRTKSB7XG5cbiAgICAgIHRoaXMuc2h1ZmZsZSA9IGZ1bmN0aW9uIChhcnJheSkge1xuICAgICAgICB2YXIgaiwgeCwgaTtcbiAgICAgICAgZm9yIChpID0gYXJyYXkubGVuZ3RoIC0gMTsgaS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4gICAgICAgICAgICBxdWV1ZS5wdXNoKGN1cnJlbnROb2RlKTtcbiAgICAgICAgICAgIHZpc2l0ZWQuYWRkKGN1cnJlbnROb2RlKTtcbiAgICAgICAgICAgIGNvbXBvbmVudHNbY291bnRdLnB1c2goY3VycmVudE5vZGUpO1xuXG4gICAgICAgICAgICB3aGlsZSAocXVldWUubGVuZ3RoICE9IDApIHtcbiAgICAgICAgICAgICAgY3VycmVudE5vZGUgPSBxdWV1ZS5zaGlmdCgpO1xuICAgICAgICAgICAgICBpZiAoZml4ZWROb2Rlcy5oYXMoY3VycmVudE5vZGUpKSB7XG4gICAgICAgICAgICAgICAgaXNGaXhlZFtjb3VudF0gPSB0cnVlO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHZhciBuZWlnaGJvcnMgPSBncmFwaC5nZXQoY3VycmVudE5vZGUpO1xuICAgICAgICAgICAgICBuZWlnaGJvcnMuZm9yRWFjaChmdW5jdGlvbiAobmVpZ2hib3IpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXZpc2l0ZWQuaGFzKG5laWdoYm9yKSkge1xuICAgICAgICAgICAgICAgICAgcXVldWUucHVzaChuZWlnaGJvcik7XG4gICAgICAgICAgICAgICAgICB2aXNpdGVkLmFkZChuZWlnaGJvcik7XG4gICAgICAgICAgICAgICAgICBjb21wb25lbnRzW2NvdW50XS5wdXNoKG5laWdoYm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY291bnQrKztcbiAgICAgICAgICB9XG4gICAgICAgIH0pO1xuXG4gICAgICAgIHJldHVybiB7IGNvbXBvbmVudHM6IGNvbXBvbmVudHMsIGlzRml4ZWQ6IGlzRml4ZWQgfTtcbiAgICAgIH07XG5cbiAgICAgIHZhciByZXN1bHRPbkhvcml6b250YWwgPSBjb25zdHJ1Y3RDb21wb25lbnRzKHN1YkdyYXBoT25Ib3Jpem9udGFsLCBzZWxmLm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NlbWVudFg7XG4gICAgICAgICAgfVxuICAgICAgICAgIHNlbGYubm9kZVRvUmVsYXRpdmVDb25zdHJhaW50TWFwSG9yaXpvbnRhbC5nZXQobm9kZUlkKS5mb3JFYWNoKGZ1bmN0aW9uIChjb25zdHJhaW50KSB7XG4gICAgICAgICAgICBpZiAoY29uc3RyYWludC5yaWdodCkge1xuICAgICAgICAgICAgICB2YXIgZGlmZiA9IHNlbGYubm9kZVRvVGVtcFBvc2l0aW9uTWFwSG9yaXpvbnRhbC5nZXQoY29uc3RyYWludC5yaWdodCkgLSBzZWxmLm5vZGVUb1RlbXBQb3NpdGlvbk1hcEhvcml6b250YWwuZ2V0KG5vZGVJZCkgLSBkaXNwbGFjZW1lbnQ7XG4gICAgICAgICAgICAgIGlmIChkaWZmIDwgY29uc3RyYWludC5nYXApIHtcbiAgICAgICAgICAgICAgICBkaXNwbGFjZW1lbnQgLT0gY29uc3RyYWludC5nYXAgLSBkaWZmO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgZGlmZiA9IHNlbGYubm9kZVRvVGVtcFBvc2l0aW9uTWFwSG9yaXpvbnRhbC5nZXQobm9kZUlkKSAtIHNlbGYubm9kZVRvVGVtcFBvc2l0aW9uTWFwSG9yaXpvbnRhbC5nZXQoY29uc3RyYWludC5sZWZ0KSArIGRpc3BsYWNlbWVudDtcbiAgICAgICAgICAgICAgaWYgKGRpZmYgPCBjb25zdHJhaW50LmdhcCkge1xuICAgICAgICAgICAgICAgIGRpc3BsYWNlbWVudCArPSBjb25zdHJhaW50LmdhcCAtIGRpZmY7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgICBzZWxmLm5vZGVUb1RlbXBQb3NpdGlvbk1hcEhvcml6b250YWwuc2V0KG5vZGVJZCwgc2VsZi5ub2RlVG9UZW1wUG9zaXRpb25NYXBIb3Jpem9udGFsLmdldChub2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IGorKykge1xuICAgICAgICAgICAgaWYgKHRoaXMuZHVtbXlUb05vZGVGb3JWZXJ0aWNhbEFsaWdubWVudC5oYXMoY29tcG9uZW50W2pdKSkge1xuICAgICAgICAgICAgICB0aGlzLmR1bW15VG9Ob2RlRm9yVmVydGljYWxBbGlnbm1lbnQuZ2V0KGNvbXBvbmVudFtqXSkuZm9yRWFjaChmdW5jdGlvbiAobm9kZUlkKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pZFRvTm9kZU1hcC5nZXQobm9kZUlkKS5kaXNwbGFjZW1lbnRYID0gYXZlcmFnZURpc3BsYWNlbWVudDtcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB0aGlzLmlkVG9Ob2RlTWFwLmdldChjb21wb25lbnRbal0pLmRpc3BsYWNlbWVudFggPSBhdmVyYWdlRGlzcGxhY2VtZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMuY29tcG9uZW50c09uVmVydGljYWwubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgdmFyIGNvbXBvbmVudCA9IHRoaXMuY29tcG9uZW50c09uVmVydGljYWxbaV07XG4gICAgICAgIGlmICh0aGlzLmZpeGVkQ29tcG9uZW50c09uVmVydGljYWxbaV0pIHtcbiAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGNvbXBvbmVudC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgaWYgKHRoaXMuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50Lmhhcyhjb21wb25lbnRbal0pKSB7XG4gICAgICAgICAgICAgIHRoaXMuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChjb21wb25lbnRbal0pLmZvckVhY2goZnVuY3Rpb24gKG5vZGVJZCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaWRUb05vZGVNYXAuZ2V0KG5vZGVJZCkuZGlzcGxhY2VtZW50WSA9IDA7XG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5pZFRvTm9kZU1hcC5nZXQoY29tcG9uZW50W2pdKS5kaXNwbGFjZW1lbnRZID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIHN1bSA9IDA7XG4gICAgICAgICAgdmFyIGNvdW50ID0gMDtcbiAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGNvbXBvbmVudC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgaWYgKHRoaXMuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50Lmhhcyhjb21wb25lbnRbal0pKSB7XG4gICAgICAgICAgICAgIHZhciBhY3R1YWxOb2RlcyA9IHRoaXMuZHVtbXlUb05vZGVGb3JIb3Jpem9udGFsQWxpZ25tZW50LmdldChjb21wb25lbnRbal0pO1xuICAgICAgICAgICAgICBzdW0gKz0gYWN0dWFsTm9kZXMubGVuZ3RoICogdGhpcy5pZFRvTm9kZU1hcC5nZXQoYWN0dWFsTm9kZXNbMF0pLmRpc3BsYWNlbWVudFk7XG4gICAgICAgICAgICAgIGNvdW50ICs9IGFjdHVhbE5vZGVzLmxlbmd0aDtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHN1bSArPSB0aGlzLmlkVG9Ob2RlTWFwLmdldChjb21wb25lbnRbal0pLmRpc3BsYWNlbWVudFk7XG4gICAgICAgICAgICAgIGNvdW50Kys7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICAgIHZhciBhdmVyYWdlRGlzcGxhY2VtZW50ID0gc3VtIC8gY291bnQ7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBjb21wb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Ii5jb25jYXQoaXRlbVsyXSwgXCIge1wiKTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5lZWRMYXllcikge1xuICAgICAgICBjb250ZW50ICs9IFwiQGxheWVyXCIuY29uY2F0KGl0ZW1bNV0ubGVuZ3RoID4gMCA/IFwiIFwiLmNvbmNhdChpdGVtWzVdKSA6IFwiXCIsIFwiIHtcIik7XG4gICAgICB9XG5cbiAgICAgIGNvbnRlbnQgKz0gY3NzV2l0aE1hcHBpbmdUb1N0cmluZyhpdGVtKTtcblxuICAgICAgaWYgKG5lZWRMYXllcikge1xuICAgICAgICBjb250ZW50ICs9IFwifVwiO1xuICAgICAgfVxuXG4gICAgICBpZiAoaXRlbVsyXSkge1xuICAgICAgICBjb250ZW50ICs9IFwifVwiO1xuICAgICAgfVxuXG4gICAgICBpZiAoaXRlbVs0XSkge1xuICAgICAgICBjb250ZW50ICs9IFwifVwiO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gY29udGVudDtcbiAgICB9KS5qb2luKFwiXCIpO1xuICB9OyAvLyBpbXBvcnQgYSBsaXN0IG9mIG1vZHVsZXMgaW50byB0aGUgbGlzdFxuXG5cbiAgbGlzdC5pID0gZnVuY3Rpb24gaShtb2R1bGVzLCBtZWRpYSwgZGVkdXBlLCBzdXBwb3J0cywgbGF5ZXIpIHtcbiAgICBpZiAodHlwZW9mIG1vZHVsZXMgPT09IFwic3RyaW5nXCIpIHtcbiAgICAgIG1vZHVsZXMgPSBbW251bGwsIG1vZHVsZXMsIHVuZGVmaW5lZF1dO1xuICAgIH1cblxuICAgIHZhciBhbHJlYWR5SW1wb3J0ZWRNb2R1bGVzID0ge307XG5cbiAgICBpZiAoZGVkdXBlKSB7XG4gICAgICBmb3IgKHZhciBrID0gMDsgayA8IHRoaXMubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgdmFyIGlkID0gdGhpc1trXVswXTtcblxuICAgICAgICBpZiAoaWQgIT0gbnVsbCkge1xuICAgICAgICAgIGFscmVhZHlJ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YmEgPSAncmdiW2FdP1xcXFwoKCcgKyBudW1iZXIgKyAnWyVdPylcXFxccyosXFxcXHMqKCcgKyBudW1iZXIgKyAnWyVdPylcXFxccyosXFxcXHMqKCcgKyBudW1iZXIgKyAnWyVdPykoPzpcXFxccyosXFxcXHMqKCcgKyBudW1iZXIgKyAnKSk/XFxcXCknO1xudmFyIHJnYmFOb0JhY2tSZWZzID0gJ3JnYlthXT9cXFxcKCg/OicgKyBudW1iZXIgKyAnWyVdPylcXFxccyosXFxcXHMqKD86JyArIG51bWJlciArICdbJV0/KVxcXFxzKixcXFxccyooPzonICsgbnVtYmVyICsgJ1slXT8pKD86XFxcXHMqLFxcXFxzKig/OicgKyBudW1iZXIgKyAnKSk/XFxcXCknO1xudmFyIGhzbGEgPSAnaHNsW2FdP1xcXFwoKCcgKyBudW1iZXIgKyAnKVxcXFxzKixcXFxccyooJyArIG51bWJlciArICdbJV0pXFxcXHMqLFxcXFxzKignICsgbnVtYmVyICsgJ1slXSkoPzpcXFxccyosXFxcXHMqKCcgKyBudW1iZXIgKyAnKSk/XFxcXCknO1xudmFyIGhzbGFOb0JhY2tSZWZzID0gJ2hzbFthXT9cXFxcKCg/OicgKyBudW1iZXIgKyAnKVxcXFxzKixcXFxccyooPzonICsgbnVtYmVyICsgJ1slXSlcXFxccyosXFxcXHMqKD86JyArIG51bWJlciArICdbJV0pKD86XFxcXHMqLFxcXFxzKig/OicgKyBudW1iZXIgKyAnKSk/XFxcXCknO1xudmFyIGhleDMgPSAnXFxcXCNbMC05YS1mQS1GXXszfSc7XG52YXIgaGV4NiA9ICdcXFxcI1swLTlhLWZBLUZdezZ9JztcblxudmFyIGFzY2VuZGluZyA9IGZ1bmN0aW9uIGFzY2VuZGluZyhhLCBiKSB7XG4gIGlmIChhIDwgYikge1xuICAgIHJldHVybiAtMTtcbiAgfSBlbHNlIGlmIChhID4gYikge1xuICAgIHJldHVybiAxO1xuICB9IGVsc2Uge1xuICAgIHJldHVybiAwO1xuICB9XG59O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4gXCJicmVha1wiO1xuICAgICAgfVxuXG4gICAgICB2YXIgdndFZGdlcyA9IHYuY29ubmVjdGVkRWRnZXMoKS5maWx0ZXIoZnVuY3Rpb24gKGUpIHtcbiAgICAgICAgcmV0dXJuICghZGlyZWN0ZWQgfHwgZS5zb3VyY2UoKS5zYW1lKHYpKSAmJiBlZGdlcy5oYXMoZSk7XG4gICAgICB9KTtcblxuICAgICAgZm9yICh2YXIgX2kyID0gMDsgX2kyIDwgdndFZGdlcy5sZW5ndGg7IF9pMisrKSB7XG4gICAgICAgIHZhciBlID0gdndFZGdlc1tfaTJdO1xuICAgICAgICB2YXIgdyA9IGUuY29ubmVjdGVkTm9kZXMoKS5maWx0ZXIoZnVuY3Rpb24gKG4pIHtcbiAgICAgICAgICByZXR1cm4gIW4uc2FtZSh2KSAmJiBub2Rlcy5oYXMobik7XG4gICAgICAgIH0pO1xuICAgICAgICB2YXIgd0lkID0gdy5pZCgpO1xuXG4gICAgICAgIGlmICh3Lmxlbmd0aCAhPT0gMCAmJiAhVlt3SWRdKSB7XG4gICAgICAgICAgdyA9IHdbMF07XG4gICAgICAgICAgUS5wdXNoKHcpO1xuXG4gICAgICAgICAgaWYgKHBhcmFtcy5iZnMpIHtcbiAgICAgICAgICAgIFZbd0lkXSA9IHRydWU7XG4gICAgICAgICAgICBjb25uZWN0ZWROb2Rlcy5wdXNoKHcpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGNvbm5lY3RlZEJ5W3dJZF0gPSBlO1xuICAgICAgICAgIGlkMmRlcHRoW3dJZF0gPSBpZDJkZXB0aFt2SWRdICsgMTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG5cbiAgICB3aGlsZSAoUS5sZW5ndGggIT09IDApIHtcbiAgICAgIHZhciBfcmV0ID0gX2xvb3AoKTtcblxuICAgICAgaWYgKF9yZXQgPT09IFwiY29udGludWVcIikgY29udGludWU7XG4gICAgICBpZiAoX3JldCA9PT0gXCJicmVha1wiKSBicmVhaztcb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IHJldHVybiBnZXRJbmZvKGdldE5vZGVGcm9tVG8odG8pKS5kaXN0O1xuICAgIH07XG5cbiAgICB2YXIgcGF0aFRvID0gZnVuY3Rpb24gcGF0aFRvKHRvKSB7XG4gICAgICB2YXIgdGhpc1N0YXJ0ID0gYXJndW1lbnRzLmxlbmd0aCA+IDEgJiYgYXJndW1lbnRzWzFdICE9PSB1bmRlZmluZWQgPyBhcmd1bWVudHNbMV0gOiByb290O1xuICAgICAgdmFyIGVuZCA9IGdldE5vZGVGcm9tVG8odG8pO1xuICAgICAgdmFyIHBhdGggPSBbXTtcbiAgICAgIHZhciBub2RlID0gZW5kO1xuXG4gICAgICBmb3IgKDs7KSB7XG4gICAgICAgIGlmIChub2RlID09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gX3RoaXMuc3Bhd24oKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBfZ2V0SW5mbyA9IGdldEluZm8obm9kZSksXG4gICAgICAgICAgICBlZGdlID0gX2dldEluZm8uZWRnZSxcbiAgICAgICAgICAgIHByZWQgPSBfZ2V0SW5mby5wcmVkO1xuXG4gICAgICAgIHBhdGgudW5zaGlmdChub2RlWzBdKTtcblxuICAgICAgICBpZiAobm9kZS5zYW1lKHRoaXNTdGFydCkgJiYgcGF0aC5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoZWRnZSAhPSBudWxsKSB7XG4gICAgICAgICAgcGF0aC51bnNoaWZ0KGVkZ2UpO1xuICAgICAgICB9XG5cbiAgICAgICAgbm9kZSA9IHByZWQ7XG4gICAgICB9XG5cbiAgICAgIHJldHVybiBlbGVzLnNwYXduKHBhdGgpO1xuICAgIH07IC8vIEluaXRpYWxpemF0aW9ucyB7IGRpc3QsIHByZWQsIGVkZ2UgfVxuXG5cbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IG51bU5vZGVzOyBpKyspIHtcbiAgICAgIHZhciBub2RlID0gbm9k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0gW3N0YXJ0XTtcbiAgICAgICAgICAgICAgY3ljbGUucHVzaChnZXRJbmZvKHN0YXJ0KS5lZGdlKTtcbiAgICAgICAgICAgICAgdmFyIF9ub2RlID0gZ2V0SW5mbyhzdGFydCkucHJlZDtcblxuICAgICAgICAgICAgICB3aGlsZSAoY3ljbGUuaW5kZXhPZihfbm9kZSkgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgY3ljbGUucHVzaChfbm9kZSk7XG4gICAgICAgICAgICAgICAgY3ljbGUucHVzaChnZXRJbmZvKF9ub2RlKS5lZGdlKTtcbiAgICAgICAgICAgICAgICBfbm9kZSA9IGdldEluZm8oX25vZGUpLnByZWQ7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBjeWNsZSA9IGN5Y2xlLnNsaWNlKGN5Y2xlLmluZGV4T2YoX25vZGUpKTtcbiAgICAgICAgICAgICAgdmFyIHNtYWxsZXN0SWQgPSBjeWNsZVswXS5pZCgpO1xuICAgICAgICAgICAgICB2YXIgc21hbGxlc3RJbmRleCA9IDA7XG5cbiAgICAgICAgICAgICAgZm9yICh2YXIgYyA9IDI7IGMgPCBjeWNsZS5sZW5ndGg7IGMgKz0gMikge1xuICAgICAgICAgICAgICAgIGlmIChjeWNsZVtjXS5pZCgpIDwgc21hbGxlc3RJZCkge1xuICAgICAgICAgICAgICAgICAgc21hbGxlc3RJZCA9IGN5Y2xlW2NdLmlkKCk7XG4gICAgICAgICAgICAgICAgICBzbWFsbGVzdEluZGV4ID0gYztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBjeWNsZSA9IGN5Y2xlLnNsaWNlKHNtYWxsZXN0SW5kZXgpLmNvbmNhdChjeWNsZS5zbGljZSgwLCBzbWFsbGVzdEluZGV4KSk7XG4gICAgICAgICAgICAgIGN5Y2xlLnB1c2goY3ljbGVbMF0pO1xuICAgICAgICAgICAgICB2YXIgY3ljbGVJZCA9IGN5Y2xlLm1hcCh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OiB2ZWMueSAvIHZlY0Rpc3RcbiAgfTtcbiAgdCA9IHQgPT0gbnVsbCA/IDAgOiB0O1xuICBkID0gZCAhPSBudWxsID8gZCA6IHQgKiB2ZWNEaXN0O1xuICByZXR1cm4ge1xuICAgIHg6IHAwLnggKyBub3JtVmVjLnggKiBkLFxuICAgIHk6IHAwLnkgKyBub3JtVmVjLnkgKiBkXG4gIH07XG59O1xudmFyIGJvdW5kID0gZnVuY3Rpb24gYm91bmQobWluLCB2YWwsIG1heCkge1xuICByZXR1cm4gTWF0aC5tYXgobWluLCBNYXRoLm1pbihtYXgsIHZhbCkpO1xufTsgLy8gbWFrZXMgYSBmdWxsIGJiICh4MSwgeTEsIHgyLCB5MiwgdywgaCkgZnJvbSBpbXBsaWNpdCBwYXJhbXNcblxudmFyIG1ha2VCb3VuZGluZ0JveCA9IGZ1bmN0aW9uIG1ha2VCb3VuZGluZ0JveChiYikge1xuICBpZiAoYmIgPT0gbnVsbCkge1xuICAgIHJldHVybiB7XG4gICAgICB4MTogSW5maW5pdHksXG4gICAgICB5MTogSW5maW5pdHksXG4gICAgICB4MjogLUluZmluaXR5LFxuICAgICAgeTI6IC1JbmZpbml0eSxcbiAgICAgIHc6IDAsXG4gICAgICBoOiAwXG4gICAgfTtcbiAgfSBlbHNlIGlmIChiYi54MSAhPSBudWxsICYmIGJiLnkxICE9IG51bGwpIHtcbiAgICBpZiAoYmIueDIgIT0gbnVsbCAmJiBiYi55MiAhPSBudWxsICYmIGJiLngyID49IGJiLngxICYmIGJiLnkyID49IGJiLnkxKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICB4MTogYmIueDEsXG4gICAgICAgIHkxOiBiYi55MSxcbiAgICAgICAgeDI6IGJiLngyLFxuICAgICAgICB5MjogYmIueTIsXG4gICAgICAgIHc6IGJiLngyIC0gYmIueDEsXG4gICAgICAgIGg6IGJiLnkyIC0gYmIueTFcbiAgICAgIH07XG4gICAgfSBlbHNlIGlmIChiYi53ICE9IG51bGwgJi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2kgPSAwOyBfaSA8IFYubGVuZ3RoOyBfaSsrKSB7XG4gICAgICAgIHZhciBfdmlkID0gVltfaV0uaWQoKTtcblxuICAgICAgICBQW192aWRdID0gW107XG4gICAgICAgIGdbX3ZpZF0gPSAwO1xuICAgICAgICBkW192aWRdID0gSW5maW5pdHk7XG4gICAgICB9XG5cbiAgICAgIGdbc2lkXSA9IDE7IC8vIHNpZ21hXG5cbiAgICAgIGRbc2lkXSA9IDA7IC8vIGRpc3RhbmNlIHRvIHNcblxuICAgICAgUS5wdXNoKHNpZCk7XG5cbiAgICAgIHdoaWxlICghUS5lbXB0eSgpKSB7XG4gICAgICAgIHZhciBfdiA9IFEucG9wKCk7XG5cbiAgICAgICAgUy5wdXNoKF92KTtcblxuICAgICAgICBpZiAod2VpZ2h0ZWQpIHtcbiAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IEFbX3ZdLmxlbmd0aDsgaisrKSB7XG4gICAgICAgICAgICB2YXIgdyA9IEFbX3ZdW2pdO1xuICAgICAgICAgICAgdmFyIHZFbGUgPSBjeS5nZXRFbGVtZW50QnlJZChfdik7XG4gICAgICAgICAgICB2YXIgZWRnZSA9IHZvaWQgMDtcblxuICAgICAgICAgICAgaWYgKHZFbGUuZWRnZXNUbyh3KS5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgIGVkZ2UgPSB2RWxlLmVkZ2VzVG8odylbMF07XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBlZGdlID0gdy5lZGdlc1RvKHZFbGUpWzBdO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgZWRnZVdlaWdodCA9IHdlaWdodChlZGdlKTtcbiAgICAgICAgICAgIHcgPSB3LmlkKCk7XG5cbiAgICAgICAgICAgIGlmIChkW3ddID4gZFtfdl0gKyBlZGdlV2VpZ2h0KSB7XG4gICAgICAgICAgICAgIGRbd10gPSBkW192XSArIGVkZ2VXZWlnaHQ7XG5cbiAgICAgICAgICAgICAgaWYgKFEubm9kZXMuaW5kZXhPZih3KSA8IDApIHtcbiAgICAgICAgICAgICAgICAvL2lmIHcgaXMgbm90IGluIFFcbiAgICAgICAgICAgICAgICBRLnB1c2godyk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIHBvc2l0aW9uIGlmIHcgaXMgaW4gUVxuICAgICAgICAgICAgICAgIFEudXBkYXRlSXRlbSh3KTtcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIGdbd10gPSAwO1xuICAgICAgICAgICAgICBQW3ddID0gW107XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChkW3ddID09IGRbX3ZdICsgZWRnZVdlaWdodCkge1xuICAgICAgICAgICAgICBnW3ddID0gZ1t3XSArIGdbX3ZdO1xuICAgICAgICAgICAgICBQW3ddLnB1c2goX3YpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBmb3IgKHZhciBfaiA9IDA7IF9qIDwgQVtfdl0ubGVuZ3RoOyBfaisrKSB7XG4gICAgICAgICAgICB2YXIgX3cgPSBBW192XVtfal0uaWQoKTtcblxuICAgICAgICAgICAgaWYgKGRbX3ddID09IEluZmluaXR5KSB7XG4gICAgICAgICAgICAgIFEucHVzaChfdyk7XG4gICAgICAgICAgICAgIGRbX3ddID0gZFtfdl0gKyAxO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZFtfd10gPT0gZFtfdl0gKyAxKSB7XG4gICAgICAgICAgICAgIGdbX3ddID0gZ1tfd10gKyBnW192XTtcblxuICAgICAgICAgICAgICBQW193XS5wdXNoKF92KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgdmFyIGUgPSB7fTtcblxuICAgICAgZm9yICh2YXIgX2kyID0gMDsgX2kyIDwgVi5sZW5ndGg7IF9pMisrKSB7XG4gICAgICAgIGVbVltfaTJdLmlkKCldID0gMDtcbiAgICAgIH1cblxuICAgICAgd2hpbGUgKFMubGVuZ3RoID4gMCkge1xuICAgICAgICB2YXIgX3cyID0gUy5wb3AoKTtcblxuICAgICAgICBmb3IgKHZhciBfajIgPSAwOyBfajIgPCBQW193Ml0ubGVuZ3RoOyBfajIrKykge1xuICAgICAgICAgIHZhciBfdjIgPSBQW193Ml1bX2oyXTtcbiAgICAgICAgICBlW192Ml0gPSBlW192Ml0gKyBnW192Ml0gLyBnW193Ml0gKiAoMSArIGVbX3cyXSk7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoX3cyICE9IFZbc10uaWQoKSkge1xuICAgICAgICAgIEMuc2V0KF93MiwgQy5nZXQoX3cyKSArIGVbX3cyXSk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9O1xuXG4gICAgZm9yICh2YXIgcyA9IDA7IHMgPCBWLmxlbmd0aDsgcysrKSB7XG4gICAgICBfbG9vcChzKTtcbiAgICB9XG5cbiAgICB2YXIgcmV0ID0ge1xuICAgICAgYmV0d2Vlbm5lc3M6IGZ1bmN0aW9uIGJldHdlZW5uZXNzKG5vZGUpIHtcbiAgICAgICAgdmFyIGlkID0gY3kuY29sbGVjdGlvbihub2RlKS5pZCgpO1xuICAgICAgICByZXR1cm4gQy5nZXQoaWQpO1xuICAgICAgfSxcbiAgICAgIGJldHdlZW5uZXNzTm9ybWFsaXplZDogZnVuY3Rpb24gYmV0d2Vlbm5lc3NOb3JtYWxpemVkKG5vZGUpIHtcbiAgICAgICAgaWYgKG1heCA9PSAwKSB7XG4gICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgaWQgPSBjeS5jb2xsZWN0aW9uKG5vZGUpLmlkKCk7XG4gICAgICAgIHJldHVybiBDLmdldChpZCkgLyBtYXg7XG4gICAgICB9XG4gICAgfTsgLy8gYWxpYXNcblxuICAgIHJldC5iZXR3ZWVubmV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dXJyZW50Tm9kZSxcbiAgICAgICAgICAgICAgeTogb3RoZXJOb2RlSWQsXG4gICAgICAgICAgICAgIGVkZ2U6IGVkZ2VcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmICghKG90aGVyTm9kZUlkIGluIG5vZGVzKSkge1xuICAgICAgICAgICAgYmljb25uZWN0ZWRTZWFyY2gocm9vdCwgb3RoZXJOb2RlSWQsIGN1cnJlbnROb2RlKTtcbiAgICAgICAgICAgIG5vZGVzW2N1cnJlbnROb2RlXS5sb3cgPSBNYXRoLm1pbihub2Rlc1tjdXJyZW50Tm9kZV0ubG93LCBub2Rlc1tvdGhlck5vZGVJZF0ubG93KTtcblxuICAgICAgICAgICAgaWYgKG5vZGVzW2N1cnJlbnROb2RlXS5pZCA8PSBub2Rlc1tvdGhlck5vZGVJZF0ubG93KSB7XG4gICAgICAgICAgICAgIG5vZGVzW2N1cnJlbnROb2RlXS5jdXRWZXJ0ZXggPSB0cnVlO1xuICAgICAgICAgICAgICBidWlsZENvbXBvbmVudChjdXJyZW50Tm9kZSwgb3RoZXJOb2RlSWQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBub2Rlc1tjdXJyZW50Tm9kZV0ubG93ID0gTWF0aC5taW4obm9kZXNbY3VycmVudE5vZGVdLmxvdywgbm9kZXNbb3RoZXJOb2RlSWRdLmlkKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0pO1xuICAgIH1cbiAgfTtcblxuICBlbGVzLmZvckVhY2goZnVuY3Rpb24gKGVsZSkge1xuICAgIGlmIChlbGUuaXNOb2RlKCkpIHtcbiAgICAgIHZhciBub2RlSWQgPSBlbGUuaWQoKTtcblxuICAgICAgaWYgKCEobm9kZUlkIGluIG5vZGVzKSkge1xuICAgICAgICBlZGdlQ291bnQgPSAwO1xuICAgICAgICBiaWNvbm5lY3RlZFNlYXJjaChub2RlSWQsIG5vZGV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IHRoZSBzYW1lIG5hbWUgZG9lc24ndCBleGlzdFxuXG4gICAgICAgICAgICBpZiAocGF0aCAmJiBzaW5nbGUuX3ByaXZhdGVbcC5maWVsZF1bbmFtZV0gPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICByZXQgPSBnZXRfX2RlZmF1bHRbXCJkZWZhdWx0XCJdKHNpbmdsZS5fcHJpdmF0ZVtwLmZpZWxkXSwgcGF0aCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICByZXQgPSBzaW5nbGUuX3ByaXZhdGVbcC5maWVsZF1bbmFtZV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIHJldDsgLy8gLmRhdGEoJ2ZvbycsICdiYXInKVxuICAgICAgICB9IGVsc2UgaWYgKHAuYWxsb3dTZXR0aW5nICYmIHZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAvLyBzZXRcbiAgICAgICAgICB2YXIgdmFsaWQgPSAhcC5pbW11dGFibGVLZXlzW25hbWVdO1xuXG4gICAgICAgICAgaWYgKHZhbGlkKSB7XG4gICAgICAgICAgICB2YXIgY2hhbmdlID0gX2RlZmluZVByb3BlcnR5KHt9LCBuYW1lLCB2YWx1ZSk7XG5cbiAgICAgICAgICAgIHAuYmVmb3JlU2V0KHNlbGYsIGNoYW5nZSk7XG5cbiAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsID0gYWxsLmxlbmd0aDsgaSA8IGw7IGkrKykge1xuICAgICAgICAgICAgICB2YXIgZWxlID0gYWxsW2ldO1xuXG4gICAgICAgICAgICAgIGlmIChwLmNhblNldChlbGUpKSB7XG4gICAgICAgICAgICAgICAgaWYgKHBhdGggJiYgc2luZ2xlLl9wcml2YXRlW3AuZmllbGRdW25hbWVdID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgIHNldF9fZGVmYXVsdFtcImRlZmF1bHRcIl0oZWxlLl9wcml2YXRlW3AuZmllbGRdLCBwYXRoLCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGVsZS5fcHJpdmF0ZVtwLmZpZWxkXVtuYW1lXSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSAvLyB1cGRhdGUgbWFwcGVycyBpZiBhc2tlZFxuXG5cbiAgICAgICAgICAgIGlmIChwLnVwZGF0ZVN0eWxlKSB7XG4gICAgICAgICAgICAgIHNlbGYudXBkYXRlU3R5bGUoKTtcbiAgICAgICAgICAgIH0gLy8gY2FsbCBvblNldCBjYWxsYmFja1xuXG5cbiAgICAgICAgICAgIHAub25TZXQoc2VsZik7XG5cbiAgICAgICAgICAgIGlmIChwLnNldHRpbmdUcmlnZ2Vyc0V2ZW50KSB7XG4gICAgICAgICAgICAgIHNlbGZbcC50cmlnZ2VyRm5OYW1lXShwLnNldHRpbmdFdmVudCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9IC8vIC5kYXRhKHsgJ2Zvbyc6ICdiYXInIH0pXG5cbiAgICAgIH0gZWxzZSBpZiAocC5hbGxvd1NldHRpbmcgJiYgcGxhaW5PYmplY3QobmFtZSkpIHtcbiAgICAgICAgLy8gZXh0ZW5kXG4gICAgICAgIHZhciBvYmogPSBuYW1lO1xuICAgICAgICB2YXIgaywgdjtcbiAgICAgICAgdmFyIGtleXMgPSBPYmplY3Qua2V5cyhvYmopO1xuICAgICAgICBwLmJlZm9yZVNldChzZWxmLCBvYmopO1xuXG4gICAgICAgIGZvciAodmFyIF9pID0gMDsgX2kgPCBrZXlzLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgIGsgPSBrZXlzW19pXTtcbiAgICAgICAgICB2ID0gb2JqW2tdO1xuXG4gICAgICAgICAgdmFyIF92YWxpZCA9ICFwLmltbXV0YWJsZUtleXNba107XG5cbiAgICAgICAgICBpZiAoX3ZhbGlkKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGFsbC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgICB2YXIgX2VsZSA9IGFsbFtqXTtcblxuICAgICAgICAgICAgICBpZiAocC5jYW5TZXQoX2VsZSkpIHtcbiAgICAgICAgICAgICAgICBfZWxlLl9wcml2YXRlW3AuZmllbGRdW2tdID0gdjtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSAvLyB1cGRhdGUgbWFwcGVycyBpZiBhc2tlZFxuXG5cbiAgICAgICAgaWYgKHAudXBkYXRlU3R5bGUpIHtcbiAgICAgICAgICBzZWxmLnVwZGF0ZVN0eWxlKCk7XG4gICAgICAgIH0gLy8gY2FsbCBvblNldCBjYWxsYmFja1xuXG5cbiAgICAgICAgcC5vblNldChzZWxmKTtcblxuICAgICAgICBpZiAocC5zZXR0aW5nVHJpZ2dlcnNFdmVudCkge1xuICAgICAgICAgIHNlbGZbcC50cmlnZ2VyRm5OYW1lXShwLnNldHRpbmdFdmVudCk7XG4gICAgICAgIH0gLy8gLmRhdGEoZnVuY3Rpb24oKXsgLi4uIH0pXG5cbiAgICAgIH0gZWxzZSBpZiAocC5hbGxvd0JpbmRpbmcgJiYgZm4kNihuYW1lKSkge1xuICAgICAgICAvLyBiaW5kIHRvIGV2ZW50XG4gICAgICAgIHZhciBmbiA9IG5hbWU7XG4gICAgICAgIHNlbGYub24ocC5iaW5kaW5nRXZlbnQsIGZuKTsgLy8gLmRhdGEoKVxuICAgICAgfSBlbHNlIGlmIChwLmFsbG93R2V0dGluZyAmJiBuYW1lID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgLy8gZ2V0IHdob2xlIG9iamVjdFxuICAgICAgICB2YXIgX3JldDtcblxuICAgICAgICBpZiAoc2luZ2xlKSB7XG4gICAgICAgICAgcC5iZWZvcmVHZXQoc2luZ2xlKTtcbiAgICAgICA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suZmllbGQ7XG4gICAgICAgICAgcmV0dXJuICdbJyArIGNsZWFuKF9vcGVyYXRvcikgKyBfZmllbGQgKyAnXSc7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBUeXBlLkRBVEFfRVhJU1Q6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2ZpZWxkMiA9IGNoZWNrLmZpZWxkO1xuICAgICAgICAgIHJldHVybiAnWycgKyBfZmllbGQyICsgJ10nO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgVHlwZS5NRVRBX0NPTVBBUkU6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX29wZXJhdG9yMiA9IGNoZWNrLm9wZXJhdG9yLFxuICAgICAgICAgICAgICBfZmllbGQzID0gY2hlY2suZmllbGQ7XG4gICAgICAgICAgcmV0dXJuICdbWycgKyBfZmllbGQzICsgc3BhY2UoY2xlYW4oX29wZXJhdG9yMikpICsgY2xlYW5WYWwodmFsdWUpICsgJ11dJztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFR5cGUuU1RBVEU6XG4gICAgICAgIHtcbiAgICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBUeXBlLklEOlxuICAgICAgICB7XG4gICAgICAgICAgcmV0dXJuICcjJyArIHZhbHVlO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgVHlwZS5DTEFTUzpcbiAgICAgICAge1xuICAgICAgICAgIHJldHVybiAnLicgKyB2YWx1ZTtcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFR5cGUuUEFSRU5UOlxuICAgICAgY2FzZSBUeXBlLkNISUxEOlxuICAgICAgICB7XG4gICAgICAgICAgcmV0dXJuIHF1ZXJ5VG9TdHJpbmcoY2hlY2sucGFyZW50LCBzdWJqZWN0KSArIHNwYWNlKCc+JykgKyBxdWVyeVRvU3RyaW5nKGNoZWNrLmNoaWxkLCBzdWJqZWN0KTtcbiAgICAgICAgfVxuXG4gICAgICBjYXNl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yJDEoZGltLnkpID8gZGltLnkgOiAwXG4gICAgICB9O1xuICAgICAgc2lsZW50ID0gdmFsO1xuICAgIH0gZWxzZSBpZiAoc3RyaW5nKGRpbSkgJiYgbnVtYmVyJDEodmFsKSkge1xuICAgICAgZGVsdGEgPSB7XG4gICAgICAgIHg6IDAsXG4gICAgICAgIHk6IDBcbiAgICAgIH07XG4gICAgICBkZWx0YVtkaW1dID0gdmFsO1xuICAgIH1cblxuICAgIGlmIChkZWx0YSAhPSBudWxsKSB7XG4gICAgICB2YXIgY3kgPSB0aGlzLmN5KCk7XG4gICAgICBjeS5zdGFydEJhdGNoKCk7XG5cbiAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdGhpcy5sZW5ndGg7IGkrKykge1xuICAgICAgICB2YXIgZWxlID0gdGhpc1tpXTsgLy8gZXhjbHVkZSBhbnkgbm9kZSB0aGF0IGlzIGEgZGVzY2VuZGFudCBvZiB0aGUgY2FsbGluZyBjb2xsZWN0aW9uXG5cbiAgICAgICAgaWYgKGN5Lmhhc0NvbXBvdW5kTm9kZXMoKSAmJiBlbGUuaXNDaGlsZCgpICYmIGVsZS5hbmNlc3RvcnMoKS5hbnlTYW1lKHRoaXMpKSB7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgcG9zID0gZWxlLnBvc2l0aW9uKCk7XG4gICAgICAgIHZhciBuZXdQb3MgPSB7XG4gICAgICAgICAgeDogcG9zLnggKyBkZWx0YS54LFxuICAgICAgICAgIHk6IHBvcy55ICsgZGVsdGEueVxuICAgICAgICB9O1xuXG4gICAgICAgIGlmIChzaWxlbnQpIHtcbiAgICAgICAgICBlbGUuc2lsZW50UG9zaXRpb24obmV3UG9zKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBlbGUucG9zaXRpb24obmV3UG9zKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBjeS5lbmRCYXRjaCgpO1xuICAgIH1cblxuICAgIHJldH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gICAgICAgICAgaWYgKHZhbCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAvLyBzZXQgb25lIGRpbWVuc2lvblxuICAgICAgICAgICAgX2VsZTIucG9zaXRpb24oZGltLCB2YWwgKyBvcmlnaW5bZGltXSk7XG4gICAgICAgICAgfSBlbHNlIGlmIChwcG9zICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIC8vIHNldCB3aG9sZSBwb3NpdGlvblxuICAgICAgICAgICAgX2VsZTIucG9zaXRpb24oe1xuICAgICAgICAgICAgICB4OiBwcG9zLnggKyBvcmlnaW4ueCxcbiAgICAgICAgICAgICAgeTogcHBvcy55ICsgb3JpZ2luLnlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIHtcbiAgICAgICAgLy8gZ2V0dGluZ1xuICAgICAgICB2YXIgcG9zID0gZWxlLnBvc2l0aW9uKCk7XG5cbiAgICAgICAgdmFyIF9wYXJlbnQgPSBoYXNDb21wb3VuZE5vZGVzID8gZWxlLnBhcmVudCgpIDogbnVsbDtcblxuICAgICAgICB2YXIgX2hhc1BhcmVudCA9IF9wYXJlbnQgJiYgX3BhcmVudC5sZW5ndGggPiAwO1xuXG4gICAgICAgIHZhciBfcmVsYXRpdmVUb1BhcmVudCA9IF9oYXNQYXJlbnQ7XG5cbiAgICAgICAgaWYgKF9oYXNQYXJlbnQpIHtcbiAgICAgICAgICBfcGFyZW50ID0gX3BhcmVudFswXTtcbiAgICAgICAgfVxuXG4gICAgICAgIHZhciBfb3JpZ2luID0gX3JlbGF0aXZlVG9QYXJlbnQgPyBfcGFyZW50LnBvc2l0aW9uKCkgOiB7XG4gICAgICAgICAgeDogMCxcbiAgICAgICAgICB5OiAwXG4gICAgICAgIH07XG5cbiAgICAgICAgcHBvcyA9IHtcbiAgICAgICAgICB4OiBwb3MueCAtIF9vcmlnaW4ueCxcbiAgICAgICAgICB5OiBwb3MueSAtIF9vcml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gbHgyID0gbGFiZWxYICsgbHdfMjtcbiAgICAgIGx5MSA9IGxhYmVsWSAtIGxoXzI7XG4gICAgICBseTIgPSBsYWJlbFkgKyBsaF8yO1xuICAgIH0gZWxzZSB7XG4gICAgICBzd2l0Y2ggKGhhbGlnbi52YWx1ZSkge1xuICAgICAgICBjYXNlICdsZWZ0JzpcbiAgICAgICAgICBseDEgPSBsYWJlbFggLSBsdztcbiAgICAgICAgICBseDIgPSBsYWJlbFg7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnY2VudGVyJzpcbiAgICAgICAgICBseDEgPSBsYWJlbFggLSBsd18yO1xuICAgICAgICAgIGx4MiA9IGxhYmVsWCArIGx3XzI7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAncmlnaHQnOlxuICAgICAgICAgIGx4MSA9IGxhYmVsWDtcbiAgICAgICAgICBseDIgPSBsYWJlbFggKyBsdztcbiAgICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgICAgc3dpdGNoICh2YWxpZ24udmFsdWUpIHtcbiAgICAgICAgY2FzZSAndG9wJzpcbiAgICAgICAgICBseTEgPSBsYWJlbFkgLSBsaDtcbiAgICAgICAgICBseTIgPSBsYWJlbFk7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnY2VudGVyJzpcbiAgICAgICAgICBseTEgPSBsYWJlbFkgLSBsaF8yO1xuICAgICAgICAgIGx5MiA9IGxhYmVsWSArIGxoXzI7XG4gICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgY2FzZSAnYm90dG9tJzpcbiAgICAgICAgICBseTEgPSBsYWJlbFk7XG4gICAgICAgICAgbHkyID0gbGFiZWxZICsgbGg7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICB9XG4gICAgfSAvLyBzaGlmdCBieSBtYXJnaW4gYW5kIGV4cGFuZCBieSBvdXRsaW5lIGFuZCBib3JkZXJcblxuXG4gICAgbHgxICs9IG1hcmd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sdWUpIHtcbiAgICAgIHZhciB0aGV0YSA9IGlzQXV0b3JvdGF0ZSA/IHByZWZpeGVkUHJvcGVydHkoX3AucnN0eWxlLCAnbGFiZWxBbmdsZScsIHByZWZpeCkgOiByb3RhdGlvbi5wZlZhbHVlO1xuICAgICAgdmFyIGNvcyA9IE1hdGguY29zKHRoZXRhKTtcbiAgICAgIHZhciBzaW4gPSBNYXRoLnNpbih0aGV0YSk7IC8vIHJvdGF0aW9uIHBvaW50IChkZWZhdWx0IHZhbHVlIGZvciBjZW50ZXItY2VudGVyKVxuXG4gICAgICB2YXIgeG8gPSAobHgxICsgbHgyKSAvIDI7XG4gICAgICB2YXIgeW8gPSAobHkxICsgbHkyKSAvIDI7XG5cbiAgICAgIGlmICghaXNFZGdlKSB7XG4gICAgICAgIHN3aXRjaCAoaGFsaWduLnZhbHVlKSB7XG4gICAgICAgICAgY2FzZSAnbGVmdCc6XG4gICAgICAgICAgICB4byA9IGx4MjtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSAncmlnaHQnOlxuICAgICAgICAgICAgeG8gPSBseDE7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIHN3aXRjaCAodmFsaWduLnZhbHVlKSB7XG4gICAgICAgICAgY2FzZSAndG9wJzpcbiAgICAgICAgICAgIHlvID0gbHkyO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlICdib3R0b20nOlxuICAgICAgICAgICAgeW8gPSBseTE7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB2YXIgcm90YXRlID0gZnVuY3Rpb24gcm90YXRlKHgsIHkpIHtcbiAgICAgICAgeCA9IHggLSB4bztcbiAgICAgICAgeSA9IHkgLSB5bztcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICB4OiB4ICogY29zIC0geSAqIHNpbiArIHhvLFxuICAgICAgICAgIHk6IHggKiBzaW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ICAgIGV4MiA9IGhwdHNbMV0ueDtcbiAgICAgICAgICAgIGV5MiA9IGhwdHNbMV0ueTtcblxuICAgICAgICAgICAgaWYgKGV4MSA+IGV4Mikge1xuICAgICAgICAgICAgICB2YXIgdGVtcCA9IGV4MTtcbiAgICAgICAgICAgICAgZXgxID0gZXgyO1xuICAgICAgICAgICAgICBleDIgPSB0ZW1wO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoZXkxID4gZXkyKSB7XG4gICAgICAgICAgICAgIHZhciBfdGVtcCA9IGV5MTtcbiAgICAgICAgICAgICAgZXkxID0gZXkyO1xuICAgICAgICAgICAgICBleTIgPSBfdGVtcDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdXBkYXRlQm91bmRzKGJvdW5kcywgZXgxIC0gd0hhbGYsIGV5MSAtIHdIYWxmLCBleDIgKyB3SGFsZiwgZXkyICsgd0hhbGYpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChjdXJ2ZVN0eWxlID09PSAnYmV6aWVyJyB8fCBjdXJ2ZVN0eWxlID09PSAndW5idW5kbGVkLWJlemllcicgfHwgY3VydmVTdHlsZSA9PT0gJ3NlZ21lbnRzJyB8fCBjdXJ2ZVN0eWxlID09PSAndGF4aScpIHtcbiAgICAgICAgICB2YXIgcHRzO1xuXG4gICAgICAgICAgc3dpdGNoIChjdXJ2ZVN0eWxlKSB7XG4gICAgICAgICAgICBjYXNlICdiZXppZXInOlxuICAgICAgICAgICAgY2FzZSAndW5idW5kbGVkLWJlemllcic6XG4gICAgICAgICAgICAgIHB0cyA9IHJzdHlsZS5iZXppZXJQdHM7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdzZWdtZW50cyc6XG4gICAgICAgICAgICBjYXNlICd0YXhpJzpcbiAgICAgICAgICAgICAgcHRzID0gcnN0eWxlLmxpbmVQdHM7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAg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IGVhc2luZzogb3B0aW9ucy5hbmltYXRpb25FYXNpbmdcbiAgICAgICAgICB9KTtcbiAgICAgICAgICBsYXlvdXQuYW5pbWF0aW9ucy5wdXNoKGFuaSk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgbm9kZS5wb3NpdGlvbihuZXdQb3MpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChvcHRpb25zLmZpdCkge1xuICAgICAgICB2YXIgZml0QW5pID0gY3kuYW5pbWF0aW9uKHtcbiAgICAgICAgICBmaXQ6IHtcbiAgICAgICAgICAgIGJvdW5kaW5nQm94OiBsYXlvdXRFbGVzLmJvdW5kaW5nQm94QXQoZ2V0RmluYWxQb3MpLFxuICAgICAgICAgICAgcGFkZGluZzogb3B0aW9ucy5wYWRkaW5nXG4gICAgICAgICAgfSxcbiAgICAgICAgICBkdXJhdGlvbjogb3B0aW9ucy5hbmltYXRpb25EdXJhdGlvbixcbiAgICAgICAgICBlYXNpbmc6IG9wdGlvbnMuYW5pbWF0aW9uRWFzaW5nXG4gICAgICAgIH0pO1xuICAgICAgICBsYXlvdXQuYW5pbWF0aW9ucy5wdXNoKGZpdEFuaSk7XG4gICAgICB9IGVsc2UgaWYgKG9wdGlvbnMuem9vbSAhPT0gdW5kZWZpbmVkICYmIG9wdGlvbnMucGFuICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgdmFyIHpvb21QYW5BbmkgPSBjeS5hbmltYXRpb24oe1xuICAgICAgICAgIHpvb206IG9wdGlvbnMuem9vbSxcbiAgICAgICAgICBwYW46IG9wdGlvbnMucGFuLFxuICAgICAgICAgIGR1cmF0aW9uOiBvcHRpb25zLmFuaW1hdGlvbkR1cmF0aW9uLFxuICAgICAgICAgIGVhc2luZzogb3B0aW9ucy5hbmltYXRpb25FYXNpbmdcbiAgICAgICAgfSk7XG4gICAgICAgIGxheW91dC5hbmltYXRpb25zLnB1c2goem9vbVBhbkFuaSk7XG4gICAgICB9XG5cbiAgICAg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wgMCkge1xuICAgICAgICAgIHBlcmNlbnQgPSAwO1xuICAgICAgICB9IGVsc2UgaWYgKHBlcmNlbnQgPiAxKSB7XG4gICAgICAgICAgcGVyY2VudCA9IDE7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodHlwZS5jb2xvcikge1xuICAgICAgICAgIHZhciByMSA9IHByb3AudmFsdWVNaW5bMF07XG4gICAgICAgICAgdmFyIHIyID0gcHJvcC52YWx1ZU1heFswXTtcbiAgICAgICAgICB2YXIgZzEgPSBwcm9wLnZhbHVlTWluWzFdO1xuICAgICAgICAgIHZhciBnMiA9IHByb3AudmFsdWVNYXhbMV07XG4gICAgICAgICAgdmFyIGIxID0gcHJvcC52YWx1ZU1pblsyXTtcbiAgICAgICAgICB2YXIgYjIgPSBwcm9wLnZhbHVlTWF4WzJdO1xuICAgICAgICAgIHZhciBhMSA9IHByb3AudmFsdWVNaW5bM10gPT0gbnVsbCA/IDEgOiBwcm9wLnZhbHVlTWluWzNdO1xuICAgICAgICAgIHZhciBhMiA9IHByb3AudmFsdWVNYXhbM10gPT0gbnVsbCA/IDEgOiBwcm9wLnZhbHVlTWF4WzNdO1xuICAgICAgICAgIHZhciBjbHIgPSBbTWF0aC5yb3VuZChyMSArIChyMiAtIHIxKSAqIHBlcmNlbnQpLCBNYXRoLnJvdW5kKGcxICsgKGcyIC0gZzEpICogcGVyY2VudCksIE1hdGgucm91bmQoYjEgKyAoYjIgLSBiMSkgKiBwZXJjZW50KSwgTWF0aC5yb3VuZChhMSArIChhMiAtIGExKSAqIHBlcmNlbnQpXTtcbiAgICAgICAgICBmbGF0UHJvcCA9IHtcbiAgICAgICAgICAgIC8vIGNvbG91cnMgYXJlIHNpbXBsZSwgc28ganVzdCBjcmVhdGUgdGhlIGZsYXQgcHJvcGVydHkgaW5zdGVhZCBvZiBleHBlbnNpdmUgc3RyaW5nIHBhcnNpbmdcbiAgICAgICAgICAgIGJ5cGFzczogcHJvcC5ieXBhc3MsXG4gICAgICAgICAgICAv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XRSZW5kZXJlZFZhbHVlKHZhbCkgKyB1bml0cztcbiAgICAgICAgfTtcblxuICAgICAgICB2YXIgaXNBcnJheVZhbHVlID0gYXJyYXkodmFsdWUpO1xuICAgICAgICB2YXIgaGF2ZVVuaXRzID0gaXNBcnJheVZhbHVlID8gdW5pdHMuZXZlcnkoZnVuY3Rpb24gKHUpIHtcbiAgICAgICAgICByZXR1cm4gdSAhPSBudWxsO1xuICAgICAgICB9KSA6IHVuaXRzICE9IG51bGw7XG5cbiAgICAgICAgaWYgKGhhdmVVbml0cykge1xuICAgICAgICAgIGlmIChpc0FycmF5VmFsdWUpIHtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZS5tYXAoZnVuY3Rpb24gKHYsIGkpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGdldFZhbHVlU3RyaW5nV2l0aFVuaXRzKHYsIHVuaXRzW2ldKTtcbiAgICAgICAgICAgIH0pLmpvaW4oJyAnKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIGdldFZhbHVlU3RyaW5nV2l0aFVuaXRzKHZhbHVlLCB1bml0cyk7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGlmIChpc0FycmF5VmFsdWUpIHtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZS5tYXAoZnVuY3Rpb24gKHYpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIHN0cmluZyh2KSA/IHYgOiAnJyArIGdldFJlbmRlcmVkVmFsdWUodik7XG4gICAgICAgICAgICB9KS5qb2luKCcgJyk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAnJyArIGdldFJlbmRlcmVkVmFsdWUodmFsdWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSBlbHNlIGlmIChzdHJWYWx1ZSAhPSBudWxsKSB7XG4gICAgICAgIHJldHVybiBzdHJWYWx1ZTtcbiAgICAgIH1cbi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IHg6IDAsIHk6IDEwMCB9KVxuICAgICAgICAgIGlmICghdGhpcy5fcHJpdmF0ZS5wYW5uaW5nRW5hYmxlZCkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgZGltcyA9IGFyZ3NbMF07XG4gICAgICAgICAgeCA9IGRpbXMueDtcbiAgICAgICAgICB5ID0gZGltcy55O1xuXG4gICAgICAgICAgaWYgKG51bWJlciQxKHgpKSB7XG4gICAgICAgICAgICBwYW4ueCA9IHg7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKG51bWJlciQxKHkpKSB7XG4gICAgICAgICAgICBwYW4ueSA9IHk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdGhpcy5lbWl0KCdwYW4gdmlld3BvcnQnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDI6XG4gICAgICAgIC8vIC5wYW4oJ3gnLCAxMDApXG4gICAgICAgIGlmICghdGhpcy5fcHJpdmF0ZS5wYW5uaW5nRW5hYmxlZCkge1xuICAgICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgICB9XG5cbiAgICAgICAgZGltID0gYXJnc1swXTtcbiAgICAgICAgdmFsID0gYXJnc1sxXTtcblxuICAgICAgICBpZiAoKGRpbSA9PT0gJ3gnIHx8IGRpbSA9PT0gJ3knKSAmJiBudW1iZXIkMSh2YWwpKSB7XG4gICAgICAgICAgcGFuW2RpbV0gPSB2YWw7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmVtaXQoJ3BhbiB2aWV3cG9ydCcpO1xuICAgICAgICBicmVhaztcbiAgICAgIC8vIGludmFsaWRcbiAgICB9XG5cbiAgICB0aGlzLm5vdGlmeSgndmlld3BvcnQnKTtcbiAgICByZXR1cm4gdGhpczsgLy8gY2hhaW5pbmdcbiAgfSxcbiAgcGFuQnk6IGZ1bmN0aW9uIHBhbkJ5KGFyZzAsIGFyZzEpIHtcbiAgICB2YXIgYXJncyA9IGFyZ3VtZW50cztcbiAgICB2YXIgcGFuID0gdGhpcy5fcHJpdmF0ZS5wYW47XG4gICAgdmFyIGRpbSwgdmFsLCBkaW1zLCB4LCB5O1xuXG4gICAgaWYgKCF0aGlzLl9wcml2YXRlLnBhbm5pbmdFbmFibGVkKSB7XG4gICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBzd2l0Y2ggKGFyZ3MubGVuZ3RoKSB7XG4gICAgICBjYXNlIDE6XG4gICAgICAgIGlmIChwbGFpbk9iamVjdChhcmcwKSkge1xuICAgICAgICAgIC8vIC5wYW5CeSh7IHg6IDAsIHk6IDEwMCB9KVxuICAgICAgICAgIGRpbXMgPSBhcmdzWzBdO1xuICAgICAgICAgIHggPSBkaW1zLng7XG4gICAgICAgICAgeSA9IGRpbXMueTtcblxuICAgICAgICAgIGlmIChudW1iZXIkMSh4KSkge1xuICAgICAgICAgICAgcGFuLnggKz0geDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAobnVtYmVyJDEoeSkpIHtcbiAgICAgICAgICAgIHBhbi55ICs9IHk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdGhpcy5lbWl0KCdwYW4gdmlld3BvcnQnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBjYXNlIDI6XG4gICAgICAgIC8vIC5wYW5CeSgneCcsIDEwMClcbiAgICAgICAgZGltID0gYXJnMDtcbiAgICAgICAgdmFsID0gYXJnMTtcblxuICAgICAgICBpZiAoKGRpbSA9PT0gJ3gnIHx8IGRpbSA9PT0gJ3knKSAmJiBudW1iZXIkMSh2YWwpKSB7XG4gICAgICAgICAgcGFuW2RpbV0gKz0gdmFsO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5lbWl0KCdwYW4gdmlld3BvcnQnKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICAvLyBpbnZhbGlkXG4gICAgfVxuXG4gICAgdGhpc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gICAgem9vbSA9IHpvb20gPiB0aGlzLl9wcml2YXRlLm1heFpvb20gPyB0aGlzLl9wcml2YXRlLm1heFpvb20gOiB6b29tO1xuICAgICAgem9vbSA9IHpvb20gPCB0aGlzLl9wcml2YXRlLm1pblpvb20gPyB0aGlzLl9wcml2YXRlLm1pblpvb20gOiB6b29tO1xuICAgICAgdmFyIHBhbiA9IHtcbiAgICAgICAgLy8gbm93IHBhbiB0byBtaWRkbGVcbiAgICAgICAgeDogKHcgLSB6b29tICogKGJiLngxICsgYmIueDIpKSAvIDIsXG4gICAgICAgIHk6IChoIC0gem9vbSAqIChiYi55MSArIGJiLnkyKSkgLyAyXG4gICAgICB9O1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgem9vbTogem9vbSxcbiAgICAgICAgcGFuOiBwYW5cbiAgICAgIH07XG4gICAgfVxuXG4gICAgcmV0dXJuO1xuICB9LFxuICB6b29tUmFuZ2U6IGZ1bmN0aW9uIHpvb21SYW5nZShtaW4sIG1heCkge1xuICAgIHZhciBfcCA9IHRoaXMuX3ByaXZhdGU7XG5cbiAgICBpZiAobWF4ID09IG51bGwpIHtcbiAgICAgIHZhciBvcHRzID0gbWluO1xuICAgICAgbWluID0gb3B0cy5taW47XG4gICAgICBtYXggPSBvcHRzLm1heDtcbiAgICB9XG5cbiAgICBpZiAobnVtYmVyJDEobWluKSAmJiBudW1iZXIkMShtYXgpICYmIG1pbiA8PSBtYXgpIHtcbiAgICAgIF9wLm1pblpvb20gPSBtaW47XG4gICAgICBfcC5tYXhab29tID0gbWF4O1xuICAgIH0gZWxzZSBpZiAobnVtYmVyJDEobWluKSAmJiBtYXggPT09IHVuZGVmaW5lZCAmJiBtaW4gPD0gX3AubWF4Wm9vbSkge1xuICAgICAgX3AubWluWm9vbSA9IG1pbjtcbiAgICB9IGVsc2UgaWYgKG51bWJlciQxKG1heCkgJiYgbWluID09PSB1bmRlZmluZWQgJiYgbWF4ID49IF9wLm1pblpvb20pIHtcbiAgICAgIF9wLm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YWluT2JqZWN0KHBhcmFtcykpIHtcbiAgICAgIC8vIHRoZW4gem9vbSBhYm91dCBhIHBvaW50XG4gICAgICB6b29tID0gcGFyYW1zLmxldmVsO1xuXG4gICAgICBpZiAocGFyYW1zLnBvc2l0aW9uICE9IG51bGwpIHtcbiAgICAgICAgcG9zID0gbW9kZWxUb1JlbmRlcmVkUG9zaXRpb24ocGFyYW1zLnBvc2l0aW9uLCBjdXJyZW50Wm9vbSwgY3VycmVudFBhbik7XG4gICAgICB9IGVsc2UgaWYgKHBhcmFtcy5yZW5kZXJlZFBvc2l0aW9uICE9IG51bGwpIHtcbiAgICAgICAgcG9zID0gcGFyYW1zLnJlbmRlcmVkUG9zaXRpb247XG4gICAgICB9XG5cbiAgICAgIGlmIChwb3MgIT0gbnVsbCAmJiAhX3AucGFubmluZ0VuYWJsZWQpIHtcbiAgICAgICAgLy8gcGFubmluZyBkaXNhYmxlZFxuICAgICAgICBiYWlsID0gdHJ1ZTtcbiAgICAgIH1cbiAgICB9IC8vIGNyb3Agem9vbVxuXG5cbiAgICB6b29tID0gem9vbSA+IF9wLm1heFpvb20gPyBfcC5tYXhab29tIDogem9vbTtcbiAgICB6b29tID0gem9vbSA8IF9wLm1pblpvb20gPyBfcC5taW5ab29tIDogem9vbTsgLy8gY2FuJ3Qgem9vbSB3aXRoIGludmFsaWQgcGFyYW1zXG5cbiAgICBpZiAoYmFpbCB8fCAhbnVtYmVyJDEoem9vbSkgfHwgem9vbSA9PT0gY3VycmVudFpvb20gfHwgcG9zICE9IG51bGwgJiYgKCFudW1iZXIkMShwb3MueCkgfHwgIW51bWJlciQxKHBvcy55KSkpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGlmIChwb3MgIT0gbnVsbCkge1xuICAgICAgLy8gc2V0IHpvb20gYWJvdXQgcG9zaXRpb25cbiAgICAgIHZhciBwYW4xID0gY3VycmVudFBhbjtcbiAgICAgIHZhciB6b29tMSA9IGN1cnJlbnRab29tO1xuICAgICAgdmFyIHpvb20yID0gem9vbTtcbiAgICAgIHZhciBwYW4yID0ge1xuICAgICAgICB4OiAtem9vbTIgLyB6b29tMSAqIChwb3MueCAtIHBhbjEueCkgKyBwb3MueCxcbiAgICAgICAgeTogLXpvb20yIC8gem9vbTEgKiAocG9zLnkgLSBwYW4xLnkpICsgcG9zLnlcbiAgICAgIH07XG4gICAgICByZXR1cm4ge1xuICAgICAgICB6b29tZWQ6IHRydWUsXG4gICAgICAgIHBhbm5lZDogdHJ1ZSxcbiAgICAgICAgem9vbTogem9vbTIsXG4gICAgICAgIHBhbjogcGFuMlxuICAgICAgfTtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8ganVzdCBzZXQgdGhlIHpvb21cbiAgICAgIHJldHVybiB7XG4gICAgICAgIHpvb21lZDogdHJ1ZSxcbiAgICAgICAgcGFubmVkOiBmYWxzZSxcbiAgICAgICAgem9vbTogem9vbSxcbiAgICAgICAgcGFuOiBjdXJyZW50UGFuXG4gICAgICB9O1xuICAgIH1cbiAgfSxcbiAgem9vbTogZnVuY3Rpb24gem9vbShwYXJhbXMpIHtcbiAgICBpZiAocGFyYW1zID09PSB1bmRlZmluZWQpIHtcbiAgICAgIC8vIGdldFxuICAgICAgcmV0dXJuIHRoaXMuX3ByaXZhdGUuem9vbTtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gc2V0XG4gICAgICB2YXIgdnAgPSB0aGlzLmdldFpvb21lZFZpZXdwb3J0KHBhcmFtcyk7XG4gICAgICB2YXIgX3AgPSB0aGlzLl9wcml2YXRlO1xuXG4gICAgICBpZiAodnAgPT0gbnVsbCB8fCAhdnAuem9vbWVkKSB7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgICAgfVxuXG4gICAgICBfcC56b29tID0gdnAuem9vbTtcblxuICAgICAgaWYgKHZwLnBhbm5lZCkge1xuICAgICAgICBfcC5wYW4ueCA9IHZwLnBhbi54O1xuICAgICAgICBfcC5wYW4ueSA9IHZwLnBhbi55O1xuIC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IHJldHVybiBjeS5nZXRFbGVtZW50QnlJZChlbGUuaWQoKSk7XG4gICAgfTtcblxuICAgIGlmIChwbGFpbk9iamVjdChvYmopKSB7XG4gICAgICAvLyBzZXRcbiAgICAgIGN5LnN0YXJ0QmF0Y2goKTtcblxuICAgICAgaWYgKG9iai5lbGVtZW50cykge1xuICAgICAgICB2YXIgaWRJbkpzb24gPSB7fTtcblxuICAgICAgICB2YXIgdXBkYXRlRWxlcyA9IGZ1bmN0aW9uIHVwZGF0ZUVsZXMoanNvbnMsIGdyKSB7XG4gICAgICAgICAgdmFyIHRvQWRkID0gW107XG4gICAgICAgICAgdmFyIHRvTW9kID0gW107XG5cbiAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGpzb25zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIganNvbiA9IGpzb25zW2ldO1xuXG4gICAgICAgICAgICBpZiAoIWpzb24uZGF0YS5pZCkge1xuICAgICAgICAgICAgICB3YXJuKCdjeS5qc29uKCkgY2Fubm90IGhhbmRsZSBlbGVtZW50cyB3aXRob3V0IGFuIElEIGF0dHJpYnV0ZScpO1xuICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIGlkID0gJycgKyBqc29uLmRhdGEuaWQ7IC8vIGlkIG11c3QgYmUgc3RyaW5nXG5cbiAgICAgICAgICAgIHZhciBlbGUgPSBjeS5nZXRFbGVtZW50QnlJZChpZCk7XG4gICAgICAgICAgICBpZEluSnNvbltpZF0gPSB0cnVlO1xuXG4gICAgICAgICAgICBpZiAoZWxlLmxlbmd0aCAhPT0gMCkge1xuICAgICAgICAgICAgICAvLyBleGlzdGluZyBlbGVtZW50IHNob3VsZCBiZSB1cGRhdGVkXG4gICAgICAgICAgICAgIHRvTW9kLnB1c2goe1xuICAgICAgICAgICAgICAgIGVsZTogZWxlLFxuICAgICAgICAgICAgICAgIGpzb246IGpzb25cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAvLyBvdGhlcndpc2Ugc2hvdWxkIGJlIGFkZGVkXG4gICAgICAgICAgICAgIGlmIChncikge1xuICAgICAgICAgICAgICAgIGpzb24uZ3JvdXAgPSBncjtcbiAgICAgICAgICAgICAgICB0b0FkZC5wdXNoKGpzb24pO1xuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHRvQWRkLnB1c2goanNvbik7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjeS5hZGQodG9BZGQpO1xuXG4gICAgICAgICAgZm9yICh2YXIgX2kgPSAwOyBfaSA8IHRvTW9kLmxlbmd0aDsgX2krKykge1xuICAgICAgICAgICAgdmFyIF90b01vZCRfaSA9IHRvTW9kW19pXSxcbiAgICAgICAgICAgICAgICBfZWxlID0gX3RvTW9kJF9pLmVsZSxcbiAgICAgICAgICAgICAgICBfanNvbiA9IF90b01vZCRfaS5qc29uO1xuXG4gICAgICAgICAgICBfZWxlLmpzb24oX2pzb24pO1xuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoYXJyYXkob2JqLmVsZW1lbnRzKSkge1xuICAgICAgICAgIC8vIGVsZW1lbnRzOiBbXVxuICAgICAgICAgIHVwZGF0ZUVsZXMob2JqLmVsZW1lbnRzKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAvLyBlbGVtZW50czogeyBub2RlczogW10sIGVkZ2VzOiBbXSB9XG4gICAgICAgICAgdmFyIGdycyA9IFsnbm9kZXMnLCAnZWRnZXMnXTtcblxuICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZ3JzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICB2YXIgZ3IgPSBncnNbaV07XG4gICAgICAgICAgICB2YXIgZWxlbWVudHMgPSBvYmouZWxlbWVudHNbZ3JdO1xuXG4gICA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N0eWxlKSB7XG4gICAgICAgIGN5LnN0eWxlKG9iai5zdHlsZSk7XG4gICAgICB9XG5cbiAgICAgIGlmIChvYmouem9vbSAhPSBudWxsICYmIG9iai56b29tICE9PSBfcC56b29tKSB7XG4gICAgICAgIGN5Lnpvb20ob2JqLnpvb20pO1xuICAgICAgfVxuXG4gICAgICBpZiAob2JqLnBhbikge1xuICAgICAgICBpZiAob2JqLnBhbi54ICE9PSBfcC5wYW4ueCB8fCBvYmoucGFuLnkgIT09IF9wLnBhbi55KSB7XG4gICAgICAgICAgY3kucGFuKG9iai5wYW4pO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChvYmouZGF0YSkge1xuICAgICAgICBjeS5kYXRhKG9iai5kYXRhKTtcbiAgICAgIH1cblxuICAgICAgdmFyIGZpZWxkcyA9IFsnbWluWm9vbScsICdtYXhab29tJywgJ3pvb21pbmdFbmFibGVkJywgJ3VzZXJab29taW5nRW5hYmxlZCcsICdwYW5uaW5nRW5hYmxlZCcsICd1c2VyUGFubmluZ0VuYWJsZWQnLCAnYm94U2VsZWN0aW9uRW5hYmxlZCcsICdhdXRvbG9jaycsICdhdXRvdW5ncmFiaWZ5JywgJ2F1dG91bnNlbGVjdGlmeScsICdtdWx0aUNsaWNrRGVib3VuY2VUaW1lJ107XG5cbiAgICAgIGZvciAodmFyIF9pMiA9IDA7IF9pMiA8IGZpZWxkcy5sZW5ndGg7IF9pMisrKSB7XG4gICAgICAgIHZhciBmID0gZmllbGRzW19pMl07XG5cbiAgICAgICAgaWYgKG9ialtmXSAhPSBudWxsKSB7XG4gICAgICAgICAgY3lbZl0ob2JqW2ZdKTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBjeS5lbmRCYXRjaCgpO1xuICAgICAgcmV0dXJuIHRoaXM7IC8vIGNoYWluaW5nXG4gICAgfSBlbHNlIHtcbiAgICAgIC8vIGdldFxuICAgICAgdmFyIGZsYXQgPSAhIW9iajtcbiAgICAgIHZhciBqc29uID0ge307XG5cbiAgICAgIGlmIChmbGF0KSB7XG4gICAgICAgIGpzb24uZWxlbWVudHMgPSB0aGlzLmVsZW1lbnRzKCkubWFwKGZ1bmN0aW9uIChlbGUpIHtcbiAgICAgICAgICByZXR1cm4gZWxlLmpzb24oKTtcbiAgICAgICAgfSk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBqc29uLmVsZW1lbnRzID0ge307XG4gICAgICAgIGVsZXMuZm9yRWFjaChmdW5jdGlvbiAoZWxlKSB7XG4gICAgICAgICAgdmFyIGdyb3VwID0gZWxlLmdyb3VwKCk7XG5cbiAgICAgICAgICBpZiAoIWpzb24uZWxlbWVudHNbZ3JvdXBdKSB7XG4gICAgICAgICAgICBqc29uLmVsZW1lbnRzW2dyb3VwXSA9IFtdO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGpzb24uZWxlbWVudHNbZ3JvdXBdLnB1c2goZWxlLmpzb24oKSk7XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICBpZiAodGhpcy5fcHJpdmF0ZS5zdHlsZUVuYWJsZWQpIHtcbiAgICAgICAganNvbi5zdHlsZSA9IGN5LnN0eWxlKCkuanNvbigpO1xuICAgICAgfVxuXG4gICAgICBqc29uLmRhdGEgPSBjb3B5KGN5LmRhdGEoKSk7XG4gICAgICB2YXIgb3B0aW9ucyA9IF9wLm9wdGlvbnM7XG4gICAgICBqc29uLnpvb21pbmdFbmFibGVkID0gX3Auem9vbWluZ0VuYWJsZWQ7XG4gICAgICBqc29uLnVzZXJab29taW5nRW5hYmxlZCA9IF9wLnVzZXJab29taW5nRW5hYmxlZDtcbiAgICAgIGpzb24uem9vbSA9IF9wLnpvb207XG4gICAgICBqc29uLm1pblpvb20gPSBfcC5taW5ab29tO1xuICAgICAganNvbi5tYXhab29tID0gX3AubWF4Wm9vbTtcbiAgICAgIGpzb24ucGFubmluZ0VuYWJsZWQgPSBfcC5wYW5uaW5nRW5hYmxlZDtcbiAgICAgIGpzb24udXNlclB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MueTIgLSBjLnkxO1xuICAgIHRvdGFsQSArPSBjLncgKiBjLmg7XG4gIH1cblxuICBjb21wb25lbnRzLnNvcnQoZnVuY3Rpb24gKGMxLCBjMikge1xuICAgIHJldHVybiBjMi53ICogYzIuaCAtIGMxLncgKiBjMS5oO1xuICB9KTtcbiAgdmFyIHggPSAwO1xuICB2YXIgeSA9IDA7XG4gIHZhciB1c2VkVyA9IDA7XG4gIHZhciByb3dIID0gMDtcbiAgdmFyIG1heFJvd1cgPSBNYXRoLnNxcnQodG90YWxBKSAqIGxheW91dEluZm8uY2xpZW50V2lkdGggLyBsYXlvdXRJbmZvLmNsaWVudEhlaWdodDtcblxuICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbXBvbmVudHMubGVuZ3RoOyBpKyspIHtcbiAgICB2YXIgYyA9IGNvbXBvbmVudHNbaV07XG5cbiAgICBpZiAoIWMpIHtcbiAgICAgIGNvbnRpbnVlO1xuICAgIH1cblxuICAgIGZvciAodmFyIGogPSAwOyBqIDwgYy5sZW5ndGg7IGorKykge1xuICAgICAgdmFyIG4gPSBjW2pdO1xuXG4gICAgICBpZiAoIW4uaXNMb2NrZWQpIHtcbiAgICAgICAgbi5wb3NpdGlvblggKz0geCAtIGMueDE7XG4gICAgICAgIG4ucG9zaXRpb25ZICs9IHkgLSBjLnkxO1xuICAgICAgfVxuICAgIH1cblxuICAgIHggKz0gYy53ICsgb3B0aW9ucy5jb21wb25lbnRTcGFjaW5nO1xuICAgIHVzZWRXICs9IGMudyArIG9wdGlvbnMuY29tcG9uZW50U3BhY2luZztcbiAgICByb3dIID0gTWF0aC5tYXgocm93SCwgYy5oKTtcblxuICAgIGlmICh1c2VkVyA+IG1heFJvd1cpIHtcbiAgICAgIHkgKz0gcm93SCArIG9wdGlvbnMuY29tcG9uZW50U3BhY2luZztcbiAgICAgIHggPSAwO1xuICAgICAgdXNlZFcgPSAwO1xuICAgICAgcm93SCA9IDA7XG4gICAgfVxuICB9XG59O1xuXG52YXIgZGVm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sIGZ1bmN0aW9uIChlbGUpIHtcbiAgICAgIHJldHVybiB7XG4gICAgICAgIHg6IGJiLngxLFxuICAgICAgICB5OiBiYi55MVxuICAgICAgfTtcbiAgICB9KTtcbiAgfSBlbHNlIHtcbiAgICAvLyB3aWR0aC9oZWlnaHQgKiBzcGxpdHNeMiA9IGNlbGxzIHdoZXJlIHNwbGl0cyBpcyBudW1iZXIgb2YgdGltZXMgdG8gc3BsaXQgd2lkdGhcbiAgICB2YXIgY2VsbHMgPSBub2Rlcy5zaXplKCk7XG4gICAgdmFyIHNwbGl0cyA9IE1hdGguc3FydChjZWxscyAqIGJiLmggLyBiYi53KTtcbiAgICB2YXIgcm93cyA9IE1hdGgucm91bmQoc3BsaXRzKTtcbiAgICB2YXIgY29scyA9IE1hdGgucm91bmQoYmIudyAvIGJiLmggKiBzcGxpdHMpO1xuXG4gICAgdmFyIHNtYWxsID0gZnVuY3Rpb24gc21hbGwodmFsKSB7XG4gICAgICBpZiAodmFsID09IG51bGwpIHtcbiAgICAgICAgcmV0dXJuIE1hdGgubWluKHJvd3MsIGNvbHMpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgdmFyIG1pbiA9IE1hdGgubWluKHJvd3MsIGNvbHMpO1xuXG4gICAgICAgIGlmIChtaW4gPT0gcm93cykge1xuICAgICAgICAgIHJvd3MgPSB2YWw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29scyA9IHZhbDtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH07XG5cbiAgICB2YXIgbGFyZ2UgPSBmdW5jdGlvbiBsYXJnZSh2YWwpIHtcbiAgICAgIGlmICh2YWwgPT0gbnVsbCkge1xuICAgICAgICByZXR1cm4gTWF0aC5tYXgocm93cywgY29scyk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICB2YXIgbWF4ID0gTWF0aC5tYXgocm93cywgY29scyk7XG5cbiAgICAgICAgaWYgKG1heCA9PSByb3dzKSB7XG4gICAgICAgICAgcm93cyA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bCA9IDA7XG4gICAgICAgIHJvdysrO1xuICAgICAgfVxuICAgIH07IC8vIGdldCBhIGNhY2hlIG9mIGFsbCB0aGUgbWFudWFsIHBvc2l0aW9uc1xuXG5cbiAgICB2YXIgaWQybWFuUG9zID0ge307XG5cbiAgICBmb3IgKHZhciBfaSA9IDA7IF9pIDwgbm9kZXMubGVuZ3RoOyBfaSsrKSB7XG4gICAgICB2YXIgX25vZGUgPSBub2Rlc1tfaV07XG4gICAgICB2YXIgcmNQb3MgPSBvcHRpb25zLnBvc2l0aW9uKF9ub2RlKTtcblxuICAgICAgaWYgKHJjUG9zICYmIChyY1Bvcy5yb3cgIT09IHVuZGVmaW5lZCB8fCByY1Bvcy5jb2wgIT09IHVuZGVmaW5lZCkpIHtcbiAgICAgICAgLy8gbXVzdCBoYXZlIGF0IGxlYXN0IHJvdyBvciBjb2wgZGVmJ2RcbiAgICAgICAgdmFyIF9wb3MgPSB7XG4gICAgICAgICAgcm93OiByY1Bvcy5yb3csXG4gICAgICAgICAgY29sOiByY1Bvcy5jb2xcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoX3Bvcy5jb2wgPT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIC8vIGZpbmQgdW51c2VkIGNvbFxuICAgICAgICAgIF9wb3MuY29sID0gMDtcblxuICAgICAgICAgIHdoaWxlICh1c2VkKF9wb3Mucm93LCBfcG9zLmNvbCkpIHtcbiAgICAgICAgICAgIF9wb3MuY29sKys7XG4gICAgICAgICAgfVxuICAgICAgICB9IGVsc2UgaWYgKF9wb3Mucm93ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAvLyBmaW5kIHVudXNlZCByb3dcbiAgICAgICAgICBfcG9zLnJvdyA9IDA7XG5cbiAgICAgICAgICB3aGlsZSAodXNlZChfcG9zLnJvdywgX3Bvcy5jb2wpKSB7XG4gICAgICAgICAgICBfcG9zLnJvdysrO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGlkMm1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vdW50czogcGFpckluZm8uZGlyQ291bnRzLFxuICAgICAgICAgIGNhbGN1bGF0ZWRJbnRlcnNlY3Rpb246IHRydWUsXG4gICAgICAgICAgaGFzQmV6aWVyOiBwYWlySW5mby5oYXNCZXppZXIsXG4gICAgICAgICAgaGFzVW5idW5kbGVkOiBwYWlySW5mby5oYXNVbmJ1bmRsZWQsXG4gICAgICAgICAgZWxlczogcGFpckluZm8uZWxlcyxcbiAgICAgICAgICBzcmNQb3M6IHRndFBvcyxcbiAgICAgICAgICB0Z3RQb3M6IHNyY1BvcyxcbiAgICAgICAgICBzcmNXOiB0Z3RXLFxuICAgICAgICAgIHNyY0g6IHRndEgsXG4gICAgICAgICAgdGd0Vzogc3JjVyxcbiAgICAgICAgICB0Z3RIOiBzcmNILFxuICAgICAgICAgIHNyY0ludG46IHRndEludG4sXG4gICAgICAgICAgdGd0SW50bjogc3JjSW50bixcbiAgICAgICAgICBzcmNTaGFwZTogdGd0U2hhcGUsXG4gICAgICAgICAgdGd0U2hhcGU6IHNyY1NoYXBlLFxuICAgICAgICAgIHBvc1B0czoge1xuICAgICAgICAgICAgeDE6IHBvc1B0cy54MixcbiAgICAgICAgICAgIHkxOiBwb3NQdHMueTIsXG4gICAgICAgICAgICB4MjogcG9zUHRzLngxLFxuICAgICAgICAgICAgeTI6IHBvc1B0cy55MVxuICAgICAgICAgIH0sXG4gICAgICAgICAgaW50ZXJzZWN0aW9uUHRzOiB7XG4gICAgICAgICAgICB4MTogaW50ZXJzZWN0aW9uUHRzLngyLFxuICAgICAgICAgICAgeTE6IGludGVyc2VjdGlvblB0cy55MixcbiAgICAgICAgICAgIHgyOiBpbnRlcnNlY3Rpb25QdHMueDEsXG4gICAgICAgICAgICB5MjogaW50ZXJzZWN0aW9uUHRzLnkxXG4gICAgICAgICAgfSxcbiAgICAgICAgICB2ZWN0b3I6IHtcbiAgICAgICAgICAgIHg6IC12ZWN0b3IueCxcbiAgICAgICAgICAgIHk6IC12ZWN0b3IueVxuICAgIC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DA7IGogPCBfY3Auc2VnbWVudHMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgICAgdmFyIF9zZWcgPSBfY3Auc2VnbWVudHNbaXNTcmMgPyBqIDogX2NwLnNlZ21lbnRzLmxlbmd0aCAtIDEgLSBqXTtcbiAgICAgICAgICAgICAgdmFyIGxhc3RTZWcgPSBpID09PSBjcHMubGVuZ3RoIC0gMSAmJiBqID09PSBfY3Auc2VnbWVudHMubGVuZ3RoIC0gMTtcbiAgICAgICAgICAgICAgc3RhcnREaXN0ID0gdG90YWxEaXN0O1xuICAgICAgICAgICAgICB0b3RhbERpc3QgKz0gX3NlZy5sZW5ndGg7XG5cbiAgICAgICAgICAgICAgaWYgKHRvdGFsRGlzdCA+PSBvZmZzZXQgfHwgbGFzdFNlZykge1xuICAgICAgICAgICAgICAgIHNlbGVjdGVkID0ge1xuICAgICAgICAgICAgICAgICAgY3A6IF9jcCxcbiAgICAgICAgICAgICAgICAgIHNlZ21lbnQ6IF9zZWdcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChzZWxlY3RlZCkge1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB2YXIgY3AgPSBzZWxlY3RlZC5jcDtcbiAgICAgICAgICB2YXIgc2VnID0gc2VsZWN0ZWQuc2VnbWVudDtcbiAgICAgICAgICB2YXIgdFNlZ21lbnQgPSAob2Zmc2V0IC0gc3RhcnREaXN0KSAvIHNlZy5sZW5ndGg7XG4gICAgICAgICAgdmFyIHNlZ0R0ID0gc2VnLnQxIC0gc2VnLnQwO1xuICAgICAgICAgIHZhciB0ID0gaXNTcmMgPyBzZWcudDAgKyBzZWdEdCAqIHRTZWdtZW50IDogc2VnLnQxIC0gc2VnRHQgKiB0U2VnbWVudDtcbiAgICAgICAgICB0ID0gYm91bmQoMCwgdCwgMSk7XG4gICAgICAgICAgcCA9IHFiZXppZXJQdEF0KGNwLnAwLCBjcC5wMSwgY3AucDIsIHQpO1xuICAgICAgICAgIGFuZ2xlID0gYmV6aWVyQW5nbGUoY3AucDAsIGNwLnAxLCBjcC5wMiwgdCk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSAnc3RyYWlnaHQnOlxuICAgICAgY2FzZSAnc2VnbWVudHMnOlxuICAgICAgY2FzZSAnaGF5c3RhY2snOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGQgPSAwLFxuICAgICAgICAgICAgICBkaSxcbiAgICAgICAgICAgICAgZDA7XG4gICAgICAgICAgdmFyIHAwLCBwMTtcbiAgICAgICAgICB2YXIgbCA9IHJzLmFsbHB0cy5sZW5ndGg7XG5cbiAgICAgICAgICBmb3IgKHZhciBfaTIgPSAwOyBfaTIgKyAzIDwgbDsgX2kyICs9IDIpIHtcbiAgICAgICAgICAgIGlmIChpc1NyYykge1xuICAgICAgICAgICAgICBwMCA9IHtcbiAgICAgICAgICAgICAgICB4OiBycy5hbGxwdHNbX2kyXSxcbiAgICAgICAgICAgICAgICB5OiBycy5hbGxwdHNbX2kyICsgMV1cbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgcDEgPSB7XG4gICAgICAgICAgICAgICAgeDogcnMuYWxscHRzW19pMiArIDJdLFxuICAgICAgICAgICAgICAgIHk6IHJzLmFsbHB0c1tfaTIgKyAzXVxuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgcDAgPSB7XG4gICAgICAgICAgICAgICAgeDogcnMuYWxscHRzW2wgLSAyIC0gX2kyXSxcbiAgICAgICAgICAgICAgICB5OiBycy5hbGxwdHNbbCAtIDEgLSBfaTJdXG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgIHAxID0ge1xuICAgICAgICAgICAgICAgIHg6IHJzLmF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b24gKG11dG5zKSB7XG4gICAgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVuZGVmXG4gICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG11dG5zLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgIHZhciBtdXRuID0gbXV0bnNbaV07XG4gICAgICAgIHZhciByTm9kZXMgPSBtdXRuLnJlbW92ZWROb2RlcztcblxuICAgICAgICBpZiAock5vZGVzKSB7XG4gICAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCByTm9kZXMubGVuZ3RoOyBqKyspIHtcbiAgICAgICAgICAgIHZhciByTm9kZSA9IHJOb2Rlc1tqXTtcblxuICAgICAgICAgICAgaWYgKHJOb2RlID09PSByLmNvbnRhaW5lcikge1xuICAgICAgICAgICAgICByLmRlc3Ryb3koKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSk7XG5cbiAgICBpZiAoci5jb250YWluZXIucGFyZW50Tm9kZSkge1xuICAgICAgci5yZW1vdmVPYnNlcnZlci5vYnNlcnZlKHIuY29udGFpbmVyLnBhcmVudE5vZGUsIHtcbiAgICAgICAgY2hpbGRMaXN0OiB0cnVlXG4gICAgICB9KTtcbiAgICB9XG4gIH0gZWxzZSB7XG4gICAgci5yZWdpc3RlckJpbmRpbmcoci5jb250YWluZXIsICdET01Ob2RlUmVtb3ZlZCcsIGZ1bmN0aW9uIChlKSB7XG4gICAgICAvLyBlc2xpbnQtZGlzYWJsZS1saW5lIG5vLXVudXNlZC12YXJzXG4gICAgICByLmRlc3Ryb3koKTtcbiAgICB9KTtcbiAgfVxuXG4gIHZhciBvblJlc2l6ZSA9IGRlYm91bmNlX19kZWZhdWx0W1wiZGVmYXVsdFwiXShmdW5jdGlvbiAoKSB7XG4gICAgci5jeS5yZXNpemUoKTtcbiAgfSwgMTAwKTtcblxuICBpZiAoaGF2ZU11dGF0aW9uc0Fw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iAgICAgICAgICByZXR1cm47XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgdmFyIGVsZSA9IHIuaG92ZXJEYXRhLmRvd247XG5cbiAgICAgICAgICBpZiAoZWxlKSB7XG4gICAgICAgICAgICBlbGUuZW1pdCh7XG4gICAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICAgIHR5cGU6ICd0YXBob2xkJyxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBjeS5lbWl0KHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogJ3RhcGhvbGQnLFxuICAgICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9LCByLnRhcGhvbGREdXJhdGlvbik7XG4gICAgfTsgLy8gUmlnaHQgY2xpY2sgYnV0dG9uXG5cblxuICAgIGlmIChlLndoaWNoID09IDMpIHtcbiAgICAgIHIuaG92ZXJEYXRhLmN4dFN0YXJ0ZWQgPSB0cnVlO1xuICAgICAgdmFyIGN4dEV2dCA9IHtcbiAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgdHlwZTogJ2N4dHRhcHN0YXJ0JyxcbiAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChuZWFyKSB7XG4gICAg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gICAgc2VsZWN0ZWROb2Rlcy5mb3JFYWNoKHRyaWdnZXJHcmFiKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgci5yZWRyYXdIaW50KCdlbGVzJywgdHJ1ZSk7XG4gICAgICAgICAgICByLnJlZHJhd0hpbnQoJ2RyYWcnLCB0cnVlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByLmhvdmVyRGF0YS5kb3duID0gbmVhcjtcbiAgICAgICAgci5ob3ZlckRhdGEuZG93bnMgPSBuZWFycztcbiAgICAgICAgci5ob3ZlckRhdGEuZG93blRpbWUgPSBuZXcgRGF0ZSgpLmdldFRpbWUoKTtcbiAgICAgIH1cbiAgICAgIHRyaWdnZXJFdmVudHMobmVhciwgWydtb3VzZWRvd24nLCAndGFwc3RhcnQnLCAndm1vdXNlZG93biddLCBlLCB7XG4gICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgeTogcG9zWzFdXG4gICAgICB9KTtcblxuICAgICAgaWYgKG5lYXIgPT0gbnVsbCkge1xuICAgICAgICBzZWxlY3RbNF0gPSAxO1xuICAgICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB7XG4gICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICB9O1xuICAgICAgICByLnJlZHJhd0hpbnQoJ3NlbGVjdCcsIHRydWUpO1xuICAgICAgICByLnJlZHJhdygpO1xuICAgICAgfSBlbHNlIGlmIChuZWFyLnBhbm5hYmxlKCkpIHtcbiAgICAgICAgc2VsZWN0WzRdID0gMTsgLy8gZm9yIGZ1dHVyZSBwYW5cbiAgICAgIH1cblxuICAgICAgY2hlY2tGb3JUYXBob2xkKCk7XG4gICAgfSAvLyBJbml0aWFsaXplIHNlbGVjdGlvbiBib3ggY29vcmRpbmF0ZXNcblxuXG4gICAgc2VsZWN0WzBdID0gc2VsZWN0WzJdID0gcG9zWzBdO1xuICAgIHNlbGVjdFsxXSA9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AgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgdHlwZTogJ2N4dGRyYWcnLFxuICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKGRvd24pIHtcbiAgICAgICAgICBkb3duLmVtaXQoY3h0RXZ0KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICBjeS5lbWl0KGN4dEV2dCk7XG4gICAgICAgIH1cblxuICAgICAgICByLmhvdmVyRGF0YS5jeHREcmFnZ2VkID0gdHJ1ZTtcblxuICAgICAgICBpZiAoIXIuaG92ZXJEYXRhLmN4dE92ZXIgfHwgbmVhciAhPT0gci5ob3ZlckRhdGEuY3h0T3Zlcikge1xuICAgICAgICAgIGlmIChyLmhvdmVyRGF0YS5jeHRPdmVyKSB7XG4gICAgICAgICAgICByLmhvdmVyRGF0YS5jeHRPdmVyLmVtaXQoe1xuICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgICB0eXBlOiAnY3h0ZHJhZ291dCcsXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgeDogcG9zWzBdLFxuICAgICAgICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByLmhvdmVyRGF0YS5jeHRPdmVyID0gbmVhcjtcblxuICAgICAgICAgIGlmIChuZWFyKSB7XG4gICAgICAgICAgICBuZWFyLmVtaXQoe1xuICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgICB0eXBlOiAnY3h0ZHJhZ292ZXInLFxuICAgICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgICAgICB5OiBwb3NbMV1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IC8vIENoZWNrIGlmIHdlIGFyZSBkcmFnIHBhbm5pbmcgdGhlIGVudGlyZSBncmFwaFxuXG4gICAgfSBlbHNlIGlmIChyLmhvdmVyRGF0YS5kcmFnZ2luZykge1xuICAgICAgcHJldmVudERlZmF1bHQgPSB0cnVlO1xuXG4gICAgICBpZiAoY3kucGFubmluZ0VuYWJsZWQoKSAmJiBjeS51c2VyUGFubmluZ0VuYWJsZWQoKSkge1xuICAgICAgICB2YXIgZGVsdGFQO1xuXG4gICAgICAgIGlmIChyLmhvdmVyRGF0YS5qdXN0U3RhcnRlZFBhbikge1xuICAgICAgICAgIHZhciBtZFBvcyA9IHIuaG92ZXJEYXRhLm1kb3duUG9zO1xuICAgICAgICAgIGRlbHRhUCA9IHtcbiAgICAgICAgICAgIHg6IChwb3NbMF0gLSBtZFBvc1swXSkgKiB6b29tLFxuICAgICAgICAgICAgeTogKHBvc1sxXSAtIG1kUG9zWzFdKSAqIHpvb21cbiAgICAgICAgICB9O1xuICAgICAgICAgIHIuaG92ZXJEYXRhLmp1c3RTdGFydGVkUGFuID0gZmFsc2U7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgZGVsdGFQID0ge1xuICAgICAgICAgICAgeDogZGlzcFswXSAqIHpvb20sXG4gICAgICAgICAgICB5OiBkaXNwWzFdICogem9vbVxuICAgICAgICAgIH07XG4gICAgICAgIH1cblxuICAgICAgICBjeS5wYW5CeShkZWx0YVApO1xuICAgICAgICBjeS5lbWl0KCdkcmFncGFuJyk7XG4gICAgICAgIHIuaG92ZXJEYXRhLmRyYWdnZWQgPSB0cnVlO1xuICAgICAgfSAvLyBOZWVkcyByZXByb2plY3QgZHVlIHRvIHBhbiBjaGFuZ2luZyB2aWV3cG9ydFxuXG5cbiAgICAgIHBvcyA9IHIucHJvam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VkcmF3KCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRvd24gJiYgZG93bi5wYW5uYWJsZSgpICYmIGRvd24uYWN0aXZlKCkpIHtcbiAgICAgICAgICBkb3duLnVuYWN0aXZhdGUoKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0gZWxzZSB7XG4gICAgICBpZiAoZG93biAmJiBkb3duLnBhbm5hYmxlKCkgJiYgZG93bi5hY3RpdmUoKSkge1xuICAgICAgICBkb3duLnVuYWN0aXZhdGUoKTtcbiAgICAgIH1cblxuICAgICAgaWYgKCghZG93biB8fCAhZG93bi5ncmFiYmVkKCkpICYmIG5lYXIgIT0gbGFzdCkge1xuICAgICAgICBpZiAobGFzdCkge1xuICAgICAgICAgIHRyaWdnZXJFdmVudHMobGFzdCwgWydtb3VzZW91dCcsICd0YXBkcmFnb3V0J10sIGUsIHtcbiAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKG5lYXIpIHtcbiAgICAgICAgICB0cmlnZ2VyRXZlbnRzKG5lYXIsIFsnbW91c2VvdmVyJywgJ3RhcGRyYWdvdmVyJ10sIGUsIHtcbiAgICAgICAgICAgIHg6IHBvc1swXSxcbiAgICAgICAgICAgIHk6IHBvc1sxXVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgci5ob3ZlckRhdGEubGFzdCA9IG5lYXI7XG4gICAgICB9XG5cbiAgICAgIGlmIChkb3duKSB7XG4gICAgICAgIGlmIChpc092ZXJUaHJlc2hvbGREcmFnKSB7XG4gICAgICAgICAgLy8gdGhlbiB3ZSBjYW4gdGFrZSBhY3Rpb25cbiAgICAgICAgICBpZiAoY3kuYm94U2VsZWN0aW9uRW5hYmxlZCgpICYmIG11bHRTZWxLZXlEb3duKSB7XG4gICAgICAgICAgICAvLyB0aGVuIHNlbGVjdGlvbiBvdmVycmlkZXNcbiAgICAgICAgICAgIGlmIChkb3duICYmIGRvd24uZ3JhYmJlZCgpKSB7XG4gICAgICAgICAgICAgIGZyZWVEcmFnZ2VkRWxlbWVudHMoZHJhZ2dlZEVsZW1lbnRzKTtcbiAgICAgICAgICAgICAgZG93bi5lbWl0KCdmcmVlb24nKTtcbiAgICAgICAgICAgICAgZHJhZ2dlZEVsZW1lbnRzLmVtaXQoJ2ZyZWUnKTtcblxuICAgICAgICAgICAgICBpZiAoci5kcmFnRGF0YS5kaWREcmFnKSB7XG4gICAgICAgICAgICAgICAgZG93bi5lbWl0KCdkcmFnZnJlZW9uJyk7XG4gICAgICAgICAgICAgICAgZHJhZ2dlZEVsZW1lbnRzLmVtaXQoJ2RyYWdmcmVlJyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgZ29JbnRvQm94TW9kZSgpO1xuICAgICAgICAgIH0gZWxzZSBpZiAoZG93biAmJiBkb3duLmdyYWJiZWQoKSAmJiByLm5vZGVJc0RyYWdnYWJsZShkb3duKSkge1xuICAgICAgICAgICAgLy8gZHJhZyBub2RlXG4gICAgICAgICAgICB2YXIganVzdFN0YXJ0ZWREcmFnID0gIXIuZHJhZ0RhdGEuZGlkRHJhZztcblxuICAgICAgICAgICAgaWYgKGp1c3RTdGFydGVkRHJhZykge1xuICAgICAgICAgICAgICByLnJlZHJhd0hpbnQoJ2VsZXMnLCB0cnVlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgci5kcmFnRGF0YS5kaWREcmFnID0gdHJ1ZTsgLy8gaW5kaWNhdGUgdGhhdCB3ZSBhY3R1YWxseSBkaWQgZHJhZyB0aGUgbm9kZVxuICAgICAgICAgICAgLy8gbm93LCBhZGQgdGhlIGVsZW1lbnRzIHRvIHRoZSBkcmFnIGxheWVyIGlmIG5vdCBkb25lIGFscmVhZHlcblxuICAgICAgICAgICAgaWYgKCFyLmhvdmVyRGF0YS5kcmFnZ2luZ0VsZXMpIHtcbiAgICAgICAgICAgICAgYWRkTm9kZXNUb0RyYWcoZHJhZ2dlZEVsZW1lbnRzLCB7XG4gICAgICAgICAgICAgICAgaW5EcmFnTGF5ZXI6IHRydWVcbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciB0b3RhbFNoaWZ0ID0ge1xuICAgICAgICAgICAgICB4OiAwLFxuICAgICAgICAgICAgICB5OiAwXG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICBpZiAobnVtYmVyJDEoZGlzcFswXSkgJiYgbnVtYmVyJDEoZGlzcFsxXSkpIHtcbiAgICAgICAgICAgICAgdG90YWxTaGlmdC54ICs9IGRpc3BbMF07XG4gICAgICAgICAgICAgIHRvdGFsU2hpZnQueSArPSBkaXNwWzFdO1xuXG4gICAgICAgICAgICAgIGlmIChqdXN0U3RhcnRlZERyYWcpIHtcbiAgICAgICAgICAgICAgICB2YXIgZHJhZ0RlbHRhID0gci5ob3ZlckRhdGEuZHJhZ0RlbHRhO1xuXG4gICAgICAgICAgICAgICAgaWYgKGRyYWdEZWx0YSAmJiBudW1iZXIkMShkcmFnRGVsdGFbMF0pICYmIG51bWJlciQxKGRyYWdEZWx0YVsxXSkpIHtcbiAgICAgICAgICAgICAgICAgIHRvdGFsU2hpZnQueCArPSBkcmFnRGVsdGFbMF07XG4gICAgICAgICAgICAgICAgICB0b3RhbFNoaWZ0LnkgKz0gZHJhZ0RlbHRhWzFdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByLmhvdmVyRGF0YS5kcmFnZ2luZ0VsZXMgPSB0cnVlO1xuICAgICAgICAgICAgZHJhZ2dlZEVsZW1lbnRzLnNpbGVudFNoaWZ0KHRvdGFsU2hpZnQpLmVtaXQoJ3Bvc2l0aW9uIGRyYWcnKTtcbiAgICAgICAgICAgIHIucmVkcmF3SGludCgnZHJ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lmIChyLmhvdmVyRGF0YS5kcmFnZ2luZykgOyBlbHNlIGlmIChjeS5zZWxlY3Rpb25UeXBlKCkgPT09ICdhZGRpdGl2ZScgfHwgbXVsdFNlbEtleURvd24pIHtcbiAgICAgICAgICAgIGlmIChuZWFyLnNlbGVjdGVkKCkpIHtcbiAgICAgICAgICAgICAgbmVhci51bnNlbGVjdChbJ3RhcHVuc2VsZWN0J10pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgbmVhci5zZWxlY3QoWyd0YXBzZWxlY3QnXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGlmICghbXVsdFNlbEtleURvd24pIHtcbiAgICAgICAgICAgICAgY3kuJChpc1NlbGVjdGVkKS51bm1lcmdlKG5lYXIpLnVuc2VsZWN0KFsndGFwdW5zZWxlY3QnXSk7XG4gICAgICAgICAgICAgIG5lYXIuc2VsZWN0KFsndGFwc2VsZWN0J10pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHIucmVkcmF3SGludCgnZWxlcycsIHRydWUpO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChyLmhvdmVyRGF0YS5zZWxlY3RpbmcpIHtcbiAgICAgICAgdmFyIGJveCA9IGN5LmNvbGxlY3Rpb24oci5nZXRBbGxJbkJveChzZWxlY3RbMF0sIHNlbGVjdFsxXSwgc2VsZWN0WzJdLCBzZWxlY3RbM10pKTtcbiAgICAgICAgci5yZWRyYXdIaW50KCdzZWxlY3QnLCB0cnVlKTtcblxuICAgICAgICBpZiAoYm94Lmxlbmd0aCA+IDApIHtcbiAgICAgICAgICByLnJlZHJhd0hpbnQoJ2VsZXMnLCB0cnVlKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGN5LmVtaXQoe1xuICAgICAgICAgIHR5cGU6ICdib3hlbmQnLFxuICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gIC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sZW1lbnQobm93WzBdLCBub3dbMV0sIHRydWUsIHRydWUpO1xuICAgICAgICB2YXIgbmVhcjIgPSByLmZpbmROZWFyZXN0RWxlbWVudChub3dbMl0sIG5vd1szXSwgdHJ1ZSwgdHJ1ZSk7XG5cbiAgICAgICAgaWYgKG5lYXIxICYmIG5lYXIxLmlzTm9kZSgpKSB7XG4gICAgICAgICAgbmVhcjEuYWN0aXZhdGUoKS5lbWl0KHtcbiAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICB0eXBlOiAnY3h0dGFwc3RhcnQnLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgICByLnRvdWNoRGF0YS5zdGFydCA9IG5lYXIxO1xuICAgICAgICB9IGVsc2UgaWYgKG5lYXIyICYmIG5lYXIyLmlzTm9kZSgpKSB7XG4gICAgICAgICAgbmVhcjIuYWN0aXZhdGUoKS5lbWl0KHtcbiAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICB0eXBlOiAnY3h0dGFwc3RhcnQnLFxuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KTtcbiAgICAgICAgICByLnRvdWNoRGF0YS5zdGFydCA9IG5lYXIyO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIGN5LmVtaXQoe1xuICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgIHR5cGU6ICdjeHR0YXBzdGFydCcsXG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgICAgIHk6IG5vd1s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BuZWFycztcblxuICAgICAgICBpZiAoci5ub2RlSXNHcmFiYmFibGUobmVhcikpIHtcbiAgICAgICAgICB2YXIgZHJhZ2dlZEVsZXMgPSByLmRyYWdEYXRhLnRvdWNoRHJhZ0VsZXMgPSBjeS5jb2xsZWN0aW9uKCk7XG4gICAgICAgICAgdmFyIHNlbGVjdGVkTm9kZXMgPSBudWxsO1xuICAgICAgICAgIHIucmVkcmF3SGludCgnZWxlcycsIHRydWUpO1xuICAgICAgICAgIHIucmVkcmF3SGludCgnZHJhZycsIHRydWUpO1xuXG4gICAgICAgICAgaWYgKG5lYXIuc2VsZWN0ZWQoKSkge1xuICAgICAgICAgICAgLy8gcmVzZXQgZHJhZyBlbGVtZW50cywgc2luY2UgbmVhciB3aWxsIGJlIGFkZGVkIGFnYWluXG4gICAgICAgICAgICBzZWxlY3RlZE5vZGVzID0gY3kuJChmdW5jdGlvbiAoZWxlKSB7XG4gICAgICAgICAgICAgIHJldHVybiBlbGUuc2VsZWN0ZWQoKSAmJiByLm5vZGVJc0dyYWJiYWJsZShlbGUpO1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBhZGROb2Rlc1RvRHJhZyhzZWxlY3RlZE5vZGVzLCB7XG4gICAgICAgICAgICAgIGFkZFRvTGlzdDogZHJhZ2dlZEVsZXNcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBhZGROb2RlVG9EcmFnKG5lYXIsIHtcbiAgICAgICAgICAgICAgYWRkVG9MaXN0OiBkcmFnZ2VkRWxlc1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2V0R3JhYlRhcmdldChuZWFyKTtcblxuICAgICAgICAgIHZhciBtYWtlRXZlbnQgPSBmdW5jdGlvbiBtYWtlRXZlbnQodHlwZSkge1xuICAgICAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH07XG4gICAgICAgICAgfTtcblxuICAgICAgICAgIG5lYXIuZW1pdChtYWtlRXZlbnQoJ2dyYWJvbicpKTtcblxuICAgICAgICAgIGlmIChzZWxlY3RlZE5vZGVzKSB7XG4gICAgICAgICAgICBzZWxlY3RlZE5vZGVzLmZvckVhY2goZnVuY3Rpb24gKG4pIHtcbiAgICAgICAgICAgICAgbi5lbWl0KG1ha2VFdmVudCgnZ3JhYicpKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBuZWFyLmVtaXQobWFrZUV2ZW50KCdncmFiJykpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICB0cmlnZ2VyRXZlbnRzKG5lYXIsIFsndG91Y2hzdGFydCcsICd0YXBzdGFydCcsICd2bW91c2Vkb3duJ10sIGUsIHtcbiAgICAgICAgeDogbm93WzBdLFxuICAgICAgICB5OiBub3dbMV1cbiAgICAgIH0pO1xuXG4gICAgICBpZiAobmVhciA9PSBudWxsKSB7XG4gICAgICAgIHIuZGF0YS5iZ0FjdGl2ZVBvc2lzdGlvbiA9IHtcbiAgICAgICAgICB4OiBwb3NbMF0sXG4gICAgICAgICAgeTogcG9zWzFdXG4gICAgICAgIH07XG4gICAgICAgIHIucmVkcmF3SGludCgnc2VsZWN0JywgdHJ1ZSk7XG4gICAgICAgIHIucmVkcmF3KCk7XG4gICAgICB9IC8vIFRhcCwgdGFwaG9sZFxuICAgICAgLy8gLS0tLS1cblxuXG4gICAgICByLnRvdWNoRGF0YS5zaW5nbGVUb3VjaE1vdmVkID0gZmFsc2U7XG4gICAgICByLnRvdWNoRGF0YS5zaW5nbGVUb3VjaFN0YXJ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MF0sXG4gICAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgICB9XG4gICAgICAgIH07XG5cbiAgICAgICAgaWYgKHIudG91Y2hEYXRhLnN0YXJ0KSB7XG4gICAgICAgICAgci50b3VjaERhdGEuc3RhcnQudW5hY3RpdmF0ZSgpLmVtaXQoY3h0RXZ0KTtcbiAgICAgICAgICByLnRvdWNoRGF0YS5zdGFydCA9IG51bGw7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY3kuZW1pdChjeHRFdnQpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgfSAvLyBjb250ZXh0IHN3aXBlXG5cblxuICAgIGlmIChjYXB0dXJlICYmIHIudG91Y2hEYXRhLmN4dCkge1xuICAgICAgdmFyIGN4dEV2dCA9IHtcbiAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgdHlwZTogJ2N4dGRyYWcnLFxuICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICB5OiBub3dbMV1cbiAgICAgICAgfVxuICAgICAgfTtcbiAgICAgIHIuZGF0YS5iZ0FjdGl2ZVBvc2lzdGlvbiA9IHVuZGVmaW5lZDtcbiAgICAgIHIucmVkcmF3SGludCgnc2VsZWN0JywgdHJ1ZSk7XG5cbiAgICAgIGlmIChyLnRvdWNoRGF0YS5zdGFydCkge1xuICAgICAgICByLnRvdWNoRGF0YS5zdGFydC5lbWl0KGN4dEV2dCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjeS5lbWl0KGN4dEV2dCk7XG4gICAgICB9XG5cbiAgICAgIGlmIChyLnRvdWNoRGF0YS5zdGFydCkge1xuICAgICAgICByLnRvdWNoRGF0YS5zdGFydC5fcHJpdmF0ZS5ncmFiYmVkID0gZmFsc2U7XG4gICAgICB9XG5cbiAgICAgIHIudG91Y2hEYXRhLmN4dERyYWdnZWQgPSB0cnVlO1xuICAgICAgdmFyIG5lYXIgPSByLmZpbmROZWFyZXN0RWxlbWVudChub3dbMF0sIG5vd1sxXSwgdHJ1ZSwgdHJ1ZSk7XG5cbiAgICAgIGlmICghci50b3VjaERhdGEuY3h0T3ZlciB8fCBuZWFyICE9PSByLnRvdWNoRGF0YS5jeHRPdmVyKSB7XG4gICAgICAgIGlmIChyLnRvdWNoRGF0YS5jeHRPdmVyKSB7XG4gICAgICAgICAgci50b3VjaERhdGEuY3h0T3Zlci5lbWl0KHtcbiAgICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgICB0eXBlOiAnY3h0ZHJhZ291dCcsXG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG5cbiAgICAgICAgci50b3VjaERhdGEuY3h0T3ZlciA9IG5lYXI7XG5cbiAgICAgICAgaWYgKG5lYXIpIHtcbiAgICAgICAgICBuZWFyLmVtaXQoe1xuICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgIHR5cGU6ICdjeHRkcmFnb3ZlcicsXG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICB9IC8vIGJveCBzZWxlY3Rpb25cblxuICAgIH0gZWxzZSBpZiAoY2FwdHVyZSAmJiBlLnRvdWNoZXNbMl0gJiYgY3kuYm94U2VsZWN0aW9uRW5hYmxlZCgpKSB7XG4gICAgICBlLnByZXZlbnREZWZhdWx0KCk7XG4gICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSB1bmRlZmluZWQ7XG4gICAgICB0aGlzLmxhc3RUaHJlZVRvdWNoID0gK25ldyBEYXRlKCk7XG5cbiAgICAgIGlmICghci50b3VjaERhdGEuc2VsZWN0aW5nKSB7XG4gICAgICAgIGN5LmVtaXQoe1xuICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgdHlwZTogJ2JveHN0YXJ0JyxcbiAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgIH1cblxuICAgICAgci50b3VjaERhdGEuc2VsZWN0aW5nID0gdHJ1ZTtcbiAgICAgIHIudG91Y2hEYXRhLmRpZFNlbGVjdCA9IHRydWU7XG4gICAgICBzZWxlY3RbNF0gPSAxO1xuXG4gICAgICBpZiAoIXNlbGVjdCB8fCBzZWxlY3QubGVuZ3RoID09PSAwIHx8IHNlbGVjdFswXSA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgIHNlbGVjdFswXSA9IChub3dbMF0gKyBub3dbMl0gKyBub3dbNF0pIC8gMztcbiAgICAgICAgc2VsZWN0WzFdID0gKG5vd1sxXSArIG5vd1szXSArIG5vd1s1XSkgLyAzO1xuICAgICAgICBzZWxlY3RbMl0gPSAobm93WzBdICsgbm93WzJdICsgbm93WzRdKSAvIDMgKyAxO1xuICAgICAgICBzZWxlY3RbM10gPSAobm93WzFdICsgbm93WzNdICsgbm93WzVdKSAvIDMgKyAxO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgc2VsZWN0WzJdID0gKG5vd1swXSArIG5vd1syXSArIG5vd1s0XSkgLyAzO1xuICAgICAgICBzZWxlY3RbM10gPSAobm93WzFdICsgbm93WzNdICsgbm93WzVdKSAvIDM7XG4gICAgICB9XG5cbiAgICAgIHIucmVkcmF3SGludCgnc2VsZWN0JywgdHJ1ZSk7XG4gICAgICByLnJlZHJhdygpOyAvLyBwaW5jaCB0byB6b29tXG4gICAgfSBlbHNlIGlmIChjYXB0dXJlICYmIGUudG91Y2hlc1sxXSAmJ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mVlb24nKTtcblxuICAgICAgICAgICAgZHJhZ2dlZEVsZXMuZW1pdCgnZHJhZ2ZyZWUnKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjeS52aWV3cG9ydCh7XG4gICAgICAgICAgem9vbTogem9vbTIsXG4gICAgICAgICAgcGFuOiBwYW4yLFxuICAgICAgICAgIGNhbmNlbE9uRmFpbGVkWm9vbTogdHJ1ZVxuICAgICAgICB9KTtcbiAgICAgICAgY3kuZW1pdCgncGluY2h6b29tJyk7XG4gICAgICAgIGRpc3RhbmNlMSA9IGRpc3RhbmNlMjtcbiAgICAgICAgZjF4MSA9IGYxeDI7XG4gICAgICAgIGYxeTEgPSBmMXkyO1xuICAgICAgICBmMngxID0gZjJ4MjtcbiAgICAgICAgZjJ5MSA9IGYyeTI7XG4gICAgICAgIHIucGluY2hpbmcgPSB0cnVlO1xuICAgICAgfSAvLyBSZS1wcm9qZWN0XG5cblxuICAgICAgaWYgKGUudG91Y2hlc1swXSkge1xuICAgICAgICB2YXIgcG9zID0gci5wcm9qZWN0SW50b1ZpZXdwb3J0KGUudG91Y2hlc1swXS5jbGllbnRYLCBlLnRvdWNoZXNbMF0uY2xpZW50WSk7XG4gICAgICAgIG5vd1swXSA9IHBvc1swXTtcbiAgICAgICAgbm93WzFdID0gcG9zWzFdO1xuICAgICAgfVxuXG4gICAgICBpZiAoZS50b3VjaGVzWzFdKSB7XG4gICAgICAgIHZhciBwb3MgPSByLnByb2plY3RJbnRvVmlld3BvcnQoZS50b3VjaGVzWzFdLmNsaWVudFgsIGUudG91Y2hlc1sxXS5jbGllbnRZKTtcbiAgICAgICAgbm93WzJdID0gcG9zWzBdO1xuICAgICAgICBub3dbM10gPSBwb3NbMV07XG4gICAgICB9XG5cbiAgICAgIGlmIChlLnRvdWNoZXNbMl0pIHtcbiAgICAgICAgdmFyIHBvcyA9IHIucHJvamVjdEludG9WaWV3cG9ydChlLnRvdWNoZXNbMl0uY2xpZW50WCwgZS50b3Vj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ICAgICAgICAgIGFkZE5vZGVzVG9EcmFnKGRyYWdnZWRFbGVzLCB7XG4gICAgICAgICAgICAgIGluRHJhZ0xheWVyOiB0cnVlXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByLmRyYWdEYXRhLmRpZERyYWcgPSB0cnVlO1xuICAgICAgICAgIHZhciB0b3RhbFNoaWZ0ID0ge1xuICAgICAgICAgICAgeDogMCxcbiAgICAgICAgICAgIHk6IDBcbiAgICAgICAgICB9O1xuXG4gICAgICAgICAgaWYgKG51bWJlciQxKGRpc3BbMF0pICYmIG51bWJlciQxKGRpc3BbMV0pKSB7XG4gICAgICAgICAgICB0b3RhbFNoaWZ0LnggKz0gZGlzcFswXTtcbiAgICAgICAgICAgIHRvdGFsU2hpZnQueSArPSBkaXNwWzFdO1xuXG4gICAgICAgICAgICBpZiAoanVzdFN0YXJ0ZWREcmFnKSB7XG4gICAgICAgICAgICAgIHIucmVkcmF3SGludCgnZWxlcycsIHRydWUpO1xuICAgICAgICAgICAgICB2YXIgZHJhZ0RlbHRhID0gci50b3VjaERhdGEuZHJhZ0RlbHRhO1xuXG4gICAgICAgICAgICAgIGlmIChkcmFnRGVsdGEgJiYgbnVtYmVyJDEoZHJhZ0RlbHRhWzBdKSAmJiBudW1iZXIkMShkcmFnRGVsdGFbMV0pKSB7XG4gICAgICAgICAgICAgICAgdG90YWxTaGlmdC54ICs9IGRyYWdEZWx0YVswXTtcbiAgICAgICAgICAgICAgICB0b3RhbFNoaWZ0LnkgKz0gZHJhZ0RlbHRhWzFdO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgci5ob3ZlckRhdGEuZHJhZ2dpbmdFbGVzID0gdHJ1ZTtcbiAgICAgICAgICBkcmFnZ2VkRWxlcy5zaWxlbnRTaGlmdCh0b3RhbFNoaWZ0KS5lbWl0KCdwb3NpdGlvbiBkcmFnJyk7XG4gICAgICAgICAgci5y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zdCkge1xuICAgICAgICAgIGlmIChsYXN0KSB7XG4gICAgICAgICAgICBsYXN0LmVtaXQoe1xuICAgICAgICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICAgICAgICB0eXBlOiAndGFwZHJhZ291dCcsXG4gICAgICAgICAgICAgIHBvc2l0aW9uOiB7XG4gICAgICAgICAgICAgICAgeDogbm93WzBdLFxuICAgICAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAobmVhcikge1xuICAgICAgICAgICAgbmVhci5lbWl0KHtcbiAgICAgICAgICAgICAgb3JpZ2luYWxFdmVudDogZSxcbiAgICAgICAgICAgICAgdHlwZTogJ3RhcGRyYWdvdmVyJyxcbiAgICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgICAgICAgeTogbm93WzFdXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHIudG91Y2hEYXRhLmxhc3QgPSBuZWFyO1xuICAgICAgfSAvLyBjaGVjayB0byBjYW5jZWwgdGFwaG9sZFxuXG4gICAgICBpZiAoY2FwdHVyZSkge1xuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IG5vdy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgIGlmIChub3dbaV0gJiYgci50b3VjaERhdGEuc3RhcnRQb3NpdGlvbltpXSAmJiBpc092ZXJUaHJlc2hvbGREcmFnKSB7XG4gICAgICAgICAgICByLnRvdWNoRGF0YS5zaW5nbGVUb3VjaE1vdmVkID0gdHJ1ZTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gLy8gcGFubmluZ1xuXG5cbiAgICAgIGlmIChjYXB0dXJlICYmIChzdGFydCA9PSBudWxsIHx8IHN0YXJ0LnBhbm5hYmxlKCkpICYmIGN5LnBhbm5pbmdFbmFibGVkKCkgJiYgY3kudXNlclBhbm5pbmdFbmFibGVkKCkpIHtcbiAgICAgICAgdmFyIGFsbG93UGFzc3Rocm91Z2ggPSBhbGxvd1Bhbm5pbmdQYXNzdGhyb3VnaChzdGFydCwgci50b3VjaERhdGEuc3RhcnRzKTtcblxuICAgICAgICBpZiAoYWxsb3dQYXNzdGhyb3VnaCkge1xuICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcblxuICAgICAgICAgIGlmICghci5kYXRhLmJnQWN0aXZlUG9zaXN0aW9uKSB7XG4gICAgICAgICAgICByLmRhdGEuYmdBY3RpdmVQb3Npc3Rpb24gPSBhcnJheTJwb2ludChyLnRvdWNoRGF0YS5zdGFydFBvc2l0aW9uKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoci5zd2lwZVBhbm5pbmcpIHtcbiAgICAgICAgICAgIGN5LnBhbkJ5KHtcbiAgICAgICAgICAgICAgeDogZGlzcFswXSAqIHpvb20sXG4gICAgICAgICAgICAgIHk6IGRpc3BbMV0gKiB6b29tXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIGN5LmVtaXQoJ2RyYWdwYW4nKTtcbiAgICAgICAgICB9IGVsc2UgaWYgKGlzT3ZlclRocmVzaG9sZERyYWcpIHtcbiAgICAgICAgICAgIHIuc3dpcGVQYW5uaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIGN5LnBhbkJ5KHtcbiAgICAgICAgICAgICAgeDogZHggKiB6b29tLFxuICAgICAgICAgICAgICB5OiBkeSAqIHpvb21cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgY3kuZW1pdCgnZHJhZ3BhbicpO1xuXG4gICAgICAgICAgICBpZiAoc3RhcnQpIHtcbiAgICAgICAgICAgICAgc3RhcnQudW5hY3RpdmF0ZSgpO1xuICAgICAgICAgICAgICByLnJlZHJhd0hpbnQoJ3NlbGVjdCcsIHRydWUpO1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pZXI7XG5cbiAgICBpZiAoZS50b3VjaGVzWzBdKSB7XG4gICAgICB2YXIgcG9zID0gci5wcm9qZWN0SW50b1ZpZXdwb3J0KGUudG91Y2hlc1swXS5jbGllbnRYLCBlLnRvdWNoZXNbMF0uY2xpZW50WSk7XG4gICAgICBub3dbMF0gPSBwb3NbMF07XG4gICAgICBub3dbMV0gPSBwb3NbMV07XG4gICAgfVxuXG4gICAgaWYgKGUudG91Y2hlc1sxXSkge1xuICAgICAgdmFyIHBvcyA9IHIucHJvamVjdEludG9WaWV3cG9ydChlLnRvdWNoZXNbMV0uY2xpZW50WCwgZS50b3VjaGVzWzFdLmNsaWVudFkpO1xuICAgICAgbm93WzJdID0gcG9zWzBdO1xuICAgICAgbm93WzNdID0gcG9zWzFdO1xuICAgIH1cblxuICAgIGlmIChlLnRvdWNoZXNbMl0pIHtcbiAgICAgIHZhciBwb3MgPSByLnByb2plY3RJbnRvVmlld3BvcnQoZS50b3VjaGVzWzJdLmNsaWVudFgsIGUudG91Y2hlc1syXS5jbGllbnRZKTtcbiAgICAgIG5vd1s0XSA9IHBvc1swXTtcbiAgICAgIG5vd1s1XSA9IHBvc1sxXTtcbiAgICB9XG5cbiAgICBpZiAoc3RhcnQpIHtcbiAgICAgIHN0YXJ0LnVuYWN0aXZhdGUoKTtcbiAgICB9XG5cbiAgICB2YXIgY3R4VGFwZW5kO1xuXG4gICAgaWYgKHIudG91Y2hEYXRhLmN4dCkge1xuICAgICAgY3R4VGFwZW5kID0ge1xuICAgICAgICBvcmlnaW5hbEV2ZW50OiBlLFxuICAgICAgICB0eXBlOiAnY3h0dGFwZW5kJyxcbiAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICB4OiBub3dbMF0sXG4gICAgICAgICAgeTogbm93WzFdXG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIGlmIChzdGFydCkge1xuICAgICAgICBzdGFydC5lbWl0KGN0eFRhcGVuZCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjeS5lbWl0KGN0eFRhcGVuZCk7XG4gICAgICB9XG5cbiAgICAgIGlmICghci50b3VjaERhdGEuY3h0RHJhZ2dlZCkge1xuICAgICAgICB2YXIgY3R4VGFwID0ge1xuICAgICAgICAgIG9yaWdpbmFsRXZlbnQ6IGUsXG4gICAgICAgICAgdHlwZTogJ2N4dHRhcCcsXG4gICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgIHg6IG5vd1swXSxcbiAgICAgICAgICAgIHk6IG5vd1sxXVxuICAgICAgICAgIH1cbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoc3RhcnQpIHtcbiAgICAgICAgICBzdGFydC5lbWl0KGN0eFRhcCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY3kuZW1pdChjdHhUYXApO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmIChyLnRvdWNoRGF0YS5zdGFydCkge1xuICAgICAgICByLnRvdWNoRGF0YS5zdGFydC5fcHJpdmF0ZS5ncmFiYmVkID0gZmFsc2U7XG4gICAgICB9XG5cbiAgICAgIHIudG91Y2hEYXRhLmN4dCA9IGZhbHNlO1xuICAgICAgci50b3VjaERhdGEuc3RhcnQgPSBudWxsO1xuICAgICAgci5yZWRyYXcoKTtcbiAgICAgIHJldHVybjtcbiAgICB9IC8vIG5vIG1vcmUgYm94IHNlbGVjdGlvbiBpZiB3ZSBkb24ndCBoYXZlIHRocmVlIGZpbmdlcnNcblxuXG4gICAgaWYgKCFlLnRvdWNoZXNbMl0gJiYgY3kuYm94U2VsZWN0aW9uRW5hYmxlZCgpICYmIHIudG91Y2hEYXRhLnNlbGVjdGluZykge1xuICAgICAgci50b3VjaERhdGEuc2VsZWN0aW5nID0gZmFsc2U7XG4gICAgICB2YXIgYm94ID0gY3kuY29sbGVjdGlvbihyLmdldEFsbEluQm94KHNlbGVjdFswXSwgc2VsZWN0WzFdLCBzZWxlY3RbMl0sIHNlbGVjdFszXSkpO1xuICAgICAgc2V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OiBwdHNbNV1cbiAgICAgICAgfSwgdDApO1xuICAgICAgICB2YXIgbTEgPSBxYmV6aWVyUHRBdCh7XG4gICAgICAgICAgeDogcHRzWzBdLFxuICAgICAgICAgIHk6IHB0c1sxXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgeDogcHRzWzJdLFxuICAgICAgICAgIHk6IHB0c1szXVxuICAgICAgICB9LCB7XG4gICAgICAgICAgeDogcHRzWzRdLFxuICAgICAgICAgIHk6IHB0c1s1XVxuICAgICAgICB9LCB0MSk7XG4gICAgICAgIHZhciBtMiA9IHFiZXppZXJQdEF0KHtcbiAgICAgICAgICB4OiBwdHNbMF0sXG4gICAgICAgICAgeTogcHRzWzFdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICB4OiBwdHNbMl0sXG4gICAgICAgICAgeTogcHRzWzNdXG4gICAgICAgIH0sIHtcbiAgICAgICAgICB4OiBwdHNbNF0sXG4gICAgICAgICAgeTogcHRzWzVdXG4gICAgICAgIH0sIHQyKTtcbiAgICAgICAgcmV0dXJuIFtwdHNbMF0sIHB0c1sxXSwgbTAueCwgbTAueSwgbTEueCwgbTEueSwgbTIueCwgbTIueSwgcHRzWzRdLCBwdHNbNV1dO1xuICAgICAgfTtcblxuICAgICAgdmFyIHB0cyA9IFtdLmNvbmNhdChhcHByb3hpbWF0ZUJhcnJlbEN1cnZlUHRzKGJQdHMudG9wTGVmdCksIGFwcHJveGltYXRlQmFycmVsQ3VydmVQdHMoYlB0cy50b3BSaWdodCksIGFwcHJveGltYXRlQmFycmVsQ3VydmVQdHMoYlB0cy5ib3R0b21SaWdodCksIGFwcHJveGltYXRlQmFycmVsQ3VydmVQdHMoYlB0cy5ib3R0b21MZWZ0KSk7XG4gICAgICByZXR1cm4gcG9seWdvbkludGVyc2VjdExpbmUoeCwgeSwgcHRzLCBub2RlWCwgbm9kZVkpO1xuICAgIH0sXG4gICAgZ2VuZXJhdGVCYXJyZWxCZXppZXJQdHM6IGZ1bmN0aW9uIGdlbmVy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bGlkUm9vdHMgPSByb290cy5maWx0ZXIoZnVuY3Rpb24gKHIpIHtcbiAgICAgICAgICAgIHJldHVybiAwIDw9IHIgJiYgciA8PSAxO1xuICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgaWYgKHZhbGlkUm9vdHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgcmV0dXJuIHZhbGlkUm9vdHNbMF07XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9O1xuXG4gICAgICB2YXIgY3VydmVSZWdpb25zID0gT2JqZWN0LmtleXMoYmFycmVsQ3VydmVQdHMpO1xuXG4gICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGN1cnZlUmVnaW9ucy5sZW5ndGg7IGkrKykge1xuICAgICAgICB2YXIgY29ybmVyID0gY3VydmVSZWdpb25zW2ldO1xuICAgICAgICB2YXIgY29ybmVyUHRzID0gYmFycmVsQ3VydmVQdHNbY29ybmVyXTtcbiAgICAgICAgdmFyIHQgPSBnZXRDdXJ2ZVQoeCwgeSwgY29ybmVyUHRzKTtcblxuICAgICAgICBpZiAodCA9PSBudWxsKSB7XG4gICAgICAgICAgY29udGludWU7XG4gICAgICAgIH1cblxuICAgICAgICB2YXIgeTAgPSBjb3JuZXJQdHNbNV07XG4gICAgICAgIHZhciB5MSA9IGNvcm5lclB0c1szXTtcbiAgICAgICAgdmFyIHkyID0gY29ybmVyUHRzWzFdO1xuICAgICAgICB2YXIgYmV6WSA9IHFiZXppZXJBdCh5MCwgeTEsIHkyLCB0KTtcblxuICAgICAgICBpZiAoY29ybmVyUHRzLmlzVG9wICYmIGJlelkgPD0geSkge1xuICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGNvcm5lclB0cy5pc0JvdHRvbSAmJiB5IDw9IGJlelkpIHtcbiAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gIC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gICAgICAgICAgY2FzZSAnZGFzaGVkJzpcbiAgICAgICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbNCwgMl0pO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSAnZG91YmxlJzpcbiAgICAgICAgICAgICAgY29udGV4dC5saW5lV2lkdGggPSB0ZXh0Qm9yZGVyV2lkdGggLyA0OyAvLyA1MCUgcmVzZXJ2ZWQgZm9yIHdoaXRlIGJldHdlZW4gdGhlIHR3byBib3JkZXJzXG5cbiAgICAgICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbXSk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlICdzb2xpZCc6XG4gICAgICAgICAgICAgIGNvbnRleHQuc2V0TGluZURhc2goW10pO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBjb250ZXh0LnN0cm9rZVJlY3QoYmdYLCBiZ1ksIGJnVywgYmdIKTtcblxuICAgICAgICBpZiAodGV4dEJvcmRlclN0eWxlID09PSAnZG91YmxlJykge1xuICAgICAgICAgIHZhciB3aGl0ZVdpZHRoID0gdGV4dEJvcmRlcldpZHRoIC8gMjtcbiAgICAgICAgICBjb250ZXh0LnN0cm9rZVJlY3QoYmdYICsgd2hpdGVXaWR0aCwgYmdZICsgd2hpdGVXaWR0aCwgYmdXIC0gd2hpdGVXaWR0aCAqIDIsIGJnSCAtIHdoaXRlV2lkdGggKiAyKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChjb250ZXh0LnNldExpbmVEYXNoKSB7XG4gICAgICAgICAgLy8gZm9yIHZlcnkgb3V0b2ZkYXRlIGJyb3dzZXJzXG4gICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbXSk7XG4gICAgICAgIH1cblxuICAgICAgICBjb250ZXh0LmxpbmVXaWR0aCA9IHRleHRMaW5lV2lkdGg7XG4gICAgICAgIGNvb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NlcnNcbiAgICAgICAgc3dpdGNoIChib3JkZXJTdHlsZSkge1xuICAgICAgICAgIGNhc2UgJ2RvdHRlZCc6XG4gICAgICAgICAgICBjb250ZXh0LnNldExpbmVEYXNoKFsxLCAxXSk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ2Rhc2hlZCc6XG4gICAgICAgICAgICBjb250ZXh0LnNldExpbmVEYXNoKFs0LCAyXSk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgJ3NvbGlkJzpcbiAgICAgICAgICBjYXNlICdkb3VibGUnOlxuICAgICAgICAgICAgY29udGV4dC5zZXRMaW5lRGFzaChbXSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBpZiAodXNlUGF0aHMpIHtcbiAgICAgICAgY29udGV4dC5zdHJva2UocGF0aCk7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBjb250ZXh0LnN0cm9rZSgpO1xuICAgICAgfVxuXG4gICAgICBpZiAoYm9yZGVyU3R5bGUgPT09ICdkb3VibGUnKSB7XG4gICAgICAgIGNvbnRleHQubGluZVdpZHRoID0gYm9yZGVyV2lkdGggLyAzO1xuICAgICAgICB2YXIgZ2NvID0gY29udGV4dC5nbG9iYWxDb21wb3NpdGVPcGVyYXRpb247XG4gICAgICAgIGNvbnRleHQuZ2xvYmFsQ29tcG9zaXRlT3BlcmF0aW9uID0gJ2Rlc3RpbmF0aW9uLW91dCc7XG5cbiAgICAgICAgaWYgKHVzZVBhdGhzKSB7XG4gICAgICAgICAgY29udGV4dC5zdHJva2UocGF0aCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgY29udGV4dC5zdHJva2UoKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnRleHQuZ2xvYmFsQ29tcG9zaXRlT3BlcmF0aW9uID0gZ2NvO1xuICAgICAgfSAvLyByZXNldCBpbiBjYXNlIHdlIGNoYW5nZ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Bub2RlLng7XG4gICAgICAgIG9yaWdMYWJlbC55ID0gbm9kZS55O1xuICAgICAgICBvcmlnTGFiZWwud2lkdGggPSBub2RlLndpZHRoO1xuICAgICAgICBvcmlnTGFiZWwuaGVpZ2h0ID0gbm9kZS5oZWlnaHQ7XG4gICAgICB9XG4gICAgICB2ID0gdztcbiAgICAgIG5vZGUgPSBnLm5vZGUodik7XG4gICAgfVxuICB9KTtcbn1cbiIsInZhciBfID0gcmVxdWlyZShcIi4uL2xvZGFzaFwiKTtcblxubW9kdWxlLmV4cG9ydHMgPSBhZGRTdWJncmFwaENvbnN0cmFpbnRzO1xuXG5mdW5jdGlvbiBhZGRTdWJncmFwaENvbnN0cmFpbnRzKGcsIGNnLCB2cykge1xuICB2YXIgcHJldiA9IHt9LFxuICAgIHJvb3RQcmV2O1xuXG4gIF8uZm9yRWFjaCh2cywgZnVuY3Rpb24odikge1xuICAgIHZhciBjaGlsZCA9IGcucGFyZW50KHYpLFxuICAgICAgcGFyZW50LFxuICAgICAgcHJldkNoaWxkO1xuICAgIHdoaWxlIChjaGlsZCkge1xuICAgICAgcGFyZW50ID0gZy5wYXJlbnQoY2hpbGQpO1xuICAgICAgaWYgKHBhcmVudCkge1xuICAgICAgICBwcmV2Q2hpbGQgPSBwcmV2W3BhcmVudF07XG4gICAgICAgIHByZXZbcGFyZW50XSA9IGNoaWxkO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgcHJldkNoaWxkID0gcm9vdFByZXY7XG4gICAgICAgIHJvb3RQcmV2ID0gY2hpbGQ7XG4gICAgICB9XG4gICAgICBpZiAocHJldkNoaWxkICYmIHByZXZDaGlsZCAhPT0gY2hpbGQpIHtcbiAgICAgICAgY2cuc2V0RWRnZShwcmV2Q2hpbGQsIGNoaWxkKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuICAgICAgY2hpbGQgPSBwYXJlbnQ7XG4gICAgfVxuICB9KTtcblxuICAvKlxuICBmdW5jdGlvbiBkZnModikge1xuIC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AgICogXHR8ICAgICAgICAgICAgICAgICAgICAgICB8XG4gICAgKiBcdHwgICAgICAgIF9fX19fX19fXyAgICAgIHxcbiAgICAqIFx0fCAgICAgICAgfCAgICAgICB8ICAgICAgfFxuICAgICogXHR8X19fX19fX198X19fX19fX3xfX19fX198XG4gICAgKiBcdFx0XHQgfCAgICAgICB8XG4gICAgKiAgICAgICAgICAgfCAgICAgICB8XG4gICAgKiAgICAgICAgcmVjdEFcbiAgICAqL1xuICAgIG92ZXJsYXBBbW91bnRbMF0gKz0gTWF0aC5taW4ocmVjdEEuZ2V0WCgpIC0gcmVjdEIuZ2V0WCgpLCByZWN0Qi5nZXRSaWdodCgpIC0gcmVjdEEuZ2V0UmlnaHQoKSk7XG4gIH1cbiAgaWYgKHJlY3RBLmdldFkoKSA8PSByZWN0Qi5nZXRZKCkgJiYgcmVjdEEuZ2V0Qm90dG9tKCkgPj0gcmVjdEIuZ2V0Qm90dG9tKCkpIHtcbiAgICAvKiBDYXNlIHkuMTpcbiAgICAgKiAgICAgICAgICBfX19fX19fXyByZWN0QVxuICAgICAqICAgICAgICAgfFxuICAgICAqICAgICAgICAgfFxuICAgICAqICAgX19fX19ffF9fX18gIHJlY3RCXG4gICAgICogICAgICAgICB8ICAgIHxcbiAgICAgKiAgICAgICAgIHwgICAgfFxuICAgICAqICAgX19fX19ffF9fX198XG4gICAgICogICAgICAgICB8XG4gICAgICogICAgICAgICB8XG4gICAgICogICAgICAgICB8X19fX19fX19cbiAgICAgKlxuICAgICAqL1xuICAgIG92ZXJsYXBBbW91bnRbMV0gKz0gTWF0aC5taW4ocmVjdEIuZ2V0WSgpIC0gcmVjdEEuZ2V0WSgpLCByZWN0QS5nZXRCb3R0b20oKSAtIHJlY3RCLmdldEJvdHRvbSgpKTtcbiAgfSBlbHNlIGlmIChyZWN0Qi5nZXRZKCkgPD0gcmVjdEEuZ2V0WSgpICYmIHJlY3RCLmdldEJvdHRvbSgpID49IHJlY3RBLmdldEJvdHRvbSgpKSB7X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gc2xvcGVQcmltZSkge1xuICAgICAgICBpZiAocDF4ID4gcDJ4KSB7XG4gICAgICAgICAgcmVzdWx0WzBdID0gYm90dG9tTGVmdEF4O1xuICAgICAgICAgIHJlc3VsdFsxXSA9IGJvdHRvbUxlZnRBeTtcbiAgICAgICAgICBjbGlwUG9pbnRBRm91bmQgPSB0cnVlO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJlc3VsdFswXSA9IHRvcFJpZ2h0QXg7XG4gICAgICAgICAgcmVzdWx0WzFdID0gdG9wTGVmdEF5O1xuICAgICAgICAgIGNsaXBQb2ludEFGb3VuZCA9IHRydWU7XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAoc2xvcGVBID09PSBzbG9wZVByaW1lKSB7XG4gICAgICAgIGlmIChwMXggPiBwMngpIHtcbiAgICAgICAgICByZXN1bHRbMF0gPSB0b3BMZWZ0QXg7XG4gICAgICAgICAgcmVzdWx0WzFdID0gdG9wTGVmdEF5O1xuICAgICAgICAgIGNsaXBQb2ludEFGb3VuZCA9IHRydWU7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmVzdWx0WzBdID0gYm90dG9tUmlnaHRBeDtcbiAgICAgICAgICByZXN1bHRbMV0gPSBib3R0b21MZWZ0QXk7XG4gICAgICAgICAgY2xpcFBvaW50QUZvdW5kID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICAvL2RldGVybWluZSB3aGV0aGVyIGNsaXBwaW5nIHBvaW50IGlzIHRoZSBjb3JuZXIgb2Ygbm9kZUJcbiAgICAgIGlmICgtc2xvcGVCID09PSBzbG9wZVByaW1lKSB7XG4gICAgICAgIGlmIChwMnggPiBwMXgpIHtcbiAgICAgICAgICByZXN1bHRbMl0gPSBib3R0b21MZWZ0Qng7XG4gICAgICAgICAgcmVzdWx0WzNdID0gYm90dG9tTGVmdEJ5O1xuICAgICAgICAgIGNsaXBQb2ludEJGb3VuZCA9IHRydWU7XG4gIC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UG9pbnRBeCA9IHAxeCArIC1oYWxmSGVpZ2h0QSAvIHNsb3BlUHJpbWU7XG4gICAgICAgICAgICByZXN1bHRbMF0gPSB0ZW1wUG9pbnRBeDtcbiAgICAgICAgICAgIHJlc3VsdFsxXSA9IHRlbXBQb2ludEF5O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgdGVtcFBvaW50QXggPSBib3R0b21SaWdodEF4O1xuICAgICAgICAgICAgdGVtcFBvaW50QXkgPSBwMXkgKyBoYWxmV2lkdGhBICogc2xvcGVQcmltZTtcbiAgICAgICAgICAgIHJlc3VsdFswXSA9IHRlbXBQb2ludEF4O1xuICAgICAgICAgICAgcmVzdWx0WzFdID0gdGVtcFBvaW50QXk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICB0ZW1wUG9pbnRBeSA9IGJvdHRvbUxlZnRBeTtcbiAgICAgICAgICAgIHRlbXBQb2ludEF4ID0gcDF4ICsgaGFsZkhlaWdodEEgLyBzbG9wZVByaW1lO1xuICAgICAgICAgICAgcmVzdWx0WzBdID0gdGVtcFBvaW50QXg7XG4gICAgICAgICAgICByZXN1bHRbMV0gPSB0ZW1wUG9pbnRBeTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgIHRlbXBQb2ludEF4ID0gYm90dG9tTGVmdEF4O1xuICAgICAgICAgICAgdGVtcFBvaW50QXkgPSBwMXkgKyAtaGFsZldpZHRoQSAqIHNsb3BlUHJpbWU7XG4gICAgICAgICAgICByZXN1bHRbMF0gPSB0ZW1wUG9pbnRBeDtcbiAgICAgICAgICAgIHJlc3VsdFsxXSA9IHRlbXBQb2ludEF5O1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICAgIGlmICghY2xpcFBvaW50QkZvdW5kKSB7XG4gICAgICAgIHN3aXRja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ICB2YXIgY3VycmVudE5laWdoYm9yID0gbmVpZ2hib3JFZGdlc1tpXS5nZXRPdGhlckVuZChjdXJyZW50Tm9kZSk7XG5cbiAgICAgICAgLy8gSWYgQkZTIGlzIG5vdCBncm93aW5nIGZyb20gdGhpcyBuZWlnaGJvci5cbiAgICAgICAgaWYgKHBhcmVudHMuZ2V0KGN1cnJlbnROb2RlKSAhPSBjdXJyZW50TmVpZ2hib3IpIHtcbiAgICAgICAgICAvLyBXZSBoYXZlbid0IHByZXZpb3VzbHkgdmlzaXRlZCB0aGlzIG5laWdoYm9yLlxuICAgICAgICAgIGlmICghdmlzaXRlZC5oYXMoY3VycmVudE5laWdoYm9yKSkge1xuICAgICAgICAgICAgdG9CZVZpc2l0ZWQucHVzaChjdXJyZW50TmVpZ2hib3IpO1xuICAgICAgICAgICAgcGFyZW50cy5zZXQoY3VycmVudE5laWdoYm9yLCBjdXJyZW50Tm9kZSk7XG4gICAgICAgICAgfVxuICAgICAgICAgIC8vIFNpbmNlIHdlIGhhdmUgcHJldmlvdXNseSB2aXNpdGVkIHRoaXMgbmVpZ2hib3IgYW5kXG4gICAgICAgICAgLy8gdGhpcyBuZWlnaGJvciBpcyBub3QgcGFyZW50IG9mIGN1cnJlbnROb2RlLCBnaXZlblxuICAgICAgICAgIC8vIGdyYXBoIGNvbnRhaW5zIGEgY29tcG9uZW50IHRoYXQgaXMgbm90IHRyZWUsIGhlbmNlXG4gICAgICAgICAgLy8gaXQgaXMgbm90IGEgZm9yZXN0LlxuICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICBpc0ZvcmVzdCA9IGZhbHNlO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cblxuICAgIC8vIFRoZSBncmFwaCBjb250YWlucyBhIGNvbXBvbmVudCB0aGF0IGlzIG5vdCBhIHRyZWUuIEVtcHR5XG4gICAgLy8gcHJldmlvdXNseSBmb3VuZCB0cmVl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GFzcyhRdWlja3NvcnQsIFt7XG4gICAgICAgIGtleTogJ19xdWlja3NvcnQnLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gX3F1aWNrc29ydChBLCBwLCByKSB7XG4gICAgICAgICAgICBpZiAocCA8IHIpIHtcbiAgICAgICAgICAgICAgICB2YXIgcSA9IHRoaXMuX3BhcnRpdGlvbihBLCBwLCByKTtcbiAgICAgICAgICAgICAgICB0aGlzLl9xdWlja3NvcnQoQSwgcCwgcSk7XG4gICAgICAgICAgICAgICAgdGhpcy5fcXVpY2tzb3J0KEEsIHEgKyAxLCByKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sIHtcbiAgICAgICAga2V5OiAnX3BhcnRpdGlvbicsXG4gICAgICAgIHZhbHVlOiBmdW5jdGlvbiBfcGFydGl0aW9uKEEsIHAsIHIpIHtcbiAgICAgICAgICAgIHZhciB4ID0gdGhpcy5fZ2V0KEEsIHApO1xuICAgICAgICAgICAgdmFyIGkgPSBwO1xuICAgICAgICAgICAgdmFyIGogPSByO1xuICAgICAgICAgICAgd2hpbGUgKHRydWUpIHtcbiAgICAgICAgICAgICAgICB3aGlsZSAodGhpcy5jb21wYXJlRnVuY3Rpb24oeCwgdGhpcy5fZ2V0KEEsIGopKSkge1xuICAgICAgICAgICAgICAgICAgICBqLS07XG4gICAgICAgICAgICAgICAgfXdoaWxlICh0aGlzLmNvbXBhcmVGdW5jdGlvbih0aGlzLl9nZXQoQSwgaSksIHgpKSB7XG4gICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICB9aWYgKGkgPCBqKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuX3N3YXAoQSwgaSwgaik7XG4gICAgICAgICAgICAgICAgICAgIGkrKztcbiAgICAgICAgICAgICAgICAgICAgai0tO1xuICAgICAgICAgICAgICAgIH0gZWxzZSByZXR1cm4gajtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sIHtcbiA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PCBuY3QpIHtcbiAgICAgIHRoaXMuc1trXSA9IDA7XG4gICAgICBmb3IgKHZhciBpID0gazsgaSA8IHRoaXMubTsgaSsrKSB7XG4gICAgICAgIHRoaXMuc1trXSA9IFNWRC5oeXBvdCh0aGlzLnNba10sIEFbaV1ba10pO1xuICAgICAgfVxuICAgICAgO1xuICAgICAgaWYgKHRoaXMuc1trXSAhPT0gMC4wKSB7XG4gICAgICAgIGlmIChBW2tdW2tdIDwgMC4wKSB7XG4gICAgICAgICAgdGhpcy5zW2tdID0gLXRoaXMuc1trXTtcbiAgICAgICAgfVxuICAgICAgICBmb3IgKHZhciBfaSA9IGs7IF9pIDwgdGhpcy5tOyBfaSsrKSB7XG4gICAgICAgICAgQVtfaV1ba10gLz0gdGhpcy5zW2tdO1xuICAgICAgICB9XG4gICAgICAgIDtcbiAgICAgICAgQVtrXVtrXSArPSAxLjA7XG4gICAgICB9XG4gICAgICB0aGlzLnNba10gPSAtdGhpcy5zW2tdO1xuICAgIH1cbiAgICBmb3IgKHZhciBqID0gayArIDE7IGogPCB0aGlzLm47IGorKykge1xuICAgICAgaWYgKGZ1bmN0aW9uIChsaHMsIHJocykge1xuICAgICAgICByZXR1cm4gbGhzICYmIHJocztcbiAgICAgIH0oayA8IG5jdCwgdGhpcy5zW2tdICE9PSAwLjApKSB7XG4gICAgICAgIHZhciB0ID0gMDtcbiAgICAgICAgZm9yICh2YXIgX2kyID0gazsgX2kyIDwgdGhpcy5tOyBfaTIrKykge1xuICAgICAgICAgIHQgKz0gQVtfaTJdW2tdICogQVtfaTJdW2pdO1xuICAgICAgICB9XG4gICAgICAgIDtcbiAgICAgICAgdCA9IC10IC8gQVtrXVtrXTtcbiAgICAgICAgZm9yICh2YXIgX2kzID0gazsgX2kzIDwgdGhpcy5tOyBfaTMrKykge1xuICAgICAgICAgIEFbX2kzXVtqXSArPSB0ICogQVtfaTNdW2tdO1xuICAgICAgICB9XG4gICAgICAgIDtcbiAgICAgIH1cbiAgICAgIGVbal0gPSBBW2tdW2pdO1xuICAgIH1cbiAgICA7XG4gICAgaWYgKGZ1bmN0aW9uIChsaHMsIHJocykge1xuICAgICAgcmV0dXJuIGxocyAmJiByaHM7XG4gICAgfSh3YW50dSwgayA8IG5jdCkpIHtcbiAgICAgIGZvciAodmFyIF9pNCA9IGs7IF9pNCA8IHRoaXMubTsgX2k0KyspIHtcbiAgICAgICAgdGhpcy5VW19pNF1ba10gPSBBW19pNF1ba107XG4gICAgICB9XG4gICAgICA7XG4gICAgfVxuICAgIGlmIChrIDwgbnJ0KSB7XG4gICAgICBlW2tdID0gMDtcbiAgICAgIGZvciAodmFyIF9pNSA9IGsgKyAxOyBfaTUgPCB0aGlzLm47IF9pNSsrKSB7XG4gICAgICAgIGVba10gPSBTVkQuaHlwb3QoZVtrXSwgZVtfaTVdKTtcbiAgICAgIH1cbiAgICAgIDtcbiAgICAgIGlmIChlW2tdICE9PSAwLjApIHtcbiAgICAgICAgaWYgKGVbayArIDFdIDwgMC4wKSB7XG4gICAgICAgICAgZVtrXSA9IC1lW2tdO1xuICAgICAgICB9XG4gICAgICAgIGZvciAodmFyIF9pNiA9IGsgKyAxOyBfaTYgPCB0aGlzLm47IF9pNisrKSB7XG4gICAgICAgICAgZVtfaTZdIC89IGVba107XG4gICAgICAgIH1cbiAgICAgICAgO1xuICAgICAgICBlW2sgKyAxXSArPSAxLjA7XG4gICAgICB9XG4gICAgICBlW2tdID0gLWVba107XG4gICAgICBpZiAoZnVuY3Rpb24gKGxocywgcmhzKSB7XG4gICAgICAgIHJldHVybiBsaHMgJiYgcmhzO1xuICAgICAgfShrICsgMSA8IHRoaXMubSwgZVtrXSAhPT0gMC4wKSkge1xuICAgICAgICBmb3IgKHZhciBfaTcgPSBrICsgMTsgX2k3IDwgdGhpcy5tOyBfaTcrKykge1xuICAgICAgICAgIHdvcmtbX2k3XSA9IDAuMDtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICAgIGZvciAodmFyIF9qID0gayArIDE7IF9qIDwgdGhpcy5uOyBfaisrKSB7XG4gICAgICAgICAgZm9yICh2YXIgX2k4ID0gayArIDE7IF9pOCA8IHRoaXMubTsgX2k4KyspIHtcbiAgICAgICAgICAgIHdvcmtbX2k4XSArPSBlW19qXSAqIEFbX2k4XVtfal07XG4gICAgICAgICAgfVxuICAgICAgICAgIDtcbiAgICAgICAgfVxuICAgICAgICA7XG4gICAgICAgIGZvciAodmFyIF9qMiA9IGsgKyAxOyBfajIgPCB0aGlzLm47IF9qMisrKSB7XG4gICAgICAgICAgdmFyIF90ID0gLWVbX2oyXSAvIGVbayArIDFdO1xuICAgICAgICAgIGZvciAodmFyIF9pOSA9IGsgKyAxOyBfaTkgPCB0aGlzLm07IF9pOSsrKSB7XG4gICAgICAgICAgICBBW19pOV1bX2oyXSArPSBfdCAqIHdvcmtbX2k5XTtcbiAgICAgICAgICB9XG4gICAgICAgICAgO1xuICAgICAgICB9XG4gICAgICAgIDtcbiAgICAgIH1cbiAgICAgIGlmICh3YW50dikge1xuICAgICAgICBmb3IgKHZhciBfaTEwID0gayArIDE7IF9pMTAgPCB0aGlzLm47IF9pMTArKykge1xuICAgICAgICAgIHRoaXMuVltfaTEwXVtrXSA9IGVbX2kxMF07XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgfVxuICB9O1xuICB2YXIgcCA9IE1hdGgubWluKHRoaXMubiwgdGhpcy5tICsgMSk7XG4gIGlmIChuY3QgPCB0aGlzLm4pIHtcbiAgICB0aGlzLnNbbmN0XSA9IEFbbmN0XVtuY3RdO1xuICB9XG4gIGlmICh0aGlzLm0gPCBwKSB7XG4gICAgdGhpcy5zW3AgLSAxXSA9IDAuMDtcbiAgfVxuICBpZiAobnJ0ICsgMSA8IHApIHtcbiAgICBlW25ydF0gPSBBW25ydF1bcCAtIDFdO1xuICB9XG4gIGVbcCAtIDFdID0gMC4wO1xuICBpZiAod2FudHUpIHtcbiAgICBmb3IgKHZhciBfajMgPSBuY3Q7IF9qMyA8IG51OyBfajMrKykge1xuICAgICAgZm9yICh2YXIgX2kxMSA9IDA7IF9pMTEgPCB0aGlzLm07IF9pMTErKykge1xuICAgICAgICB0aGlzLlVbX2kxMV1bX2ozXSA9IDAuMDtcbiAgICAgIH1cbiAgICAgIDtcbiAgICAgIHRoaXMuVVtfajNdW19qM10gPSAxLjA7XG4gICAgfTtcbiAgICBmb3IgKHZhciBfayA9IG5jdCAtIDE7IF9rID49IDA7IF9rLS0pIHtcbiAgICAgIGlmICh0aGlzLnNbX2tdICE9PSAwLjApIHtcbiAgICAgICAgZm9yICh2YXIgX2o0ID0gX2sgKyAxOyBfajQgPCBudTsgX2o0KyspIHtcbiAgICAgICAgICB2YXIgX3QyID0gMDtcbiAgICAgICAgICBmb3IgKHZhciBfaTEyID0gX2s7IF9pMTIgPCB0aGlzLm07IF9pMTIrKykge1xuICAgICAgICAgICAgX3QyICs9IHRoaXMuVVtfaTEyXVtfa10gKiB0aGlzLlVbX2kxMl1bX2o0XTtcbiAgICAgICAgICB9O1xuICAgICAgICAgIF90MiA9IC1fdDIgLyB0aGlzLlVbX2tdW19rXTtcbiAgICAgICAgICBmb3IgKHZhciBfaTEzID0gX2s7IF9pMTMgPCB0aGlzLm07IF9pMTMrKykge1xuICAgICAgICAgICAgdGhpcy5VW19pMTNdW19qNF0gKz0gX3QyICogdGhpcy5VW19pMTNdW19rXTtcbiAgICAgICAgICB9O1xuICAgICAgICB9O1xuICAgICAgICBmb3IgKHZhciBfaTE0ID0gX2s7IF9pMTQgPCB0aGlzLm07IF9pMTQrKykge1xuICAgICAgICAgIHRoaXMuVVtfaTE0XVtfa10gPSAtdGhpcy5VW19pMTRdW19rXTtcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5VW19rXVtfa10gPSAxLjAgKyB0aGlzLlVbX2tdW19rXTtcbiAgICAgICAgZm9yICh2YXIgX2kxNSA9IDA7IF9pMTUgPCBfayAtIDE7IF9pMTUrKykge1xuICAgICAgICAgIHRoaXMuVVtfaTE1XVtfa10gPSAwLjA7XG4gICAgICAgIH07XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKHZhciBfaTE2ID0gMDsgX2kxNiA8IHRoaXMubTsgX2kxNisrKSB7XG4gICAgICAgICAgdGhpcy5VW19pMTZdW19rXSA9IDAuMDtcbiAgICAgICAgfTtcbiAgICAgICAgdGhpcy5VW19rXVtfa10gPSAxLjA7XG4gICAgICB9XG4gICAgfTtcbiAgfVxuICBpZiAod2FudHYpIHtcbiAgICBmb3IgKHZhciBfazIgPSB0aGlzLm4gLSAxOyBfazIgPj0gMDsgX2syLS0pIHtcbiAgICAgIGlmIChmdW5jdGlvbiAobGhzLCByaHMpIHtcbiAgICAgICAgcmV0dXJuIGxocyAmJiByaHM7XG4gICAgICB9KF9rMiA8IG5ydCwgZVtfazJdICE9PSAwLjApKSB7XG4gICAgICAgIGZvciAodmFyIF9qNSA9IF9rMiArIDE7IF9qNSA8IG51OyBfajUrKykge1xuICAgICAgICAgIHZhciBfdDMgPSAwO1xuICAgICAgICAgIGZvciAodmFyIF9pMTcgPSBfazIgKyAxOyBfaTE3IDwgdGhpcy5uOyBfaTE3KyspIHtcbiAgICAgICAgICAgIF90MyArPSB0aGlzLlZbX2kxN11bX2syXSAqIHRoaXMuVltfaTE3XVtfajVdO1xuICAgICAgICAgIH07XG4gICAgICAgICAgX3QzID0gLV90MyAvIHRoaXMuVltfazIgKyAxXVtfazJdO1xuICAgICAgICAgIGZvciAodmFyIF9pMTggPSBfazIgKyAxOyBfaTE4IDwgdGhpcy5uOyBfaTE4KyspIHtcbiAgICAgICAgICAgIHRoaXMuVltfaTE4XVtfajVdICs9IF90MyAqIHRoaXMuVltfaTE4XVtfazJdO1xuICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICB9XG4gICAgICBmb3IgKHZhciBfaTE5ID0gMDsgX2kxOSA8IHRoaXMubjsgX2kxOSsrKSB7XG4gICAgICAgIHRoaXMuVltfaTE5XVtfazJdID0gMC4wO1xuICAgICAgfTtcbiAgICAgIHRoaXMuVltfazJdW19rMl0gPSAxLjA7XG4gICAgfTtcbiAgfVxuICB2YXIgcHAgPSBwIC0gMTtcbiAgdmFyIGl0ZXIgPSAwO1xuICB2YXIgZXBzID0gTWF0aC5wb3coMi4wLCAtNTIuMCk7XG4gIHZhciB0aW55ID0gTWF0aC5wb3coMi4wLCAtOTY2LjApO1xuICB3aGlsZSAocCA+IDApIHtcbiAgICB2YXIgX2szID0gdm9pZCAwO1xuICAgIHZhciBrYXNlID0gdm9pZCAwO1xuICAgIGZvciAoX2szID0gcCAtIDI7IF9rMyA+PSAtMTsgX2szLS0pIHtcbiAgICAgIGlmIChfazMgPT09IC0xKSB7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgaWYgKE1hdGguYWJzKGVbX2szXSkgPD0gdGlueSArIGVwcyAqIChNYXRoLmFicyh0aGlzLnNbX2szXSkgKyBNYXRoLmFicyh0aGlzLnNbX2szICsgMV0pKSkge1xuICAgICAgICBlW19rM10gPSAwLjA7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgIH07XG4gICAgaWYgKF9rMyA9PT0gcCAtIDIpIHtcbiAgICAgIGthc2UgPSA0O1xuICAgIH0gZWxzZSB7XG4gICAgICB2YXIga3MgPSB2b2lkIDA7XG4gICAgICBmb3IgKGtzID0gcCAtIDE7IGtzID49IF9rMzsga3MtLSkge1xuICAgICAgICBpZiAoa3MgPT09IF9rMykge1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHZhciBfdDQgPSAoa3MgIT09IHAgPyBNYXRoLmFicyhlW2tzXSkgOiAwLjApICsgKGtzICE9PSBfazMgKyAxID8gTWF0aC5hYnMoZVtrcyAtIDFdKSA6IDAuMCk7XG4gICAgICAgIGlmIChNYXRoLmFicyh0aGlzLnNba3NdKSA8PSB0aW55ICsgZXBzICogX3Q0KSB7XG4gICAgICAgICAgdGhpcy5zW2tzXSA9IDAuMDtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfTtcbiAgICAgIGlmIChrcyA9PT0gX2szKSB7XG4gICAgICAgIGthc2UgPSAzO1xuICAgICAgfSBlbHNlIGlmIChrcyA9PT0gcCAtIDEpIHtcbiAgICAgICAga2FzZSA9IDE7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBrYXNlID0gMjtcbiAgICAgICAgX2szID0ga3M7XG4gICAgICB9XG4gICAgfVxuICAgIF9rMysrO1xuICAgIHN3aXRjaCAoa2FzZSkge1xuICAgICAgY2FzZSAxOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGYgPSBlW3AgLSAyXTtcbiAgICAgICAgICBlW3AgLSAyXSA9IDAuMDtcbiAgICAgICAgICBmb3IgKHZhciBfajYgPSBwIC0gMjsgX2o2ID49IF9rMzsgX2o2LS0pIHtcbiAgICAgICAgICAgIHZhciBfdDUgPSBTVkQuaHlwb3QodGhpcy5zW19qNl0sIGYpO1xuICAgICAgICAgICAgdmFyIGNzID0gdGhpcy5zW19qNl0gLyBfdDU7XG4gICAgICAgICAgICB2YXIgc24gPSBmIC8gX3Q1O1xuICAgICAgICAgICAgdGhpcy5zW19qNl0gPSBfdDU7XG4gICAgICAgICAgICBpZiAoX2o2ICE9PSBfazMpIHtcbiAgICAgICAgICAgICAgZiA9IC1zbiAqIGVbX2o2IC0gMV07XG4gICAgICAgICAgICAgIGVbX2o2IC0gMV0gPSBjcyAqIGVbX2o2IC0gMV07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAod2FudHYpIHtcbiAgICAgICAgICAgICAgZm9yICh2YXIgX2kyMCA9IDA7IF9pMjAgPCB0aGlzLm47IF9pMjArKykge1xuICAgICAgICAgICAgICAgIF90NSA9IGNzICogdGhpcy5WW19pMjBdW19qNl0gKyBzbiAqIHRoaXMuVltfaTIwXVtwIC0gMV07XG4gICAgICAgICAgICAgICAgdGhpcy5WW19pMjBdW3AgLSAxXSA9IC1zbiAqIHRoaXMuVltfaTIwXVtfajZdICsgY3MgKiB0aGlzLlZbX2kyMF1bcCAtIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTIwXVtfajZdID0gX3Q1O1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAyOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIF9mID0gZVtfazMgLSAxXTtcbiAgICAgICAgICBlW19rMyAtIDFdID0gMC4wO1xuICAgICAgICAgIGZvciAodmFyIF9qNyA9IF9rMzsgX2o3IDwgcDsgX2o3KyspIHtcbiAgICAgICAgICAgIHZhciBfdDYgPSBTVkQuaHlwb3QodGhpcy5zW19qN10sIF9mKTtcbiAgICAgICAgICAgIHZhciBfY3MgPSB0aGlzLnNbX2o3XSAvIF90NjtcbiAgICAgICAgICAgIHZhciBfc24gPSBfZiAvIF90NjtcbiAgICAgICAgICAgIHRoaXMuc1tfajddID0gX3Q2O1xuICAgICAgICAgICAgX2YgPSAtX3NuICogZVtfajddO1xuICAgICAgICAgICAgZVtfajddID0gX2NzICogZVtfajddO1xuICAgICAgICAgICAgaWYgKHdhbnR1KSB7XG4gICAgICAgICAgICAgIGZvciAodmFyIF9pMjEgPSAwOyBfaTIxIDwgdGhpcy5tOyBfaTIxKyspIHtcbiAgICAgICAgICAgICAgICBfdDYgPSBfY3MgKiB0aGlzLlVbX2kyMV1bX2o3XSArIF9zbiAqIHRoaXMuVVtfaTIxXVtfazMgLSAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlVbX2kyMV1bX2szIC0gMV0gPSAtX3NuICogdGhpcy5VW19pMjFdW19qN10gKyBfY3MgKiB0aGlzLlVbX2kyMV1bX2szIC0gMV07XG4gICAgICAgICAgICAgICAgdGhpcy5VW19pMjFdW19qN10gPSBfdDY7XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfTtcbiAgICAgICAgfTtcbiAgICAgICAgYn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IgPSAoc2sgKyBzcCkgKiAoc2sgLSBzcCkgKyBzaGlmdDtcbiAgICAgICAgICB2YXIgZyA9IHNrICogZWs7XG4gICAgICAgICAgZm9yICh2YXIgX2o4ID0gX2szOyBfajggPCBwIC0gMTsgX2o4KyspIHtcbiAgICAgICAgICAgIHZhciBfdDcgPSBTVkQuaHlwb3QoX2YyLCBnKTtcbiAgICAgICAgICAgIHZhciBfY3MyID0gX2YyIC8gX3Q3O1xuICAgICAgICAgICAgdmFyIF9zbjIgPSBnIC8gX3Q3O1xuICAgICAgICAgICAgaWYgKF9qOCAhPT0gX2szKSB7XG4gICAgICAgICAgICAgIGVbX2o4IC0gMV0gPSBfdDc7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfZjIgPSBfY3MyICogdGhpcy5zW19qOF0gKyBfc24yICogZVtfajhdO1xuICAgICAgICAgICAgZVtfajhdID0gX2NzMiAqIGVbX2o4XSAtIF9zbjIgKiB0aGlzLnNbX2o4XTtcbiAgICAgICAgICAgIGcgPSBfc24yICogdGhpcy5zW19qOCArIDFdO1xuICAgICAgICAgICAgdGhpcy5zW19qOCArIDFdID0gX2NzMiAqIHRoaXMuc1tfajggKyAxXTtcbiAgICAgICAgICAgIGlmICh3YW50dikge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTIyID0gMDsgX2kyMiA8IHRoaXMubjsgX2kyMisrKSB7XG4gICAgICAgICAgICAgICAgX3Q3ID0gX2NzMiAqIHRoaXMuVltfaTIyXVtfajhdICsgX3NuMiAqIHRoaXMuVltfaTIyXVtfajggKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlZbX2kyMl1bX2o4ICsgMV0gPSAtX3NuMiAqIHRoaXMuVltfaTIyXVtfajhdICsgX2NzMiAqIHRoaXMuVltfaTIyXVtfajggKyAxXTtcbiAgICAgICAgICAgICAgICB0aGlzLlZbX2kyMl1bX2o4XSA9IF90NztcbiAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIF90NyA9IFNWRC5oeXBvdChfZjIsIGcpO1xuICAgICAgICAgICAgX2NzMiA9IF9mMiAvIF90NztcbiAgICAgICAgICAgIF9zbjIgPSBnIC8gX3Q3O1xuICAgICAgICAgICAgdGhpcy5zW19qOF0gPSBfdDc7XG4gICAgICAgICAgICBfZjIgPSBfY3MyICogZVtfajhdICsgX3NuMiAqIHRoaXMuc1tfajggKyAxXTtcbiAgICAgICAgICAgIHRoaXMuc1tfajggKyAxXSA9IC1fc24yICogZVtfajhdICsgX2NzMiAqIHRoaXMuc1tfajggKyAxXTtcbiAgICAgICAgICAgIGcgPSBfc24yICogZVtfajggKyAxXTtcbiAgICAgICAgICAgIGVbX2o4ICsgMV0gPSBfY3MyICogZVtfajggKyAxXTtcbiAgICAgICAgICAgIGlmICh3YW50dSAmJiBfajggPCB0aGlzLm0gLSAxKSB7XG4gICAgICAgICAgICAgIGZvciAodmFyIF9pMjMgPSAwOyBfaTIzIDwgdGhpcy5tOyBfaTIzKyspIHtcbiAgICAgICAgICAgICAgICBfdDcgPSBfY3MyICogdGhpcy5VW19pMjNdW19qOF0gKyBfc24yICogdGhpcy5VW19pMjNdW19qOCArIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVVtfaTIzXVtfajggKyAxXSA9IC1fc24yICogdGhpcy5VW19pMjNdW19qOF0gKyBfY3MyICogdGhpcy5VW19pMjNdW19qOCArIDFdO1xuICAgICAgICAgICAgICAgIHRoaXMuVVtfaTIzXVtfajhdID0gX3Q3O1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH07XG4gICAgICAgICAgZVtwIC0gMl0gPSBfZjI7XG4gICAgICAgICAgaXRlciA9IGl0ZXIgKyAxO1xuICAgICAgICB9O1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgNDpcbiAgICAgICAge1xuICAgICAgICAgIGlmICh0aGlzLnNbX2szXSA8PSAwLjApIHtcbiAgICAgICAgICAgIHRoaXMuc1tfazNdID0gdGhpcy5zW19rM10gPCAwLjAgPyAtdGhpcy5zW19rM10gOiAwLjA7XG4gICAgICAgICAgICBpZiAod2FudHYpIHtcbiAgICAgICAgICAgICAgZm9yICh2YXIgX2kyNCA9IDA7IF9pMjQgPD0gcHA7IF9pMjQrKykge1xuICAgICAgICAgICAgICAgIHRoaXMuVltfaTI0XVtfazNdID0gLXRoaXMuVltfaTI0XVtfazNdO1xuICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICB3aGlsZSAoX2szIDwgcHApIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnNbX2szXSA+PSB0aGlzLnNbX2szICsgMV0pIHtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgX3Q4ID0gdGhpcy5zW19rM107XG4gICAgICAgICAgICB0aGlzLnNbX2szXSA9IHRoaXMuc1tfazMgKyAxXTtcbiAgICAgICAgICAgIHRoaXMuc1tfazMgKyAxXSA9IF90ODtcbiAgICAgICAgICAgIGlmICh3YW50diAmJiBfazMgPCB0aGlzLm4gLSAxKSB7XG4gICAgICAgICAgICAgIGZvciAodmFyIF9pMjUgPSAwOyBfaTI1IDwgdGhpcy5uOyBfaTI1KyspIHtcbiAgICAgICAgICAgICAgICBfdDggPSB0aGlzLlZbX2kyNV1bX2szICsgMV07XG4gICAgICAgICAgICAgICAgdGhpcy5WW19pMjVdW19rMyArIDFdID0gdGhpcy5WW19pMjVdW19rM107XG4gICAgICAgICAgICAgICAgdGhpcy5WW19pMjVdW19rM10gPSBfdDg7XG4gICAgICAgICAgICAgIH07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAod2FudHUgJiYgX2szIDwgdGhpcy5tIC0gMSkge1xuICAgICAgICAgICAgICBmb3IgKHZhciBfaTI2ID0gMDsgX2kyNiA8IHRoaXMubTsgX2kyNisrKSB7XG4gICAgICAgICAgICAgICAgX3Q4ID0gdGhpcy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IgKHZhciBfaSA9IDA7IF9pIDwgdGhpcy5pTWF4OyBfaSsrKSB7XG4gICAgICAgICAgICB0aGlzLnRyYWNlYmFja0dyaWRbX2ldID0gbmV3IEFycmF5KHRoaXMuak1heCk7XG5cbiAgICAgICAgICAgIGZvciAodmFyIF9qID0gMDsgX2ogPCB0aGlzLmpNYXg7IF9qKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLnRyYWNlYmFja0dyaWRbX2ldW19qXSA9IFtudWxsLCBudWxsLCBudWxsXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIC8vIFRoZSBhbGlnbmVkIHNlcXVlbmNlcyAocmV0dXJuIG11bHRpcGxlIHBvc3NpYmlsaXRpZXMpXG4gICAgICAgIHRoaXMuYWxpZ25tZW50cyA9IFtdO1xuXG4gICAgICAgIC8vIEZpbmFsIGFsaWdubWVudCBzY29yZVxuICAgICAgICB0aGlzLnNjb3JlID0gLTE7XG5cbiAgICAgICAgLy8gQ2FsY3VsYXRlIHNjb3JlcyBhbmQgdHJhY2ViYWNrc1xuICAgICAgICB0aGlzLmNvbXB1dGVHcmlkcygpO1xuICAgIH1cblxuICAgIF9jcmVhdGVDbGFzcyhOZWVkbGVtYW5XdW5zY2gsIFt7XG4gICAgICAgIGtleTogXCJnZXRTY29yZVwiLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gZ2V0U2NvcmUoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5zY29yZTtcbiAgICAgICAgfVxuICAgIH0sIHtcbiAgICAgICAga2V5OiBcImdldEFsaWdubWVudHNcIixcbiAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIGdldEFsaWdubWVudHMoKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hbGlnbm1lbnRzO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gTWFpbiBkeW5hbWljIHByb2dyYW1taW5nIHByb2NlZHVyZVxuXG4gICAgfSwge1xuICAgICAgICBrZXk6IFwiY29tcHV0ZUdyaWRzXCIsXG4gICAgICAgIHZhbHVlOiBmdW5jdGlvbiBjb21wdXRlR3JpZHMoKSB7XG4gICAgICAgICAgICAvLyBGaWxsIGluIHRoZSBmaXJzdCByb3dcbiAgICAgICAgICAgIGZvciAodmFyIGogPSAxOyBqIDwgdGhpcy5qTWF4OyBqKyspIHtcbiAgICAgICAgICAgICAgICB0aGlzLmdyaWRbMF1bal0gPSB0aGlzLmdyaWRbMF1baiAtIDFdICsgdGhpcy5nYXBfcGVuYWx0eTtcbiAgICAgICAgICAgICAgICB0aGlzLnRyYWNlYmFja0dyaWRbMF1bal0gPSBbZmFsc2UsIGZhbHNlLCB0cnVlXTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gRmlsbCBpbiB0aGUgZmlyc3QgY29sdW1uXG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMTsgaSA8IHRoaXMuaU1heDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5ncmlkW2ldWzBdID0gdGhpcy5ncmlkW2kgLSAxXVswXSArIHRoaXMuZ2FwX3BlbmFsdHk7XG4gICAgICAgICAgICAgICAgdGhpcy50cmFjZWJhY2tHcmlkW2ldWzBdID0gW2ZhbHNlLCB0cnVlLCBmYWxzZV07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIEZpbGwgdGhlIHJlc3Qgb2YgdGhlIGdyaWRcbiAgICAgICAgICAgIGZvciAodmFyIF9pMiA9IDE7IF9pMiA8IHRoaXMuaU1heDsgX2kyKyspIHtcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBfajIgPSAxOyBfajIgPCB0aGlzLmpNYXg7IF9qMisrKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIEZpbmQgdGhlIG1heCBzY29yZShzKSBhbW9uZyBbYERpYWdgLCBgVXBgLCBgTGVmdGBdXG4gICAgICAgICAgICAgICAgICAgIHZhciBkaWFnID0gdm9pZCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5zZXF1ZW5jZTFbX2kyIC0gMV0gPT09IHRoaXMuc2VxdWVuY2UyW19qMiAtIDFdKSBkaWFnID0gdGhpcy5ncmlkW19pMiAtIDFdW19qMiAtIDFdICsgdGhpcy5tYXRjaF9zY29yZTtlbHNlIGRpYWcgPSB0aGlzLmdyaWRbX2kyIC0gMV1bX2oyIC0gMV0gKyB0aGlzLm1pc21hdGNoX3BlbmFsdHk7XG5cbiAgICAgICAgICAgICAgICAgICAgdmFyIHVwID0gdGhpcy5ncmlkW19pMiAtIDFdW19qMl0gKyB0aGlzLmdhcF9wZW5hbHR5O1xuICAgICAgICAgICAgICAgICAgICB2YXIgbGVmdCA9IHRoaXMuZ3JpZFtfaTJdW19qMiAtIDFdICsgdGhpcy5nYXBfcGVuYWx0eTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBJZiB0aGVyZSBleGlzdHMgbXVsdGlwbGUgbWF4IHZhbHVlcywgY2FwdHVyZSB0aGVtIGZvciBtdWx0aXBsZSBwYXRoc1xuICAgICAgICAgICAgICAgICAgICB2YXIgbWF4T2YgPSBbZGlhZywgdXAsIGxlZnRdO1xuICAgICAgICAgICAgICAgICAgICB2YXIgaW5kaWNlcyA9IHRoaXMuYXJyYXlBbGxNYXhJbmRleGVzKG1heE9mKTtcblxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgR3JpZHNcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5ncmlkW19pMl1bX2oyXSA9IG1heE9mW2luZGljZXNbMF1dO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnRyYWNlYmFja0dyaWRbX2kyXVtfajJdID0gW2luZGljZXMuaW5jbHVkZXMoMCksIGluZGljZXMuaW5jbHVkZXMoMSksIGluZGljZXMuaW5jbHVkZXMoMildO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gVXBkYXRlIGFsaWdubWVudCBzY29yZVxuICAgICAgICA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EsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXEyOiB0aGlzLnNlcXVlbmNlMltjdXJyZW50LnBvc1sxXSAtIDFdICsgY3VycmVudC5zZXEyXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZGlyZWN0aW9uc1sxXSkge1xuICAgICAgICAgICAgICAgICAgICBpblByb2Nlc3NBbGlnbm1lbnRzLnB1c2goeyBwb3M6IFtjdXJyZW50LnBvc1swXSAtIDEsIGN1cnJlbnQucG9zWzFdXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlcTE6IHRoaXMuc2VxdWVuY2UxW2N1cnJlbnQucG9zWzBdIC0gMV0gKyBjdXJyZW50LnNlcTEsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXEyOiAnLScgKyBjdXJyZW50LnNlcTJcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChkaXJlY3Rpb25zWzJdKSB7XG4gICAgICAgICAgICAgICAgICAgIGluUHJvY2Vzc0FsaWdubWVudHMucHVzaCh7IHBvczogW2N1cnJlbnQucG9zWzBdLCBjdXJyZW50LnBvc1sxXSAtIDFdLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VxMTogJy0nICsgY3VycmVudC5zZXExLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VxMjogdGhpcy5zZXF1ZW5jZTJbY3VycmVudC5wb3NbMV0gLSAxXSArIGN1cnJlbnQuc2VxMlxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoY3VycmVudC5wb3NbMF0gPT09IDAgJiYgY3VycmVudC5wb3NbMV0gPT09IDApIHRoaXMuYWxpZ25tZW50cy5wdXNoKHsgc2VxdWVuY2UxOiBjdXJyZW50LnNlcTEsXG4gICAgICAgICAgICAgICAgICAgIHNlcXVlbmNlMjogY3VycmVudC5zZXEyXG4gICAgICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgICAgICBpblByb2Nlc3NBbGlnbm1lbnRzLnNoaWZ0KCk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiB0aGlzLmFsaWdubWVudHM7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBIZWxwZXIgRnVuY3Rpb25zXG5cbiAgICB9LCB7XG4gICAgICAgIGtleTogXCJnZXRBbGxJbmRleGVzXCIsXG4gICAgICAgIHZhbHVlOiBmdW5jdGlvbiBnZXRBbGxJbmRleGVzKGFyciwgdmFsKSB7XG4gICAgICAgICAgICB2YXIgaW5kZXhlcyA9IFtdLFxuICAgICAgICAgICAgICAgIGkgPSAtMTtcbiAgICAgICAgICAgIHdoaWxlICgoaSA9IGFyci5pbmRleE9mKHZhbCwgaSArIDEpKSAhPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBpbmRleGVzLnB1c2goaSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gaW5kZXhlcztcbiAgICAgICAgfVxuICAgIH0sIHtcbiAgICAgICAga2V5OiBcImFycmF5QWxsTWF4SW5kZXhlc1wiLFxuICAgICAgICB2YWx1ZTogZnVuY3Rpb24gYXJyYXlBbGxNYXhJbmRleGVzKGFycmF5KSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5nZXRBbGxJbmRleGVzKGFycmF5LCBNYXRoLm1heC5hcHBseShudWxsLCBhcnJheSkpO1xuICAgICAgICB9XG4gICAgfV0pO1xuXG4gICAgcmV0dXJuIE5lZWRsZW1hbld1bnNjaDtcbn0oKTtcblxubW9kdWxlLmV4cG9ydHMgPSBOZWVkbGVtYW5XdW5zY2g7XG5cbi8qKiovIH0pLFxuLyogMjggKi9cbi8qKiovIChmdW5jdGlvbihtb2R1bGUsIGV4cG9ydHMsIF9fd2VicGFja19yZXF1aXJlX18pIHtcblxuXCJ1c2Ugc3RyaWN0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5nJzpcbiAgICAgIHN3aXRjaCAoZGVmYXVsdFR5cGUpIHtcbiAgICAgICAgY2FzZSAnc3RyaW5nJzpcbiAgICAgICAgICByZXR1cm4gW2RlZmF1bHRTdHlsaW5nLCBjdXN0b21TdHlsaW5nXS5maWx0ZXIoQm9vbGVhbikuam9pbignICcpO1xuXG4gICAgICAgIGNhc2UgJ29iamVjdCc6XG4gICAgICAgICAgcmV0dXJuIG1lcmdlcih7XG4gICAgICAgICAgICBjbGFzc05hbWU6IGN1c3RvbVN0eWxpbmcsXG4gICAgICAgICAgICBzdHlsZTogZGVmYXVsdFN0eWxpbmdcbiAgICAgICAgICB9KTtcblxuICAgICAgICBjYXNlICdmdW5jdGlvbic6XG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzdHlsaW5nKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBfbGVuID0gYXJndW1lbnRzLmxlbmd0aCwgYXJncyA9IG5ldyBBcnJheShfbGVuID4gMSA/IF9sZW4gLSAxIDogMCksIF9rZXkgPSAxOyBfa2V5IDwgX2xlbjsgX2tleSsrKSB7XG4gICAgICAgICAgICAgIGFyZ3NbX2tleSAtIDFdID0gYXJndW1lbnRzW19rZXldO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gbWVyZ2VyKHtcbiAgICAgICAgICAgICAgY2xhc3NOYW1lOiBjdXN0b21TdHlsaW5nXG4gICAgICAgICAgICB9KShkZWZhdWx0U3R5bGluZy5hcHBseSh2b2lkIDAsIFtzdHlsaW5nXS5jb25jYXQoYXJncykpKTtcbiAgICAgICAgICB9O1xuICAgICAgfVxuXG4gICAgICBicmVhaztcblxuICAgIGNhc2UgJ29iamVjdCc6XG4gICAgICBzd2l0Y2ggKGRlZmF1bHRUeXBlKSB7XG4gICAgICAgIGNhc2UgJ3N0cmluZyc6XG4gICAgICAgICAgcmV0dXJuIG1lcmdlcih7XG4gICAgICAgICAgICBjbGFzc05hbWU6IGRlZmF1bHRTdHlsa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ysrKSB7XG4gICAgICAgICAgICAgIGFyZ3NbX2tleTMgLSAxXSA9IGFyZ3VtZW50c1tfa2V5M107XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBjdXN0b21TdHlsaW5nLmFwcGx5KHZvaWQgMCwgW21lcmdlcihzdHlsaW5nKSh7XG4gICAgICAgICAgICAgIGNsYXNzTmFtZTogZGVmYXVsdFN0eWxpbmdcbiAgICAgICAgICAgIH0pXS5jb25jYXQoYXJncykpO1xuICAgICAgICAgIH07XG5cbiAgICAgICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKHN0eWxpbmcpIHtcbiAgICAgICAgICAgIGZvciAodmFyIF9sZW40ID0gYXJndW1lbnRzLmxlbmd0aCwgYXJncyA9IG5ldyBBcnJheShfbGVuNCA+IDEgPyBfbGVuNCAtIDEgOiAwKSwgX2tleTQgPSAxOyBfa2V5NCA8IF9sZW40OyBfa2V5NCsrKSB7XG4gICAgICAgICAgICAgIGFyZ3NbX2tleTQgLSAxXSA9IGFyZ3VtZW50c1tfa2V5NF07XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBjdXN0b21TdHlsaW5nLmFwcGx5KHZvaWQgMCwgW21lcmdlcihzdHlsaW5nKSh7XG4gICAgICAgICAgICAgIHN0eWxlOiBkZWZhdWx0U3R5bGluZ1xuICAgICAgICAgICAgfSldLmNvbmNhdChhcmdzKSk7XG4gICAgICAgICAgfTtcblxuICAgICAgICBjYXNlICdmdW5jdGlvbic6XG4gICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChzdHlsaW5nKSB7XG4gICAgICAgICAgICBmb3IgKHZhciBfbGVuNSA9IGFyZ3VtZW50cy5sZW5ndGgsIGFyZ3MgPSBuZXcgQXJyYXkoX2xlbjUgPiAxID8gX2xlbjUgLSAxIDogMCksIF9rZXk1ID0gMTsgX2tleTUgPCBfbGVuNTsgX2tleTUrKykge1xuICAgICAgIC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nNsaWNlKGZyb20sIHRvICsgMSk7XG4gICAgcmVzID0ge1xuICAgICAgZW50cmllczoga2V5cy5tYXAoZnVuY3Rpb24gKGtleSkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgIGtleToga2V5LFxuICAgICAgICAgIHZhbHVlOiBjb2xsZWN0aW9uW2tleV1cbiAgICAgICAgfTtcbiAgICAgIH0pXG4gICAgfTtcbiAgfSBlbHNlIGlmICh0eXBlID09PSAnQXJyYXknKSB7XG4gICAgcmVzID0ge1xuICAgICAgZW50cmllczogY29sbGVjdGlvbi5zbGljZShmcm9tLCB0byArIDEpLm1hcChmdW5jdGlvbiAodmFsLCBpZHgpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICBrZXk6IGlkeCArIGZyb20sXG4gICAgICAgICAgdmFsdWU6IHZhbFxuICAgICAgICB9O1xuICAgICAgfSlcbiAgICB9O1xuICB9IGVsc2Uge1xuICAgIHZhciBpZHggPSAwO1xuICAgIHZhciBlbnRyaWVzID0gW107XG4gICAgdmFyIGRvbmUgPSB0cnVlO1xuICAgIHZhciBpc01hcCA9IGlzSXRlcmFibGVNYXAoY29sbGVjdGlvbik7XG5cbiAgICB2YXIgX2l0ZXJhdG9yID0gX2NyZWF0ZUZvck9mSXRlcmF0b3JIZWxwZXIoY29sbGVjdGlvbiksXG4gICAgICAgIF9zdGVwO1xuXG4gICAgdHJ5IHtcbiAgICAgIGZvciAoX2l0ZXJhdG9yLnMoKTsgIShfc3RlcCA9IF9pdGVyYXRvci5uKCkpLmRvbmU7KSB7XG4gICAgICAgIHZhciBpdGVtID0gX3N0ZXAudmFsdWU7XG5cbiAgICAgICAgaWYgKGlkeCA+IHRvKSB7XG4gICAgICAgICAgZG9uZSA9IGZhbHNlO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGZyb20gPD0gaWR4KSB7XG4gICAgICAgICAgaWYgKGlzTWFwICYmIEFycmF5LmlzQXJyYXkoaXRlbSkpIHtcbiAgICAgICAgICAgIGlmICh0eXBlb2YgaXRlbVswXSA9PT0gJ3N0cmluZycgfHwgdHlwZW9mIGl0ZW1bMF0gPT09ICdudW1iZXInKSB7XG4gICAgICAgICAgICAgIGVudHJpZXMucHVzaCh7XG4gICAgICAgICAgICAgICAga2V5OiBpdGVtWzBdLFxuICAgICAgICAgICAgICAgIHZhbHVlOiBpdGVtWzFdXG4gICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgZW50cmllcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBrZXk6IFwiW2VudHJ5IFwiLmNvbmNhdChpZHgsIFwiXVwiKSxcbiAgICAgICAgICAgICAgICB2YWx1ZToge1xuICAgICAgICAgICAgICAgICAgJ1trZXldJzogaXRlbVswXSxcbiAgICAgICAgICAgICAgICAgICdbdmFsdWVdJzogaXRlbVsxXVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGVudHJpZXMucHVzaCh7XG4gICAgICAgICAgICAgIGtleTogaWR4LFxuICAgICAgICAgICAgICB2YWx1ZTogaXRlbVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWR4Kys7XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICBfaXRlcmF0b3IuZShlcnIpO1xuICAgIH0gZmluYWxseSB7XG4gICAgICBfaXRlcmF0b3IuZigpO1xuICAgIH1cblxuICAgIHJlcyA9IHtcbiAgICAgIGhhc01vcmU6ICFkb25lLFxuICAgICAgZW50cmllczogZW50cmllc1xuICAgIH07XG4gIH1cblxuICByZXR1cm4gcmVzO1xufVxuXG5mdW5jdGlvbiBnZXRSYW5nZXMoZnJvbSwgdG8sIGxpbWl0KSB7XG4gIHZhciByYW5nZXMgPSBbXTtcblx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KHR5cGUgaW4gc2V0Ll9pdGVtcykpIHtcbiAgICAgICAgICBpZiAoc2hvdWxkQWRkKSB7XG4gICAgICAgICAgICBzZXQuX2l0ZW1zW3R5cGVdID0gW2l0ZW1dO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGlmICghX2luY2x1ZGVzKGl0ZW0sIHNldC5faXRlbXNbdHlwZV0pKSB7XG4gICAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgICAgc2V0Ll9pdGVtc1t0eXBlXS5wdXNoKGl0ZW0pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuXG4gICAgY2FzZSAndW5kZWZpbmVkJzpcbiAgICAgIGlmIChzZXQuX2l0ZW1zW3R5cGVdKSB7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgIHNldC5faXRlbXNbdHlwZV0gPSB0cnVlO1xuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgY2FzZSAnb2JqZWN0JzpcbiAgICAgIGlmIChpdGVtID09PSBudWxsKSB7XG4gICAgICAgIGlmICghc2V0Ll9pdGVtc1snbnVsbCddKSB7XG4gICAgICAgICAgaWYgKHNob3VsZEFkZCkge1xuICAgICAgICAgICAgc2V0Ll9pdGVtc1snbnVsbCddID0gdHJ1ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cblxuICAgIC8qIGZhbGxzIHRocm91Z2ggKi9cblxuICAgIGRlZmF1bHQ6XG4gICAgICAvLyByZWR1Y2UgdG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gICAgIGlmIChpdGVtID09PSAwICYmIDEgLyBpdGVtID09PSBpbmYpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGlkeDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWR4ICs9IDE7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICB9IGVsc2UgaWYgKGEgIT09IGEpIHtcbiAgICAgICAgICAvLyBOYU5cbiAgICAgICAgICB3aGlsZSAoaWR4IDwgbGlzdC5sZW5ndGgpIHtcbiAgICAgICAgICAgIGl0ZW0gPSBsaXN0W2lkeF07XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgaXRlbSA9PT0gJ251bWJlcicgJiYgaXRlbSAhPT0gaXRlbSkge1xuICAgICAgICAgICAgICByZXR1cm4gaWR4O1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZHggKz0gMTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgIH0gLy8gbm9uLXplcm8gbnVtYmVycyBjYW4gdXRpbGlzZSBTZXRcblxuXG4gICAgICAgIHJldHVybiBsaXN0LmluZGV4T2YoYSwgaWR4KTtcbiAgICAgIC8vIGFsbCB0aGVzZSB0eXBlcyBjYW4gdXRpbGlzZSBTZXRcblxuICAgICAgY2FzZSAnc3RyaW5nJzpcbiAgICAgIGNhc2UgJ2Jvb2xlYW4nOlxuICAgICAgY2FzZSAnZnVuY3Rpb24nOlxuICAgICAgY2FzZSAndW5kZWZpbmVkJzpcbiAgICAgICAgcmV0dXJuIGxpc3QuaW5kZXhPZihhLCBpZHgpO1xuXG4gICAgICBjYXNlICdvYmplY3QnOlxuICAgICAgICBpZiAoYSA9PT0gbnVsbCkge1xuICAgICAgICAgIC8vIG51bGwgY2FuIHV0aWxpc2UgU2V0XG4gICAgICAgICAgcmV0dXJuIGxpc3QuaW5kZXhPZihhLCBpZHgpO1xuICAgICAgICB9XG5cbiAgICB9XG4gIH0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CAwLCBbMSwgMiwgMywgNF0pIC8vID0+ICgxIC0gKDIgLSAoMyAtICg0IC0gMCkpKSkgPSAtMlxuICogICAgICAvLyAgICAtICAgICAgICAgICAgICAgLTJcbiAqICAgICAgLy8gICAvIFxcICAgICAgICAgICAgICAvIFxcXG4gKiAgICAgIC8vICAxICAgLSAgICAgICAgICAgIDEgICAzXG4gKiAgICAgIC8vICAgICAvIFxcICAgICAgICAgICAgICAvIFxcXG4gKiAgICAgIC8vICAgIDIgICAtICAgICA9PT4gICAgMiAgLTFcbiAqICAgICAgLy8gICAgICAgLyBcXCAgICAgICAgICAgICAgLyBcXFxuICogICAgICAvLyAgICAgIDMgICAtICAgICAgICAgICAgMyAgIDRcbiAqICAgICAgLy8gICAgICAgICAvIFxcICAgICAgICAgICAgICAvIFxcXG4gKiAgICAgIC8vICAgICAgICA0ICAgMCAgICAgICAgICAgIDQgICAwXG4gKlxuICogQHN5bWIgUi5yZWR1Y2VSaWdodChmLCBhLCBbYiwgYywgZF0pID0gZihiLCBmKGMsIGYoZCwgYSkpKVxuICovXG5cbnZhciByZWR1Y2VSaWdodCA9XG4vKiNfX1BVUkVfXyovXG5fY3VycnkzKGZ1bmN0aW9uIHJlZHVjZVJpZ2h0KGZuLCBhY2MsIGxpc3QpIHtcbiAgdmFyIGlkeCA9IGxpc3QubGVuZ3RoIC0gMTtcblxuICB3aGlsZSAoaWR4ID49IDApIHtcbiAgICBhY2MgPSBmbihsaXN0W2lkeF0sIGFjYyk7XG5cbiAgICBpZiAoYWNjICYmIGFjY1snQEB0cmFuc2R1Y2VyL3JlZHVjZWQnXSkge1xuICAgICAgYWNjID0gYWNjWydAQHRyYW5zZHVjZXIvdmFsdWUnXTtcbiAgICAgIGJyZWFrO1xuICAgIH1cblxuICAgIGlkeCAtPSAxO1xuICB9XG5cbiAgcmV0dXJuIGFjYztcbn0pO1xuXG5leHBvcnQgZGVmYXVsdCByZWR1Y2VSaWdodDsiLCJpbXBvcnQgX2N1cnJ5TiBmc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LCJfcmVkdWNlV2hpbGUiLCJzdGFydCIsInJlZ2V4IiwicmVwbGFjZW1lbnQiLCJ0cmF2ZXJzYWJsZSIsImZyb21JbmRleCIsInRvSW5kZXgiLCJjdXJyIiwiY3JlYXRlVGh1bmsiLCJmbkFyZ3MiLCJpbnZva2VUaHVuayIsIlJhbmdlRXJyb3IiLCJvdXRlcmxpc3QiLCJpbm5lcmxpc3QiLCJ3cyIsInplcm9XaWR0aCIsImhhc1Byb3RvVHJpbSIsImJlZ2luUngiLCJlbmRSeCIsIl90cnlDYXRjaCIsInRyeWVyIiwiY2F0Y2hlciIsImRlcHRoIiwiY3VycmVudERlcHRoIiwiZW5kSWR4Iiwic2VlZCIsImFwcGxpZWRJdGVtIiwid2hlbkZhbHNlRm4iLCJ0cmFuc2Zvcm1lcnMiLCJ2cyIsIkNvbnN0Iiwid2hlblRydWVGbiIsInRlc3RPYmoiLCJydiJdLCJzb3VyY2VSb290IjoiIn0= \ No newline at end of file diff --git a/dash/dash-renderer/build/dash_renderer.min.js b/dash/dash-renderer/build/dash_renderer.min.js index 1a3c4dc4e5..1e657e5714 100644 --- a/dash/dash-renderer/build/dash_renderer.min.js +++ b/dash/dash-renderer/build/dash_renderer.min.js @@ -1,2 +1,2 @@ /*! For license information please see dash_renderer.min.js.LICENSE.txt */ -!function(){var t={800:function(t,e,r){var n;window,t.exports=(n=r(196),function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e){t.exports=n},function(t,e,r){"use strict";r.r(e),r.d(e,"asyncDecorator",(function(){return a})),r.d(e,"inheritAsyncDecorator",(function(){return u})),r.d(e,"isReady",(function(){return c})),r.d(e,"History",(function(){return l}));var n=r(0);function o(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)}))}}var a=function(t,e){var r,o={isReady:new Promise((function(t){r=t})),get:Object(n.lazy)((function(){return Promise.resolve(e()).then((function(t){return setTimeout(i(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r(!0);case 2:o.isReady=!0;case 3:case"end":return t.stop()}}),t)}))),0),t}))}))};return Object.defineProperty(t,"_dashprivate_isLazyComponentReady",{get:function(){return o.isReady}}),o.get},u=function(t,e){Object.defineProperty(t,"_dashprivate_isLazyComponentReady",{get:function(){return c(e)}})},c=function(t){return t&&t._dashprivate_isLazyComponentReady};function s(t,e){for(var r=0;rdiv {\n position: relative;\n}\n._dash-undo-redo-link {\n color: #0074D9;\n cursor: pointer;\n margin-left: 10px;\n margin-right: 10px;\n display: inline-block;\n opacity: 0.2;\n}\n._dash-undo-redo-link:hover {\n opacity: 1;\n}\n._dash-undo-redo-link ._dash-icon-undo {\n font-size: 20px;\n transform: rotate(270deg);\n}\n._dash-undo-redo-link ._dash-icon-redo {\n font-size: 20px;\n transform: rotate(90deg);\n}\n._dash-undo-redo-link ._dash-undo-redo-label {\n font-size: 15px;\n}\n",""]),e.Z=a},645:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var u=0;u0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=i),r&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=r):f[2]=r),o&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=o):f[4]="".concat(o)),e.push(f))}},e}},81:function(t){"use strict";t.exports=function(t){return t[1]}},357:function(t,e){function r(t,e,r,n){var i={};return function(a){if(!i[a]){var u={},c=[],s=[];for(s.push({node:a,processed:!1});s.length>0;){var f=s[s.length-1],l=f.processed,p=f.node;if(l)s.pop(),c.pop(),u[p]=!1,i[p]=!0,e&&0!==t[p].length||r.push(p);else{if(i[p]){s.pop();continue}if(u[p]){if(n){s.pop();continue}throw c.push(p),new o(c)}u[p]=!0,c.push(p);for(var h=t[p],d=h.length-1;d>=0;d--)s.push({node:h[d],processed:!1});f.processed=!0}}}}}var n=e.f=function(t){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=t&&!!t.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(t,e){this.hasNode(t)||(this.nodes[t]=2===arguments.length?e:t,this.outgoingEdges[t]=[],this.incomingEdges[t]=[])},removeNode:function(t){this.hasNode(t)&&(delete this.nodes[t],delete this.outgoingEdges[t],delete this.incomingEdges[t],[this.incomingEdges,this.outgoingEdges].forEach((function(e){Object.keys(e).forEach((function(r){var n=e[r].indexOf(t);n>=0&&e[r].splice(n,1)}),this)})))},hasNode:function(t){return this.nodes.hasOwnProperty(t)},getNodeData:function(t){if(this.hasNode(t))return this.nodes[t];throw new Error("Node does not exist: "+t)},setNodeData:function(t,e){if(!this.hasNode(t))throw new Error("Node does not exist: "+t);this.nodes[t]=e},addDependency:function(t,e){if(!this.hasNode(t))throw new Error("Node does not exist: "+t);if(!this.hasNode(e))throw new Error("Node does not exist: "+e);return-1===this.outgoingEdges[t].indexOf(e)&&this.outgoingEdges[t].push(e),-1===this.incomingEdges[e].indexOf(t)&&this.incomingEdges[e].push(t),!0},removeDependency:function(t,e){var r;this.hasNode(t)&&(r=this.outgoingEdges[t].indexOf(e))>=0&&this.outgoingEdges[t].splice(r,1),this.hasNode(e)&&(r=this.incomingEdges[e].indexOf(t))>=0&&this.incomingEdges[e].splice(r,1)},clone:function(){var t=this,e=new n;return Object.keys(t.nodes).forEach((function(r){e.nodes[r]=t.nodes[r],e.outgoingEdges[r]=t.outgoingEdges[r].slice(0),e.incomingEdges[r]=t.incomingEdges[r].slice(0)})),e},directDependenciesOf:function(t){if(this.hasNode(t))return this.outgoingEdges[t].slice(0);throw new Error("Node does not exist: "+t)},directDependantsOf:function(t){if(this.hasNode(t))return this.incomingEdges[t].slice(0);throw new Error("Node does not exist: "+t)},dependenciesOf:function(t,e){if(this.hasNode(t)){var n=[];r(this.outgoingEdges,e,n,this.circular)(t);var o=n.indexOf(t);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+t)},dependantsOf:function(t,e){if(this.hasNode(t)){var n=[];r(this.incomingEdges,e,n,this.circular)(t);var o=n.indexOf(t);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+t)},overallOrder:function(t){var e=this,n=[],o=Object.keys(this.nodes);if(0===o.length)return n;if(!this.circular){var i=r(this.outgoingEdges,!1,[],this.circular);o.forEach((function(t){i(t)}))}var a=r(this.outgoingEdges,t,n,this.circular);return o.filter((function(t){return 0===e.incomingEdges[t].length})).forEach((function(t){a(t)})),this.circular&&o.filter((function(t){return-1===n.indexOf(t)})).forEach((function(t){a(t)})),n},entryNodes:function(){var t=this;return Object.keys(this.nodes).filter((function(e){return 0===t.incomingEdges[e].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var o=function(t){var e="Dependency Cycle Found: "+t.join(" -> "),r=new Error(e);return r.cyclePath=t,Object.setPrototypeOf(r,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(r,o),r};o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error)},924:function(t,e,r){"use strict";var n=r(244);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},679:function(t,e,r){"use strict";var n=r(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(t){return n.isMemo(t)?a:u[t.$$typeof]||o}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[n.Memo]=a;var s=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(d){var o=h(r);o&&o!==d&&t(e,o,n)}var a=f(r);l&&(a=a.concat(l(r)));for(var u=c(e),y=c(r),v=0;v13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},921:function(t,e){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,m=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case f:case l:case i:case u:case a:case h:return t;default:switch(t=t&&t.$$typeof){case s:case p:case v:case y:case c:return t;default:return e}}case o:return e}}}function _(t){return O(t)===l}e.AsyncMode=f,e.ConcurrentMode=l,e.ContextConsumer=s,e.ContextProvider=c,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=v,e.Memo=y,e.Portal=o,e.Profiler=u,e.StrictMode=a,e.Suspense=h,e.isAsyncMode=function(t){return _(t)||O(t)===f},e.isConcurrentMode=_,e.isContextConsumer=function(t){return O(t)===s},e.isContextProvider=function(t){return O(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return O(t)===p},e.isFragment=function(t){return O(t)===i},e.isLazy=function(t){return O(t)===v},e.isMemo=function(t){return O(t)===y},e.isPortal=function(t){return O(t)===o},e.isProfiler=function(t){return O(t)===u},e.isStrictMode=function(t){return O(t)===a},e.isSuspense=function(t){return O(t)===h},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===u||t===a||t===h||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===y||t.$$typeof===c||t.$$typeof===s||t.$$typeof===p||t.$$typeof===b||t.$$typeof===m||t.$$typeof===w||t.$$typeof===g)},e.typeOf=O},864:function(t,e,r){"use strict";t.exports=r(921)},379:function(t){"use strict";var e=[];function r(t){for(var r=-1,n=0;n0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},196:function(t){"use strict";t.exports=window.React}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var n={};!function(){"use strict";var t="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==t&&t,e="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,n="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,i="ArrayBuffer"in t;if(i)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function d(t){var e=new FileReader,r=h(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var r;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i&&n&&(r=t)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(d)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=h(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function w(t,e){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];w.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})};var _=t.DOMException;try{new _}catch(t){(_=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),_.prototype.constructor=_}function E(e,r){return new Promise((function(o,a){var u=new b(e,r);if(u.signal&&u.signal.aborted)return a(new _("Aborted","AbortError"));var c=new XMLHttpRequest;function f(){c.abort()}c.onload=function(){var t,e,r={status:c.status,statusText:c.statusText,headers:(t=c.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in c?c.responseURL:r.headers.get("X-Request-URL");var n="response"in c?c.response:c.responseText;setTimeout((function(){o(new w(n,r))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.onabort=function(){setTimeout((function(){a(new _("Aborted","AbortError"))}),0)},c.open(u.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?c.withCredentials=!0:"omit"===u.credentials&&(c.withCredentials=!1),"responseType"in c&&(n?c.responseType="blob":i&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof l?u.headers.forEach((function(t,e){c.setRequestHeader(e,t)})):Object.getOwnPropertyNames(r.headers).forEach((function(t){c.setRequestHeader(t,s(r.headers[t]))})),u.signal&&(u.signal.addEventListener("abort",f),c.onreadystatechange=function(){4===c.readyState&&u.signal.removeEventListener("abort",f)}),c.send(void 0===u._bodyInit?null:u._bodyInit)}))}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=l,t.Request=b,t.Response=w)}(),function(){"use strict";r.r(n);var t=r(196),e=r.n(t),o=window.ReactDOM,i=r.n(o),a=window.PropTypes,u=r.n(a),c=r(270),s=r(826),f=function(t){t()},l=function(){return f},p=(0,t.createContext)(null);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[r]=t[r]);return o}var y=r(679),v=r.n(y),g=r(100),b=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function m(t,e,r,n,o){var i,a,u,c,s,f=o.areStatesEqual,l=o.areOwnPropsEqual,p=o.areStatePropsEqual,h=!1;return function(o,d){return h?function(o,h){var d,y,v=!l(h,a),g=!f(o,i,h,a);return i=o,a=h,v&&g?(u=t(i,a),e.dependsOnOwnProps&&(c=e(n,a)),s=r(u,c,a)):v?(t.dependsOnOwnProps&&(u=t(i,a)),e.dependsOnOwnProps&&(c=e(n,a)),s=r(u,c,a)):g?(d=t(i,a),y=!p(d,u),u=d,y&&(s=r(u,c,a)),s):s}(o,d):(u=t(i=o,a=d),c=e(n,a),s=r(u,c,a),h=!0,s)}}function w(t,e){var r=e.initMapStateToProps,n=e.initMapDispatchToProps,o=e.initMergeProps,i=d(e,b);return m(r(t,i),n(t,i),o(t,i),t,i)}function O(t){return function(e){var r=t(e);function n(){return r}return n.dependsOnOwnProps=!1,n}}function _(t){return t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function E(t,e){return function(e,r){r.displayName;var n=function(t,e){return n.dependsOnOwnProps?n.mapToProps(t,e):n.mapToProps(t,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(e,r){n.mapToProps=t,n.dependsOnOwnProps=_(t);var o=n(e,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=_(o),o=n(e,r)),o},n}}function j(t,e){return function(r,n){throw new Error("Invalid value of type ".concat(typeof t," for ").concat(e," argument when connecting component ").concat(n.wrappedComponentName,"."))}}function x(t){return t&&"object"==typeof t?O((function(e){return function(t,e){var r={},n=function(n){var o=t[n];"function"==typeof o&&(r[n]=function(){return e(o.apply(void 0,arguments))})};for(var o in t)n(o);return r}(t,e)})):t?"function"==typeof t?E(t):j(t,"mapDispatchToProps"):O((function(t){return{dispatch:t}}))}function S(t){return t?"function"==typeof t?E(t):j(t,"mapStateToProps"):O((function(){return{}}))}function P(t,e,r){return h({},r,t,e)}function A(t){return t?"function"==typeof t?function(t){return function(e,r){r.displayName;var n,o=r.areMergedPropsEqual,i=!1;return function(e,r,a){var u=t(e,r,a);return i?o(u,n)||(n=u):(i=!0,n=u),n}}}(t):j(t,"mergeProps"):function(){return P}}var k={notify(){},get:function(){return[]}};function T(t,e){var r,n=k;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=e?e.addNestedSub(o):t.subscribe(o),n=function(){var t=l(),e=null,r=null;return{clear(){e=null,r=null},notify(){t((function(){for(var t=e;t;)t.callback(),t=t.next}))},get(){for(var t=[],r=e;r;)t.push(r),r=r.next;return t},subscribe(t){var n=!0,o=r={callback:t,next:null,prev:r};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}var a={addNestedSub:function(t){return i(),n.subscribe(t)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=k)},getListeners:function(){return n}};return a}var L="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function I(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function R(t,e){if(I(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;ot.length)&&(e=t.length);for(var r=0,n=new Array(e);r3&&void 0!==arguments[3]?arguments[3]:{},a=(i.pure,i.areStatesEqual),u=void 0===a?H:a,c=i.areOwnPropsEqual,s=void 0===c?R:c,f=i.areStatePropsEqual,l=void 0===f?R:f,y=i.areMergedPropsEqual,b=void 0===y?R:y,m=i.forwardRef,O=void 0!==m&&m,_=i.context,E=void 0===_?p:_,j=E,P=S(r),k=x(n),I=A(o),N=Boolean(r),D=function(r){var n=r.displayName||r.name||"Component",o="Connect(".concat(n,")"),i={shouldHandleStateChanges:N,displayName:o,wrappedComponentName:n,WrappedComponent:r,initMapStateToProps:P,initMapDispatchToProps:k,initMergeProps:I,areStatesEqual:u,areStatePropsEqual:l,areOwnPropsEqual:s,areMergedPropsEqual:b};function a(n){var o=(0,t.useMemo)((function(){var t=n.reactReduxForwardedRef,e=d(n,M);return[n.context,t,e]}),[n]),a=C(o,3),u=a[0],c=a[1],s=a[2],f=(0,t.useMemo)((function(){return u&&u.Consumer&&(0,g.isContextConsumer)(e().createElement(u.Consumer,null))?u:j}),[u,j]),l=(0,t.useContext)(f),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),y=Boolean(l)&&Boolean(l.store),v=p?n.store:l.store,b=y?l.getServerState:v.getState,m=(0,t.useMemo)((function(){return w(v.dispatch,i)}),[v]),O=(0,t.useMemo)((function(){if(!N)return q;var t=T(v,p?void 0:l.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[v,p,l]),_=C(O,2),E=_[0],x=_[1],S=(0,t.useMemo)((function(){return p?l:h({},l,{subscription:E})}),[p,l,E]),P=(0,t.useRef)(),A=(0,t.useRef)(s),k=(0,t.useRef)(),I=(0,t.useRef)(!1),R=((0,t.useRef)(!1),(0,t.useRef)(!1)),D=(0,t.useRef)();L((function(){return R.current=!0,function(){R.current=!1}}),[]);var H,$=(0,t.useMemo)((function(){return function(){return k.current&&s===A.current?k.current:m(v.getState(),s)}}),[v,s]),z=(0,t.useMemo)((function(){return function(t){return E?F(N,v,E,m,A,P,I,R,k,x,t):function(){}}}),[E]);G(B,[A,P,I,s,k,x]);try{H=U(z,$,b?function(){return m(b(),s)}:$)}catch(t){throw D.current&&(t.message+="\nThe error may be correlated with this previous error:\n".concat(D.current.stack,"\n\n")),t}L((function(){D.current=void 0,k.current=void 0,P.current=H}));var J=(0,t.useMemo)((function(){return e().createElement(r,h({},H,{ref:c}))}),[c,r,H]);return(0,t.useMemo)((function(){return N?e().createElement(f.Provider,{value:S},J):J}),[f,J,S])}var c=e().memo(a);if(c.WrappedComponent=r,c.displayName=a.displayName=o,O){var f=e().forwardRef((function(t,r){return e().createElement(c,h({},t,{reactReduxForwardedRef:r}))}));return f.displayName=o,f.WrappedComponent=r,v()(f,r)}return v()(c,r)};return D},J=function(r){var n=r.store,o=r.context,i=r.children,a=r.serverState,u=(0,t.useMemo)((function(){var t=T(n);return{store:n,subscription:t,getServerState:a?function(){return a}:void 0}}),[n,a]),c=(0,t.useMemo)((function(){return n.getState()}),[n]);L((function(){var t=u.subscription;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),c!==n.getState()&&t.notifyNestedSubs(),function(){t.tryUnsubscribe(),t.onStateChange=void 0}}),[u,c]);var s=o||p;return e().createElement(s.Provider,{value:u},i)};function Y(t,e){var r;e=e||[];var n=(t=t||[]).length,o=e.length,i=[];for(r=0;r=arguments.length)?u=e[a]:(u=arguments[o],o+=1),n[a]=u,W(u)||(i-=1),a+=1}return i<=0?r.apply(this,n):V(i,Q(t,n,r))}}s.useSyncExternalStoreWithSelector,function(t){U=t}(c.useSyncExternalStore),$=o.unstable_batchedUpdates,f=$;var X=Z((function(t,e){return 1===t?K(e):V(t,Q(t,[],e))})),tt=X,et=K((function(t){return tt(t.length,(function(){var e=0,r=arguments[0],n=arguments[arguments.length-1],o=Array.prototype.slice.call(arguments,0);return o[0]=function(){var t=r.apply(this,Y(arguments,[e,n]));return e+=1,t},t.apply(this,o)}))})),rt=et,nt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};function ot(t){return null!=t&&"function"==typeof t["@@transducer/step"]}function it(t,e,r){return function(){if(0===arguments.length)return r();var n=arguments[arguments.length-1];if(!nt(n)){for(var o=0;o0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),yt=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),vt=Z((function(t,e){return V(t.length,(function(){return t.apply(e,arguments)}))})),gt=vt;function bt(t,e,r){for(var n=r.next();!n.done;){if((e=t["@@transducer/step"](e,n.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}n=r.next()}return t["@@transducer/result"](e)}function mt(t,e,r,n){return t["@@transducer/result"](r[n](gt(t["@@transducer/step"],t),e))}var wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Ot(t,e,r){if("function"==typeof t&&(t=function(t){return new yt(t)}(t)),dt(r))return function(t,e,r){for(var n=0,o=r.length;n=0;)jt(e=kt[r],t)&&!Lt(n,e)&&(n[n.length]=e),r-=1;return n})):K((function(t){return Object(t)!==t?[]:Object.keys(t)})),Rt=Z(it(["fantasy-land/map","map"],Et,(function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return tt(e.length,(function(){return t.call(this,e.apply(this,arguments))}));case"[object Object]":return Ot((function(r,n){return r[n]=t(e[n]),r}),{},It(e));default:return pt(t,e)}}))),Ct=Rt,Nt=Number.isInteger||function(t){return t<<0===t},Dt=Z((function(t,e){var r=t<0?e.length+t:t;return ht(e)?e.charAt(r):e[r]})),Mt=Z((function(t,e){if(null!=e)return Nt(t)?Dt(t,e):e[t]})),Ut=Z((function(t,e){return Ct(Mt(t),e)}));function qt(t){return function e(r,n,o){switch(arguments.length){case 0:return e;case 1:return W(r)?e:Z((function(e,n){return t(r,e,n)}));case 2:return W(r)&&W(n)?e:W(r)?Z((function(e,r){return t(e,n,r)})):W(n)?Z((function(e,n){return t(r,e,n)})):K((function(e){return t(r,n,e)}));default:return W(r)&&W(n)&&W(o)?e:W(r)&&W(n)?Z((function(e,r){return t(e,r,o)})):W(r)&&W(o)?Z((function(e,r){return t(e,n,r)})):W(n)&&W(o)?Z((function(e,n){return t(r,e,n)})):W(r)?K((function(e){return t(e,n,o)})):W(n)?K((function(e){return t(r,e,o)})):W(o)?K((function(e){return t(r,n,e)})):t(r,n,o)}}}var Gt=qt(Ot),Bt=function(){function t(t,e){this.xf=e,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=ut,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.any=!0,t=at(this.xf["@@transducer/step"](t,!0))),t},t}(),Ft=Z(it(["any"],Z((function(t,e){return new Bt(t,e)})),(function(t,e){for(var r=0;r1){var i=!Yt(n)&&jt(o,n)?n[o]:Nt(e[1])?[]:{};r=t(Array.prototype.slice.call(e,1),r,i)}return function(t,e,r){if(Nt(t)&&nt(r)){var n=[].concat(r);return n[t]=e,n}var o={};for(var i in r)o[i]=r[i];return o[t]=e,o}(o,r,n)})),Kt=qt((function(t,e,r){return Wt([t],e,r)}));function Vt(t){return function e(r){for(var n,o,i,a=[],u=0,c=r.length;u=0;){if(r[u]===t)return n[u]===e;u-=1}switch(a){case"Map":return t.size===e.size&&ue(t.entries(),e.entries(),r.concat([t]),n.concat([e]));case"Set":return t.size===e.size&&ue(t.values(),e.values(),r.concat([t]),n.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=It(t);if(c.length!==It(e).length)return!1;var s=r.concat([t]),f=n.concat([e]);for(u=c.length-1;u>=0;){var l=c[u];if(!jt(l,e)||!ce(e[l],t[l],s,f))return!1;u-=1}return!0}var se=Z((function(t,e){return ce(t,e,[],[])}));function fe(t,e){return function(t,e,r){var n,o;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(n=1/e;r=0}function le(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var pe=function(t){return(t<10?"0":"")+t},he="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+pe(t.getUTCMonth()+1)+"-"+pe(t.getUTCDate())+"T"+pe(t.getUTCHours())+":"+pe(t.getUTCMinutes())+":"+pe(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function de(t,e){for(var r=0,n=e.length,o=[];r":we(r,n)},n=function(t,e){return pt((function(e){return le(e)+": "+r(t[e])}),e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+pt(r,t).join(", ")+"))";case"[object Array]":return"["+pt(r,t).concat(n(t,me((function(t){return/^\d+$/.test(t)}),It(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):le(he(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":le(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var o=t.toString();if("[object Object]"!==o)return o}return"{"+n(t,It(t)).join(", ")+"}"}}var Oe=K((function(t){return we(t,[])})),_e=Z((function(t,e){if(nt(t)){if(nt(e))return t.concat(e);throw new TypeError(Oe(e)+" is not an array")}if(ht(t)){if(ht(e))return t+e;throw new TypeError(Oe(e)+" is not a string")}if(null!=t&&ne(t["fantasy-land/concat"]))return t["fantasy-land/concat"](e);if(null!=t&&ne(t.concat))return t.concat(e);throw new TypeError(Oe(t)+' does not have a method named "concat" or "fantasy-land/concat"')})),Ee=Z((function(t,e){return e>t?e:t})),je=Z((function(t,e){return tt(Gt(Ee,0,Ut("length",e)),(function(){var r=arguments,n=this;return t.apply(n,pt((function(t){return t.apply(n,r)}),e))}))})),xe=je,Se=function(){function t(t,e,r,n){this.valueFn=t,this.valueAcc=e,this.keyFn=r,this.xf=n,this.inputs={}}return t.prototype["@@transducer/init"]=ut,t.prototype["@@transducer/result"]=function(t){var e;for(e in this.inputs)if(jt(e,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[e]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var r=this.keyFn(e);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],e),t},t}(),Pe=Q(4,[],it([],Q(4,[],(function(t,e,r,n){return new Se(t,e,r,n)})),(function(t,e,r,n){return Ot((function(n,o){var i=r(o),a=t(jt(i,n)?n[i]:Qt(e,[],[],!1),o);return a&&a["@@transducer/reduced"]?at(n):(n[i]=a,n)}),{},n)})));function Ae(t,e,r){var n,o=typeof t;switch(o){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(e&&(r._items["-0"]=!0),!1):null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):o in r._items?t in r._items[o]||(e&&(r._items[o][t]=!0),!1):(e&&(r._items[o]={},r._items[o][t]=!0),!1);case"boolean":if(o in r._items){var i=t?1:0;return!!r._items[o][i]||(e&&(r._items[o][i]=!0),!1)}return e&&(r._items[o]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):o in r._items?!!fe(t,r._items[o])||(e&&r._items[o].push(t),!1):(e&&(r._items[o]=[t]),!1);case"undefined":return!!r._items[o]||(e&&(r._items[o]=!0),!1);case"object":if(null===t)return!!r._items.null||(e&&(r._items.null=!0),!1);default:return(o=Object.prototype.toString.call(t))in r._items?!!fe(t,r._items[o])||(e&&r._items[o].push(t),!1):(e&&(r._items[o]=[t]),!1)}}var ke=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!Ae(t,!0,this)},t.prototype.has=function(t){return Ae(t,!1,this)},t}(),Te=Z((function(t,e){for(var r=[],n=0,o=t.length,i=e.length,a=new ke,u=0;u=0&&this.i>=this.n?at(r):r},t}(),Ne=Z(it(["take"],Z((function(t,e){return new Ce(t,e)})),(function(t,e){return re(0,t<0?1/0:t,e)}))),De=K((function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():nt(t)?[]:ht(t)?"":ye(t)?{}:Pt(t)?function(){return arguments}():(e=t,"[object Uint8ClampedArray]"===(r=Object.prototype.toString.call(e))||"[object Int8Array]"===r||"[object Uint8Array]"===r||"[object Int16Array]"===r||"[object Uint16Array]"===r||"[object Int32Array]"===r||"[object Uint32Array]"===r||"[object Float32Array]"===r||"[object Float64Array]"===r||"[object BigInt64Array]"===r||"[object BigUint64Array]"===r?t.constructor.from(""):void 0);var e,r})),Me=De,Ue=Z((function t(e,r){if(!ye(r)&&!nt(r))return r;var n,o,i,a=r instanceof Array?[]:{};for(o in r)i=typeof(n=e[o]),a[o]="function"===i?n(r[o]):n&&"object"===i?t(n,r[o]):r[o];return a})),qe=function(){function t(t,e){this.xf=e,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=ut,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.found=!0,t=at(this.xf["@@transducer/step"](t,e))),t},t}(),Ge=Z(it(["find"],Z((function(t,e){return new qe(t,e)})),(function(t,e){for(var r=0,n=e.length;re.length?(r=t,n=e):(r=e,n=t),ar(de(nr(fe)(r),n))})),cr="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,n=arguments.length;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;if(Array.isArray(e))e.forEach((function(e,i){o?t(dr(o,e),r,_e(n,_e([i],o))):t(e,r,zt(i,n))}));else if("Object"===Zt(e)){r(e,n);var i=dr(mn,e);if(i){var a=_e(n,mn);t(i,r,a)}var u=Rr([],[e.namespace,e.type],window.__dashprivate_childrenProps);u.forEach((function(o){if(o.includes("[]")){var i=yn(o.split("[]").map((function(t){return t.split(".").filter((function(t){return t}))})),2),a=i[0],u=i[1],c=_e(["props"],a),s=_e(n,c);t(dr(c,e),r,s,u)}else{var f=_e(n,["props"].concat(dn(o.split("."))));t(dr(["props"].concat(dn(o.split("."))),e),r,f)}}))}},On=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._ev={}}var e,r;return e=t,r=[{key:"on",value:function(t,e){var r=this;return(this._ev[t]=this._ev[t]||[]).push(e),function(){return r.removeListener(t,e)}}},{key:"removeListener",value:function(t,e){var r=this._ev[t];if(r){var n=r.indexOf(e);n>-1&&r.splice(n,1)}}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),o=1;ot.length)&&(e=t.length);for(var r=0,n=new Array(e);ro?1:ne?1:t=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(u.s();!(r=u.n()).done;){var c=r.value,s=c.id;if(c.property===o&&"string"!=typeof s&&se(It(s).sort(),i)&<(Jn,Wr(a,Ur(i,s))))return c}}catch(t){u.e(t)}finally{u.f()}return!1}function Wn(t,e){var r=new fn.f,n={},o=Ct(Ue({id:Gn})),i=Ct((function(t){var e,r=t.output,n=Ue({inputs:o,state:o},t);return n.outputs=Ct((function(t){return Kt("out",!0,qn(t))}),Ln(r)?(e=r).substr(2,e.length-4).split("..."):[r]),n}),t),a=!1;!function(t,e){var r={},n=[];t.forEach((function(t){var o=t.inputs,i=t.outputs,a=t.state,u=!0;1!==i.length||i[0].id||i[0].property||(u=!1,e("A callback is missing Outputs",["Please provide an output for this callback:",JSON.stringify(t,null,2)]));var c="In the callback for output(s):\n "+i.map(lo).join("\n ");o.length||e("A callback is missing Inputs",[c,"there are no `Input` elements.","Without `Input` elements, it will never get called.","","Subscribing to `Input` components will cause the","callback to be called whenever their values change."]),[[i,"Output"],[o,"Input"],[a,"State"]].forEach((function(t){var r=An(t,2),n=r[0],o=r[1];("Output"!==o||u)&&(Array.isArray(n)||e("Callback ".concat(o,"(s) must be an Array"),[c,"For ".concat(o,"(s) we found:"),JSON.stringify(n),"but we expected an Array."]),n.forEach((function(t,r){!function(t,e,r,n,o){var i=t.id,a=t.property;if("string"==typeof a&&a||o("Callback property error",[e,"".concat(r,"[").concat(n,"].property = ").concat(JSON.stringify(a)),"but we expected `property` to be a non-empty string."]),"object"==typeof i)sr(i)&&o("Callback item missing ID",[e,"".concat(r,"[").concat(n,"].id = {}"),"Every item linked to a callback needs an ID"]),Ke((function(t,i){i||o("Callback wildcard ID error",[e,"".concat(r,"[").concat(n,'].id has key "').concat(i,'"'),"Keys must be non-empty strings."]),"object"==typeof t&&t.wild?Dn[r][t.wild]!==t&&o("Callback wildcard ID error",[e,"".concat(r,"[").concat(n,'].id["').concat(i,'"] = ').concat(t.wild),"Allowed wildcards for ".concat(r,"s are:"),It(Dn[r]).join(", ")]):er(typeof t,Mn)||o("Callback wildcard ID error",[e,"".concat(r,"[").concat(n,'].id["').concat(i,'"] = ').concat(JSON.stringify(t)),"Wildcard callback ID values must be either wildcards","or constants of one of these types:",Mn.join(", ")])}),i);else if("string"==typeof i){i||o("Callback item missing ID",[e,"".concat(r,"[").concat(n,'].id = "').concat(i,'"'),"Every item linked to a callback needs an ID"]);var u=Un.filter((function(t){return er(t,i)}));u.length&&o("Callback invalid ID string",[e,"".concat(r,"[").concat(n,"].id = '").concat(i,"'"),"characters '".concat(u.join("', '"),"' are not allowed.")])}else o("Callback ID type error",[e,"".concat(r,"[").concat(n,"].id = ").concat(JSON.stringify(i)),"IDs must be strings or wildcard-compatible objects."])}(t,c,o,r,e)})))})),function(t,e,r,n,o){var i={},a=[];t.forEach((function(t,u){var c=t.id,s=t.property;if("string"==typeof c){var f=lo({id:c,property:s});i[f]?r("Duplicate callback Outputs",[e,"Output ".concat(u," (").concat(f,") is already used by this callback.")]):n[f]?r("Duplicate callback outputs",[e,"Output ".concat(u," (").concat(f,") is already in use."),"Any given output can only have one callback that sets it.","To resolve this situation, try combining these into","one callback function, distinguishing the trigger","by using `dash.callback_context` if necessary."]):i[f]=1}else{var l={id:c,property:s},p=Yn(l,a),h=p||Yn(l,o);if(p||h){var d=lo(l),y=lo(p||h);r("Overlapping wildcard callback outputs",[e,"Output ".concat(u," (").concat(d,")"),"overlaps another output (".concat(y,")"),"used in ".concat(p?"this":"a different"," callback.")])}else a.push(l)}})),It(i).forEach((function(t){n[t]=1})),a.forEach((function(t){o.push(t)}))}(i,c,e,r,n),function(t,e,r,n,o){var i=Kn(t[0].id).matchKeys;t.forEach((function(e,r){r&&!se(Kn(e.id).matchKeys,i)&&o("Mismatched `MATCH` wildcards across `Output`s",[n,"Output ".concat(r," (").concat(lo(e),")"),"does not have MATCH wildcards on the same keys as","Output 0 (".concat(lo(t[0]),")."),"MATCH wildcards must be on the same keys for all Outputs.","ALL wildcards need not match, only MATCH."])})),[[e,"Input"],[r,"State"]].forEach((function(e){var r=An(e,2),a=r[0],u=r[1];a.forEach((function(e,r){var a=Kn(e.id),c=a.matchKeys,s=a.allsmallerKeys,f=c.concat(s),l=Te(f,i);l.length&&(l.sort(),o("`Input` / `State` wildcards not in `Output`s",[n,"".concat(u," ").concat(r," (").concat(lo(e),")"),"has MATCH or ALLSMALLER on key(s) ".concat(l.join(", ")),"where Output 0 (".concat(lo(t[0]),")"),"does not have a MATCH wildcard. Inputs and State do not","need every MATCH from the Output(s), but they cannot have","extras beyond the Output(s)."]))}))}))}(i,o,a,c,e)}))}(i,(function(t,r){a=!0,e(t,r)}));var u={},c={},s={},f={},l={MultiGraph:r,outputMap:u,inputMap:c,outputPatterns:s,inputPatterns:f,callbacks:i};if(a)return l;function p(t,e){var r=[{}];return Ke((function(t,o){var i=n[o].vals,a=i.indexOf(e[o]),u=[t];t&&t.wild&&(u=t===Cn?a>0?i.slice(0,a):[]:-1===a||t===In?i:[e[o]]),r=$t($t([Kt(o)],u),r)}),t),r}i.forEach((function(t){var e=t.outputs,r=t.inputs;e.concat(r).forEach((function(t){var e=t.id;"object"==typeof e&&Ke((function(t,e){n[e]||(n[e]={exact:[],expand:0});var r=n[e];t&&t.wild?t.expand&&(r.expand+=1):-1===r.exact.indexOf(t)&&r.exact.push(t)}),e)}))})),Ke((function(t){var e,r=t.exact,n=t.expand,o=r.slice().sort(Fn);if(n)for(var i=0;i2&&void 0!==arguments[2])||arguments[2];r.addNode(t),r.addDependency(t,e),n&&(y[y.length-1].push(t),v[v.length-1].push(e))}return i.forEach((function(t){var e=t.outputs,n=t.inputs;function o(t,e){r.addNode(e),n.forEach((function(r){var n=r.id,o=r.property;"object"==typeof n?p(n,t).forEach((function(t){g(lo({id:t,property:o}),e)})):g(lo(r),e)}))}y.push([]),v.push([]);var i=Kn(e[0].id).matchKeys,a=$e((function(t){return!Qn(t.id)}),e),l=xr({matchKeys:i,firstSingleOutput:a,outputs:e},t);e.forEach((function(t){var e=t.id,r=t.property,i=function(t,e){var r=t.id,n=t.property;return e.some((function(e){var o=e.id,i=e.property;if(n!==i||typeof r!=typeof o)return!1;if("string"==typeof r){if(r===o)return!0}else if(Yn(e,[t]))return!0;return!1}))}(t,n);if("object"==typeof e)p(e,{}).forEach((function(t){var e={id:t,property:r},n=lo(e);i&&(d.push(e),n+=h),o(t,n)})),zn(s,e,r,l);else{var a=lo(t);i&&(d.push(t),a+=h),o({},a),$n(u,e,r,l)}})),n.forEach((function(t){var e=t.id,r=t.property;"object"==typeof e?zn(f,e,r,l):$n(c,e,r,l)}))})),d.forEach((function(t){for(var e=lo(t),r=e.concat(h),n=0;nt.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5])||arguments[5],a=[],u=lo({id:r,property:n});if("string"==typeof r){var c=(t.inputMap[r]||{})[n];if(!c)return[];c.forEach(eo(_o(),e,a))}else{var s=Object.keys(r).sort(),f=Ur(s,r),l=s.join(","),p=(t.inputPatterns[l]||{})[n];if(!p)return[];p.forEach((function(t){Vn(s,f,t.values)&&t.callbacks.forEach(eo(_o(s,f,t.values),e,a))}))}return a.forEach((function(r){r.changedPropIds[u]=o||2,i&&(r.priority=ho(t,e,r))})),a}function ho(t,e,r){for(var n=[r],o={},i={},a=[];n.length;){n=ge((function(t){var e=i[t.resolvedId];return i[t.resolvedId]=!0,e}),n);var u=ge((function(t){return!o[lo(t)]}),ze(Ct((function(t){return ze(t.getOutputs(e))}),n)));u.forEach((function(t){return o[lo(t)]=!0})),(n=ze(Ct((function(r){var n=r.id,o=r.property;return po(t,e,n,o,so,!1)}),u))).length&&a.push(n.length)}return a.unshift(a.length),Ct((function(t){return Math.min(t,35).toString(36)}),a).join("")}function yo(t,e,r){for(var n=[r],o={};n.length;){var i=ge((function(t){return!o[lo(t)]}),ze(Ct((function(t){return ze(t.getOutputs(e))}),n)));o=Gt((function(t,e){return Kt(lo(e),!0,t)}),o,i),n=ze(Ct((function(r){var n=r.id,o=r.property;return po(t,e,n,o,so,!1)}),i))}return o}var vo=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e.length)return[];var o=Ct(lo,Gt((function(e,r){return _e(e,ze(r.getOutputs(t)))}),[],r)),i={};if(Ye((function(t){return i[t]=!0}),o),Object.keys(n).length){var a=ze(Ct((function(e){return yo(n,t,e)}),r));a.length>0&&(i=Object.assign.apply(Object,[a[0]].concat(ao(a))))}return ge((function(e){return lt((function(t){return!i[lo(t)]}),Te(ze(e.getInputs(t)),ze(e.getOutputs(t))))}),e)},go=function(t,e,r,n){for(var o=[],i=function(t,e,r,n){var o=n.outputsOnly,i=n.removedArrayInputsOnly,a=n.newPaths,u=n.chunkPath,c={},s=[];function f(t){if(t){var e=c[t.resolvedId];if(void 0!==e){var r=s[e];r.changedPropIds=fo(r.changedPropIds,t.changedPropIds),t.initialCall&&(r.initialCall=!0)}else c[t.resolvedId]=s.length,s.push(t)}}function l(r,n,c){if(n)for(var s in n){var l=Xn(t,0,r,s);l&&(l.callback.prevent_initial_call||(l.initialCall=!0,f(l)))}if(!o&&c){var p=i?(y=Bn(r),function(t){return t.getInputs(e).some((function(e){return!(!Array.isArray(e)||!e.some((function(t){return Bn(t.id)===y}))||(ze(t.getOutputs(a)).length&&(t.initialCall=!0,t.changedPropIds={},f(t)),0))}))}):f,h=p;for(var d in u&&(h=function(t){lt($r(u),Ut("path",ze(t.getOutputs(e))))||p(t)}),c)po(t,e,r,d,so).forEach(h)}var y}return wn(r,(function(e){var r=dr(["props","id"],e);if(r)if("string"!=typeof r||i){var n=Object.keys(r).sort().join(",");l(r,!i&&t.outputPatterns[n],t.inputPatterns[n])}else l(r,t.outputMap[r],t.inputMap[r])})),Ct((function(r){return Sn(Sn({},r),{},{priority:ho(t,e,r)})}),s)}(t,e,r,n);;){var a=io(Lr((function(t){var r=t.callback.inputs,n=t.getInputs;return lt(Qn,r)||!sr(Te(Ct(lo,ze(n(e))),o))}),i),2),u=a[0],c=a[1];if(!c.length)break;i=u,o=_e(o,Ct(lo,ze(Ct((function(t){return(0,t.getOutputs)(e)}),c))))}var s=Math.random().toString(16);return Ct((function(t){return no(no({},t),{},{executionGroup:s})}),i)},bo=function(t){var e=t.anyVals,r=t.callback,n=r.inputs,o=r.outputs,i=r.state;return _e(Ct(lo,[].concat(ao(n),ao(o),ao(i))),Array.isArray(e)?e:""===e?[]:[e]).join(",")};function mo(t,e,r,n){return ze(Ct((function(e){return po(r,n,t,e)}),It(e)))}var wo=function(t,e,r){return{callback:t,anyVals:r,resolvedId:t.output+r,getOutputs:function(r){return t.outputs.map(e(r))},getInputs:function(r){return t.inputs.map(e(r))},getState:function(r){return t.state.map(e(r))},changedPropIds:{},initialCall:!1}};function Oo(t,e){var r=io(Lr((function(t){var r=t.getOutputs,n=t.callback.outputs;return ze(r(e)).length===n.length}),t),2)[1],n=io(Lr((function(t){var r=t.getOutputs;return!ze(r(e)).length}),r),2)[1];return{added:Ct((function(t){return Kt("changedPropIds",Nr((function(t,r){return En(e,qn(r).id)}),t.changedPropIds),t)}),n),removed:r}}function _o(t,e,r){return function(n){return function(o){var i=o.id,a=o.property;if("string"==typeof i){var u=En(n,i);return u?[{id:i,property:a,path:u}]:[]}var c=Object.keys(i).sort(),s=Ur(c,i),f=c.join(","),l=n.objs[f];if(!l)return[];var p=[];return l.forEach((function(n){var o=n.values,i=n.path;Vn(c,o,s,t,e,r)&&p.push({id:Kr(c,o),property:a,path:i})})),p}}}var Eo={ON_PROP_CHANGE:1,SET_REQUEST_QUEUE:1,SET_GRAPHS:1,SET_PATHS:1,SET_LAYOUT:1,SET_APP_LIFECYCLE:1,SET_CONFIG:1,ADD_HTTP_HEADERS:1,ON_ERROR:1,SET_HOOKS:1},jo=function(t){if(Eo[t])return t;throw new Error("".concat(t," is not defined."))};function xo(t){var e={STARTED:"STARTED",HYDRATED:"HYDRATED",DESTROYED:"DESTROYED"};if(e[t])return e[t];throw new Error("".concat(t," is not a valid app state."))}var So,Po,Ao=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:xo("STARTED"),e=arguments.length>1?arguments[1]:void 0;return e.type===jo("SET_APP_LIFECYCLE")?xo(e.payload):t};function ko(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function To(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:Io,e=arguments.length>1?arguments[1]:void 0;return Gt((function(t,e){return null===e?t:e.type===Po.AddCompleted?No(t,e):Do(t,e)}),t,e.type===Po.Aggregate?e.payload:[e])};function Uo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;return e.type===jo("SET_CONFIG")?(window.__dashprivate_childrenProps=Er(window.__dashprivate_childrenProps||{},e.payload.children_props),e.payload):e.type===jo("ADD_HTTP_HEADERS")?Er(t,{fetch:{headers:e.payload}}):t}var qo={},Go=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qo,e=arguments.length>1?arguments[1]:void 0;return"SET_GRAPHS"===e.type?e.payload:t};function Bo(t){return function(t){if(Array.isArray(t))return Fo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Fo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Fo(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:Ho,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ON_ERROR":var r=t.frontEnd,n=t.backEnd,o=t.backEndConnected;return console.error(e.payload.error),"frontEnd"===e.payload.type?{frontEnd:[xr(e.payload,{timestamp:new Date})].concat(Bo(r)),backEnd:n,backEndConnected:o}:"backEnd"===e.payload.type?{frontEnd:r,backEnd:[xr(e.payload,{timestamp:new Date})].concat(Bo(n)),backEndConnected:o}:t;case"SET_CONNECTION_STATUS":return xr(t,{backEndConnected:e.payload});default:return t}}function zo(t){return function(t){if(Array.isArray(t))return Jo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Jo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jo(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:Yo,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UNDO":var r=t.past,n=t.present,o=t.future,i=r[r.length-1],a=r.slice(0,r.length-1);return{past:a,present:i,future:[n].concat(zo(o))};case"REDO":var u=t.past,c=t.present,s=t.future,f=s[0],l=s.slice(1);return{past:[].concat(zo(u),[c]),present:f,future:l};case"REVERT":var p=t.past,h=t.future,d=p[p.length-1],y=p.slice(0,p.length-1);return{past:y,present:d,future:zo(h)};default:return t}},Ko=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{request_pre:null,request_post:null,callback_resolved:null,request_refresh_jwt:null,bear:!1},e=arguments.length>1?arguments[1]:void 0;return"SET_HOOKS"===e.type?e.payload:t},Vo="JWT Expired",Zo=200,Qo=204,Xo="CLIENTSIDE_ERROR",ti={[Zo]:"SUCCESS",[Qo]:"NO_UPDATE"},ei=["__dash_client","__dash_server","__dash_upload","__dash_download"];function ri(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var ni,oi={count:0,total:0,compute:0,network:{time:0,upload:0,download:0},resources:{},status:{latest:null},result:{}},ii={updated:[],resources:{},callbacks:{},graphLayout:null},ai=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ii,e=arguments.length>1?arguments[1]:void 0;if("UPDATE_RESOURCE_USAGE"===e.type){var r=e.payload,n=r.id,o=r.usage,i=r.status,a=ti[i]||i,u={updated:[n],resources:t.resources,callbacks:t.callbacks,graphLayout:t.graphLayout};u.callbacks[n]=u.callbacks[n]||Xt(oi);var c=u.callbacks[n],s=c.resources,f=u.resources;if(c.count+=1,c.status.latest=a,c.status[a]=(c.status[a]||0)+1,c.result=e.payload.result,c.inputs=e.payload.inputs,c.state=e.payload.state,o){var l=o.__dash_client,p=o.__dash_server,h=o.__dash_upload,d=o.__dash_download,y=ri(o,ei);for(var v in c.total+=l,c.compute+=p,c.network.time+=l-p,c.network.upload+=h,c.network.download+=d,y)y.hasOwnProperty(v)&&(s[v]=(s[v]||0)+y[v],f[v]=(f[v]||0)+y[v])}return u}return t},ui={id:null,props:{}},ci=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ui;return t};!function(t){t.Set="IsLoading.Set"}(ni||(ni={}));var si,fi=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1?arguments[1]:void 0;return e.type===ni.Set?e.payload:t},li=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(e.type===jo("SET_LAYOUT"))return e.payload;if(er(e.type,["UNDO_PROP_CHANGE","REDO_PROP_CHANGE",jo("ON_PROP_CHANGE")])){var r=zt("props",e.payload.itempath),n=Yr(yr(r),t),o=xr(n,e.payload.props);return Wt(r,o,t)}return t};!function(t){t.Set="LoadingMap.Set"}(si||(si={}));var pi={},hi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pi,e=arguments.length>1?arguments[1]:void 0;return e.type===si.Set?e.payload:t},di={strs:{},objs:{}},yi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:di,e=arguments.length>1?arguments[1]:void 0;return e.type===jo("SET_PATHS")?e.payload:t},vi=function(t,e){return Kt(t.jobId,t,e)},gi=function(t,e){return Re(t,e)},bi=function(t,e){return Wt([t,"outdated"],!0,e)};function mi(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ADD_CALLBACK_JOB":return vi(e.payload,t);case"REMOVE_CALLBACK_JOB":return gi(e.payload.jobId,t);case"CALLBACK_JOB_OUTDATED":return bi(e.payload.jobId,t);default:return t}}function wi(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=t;if(e.type===r){var o=e.payload,i=o.id,a={status:o.status,content:o.content};n=Array.isArray(i)?Wt(i,a,t):i?Kt(i,a,t):xr(t,a)}return n})}),Oi),t.callbackJobs=mi,function(t){for(var e=Object.keys(t),r={},n=0;n1?r-1:0),o=1;o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function qi(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Gi=Di(jo("ON_ERROR")),Bi=Di(jo("SET_APP_LIFECYCLE")),Fi=Di(jo("SET_CONFIG")),Hi=Di(jo("ADD_HTTP_HEADERS")),$i=Di(jo("SET_GRAPHS")),zi=Di(jo("SET_HOOKS")),Ji=Di(jo("SET_LAYOUT")),Yi=Di(jo("SET_PATHS")),Wi=(Di(jo("SET_REQUEST_QUEUE")),Di(jo("ON_PROP_CHANGE"))),Ki=function(t){return function(e,r){return t(Gi({type:"backEnd",error:{message:e,html:r.join("\n")}}))}};var Vi=Tr(console.warn);function Zi(){try{return{"X-CSRFToken":Mi.parse(document.cookie)._csrf_token}}catch(t){return Vi(t),{}}}var Qi=ea("REDO"),Xi=ea("UNDO"),ta=ea("REVERT");function ea(t){return function(e,r){var n=r(),o=n.history,i=n.paths;e(Di(t)());var a=("REDO"===t?o.future[0]:o.past[o.past.length-1])||{},u=a.id,c=a.props;u&&(e(Di("UNDO_PROP_CHANGE")({itempath:En(i,u),props:c})),e(ra({id:u,props:c})))}}function ra(t){var e=t.id,r=t.props;return function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){qi(i,n,o,a,u,"next",t)}function u(t){qi(i,n,o,a,u,"throw",t)}a(void 0)}))}}(Ui().mark((function t(n,o){var i,a,u;return Ui().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=o(),a=i.graphs,u=i.paths,n(ma(mo(e,r,a,u)));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()}function na(t,e,r){if(t&&"function"==typeof t.text)t.text().then((function(t){r(Gi({type:"backEnd",error:{message:e,html:t}}))}));else{var n=t instanceof Error?t:{message:e,html:t};r(Gi({type:"backEnd",error:n}))}}function oa(t){return function(t){if(Array.isArray(t))return ha(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||pa(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ia(){ia=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function aa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ua(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5]&&arguments[5],a="Input"===o?r.getInputs:r.getState,u=[],c=0,s=a(t).map((function(i,a){var s=la(Ca(t,i.map((function(t){var r=t.id,n=t.property,o=t.path;return{id:r,property:n,value:dr(o,e).props[n]}})),n[a],r.anyVals,o),2),f=s[0],l=s[1];return Qn(n[a])&&!f.length&&c++,l&&u.push(l),f}));if(u.length){if(i&&u.length+c===s.length)return null;Da(u,t)}return s}function Da(t,e){var r=t[0];throw-1!==r.indexOf("logged above")&&console.error(e.objs),new ReferenceError(r)}var Ma=function(t){return Array.isArray(t)?Ut("value",t):t.value},Ua=function(t,e){return Array.isArray(t)?Wr(t,e):[[t,e]]};function qa(t,e,r,n){return Ga.apply(this,arguments)}function Ga(){return Ga=fa(ia().mark((function t(e,r,n,o){var i,a,u,c,s,f,l,p,h,d,y,v,g,b,m,w,O;return ia().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i=window.dash_clientside=window.dash_clientside||{}).no_update||(Object.defineProperty(i,"no_update",{value:{description:"Return to prevent updating an Output."},writable:!1}),Object.defineProperty(i,"PreventUpdate",{value:{description:"Throw to prevent updating all Outputs."},writable:!1})),a=o.inputs,u=o.outputs,c=o.state,s=Date.now(),f=Ha(a),l=Ha(c),p={},h=Zo,t.prev=8,v=r.namespace,g=r.function_name,b=a.map(Ma),c&&(b=_e(b,c.map(Ma))),i.callback_context={},i.callback_context.triggered=o.changedPropIds.map((function(t){return{prop_id:t,value:f[t]}})),i.callback_context.inputs_list=a,i.callback_context.inputs=f,i.callback_context.states_list=c,i.callback_context.states=l,m=(d=i[v])[g].apply(d,oa(b)),delete i.callback_context,"function"!=typeof(null===(y=m)||void 0===y?void 0:y.then)){t.next=24;break}return t.next=23,m;case 23:m=t.sent;case 24:Ua(u,m).forEach((function(t){var e=la(t,2),r=e[0],n=e[1];Ua(r,n).forEach((function(t){var e=la(t,2),r=e[0],n=e[1],o=r.id,a=r.property,u=Bn(o),c=p[u]=p[u]||{};n!==i.no_update&&(c[a]=n)}))})),t.next=35;break;case 27:if(t.prev=27,t.t0=t.catch(8),t.t0!==i.PreventUpdate){t.next=33;break}h=Qo,t.next=35;break;case 33:throw h=Xo,t.t0;case 35:return t.prev=35,delete i.callback_context,w=Date.now()-s,O={__dash_server:w,__dash_client:w,__dash_upload:0,__dash_download:0},n.ui&&e(Ta({id:o.output,usage:O,status:h,result:p,inputs:a,state:c})),t.finish(35);case 41:return t.abrupt("return",p);case 42:case"end":return t.stop()}}),t,null,[[8,27,35,41]])}))),Ga.apply(this,arguments)}function Ba(t,e,r){zr(t).forEach((function(t){var n=la(t,2),o=n[0],i=n[1],a=la(o.split("."),2),u=a[0],c=a[1],s=r.strs[u];e(Wi({props:{[c]:i},itempath:s})),e(ra({id:u,props:{[c]:i}}))}))}function Fa(t,e,r,n,o,i,a,u,c){e.request_pre&&e.request_pre(n);var s,f,l,p,h=Date.now(),d=JSON.stringify(n),y=a;return new Promise((function(a,v){var g=function(y){var g=y.status;if(f){var b=u().callbackJobs[f];if(null!=b&&b.outdated)return t(Ia({jobId:f})),a({})}function w(e){if(r.ui){var o={__dash_server:0,__dash_client:Date.now()-h,__dash_upload:d.length,__dash_download:Number(y.headers.get("Content-Length"))};(y.headers.get("Server-Timing")||"").split(",").forEach((function(t){var e=t.split(";")[0],r=t.match(/;dur=[0-9.]+/);r&&(o[e]=Number(r[0].slice(5)))})),t(Ta({id:n.output,usage:o,status:g,result:e,inputs:n.inputs,state:n.state}))}}var O=function(){f&&t(Ia({jobId:f})),l&&Ba(l,t,o),p&&Ba(p,t,o)};g===Zo?y.json().then((function(r){if(!s&&r.cacheKey&&(s=r.cacheKey),!f&&r.job){var u={jobId:r.job,cacheKey:r.cacheKey,cancelInputs:r.cancel,progressDefault:r.progressDefault,output:c};t(La(u)),f=r.job}r.progress&&Ba(r.progress,t,o),r.running&&Ba(r.running,t,o),!l&&r.runningOff&&(l=r.runningOff),!p&&r.progressDefault&&(p=r.progressDefault),i&&void 0===r.response?setTimeout(m,void 0!==i.interval?i.interval:500):(O(),function(t){var r,o=t.multi,i=t.response;if(e.request_post&&e.request_post(n,i),o)r=i;else{var u=n.output;r={[u.substr(0,u.lastIndexOf("."))]:i.props}}w(r),a(r)}(r))})):g===Qo?(O(),w({}),a({})):(O(),v(y))},b=function(){r.ui&&t(Ta({id:n.output,status:"NO_RESPONSE",result:{},inputs:n.inputs,state:n.state})),v(new Error("Callback failed: the server did not respond."))},m=function(){var t,e,n;(t=Zi(),e="".concat(bn(r),"_dash-update-component"),n=function(t,r){var n="?";e.includes("?")&&(n="&"),e="".concat(e).concat(n).concat(t,"=").concat(r)},s&&n("cacheKey",s),f&&n("job",f),y&&(y.forEach((function(t){var e=la(t,2),r=e[0],o=e[1];return n(r,o)})),y=y.filter((function(t){var e=la(t,3);return e[0],e[1],!e[2]}))),fetch(e,Er(r.fetch,{method:"POST",headers:t,body:d}))).then(g,b)};m()}))}function Ha(t){if(!t)return{};for(var e={},r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function wu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ou(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Gu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Bu(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r(null!==(n=e.priority)&&void 0!==n?n:"")?-1:1},Ku=function(t,e){var r=(0,t.getOutputs)(e),n=ze(r),o=[],i={};return n.forEach((function(t){var e=t.id,r=t.property,n=Bn(e);(i[n]=i[n]||[]).push(r),o.push(lo({id:n,property:r}))})),{allOutputs:r,allPropIds:o}},Vu=function(t,e){return ar(Ut("id",[].concat(zu(ze(t.getInputs(e))),zu(ze(t.getState(e))))))},Zu={observer:function(){var t=$u(qu().mark((function t(e){var r,n,o,i,a,u,c,s,f,l,p,h,d,y,v,g,b,m,w,O,_;return qu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.dispatch,n=e.getState,o=n(),i=o.callbacks,a=i.executing,u=i.watched,c=o.config,s=o.hooks,f=o.layout,l=o.paths,p=o.appLifecycle,h=n(),d=h.callbacks.prioritized,p===xo("HYDRATED")){t.next=5;break}return t.abrupt("return");case 5:y=Math.max(0,12-a.length-u.length),d=Hr(Wu,d),v=Lr((function(t){return!0===Uu(f,l,Vu(t,l))}),d),j=2,g=function(t){if(Array.isArray(t))return t}(E=v)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(E,j)||Ju(E,j)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),b=g[0],m=g[1],w=b.slice(0,y),O=m.slice(0,y-w.length),w.length&&r(ka([xa(w),ga(Ct((function(t){return $a(t,c,s,l,f,Ku(t,l),r,n)}),w))])),O.length&&(_=Ct((function(t){return Bu(Bu(Bu({},t),Ku(t,l)),{},{isReady:Uu(f,l,Vu(t,l))})}),O),r(ka([xa(O),da(_)])),Ye(function(){var t=$u(qu().mark((function t(e){var o,i,a;return qu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.isReady;case 2:if(o=n(),i=o.callbacks.blocked,Be((function(t){return t===e||t.isReady===e.isReady}),i)){t.next=6;break}return t.abrupt("return");case 6:a=$a(e,c,s,l,f,e,r,n),r(ka([Ea([e]),ga([a])]));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),_));case 12:case"end":return t.stop()}var E,j}),t)})));return function(e){return t.apply(this,arguments)}}(),inputs:["callbacks.prioritized","callbacks.completed"]},Qu=Zu;function Xu(){Xu=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function tc(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var ec=function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){tc(i,n,o,a,u,"next",t)}function u(t){tc(i,n,o,a,u,"throw",t)}a(void 0)}))}}(Xu().mark((function t(e){var r,n;return Xu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Promise((function(t){return r=t})),setTimeout(r,e),t.abrupt("return",n);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function rc(){rc=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function nc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oc(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]?arguments[4]:null,i=[];for(var a in t)if(t.hasOwnProperty(a)){var u=void 0;try{"function"!=typeof t[a]?(u=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[a]+"`.")).name="Invariant Violation":u=t[a](e,a,n,r,null,xc())}catch(t){u=t}if(!u||u instanceof Error||i.push((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error){var c=o&&o()||"";i.push("Failed "+r+" type: "+u.message+c)}}return i.join("\n\n")}(e.propTypes,n,"component prop",e);return a&&function(t,e,r){var n,o=t.split("`");if(er("is marked as required",t)){var i=o[1];n="".concat(i," in ").concat(r),e.id&&(n+=' with ID "'.concat(e.id,'"')),n+=" is required but it was not provided."}else if(er("Bad object",t))n=t.split("supplied to ")[0]+"supplied to ".concat(r)+".\nBad"+t.split(".\nBad")[1];else{if(!er("Invalid ",t)||!er(" supplied to ",t))throw new Error(t);var a=o[1];if(n="Invalid argument `".concat(a,"` passed into ").concat(r),e.id&&(n+=' with ID "'.concat(e.id,'"')),n+=".",er(", expected ",t)){var u=t.split(", expected ")[1];n+="\nExpected ".concat(u)}if(er(" of type `",t)){var c=t.split(" of type `")[1].split("`")[0];n+="\nWas supplied type `".concat(c,"`.")}if(Qe(a,e)){var s=JSON.stringify(e[a],null,2);s&&(er("\n",s)?n+="\nValue provided: \n".concat(s):n+="\nValue provided: ".concat(s))}}throw new Error(n)}(a,n,i),Hc(e,n,r,o)}function Hc(t,r,n,o){var i=xr(r,n);return Array.isArray(o)?e().createElement.apply(e(),[t,i].concat(qc(o))):e().createElement(t,i,o)}function $c(t){return"Object"===Zt(t)&&Qe("type",t)&&Qe("namespace",t)&&Qe("props",t)}Fc.propTypes={children:u().any,element:u().any,layout:u().any,props:u().any,extraProps:u().any,id:u().string};var zc=function(r){var n=(0,t.useContext)(ss);return e().createElement(Yc,Uc({},n.fn(),r,{_dashprivate_path:JSON.parse(r._dashprivate_path)}))},Jc=(0,t.memo)(zc),Yc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cc(t,e)}(u,t);var r,n,o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Mc(o);if(i){var r=Mc(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Nc(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=a.call(this,t)).setProps=e.setProps.bind(Dc(e)),e}return r=u,n=[{key:"createContainer",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return gc(r)?r:e().createElement(Jc,{key:r&&r.props&&Bn(r.props.id)||o,_dashprivate_error:t._dashprivate_error,_dashprivate_layout:r,_dashprivate_loadingState:Pc(r,n,t._dashprivate_loadingMap),_dashprivate_loadingStateHash:Ac(n,t._dashprivate_loadingMap),_dashprivate_path:JSON.stringify(n)})}},{key:"setProps",value:function(t){var e=this.props,r=e._dashprivate_graphs,n=e._dashprivate_dispatch,o=e._dashprivate_path,i=e._dashprivate_layout,a=this.getLayoutProps(),u=a.id,c=Nr((function(t,e){return!se(t,a[e])}),t);if(!sr(c)){var s=function(t,e,r){if(!(t&&r&&e.length))return[];if("string"==typeof t){var n=r.inputMap[t];return n?e.filter((function(t){return n[t]})):[]}var o=Object.keys(t).sort(),i=Ur(o,t),a=o.join(","),u=r.inputPatterns[a];return u?e.filter((function(t){var e=u[t];return e&&e.some((function(t){return Vn(o,i,t.values)}))})):[]}(u,It(c),r);!function(t,e,r){var n=cu(t),o=n.canPersist,i=n.id,a=n.props,u=n.element,c=n.persistence,s=n.persisted_props,f=n.persistence_type;o&&c&&Ye((function(t){var n=za(t.split("."),2),o=n[0],s=n[1];if(void 0!==e[o]){var l=ou(f,r),p=au(u,o,s).extract,h=uu(i,t,c),d=p(a[o]),y=p(e[o]);if(d!==y){l.hasItem(h)&&(d=l.getItem(h)[1]);var v=void 0===d?[y]:[y,d];l.setItem(h,v,r)}}}),s)}(i,t,n),s.length&&n(ra({id:u,props:Cr(s,c)})),n(Wi({props:c,itempath:o}))}}},{key:"getChildren",value:function(t,e){var r=this;return Yt(t)?null:Array.isArray(t)?rt(Ct)((function(t,n){return r.createContainer(r.props,t,_e(e,["props","children",n]))}),t):this.createContainer(this.props,t,_e(e,["props","children"]))}},{key:"wrapChildrenProp",value:function(t,e){var r=this;return Array.isArray(t)?t.map((function(t,n){return $c(t)?r.createContainer(r.props,t,_e(r.props._dashprivate_path,["props"].concat(qc(e),[n])),n):t})):$c(t)?this.createContainer(this.props,t,_e(this.props._dashprivate_path,["props"].concat(qc(e)))):t}},{key:"getComponent",value:function(t,r,n,o){var i=this,a=this.props,u=a._dashprivate_config,c=a._dashprivate_dispatch,s=a._dashprivate_error;if(sr(t))return null;if(gc(t))return t;kc(t);for(var f=jn(t),l=Rr([],["children_props",t.namespace,t.type],u),p=Re("children",t.props),h=0;h=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function rs(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var ns=Tr(console.warn),os={GET:function(t,e){return fetch(t,Er(e,{method:"GET",headers:Zi()}))},POST:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fetch(t,Er(e,{method:"POST",headers:Zi(),body:r?JSON.stringify(r):null}))}};function is(t,e,r,n,o){return function(){var i=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){rs(i,n,o,a,u,"next",t)}function u(t){rs(i,n,o,a,u,"throw",t)}a(void 0)}))}}(es().mark((function i(a,u){var c,s,f,l,p,h,d,y,v,g,b;return es().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:h=function(t){u().error.backEndConnected!==t&&a({type:"SET_CONNECTION_STATUS",payload:t})},c=u(),s=c.config,f=c.hooks,l=null,p="".concat(bn(s)).concat(t),a({type:r,payload:{id:n,status:"loading"}}),i.prev=5,y=0;case 7:if(!(y<=1)){i.next=36;break}return i.prev=8,i.next=11,os[e](p,s.fetch,o);case 11:d=i.sent,i.next=19;break;case 14:return i.prev=14,i.t0=i.catch(8),console.log("fetch error",d),h(!1),i.abrupt("return");case 19:if(401!==d.status&&400!==d.status){i.next=32;break}if(!f.request_refresh_jwt){i.next=32;break}return i.next=23,d.text();case 23:if(!i.sent.includes(Vo)){i.next=32;break}return i.next=27,f.request_refresh_jwt(s.fetch.headers.Authorization.substr("Bearer ".length));case 27:if(!(v=i.sent)){i.next=32;break}return l={Authorization:"Bearer ".concat(v)},s=Er(s,{fetch:{headers:l}}),i.abrupt("continue",33);case 32:return i.abrupt("break",36);case 33:y++,i.next=7;break;case 36:if(g=d.headers.get("content-type"),l&&a(Hi(l)),h(!0),!g||-1===g.indexOf("application/json")){i.next=41;break}return i.abrupt("return",d.json().then((function(t){return a({type:r,payload:{status:d.status,content:t,id:n}}),t})));case 41:return ns("Response is missing header: content-type: application/json"),i.abrupt("return",a({type:r,payload:{id:n,status:d.status}}));case 45:i.prev=45,i.t1=i.catch(5),b="Error from API call: "+t,na(i.t1,b,a);case 49:case"end":return i.stop()}}),i,null,[[5,45],[8,14]])})));return function(t,e){return i.apply(this,arguments)}}()}function as(){as=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function us(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function cs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0?o:null,n.future.length>0?i:null))}As.styleTagTransform=Ss(),As.setAttributes=_s(),As.insert=ws().bind(null,"head"),As.domAPI=bs(),As.insertStyleElement=js(),vs()(Ps.Z,As),Ps.Z&&Ps.Z.locals&&Ps.Z.locals,ks.propTypes={history:u().object,dispatch:u().func};var Ts=z((function(t){return{history:t.history}}),(function(t){return{dispatch:t}}))(ks);function Ls(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(r.content.files);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(!u.is_css){i=!1;break}i=!0;for(var c=[],s=document.evaluate('//link[contains(@href, "'.concat(u.url,'")]'),this._head),f=s.iterateNext();f;)c.push(f),f=s.iterateNext();if(Ye((function(t){return t.setAttribute("disabled","disabled")}),c),u.modified>0){var l=document.createElement("link");l.href="".concat(u.url,"?m=").concat(u.modified),l.type="text/css",l.rel="stylesheet",this._head.appendChild(l)}}}catch(t){a.e(t)}finally{a.f()}i||window.location.reload()}else null!==this.state.intervalId&&500===r.status&&(this._retry>this.state.max_retry&&(this.clearInterval(),window.alert("Hot reloading is disabled after failing ".concat(this._retry," times. ")+"Please check your application for errors, then refresh the page.")),this._retry++)}},{key:"componentDidMount",value:function(){var t=this.props,e=t.dispatch,r=t.reloadRequest,n=this.state,o=n.disabled,i=n.interval;if(!o&&!this.state.intervalId){var a=window.setInterval((function(){"loading"!==r.status&&e(is("_reload-hash","GET","reloadRequest"))}),i);this.setState({intervalId:a})}}},{key:"componentWillUnmount",value:function(){!this.state.disabled&&this.state.intervalId&&this.clearInterval()}},{key:"render",value:function(){return null}}],n=[{key:"getDerivedStateFromProps",value:function(t){return sr(t.reloadRequest)||"loading"===t.reloadRequest.status?null:{reloadRequest:t.reloadRequest}}}],r&&Is(e.prototype,r),n&&Is(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(e().Component);Ms.defaultProps={},Ms.propTypes={id:u().string,config:u().object,reloadRequest:u().object,dispatch:u().func,interval:u().number};var Us=z((function(t){return{config:t.config,reloadRequest:t.reloadRequest}}),(function(t){return{dispatch:t}}))(Ms);function qs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Gs(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rdiv {\n position: relative;\n}\n._dash-undo-redo-link {\n color: #0074D9;\n cursor: pointer;\n margin-left: 10px;\n margin-right: 10px;\n display: inline-block;\n opacity: 0.2;\n}\n._dash-undo-redo-link:hover {\n opacity: 1;\n}\n._dash-undo-redo-link ._dash-icon-undo {\n font-size: 20px;\n transform: rotate(270deg);\n}\n._dash-undo-redo-link ._dash-icon-redo {\n font-size: 20px;\n transform: rotate(90deg);\n}\n._dash-undo-redo-link ._dash-undo-redo-label {\n font-size: 15px;\n}\n",""]),e.Z=a},645:function(t){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",n=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),n&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),n&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,n,o,i){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(n)for(var u=0;u0?" ".concat(f[5]):""," {").concat(f[1],"}")),f[5]=i),r&&(f[2]?(f[1]="@media ".concat(f[2]," {").concat(f[1],"}"),f[2]=r):f[2]=r),o&&(f[4]?(f[1]="@supports (".concat(f[4],") {").concat(f[1],"}"),f[4]=o):f[4]="".concat(o)),e.push(f))}},e}},81:function(t){"use strict";t.exports=function(t){return t[1]}},357:function(t,e){function r(t,e,r,n){var i={};return function(a){if(!i[a]){var u={},c=[],s=[];for(s.push({node:a,processed:!1});s.length>0;){var f=s[s.length-1],l=f.processed,p=f.node;if(l)s.pop(),c.pop(),u[p]=!1,i[p]=!0,e&&0!==t[p].length||r.push(p);else{if(i[p]){s.pop();continue}if(u[p]){if(n){s.pop();continue}throw c.push(p),new o(c)}u[p]=!0,c.push(p);for(var h=t[p],d=h.length-1;d>=0;d--)s.push({node:h[d],processed:!1});f.processed=!0}}}}}var n=e.f=function(t){this.nodes={},this.outgoingEdges={},this.incomingEdges={},this.circular=t&&!!t.circular};n.prototype={size:function(){return Object.keys(this.nodes).length},addNode:function(t,e){this.hasNode(t)||(this.nodes[t]=2===arguments.length?e:t,this.outgoingEdges[t]=[],this.incomingEdges[t]=[])},removeNode:function(t){this.hasNode(t)&&(delete this.nodes[t],delete this.outgoingEdges[t],delete this.incomingEdges[t],[this.incomingEdges,this.outgoingEdges].forEach((function(e){Object.keys(e).forEach((function(r){var n=e[r].indexOf(t);n>=0&&e[r].splice(n,1)}),this)})))},hasNode:function(t){return this.nodes.hasOwnProperty(t)},getNodeData:function(t){if(this.hasNode(t))return this.nodes[t];throw new Error("Node does not exist: "+t)},setNodeData:function(t,e){if(!this.hasNode(t))throw new Error("Node does not exist: "+t);this.nodes[t]=e},addDependency:function(t,e){if(!this.hasNode(t))throw new Error("Node does not exist: "+t);if(!this.hasNode(e))throw new Error("Node does not exist: "+e);return-1===this.outgoingEdges[t].indexOf(e)&&this.outgoingEdges[t].push(e),-1===this.incomingEdges[e].indexOf(t)&&this.incomingEdges[e].push(t),!0},removeDependency:function(t,e){var r;this.hasNode(t)&&(r=this.outgoingEdges[t].indexOf(e))>=0&&this.outgoingEdges[t].splice(r,1),this.hasNode(e)&&(r=this.incomingEdges[e].indexOf(t))>=0&&this.incomingEdges[e].splice(r,1)},clone:function(){var t=this,e=new n;return Object.keys(t.nodes).forEach((function(r){e.nodes[r]=t.nodes[r],e.outgoingEdges[r]=t.outgoingEdges[r].slice(0),e.incomingEdges[r]=t.incomingEdges[r].slice(0)})),e},directDependenciesOf:function(t){if(this.hasNode(t))return this.outgoingEdges[t].slice(0);throw new Error("Node does not exist: "+t)},directDependantsOf:function(t){if(this.hasNode(t))return this.incomingEdges[t].slice(0);throw new Error("Node does not exist: "+t)},dependenciesOf:function(t,e){if(this.hasNode(t)){var n=[];r(this.outgoingEdges,e,n,this.circular)(t);var o=n.indexOf(t);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+t)},dependantsOf:function(t,e){if(this.hasNode(t)){var n=[];r(this.incomingEdges,e,n,this.circular)(t);var o=n.indexOf(t);return o>=0&&n.splice(o,1),n}throw new Error("Node does not exist: "+t)},overallOrder:function(t){var e=this,n=[],o=Object.keys(this.nodes);if(0===o.length)return n;if(!this.circular){var i=r(this.outgoingEdges,!1,[],this.circular);o.forEach((function(t){i(t)}))}var a=r(this.outgoingEdges,t,n,this.circular);return o.filter((function(t){return 0===e.incomingEdges[t].length})).forEach((function(t){a(t)})),this.circular&&o.filter((function(t){return-1===n.indexOf(t)})).forEach((function(t){a(t)})),n},entryNodes:function(){var t=this;return Object.keys(this.nodes).filter((function(e){return 0===t.incomingEdges[e].length}))}},n.prototype.directDependentsOf=n.prototype.directDependantsOf,n.prototype.dependentsOf=n.prototype.dependantsOf;var o=function(t){var e="Dependency Cycle Found: "+t.join(" -> "),r=new Error(e);return r.cyclePath=t,Object.setPrototypeOf(r,Object.getPrototypeOf(this)),Error.captureStackTrace&&Error.captureStackTrace(r,o),r};o.prototype=Object.create(Error.prototype,{constructor:{value:Error,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(o,Error)},924:function(t,e,r){"use strict";var n=r(244);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},679:function(t,e,r){"use strict";var n=r(864),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},u={};function c(t){return n.isMemo(t)?a:u[t.$$typeof]||o}u[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},u[n.Memo]=a;var s=Object.defineProperty,f=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,d=Object.prototype;t.exports=function t(e,r,n){if("string"!=typeof r){if(d){var o=h(r);o&&o!==d&&t(e,o,n)}var a=f(r);l&&(a=a.concat(l(r)));for(var u=c(e),y=c(r),v=0;v13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},414:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},921:function(t,e){"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,s=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,l=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,y=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,m=r?Symbol.for("react.responder"):60118,w=r?Symbol.for("react.scope"):60119;function O(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case n:switch(t=t.type){case f:case l:case i:case u:case a:case h:return t;default:switch(t=t&&t.$$typeof){case s:case p:case v:case y:case c:return t;default:return e}}case o:return e}}}function _(t){return O(t)===l}e.AsyncMode=f,e.ConcurrentMode=l,e.ContextConsumer=s,e.ContextProvider=c,e.Element=n,e.ForwardRef=p,e.Fragment=i,e.Lazy=v,e.Memo=y,e.Portal=o,e.Profiler=u,e.StrictMode=a,e.Suspense=h,e.isAsyncMode=function(t){return _(t)||O(t)===f},e.isConcurrentMode=_,e.isContextConsumer=function(t){return O(t)===s},e.isContextProvider=function(t){return O(t)===c},e.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===n},e.isForwardRef=function(t){return O(t)===p},e.isFragment=function(t){return O(t)===i},e.isLazy=function(t){return O(t)===v},e.isMemo=function(t){return O(t)===y},e.isPortal=function(t){return O(t)===o},e.isProfiler=function(t){return O(t)===u},e.isStrictMode=function(t){return O(t)===a},e.isSuspense=function(t){return O(t)===h},e.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===u||t===a||t===h||t===d||"object"==typeof t&&null!==t&&(t.$$typeof===v||t.$$typeof===y||t.$$typeof===c||t.$$typeof===s||t.$$typeof===p||t.$$typeof===b||t.$$typeof===m||t.$$typeof===w||t.$$typeof===g)},e.typeOf=O},864:function(t,e,r){"use strict";t.exports=r(921)},379:function(t){"use strict";var e=[];function r(t){for(var r=-1,n=0;n0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,r)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},589:function(t){"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},196:function(t){"use strict";t.exports=window.React}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={id:n,exports:{}};return t[n](i,i.exports,r),i.exports}r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var n={};!function(){"use strict";var t="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==t&&t,e="URLSearchParams"in t,r="Symbol"in t&&"iterator"in Symbol,n="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),o="FormData"in t,i="ArrayBuffer"in t;if(i)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],u=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function c(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function s(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return r&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function p(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function d(t){var e=new FileReader,r=h(e);return e.readAsArrayBuffer(t),r}function y(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var r;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:n&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:o&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:e&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():i&&n&&(r=t)&&DataView.prototype.isPrototypeOf(r)?(this._bodyArrayBuffer=y(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=y(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},n&&(this.blob=function(){var t=p(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(d)}),this.text=function(){var t,e,r,n=p(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,r=h(e=new FileReader),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;i.test(this.url)?this.url=this.url.replace(i,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function m(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}})),e}function w(t,e){if(!(this instanceof w))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},v.call(b.prototype),v.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},w.error=function(){var t=new w(null,{status:0,statusText:""});return t.type="error",t};var O=[301,302,303,307,308];w.redirect=function(t,e){if(-1===O.indexOf(e))throw new RangeError("Invalid status code");return new w(null,{status:e,headers:{location:t}})};var _=t.DOMException;try{new _}catch(t){(_=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),_.prototype.constructor=_}function E(e,r){return new Promise((function(o,a){var u=new b(e,r);if(u.signal&&u.signal.aborted)return a(new _("Aborted","AbortError"));var c=new XMLHttpRequest;function f(){c.abort()}c.onload=function(){var t,e,r={status:c.status,statusText:c.statusText,headers:(t=c.getAllResponseHeaders()||"",e=new l,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}})),e)};r.url="responseURL"in c?c.responseURL:r.headers.get("X-Request-URL");var n="response"in c?c.response:c.responseText;setTimeout((function(){o(new w(n,r))}),0)},c.onerror=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.ontimeout=function(){setTimeout((function(){a(new TypeError("Network request failed"))}),0)},c.onabort=function(){setTimeout((function(){a(new _("Aborted","AbortError"))}),0)},c.open(u.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(u.url),!0),"include"===u.credentials?c.withCredentials=!0:"omit"===u.credentials&&(c.withCredentials=!1),"responseType"in c&&(n?c.responseType="blob":i&&u.headers.get("Content-Type")&&-1!==u.headers.get("Content-Type").indexOf("application/octet-stream")&&(c.responseType="arraybuffer")),!r||"object"!=typeof r.headers||r.headers instanceof l?u.headers.forEach((function(t,e){c.setRequestHeader(e,t)})):Object.getOwnPropertyNames(r.headers).forEach((function(t){c.setRequestHeader(t,s(r.headers[t]))})),u.signal&&(u.signal.addEventListener("abort",f),c.onreadystatechange=function(){4===c.readyState&&u.signal.removeEventListener("abort",f)}),c.send(void 0===u._bodyInit?null:u._bodyInit)}))}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=l,t.Request=b,t.Response=w)}(),function(){"use strict";r.r(n);var t=r(196),e=r.n(t),o=window.ReactDOM,i=r.n(o),a=window.PropTypes,u=r.n(a),c=r(270),s=r(826),f=function(t){t()},l=function(){return f},p=(0,t.createContext)(null);function h(){return h=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(o[r]=t[r]);return o}var y=r(679),v=r.n(y),g=r(100),b=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function m(t,e,r,n,o){var i,a,u,c,s,f=o.areStatesEqual,l=o.areOwnPropsEqual,p=o.areStatePropsEqual,h=!1;return function(o,d){return h?function(o,h){var d,y,v=!l(h,a),g=!f(o,i,h,a);return i=o,a=h,v&&g?(u=t(i,a),e.dependsOnOwnProps&&(c=e(n,a)),s=r(u,c,a)):v?(t.dependsOnOwnProps&&(u=t(i,a)),e.dependsOnOwnProps&&(c=e(n,a)),s=r(u,c,a)):g?(d=t(i,a),y=!p(d,u),u=d,y&&(s=r(u,c,a)),s):s}(o,d):(u=t(i=o,a=d),c=e(n,a),s=r(u,c,a),h=!0,s)}}function w(t,e){var r=e.initMapStateToProps,n=e.initMapDispatchToProps,o=e.initMergeProps,i=d(e,b);return m(r(t,i),n(t,i),o(t,i),t,i)}function O(t){return function(e){var r=t(e);function n(){return r}return n.dependsOnOwnProps=!1,n}}function _(t){return t.dependsOnOwnProps?Boolean(t.dependsOnOwnProps):1!==t.length}function E(t,e){return function(e,r){r.displayName;var n=function(t,e){return n.dependsOnOwnProps?n.mapToProps(t,e):n.mapToProps(t,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(e,r){n.mapToProps=t,n.dependsOnOwnProps=_(t);var o=n(e,r);return"function"==typeof o&&(n.mapToProps=o,n.dependsOnOwnProps=_(o),o=n(e,r)),o},n}}function j(t,e){return function(r,n){throw new Error("Invalid value of type ".concat(typeof t," for ").concat(e," argument when connecting component ").concat(n.wrappedComponentName,"."))}}function x(t){return t&&"object"==typeof t?O((function(e){return function(t,e){var r={},n=function(n){var o=t[n];"function"==typeof o&&(r[n]=function(){return e(o.apply(void 0,arguments))})};for(var o in t)n(o);return r}(t,e)})):t?"function"==typeof t?E(t):j(t,"mapDispatchToProps"):O((function(t){return{dispatch:t}}))}function S(t){return t?"function"==typeof t?E(t):j(t,"mapStateToProps"):O((function(){return{}}))}function P(t,e,r){return h({},r,t,e)}function A(t){return t?"function"==typeof t?function(t){return function(e,r){r.displayName;var n,o=r.areMergedPropsEqual,i=!1;return function(e,r,a){var u=t(e,r,a);return i?o(u,n)||(n=u):(i=!0,n=u),n}}}(t):j(t,"mergeProps"):function(){return P}}var k={notify(){},get:function(){return[]}};function T(t,e){var r,n=k;function o(){a.onStateChange&&a.onStateChange()}function i(){r||(r=e?e.addNestedSub(o):t.subscribe(o),n=function(){var t=l(),e=null,r=null;return{clear(){e=null,r=null},notify(){t((function(){for(var t=e;t;)t.callback(),t=t.next}))},get(){for(var t=[],r=e;r;)t.push(r),r=r.next;return t},subscribe(t){var n=!0,o=r={callback:t,next:null,prev:r};return o.prev?o.prev.next=o:e=o,function(){n&&null!==e&&(n=!1,o.next?o.next.prev=o.prev:r=o.prev,o.prev?o.prev.next=o.next:e=o.next)}}}}())}var a={addNestedSub:function(t){return i(),n.subscribe(t)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(r)},trySubscribe:i,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=k)},getListeners:function(){return n}};return a}var L="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?t.useLayoutEffect:t.useEffect;function I(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}function R(t,e){if(I(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;var r=Object.keys(t),n=Object.keys(e);if(r.length!==n.length)return!1;for(var o=0;ot.length)&&(e=t.length);for(var r=0,n=new Array(e);r3&&void 0!==arguments[3]?arguments[3]:{},a=(i.pure,i.areStatesEqual),u=void 0===a?H:a,c=i.areOwnPropsEqual,s=void 0===c?R:c,f=i.areStatePropsEqual,l=void 0===f?R:f,y=i.areMergedPropsEqual,b=void 0===y?R:y,m=i.forwardRef,O=void 0!==m&&m,_=i.context,E=void 0===_?p:_,j=E,P=S(r),k=x(n),I=A(o),N=Boolean(r),D=function(r){var n=r.displayName||r.name||"Component",o="Connect(".concat(n,")"),i={shouldHandleStateChanges:N,displayName:o,wrappedComponentName:n,WrappedComponent:r,initMapStateToProps:P,initMapDispatchToProps:k,initMergeProps:I,areStatesEqual:u,areStatePropsEqual:l,areOwnPropsEqual:s,areMergedPropsEqual:b};function a(n){var o=(0,t.useMemo)((function(){var t=n.reactReduxForwardedRef,e=d(n,M);return[n.context,t,e]}),[n]),a=C(o,3),u=a[0],c=a[1],s=a[2],f=(0,t.useMemo)((function(){return u&&u.Consumer&&(0,g.isContextConsumer)(e().createElement(u.Consumer,null))?u:j}),[u,j]),l=(0,t.useContext)(f),p=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch),y=Boolean(l)&&Boolean(l.store),v=p?n.store:l.store,b=y?l.getServerState:v.getState,m=(0,t.useMemo)((function(){return w(v.dispatch,i)}),[v]),O=(0,t.useMemo)((function(){if(!N)return q;var t=T(v,p?void 0:l.subscription),e=t.notifyNestedSubs.bind(t);return[t,e]}),[v,p,l]),_=C(O,2),E=_[0],x=_[1],S=(0,t.useMemo)((function(){return p?l:h({},l,{subscription:E})}),[p,l,E]),P=(0,t.useRef)(),A=(0,t.useRef)(s),k=(0,t.useRef)(),I=(0,t.useRef)(!1),R=((0,t.useRef)(!1),(0,t.useRef)(!1)),D=(0,t.useRef)();L((function(){return R.current=!0,function(){R.current=!1}}),[]);var H,$=(0,t.useMemo)((function(){return function(){return k.current&&s===A.current?k.current:m(v.getState(),s)}}),[v,s]),z=(0,t.useMemo)((function(){return function(t){return E?F(N,v,E,m,A,P,I,R,k,x,t):function(){}}}),[E]);G(B,[A,P,I,s,k,x]);try{H=U(z,$,b?function(){return m(b(),s)}:$)}catch(t){throw D.current&&(t.message+="\nThe error may be correlated with this previous error:\n".concat(D.current.stack,"\n\n")),t}L((function(){D.current=void 0,k.current=void 0,P.current=H}));var J=(0,t.useMemo)((function(){return e().createElement(r,h({},H,{ref:c}))}),[c,r,H]);return(0,t.useMemo)((function(){return N?e().createElement(f.Provider,{value:S},J):J}),[f,J,S])}var c=e().memo(a);if(c.WrappedComponent=r,c.displayName=a.displayName=o,O){var f=e().forwardRef((function(t,r){return e().createElement(c,h({},t,{reactReduxForwardedRef:r}))}));return f.displayName=o,f.WrappedComponent=r,v()(f,r)}return v()(c,r)};return D},J=function(r){var n=r.store,o=r.context,i=r.children,a=r.serverState,u=(0,t.useMemo)((function(){var t=T(n);return{store:n,subscription:t,getServerState:a?function(){return a}:void 0}}),[n,a]),c=(0,t.useMemo)((function(){return n.getState()}),[n]);L((function(){var t=u.subscription;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),c!==n.getState()&&t.notifyNestedSubs(),function(){t.tryUnsubscribe(),t.onStateChange=void 0}}),[u,c]);var s=o||p;return e().createElement(s.Provider,{value:u},i)};function Y(t,e){var r;e=e||[];var n=(t=t||[]).length,o=e.length,i=[];for(r=0;r=arguments.length)?u=e[a]:(u=arguments[o],o+=1),n[a]=u,W(u)||(i-=1),a+=1}return i<=0?r.apply(this,n):V(i,Q(t,n,r))}}s.useSyncExternalStoreWithSelector,function(t){U=t}(c.useSyncExternalStore),$=o.unstable_batchedUpdates,f=$;var X=Z((function(t,e){return 1===t?K(e):V(t,Q(t,[],e))})),tt=X,et=K((function(t){return tt(t.length,(function(){var e=0,r=arguments[0],n=arguments[arguments.length-1],o=Array.prototype.slice.call(arguments,0);return o[0]=function(){var t=r.apply(this,Y(arguments,[e,n]));return e+=1,t},t.apply(this,o)}))})),rt=et,nt=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};function ot(t){return null!=t&&"function"==typeof t["@@transducer/step"]}function it(t,e,r){return function(){if(0===arguments.length)return r();var n=arguments[arguments.length-1];if(!nt(n)){for(var o=0;o0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))})),yt=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}(),vt=Z((function(t,e){return V(t.length,(function(){return t.apply(e,arguments)}))})),gt=vt;function bt(t,e,r){for(var n=r.next();!n.done;){if((e=t["@@transducer/step"](e,n.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}n=r.next()}return t["@@transducer/result"](e)}function mt(t,e,r,n){return t["@@transducer/result"](r[n](gt(t["@@transducer/step"],t),e))}var wt="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function Ot(t,e,r){if("function"==typeof t&&(t=function(t){return new yt(t)}(t)),dt(r))return function(t,e,r){for(var n=0,o=r.length;n=0;)jt(e=kt[r],t)&&!Lt(n,e)&&(n[n.length]=e),r-=1;return n})):K((function(t){return Object(t)!==t?[]:Object.keys(t)})),Rt=Z(it(["fantasy-land/map","map"],Et,(function(t,e){switch(Object.prototype.toString.call(e)){case"[object Function]":return tt(e.length,(function(){return t.call(this,e.apply(this,arguments))}));case"[object Object]":return Ot((function(r,n){return r[n]=t(e[n]),r}),{},It(e));default:return pt(t,e)}}))),Ct=Rt,Nt=Number.isInteger||function(t){return t<<0===t},Dt=Z((function(t,e){var r=t<0?e.length+t:t;return ht(e)?e.charAt(r):e[r]})),Mt=Z((function(t,e){if(null!=e)return Nt(t)?Dt(t,e):e[t]})),Ut=Z((function(t,e){return Ct(Mt(t),e)}));function qt(t){return function e(r,n,o){switch(arguments.length){case 0:return e;case 1:return W(r)?e:Z((function(e,n){return t(r,e,n)}));case 2:return W(r)&&W(n)?e:W(r)?Z((function(e,r){return t(e,n,r)})):W(n)?Z((function(e,n){return t(r,e,n)})):K((function(e){return t(r,n,e)}));default:return W(r)&&W(n)&&W(o)?e:W(r)&&W(n)?Z((function(e,r){return t(e,r,o)})):W(r)&&W(o)?Z((function(e,r){return t(e,n,r)})):W(n)&&W(o)?Z((function(e,n){return t(r,e,n)})):W(r)?K((function(e){return t(e,n,o)})):W(n)?K((function(e){return t(r,e,o)})):W(o)?K((function(e){return t(r,n,e)})):t(r,n,o)}}}var Gt=qt(Ot),Bt=function(){function t(t,e){this.xf=e,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=ut,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.any=!0,t=at(this.xf["@@transducer/step"](t,!0))),t},t}(),Ft=Z(it(["any"],Z((function(t,e){return new Bt(t,e)})),(function(t,e){for(var r=0;r1){var i=!Yt(n)&&jt(o,n)?n[o]:Nt(e[1])?[]:{};r=t(Array.prototype.slice.call(e,1),r,i)}return function(t,e,r){if(Nt(t)&&nt(r)){var n=[].concat(r);return n[t]=e,n}var o={};for(var i in r)o[i]=r[i];return o[t]=e,o}(o,r,n)})),Kt=qt((function(t,e,r){return Wt([t],e,r)}));function Vt(t){return function e(r){for(var n,o,i,a=[],u=0,c=r.length;u=0;){if(r[u]===t)return n[u]===e;u-=1}switch(a){case"Map":return t.size===e.size&&ue(t.entries(),e.entries(),r.concat([t]),n.concat([e]));case"Set":return t.size===e.size&&ue(t.values(),e.values(),r.concat([t]),n.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=It(t);if(c.length!==It(e).length)return!1;var s=r.concat([t]),f=n.concat([e]);for(u=c.length-1;u>=0;){var l=c[u];if(!jt(l,e)||!ce(e[l],t[l],s,f))return!1;u-=1}return!0}var se=Z((function(t,e){return ce(t,e,[],[])}));function fe(t,e,r){var n,o;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(n=1/e;r=0}function pe(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var he=function(t){return(t<10?"0":"")+t},de="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+he(t.getUTCMonth()+1)+"-"+he(t.getUTCDate())+"T"+he(t.getUTCHours())+":"+he(t.getUTCMinutes())+":"+he(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function ye(t,e){for(var r=0,n=e.length,o=[];r":Oe(r,n)},n=function(t,e){return pt((function(e){return pe(e)+": "+r(t[e])}),e.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+pt(r,t).join(", ")+"))";case"[object Array]":return"["+pt(r,t).concat(n(t,we((function(t){return/^\d+$/.test(t)}),It(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):pe(de(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t==-1/0?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":pe(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var o=t.toString();if("[object Object]"!==o)return o}return"{"+n(t,It(t)).join(", ")+"}"}}var _e=K((function(t){return Oe(t,[])})),Ee=Z((function(t,e){if(nt(t)){if(nt(e))return t.concat(e);throw new TypeError(_e(e)+" is not an array")}if(ht(t)){if(ht(e))return t+e;throw new TypeError(_e(e)+" is not a string")}if(null!=t&&ne(t["fantasy-land/concat"]))return t["fantasy-land/concat"](e);if(null!=t&&ne(t.concat))return t.concat(e);throw new TypeError(_e(t)+' does not have a method named "concat" or "fantasy-land/concat"')})),je=Z((function(t,e){return e>t?e:t})),xe=Z((function(t,e){return tt(Gt(je,0,Ut("length",e)),(function(){var r=arguments,n=this;return t.apply(n,pt((function(t){return t.apply(n,r)}),e))}))})),Se=xe,Pe=function(){function t(t,e,r,n){this.valueFn=t,this.valueAcc=e,this.keyFn=r,this.xf=n,this.inputs={}}return t.prototype["@@transducer/init"]=ut,t.prototype["@@transducer/result"]=function(t){var e;for(e in this.inputs)if(jt(e,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[e]))["@@transducer/reduced"]){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){var r=this.keyFn(e);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],e),t},t}(),Ae=Q(4,[],it([],Q(4,[],(function(t,e,r,n){return new Pe(t,e,r,n)})),(function(t,e,r,n){return Ot((function(n,o){var i=r(o),a=t(jt(i,n)?n[i]:Qt(e,[],[],!1),o);return a&&a["@@transducer/reduced"]?at(n):(n[i]=a,n)}),{},n)})));function ke(t,e,r){var n,o=typeof t;switch(o){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(e&&(r._items["-0"]=!0),!1):null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):o in r._items?t in r._items[o]||(e&&(r._items[o][t]=!0),!1):(e&&(r._items[o]={},r._items[o][t]=!0),!1);case"boolean":if(o in r._items){var i=t?1:0;return!!r._items[o][i]||(e&&(r._items[o][i]=!0),!1)}return e&&(r._items[o]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):o in r._items?!!le(t,r._items[o])||(e&&r._items[o].push(t),!1):(e&&(r._items[o]=[t]),!1);case"undefined":return!!r._items[o]||(e&&(r._items[o]=!0),!1);case"object":if(null===t)return!!r._items.null||(e&&(r._items.null=!0),!1);default:return(o=Object.prototype.toString.call(t))in r._items?!!le(t,r._items[o])||(e&&r._items[o].push(t),!1):(e&&(r._items[o]=[t]),!1)}}var Te=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!ke(t,!0,this)},t.prototype.has=function(t){return ke(t,!1,this)},t}(),Le=Z((function(t,e){for(var r=[],n=0,o=t.length,i=e.length,a=new Te,u=0;u=0&&this.i>=this.n?at(r):r},t}(),De=Z(it(["take"],Z((function(t,e){return new Ne(t,e)})),(function(t,e){return re(0,t<0?1/0:t,e)}))),Me=K((function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():nt(t)?[]:ht(t)?"":ve(t)?{}:Pt(t)?function(){return arguments}():(e=t,"[object Uint8ClampedArray]"===(r=Object.prototype.toString.call(e))||"[object Int8Array]"===r||"[object Uint8Array]"===r||"[object Int16Array]"===r||"[object Uint16Array]"===r||"[object Int32Array]"===r||"[object Uint32Array]"===r||"[object Float32Array]"===r||"[object Float64Array]"===r||"[object BigInt64Array]"===r||"[object BigUint64Array]"===r?t.constructor.from(""):void 0);var e,r})),Ue=Me,qe=Z((function t(e,r){if(!ve(r)&&!nt(r))return r;var n,o,i,a=r instanceof Array?[]:{};for(o in r)i=typeof(n=e[o]),a[o]="function"===i?n(r[o]):n&&"object"===i?t(n,r[o]):r[o];return a})),Ge=function(){function t(t,e){this.xf=e,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=ut,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,e){return this.f(e)&&(this.found=!0,t=at(this.xf["@@transducer/step"](t,e))),t},t}(),Be=Z(it(["find"],Z((function(t,e){return new Ge(t,e)})),(function(t,e){for(var r=0,n=e.length;r=0?t:r.length;var n=Array.prototype.slice.call(r,0);return n.splice(t,0,e),n})),ir=K((function(t){return tt(t.length,(function(e,r){var n=Array.prototype.slice.call(arguments,0);return n[0]=r,n[1]=e,t.apply(this,n)}))})),ar=ir,ur=function(){function t(t,e){this.xf=e,this.f=t,this.set=new Te}return t.prototype["@@transducer/init"]=ut,t.prototype["@@transducer/result"]=ct,t.prototype["@@transducer/step"]=function(t,e){return this.set.add(this.f(e))?this.xf["@@transducer/step"](t,e):t},t}(),cr=Z(it([],Z((function(t,e){return new ur(t,e)})),(function(t,e){for(var r,n,o=new Te,i=[],a=0;ae.length?(r=t,n=e):(r=e,n=t),sr(ye(ar(le)(r),n))})),lr="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),r=1,n=arguments.length;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;if(Array.isArray(e))e.forEach((function(e,i){o?t(gr(o,e),r,Ee(n,Ee([i],o))):t(e,r,zt(i,n))}));else if("Object"===Zt(e)){r(e,n);var i=gr(_n,e);if(i){var a=Ee(n,_n);t(i,r,a)}var u=Dr([],[e.namespace,e.type],window.__dashprivate_childrenProps);u.forEach((function(o){if(o.includes("[]")){var i=bn(o.split("[]").map((function(t){return t.split(".").filter((function(t){return t}))})),2),a=i[0],u=i[1],c=Ee(["props"],a),s=Ee(n,c);t(gr(c,e),r,s,u)}else{var f=Ee(n,["props"].concat(gn(o.split("."))));t(gr(["props"].concat(gn(o.split("."))),e),r,f)}}))}},jn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._ev={}}var e,r;return e=t,r=[{key:"on",value:function(t,e){var r=this;return(this._ev[t]=this._ev[t]||[]).push(e),function(){return r.removeListener(t,e)}}},{key:"removeListener",value:function(t,e){var r=this._ev[t];if(r){var n=r.indexOf(e);n>-1&&r.splice(n,1)}}},{key:"emit",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),o=1;ot.length)&&(e=t.length);for(var r=0,n=new Array(e);ro?1:ne?1:t=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(u.s();!(r=u.n()).done;){var c=r.value,s=c.id;if(c.property===o&&"string"!=typeof s&&se(It(s).sort(),i)&<(Kn,Zr(a,Br(i,s))))return c}}catch(t){u.e(t)}finally{u.f()}return!1}function Zn(t,e){var r=new hn.f,n={},o=Ct(qe({id:Hn})),i=Ct((function(t){var e,r=t.output,n=qe({inputs:o,state:o},t);return n.outputs=Ct((function(t){return Kt("out",!0,Fn(t))}),Cn(r)?(e=r).substr(2,e.length-4).split("..."):[r]),n}),t),a=!1;!function(t,e){var r={},n=[];t.forEach((function(t){var o=t.inputs,i=t.outputs,a=t.state,u=!0;1!==i.length||i[0].id||i[0].property||(u=!1,e("A callback is missing Outputs",["Please provide an output for this callback:",JSON.stringify(t,null,2)]));var c="In the callback for output(s):\n "+i.map(yo).join("\n ");o.length||e("A callback is missing Inputs",[c,"there are no `Input` elements.","Without `Input` elements, it will never get called.","","Subscribing to `Input` components will cause the","callback to be called whenever their values change."]),[[i,"Output"],[o,"Input"],[a,"State"]].forEach((function(t){var r=Ln(t,2),n=r[0],o=r[1];("Output"!==o||u)&&(Array.isArray(n)||e("Callback ".concat(o,"(s) must be an Array"),[c,"For ".concat(o,"(s) we found:"),JSON.stringify(n),"but we expected an Array."]),n.forEach((function(t,r){!function(t,e,r,n,o){var i=t.id,a=t.property;if("string"==typeof a&&a||o("Callback property error",[e,"".concat(r,"[").concat(n,"].property = ").concat(JSON.stringify(a)),"but we expected `property` to be a non-empty string."]),"object"==typeof i)pr(i)&&o("Callback item missing ID",[e,"".concat(r,"[").concat(n,"].id = {}"),"Every item linked to a callback needs an ID"]),Ve((function(t,i){i||o("Callback wildcard ID error",[e,"".concat(r,"[").concat(n,'].id has key "').concat(i,'"'),"Keys must be non-empty strings."]),"object"==typeof t&&t.wild?qn[r][t.wild]!==t&&o("Callback wildcard ID error",[e,"".concat(r,"[").concat(n,'].id["').concat(i,'"] = ').concat(t.wild),"Allowed wildcards for ".concat(r,"s are:"),It(qn[r]).join(", ")]):rr(typeof t,Gn)||o("Callback wildcard ID error",[e,"".concat(r,"[").concat(n,'].id["').concat(i,'"] = ').concat(JSON.stringify(t)),"Wildcard callback ID values must be either wildcards","or constants of one of these types:",Gn.join(", ")])}),i);else if("string"==typeof i){i||o("Callback item missing ID",[e,"".concat(r,"[").concat(n,'].id = "').concat(i,'"'),"Every item linked to a callback needs an ID"]);var u=Bn.filter((function(t){return rr(t,i)}));u.length&&o("Callback invalid ID string",[e,"".concat(r,"[").concat(n,"].id = '").concat(i,"'"),"characters '".concat(u.join("', '"),"' are not allowed.")])}else o("Callback ID type error",[e,"".concat(r,"[").concat(n,"].id = ").concat(JSON.stringify(i)),"IDs must be strings or wildcard-compatible objects."])}(t,c,o,r,e)})))})),function(t,e,r,n,o){var i={},a=[];t.forEach((function(t,u){var c=t.id,s=t.property;if("string"==typeof c){var f=yo({id:c,property:s});i[f]?r("Duplicate callback Outputs",[e,"Output ".concat(u," (").concat(f,") is already used by this callback.")]):n[f]?r("Duplicate callback outputs",[e,"Output ".concat(u," (").concat(f,") is already in use."),"Any given output can only have one callback that sets it.","To resolve this situation, try combining these into","one callback function, distinguishing the trigger","by using `dash.callback_context` if necessary."]):i[f]=1}else{var l={id:c,property:s},p=Vn(l,a),h=p||Vn(l,o);if(p||h){var d=yo(l),y=yo(p||h);r("Overlapping wildcard callback outputs",[e,"Output ".concat(u," (").concat(d,")"),"overlaps another output (".concat(y,")"),"used in ".concat(p?"this":"a different"," callback.")])}else a.push(l)}})),It(i).forEach((function(t){n[t]=1})),a.forEach((function(t){o.push(t)}))}(i,c,e,r,n),function(t,e,r,n,o){var i=Qn(t[0].id).matchKeys;t.forEach((function(e,r){r&&!se(Qn(e.id).matchKeys,i)&&o("Mismatched `MATCH` wildcards across `Output`s",[n,"Output ".concat(r," (").concat(yo(e),")"),"does not have MATCH wildcards on the same keys as","Output 0 (".concat(yo(t[0]),")."),"MATCH wildcards must be on the same keys for all Outputs.","ALL wildcards need not match, only MATCH."])})),[[e,"Input"],[r,"State"]].forEach((function(e){var r=Ln(e,2),a=r[0],u=r[1];a.forEach((function(e,r){var a=Qn(e.id),c=a.matchKeys,s=a.allsmallerKeys,f=c.concat(s),l=Le(f,i);l.length&&(l.sort(),o("`Input` / `State` wildcards not in `Output`s",[n,"".concat(u," ").concat(r," (").concat(yo(e),")"),"has MATCH or ALLSMALLER on key(s) ".concat(l.join(", ")),"where Output 0 (".concat(yo(t[0]),")"),"does not have a MATCH wildcard. Inputs and State do not","need every MATCH from the Output(s), but they cannot have","extras beyond the Output(s)."]))}))}))}(i,o,a,c,e)}))}(i,(function(t,r){a=!0,e(t,r)}));var u={},c={},s={},f={},l={MultiGraph:r,outputMap:u,inputMap:c,outputPatterns:s,inputPatterns:f,callbacks:i};if(a)return l;function p(t,e){var r=[{}];return Ve((function(t,o){var i=n[o].vals,a=i.indexOf(e[o]),u=[t];t&&t.wild&&(u=t===Mn?a>0?i.slice(0,a):[]:-1===a||t===Nn?i:[e[o]]),r=$t($t([Kt(o)],u),r)}),t),r}i.forEach((function(t){var e=t.outputs,r=t.inputs;e.concat(r).forEach((function(t){var e=t.id;"object"==typeof e&&Ve((function(t,e){n[e]||(n[e]={exact:[],expand:0});var r=n[e];t&&t.wild?t.expand&&(r.expand+=1):-1===r.exact.indexOf(t)&&r.exact.push(t)}),e)}))})),Ve((function(t){var e,r=t.exact,n=t.expand,o=r.slice().sort(zn);if(n)for(var i=0;i2&&void 0!==arguments[2])||arguments[2];r.addNode(t),r.addDependency(t,e),n&&(y[y.length-1].push(t),v[v.length-1].push(e))}return i.forEach((function(t){var e=t.outputs,n=t.inputs;function o(t,e){r.addNode(e),n.forEach((function(r){var n=r.id,o=r.property;"object"==typeof n?p(n,t).forEach((function(t){g(yo({id:t,property:o}),e)})):g(yo(r),e)}))}y.push([]),v.push([]);var i=Qn(e[0].id).matchKeys,a=ze((function(t){return!eo(t.id)}),e),l=Ar({matchKeys:i,firstSingleOutput:a,outputs:e},t);e.forEach((function(t){var e=t.id,r=t.property,i=function(t,e){var r=t.id,n=t.property;return e.some((function(e){var o=e.id,i=e.property;if(n!==i||typeof r!=typeof o)return!1;if("string"==typeof r){if(r===o)return!0}else if(Vn(e,[t]))return!0;return!1}))}(t,n);if("object"==typeof e)p(e,{}).forEach((function(t){var e={id:t,property:r},n=yo(e);i&&(d.push(e),n+=h),o(t,n)})),Wn(s,e,r,l);else{var a=yo(t);i&&(d.push(t),a+=h),o({},a),Yn(u,e,r,l)}})),n.forEach((function(t){var e=t.id,r=t.property;"object"==typeof e?Wn(f,e,r,l):Yn(c,e,r,l)}))})),d.forEach((function(t){for(var e=yo(t),r=e.concat(h),n=0;nt.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5])||arguments[5],a=[],u=yo({id:r,property:n});if("string"==typeof r){var c=(t.inputMap[r]||{})[n];if(!c)return[];c.forEach(oo(xo(),e,a))}else{var s=Object.keys(r).sort(),f=Br(s,r),l=s.join(","),p=(t.inputPatterns[l]||{})[n];if(!p)return[];p.forEach((function(t){Xn(s,f,t.values)&&t.callbacks.forEach(oo(xo(s,f,t.values),e,a))}))}return a.forEach((function(r){r.changedPropIds[u]=o||2,i&&(r.priority=go(t,e,r))})),a}function go(t,e,r){for(var n=[r],o={},i={},a=[];n.length;){n=be((function(t){var e=i[t.resolvedId];return i[t.resolvedId]=!0,e}),n);var u=be((function(t){return!o[yo(t)]}),Je(Ct((function(t){return Je(t.getOutputs(e))}),n)));u.forEach((function(t){return o[yo(t)]=!0})),(n=Je(Ct((function(r){var n=r.id,o=r.property;return vo(t,e,n,o,po,!1)}),u))).length&&a.push(n.length)}return a.unshift(a.length),Ct((function(t){return Math.min(t,35).toString(36)}),a).join("")}function bo(t,e,r){for(var n=[r],o={};n.length;){var i=be((function(t){return!o[yo(t)]}),Je(Ct((function(t){return Je(t.getOutputs(e))}),n)));o=Gt((function(t,e){return Kt(yo(e),!0,t)}),o,i),n=Je(Ct((function(r){var n=r.id,o=r.property;return vo(t,e,n,o,po,!1)}),i))}return o}var mo=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e.length)return[];var o=Ct(yo,Gt((function(e,r){return Ee(e,Je(r.getOutputs(t)))}),[],r)),i={};if(We((function(t){return i[t]=!0}),o),Object.keys(n).length){var a=Je(Ct((function(e){return bo(n,t,e)}),r));a.length>0&&(i=Object.assign.apply(Object,[a[0]].concat(so(a))))}return be((function(e){return lt((function(t){return!i[yo(t)]}),Le(Je(e.getInputs(t)),Je(e.getOutputs(t))))}),e)},wo=function(t,e,r,n){for(var o=[],i=function(t,e,r,n){var o=n.outputsOnly,i=n.removedArrayInputsOnly,a=n.newPaths,u=n.chunkPath,c={},s=[];function f(t){if(t){var e=c[t.resolvedId];if(void 0!==e){var r=s[e];r.changedPropIds=ho(r.changedPropIds,t.changedPropIds),t.initialCall&&(r.initialCall=!0)}else c[t.resolvedId]=s.length,s.push(t)}}function l(r,n,c){if(n)for(var s in n){var l=ro(t,0,r,s);l&&(l.callback.prevent_initial_call||(l.initialCall=!0,f(l)))}if(!o&&c){var p=i?(y=$n(r),function(t){return t.getInputs(e).some((function(e){return!(!Array.isArray(e)||!e.some((function(t){return $n(t.id)===y}))||(Je(t.getOutputs(a)).length&&(t.initialCall=!0,t.changedPropIds={},f(t)),0))}))}):f,h=p;for(var d in u&&(h=function(t){lt(Yr(u),Ut("path",Je(t.getOutputs(e))))||p(t)}),c)vo(t,e,r,d,po).forEach(h)}var y}return En(r,(function(e){var r=gr(["props","id"],e);if(r)if("string"!=typeof r||i){var n=Object.keys(r).sort().join(",");l(r,!i&&t.outputPatterns[n],t.inputPatterns[n])}else l(r,t.outputMap[r],t.inputMap[r])})),Ct((function(r){return kn(kn({},r),{},{priority:go(t,e,r)})}),s)}(t,e,r,n);;){var a=co(Cr((function(t){var r=t.callback.inputs,n=t.getInputs;return lt(eo,r)||!pr(Le(Ct(yo,Je(n(e))),o))}),i),2),u=a[0],c=a[1];if(!c.length)break;i=u,o=Ee(o,Ct(yo,Je(Ct((function(t){return(0,t.getOutputs)(e)}),c))))}var s=Math.random().toString(16);return Ct((function(t){return ao(ao({},t),{},{executionGroup:s})}),i)},Oo=function(t){var e=t.anyVals,r=t.callback,n=r.inputs,o=r.outputs,i=r.state;return Ee(Ct(yo,[].concat(so(n),so(o),so(i))),Array.isArray(e)?e:""===e?[]:[e]).join(",")};function _o(t,e,r,n){return Je(Ct((function(e){return vo(r,n,t,e)}),It(e)))}var Eo=function(t,e,r){return{callback:t,anyVals:r,resolvedId:t.output+r,getOutputs:function(r){return t.outputs.map(e(r))},getInputs:function(r){return t.inputs.map(e(r))},getState:function(r){return t.state.map(e(r))},changedPropIds:{},initialCall:!1}};function jo(t,e){var r=co(Cr((function(t){var r=t.getOutputs,n=t.callback.outputs;return Je(r(e)).length===n.length}),t),2)[1],n=co(Cr((function(t){var r=t.getOutputs;return!Je(r(e)).length}),r),2)[1];return{added:Ct((function(t){return Kt("changedPropIds",Ur((function(t,r){return Sn(e,Fn(r).id)}),t.changedPropIds),t)}),n),removed:r}}function xo(t,e,r){return function(n){return function(o){var i=o.id,a=o.property;if("string"==typeof i){var u=Sn(n,i);return u?[{id:i,property:a,path:u}]:[]}var c=Object.keys(i).sort(),s=Br(c,i),f=c.join(","),l=n.objs[f];if(!l)return[];var p=[];return l.forEach((function(n){var o=n.values,i=n.path;Xn(c,o,s,t,e,r)&&p.push({id:Qr(c,o),property:a,path:i})})),p}}}var So={ON_PROP_CHANGE:1,SET_REQUEST_QUEUE:1,SET_GRAPHS:1,SET_PATHS:1,SET_LAYOUT:1,SET_APP_LIFECYCLE:1,SET_CONFIG:1,ADD_HTTP_HEADERS:1,ON_ERROR:1,SET_HOOKS:1},Po=function(t){if(So[t])return t;throw new Error("".concat(t," is not defined."))};function Ao(t){var e={STARTED:"STARTED",HYDRATED:"HYDRATED",DESTROYED:"DESTROYED"};if(e[t])return e[t];throw new Error("".concat(t," is not a valid app state."))}var ko,To,Lo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ao("STARTED"),e=arguments.length>1?arguments[1]:void 0;return e.type===Po("SET_APP_LIFECYCLE")?Ao(e.payload):t};function Io(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ro(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:No,e=arguments.length>1?arguments[1]:void 0;return Gt((function(t,e){return null===e?t:e.type===To.AddCompleted?Uo(t,e):qo(t,e)}),t,e.type===To.Aggregate?e.payload:[e])};function Bo(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0;return e.type===Po("SET_CONFIG")?(window.__dashprivate_childrenProps=Sr(window.__dashprivate_childrenProps||{},e.payload.children_props),e.payload):e.type===Po("ADD_HTTP_HEADERS")?Sr(t,{fetch:{headers:e.payload}}):t}var Fo={},Ho=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fo,e=arguments.length>1?arguments[1]:void 0;return"SET_GRAPHS"===e.type?e.payload:t};function $o(t){return function(t){if(Array.isArray(t))return zo(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return zo(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zo(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zo(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:Jo,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ON_ERROR":var r=t.frontEnd,n=t.backEnd,o=t.backEndConnected;return console.error(e.payload.error),"frontEnd"===e.payload.type?{frontEnd:[Ar(e.payload,{timestamp:new Date})].concat($o(r)),backEnd:n,backEndConnected:o}:"backEnd"===e.payload.type?{frontEnd:r,backEnd:[Ar(e.payload,{timestamp:new Date})].concat($o(n)),backEndConnected:o}:t;case"SET_CONNECTION_STATUS":return Ar(t,{backEndConnected:e.payload});default:return t}}function Wo(t){return function(t){if(Array.isArray(t))return Ko(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ko(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ko(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ko(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:Vo,e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"UNDO":var r=t.past,n=t.present,o=t.future,i=r[r.length-1],a=r.slice(0,r.length-1);return{past:a,present:i,future:[n].concat(Wo(o))};case"REDO":var u=t.past,c=t.present,s=t.future,f=s[0],l=s.slice(1);return{past:[].concat(Wo(u),[c]),present:f,future:l};case"REVERT":var p=t.past,h=t.future,d=p[p.length-1],y=p.slice(0,p.length-1);return{past:y,present:d,future:Wo(h)};default:return t}},Qo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{request_pre:null,request_post:null,callback_resolved:null,request_refresh_jwt:null,bear:!1},e=arguments.length>1?arguments[1]:void 0;return"SET_HOOKS"===e.type?e.payload:t},Xo="JWT Expired",ti=200,ei=204,ri="CLIENTSIDE_ERROR",ni={[ti]:"SUCCESS",[ei]:"NO_UPDATE"},oi=["__dash_client","__dash_server","__dash_upload","__dash_download"];function ii(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}var ai,ui={count:0,total:0,compute:0,network:{time:0,upload:0,download:0},resources:{},status:{latest:null},result:{}},ci={updated:[],resources:{},callbacks:{},graphLayout:null},si=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ci,e=arguments.length>1?arguments[1]:void 0;if("UPDATE_RESOURCE_USAGE"===e.type){var r=e.payload,n=r.id,o=r.usage,i=r.status,a=ni[i]||i,u={updated:[n],resources:t.resources,callbacks:t.callbacks,graphLayout:t.graphLayout};u.callbacks[n]=u.callbacks[n]||Xt(ui);var c=u.callbacks[n],s=c.resources,f=u.resources;if(c.count+=1,c.status.latest=a,c.status[a]=(c.status[a]||0)+1,c.result=e.payload.result,c.inputs=e.payload.inputs,c.state=e.payload.state,o){var l=o.__dash_client,p=o.__dash_server,h=o.__dash_upload,d=o.__dash_download,y=ii(o,oi);for(var v in c.total+=l,c.compute+=p,c.network.time+=l-p,c.network.upload+=h,c.network.download+=d,y)y.hasOwnProperty(v)&&(s[v]=(s[v]||0)+y[v],f[v]=(f[v]||0)+y[v])}return u}return t},fi={id:null,props:{}},li=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:fi;return t};!function(t){t.Set="IsLoading.Set"}(ai||(ai={}));var pi,hi=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1?arguments[1]:void 0;return e.type===ai.Set?e.payload:t},di=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;if(e.type===Po("SET_LAYOUT"))return e.payload;if(rr(e.type,["UNDO_PROP_CHANGE","REDO_PROP_CHANGE",Po("ON_PROP_CHANGE")])){var r=zt("props",e.payload.itempath),n=Vr(br(r),t),o=Ar(n,e.payload.props);return Wt(r,o,t)}return t};!function(t){t.Set="LoadingMap.Set"}(pi||(pi={}));var yi={},vi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:yi,e=arguments.length>1?arguments[1]:void 0;return e.type===pi.Set?e.payload:t},gi={strs:{},objs:{}},bi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:gi,e=arguments.length>1?arguments[1]:void 0;return e.type===Po("SET_PATHS")?e.payload:t},mi=function(t,e){return Kt(t.jobId,t,e)},wi=function(t,e){return Ce(t,e)},Oi=function(t,e){return Wt([t,"outdated"],!0,e)};function _i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case"ADD_CALLBACK_JOB":return mi(e.payload,t);case"REMOVE_CALLBACK_JOB":return wi(e.payload.jobId,t);case"CALLBACK_JOB_OUTDATED":return Oi(e.payload.jobId,t);default:return t}}function Ei(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=t;if(e.type===r){var o=e.payload,i=o.id,a={status:o.status,content:o.content};n=Array.isArray(i)?Wt(i,a,t):i?Kt(i,a,t):Ar(t,a)}return n})}),ji),t.callbackJobs=_i,function(t){for(var e=Object.keys(t),r={},n=0;n1?r-1:0),o=1;o=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Fi(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var Hi=qi(Po("ON_ERROR")),$i=qi(Po("SET_APP_LIFECYCLE")),zi=qi(Po("SET_CONFIG")),Ji=qi(Po("ADD_HTTP_HEADERS")),Yi=qi(Po("SET_GRAPHS")),Wi=qi(Po("SET_HOOKS")),Ki=qi(Po("SET_LAYOUT")),Vi=qi(Po("SET_PATHS")),Zi=(qi(Po("SET_REQUEST_QUEUE")),qi(Po("ON_PROP_CHANGE"))),Qi=function(t){return function(e,r){return t(Hi({type:"backEnd",error:{message:e,html:r.join("\n")}}))}};var Xi=Rr(console.warn);function ta(){try{return{"X-CSRFToken":Gi.parse(document.cookie)._csrf_token}}catch(t){return Xi(t),{}}}var ea=oa("REDO"),ra=oa("UNDO"),na=oa("REVERT");function oa(t){return function(e,r){var n=r(),o=n.history,i=n.paths;e(qi(t)());var a=("REDO"===t?o.future[0]:o.past[o.past.length-1])||{},u=a.id,c=a.props;u&&(e(qi("UNDO_PROP_CHANGE")({itempath:Sn(i,u),props:c})),e(ia({id:u,props:c})))}}function ia(t){var e=t.id,r=t.props;return function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Fi(i,n,o,a,u,"next",t)}function u(t){Fi(i,n,o,a,u,"throw",t)}a(void 0)}))}}(Bi().mark((function t(n,o){var i,a,u;return Bi().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:i=o(),a=i.graphs,u=i.paths,n(_a(_o(e,r,a,u)));case 2:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}()}function aa(t,e,r){if(t&&"function"==typeof t.text)t.text().then((function(t){r(Hi({type:"backEnd",error:{message:e,html:t}}))}));else{var n=t instanceof Error?t:{message:e,html:t};r(Hi({type:"backEnd",error:n}))}}function ua(t){return function(t){if(Array.isArray(t))return va(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ya(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ca(){ca=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function sa(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fa(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r5&&void 0!==arguments[5]&&arguments[5],a="Input"===o?r.getInputs:r.getState,u=[],c=0,s=a(t).map((function(i,a){var s=da(Ma(t,i.map((function(t){var r=t.id,n=t.property,o=t.path;return{id:r,property:n,value:gr(o,e).props[n]}})),n[a],r.anyVals,o),2),f=s[0],l=s[1];return eo(n[a])&&!f.length&&c++,l&&u.push(l),f}));if(u.length){if(i&&u.length+c===s.length)return null;qa(u,t)}return s}function qa(t,e){var r=t[0];throw-1!==r.indexOf("logged above")&&console.error(e.objs),new ReferenceError(r)}var Ga=function(t){return Array.isArray(t)?Ut("value",t):t.value},Ba=function(t,e){return Array.isArray(t)?Zr(t,e):[[t,e]]};function Fa(t,e,r,n){return Ha.apply(this,arguments)}function Ha(){return Ha=ha(ca().mark((function t(e,r,n,o){var i,a,u,c,s,f,l,p,h,d,y,v,g,b,m,w,O;return ca().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((i=window.dash_clientside=window.dash_clientside||{}).no_update||(Object.defineProperty(i,"no_update",{value:{description:"Return to prevent updating an Output."},writable:!1}),Object.defineProperty(i,"PreventUpdate",{value:{description:"Throw to prevent updating all Outputs."},writable:!1})),a=o.inputs,u=o.outputs,c=o.state,s=Date.now(),f=Ja(a),l=Ja(c),p={},h=ti,t.prev=8,v=r.namespace,g=r.function_name,b=a.map(Ga),c&&(b=Ee(b,c.map(Ga))),i.callback_context={},i.callback_context.triggered=o.changedPropIds.map((function(t){return{prop_id:t,value:f[t]}})),i.callback_context.inputs_list=a,i.callback_context.inputs=f,i.callback_context.states_list=c,i.callback_context.states=l,m=(d=i[v])[g].apply(d,ua(b)),delete i.callback_context,"function"!=typeof(null===(y=m)||void 0===y?void 0:y.then)){t.next=24;break}return t.next=23,m;case 23:m=t.sent;case 24:Ba(u,m).forEach((function(t){var e=da(t,2),r=e[0],n=e[1];Ba(r,n).forEach((function(t){var e=da(t,2),r=e[0],n=e[1],o=r.id,a=r.property,u=$n(o),c=p[u]=p[u]||{};n!==i.no_update&&(c[a]=n)}))})),t.next=35;break;case 27:if(t.prev=27,t.t0=t.catch(8),t.t0!==i.PreventUpdate){t.next=33;break}h=ei,t.next=35;break;case 33:throw h=ri,t.t0;case 35:return t.prev=35,delete i.callback_context,w=Date.now()-s,O={__dash_server:w,__dash_client:w,__dash_upload:0,__dash_download:0},n.ui&&e(Ra({id:o.output,usage:O,status:h,result:p,inputs:a,state:c})),t.finish(35);case 41:return t.abrupt("return",p);case 42:case"end":return t.stop()}}),t,null,[[8,27,35,41]])}))),Ha.apply(this,arguments)}function $a(t,e,r){Wr(t).forEach((function(t){var n=da(t,2),o=n[0],i=n[1],a=da(o.split("."),2),u=a[0],c=a[1],s=r.strs[u];e(Zi({props:{[c]:i},itempath:s})),e(ia({id:u,props:{[c]:i}}))}))}function za(t,e,r,n,o,i,a,u,c){e.request_pre&&e.request_pre(n);var s,f,l,p,h=Date.now(),d=JSON.stringify(n),y=a;return new Promise((function(a,v){var g=function(y){var g=y.status;if(f){var b=u().callbackJobs[f];if(null!=b&&b.outdated)return t(Na({jobId:f})),a({})}function w(e){if(r.ui){var o={__dash_server:0,__dash_client:Date.now()-h,__dash_upload:d.length,__dash_download:Number(y.headers.get("Content-Length"))};(y.headers.get("Server-Timing")||"").split(",").forEach((function(t){var e=t.split(";")[0],r=t.match(/;dur=[0-9.]+/);r&&(o[e]=Number(r[0].slice(5)))})),t(Ra({id:n.output,usage:o,status:g,result:e,inputs:n.inputs,state:n.state}))}}var O=function(){f&&t(Na({jobId:f})),l&&$a(l,t,o),p&&$a(p,t,o)};g===ti?y.json().then((function(r){if(!s&&r.cacheKey&&(s=r.cacheKey),!f&&r.job){var u={jobId:r.job,cacheKey:r.cacheKey,cancelInputs:r.cancel,progressDefault:r.progressDefault,output:c};t(Ca(u)),f=r.job}r.progress&&$a(r.progress,t,o),r.running&&$a(r.running,t,o),!l&&r.runningOff&&(l=r.runningOff),!p&&r.progressDefault&&(p=r.progressDefault),i&&void 0===r.response?setTimeout(m,void 0!==i.interval?i.interval:500):(O(),function(t){var r,o=t.multi,i=t.response;if(e.request_post&&e.request_post(n,i),o)r=i;else{var u=n.output;r={[u.substr(0,u.lastIndexOf("."))]:i.props}}w(r),a(r)}(r))})):g===ei?(O(),w({}),a({})):(O(),v(y))},b=function(){r.ui&&t(Ra({id:n.output,status:"NO_RESPONSE",result:{},inputs:n.inputs,state:n.state})),v(new Error("Callback failed: the server did not respond."))},m=function(){var t,e,n;(t=ta(),e="".concat(On(r),"_dash-update-component"),n=function(t,r){var n="?";e.includes("?")&&(n="&"),e="".concat(e).concat(n).concat(t,"=").concat(r)},s&&n("cacheKey",s),f&&n("job",f),y&&(y.forEach((function(t){var e=da(t,2),r=e[0],o=e[1];return n(r,o)})),y=y.filter((function(t){var e=da(t,3);return e[0],e[1],!e[2]}))),fetch(e,Sr(r.fetch,{method:"POST",headers:t,body:d}))).then(g,b)};m()}))}function Ja(t){if(!t)return{};for(var e={},r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Eu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ju(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function Hu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function $u(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r(null!==(n=e.priority)&&void 0!==n?n:"")?-1:1},Qu=function(t,e){var r=(0,t.getOutputs)(e),n=Je(r),o=[],i={};return n.forEach((function(t){var e=t.id,r=t.property,n=$n(e);(i[n]=i[n]||[]).push(r),o.push(yo({id:n,property:r}))})),{allOutputs:r,allPropIds:o}},Xu=function(t,e){return sr(Ut("id",[].concat(Wu(Je(t.getInputs(e))),Wu(Je(t.getState(e))))))},tc={observer:function(){var t=Yu(Fu().mark((function t(e){var r,n,o,i,a,u,c,s,f,l,p,h,d,y,v,g,b,m,w,O,_;return Fu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e.dispatch,n=e.getState,o=n(),i=o.callbacks,a=i.executing,u=i.watched,c=o.config,s=o.hooks,f=o.layout,l=o.paths,p=o.appLifecycle,h=n(),d=h.callbacks.prioritized,p===Ao("HYDRATED")){t.next=5;break}return t.abrupt("return");case 5:y=Math.max(0,12-a.length-u.length),d=Jr(Zu,d),v=Cr((function(t){return!0===Bu(f,l,Xu(t,l))}),d),j=2,g=function(t){if(Array.isArray(t))return t}(E=v)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(t);!(a=(n=r.next()).done)&&(i.push(n.value),!e||i.length!==e);a=!0);}catch(t){u=!0,o=t}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(E,j)||Ku(E,j)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),b=g[0],m=g[1],w=b.slice(0,y),O=m.slice(0,y-w.length),w.length&&r(Ia([Aa(w),wa(Ct((function(t){return Ya(t,c,s,l,f,Qu(t,l),r,n)}),w))])),O.length&&(_=Ct((function(t){return $u($u($u({},t),Qu(t,l)),{},{isReady:Bu(f,l,Xu(t,l))})}),O),r(Ia([Aa(O),ga(_)])),We(function(){var t=Yu(Fu().mark((function t(e){var o,i,a;return Fu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.isReady;case 2:if(o=n(),i=o.callbacks.blocked,Fe((function(t){return t===e||t.isReady===e.isReady}),i)){t.next=6;break}return t.abrupt("return");case 6:a=Ya(e,c,s,l,f,e,r,n),r(Ia([Sa([e]),wa([a])]));case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),_));case 12:case"end":return t.stop()}var E,j}),t)})));return function(e){return t.apply(this,arguments)}}(),inputs:["callbacks.prioritized","callbacks.completed"]},ec=tc;function rc(){rc=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function nc(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var oc=function(){var t=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){nc(i,n,o,a,u,"next",t)}function u(t){nc(i,n,o,a,u,"throw",t)}a(void 0)}))}}(rc().mark((function t(e){var r,n;return rc().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=new Promise((function(t){return r=t})),setTimeout(r,e),t.abrupt("return",n);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();function ic(){ic=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function ac(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function uc(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r4&&void 0!==arguments[4]?arguments[4]:null,i=[];for(var a in t)if(t.hasOwnProperty(a)){var u=void 0;try{"function"!=typeof t[a]?(u=Error((n||"React class")+": "+r+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof t[a]+"`.")).name="Invariant Violation":u=t[a](e,a,n,r,null,Ac())}catch(t){u=t}if(!u||u instanceof Error||i.push((n||"React class")+": type specification of "+r+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error){var c=o&&o()||"";i.push("Failed "+r+" type: "+u.message+c)}}return i.join("\n\n")}(e.propTypes,n,"component prop",e);return a&&function(t,e,r){var n,o=t.split("`");if(rr("is marked as required",t)){var i=o[1];n="".concat(i," in ").concat(r),e.id&&(n+=' with ID "'.concat(e.id,'"')),n+=" is required but it was not provided."}else if(rr("Bad object",t))n=t.split("supplied to ")[0]+"supplied to ".concat(r)+".\nBad"+t.split(".\nBad")[1];else{if(!rr("Invalid ",t)||!rr(" supplied to ",t))throw new Error(t);var a=o[1];if(n="Invalid argument `".concat(a,"` passed into ").concat(r),e.id&&(n+=' with ID "'.concat(e.id,'"')),n+=".",rr(", expected ",t)){var u=t.split(", expected ")[1];n+="\nExpected ".concat(u)}if(rr(" of type `",t)){var c=t.split(" of type `")[1].split("`")[0];n+="\nWas supplied type `".concat(c,"`.")}if(Xe(a,e)){var s=JSON.stringify(e[a],null,2);s&&(rr("\n",s)?n+="\nValue provided: \n".concat(s):n+="\nValue provided: ".concat(s))}}throw new Error(n)}(a,n,i),Jc(e,n,r,o)}function Jc(t,r,n,o){var i=Ar(r,n);return Array.isArray(o)?e().createElement.apply(e(),[t,i].concat(Fc(o))):e().createElement(t,i,o)}function Yc(t){return"Object"===Zt(t)&&Xe("type",t)&&Xe("namespace",t)&&Xe("props",t)}zc.propTypes={children:u().any,element:u().any,layout:u().any,props:u().any,extraProps:u().any,id:u().string};var Wc=function(r){var n=(0,t.useContext)(ps);return e().createElement(Vc,Bc({},n.fn(),r,{_dashprivate_path:JSON.parse(r._dashprivate_path)}))},Kc=(0,t.memo)(Wc),Vc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mc(t,e)}(u,t);var r,n,o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Gc(o);if(i){var r=Gc(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return Uc(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=a.call(this,t)).setProps=e.setProps.bind(qc(e)),e}return r=u,n=[{key:"createContainer",value:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return wc(r)?r:e().createElement(Kc,{key:r&&r.props&&$n(r.props.id)||o,_dashprivate_error:t._dashprivate_error,_dashprivate_layout:r,_dashprivate_loadingState:Tc(r,n,t._dashprivate_loadingMap),_dashprivate_loadingStateHash:Lc(n,t._dashprivate_loadingMap),_dashprivate_path:JSON.stringify(n)})}},{key:"setProps",value:function(t){var e=this.props,r=e._dashprivate_graphs,n=e._dashprivate_dispatch,o=e._dashprivate_path,i=e._dashprivate_layout,a=this.getLayoutProps(),u=a.id,c=Ur((function(t,e){return!se(t,a[e])}),t);if(!pr(c)){var s=function(t,e,r){if(!(t&&r&&e.length))return[];if("string"==typeof t){var n=r.inputMap[t];return n?e.filter((function(t){return n[t]})):[]}var o=Object.keys(t).sort(),i=Br(o,t),a=o.join(","),u=r.inputPatterns[a];return u?e.filter((function(t){var e=u[t];return e&&e.some((function(t){return Xn(o,i,t.values)}))})):[]}(u,It(c),r);!function(t,e,r){var n=lu(t),o=n.canPersist,i=n.id,a=n.props,u=n.element,c=n.persistence,s=n.persisted_props,f=n.persistence_type;o&&c&&We((function(t){var n=Wa(t.split("."),2),o=n[0],s=n[1];if(void 0!==e[o]){var l=uu(f,r),p=su(u,o,s).extract,h=fu(i,t,c),d=p(a[o]),y=p(e[o]);if(d!==y){l.hasItem(h)&&(d=l.getItem(h)[1]);var v=void 0===d?[y]:[y,d];l.setItem(h,v,r)}}}),s)}(i,t,n),s.length&&n(ia({id:u,props:Mr(s,c)})),n(Zi({props:c,itempath:o}))}}},{key:"getChildren",value:function(t,e){var r=this;return Yt(t)?null:Array.isArray(t)?rt(Ct)((function(t,n){return r.createContainer(r.props,t,Ee(e,["props","children",n]))}),t):this.createContainer(this.props,t,Ee(e,["props","children"]))}},{key:"wrapChildrenProp",value:function(t,e){var r=this;return Array.isArray(t)?t.map((function(t,n){return Yc(t)?r.createContainer(r.props,t,Ee(r.props._dashprivate_path,["props"].concat(Fc(e),[n])),n):t})):Yc(t)?this.createContainer(this.props,t,Ee(this.props._dashprivate_path,["props"].concat(Fc(e)))):t}},{key:"getComponent",value:function(t,r,n,o){var i=this,a=this.props,u=a._dashprivate_config,c=a._dashprivate_dispatch,s=a._dashprivate_error;if(pr(t))return null;if(wc(t))return t;Ic(t);for(var f=Pn(t),l=Dr([],["children_props",t.namespace,t.type],u),p=Ce("children",t.props),h=0;h=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function is(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}var as=Rr(console.warn),us={GET:function(t,e){return fetch(t,Sr(e,{method:"GET",headers:ta()}))},POST:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return fetch(t,Sr(e,{method:"POST",headers:ta(),body:r?JSON.stringify(r):null}))}};function cs(t,e,r,n,o){return function(){var i=function(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){is(i,n,o,a,u,"next",t)}function u(t){is(i,n,o,a,u,"throw",t)}a(void 0)}))}}(os().mark((function i(a,u){var c,s,f,l,p,h,d,y,v,g,b;return os().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:h=function(t){u().error.backEndConnected!==t&&a({type:"SET_CONNECTION_STATUS",payload:t})},c=u(),s=c.config,f=c.hooks,l=null,p="".concat(On(s)).concat(t),a({type:r,payload:{id:n,status:"loading"}}),i.prev=5,y=0;case 7:if(!(y<=1)){i.next=36;break}return i.prev=8,i.next=11,us[e](p,s.fetch,o);case 11:d=i.sent,i.next=19;break;case 14:return i.prev=14,i.t0=i.catch(8),console.log("fetch error",d),h(!1),i.abrupt("return");case 19:if(401!==d.status&&400!==d.status){i.next=32;break}if(!f.request_refresh_jwt){i.next=32;break}return i.next=23,d.text();case 23:if(!i.sent.includes(Xo)){i.next=32;break}return i.next=27,f.request_refresh_jwt(s.fetch.headers.Authorization.substr("Bearer ".length));case 27:if(!(v=i.sent)){i.next=32;break}return l={Authorization:"Bearer ".concat(v)},s=Sr(s,{fetch:{headers:l}}),i.abrupt("continue",33);case 32:return i.abrupt("break",36);case 33:y++,i.next=7;break;case 36:if(g=d.headers.get("content-type"),l&&a(Ji(l)),h(!0),!g||-1===g.indexOf("application/json")){i.next=41;break}return i.abrupt("return",d.json().then((function(t){return a({type:r,payload:{status:d.status,content:t,id:n}}),t})));case 41:return as("Response is missing header: content-type: application/json"),i.abrupt("return",a({type:r,payload:{id:n,status:d.status}}));case 45:i.prev=45,i.t1=i.catch(5),b="Error from API call: "+t,aa(i.t1,b,a);case 49:case"end":return i.stop()}}),i,null,[[5,45],[8,14]])})));return function(t,e){return i.apply(this,arguments)}}()}function ss(){ss=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new E(n||[]);return i._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=w(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function p(){}function h(){}var d={};u(d,o,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==e&&r.call(v,o)&&(d=v);var g=h.prototype=l.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function m(t,e){function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}var o;this._invoke=function(t,r){function i(){return new e((function(e,o){n(t,r,e,o)}))}return o=o?o.then(i,i):i()}}function w(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,w(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function O(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function j(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:j(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}function fs(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function ls(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r0?o:null,n.future.length>0?i:null))}Ls.styleTagTransform=ks(),Ls.setAttributes=xs(),Ls.insert=Es().bind(null,"head"),Ls.domAPI=Os(),Ls.insertStyleElement=Ps(),ms()(Ts.Z,Ls),Ts.Z&&Ts.Z.locals&&Ts.Z.locals,Is.propTypes={history:u().object,dispatch:u().func};var Rs=z((function(t){return{history:t.history}}),(function(t){return{dispatch:t}}))(Is);function Cs(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(r.content.files);try{for(a.s();!(o=a.n()).done;){var u=o.value;if(!u.is_css){i=!1;break}i=!0;for(var c=[],s=document.evaluate('//link[contains(@href, "'.concat(u.url,'")]'),this._head),f=s.iterateNext();f;)c.push(f),f=s.iterateNext();if(We((function(t){return t.setAttribute("disabled","disabled")}),c),u.modified>0){var l=document.createElement("link");l.href="".concat(u.url,"?m=").concat(u.modified),l.type="text/css",l.rel="stylesheet",this._head.appendChild(l)}}}catch(t){a.e(t)}finally{a.f()}i||window.location.reload()}else null!==this.state.intervalId&&500===r.status&&(this._retry>this.state.max_retry&&(this.clearInterval(),window.alert("Hot reloading is disabled after failing ".concat(this._retry," times. ")+"Please check your application for errors, then refresh the page.")),this._retry++)}},{key:"componentDidMount",value:function(){var t=this.props,e=t.dispatch,r=t.reloadRequest,n=this.state,o=n.disabled,i=n.interval;if(!o&&!this.state.intervalId){var a=window.setInterval((function(){"loading"!==r.status&&e(cs("_reload-hash","GET","reloadRequest"))}),i);this.setState({intervalId:a})}}},{key:"componentWillUnmount",value:function(){!this.state.disabled&&this.state.intervalId&&this.clearInterval()}},{key:"render",value:function(){return null}}],n=[{key:"getDerivedStateFromProps",value:function(t){return pr(t.reloadRequest)||"loading"===t.reloadRequest.status?null:{reloadRequest:t.reloadRequest}}}],r&&Ns(e.prototype,r),n&&Ns(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(e().Component);Gs.defaultProps={},Gs.propTypes={id:u().string,config:u().object,reloadRequest:u().object,dispatch:u().func,interval:u().number};var Bs=z((function(t){return{config:t.config,reloadRequest:t.reloadRequest}}),(function(t){return{dispatch:t}}))(Gs);function Fs(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Hs(t){for(var e=1;et.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/";if(e.enabled()){var o=new Date(Date.now()-c).toUTCString();document.cookie="".concat(t,"=;expires=").concat(o,";domain=").concat(n,";path=").concat(r)}}},{key:"get",value:function(t){if(t.length&&e.enabled())return t=t.toLowerCase(),(document.cookie.split(";").map((function(e){var t=e.split("=");return{id:t[0].trim(),value:t[1]}})).find((function(e){return t===e.id.toLocaleLowerCase()}))||{}).value}},{key:"set",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";if(e.enabled()){var i=new Date(Date.now()+s).toUTCString(),u="".concat(t,"=").concat(n,";expires=").concat(i,";domain=").concat(r,";path=").concat(o);e.get(t)&&e.delete(t,r,o),document.cookie=u}}}],null&&o(t.prototype,null),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();i=f,u="enabled",a=r.IHq((function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})),u in i?Object.defineProperty(i,u,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[u]=a;var l,p,d=n(3936);function y(e,t){for(var n=0;n=1&&t<=31||127==t||0==o&&t>=48&&t<=57||1==o&&t>=48&&t<=57&&45==u?"\\"+t.toString(16)+" ":0==o&&1==r&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+n.charAt(o):n.charAt(o):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(r)},9064:function(e){"use strict";e.exports=window.PropTypes},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},9972:function(e,t,n){"use strict";function r(e,t){var n;t=t||[];var r=(e=e||[]).length,o=t.length,i=[];for(n=0;n=arguments.length)?f=t[s]:(f=arguments[o],o+=1),r[s]=f,(0,a.Z)(f)||(u-=1),s+=1}return u<=0?n.apply(this,r):i(u,c(e,r,n))}}var s=(0,u.Z)((function(e,t){return 1===e?(0,o.Z)(t):i(e,c(e,[],t))})),f=(0,o.Z)((function(e){return s(e.length,(function(){var t=0,n=arguments[0],o=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0);return i[0]=function(){var e=n.apply(this,r(arguments,[t,o]));return t+=1,e},e.apply(this,i)}))})),l=f,p=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function d(e){return null!=e&&"function"==typeof e["@@transducer/step"]}function y(e,t,n){return function(){if(0===arguments.length)return n();var r=arguments[arguments.length-1];if(!p(r)){for(var o=0;o0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),x=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),j=(0,u.Z)((function(e,t){return i(e.length,(function(){return e.apply(t,arguments)}))})),Z=j;function T(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function S(e,t,n,r){return e["@@transducer/result"](n[r](Z(e["@@transducer/step"],e),t))}var A="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function E(e,t,n){if("function"==typeof e&&(e=function(e){return new x(e)}(e)),w(n))return function(e,t,n){for(var r=0,o=n.length;r=0;)P(t=L[n],e)&&!F(r,t)&&(r[r.length]=t),n-=1;return r})):(0,o.Z)((function(e){return Object(e)!==e?[]:Object.keys(e)})),z=(0,u.Z)(y(["fantasy-land/map","map"],k,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return s(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return E((function(n,r){return n[r]=e(t[r]),n}),{},I(t));default:return _(e,t)}}))),B=z,G=Number.isInteger||function(e){return e<<0===e},M=(0,u.Z)((function(e,t){var n=e<0?t.length+e:e;return O(t)?t.charAt(n):t[n]})),$=(0,u.Z)((function(e,t){if(null!=t)return G(e)?M(e,t):t[e]})),H=(0,u.Z)((function(e,t){return B($(e),t)})),V=n(1709),W=(0,V.Z)(E),J=function(){function e(e,t){this.xf=t,this.f=e,this.any=!1}return e.prototype["@@transducer/init"]=g.init,e.prototype["@@transducer/result"]=function(e){return this.any||(e=this.xf["@@transducer/step"](e,!1)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)&&(this.any=!0,e=b(this.xf["@@transducer/step"](e,!0))),e},e}(),Y=(0,u.Z)((function(e,t){return new J(e,t)})),Q=(0,u.Z)(y(["any"],Y,(function(e,t){for(var n=0;n1){var i=!ee(r)&&P(o,r)?r[o]:G(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,i)}return function(e,t,n){if(G(e)&&p(n)){var r=[].concat(n);return r[e]=t,r}var o={};for(var i in n)o[i]=n[i];return o[e]=t,o}(o,n,r)})),ne=(0,V.Z)((function(e,t,n){return te([e],t,n)})),re=(0,u.Z)((function(e,t){return B(e,function(e){var t=function(e){return{"@@transducer/init":g.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,n){var r=e["@@transducer/step"](t,n);return r["@@transducer/reduced"]?{"@@transducer/value":r,"@@transducer/reduced":!0}:r}}}(e);return{"@@transducer/init":g.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,n){return w(n)?E(t,e,n):E(t,e,[n])}}}(t))})),oe=(0,u.Z)(y(["fantasy-land/chain","chain"],re,(function(e,t){return"function"==typeof t?function(n){return e(t(n))(n)}:(!1,function(e){for(var t,n,r,o=[],i=0,u=e.length;i=0;){if(n[a]===e)return r[a]===t;a-=1}switch(u){case"Map":return e.size===t.size&&_e(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&_e(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=I(e);if(c.length!==I(t).length)return!1;var s=n.concat([e]),f=r.concat([t]);for(a=c.length-1;a>=0;){var l=c[a];if(!P(l,t)||!Oe(t[l],e[l],s,f))return!1;a-=1}return!0}var we=(0,u.Z)((function(e,t){return Oe(e,t,[],[])}));function xe(e,t,n){var r,o;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(r=1/t;n=0}function Ze(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var Te=function(e){return(e<10?"0":"")+e},Se="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Te(e.getUTCMonth()+1)+"-"+Te(e.getUTCDate())+"T"+Te(e.getUTCHours())+":"+Te(e.getUTCMinutes())+":"+Te(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Ae(e,t){for(var n=0,r=t.length,o=[];n":Ne(n,r)},r=function(e,t){return _((function(t){return Ze(t)+": "+n(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+_(n,e).join(", ")+"))";case"[object Array]":return"["+_(n,e).concat(r(e,Ce((function(e){return/^\d+$/.test(e)}),I(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):Ze(Se(e)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+n(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object String]":return"object"==typeof e?"new String("+n(e.valueOf())+")":Ze(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var o=e.toString();if("[object Object]"!==o)return o}return"{"+r(e,I(e)).join(", ")+"}"}}var qe=(0,o.Z)((function(e){return Ne(e,[])})),Ue=(0,u.Z)((function(e,t){if(p(e)){if(p(t))return e.concat(t);throw new TypeError(qe(t)+" is not an array")}if(O(e)){if(O(t))return e+t;throw new TypeError(qe(t)+" is not a string")}if(null!=e&&ge(e["fantasy-land/concat"]))return e["fantasy-land/concat"](t);if(null!=e&&ge(e.concat))return e.concat(t);throw new TypeError(qe(e)+' does not have a method named "concat" or "fantasy-land/concat"')})),Le=(0,u.Z)((function(e,t){return t>e?t:e}));function De(e,t,n){var r,o=typeof e;switch(o){case"string":case"number":return 0===e&&1/e==-1/0?!!n._items["-0"]||(t&&(n._items["-0"]=!0),!1):null!==n._nativeSet?t?(r=n._nativeSet.size,n._nativeSet.add(e),n._nativeSet.size===r):n._nativeSet.has(e):o in n._items?e in n._items[o]||(t&&(n._items[o][e]=!0),!1):(t&&(n._items[o]={},n._items[o][e]=!0),!1);case"boolean":if(o in n._items){var i=e?1:0;return!!n._items[o][i]||(t&&(n._items[o][i]=!0),!1)}return t&&(n._items[o]=e?[!1,!0]:[!0,!1]),!1;case"function":return null!==n._nativeSet?t?(r=n._nativeSet.size,n._nativeSet.add(e),n._nativeSet.size===r):n._nativeSet.has(e):o in n._items?!!je(e,n._items[o])||(t&&n._items[o].push(e),!1):(t&&(n._items[o]=[e]),!1);case"undefined":return!!n._items[o]||(t&&(n._items[o]=!0),!1);case"object":if(null===e)return!!n._items.null||(t&&(n._items.null=!0),!1);default:return(o=Object.prototype.toString.call(e))in n._items?!!je(e,n._items[o])||(t&&n._items[o].push(e),!1):(t&&(n._items[o]=[e]),!1)}}var Fe=function(){function e(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return e.prototype.add=function(e){return!De(e,!0,this)},e.prototype.has=function(e){return De(e,!1,this)},e}(),Ie=M(-1),ze=function(){function e(e,t){this.xf=t,this.f=e,this.found=!1}return e.prototype["@@transducer/init"]=g.init,e.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,void 0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)&&(this.found=!0,e=b(this.xf["@@transducer/step"](e,t))),e},e}(),Be=(0,u.Z)((function(e,t){return new ze(e,t)})),Ge=(0,u.Z)(y(["find"],Be,(function(e,t){for(var n=0,r=t.length;n=0;){if(e(t[n]))return t[n];n-=1}}))),Ye=(0,u.Z)(fe("forEach",(function(e,t){for(var n=t.length,r=0;r=0?e:n.length,[].concat(Array.prototype.slice.call(n,0,e),t,Array.prototype.slice.call(n,e))})),it=(0,o.Z)((function(e){return s(e.length,(function(t,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=t,e.apply(this,r)}))})),ut=it;function at(e){return e}var ct=(0,o.Z)(at),st=function(){function e(e,t){this.xf=t,this.f=e,this.set=new Fe}return e.prototype["@@transducer/init"]=g.init,e.prototype["@@transducer/result"]=g.result,e.prototype["@@transducer/step"]=function(e,t){return this.set.add(this.f(t))?this.xf["@@transducer/step"](e,t):e},e}(),ft=(0,u.Z)((function(e,t){return new st(e,t)})),lt=(0,u.Z)(y([],ft,(function(e,t){for(var n,r,o=new Fe,i=[],u=0;ut.length?(n=e,r=t):(n=t,r=e),lt(Ae(ut(je)(n),r))})),dt="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,r=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/";if(e.enabled()){var o=new Date(Date.now()-c).toUTCString();document.cookie="".concat(t,"=;expires=").concat(o,";domain=").concat(n,";path=").concat(r)}}},{key:"get",value:function(t){if(t.length&&e.enabled())return t=t.toLowerCase(),(document.cookie.split(";").map((function(e){var t=e.split("=");return{id:t[0].trim(),value:t[1]}})).find((function(e){return t===e.id.toLocaleLowerCase()}))||{}).value}},{key:"set",value:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";if(e.enabled()){var i=new Date(Date.now()+s).toUTCString(),u="".concat(t,"=").concat(n,";expires=").concat(i,";domain=").concat(r,";path=").concat(o);e.get(t)&&e.delete(t,r,o),document.cookie=u}}}],null&&o(t.prototype,null),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();i=f,u="enabled",a=r.IHq((function(){try{document.cookie="cookietest=1";var e=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",e}catch(e){return!1}})),u in i?Object.defineProperty(i,u,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[u]=a;var l,p,d=n(3936);function y(e,t){for(var n=0;n=1&&t<=31||127==t||0==o&&t>=48&&t<=57||1==o&&t>=48&&t<=57&&45==u?"\\"+t.toString(16)+" ":0==o&&1==r&&45==t||!(t>=128||45==t||95==t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122)?"\\"+n.charAt(o):n.charAt(o):i+="�";return i};return e.CSS||(e.CSS={}),e.CSS.escape=t,t}(r)},9064:function(e){"use strict";e.exports=window.PropTypes},9196:function(e){"use strict";e.exports=window.React},1850:function(e){"use strict";e.exports=window.ReactDOM},9972:function(e,t,n){"use strict";function r(e,t){var n;t=t||[];var r=(e=e||[]).length,o=t.length,i=[];for(n=0;n=arguments.length)?f=t[s]:(f=arguments[o],o+=1),r[s]=f,(0,a.Z)(f)||(u-=1),s+=1}return u<=0?n.apply(this,r):i(u,c(e,r,n))}}var s=(0,u.Z)((function(e,t){return 1===e?(0,o.Z)(t):i(e,c(e,[],t))})),f=(0,o.Z)((function(e){return s(e.length,(function(){var t=0,n=arguments[0],o=arguments[arguments.length-1],i=Array.prototype.slice.call(arguments,0);return i[0]=function(){var e=n.apply(this,r(arguments,[t,o]));return t+=1,e},e.apply(this,i)}))})),l=f,p=Array.isArray||function(e){return null!=e&&e.length>=0&&"[object Array]"===Object.prototype.toString.call(e)};function d(e){return null!=e&&"function"==typeof e["@@transducer/step"]}function y(e,t,n){return function(){if(0===arguments.length)return n();var r=arguments[arguments.length-1];if(!p(r)){for(var o=0;o0&&e.hasOwnProperty(0)&&e.hasOwnProperty(e.length-1))})),x=function(){function e(e){this.f=e}return e.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},e.prototype["@@transducer/result"]=function(e){return e},e.prototype["@@transducer/step"]=function(e,t){return this.f(e,t)},e}(),j=(0,u.Z)((function(e,t){return i(e.length,(function(){return e.apply(t,arguments)}))})),Z=j;function T(e,t,n){for(var r=n.next();!r.done;){if((t=e["@@transducer/step"](t,r.value))&&t["@@transducer/reduced"]){t=t["@@transducer/value"];break}r=n.next()}return e["@@transducer/result"](t)}function S(e,t,n,r){return e["@@transducer/result"](n[r](Z(e["@@transducer/step"],e),t))}var A="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";function E(e,t,n){if("function"==typeof e&&(e=function(e){return new x(e)}(e)),w(n))return function(e,t,n){for(var r=0,o=n.length;r=0;)P(t=L[n],e)&&!F(r,t)&&(r[r.length]=t),n-=1;return r})):(0,o.Z)((function(e){return Object(e)!==e?[]:Object.keys(e)})),z=(0,u.Z)(y(["fantasy-land/map","map"],k,(function(e,t){switch(Object.prototype.toString.call(t)){case"[object Function]":return s(t.length,(function(){return e.call(this,t.apply(this,arguments))}));case"[object Object]":return E((function(n,r){return n[r]=e(t[r]),n}),{},I(t));default:return _(e,t)}}))),B=z,G=Number.isInteger||function(e){return e<<0===e},M=(0,u.Z)((function(e,t){var n=e<0?t.length+e:e;return O(t)?t.charAt(n):t[n]})),$=(0,u.Z)((function(e,t){if(null!=t)return G(e)?M(e,t):t[e]})),H=(0,u.Z)((function(e,t){return B($(e),t)})),V=n(1709),W=(0,V.Z)(E),J=function(){function e(e,t){this.xf=t,this.f=e,this.any=!1}return e.prototype["@@transducer/init"]=g.init,e.prototype["@@transducer/result"]=function(e){return this.any||(e=this.xf["@@transducer/step"](e,!1)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)&&(this.any=!0,e=b(this.xf["@@transducer/step"](e,!0))),e},e}(),Y=(0,u.Z)((function(e,t){return new J(e,t)})),Q=(0,u.Z)(y(["any"],Y,(function(e,t){for(var n=0;n1){var i=!ee(r)&&P(o,r)?r[o]:G(t[1])?[]:{};n=e(Array.prototype.slice.call(t,1),n,i)}return function(e,t,n){if(G(e)&&p(n)){var r=[].concat(n);return r[e]=t,r}var o={};for(var i in n)o[i]=n[i];return o[e]=t,o}(o,n,r)})),ne=(0,V.Z)((function(e,t,n){return te([e],t,n)})),re=(0,u.Z)((function(e,t){return B(e,function(e){var t=function(e){return{"@@transducer/init":g.init,"@@transducer/result":function(t){return e["@@transducer/result"](t)},"@@transducer/step":function(t,n){var r=e["@@transducer/step"](t,n);return r["@@transducer/reduced"]?{"@@transducer/value":r,"@@transducer/reduced":!0}:r}}}(e);return{"@@transducer/init":g.init,"@@transducer/result":function(e){return t["@@transducer/result"](e)},"@@transducer/step":function(e,n){return w(n)?E(t,e,n):E(t,e,[n])}}}(t))})),oe=(0,u.Z)(y(["fantasy-land/chain","chain"],re,(function(e,t){return"function"==typeof t?function(n){return e(t(n))(n)}:(!1,function(e){for(var t,n,r,o=[],i=0,u=e.length;i=0;){if(n[a]===e)return r[a]===t;a-=1}switch(u){case"Map":return e.size===t.size&&_e(e.entries(),t.entries(),n.concat([e]),r.concat([t]));case"Set":return e.size===t.size&&_e(e.values(),t.values(),n.concat([e]),r.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=I(e);if(c.length!==I(t).length)return!1;var s=n.concat([e]),f=r.concat([t]);for(a=c.length-1;a>=0;){var l=c[a];if(!P(l,t)||!Oe(t[l],e[l],s,f))return!1;a-=1}return!0}var we=(0,u.Z)((function(e,t){return Oe(e,t,[],[])}));function xe(e,t,n){var r,o;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(r=1/t;n=0}function Ze(e){return'"'+e.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'}var Te=function(e){return(e<10?"0":"")+e},Se="function"==typeof Date.prototype.toISOString?function(e){return e.toISOString()}:function(e){return e.getUTCFullYear()+"-"+Te(e.getUTCMonth()+1)+"-"+Te(e.getUTCDate())+"T"+Te(e.getUTCHours())+":"+Te(e.getUTCMinutes())+":"+Te(e.getUTCSeconds())+"."+(e.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function Ae(e,t){for(var n=0,r=t.length,o=[];n":Ne(n,r)},r=function(e,t){return _((function(t){return Ze(t)+": "+n(e[t])}),t.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+_(n,e).join(", ")+"))";case"[object Array]":return"["+_(n,e).concat(r(e,Ce((function(e){return/^\d+$/.test(e)}),I(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+n(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?n(NaN):Ze(Se(e)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+n(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object String]":return"object"==typeof e?"new String("+n(e.valueOf())+")":Ze(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var o=e.toString();if("[object Object]"!==o)return o}return"{"+r(e,I(e)).join(", ")+"}"}}var qe=(0,o.Z)((function(e){return Ne(e,[])})),Ue=(0,u.Z)((function(e,t){if(p(e)){if(p(t))return e.concat(t);throw new TypeError(qe(t)+" is not an array")}if(O(e)){if(O(t))return e+t;throw new TypeError(qe(t)+" is not a string")}if(null!=e&&ge(e["fantasy-land/concat"]))return e["fantasy-land/concat"](t);if(null!=e&&ge(e.concat))return e.concat(t);throw new TypeError(qe(e)+' does not have a method named "concat" or "fantasy-land/concat"')})),Le=(0,u.Z)((function(e,t){return t>e?t:e}));function De(e,t,n){var r,o=typeof e;switch(o){case"string":case"number":return 0===e&&1/e==-1/0?!!n._items["-0"]||(t&&(n._items["-0"]=!0),!1):null!==n._nativeSet?t?(r=n._nativeSet.size,n._nativeSet.add(e),n._nativeSet.size===r):n._nativeSet.has(e):o in n._items?e in n._items[o]||(t&&(n._items[o][e]=!0),!1):(t&&(n._items[o]={},n._items[o][e]=!0),!1);case"boolean":if(o in n._items){var i=e?1:0;return!!n._items[o][i]||(t&&(n._items[o][i]=!0),!1)}return t&&(n._items[o]=e?[!1,!0]:[!0,!1]),!1;case"function":return null!==n._nativeSet?t?(r=n._nativeSet.size,n._nativeSet.add(e),n._nativeSet.size===r):n._nativeSet.has(e):o in n._items?!!je(e,n._items[o])||(t&&n._items[o].push(e),!1):(t&&(n._items[o]=[e]),!1);case"undefined":return!!n._items[o]||(t&&(n._items[o]=!0),!1);case"object":if(null===e)return!!n._items.null||(t&&(n._items.null=!0),!1);default:return(o=Object.prototype.toString.call(e))in n._items?!!je(e,n._items[o])||(t&&n._items[o].push(e),!1):(t&&(n._items[o]=[e]),!1)}}var Fe=function(){function e(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return e.prototype.add=function(e){return!De(e,!0,this)},e.prototype.has=function(e){return De(e,!1,this)},e}(),Ie=M(-1),ze=function(){function e(e,t){this.xf=t,this.f=e,this.found=!1}return e.prototype["@@transducer/init"]=g.init,e.prototype["@@transducer/result"]=function(e){return this.found||(e=this.xf["@@transducer/step"](e,void 0)),this.xf["@@transducer/result"](e)},e.prototype["@@transducer/step"]=function(e,t){return this.f(t)&&(this.found=!0,e=b(this.xf["@@transducer/step"](e,t))),e},e}(),Be=(0,u.Z)((function(e,t){return new ze(e,t)})),Ge=(0,u.Z)(y(["find"],Be,(function(e,t){for(var n=0,r=t.length;n=0;){if(e(t[n]))return t[n];n-=1}}))),Ye=(0,u.Z)(fe("forEach",(function(e,t){for(var n=t.length,r=0;r=0?e:n.length,[].concat(Array.prototype.slice.call(n,0,e),t,Array.prototype.slice.call(n,e))})),it=(0,o.Z)((function(e){return s(e.length,(function(t,n){var r=Array.prototype.slice.call(arguments,0);return r[0]=n,r[1]=t,e.apply(this,r)}))})),ut=it;function at(e){return e}var ct=(0,o.Z)(at),st=function(){function e(e,t){this.xf=t,this.f=e,this.set=new Fe}return e.prototype["@@transducer/init"]=g.init,e.prototype["@@transducer/result"]=g.result,e.prototype["@@transducer/step"]=function(e,t){return this.set.add(this.f(t))?this.xf["@@transducer/step"](e,t):e},e}(),ft=(0,u.Z)((function(e,t){return new st(e,t)})),lt=(0,u.Z)(y([],ft,(function(e,t){for(var n,r,o=new Fe,i=[],u=0;ut.length?(n=e,r=t):(n=t,r=e),lt(Ae(ut(je)(n),r))})),dt="function"==typeof Object.assign?Object.assign:function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1,r=arguments.length;n { };\n }\n let fn;\n let fnStyle = '';\n switch (level) {\n case LogLevel.TRACE:\n case LogLevel.INFO:\n fn = window.console.log;\n fnStyle = 'color: white; background-color: #3166A2;';\n break;\n case DebugLevel.DEBUG:\n case LogLevel.WARNING:\n fn = window.console.warn;\n fnStyle = 'color: white; background-color: #E9B606;';\n break;\n case LogLevel.ERROR:\n case LogLevel.FATAL:\n fn = window.console.error;\n fnStyle = 'color: white; background-color: #FF0000;';\n break;\n default:\n throw new Error(`Unknown log ${level}`);\n }\n const prefix = `${fnStyle && __highlightPrefix ? '%c' : ''}[${LogString[level].toUpperCase()}]`;\n if (fnStyle && __highlightPrefix) {\n return fn.bind(window.console, prefix, fnStyle);\n }\n else {\n return fn.bind(window.console, prefix);\n }\n}\nconst logger = {\n setDebugLevel(level) {\n __debugLevel = level;\n },\n setLogLevel(level) {\n __logLevel = level;\n }\n};\nObject.defineProperties(logger, {\n trace: {\n get: () => {\n return logFn(LogLevel.TRACE, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n info: {\n get: () => {\n return logFn(LogLevel.INFO, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n warning: {\n get: () => {\n return logFn(LogLevel.WARNING, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n error: {\n get: () => {\n return logFn(LogLevel.ERROR, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n fatal: {\n get: () => {\n return logFn(LogLevel.FATAL, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n debug: {\n get: () => {\n return logFn(DebugLevel.DEBUG, __debugLevel);\n },\n configurable: false,\n enumerable: false\n }\n});\nObject.freeze(logger);\nexport default logger;\nexport { DebugLevel, LogLevel };\n","import * as R from 'ramda';\nconst __1day = 86400 * 1000;\nconst __20years = 86400 * 1000 * 365 * 20;\nexport default class CookieStorage {\n // From https://github.com/Modernizr/Modernizr/blob/f4d3aa0b3c9eeb7338e8d89ed77929a8e969c502/feature-detects/cookies.js#L1\n // try..catch because some in situations `document.cookie` is exposed but throws a\n // SecurityError if you try to access it; e.g. documents created from data URIs\n // or in sandboxed iframes (depending on flags/context)\n static enabled = R.once(() => {\n try {\n // Create cookie\n document.cookie = 'cookietest=1';\n const ret = document.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n document.cookie =\n 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n return ret;\n }\n catch (e) {\n return false;\n }\n });\n static delete(id, domain = '', path = '/') {\n if (!CookieStorage.enabled()) {\n return;\n }\n const expires = new Date(Date.now() - __1day).toUTCString();\n document.cookie = `${id}=;expires=${expires};domain=${domain};path=${path}`;\n }\n static get(id) {\n if (!id.length) {\n return;\n }\n if (!CookieStorage.enabled()) {\n return;\n }\n id = id.toLowerCase();\n const cookies = document.cookie.split(';').map(cookie => {\n const fragments = cookie.split('=');\n return {\n id: fragments[0].trim(),\n value: fragments[1]\n };\n });\n return (cookies.find(cookie => id === cookie.id.toLocaleLowerCase()) ||\n {}).value;\n }\n static set(id, value, domain = '', path = '/') {\n if (!CookieStorage.enabled()) {\n return;\n }\n const expires = new Date(Date.now() + __20years).toUTCString();\n const entry = `${id}=${value};expires=${expires};domain=${domain};path=${path}`;\n if (CookieStorage.get(id)) {\n CookieStorage.delete(id, domain, path);\n }\n document.cookie = entry;\n }\n}\n","import CookieStorage from 'core/storage/Cookie';\nimport { DebugLevel, LogLevel } from 'core/Logger';\nconst DASH_DEBUG = 'dash_debug';\nconst DASH_LOG = 'dash_log';\nexport default class Environment {\n static _supportsCssVariables = Boolean(window.CSS?.supports?.('.some-selector', 'var(--some-var)'));\n static _activeEdge = Environment._supportsCssVariables\n ? '1px solid var(--accent)'\n : '1px solid hotpink';\n static get searchParams() {\n return ((typeof URL !== 'undefined' &&\n URL.prototype &&\n URL.prototype.constructor &&\n new URL(window.location.href).searchParams) || { get: () => null });\n }\n static get debugLevel() {\n const debug = this.searchParams.get(DASH_DEBUG) || CookieStorage.get(DASH_DEBUG);\n return debug\n ? DebugLevel[debug] || DebugLevel.NONE\n : DebugLevel.NONE;\n }\n static get logLevel() {\n const log = this.searchParams.get(DASH_LOG) || CookieStorage.get(DASH_LOG);\n return log ? LogLevel[log] || LogLevel.ERROR : LogLevel.ERROR;\n }\n static get defaultEdge() {\n return '1px solid #d3d3d3';\n }\n static get activeEdge() {\n return Environment._activeEdge;\n }\n static get supportsCssVariables() {\n return Environment._supportsCssVariables;\n }\n}\n","export default class LazyLoader {\n static get xlsx() {\n return import(\n /* webpackChunkName: \"export\", webpackMode: \"lazy\" */ 'xlsx');\n }\n static get hljs() {\n return Promise.resolve(window.hljs ||\n import(\n /* webpackChunkName: \"highlight\", webpackMode: \"lazy\" */ '../third-party/highlight.js').then(result => result.default));\n }\n static table() {\n return import(\n /* webpackChunkName: \"table\", webpackMode: \"lazy\" */ 'dash-table/dash/fragments/DataTable');\n }\n}\n","\nimport * as R from 'ramda';\nimport React, {Component, Suspense} from 'react';\nimport PropTypes from 'prop-types';\nimport {asyncDecorator} from '@plotly/dash-component-plugins';\nimport LazyLoader from 'dash-table/LazyLoader';\n/**\n * Dash DataTable is an interactive table component designed for\n * viewing, editing, and exploring large datasets.\n * DataTable is rendered with standard, semantic HTML markup,\n * which makes it accessible, responsive, and easy to style. This\n * component was written from scratch in React.js specifically for the\n * Dash community. Its API was designed to be ergonomic and its behavior\n * is completely customizable through its properties.\n */\nexport default class DataTable extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\nconst RealDataTable = asyncDecorator(DataTable, LazyLoader.table);\nexport const defaultProps = {\n page_action: 'native',\n page_current: 0,\n page_size: 250,\n css: [],\n filter_query: '',\n filter_action: 'none',\n sort_as_null: [],\n sort_action: 'none',\n sort_mode: 'single',\n sort_by: [],\n style_as_list_view: false,\n derived_viewport_data: [],\n derived_viewport_indices: [],\n derived_viewport_row_ids: [],\n derived_viewport_selected_rows: [],\n derived_viewport_selected_row_ids: [],\n derived_virtual_data: [],\n derived_virtual_indices: [],\n derived_virtual_row_ids: [],\n derived_virtual_selected_rows: [],\n derived_virtual_selected_row_ids: [],\n dropdown: {},\n dropdown_conditional: [],\n dropdown_data: [],\n fill_width: true,\n filter_options: {},\n fixed_columns: {\n headers: false,\n data: 0\n },\n fixed_rows: {\n headers: false,\n data: 0\n },\n markdown_options: {\n link_target: '_blank',\n html: false\n },\n tooltip: {},\n tooltip_conditional: [],\n tooltip_data: [],\n tooltip_header: {},\n tooltip_delay: 350,\n tooltip_duration: 2000,\n column_selectable: false,\n editable: false,\n export_columns: 'visible',\n export_format: 'none',\n include_headers_on_copy_paste: false,\n selected_cells: [],\n selected_columns: [],\n selected_rows: [],\n selected_row_ids: [],\n cell_selectable: true,\n row_selectable: false,\n style_table: {},\n style_cell_conditional: [],\n style_data_conditional: [],\n style_filter_conditional: [],\n style_header_conditional: [],\n virtualization: false,\n persisted_props: [\n 'columns.name',\n 'filter_query',\n 'hidden_columns',\n 'page_current',\n 'selected_columns',\n 'selected_rows',\n 'sort_by'\n ],\n persistence_type: 'local'\n};\nexport const propTypes = {\n /**\n * The contents of the table.\n * The keys of each item in data should match the column IDs.\n * Each item can also have an 'id' key, whose value is its row ID. If there\n * is a column with ID='id' this will display the row ID, otherwise it is\n * just used to reference the row for selections, filtering, etc.\n * Example:\n * [\n * {'column-1': 4.5, 'column-2': 'montreal', 'column-3': 'canada'},\n * {'column-1': 8, 'column-2': 'boston', 'column-3': 'america'}\n * ]\n */\n data: PropTypes.arrayOf(\n PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool\n ])\n )\n ),\n /**\n * Columns describes various aspects about each individual column.\n * `name` and `id` are the only required parameters.\n */\n columns: PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The `id` of the column.\n * The column `id` is used to match cells in data with particular columns.\n * The `id` is not visible in the table.\n */\n id: PropTypes.string.isRequired,\n /**\n * The `name` of the column, as it appears in the column header.\n * If `name` is a list of strings, then the columns\n * will render with multiple headers rows.\n */\n name: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]).isRequired,\n /**\n * The data-type provides support for per column typing and allows for data\n * validation and coercion.\n * 'numeric': represents both floats and ints.\n * 'text': represents a string.\n * 'datetime': a string representing a date or date-time, in the form:\n * 'YYYY-MM-DD HH:MM:SS.ssssss' or some truncation thereof. Years must\n * have 4 digits, unless you use `validation.allow_YY: true`. Also\n * accepts 'T' or 't' between date and time, and allows timezone info\n * at the end. To convert these strings to Python `datetime` objects,\n * use `dateutil.parser.isoparse`. In R use `parse_iso_8601` from the\n * `parsedate` library.\n * WARNING: these parsers do not work with 2-digit years, if you use\n * `validation.allow_YY: true` and do not coerce to 4-digit years.\n * And parsers that do work with 2-digit years may make a different\n * guess about the century than we make on the front end.\n * 'any': represents any type of data.\n * Defaults to 'any' if undefined.\n *\n *\n */\n type: PropTypes.oneOf(['any', 'numeric', 'text', 'datetime']),\n /**\n * The `presentation` to use to display data. Markdown can be used on\n * columns with type 'text'. See 'dropdown' for more info.\n * Defaults to 'input' for ['datetime', 'numeric', 'text', 'any'].\n */\n presentation: PropTypes.oneOf(['input', 'dropdown', 'markdown']),\n /**\n * If true, the user can select the column by clicking on the checkbox or radio button\n * in the column. If there are multiple header rows, true will display the input\n * on each row.\n * If `last`, the input will only appear on the last header row. If `first` it will only\n * appear on the first header row. These are respectively shortcut equivalents to\n * `[false, ..., false, true]` and `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose which column header\n * row to display the input in by supplying an array of booleans.\n * For example, `[true, false]` will display the `selectable` input on the first row,\n * but now on the second row.\n * If the `selectable` input appears on a merged columns, then clicking on that input\n * will select *all* of the merged columns associated with it.\n * The table-level prop `column_selectable` is used to determine the type of column\n * selection to use.\n *\n */\n selectable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * If true, the user can clear the column by clicking on the `clear`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `clear` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `clear` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `clear` action button\n * on the first row, but not the second row.\n * If the `clear` action button appears on a merged column, then clicking\n * on that button will clear *all* of the merged columns associated with it.\n * Unlike `column.deletable`, this action does not remove the column(s)\n * from the table. It only removed the associated entries from `data`.\n */\n clearable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * If true, the user can remove the column by clicking on the `delete`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `delete` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `delete` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `delete` action button\n * on the first row, but not the second row.\n * If the `delete` action button appears on a merged column, then clicking\n * on that button will remove *all* of the merged columns associated with it.\n */\n deletable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * There are two `editable` flags in the table.\n * This is the column-level editable flag and there is\n * also the table-level `editable` flag.\n * These flags determine whether the contents of the table\n * are editable or not.\n * If the column-level `editable` flag is set it overrides\n * the table-level `editable` flag for that column.\n */\n editable: PropTypes.bool,\n /**\n * If true, the user can hide the column by clicking on the `hide`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `hide` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `hide` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `hide` action button\n * on the first row, but not the second row.\n * If the `hide` action button appears on a merged column, then clicking\n * on that button will hide *all* of the merged columns associated with it.\n */\n hideable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * If true, the user can rename the column by clicking on the `rename`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `rename` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `rename` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `rename` action button\n * on the first row, but not the second row.\n * If the `rename` action button appears on a merged column, then clicking\n * on that button will rename *all* of the merged columns associated with it.\n */\n renamable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * There are two `filter_options` props in the table.\n * This is the column-level filter_options prop and there is\n * also the table-level `filter_options` prop.\n * If the column-level `filter_options` prop is set it overrides\n * the table-level `filter_options` prop for that column.\n */\n filter_options: PropTypes.shape({\n /**\n * (default: 'sensitive') Determine whether the applicable filter relational operators will default to `sensitive` or `insensitive` comparison.\n */\n case: PropTypes.oneOf(['sensitive', 'insensitive']),\n /**\n * (default: 'filter data...') The filter cell placeholder text.\n */\n placeholder_text: PropTypes.string\n }),\n /**\n * The formatting applied to the column's data.\n * This prop is derived from the [d3-format](https://github.com/d3/d3-format) library specification. Apart from\n * being structured slightly differently (under a single prop), the usage is the same.\n * See also dash_table.FormatTemplate. It contains helper functions for typical number formats.\n */\n format: PropTypes.exact({\n /**\n * Represents localization specific formatting information.\n * When left unspecified, will use the default value provided by d3-format.\n */\n locale: PropTypes.exact({\n /**\n * (default: ['$', '']). A list of two strings representing the\n * prefix and suffix symbols. Typically used for currency, and implemented using d3's\n * currency format, but you can use this for other symbols such as measurement units\n */\n symbol: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '.'). The string used for the decimal separator\n */\n decimal: PropTypes.string,\n /**\n * (default: ','). The string used for the groups separator\n */\n group: PropTypes.string,\n /**\n * (default: [3]). A list of integers representing the grouping pattern. The default is\n * 3 for thousands.\n */\n grouping: PropTypes.arrayOf(PropTypes.number),\n /**\n * A list of ten strings used as replacements for numbers 0-9\n */\n numerals: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '%'). The string used for the percentage symbol\n */\n percent: PropTypes.string,\n /**\n * (default: True). Separates integers with 4-digits or less\n */\n separate_4digits: PropTypes.bool\n }),\n /**\n * A value that will be used in place of the nully value during formatting.\n * If the value type matches the column type, it will be formatted normally.\n */\n nully: PropTypes.any,\n /**\n * A number representing the SI unit to use during formatting.\n * See `dash_table.Format.Prefix` enumeration for the list of valid values\n */\n prefix: PropTypes.number,\n /**\n * (default: ''). Represents the d3 rules to apply when formatting the number.\n */\n specifier: PropTypes.string\n }),\n /**\n * The `on_change` behavior of the column for user-initiated modifications.\n */\n on_change: PropTypes.exact({\n /**\n * (default 'coerce'): 'none': do not validate data;\n * 'coerce': check if the data corresponds to the destination type and\n * attempts to coerce it into the destination type if not;\n * 'validate': check if the data corresponds to the destination type (no coercion).\n */\n action: PropTypes.oneOf(['coerce', 'none', 'validate']),\n /**\n * (default 'reject'): What to do with the value if the action fails.\n * 'accept': use the invalid value;\n * 'default': replace the provided value with `validation.default`;\n * 'reject': do not modify the existing value.\n */\n failure: PropTypes.oneOf(['accept', 'default', 'reject'])\n }),\n /**\n * An array of string, number and boolean values that are treated as `null`\n * (i.e. ignored and always displayed last) when sorting.\n * This value overrides the table-level `sort_as_null`.\n */\n sort_as_null: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool\n ])\n ),\n /**\n * The `validation` options for user input processing that can accept, reject or apply a\n * default value.\n */\n validation: PropTypes.exact({\n /**\n * Allow the use of nully values. (undefined, null, NaN) (default: False)\n */\n allow_null: PropTypes.bool,\n /**\n * The default value to apply with on_change.failure = 'default'. (default: None)\n */\n default: PropTypes.any,\n /**\n * This is for `datetime` columns only. Allow 2-digit years (default: False).\n * If True, we interpret years as ranging from now-70 to now+29 - in 2019\n * this is 1949 to 2048 but in 2020 it will be different. If used with\n * `action: 'coerce'`, will convert user input to a 4-digit year.\n */\n allow_YY: PropTypes.bool\n })\n })\n ),\n /**\n * If True, then the data in all of the cells is editable.\n * When `editable` is True, particular columns can be made\n * uneditable by setting `editable` to `False` inside the `columns`\n * property.\n * If False, then the data in all of the cells is uneditable.\n * When `editable` is False, particular columns can be made\n * editable by setting `editable` to `True` inside the `columns`\n * property.\n */\n editable: PropTypes.bool,\n /**\n * `fixed_columns` will \"fix\" the set of columns so that\n * they remain visible when scrolling horizontally across\n * the unfixed columns. `fixed_columns` fixes columns\n * from left-to-right.\n * If `headers` is False, no columns are fixed.\n * If `headers` is True, all operation columns (see `row_deletable` and `row_selectable`)\n * are fixed. Additional data columns can be fixed by\n * assigning a number to `data`.\n *\n * Note that fixing columns introduces some changes to the\n * underlying markup of the table and may impact the\n * way that your columns are rendered or sized.\n * View the documentation examples to learn more.\n *\n */\n fixed_columns: PropTypes.oneOfType([\n PropTypes.exact({\n /**\n * Example `{'headers':False, 'data':0}` No columns are fixed (the default)\n */\n data: PropTypes.oneOf([0]),\n headers: PropTypes.oneOf([false])\n }),\n PropTypes.exact({\n /**\n * Example `{'headers':True, 'data':1}` one column is fixed.\n */\n data: PropTypes.number,\n headers: PropTypes.oneOf([true]).isRequired\n })\n ]),\n /**\n * `fixed_rows` will \"fix\" the set of rows so that\n * they remain visible when scrolling vertically down\n * the table. `fixed_rows` fixes rows\n * from top-to-bottom, starting from the headers.\n * If `headers` is False, no rows are fixed.\n * If `headers` is True, all header and filter rows (see `filter_action`) are\n * fixed. Additional data rows can be fixed by assigning\n * a number to `data`. Note that fixing rows introduces some changes to the\n * underlying markup of the table and may impact the\n * way that your columns are rendered or sized.\n * View the documentation examples to learn more.\n */\n fixed_rows: PropTypes.oneOfType([\n PropTypes.exact({\n /**\n * Example `{'headers':False, 'data':0}` No rows are fixed (the default)\n */\n data: PropTypes.oneOf([0]),\n headers: PropTypes.oneOf([false])\n }),\n PropTypes.exact({\n /**\n * Example `{'headers':True, 'data':1}` one row is fixed.\n */\n data: PropTypes.number,\n headers: PropTypes.oneOf([true]).isRequired\n })\n ]),\n /**\n * If `single`, then the user can select a single column or group\n * of merged columns via the radio button that will appear in the\n * header rows.\n * If `multi`, then the user can select multiple columns or groups\n * of merged columns via the checkbox that will appear in the header\n * rows.\n * If false, then the user will not be able to select columns and no\n * input will appear in the header rows.\n * When a column is selected, its id will be contained in `selected_columns`\n * and `derived_viewport_selected_columns`.\n */\n column_selectable: PropTypes.oneOf(['single', 'multi', false]),\n /**\n * If True (default), then it is possible to click and navigate\n * table cells.\n */\n cell_selectable: PropTypes.bool,\n /**\n * If `single`, then the user can select a single row\n * via a radio button that will appear next to each row.\n * If `multi`, then the user can select multiple rows\n * via a checkbox that will appear next to each row.\n * If false, then the user will not be able to select rows\n * and no additional UI elements will appear.\n * When a row is selected, its index will be contained\n * in `selected_rows`.\n */\n row_selectable: PropTypes.oneOf(['single', 'multi', false]),\n /**\n * If True, then a `x` will appear next to each `row`\n * and the user can delete the row.\n */\n row_deletable: PropTypes.bool,\n /**\n * The row and column indices and IDs of the currently active cell.\n * `row_id` is only returned if the data rows have an `id` key.\n */\n active_cell: PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n }),\n /**\n * `selected_cells` represents the set of cells that are selected,\n * as an array of objects, each item similar to `active_cell`.\n * Multiple cells can be selected by holding down shift and\n * clicking on a different cell or holding down shift and navigating\n * with the arrow keys.\n */\n selected_cells: PropTypes.arrayOf(\n PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n })\n ),\n /**\n * `selected_rows` contains the indices of rows that\n * are selected via the UI elements that appear when\n * `row_selectable` is `'single'` or `'multi'`.\n */\n selected_rows: PropTypes.arrayOf(PropTypes.number),\n /**\n * `selected_columns` contains the ids of columns that\n * are selected via the UI elements that appear when\n * `column_selectable` is `'single' or 'multi'`.\n */\n selected_columns: PropTypes.arrayOf(PropTypes.string),\n /**\n * `selected_row_ids` contains the ids of rows that\n * are selected via the UI elements that appear when\n * `row_selectable` is `'single'` or `'multi'`.\n */\n selected_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * When selecting multiple cells\n * (via clicking on a cell and then shift-clicking on another cell),\n * `start_cell` represents the [row, column] coordinates of the cell\n * in one of the corners of the region.\n * `end_cell` represents the coordinates of the other corner.\n */\n start_cell: PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n }),\n /**\n * When selecting multiple cells\n * (via clicking on a cell and then shift-clicking on another cell),\n * `end_cell` represents the row / column coordinates and IDs of the cell\n * in one of the corners of the region.\n * `start_cell` represents the coordinates of the other corner.\n */\n end_cell: PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n }),\n /**\n * The previous state of `data`. `data_previous`\n * has the same structure as `data` and it will be updated\n * whenever `data` changes, either through a callback or\n * by editing the table.\n * This is a read-only property: setting this property will not\n * have any impact on the table.\n */\n data_previous: PropTypes.arrayOf(PropTypes.object),\n /**\n * List of columns ids of the columns that are currently hidden.\n * See the associated nested prop `columns.hideable`.\n */\n hidden_columns: PropTypes.arrayOf(PropTypes.string),\n /**\n * If True, then the `active_cell` is in a focused state.\n */\n is_focused: PropTypes.bool,\n /**\n * If True, then column headers that have neighbors with duplicate names\n * will be merged into a single cell.\n * This will be applied for single column headers and multi-column\n * headers.\n */\n merge_duplicate_headers: PropTypes.bool,\n /**\n * The unix timestamp when the data was last edited.\n * Use this property with other timestamp properties\n * (such as `n_clicks_timestamp` in `dash_html_components`)\n * to determine which property has changed within a callback.\n */\n data_timestamp: PropTypes.number,\n /**\n * If true, headers are included when copying from the table to different\n * tabs and elsewhere. Note that headers are ignored when copying from the table onto itself and\n * between two tables within the same tab.\n */\n include_headers_on_copy_paste: PropTypes.bool,\n /**\n * Denotes the columns that will be used in the export data file.\n * If `all`, all columns will be used (visible + hidden). If `visible`,\n * only the visible columns will be used. Defaults to `visible`.\n */\n export_columns: PropTypes.oneOf(['all', 'visible']),\n /**\n * Denotes the type of the export data file,\n * Defaults to `'none'`\n */\n export_format: PropTypes.oneOf(['csv', 'xlsx', 'none']),\n /**\n * Denotes the format of the headers in the export data file.\n * If `'none'`, there will be no header. If `'display'`, then the header\n * of the data file will be be how it is currently displayed. Note that\n * `'display'` is only supported for `'xlsx'` export_format and will behave\n * like `'names'` for `'csv'` export format. If `'ids'` or `'names'`,\n * then the headers of data file will be the column id or the column\n * names, respectively\n */\n export_headers: PropTypes.oneOf(['none', 'ids', 'names', 'display']),\n /**\n * `page_action` refers to a mode of the table where\n * not all of the rows are displayed at once: only a subset\n * are displayed (a \"page\") and the next subset of rows\n * can viewed by clicking \"Next\" or \"Previous\" buttons\n * at the bottom of the page.\n * Pagination is used to improve performance: instead of\n * rendering all of the rows at once (which can be expensive),\n * we only display a subset of them.\n * With pagination, we can either page through data that exists\n * in the table (e.g. page through `10,000` rows in `data` `100` rows at a time)\n * or we can update the data on-the-fly with callbacks\n * when the user clicks on the \"Previous\" or \"Next\" buttons.\n * These modes can be toggled with this `page_action` parameter:\n * `'native'`: all data is passed to the table up-front, paging logic is\n * handled by the table;\n * `'custom'`: data is passed to the table one page at a time, paging logic\n * is handled via callbacks;\n * `'none'`: disables paging, render all of the data at once.\n */\n page_action: PropTypes.oneOf(['custom', 'native', 'none']),\n /**\n * `page_current` represents which page the user is on.\n * Use this property to index through data in your callbacks with\n * backend paging.\n */\n page_current: PropTypes.number,\n /**\n * `page_count` represents the number of the pages in the\n * paginated table. This is really only useful when performing\n * backend pagination, since the front end is able to use the\n * full size of the table to calculate the number of pages.\n */\n page_count: PropTypes.number,\n /**\n * `page_size` represents the number of rows that will be\n * displayed on a particular page when `page_action` is `'custom'` or `'native'`\n */\n page_size: PropTypes.number,\n /**\n * If `filter_action` is enabled, then the current filtering\n * string is represented in this `filter_query`\n * property.\n */\n filter_query: PropTypes.string,\n /**\n * The `filter_action` property controls the behavior of the `filtering` UI.\n * If `'none'`, then the filtering UI is not displayed.\n * If `'native'`, then the filtering UI is displayed and the filtering\n * logic is handled by the table. That is, it is performed on the data\n * that exists in the `data` property.\n * If `'custom'`, then the filtering UI is displayed but it is the\n * responsibility of the developer to program the filtering\n * through a callback (where `filter_query` or `derived_filter_query_structure` would be the input\n * and `data` would be the output).\n */\n filter_action: PropTypes.oneOfType([\n PropTypes.oneOf(['custom', 'native', 'none']),\n PropTypes.shape({\n type: PropTypes.oneOf(['custom', 'native']).isRequired,\n operator: PropTypes.oneOf(['and', 'or'])\n })\n ]),\n /**\n * There are two `filter_options` props in the table.\n * This is the table-level filter_options prop and there is\n * also the column-level `filter_options` prop.\n * If the column-level `filter_options` prop is set it overrides\n * the table-level `filter_options` prop for that column.\n */\n filter_options: PropTypes.shape({\n /**\n * (default: 'sensitive') Determine whether the applicable filter relational operators will default to `sensitive` or `insensitive` comparison.\n */\n case: PropTypes.oneOf(['sensitive', 'insensitive']),\n /**\n * (default: 'filter data...') The filter cell placeholder text.\n */\n placeholder_text: PropTypes.string\n }),\n /**\n * The `sort_action` property enables data to be\n * sorted on a per-column basis.\n * If `'none'`, then the sorting UI is not displayed.\n * If `'native'`, then the sorting UI is displayed and the sorting\n * logic is handled by the table. That is, it is performed on the data\n * that exists in the `data` property.\n * If `'custom'`, the the sorting UI is displayed but it is the\n * responsibility of the developer to program the sorting\n * through a callback (where `sort_by` would be the input and `data`\n * would be the output).\n * Clicking on the sort arrows will update the\n * `sort_by` property.\n */\n sort_action: PropTypes.oneOf(['custom', 'native', 'none']),\n /**\n * Sorting can be performed across multiple columns\n * (e.g. sort by country, sort within each country,\n * sort by year) or by a single column.\n * NOTE - With multi-column sort, it's currently\n * not possible to determine the order in which\n * the columns were sorted through the UI.\n * See [https://github.com/plotly/dash-table/issues/170](https://github.com/plotly/dash-table/issues/170)\n */\n sort_mode: PropTypes.oneOf(['single', 'multi']),\n /**\n * `sort_by` describes the current state\n * of the sorting UI.\n * That is, if the user clicked on the sort arrow\n * of a column, then this property will be updated\n * with the column ID and the direction\n * (`asc` or `desc`) of the sort.\n * For multi-column sorting, this will be a list of\n * sorting parameters, in the order in which they were\n * clicked.\n */\n sort_by: PropTypes.arrayOf(\n PropTypes.exact({\n column_id: PropTypes.string.isRequired,\n direction: PropTypes.oneOf(['asc', 'desc']).isRequired\n })\n ),\n /**\n * An array of string, number and boolean values that are treated as `None`\n * (i.e. ignored and always displayed last) when sorting.\n * This value will be used by columns without `sort_as_null`.\n * Defaults to `[]`.\n */\n sort_as_null: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool\n ])\n ),\n /**\n * `dropdown` specifies dropdown options for different columns.\n * Each entry refers to the column ID.\n * The `clearable` property defines whether the value can be deleted.\n * The `options` property refers to the `options` of the dropdown.\n */\n dropdown: PropTypes.objectOf(\n PropTypes.exact({\n clearable: PropTypes.bool,\n options: PropTypes.arrayOf(\n PropTypes.exact({\n label: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.bool\n ]).isRequired\n })\n ).isRequired\n })\n ),\n /**\n * `dropdown_conditional` specifies dropdown options in various columns and cells.\n * This property allows you to specify different dropdowns\n * depending on certain conditions. For example, you may\n * render different \"city\" dropdowns in a row depending on the\n * current value in the \"state\" column.\n */\n dropdown_conditional: PropTypes.arrayOf(\n PropTypes.exact({\n clearable: PropTypes.bool,\n if: PropTypes.exact({\n column_id: PropTypes.string,\n filter_query: PropTypes.string\n }),\n options: PropTypes.arrayOf(\n PropTypes.exact({\n label: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.bool\n ]).isRequired\n })\n ).isRequired\n })\n ),\n /**\n * `dropdown_data` specifies dropdown options on a row-by-row, column-by-column basis.\n * Each item in the array corresponds to the corresponding dropdowns for the `data` item\n * at the same index. Each entry in the item refers to the Column ID.\n */\n dropdown_data: PropTypes.arrayOf(\n PropTypes.objectOf(\n PropTypes.exact({\n clearable: PropTypes.bool,\n options: PropTypes.arrayOf(\n PropTypes.exact({\n label: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.bool\n ]).isRequired\n })\n ).isRequired\n })\n )\n ),\n /**\n * `tooltip` is the column based tooltip configuration applied to all rows. The key is the column\n * id and the value is a tooltip configuration.\n * Example: {i: {'value': i, 'use_with: 'both'} for i in df.columns}\n */\n tooltip: PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n /**\n * Represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n */\n duration: PropTypes.number,\n /**\n * refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * Refers to whether the tooltip will be shown\n * only on data or headers. Can be `both`, `data`, `header`.\n * Defaults to `both`.\n */\n use_with: PropTypes.oneOf(['both', 'data', 'header']),\n /**\n * refers to the syntax-based content of\n * the tooltip. This value is required. Alternatively, the value of the\n * property can also be a plain string. The `text` syntax will be used in\n * that case.\n */\n value: PropTypes.string.isRequired\n })\n ])\n ),\n /**\n * `tooltip_conditional` represents the tooltip shown\n * for different columns and cells.\n * This property allows you to specify different tooltips\n * depending on certain conditions. For example, you may have\n * different tooltips in the same column based on the value\n * of a certain data property.\n * Priority is from first to last defined conditional tooltip\n * in the list. Higher priority (more specific) conditional\n * tooltips should be put at the beginning of the list.\n */\n tooltip_conditional: PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The `delay` represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * The `duration` represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n */\n duration: PropTypes.number,\n /**\n * The `if` refers to the condition that needs to be fulfilled\n * in order for the associated tooltip configuration to be\n * used. If multiple conditions are defined, all conditions\n * must be met for the tooltip to be used by a cell.\n */\n if: PropTypes.exact({\n /**\n * `column_id` refers to the column ID that must be matched.\n */\n column_id: PropTypes.string,\n /**\n * `filter_query` refers to the query that must evaluate to True.\n */\n filter_query: PropTypes.string,\n /**\n * `row_index` refers to the index of the row in the source `data`.\n */\n row_index: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.oneOf(['odd', 'even'])\n ])\n }).isRequired,\n /**\n * The `type` refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * The `value` refers to the syntax-based content of the tooltip. This value is required.\n */\n value: PropTypes.string.isRequired\n })\n ),\n /**\n * `tooltip_data` represents the tooltip shown\n * for different columns and cells.\n * A list of dicts for which each key is\n * a column id and the value is a tooltip configuration.\n */\n tooltip_data: PropTypes.arrayOf(\n PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n /**\n * The `delay` represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * The `duration` represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n * Alternatively, the value of the property can also be\n * a plain string. The `text` syntax will be used in\n * that case.\n */\n duration: PropTypes.number,\n /**\n * For each tooltip configuration,\n * The `type` refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * The `value` refers to the syntax-based content of the tooltip. This value is required.\n */\n value: PropTypes.string.isRequired\n })\n ])\n )\n ),\n /**\n * `tooltip_header` represents the tooltip shown\n * for each header column and optionally each header row.\n * Example to show long column names in a tooltip: {i: i for i in df.columns}.\n * Example to show different column names in a tooltip: {'Rep': 'Republican', 'Dem': 'Democrat'}.\n * If the table has multiple rows of headers, then use a list as the value of the\n * `tooltip_header` items.\n *\n *\n */\n tooltip_header: PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n /**\n * The `delay` represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * The `duration` represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n * Alternatively, the value of the property can also be\n * a plain string. The `text` syntax will be used in\n * that case.\n */\n duration: PropTypes.number,\n /**\n * For each tooltip configuration,\n * The `type` refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * The `value` refers to the syntax-based content of the tooltip. This value is required.\n */\n value: PropTypes.string.isRequired\n }),\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.string,\n PropTypes.exact({\n delay: PropTypes.number,\n duration: PropTypes.number,\n type: PropTypes.oneOf(['text', 'markdown']),\n value: PropTypes.string.isRequired\n })\n ])\n )\n ])\n ),\n /**\n * `tooltip_delay` represents the table-wide delay in milliseconds before\n * the tooltip is shown when hovering a cell. If set to `None`, the tooltip\n * will be shown immediately.\n * Defaults to 350.\n */\n tooltip_delay: PropTypes.number,\n /**\n * `tooltip_duration` represents the table-wide duration in milliseconds\n * during which the tooltip will be displayed when hovering a cell. If\n * set to `None`, the tooltip will not disappear.\n * Defaults to 2000.\n */\n tooltip_duration: PropTypes.number,\n /**\n * The localization specific formatting information applied to all columns in the table.\n * This prop is derived from the [d3.formatLocale](https://github.com/d3/d3-format#formatLocale) data structure specification.\n * When left unspecified, each individual nested prop will default to a pre-determined value.\n */\n locale_format: PropTypes.exact({\n /**\n * (default: ['$', '']). A list of two strings representing the\n * prefix and suffix symbols. Typically used for currency, and implemented using d3's\n * currency format, but you can use this for other symbols such as measurement units.\n */\n symbol: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '.'). The string used for the decimal separator.\n */\n decimal: PropTypes.string,\n /**\n * (default: ','). The string used for the groups separator.\n */\n group: PropTypes.string,\n /**\n * (default: [3]). A list of integers representing the grouping pattern.\n */\n grouping: PropTypes.arrayOf(PropTypes.number),\n /**\n * A list of ten strings used as replacements for numbers 0-9.\n */\n numerals: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '%'). The string used for the percentage symbol.\n */\n percent: PropTypes.string,\n /**\n * (default: True). Separate integers with 4-digits or less.\n */\n separate_4digits: PropTypes.bool\n }),\n /**\n * If True, then the table will be styled like a list view\n * and not have borders between the columns.\n */\n style_as_list_view: PropTypes.bool,\n /**\n * `fill_width` toggles between a set of CSS for two common behaviors:\n * True: The table container's width will grow to fill the available space;\n * False: The table container's width will equal the width of its content.\n */\n fill_width: PropTypes.bool,\n /**\n * The `markdown_options` property allows customization of the markdown cells behavior.\n */\n markdown_options: PropTypes.exact({\n /**\n * (default: '_blank'). The link's behavior (_blank opens the link in a\n * new tab, _parent opens the link in the parent frame, _self opens the link in the\n * current tab, and _top opens the link in the top frame) or a string\n */\n link_target: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.oneOf(['_blank', '_parent', '_self', '_top'])\n ]),\n /**\n * (default: False) If True, html may be used in markdown cells\n * Be careful enabling html if the content being rendered can come\n * from an untrusted user, as this may create an XSS vulnerability.\n */\n html: PropTypes.bool\n }),\n /**\n * The `css` property is a way to embed CSS selectors and rules\n * onto the page.\n * We recommend starting with the `style_*` properties\n * before using this `css` property.\n * Example:\n * [\n * {\"selector\": \".dash-spreadsheet\", \"rule\": 'font-family: \"monospace\"'}\n * ]\n */\n css: PropTypes.arrayOf(\n PropTypes.exact({\n selector: PropTypes.string.isRequired,\n rule: PropTypes.string.isRequired\n })\n ),\n /**\n * CSS styles to be applied to the outer `table` container.\n * This is commonly used for setting properties like the\n * width or the height of the table.\n */\n style_table: PropTypes.object,\n /**\n * CSS styles to be applied to each individual cell of the table.\n * This includes the header cells, the `data` cells, and the filter\n * cells.\n */\n style_cell: PropTypes.object,\n /**\n * CSS styles to be applied to each individual data cell.\n * That is, unlike `style_cell`, it excludes the header and filter cells.\n */\n style_data: PropTypes.object,\n /**\n * CSS styles to be applied to the filter cells.\n * Note that this may change in the future as we build out a\n * more complex filtering UI.\n */\n style_filter: PropTypes.object,\n /**\n * CSS styles to be applied to each individual header cell.\n * That is, unlike `style_cell`, it excludes the `data` and filter cells.\n */\n style_header: PropTypes.object,\n /**\n * Conditional CSS styles for the cells.\n * This can be used to apply styles to cells on a per-column basis.\n */\n style_cell_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ])\n })\n })\n ),\n /**\n * Conditional CSS styles for the data cells.\n * This can be used to apply styles to data cells on a per-column basis.\n */\n style_data_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ]),\n filter_query: PropTypes.string,\n state: PropTypes.oneOf(['active', 'selected']),\n row_index: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.oneOf(['odd', 'even']),\n PropTypes.arrayOf(PropTypes.number)\n ]),\n column_editable: PropTypes.bool\n })\n })\n ),\n /**\n * Conditional CSS styles for the filter cells.\n * This can be used to apply styles to filter cells on a per-column basis.\n */\n style_filter_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ]),\n column_editable: PropTypes.bool\n })\n })\n ),\n /**\n * Conditional CSS styles for the header cells.\n * This can be used to apply styles to header cells on a per-column basis.\n */\n style_header_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ]),\n header_index: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.arrayOf(PropTypes.number),\n PropTypes.oneOf(['odd', 'even'])\n ]),\n column_editable: PropTypes.bool\n })\n })\n ),\n /**\n * This property tells the table to use virtualization when rendering.\n * Assumptions are that:\n * the width of the columns is fixed;\n * the height of the rows is always the same; and\n * runtime styling changes will not affect width and height vs. first rendering\n */\n virtualization: PropTypes.bool,\n /**\n * This property represents the current structure of\n * `filter_query` as a tree structure. Each node of the\n * query structure has:\n * type (string; required):\n * 'open-block',\n * 'logical-operator',\n * 'relational-operator',\n * 'unary-operator', or\n * 'expression';\n * subType (string; optional):\n * 'open-block': '()',\n * 'logical-operator': '&&', '||',\n * 'relational-operator': '=', '>=', '>', '<=', '<', '!=', 'contains',\n * 'unary-operator': '!', 'is bool', 'is even', 'is nil', 'is num', 'is object', 'is odd', 'is prime', 'is str',\n * 'expression': 'value', 'field';\n * value (any):\n * 'expression, value': passed value,\n * 'expression, field': the field/prop name.\n * block (nested query structure; optional).\n * left (nested query structure; optional).\n * right (nested query structure; optional).\n * If the query is invalid or empty, the `derived_filter_query_structure` will\n * be `None`.\n */\n derived_filter_query_structure: PropTypes.object,\n /**\n * This property represents the current state of `data`\n * on the current page. This property will be updated\n * on paging, sorting, and filtering.\n */\n derived_viewport_data: PropTypes.arrayOf(PropTypes.object),\n /**\n * `derived_viewport_indices` indicates the order in which the original\n * rows appear after being filtered, sorted, and/or paged.\n * `derived_viewport_indices` contains indices for the current page,\n * while `derived_virtual_indices` contains indices across all pages.\n */\n derived_viewport_indices: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_viewport_row_ids` lists row IDs in the order they appear\n * after being filtered, sorted, and/or paged.\n * `derived_viewport_row_ids` contains IDs for the current page,\n * while `derived_virtual_row_ids` contains IDs across all pages.\n */\n derived_viewport_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * `derived_viewport_selected_columns` contains the ids of the\n * `selected_columns` that are not currently hidden.\n */\n derived_viewport_selected_columns: PropTypes.arrayOf(PropTypes.string),\n /**\n * `derived_viewport_selected_rows` represents the indices of the\n * `selected_rows` from the perspective of the `derived_viewport_indices`.\n */\n derived_viewport_selected_rows: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_viewport_selected_row_ids` represents the IDs of the\n * `selected_rows` on the currently visible page.\n */\n derived_viewport_selected_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * This property represents the visible state of `data`\n * across all pages after the front-end sorting and filtering\n * as been applied.\n */\n derived_virtual_data: PropTypes.arrayOf(PropTypes.object),\n /**\n * `derived_virtual_indices` indicates the order in which the original\n * rows appear after being filtered and sorted.\n * `derived_viewport_indices` contains indices for the current page,\n * while `derived_virtual_indices` contains indices across all pages.\n */\n derived_virtual_indices: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_virtual_row_ids` indicates the row IDs in the order in which\n * they appear after being filtered and sorted.\n * `derived_viewport_row_ids` contains IDs for the current page,\n * while `derived_virtual_row_ids` contains IDs across all pages.\n */\n derived_virtual_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * `derived_virtual_selected_rows` represents the indices of the\n * `selected_rows` from the perspective of the `derived_virtual_indices`.\n */\n derived_virtual_selected_rows: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_virtual_selected_row_ids` represents the IDs of the\n * `selected_rows` as they appear after filtering and sorting,\n * across all pages.\n */\n derived_virtual_selected_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * The ID of the table.\n */\n id: PropTypes.string,\n /**\n * Dash-assigned callback that gets fired when the user makes changes.\n */\n setProps: PropTypes.func,\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string\n }),\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, any `persisted_props` that the\n * user has changed while using the app will keep those changes, as long as\n * the new prop value also matches what was given originally.\n * Used in conjunction with `persistence_type` and `persisted_props`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number\n ]),\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page.\n */\n persisted_props: PropTypes.arrayOf(\n PropTypes.oneOf([\n 'columns.name',\n 'data',\n 'filter_query',\n 'hidden_columns',\n 'page_current',\n 'selected_columns',\n 'selected_rows',\n 'sort_by'\n ])\n ),\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory'])\n};\nDataTable.persistenceTransforms = {\n columns: {\n name: {\n extract: propValue => R.pluck('name', propValue),\n apply: (storedValue, propValue) =>\n R.zipWith(R.assoc('name'), storedValue, propValue)\n }\n }\n};\nDataTable.defaultProps = defaultProps;\nDataTable.propTypes = propTypes;\n","/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */\n;(function(root, factory) {\n\t// https://github.com/umdjs/umd/blob/master/returnExports.js\n\tif (typeof exports == 'object') {\n\t\t// For Node.js.\n\t\tmodule.exports = factory(root);\n\t} else if (typeof define == 'function' && define.amd) {\n\t\t// For AMD. Register as an anonymous module.\n\t\tdefine([], factory.bind(root, root));\n\t} else {\n\t\t// For browser globals (not exposing the function separately).\n\t\tfactory(root);\n\t}\n}(typeof global != 'undefined' ? global : this, function(root) {\n\n\tif (root.CSS && root.CSS.escape) {\n\t\treturn root.CSS.escape;\n\t}\n\n\t// https://drafts.csswg.org/cssom/#serialize-an-identifier\n\tvar cssEscape = function(value) {\n\t\tif (arguments.length == 0) {\n\t\t\tthrow new TypeError('`CSS.escape` requires an argument.');\n\t\t}\n\t\tvar string = String(value);\n\t\tvar length = string.length;\n\t\tvar index = -1;\n\t\tvar codeUnit;\n\t\tvar result = '';\n\t\tvar firstCodeUnit = string.charCodeAt(0);\n\t\twhile (++index < length) {\n\t\t\tcodeUnit = string.charCodeAt(index);\n\t\t\t// Note: there’s no need to special-case astral symbols, surrogate\n\t\t\t// pairs, or lone surrogates.\n\n\t\t\t// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER\n\t\t\t// (U+FFFD).\n\t\t\tif (codeUnit == 0x0000) {\n\t\t\t\tresult += '\\uFFFD';\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// If the character is in the range [\\1-\\1F] (U+0001 to U+001F) or is\n\t\t\t\t// U+007F, […]\n\t\t\t\t(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||\n\t\t\t\t// If the character is the first character and is in the range [0-9]\n\t\t\t\t// (U+0030 to U+0039), […]\n\t\t\t\t(index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||\n\t\t\t\t// If the character is the second character and is in the range [0-9]\n\t\t\t\t// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]\n\t\t\t\t(\n\t\t\t\t\tindex == 1 &&\n\t\t\t\t\tcodeUnit >= 0x0030 && codeUnit <= 0x0039 &&\n\t\t\t\t\tfirstCodeUnit == 0x002D\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point\n\t\t\t\tresult += '\\\\' + codeUnit.toString(16) + ' ';\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// If the character is the first character and is a `-` (U+002D), and\n\t\t\t\t// there is no second character, […]\n\t\t\t\tindex == 0 &&\n\t\t\t\tlength == 1 &&\n\t\t\t\tcodeUnit == 0x002D\n\t\t\t) {\n\t\t\t\tresult += '\\\\' + string.charAt(index);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If the character is not handled by one of the above rules and is\n\t\t\t// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or\n\t\t\t// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to\n\t\t\t// U+005A), or [a-z] (U+0061 to U+007A), […]\n\t\t\tif (\n\t\t\t\tcodeUnit >= 0x0080 ||\n\t\t\t\tcodeUnit == 0x002D ||\n\t\t\t\tcodeUnit == 0x005F ||\n\t\t\t\tcodeUnit >= 0x0030 && codeUnit <= 0x0039 ||\n\t\t\t\tcodeUnit >= 0x0041 && codeUnit <= 0x005A ||\n\t\t\t\tcodeUnit >= 0x0061 && codeUnit <= 0x007A\n\t\t\t) {\n\t\t\t\t// the character itself\n\t\t\t\tresult += string.charAt(index);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Otherwise, the escaped character.\n\t\t\t// https://drafts.csswg.org/cssom/#escape-a-character\n\t\t\tresult += '\\\\' + string.charAt(index);\n\n\t\t}\n\t\treturn result;\n\t};\n\n\tif (!root.CSS) {\n\t\troot.CSS = {};\n\t}\n\n\troot.CSS.escape = cssEscape;\n\treturn cssEscape;\n\n}));\n","module.exports = window[\"PropTypes\"];","module.exports = window[\"React\"];","module.exports = window[\"ReactDOM\"];","/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nexport default function _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n idx = 0;\n\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n\n idx = 0;\n\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n\n return result;\n}","export default function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}","import _arity from \"./_arity.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n\n combined[combinedIdx] = result;\n\n if (!_isPlaceholder(result)) {\n left -= 1;\n }\n\n combinedIdx += 1;\n }\n\n return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));\n };\n}","import _arity from \"./internal/_arity.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _curryN from \"./internal/_curryN.js\";\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * const sumArgs = (...args) => R.sum(args);\n *\n * const curriedAddFourNumbers = R.curryN(4, sumArgs);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n */\n\nvar curryN =\n/*#__PURE__*/\n_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n\n return _arity(length, _curryN(length, [], fn));\n});\n\nexport default curryN;","import _concat from \"./internal/_concat.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n/**\n * Creates a new list iteration function from an existing one by adding two new\n * parameters to its callback function: the current index, and the entire list.\n *\n * This would turn, for instance, [`R.map`](#map) function into one that\n * more closely resembles `Array.prototype.map`. Note that this will only work\n * for functions in which the iteration callback function is the first\n * parameter, and where the list is the last parameter. (This latter might be\n * unimportant if the list parameter is not used.)\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Function\n * @category List\n * @sig (((a ...) -> b) ... -> [a] -> *) -> (((a ..., Int, [a]) -> b) ... -> [a] -> *)\n * @param {Function} fn A list iteration function that does not pass index or list to its callback\n * @return {Function} An altered list iteration function that passes (item, index, list) to its callback\n * @example\n *\n * const mapIndexed = R.addIndex(R.map);\n * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']);\n * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r']\n */\n\nvar addIndex =\n/*#__PURE__*/\n_curry1(function addIndex(fn) {\n return curryN(fn.length, function () {\n var idx = 0;\n var origFn = arguments[0];\n var list = arguments[arguments.length - 1];\n var args = Array.prototype.slice.call(arguments, 0);\n\n args[0] = function () {\n var result = origFn.apply(this, _concat(arguments, [idx, list]));\n idx += 1;\n return result;\n };\n\n return fn.apply(this, args);\n });\n});\n\nexport default addIndex;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","export default function _isTransformer(obj) {\n return obj != null && typeof obj['@@transducer/step'] === 'function';\n}","import _isArray from \"./_isArray.js\";\nimport _isTransformer from \"./_isTransformer.js\";\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer created by [transducerCreator] to return a new transformer\n * (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} transducerCreator transducer factory if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\n\nexport default function _dispatchable(methodNames, transducerCreator, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n\n var obj = arguments[arguments.length - 1];\n\n if (!_isArray(obj)) {\n var idx = 0;\n\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1));\n }\n\n idx += 1;\n }\n\n if (_isTransformer(obj)) {\n var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1));\n return transducer(obj);\n }\n }\n\n return fn.apply(this, arguments);\n };\n}","export default function _reduced(x) {\n return x && x['@@transducer/reduced'] ? x : {\n '@@transducer/value': x,\n '@@transducer/reduced': true\n };\n}","export default {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XAll =\n/*#__PURE__*/\nfunction () {\n function XAll(f, xf) {\n this.xf = xf;\n this.f = f;\n this.all = true;\n }\n\n XAll.prototype['@@transducer/init'] = _xfBase.init;\n\n XAll.prototype['@@transducer/result'] = function (result) {\n if (this.all) {\n result = this.xf['@@transducer/step'](result, true);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XAll.prototype['@@transducer/step'] = function (result, input) {\n if (!this.f(input)) {\n this.all = false;\n result = _reduced(this.xf['@@transducer/step'](result, false));\n }\n\n return result;\n };\n\n return XAll;\n}();\n\nvar _xall =\n/*#__PURE__*/\n_curry2(function _xall(f, xf) {\n return new XAll(f, xf);\n});\n\nexport default _xall;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xall from \"./internal/_xall.js\";\n/**\n * Returns `true` if all elements of the list match the predicate, `false` if\n * there are any that don't.\n *\n * Dispatches to the `all` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by every element, `false`\n * otherwise.\n * @see R.any, R.none, R.transduce\n * @example\n *\n * const equals3 = R.equals(3);\n * R.all(equals3)([3, 3, 3, 3]); //=> true\n * R.all(equals3)([3, 3, 1, 3]); //=> false\n */\n\nvar all =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['all'], _xall, function all(fn, list) {\n var idx = 0;\n\n while (idx < list.length) {\n if (!fn(list[idx])) {\n return false;\n }\n\n idx += 1;\n }\n\n return true;\n}));\n\nexport default all;","export default function _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n\n return result;\n}","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _curry1 from \"./_curry1.js\";\nimport _isArray from \"./_isArray.js\";\nimport _isString from \"./_isString.js\";\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n * _isArrayLike({nodeType: 1, length: 1}) // => false\n */\n\nvar _isArrayLike =\n/*#__PURE__*/\n_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n\n if (!x) {\n return false;\n }\n\n if (typeof x !== 'object') {\n return false;\n }\n\n if (_isString(x)) {\n return false;\n }\n\n if (x.length === 0) {\n return true;\n }\n\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n\n return false;\n});\n\nexport default _isArrayLike;","var XWrap =\n/*#__PURE__*/\nfunction () {\n function XWrap(fn) {\n this.f = fn;\n }\n\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nexport default function _xwrap(fn) {\n return new XWrap(fn);\n}","import _arity from \"./internal/_arity.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\nvar bind =\n/*#__PURE__*/\n_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\n\nexport default bind;","import _isArrayLike from \"./_isArrayLike.js\";\nimport _xwrap from \"./_xwrap.js\";\nimport bind from \"../bind.js\";\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n idx += 1;\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n step = iter.next();\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nexport default function _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XMap =\n/*#__PURE__*/\nfunction () {\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n\n return XMap;\n}();\n\nvar _xmap =\n/*#__PURE__*/\n_curry2(function _xmap(f, xf) {\n return new XMap(f, xf);\n});\n\nexport default _xmap;","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _has from \"./_has.js\";\nvar toString = Object.prototype.toString;\n\nvar _isArguments =\n/*#__PURE__*/\nfunction () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\nimport _isArguments from \"./internal/_isArguments.js\"; // cover IE < 9 keys issues\n\nvar hasEnumBug = !\n/*#__PURE__*/\n{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug\n\nvar hasArgsEnumBug =\n/*#__PURE__*/\nfunction () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n};\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values, R.toPairs\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\n\n\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?\n/*#__PURE__*/\n_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) :\n/*#__PURE__*/\n_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n\n var prop, nIdx;\n var ks = [];\n\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n\n nIdx -= 1;\n }\n }\n\n return ks;\n});\nexport default keys;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _map from \"./internal/_map.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _xmap from \"./internal/_xmap.js\";\nimport curryN from \"./curryN.js\";\nimport keys from \"./keys.js\";\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex, R.pluck, R.project\n * @example\n *\n * const double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\n\nvar map =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n\n case '[object Object]':\n return _reduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys(functor));\n\n default:\n return _map(fn, functor);\n }\n}));\n\nexport default map;","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _curry2 from \"./internal/_curry2.js\";\nimport _isString from \"./internal/_isString.js\";\n/**\n * Returns the nth element of the given list or string. If n is negative the\n * element at index length + n is returned.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> a | Undefined\n * @sig Number -> String -> String\n * @param {Number} offset\n * @param {*} list\n * @return {*}\n * @example\n *\n * const list = ['foo', 'bar', 'baz', 'quux'];\n * R.nth(1, list); //=> 'bar'\n * R.nth(-1, list); //=> 'quux'\n * R.nth(-99, list); //=> undefined\n *\n * R.nth(2, 'abc'); //=> 'c'\n * R.nth(3, 'abc'); //=> ''\n * @symb R.nth(-1, [a, b, c]) = c\n * @symb R.nth(0, [a, b, c]) = a\n * @symb R.nth(1, [a, b, c]) = b\n */\n\nvar nth =\n/*#__PURE__*/\n_curry2(function nth(offset, list) {\n var idx = offset < 0 ? list.length + offset : offset;\n return _isString(list) ? list.charAt(idx) : list[idx];\n});\n\nexport default nth;","import _curry2 from \"./internal/_curry2.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport nth from \"./nth.js\";\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig Idx -> {s: a} -> a | Undefined\n * @param {String|Number} p The property name or array index\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path, R.props, R.pluck, R.project, R.nth\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n * R.prop(0, [100]); //=> 100\n * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\nvar prop =\n/*#__PURE__*/\n_curry2(function prop(p, obj) {\n if (obj == null) {\n return;\n }\n\n return _isInteger(p) ? nth(p, obj) : obj[p];\n});\n\nexport default prop;","import _curry2 from \"./internal/_curry2.js\";\nimport map from \"./map.js\";\nimport prop from \"./prop.js\";\n/**\n * Returns a new list by plucking the same named property off all objects in\n * the list supplied.\n *\n * `pluck` will work on\n * any [functor](https://github.com/fantasyland/fantasy-land#functor) in\n * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => k -> f {k: v} -> f v\n * @param {Number|String} key The key name to pluck off of each object.\n * @param {Array} f The array or functor to consider.\n * @return {Array} The list of values for the given key.\n * @see R.project, R.prop, R.props\n * @example\n *\n * var getAges = R.pluck('age');\n * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]\n *\n * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3]\n * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}\n * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]\n * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]\n */\n\nvar pluck =\n/*#__PURE__*/\n_curry2(function pluck(p, list) {\n return map(prop(p), list);\n});\n\nexport default pluck;","import _curry3 from \"./internal/_curry3.js\";\nimport _reduce from \"./internal/_reduce.js\";\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\nvar reduce =\n/*#__PURE__*/\n_curry3(_reduce);\n\nexport default reduce;","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XAny =\n/*#__PURE__*/\nfunction () {\n function XAny(f, xf) {\n this.xf = xf;\n this.f = f;\n this.any = false;\n }\n\n XAny.prototype['@@transducer/init'] = _xfBase.init;\n\n XAny.prototype['@@transducer/result'] = function (result) {\n if (!this.any) {\n result = this.xf['@@transducer/step'](result, false);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XAny.prototype['@@transducer/step'] = function (result, input) {\n if (this.f(input)) {\n this.any = true;\n result = _reduced(this.xf['@@transducer/step'](result, true));\n }\n\n return result;\n };\n\n return XAny;\n}();\n\nvar _xany =\n/*#__PURE__*/\n_curry2(function _xany(f, xf) {\n return new XAny(f, xf);\n});\n\nexport default _xany;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xany from \"./internal/_xany.js\";\n/**\n * Returns `true` if at least one of the elements of the list match the predicate,\n * `false` otherwise.\n *\n * Dispatches to the `any` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false`\n * otherwise.\n * @see R.all, R.none, R.transduce\n * @example\n *\n * const lessThan0 = R.flip(R.lt)(0);\n * const lessThan2 = R.flip(R.lt)(2);\n * R.any(lessThan0)([1, 2]); //=> false\n * R.any(lessThan2)([1, 2]); //=> true\n */\n\nvar any =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['any'], _xany, function any(fn, list) {\n var idx = 0;\n\n while (idx < list.length) {\n if (fn(list[idx])) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n}));\n\nexport default any;","import _concat from \"./internal/_concat.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a new list containing the contents of the given list, followed by\n * the given element.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} el The element to add to the end of the new list.\n * @param {Array} list The list of elements to add a new item to.\n * list.\n * @return {Array} A new list containing the elements of the old list followed by `el`.\n * @see R.prepend\n * @example\n *\n * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']\n * R.append('tests', []); //=> ['tests']\n * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]\n */\n\nvar append =\n/*#__PURE__*/\n_curry2(function append(el, list) {\n return _concat(list, [el]);\n});\n\nexport default append;","import _curry1 from \"./internal/_curry1.js\";\nimport keys from \"./keys.js\";\n/**\n * Returns a list of all the enumerable own properties of the supplied object.\n * Note that the order of the output array is not guaranteed across different\n * JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [v]\n * @param {Object} obj The object to extract values from\n * @return {Array} An array of the values of the object's own properties.\n * @see R.valuesIn, R.keys, R.toPairs\n * @example\n *\n * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]\n */\n\nvar values =\n/*#__PURE__*/\n_curry1(function values(obj) {\n var props = keys(obj);\n var len = props.length;\n var vals = [];\n var idx = 0;\n\n while (idx < len) {\n vals[idx] = obj[props[idx]];\n idx += 1;\n }\n\n return vals;\n});\n\nexport default values;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\n\nvar isNil =\n/*#__PURE__*/\n_curry1(function isNil(x) {\n return x == null;\n});\n\nexport default isNil;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport isNil from \"./isNil.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the nodes required\n * to create the given path, and placing the specific value at the tail end of\n * that path. Note that this copies and flattens prototype properties onto the\n * new object as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> a -> {a} -> {a}\n * @param {Array} path the path to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except along the specified path.\n * @see R.dissocPath\n * @example\n *\n * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}\n *\n * // Any missing or non-object keys in path will be overridden\n * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}\n */\n\nvar assocPath =\n/*#__PURE__*/\n_curry3(function assocPath(path, val, obj) {\n if (path.length === 0) {\n return val;\n }\n\n var idx = path[0];\n\n if (path.length > 1) {\n var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {};\n val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);\n }\n\n return _assoc(idx, val, obj);\n});\n\nexport default assocPath;","import _isArray from \"./_isArray.js\";\nimport _isInteger from \"./_isInteger.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @private\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object|Array} obj The object to clone\n * @return {Object|Array} A new object equivalent to the original except for the changed property.\n */\n\nexport default function _assoc(prop, val, obj) {\n if (_isInteger(prop) && _isArray(obj)) {\n var arr = [].concat(obj);\n arr[prop] = val;\n return arr;\n }\n\n var result = {};\n\n for (var p in obj) {\n result[p] = obj[p];\n }\n\n result[prop] = val;\n return result;\n}","import _curry3 from \"./internal/_curry3.js\";\nimport assocPath from \"./assocPath.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig Idx -> a -> {k: v} -> {k: v}\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except for the changed property.\n * @see R.dissoc, R.pick\n * @example\n *\n * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}\n */\n\nvar assoc =\n/*#__PURE__*/\n_curry3(function assoc(prop, val, obj) {\n return assocPath([prop], val, obj);\n});\n\nexport default assoc;","import _curry2 from \"./_curry2.js\";\nimport _flatCat from \"./_flatCat.js\";\nimport map from \"../map.js\";\n\nvar _xchain =\n/*#__PURE__*/\n_curry2(function _xchain(f, xf) {\n return map(f, _flatCat(xf));\n});\n\nexport default _xchain;","import _forceReduced from \"./_forceReduced.js\";\nimport _isArrayLike from \"./_isArrayLike.js\";\nimport _reduce from \"./_reduce.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar preservingReduced = function (xf) {\n return {\n '@@transducer/init': _xfBase.init,\n '@@transducer/result': function (result) {\n return xf['@@transducer/result'](result);\n },\n '@@transducer/step': function (result, input) {\n var ret = xf['@@transducer/step'](result, input);\n return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret;\n }\n };\n};\n\nvar _flatCat = function _xcat(xf) {\n var rxf = preservingReduced(xf);\n return {\n '@@transducer/init': _xfBase.init,\n '@@transducer/result': function (result) {\n return rxf['@@transducer/result'](result);\n },\n '@@transducer/step': function (result, input) {\n return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input);\n }\n };\n};\n\nexport default _flatCat;","export default function _forceReduced(x) {\n return {\n '@@transducer/value': x,\n '@@transducer/reduced': true\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _makeFlat from \"./internal/_makeFlat.js\";\nimport _xchain from \"./internal/_xchain.js\";\nimport map from \"./map.js\";\n/**\n * `chain` maps a function over a list and concatenates the results. `chain`\n * is also known as `flatMap` in some libraries.\n *\n * Dispatches to the `chain` method of the second argument, if present,\n * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain).\n *\n * If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig Chain m => (a -> m b) -> m a -> m b\n * @param {Function} fn The function to map with\n * @param {Array} list The list to map over\n * @return {Array} The result of flat-mapping `list` with `fn`\n * @example\n *\n * const duplicate = n => [n, n];\n * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3]\n *\n * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1]\n */\n\nvar chain =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) {\n if (typeof monad === 'function') {\n return function (x) {\n return fn(monad(x))(x);\n };\n }\n\n return _makeFlat(false)(map(fn, monad));\n}));\n\nexport default chain;","import _isArrayLike from \"./_isArrayLike.js\";\n/**\n * `_makeFlat` is a helper function that returns a one-level or fully recursive\n * function based on the flag passed in.\n *\n * @private\n */\n\nexport default function _makeFlat(recursive) {\n return function flatt(list) {\n var value, jlen, j;\n var result = [];\n var idx = 0;\n var ilen = list.length;\n\n while (idx < ilen) {\n if (_isArrayLike(list[idx])) {\n value = recursive ? flatt(list[idx]) : list[idx];\n j = 0;\n jlen = value.length;\n\n while (j < jlen) {\n result[result.length] = value[j];\n j += 1;\n }\n } else {\n result[result.length] = list[idx];\n }\n\n idx += 1;\n }\n\n return result;\n };\n}","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\nvar type =\n/*#__PURE__*/\n_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\n\nexport default type;","import _cloneRegExp from \"./_cloneRegExp.js\";\nimport type from \"../type.js\";\n/**\n * Copies an object.\n *\n * @private\n * @param {*} value The value to be copied\n * @param {Array} refFrom Array containing the source references\n * @param {Array} refTo Array containing the copied source references\n * @param {Boolean} deep Whether or not to perform deep cloning.\n * @return {*} The copied value.\n */\n\nexport default function _clone(value, refFrom, refTo, deep) {\n var copy = function copy(copiedValue) {\n var len = refFrom.length;\n var idx = 0;\n\n while (idx < len) {\n if (value === refFrom[idx]) {\n return refTo[idx];\n }\n\n idx += 1;\n }\n\n refFrom[idx] = value;\n refTo[idx] = copiedValue;\n\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key];\n }\n }\n\n return copiedValue;\n };\n\n switch (type(value)) {\n case 'Object':\n return copy(Object.create(Object.getPrototypeOf(value)));\n\n case 'Array':\n return copy([]);\n\n case 'Date':\n return new Date(value.valueOf());\n\n case 'RegExp':\n return _cloneRegExp(value);\n\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'BigInt64Array':\n case 'BigUint64Array':\n return value.slice();\n\n default:\n return value;\n }\n}","export default function _cloneRegExp(pattern) {\n return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));\n}","import _clone from \"./internal/_clone.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n/**\n * Creates a deep copy of the source that can be used in place of the source\n * object without retaining any references to it.\n * The source object may contain (nested) `Array`s and `Object`s,\n * `Number`s, `String`s, `Boolean`s and `Date`s.\n * `Function`s are assigned by reference rather than copied.\n *\n * Dispatches to a `clone` method if present.\n *\n * Note that if the source object has multiple nodes that share a reference,\n * the returned object will have the same structure, but the references will\n * be pointed to the location within the cloned value.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {*} -> {*}\n * @param {*} value The object or array to clone\n * @return {*} A deeply cloned copy of `val`\n * @example\n *\n * const objects = [{}, {}, {}];\n * const objectsClone = R.clone(objects);\n * objects === objectsClone; //=> false\n * objects[0] === objectsClone[0]; //=> false\n */\n\nvar clone =\n/*#__PURE__*/\n_curry1(function clone(value) {\n return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true);\n});\n\nexport default clone;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Makes a comparator function out of a function that reports whether the first\n * element is less than the second.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b) -> Boolean) -> ((a, b) -> Number)\n * @param {Function} pred A predicate function of arity two which will return `true` if the first argument\n * is less than the second, `false` otherwise\n * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0`\n * @example\n *\n * const byAge = R.comparator((a, b) => a.age < b.age);\n * const people = [\n * { name: 'Emma', age: 70 },\n * { name: 'Peter', age: 78 },\n * { name: 'Mikhail', age: 62 },\n * ];\n * const peopleByIncreasingAge = R.sort(byAge, people);\n * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]\n */\n\nvar comparator =\n/*#__PURE__*/\n_curry1(function comparator(pred) {\n return function (a, b) {\n return pred(a, b) ? -1 : pred(b, a) ? 1 : 0;\n };\n});\n\nexport default comparator;","export default function _pipe(f, g) {\n return function () {\n return g.call(this, f.apply(this, arguments));\n };\n}","import _isArray from \"./_isArray.js\";\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implementation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\n\nexport default function _checkForMethod(methodname, fn) {\n return function () {\n var length = arguments.length;\n\n if (length === 0) {\n return fn();\n }\n\n var obj = arguments[length - 1];\n return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n };\n}","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry3 from \"./internal/_curry3.js\";\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']\n * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(0, 3, 'ramda'); //=> 'ram'\n */\n\nvar slice =\n/*#__PURE__*/\n_curry3(\n/*#__PURE__*/\n_checkForMethod('slice', function slice(fromIndex, toIndex, list) {\n return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\n\nexport default slice;","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport slice from \"./slice.js\";\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n * R.tail([1, 2, 3]); //=> [2, 3]\n * R.tail([1, 2]); //=> [2]\n * R.tail([1]); //=> []\n * R.tail([]); //=> []\n *\n * R.tail('abc'); //=> 'bc'\n * R.tail('ab'); //=> 'b'\n * R.tail('a'); //=> ''\n * R.tail(''); //=> ''\n */\n\nvar tail =\n/*#__PURE__*/\n_curry1(\n/*#__PURE__*/\n_checkForMethod('tail',\n/*#__PURE__*/\nslice(1, Infinity)));\n\nexport default tail;","import _arity from \"./internal/_arity.js\";\nimport _pipe from \"./internal/_pipe.js\";\nimport reduce from \"./reduce.js\";\nimport tail from \"./tail.js\";\n/**\n * Performs left-to-right function composition. The first argument may have\n * any arity; the remaining arguments must be unary.\n *\n * In some libraries this function is named `sequence`.\n *\n * **Note:** The result of pipe is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.compose\n * @example\n *\n * const f = R.pipe(Math.pow, R.negate, R.inc);\n *\n * f(3, 4); // -(3^4) + 1\n * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))\n * @symb R.pipe(f, g, h)(a)(b) = h(g(f(a)))(b)\n */\n\nexport default function pipe() {\n if (arguments.length === 0) {\n throw new Error('pipe requires at least one argument');\n }\n\n return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments)));\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _isString from \"./internal/_isString.js\";\n/**\n * Returns a new list or string with the elements or characters in reverse\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {Array|String} list\n * @return {Array|String}\n * @example\n *\n * R.reverse([1, 2, 3]); //=> [3, 2, 1]\n * R.reverse([1, 2]); //=> [2, 1]\n * R.reverse([1]); //=> [1]\n * R.reverse([]); //=> []\n *\n * R.reverse('abc'); //=> 'cba'\n * R.reverse('ab'); //=> 'ba'\n * R.reverse('a'); //=> 'a'\n * R.reverse(''); //=> ''\n */\n\nvar reverse =\n/*#__PURE__*/\n_curry1(function reverse(list) {\n return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse();\n});\n\nexport default reverse;","import pipe from \"./pipe.js\";\nimport reverse from \"./reverse.js\";\n/**\n * Performs right-to-left function composition. The last argument may have\n * any arity; the remaining arguments must be unary.\n *\n * **Note:** The result of compose is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)\n * @param {...Function} ...functions The functions to compose\n * @return {Function}\n * @see R.pipe\n * @example\n *\n * const classyGreeting = (firstName, lastName) => \"The name's \" + lastName + \", \" + firstName + \" \" + lastName\n * const yellGreeting = R.compose(R.toUpper, classyGreeting);\n * yellGreeting('James', 'Bond'); //=> \"THE NAME'S BOND, JAMES BOND\"\n *\n * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7\n *\n * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))\n * @symb R.compose(f, g, h)(a)(b) = f(g(h(a)))(b)\n */\n\nexport default function compose() {\n if (arguments.length === 0) {\n throw new Error('compose requires at least one argument');\n }\n\n return pipe.apply(this, reverse(arguments));\n}","export default function _isFunction(x) {\n var type = Object.prototype.toString.call(x);\n return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';\n}","export default function _arrayFromIterator(iter) {\n var list = [];\n var next;\n\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n\n return list;\n}","export default function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n}","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","import _arrayFromIterator from \"./_arrayFromIterator.js\";\nimport _includesWith from \"./_includesWith.js\";\nimport _functionName from \"./_functionName.js\";\nimport _has from \"./_has.js\";\nimport _objectIs from \"./_objectIs.js\";\nimport keys from \"../keys.js\";\nimport type from \"../type.js\";\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparison of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n } // if *a* array contains any element that is not included in *b*\n\n\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nexport default function _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n\n break;\n\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n\n break;\n\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n\n break;\n\n case 'Error':\n return a.name === b.name && a.message === b.message;\n\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n\n break;\n }\n\n var idx = stackA.length - 1;\n\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n idx = keysA.length - 1;\n\n while (idx >= 0) {\n var key = keysA[idx];\n\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n\n idx -= 1;\n }\n\n return true;\n}","export default function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _equals from \"./internal/_equals.js\";\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\nvar equals =\n/*#__PURE__*/\n_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\n\nexport default equals;","import equals from \"../equals.js\";\nexport default function _indexOf(list, a, idx) {\n var inf, item; // Array.prototype.indexOf doesn't exist below IE9\n\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n\n while (idx < list.length) {\n item = list[idx];\n\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } // non-zero numbers can utilise Set\n\n\n return list.indexOf(a, idx);\n // all these types can utilise Set\n\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n\n }\n } // anything else not covered above, defer to R.equals\n\n\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n}","import _indexOf from \"./_indexOf.js\";\nexport default function _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}","export default function _quote(s) {\n var escaped = s.replace(/\\\\/g, '\\\\\\\\').replace(/[\\b]/g, '\\\\b') // \\b matches word boundary; [\\b] matches backspace\n .replace(/\\f/g, '\\\\f').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t').replace(/\\v/g, '\\\\v').replace(/\\0/g, '\\\\0');\n return '\"' + escaped.replace(/\"/g, '\\\\\"') + '\"';\n}","/**\n * Polyfill from .\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nexport default _toISOString;","export default function _filter(fn, list) {\n var idx = 0;\n var len = list.length;\n var result = [];\n\n while (idx < len) {\n if (fn(list[idx])) {\n result[result.length] = list[idx];\n }\n\n idx += 1;\n }\n\n return result;\n}","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFilter =\n/*#__PURE__*/\nfunction () {\n function XFilter(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XFilter.prototype['@@transducer/init'] = _xfBase.init;\n XFilter.prototype['@@transducer/result'] = _xfBase.result;\n\n XFilter.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n };\n\n return XFilter;\n}();\n\nvar _xfilter =\n/*#__PURE__*/\n_curry2(function _xfilter(f, xf) {\n return new XFilter(f, xf);\n});\n\nexport default _xfilter;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _filter from \"./internal/_filter.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _xfilter from \"./internal/_xfilter.js\";\nimport keys from \"./keys.js\";\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar filter =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filterable) {\n return _isObject(filterable) ? _reduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n\n return acc;\n }, {}, keys(filterable)) : // else\n _filter(pred, filterable);\n}));\n\nexport default filter;","export default function _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}","import _complement from \"./internal/_complement.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport filter from \"./filter.js\";\n/**\n * The complement of [`filter`](#filter).\n *\n * Acts as a transducer if a transformer is given in list position. Filterable\n * objects include plain objects or any object that has a filter method such\n * as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array}\n * @see R.filter, R.transduce, R.addIndex\n * @example\n *\n * const isOdd = (n) => n % 2 !== 0;\n *\n * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar reject =\n/*#__PURE__*/\n_curry2(function reject(pred, filterable) {\n return filter(_complement(pred), filterable);\n});\n\nexport default reject;","export default function _complement(f) {\n return function () {\n return !f.apply(this, arguments);\n };\n}","import _includes from \"./_includes.js\";\nimport _map from \"./_map.js\";\nimport _quote from \"./_quote.js\";\nimport _toISOString from \"./_toISOString.js\";\nimport keys from \"../keys.js\";\nimport reject from \"../reject.js\";\nexport default function _toString(x, seen) {\n var recur = function recur(y) {\n var xs = seen.concat([x]);\n return _includes(y, xs) ? '' : _toString(y, xs);\n }; // mapPairs :: (Object, [String]) -> [String]\n\n\n var mapPairs = function (obj, keys) {\n return _map(function (k) {\n return _quote(k) + ': ' + recur(obj[k]);\n }, keys.slice().sort());\n };\n\n switch (Object.prototype.toString.call(x)) {\n case '[object Arguments]':\n return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';\n\n case '[object Array]':\n return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {\n return /^\\d+$/.test(k);\n }, keys(x)))).join(', ') + ']';\n\n case '[object Boolean]':\n return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();\n\n case '[object Date]':\n return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';\n\n case '[object Null]':\n return 'null';\n\n case '[object Number]':\n return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);\n\n case '[object String]':\n return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);\n\n case '[object Undefined]':\n return 'undefined';\n\n default:\n if (typeof x.toString === 'function') {\n var repr = x.toString();\n\n if (repr !== '[object Object]') {\n return repr;\n }\n }\n\n return '{' + mapPairs(x, keys(x)).join(', ') + '}';\n }\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _toString from \"./internal/_toString.js\";\n/**\n * Returns the string representation of the given value. `eval`'ing the output\n * should result in a value equivalent to the input value. Many of the built-in\n * `toString` methods do not satisfy this requirement.\n *\n * If the given value is an `[object Object]` with a `toString` method other\n * than `Object.prototype.toString`, this method is invoked with no arguments\n * to produce the return value. This means user-defined constructor functions\n * can provide a suitable `toString` method. For example:\n *\n * function Point(x, y) {\n * this.x = x;\n * this.y = y;\n * }\n *\n * Point.prototype.toString = function() {\n * return 'new Point(' + this.x + ', ' + this.y + ')';\n * };\n *\n * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category String\n * @sig * -> String\n * @param {*} val\n * @return {String}\n * @example\n *\n * R.toString(42); //=> '42'\n * R.toString('abc'); //=> '\"abc\"'\n * R.toString([1, 2, 3]); //=> '[1, 2, 3]'\n * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{\"bar\": 2, \"baz\": 3, \"foo\": 1}'\n * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date(\"2001-02-03T04:05:06.000Z\")'\n */\n\nvar toString =\n/*#__PURE__*/\n_curry1(function toString(val) {\n return _toString(val, []);\n});\n\nexport default toString;","import _curry2 from \"./internal/_curry2.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport _isFunction from \"./internal/_isFunction.js\";\nimport _isString from \"./internal/_isString.js\";\nimport toString from \"./toString.js\";\n/**\n * Returns the result of concatenating the given lists or strings.\n *\n * Note: `R.concat` expects both arguments to be of the same type,\n * unlike the native `Array.prototype.concat` method. It will throw\n * an error if you `concat` an Array with a non-Array value.\n *\n * Dispatches to the `concat` method of the first argument, if present.\n * Can also concatenate two members of a [fantasy-land\n * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @sig String -> String -> String\n * @param {Array|String} firstList The first list\n * @param {Array|String} secondList The second list\n * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of\n * `secondList`.\n *\n * @example\n *\n * R.concat('ABC', 'DEF'); // 'ABCDEF'\n * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n * R.concat([], []); //=> []\n */\n\nvar concat =\n/*#__PURE__*/\n_curry2(function concat(a, b) {\n if (_isArray(a)) {\n if (_isArray(b)) {\n return a.concat(b);\n }\n\n throw new TypeError(toString(b) + ' is not an array');\n }\n\n if (_isString(a)) {\n if (_isString(b)) {\n return a + b;\n }\n\n throw new TypeError(toString(b) + ' is not a string');\n }\n\n if (a != null && _isFunction(a['fantasy-land/concat'])) {\n return a['fantasy-land/concat'](b);\n }\n\n if (a != null && _isFunction(a.concat)) {\n return a.concat(b);\n }\n\n throw new TypeError(toString(a) + ' does not have a method named \"concat\" or \"fantasy-land/concat\"');\n});\n\nexport default concat;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns the larger of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.maxBy, R.min\n * @example\n *\n * R.max(789, 123); //=> 789\n * R.max('a', 'b'); //=> 'b'\n */\n\nvar max =\n/*#__PURE__*/\n_curry2(function max(a, b) {\n return b > a ? b : a;\n});\n\nexport default max;","import _includes from \"./_includes.js\";\n\nvar _Set =\n/*#__PURE__*/\nfunction () {\n function _Set() {\n /* globals Set */\n this._nativeSet = typeof Set === 'function' ? new Set() : null;\n this._items = {};\n }\n\n // until we figure out why jsdoc chokes on this\n // @param item The item to add to the Set\n // @returns {boolean} true if the item did not exist prior, otherwise false\n //\n _Set.prototype.add = function (item) {\n return !hasOrAdd(item, true, this);\n }; //\n // @param item The item to check for existence in the Set\n // @returns {boolean} true if the item exists in the Set, otherwise false\n //\n\n\n _Set.prototype.has = function (item) {\n return hasOrAdd(item, false, this);\n }; //\n // Combines the logic for checking whether an item is a member of the set and\n // for adding a new item to the set.\n //\n // @param item The item to check or add to the Set instance.\n // @param shouldAdd If true, the item will be added to the set if it doesn't\n // already exist.\n // @param set The set instance to check or add to.\n // @return {boolean} true if the item already existed, otherwise false.\n //\n\n\n return _Set;\n}();\n\nfunction hasOrAdd(item, shouldAdd, set) {\n var type = typeof item;\n var prevSize, newSize;\n\n switch (type) {\n case 'string':\n case 'number':\n // distinguish between +0 and -0\n if (item === 0 && 1 / item === -Infinity) {\n if (set._items['-0']) {\n return true;\n } else {\n if (shouldAdd) {\n set._items['-0'] = true;\n }\n\n return false;\n }\n } // these types can all utilise the native Set\n\n\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n\n set._nativeSet.add(item);\n\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = {};\n set._items[type][item] = true;\n }\n\n return false;\n } else if (item in set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][item] = true;\n }\n\n return false;\n }\n }\n\n case 'boolean':\n // set._items['boolean'] holds a two element array\n // representing [ falseExists, trueExists ]\n if (type in set._items) {\n var bIdx = item ? 1 : 0;\n\n if (set._items[type][bIdx]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][bIdx] = true;\n }\n\n return false;\n }\n } else {\n if (shouldAdd) {\n set._items[type] = item ? [false, true] : [true, false];\n }\n\n return false;\n }\n\n case 'function':\n // compare functions for reference equality\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n\n set._nativeSet.add(item);\n\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n\n return false;\n }\n\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n\n return false;\n }\n\n return true;\n }\n\n case 'undefined':\n if (set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type] = true;\n }\n\n return false;\n }\n\n case 'object':\n if (item === null) {\n if (!set._items['null']) {\n if (shouldAdd) {\n set._items['null'] = true;\n }\n\n return false;\n }\n\n return true;\n }\n\n /* falls through */\n\n default:\n // reduce the search size of heterogeneous sets by creating buckets\n // for each type.\n type = Object.prototype.toString.call(item);\n\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n\n return false;\n } // scan through all previously applied items\n\n\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n\n return false;\n }\n\n return true;\n }\n} // A simple Set type that honours R.equals semantics\n\n\nexport default _Set;","import nth from \"./nth.js\";\n/**\n * Returns the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.init, R.head, R.tail\n * @example\n *\n * R.last(['fi', 'fo', 'fum']); //=> 'fum'\n * R.last([]); //=> undefined\n *\n * R.last('abc'); //=> 'c'\n * R.last(''); //=> ''\n */\n\nvar last =\n/*#__PURE__*/\nnth(-1);\nexport default last;","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFind =\n/*#__PURE__*/\nfunction () {\n function XFind(f, xf) {\n this.xf = xf;\n this.f = f;\n this.found = false;\n }\n\n XFind.prototype['@@transducer/init'] = _xfBase.init;\n\n XFind.prototype['@@transducer/result'] = function (result) {\n if (!this.found) {\n result = this.xf['@@transducer/step'](result, void 0);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XFind.prototype['@@transducer/step'] = function (result, input) {\n if (this.f(input)) {\n this.found = true;\n result = _reduced(this.xf['@@transducer/step'](result, input));\n }\n\n return result;\n };\n\n return XFind;\n}();\n\nvar _xfind =\n/*#__PURE__*/\n_curry2(function _xfind(f, xf) {\n return new XFind(f, xf);\n});\n\nexport default _xfind;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xfind from \"./internal/_xfind.js\";\n/**\n * Returns the first element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Dispatches to the `find` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n * const xs = [{a: 1}, {a: 2}, {a: 3}];\n * R.find(R.propEq('a', 2))(xs); //=> {a: 2}\n * R.find(R.propEq('a', 4))(xs); //=> undefined\n */\n\nvar find =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['find'], _xfind, function find(fn, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (fn(list[idx])) {\n return list[idx];\n }\n\n idx += 1;\n }\n}));\n\nexport default find;","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFindIndex =\n/*#__PURE__*/\nfunction () {\n function XFindIndex(f, xf) {\n this.xf = xf;\n this.f = f;\n this.idx = -1;\n this.found = false;\n }\n\n XFindIndex.prototype['@@transducer/init'] = _xfBase.init;\n\n XFindIndex.prototype['@@transducer/result'] = function (result) {\n if (!this.found) {\n result = this.xf['@@transducer/step'](result, -1);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XFindIndex.prototype['@@transducer/step'] = function (result, input) {\n this.idx += 1;\n\n if (this.f(input)) {\n this.found = true;\n result = _reduced(this.xf['@@transducer/step'](result, this.idx));\n }\n\n return result;\n };\n\n return XFindIndex;\n}();\n\nvar _xfindIndex =\n/*#__PURE__*/\n_curry2(function _xfindIndex(f, xf) {\n return new XFindIndex(f, xf);\n});\n\nexport default _xfindIndex;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xfindIndex from \"./internal/_xfindIndex.js\";\n/**\n * Returns the index of the first element of the list which matches the\n * predicate, or `-1` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> Number\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Number} The index of the element found, or `-1`.\n * @see R.transduce, R.indexOf\n * @example\n *\n * const xs = [{a: 1}, {a: 2}, {a: 3}];\n * R.findIndex(R.propEq('a', 2))(xs); //=> 1\n * R.findIndex(R.propEq('a', 4))(xs); //=> -1\n */\n\nvar findIndex =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable([], _xfindIndex, function findIndex(fn, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (fn(list[idx])) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n}));\n\nexport default findIndex;","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFindLast =\n/*#__PURE__*/\nfunction () {\n function XFindLast(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XFindLast.prototype['@@transducer/init'] = _xfBase.init;\n\n XFindLast.prototype['@@transducer/result'] = function (result) {\n return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last));\n };\n\n XFindLast.prototype['@@transducer/step'] = function (result, input) {\n if (this.f(input)) {\n this.last = input;\n }\n\n return result;\n };\n\n return XFindLast;\n}();\n\nvar _xfindLast =\n/*#__PURE__*/\n_curry2(function _xfindLast(f, xf) {\n return new XFindLast(f, xf);\n});\n\nexport default _xfindLast;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xfindLast from \"./internal/_xfindLast.js\";\n/**\n * Returns the last element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n * const xs = [{a: 1, b: 0}, {a:1, b: 1}];\n * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1}\n * R.findLast(R.propEq('a', 4))(xs); //=> undefined\n */\n\nvar findLast =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable([], _xfindLast, function findLast(fn, list) {\n var idx = list.length - 1;\n\n while (idx >= 0) {\n if (fn(list[idx])) {\n return list[idx];\n }\n\n idx -= 1;\n }\n}));\n\nexport default findLast;","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Iterate over an input `list`, calling a provided function `fn` for each\n * element in the list.\n *\n * `fn` receives one argument: *(value)*.\n *\n * Note: `R.forEach` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.forEach` method. For more\n * details on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description\n *\n * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns\n * the original array. In some libraries this function is named `each`.\n *\n * Dispatches to the `forEach` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> *) -> [a] -> [a]\n * @param {Function} fn The function to invoke. Receives one argument, `value`.\n * @param {Array} list The list to iterate over.\n * @return {Array} The original list.\n * @see R.addIndex\n * @example\n *\n * const printXPlusFive = x => console.log(x + 5);\n * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3]\n * // logs 6\n * // logs 7\n * // logs 8\n * @symb R.forEach(f, [a, b, c]) = [a, b, c]\n */\n\nvar forEach =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_checkForMethod('forEach', function forEach(fn, list) {\n var len = list.length;\n var idx = 0;\n\n while (idx < len) {\n fn(list[idx]);\n idx += 1;\n }\n\n return list;\n}));\n\nexport default forEach;","import _curry2 from \"./internal/_curry2.js\";\nimport _has from \"./internal/_has.js\";\nimport isNil from \"./isNil.js\";\n/**\n * Returns whether or not a path exists in an object. Only the object's\n * own properties are checked.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {a} -> Boolean\n * @param {Array} path The path to use.\n * @param {Object} obj The object to check the path in.\n * @return {Boolean} Whether the path exists.\n * @see R.has\n * @example\n *\n * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true\n * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true\n * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false\n * R.hasPath(['a', 'b'], {}); // => false\n */\n\nvar hasPath =\n/*#__PURE__*/\n_curry2(function hasPath(_path, obj) {\n if (_path.length === 0 || isNil(obj)) {\n return false;\n }\n\n var val = obj;\n var idx = 0;\n\n while (idx < _path.length) {\n if (!isNil(val) && _has(_path[idx], val)) {\n val = val[_path[idx]];\n idx += 1;\n } else {\n return false;\n }\n }\n\n return true;\n});\n\nexport default hasPath;","import _curry2 from \"./internal/_curry2.js\";\nimport hasPath from \"./hasPath.js\";\n/**\n * Returns whether or not an object has an own property with the specified name\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Object\n * @sig s -> {s: x} -> Boolean\n * @param {String} prop The name of the property to check for.\n * @param {Object} obj The object to query.\n * @return {Boolean} Whether the property exists.\n * @example\n *\n * const hasName = R.has('name');\n * hasName({name: 'alice'}); //=> true\n * hasName({name: 'bob'}); //=> true\n * hasName({}); //=> false\n *\n * const point = {x: 0, y: 0};\n * const pointHas = R.has(R.__, point);\n * pointHas('x'); //=> true\n * pointHas('y'); //=> true\n * pointHas('z'); //=> false\n */\n\nvar has =\n/*#__PURE__*/\n_curry2(function has(prop, obj) {\n return hasPath([prop], obj);\n});\n\nexport default has;","import nth from \"./nth.js\";\n/**\n * Returns the first element of the given list or string. In some libraries\n * this function is named `first`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String\n * @param {Array|String} list\n * @return {*}\n * @see R.tail, R.init, R.last\n * @example\n *\n * R.head(['fi', 'fo', 'fum']); //=> 'fi'\n * R.head([]); //=> undefined\n *\n * R.head('abc'); //=> 'a'\n * R.head(''); //=> ''\n */\n\nvar head =\n/*#__PURE__*/\nnth(0);\nexport default head;","import _curry3 from \"./internal/_curry3.js\";\nimport curryN from \"./curryN.js\";\n/**\n * Creates a function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)\n * @param {Function} condition A predicate function\n * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value.\n * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value.\n * @return {Function} A new function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n * @see R.unless, R.when, R.cond\n * @example\n *\n * const incCount = R.ifElse(\n * R.has('count'),\n * R.over(R.lensProp('count'), R.inc),\n * R.assoc('count', 1)\n * );\n * incCount({ count: 1 }); //=> { count: 2 }\n * incCount({}); //=> { count: 1 }\n */\n\nvar ifElse =\n/*#__PURE__*/\n_curry3(function ifElse(condition, onTrue, onFalse) {\n return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() {\n return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments);\n });\n});\n\nexport default ifElse;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Also works with strings.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.includes(3, [1, 2, 3]); //=> true\n * R.includes(4, [1, 2, 3]); //=> false\n * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.includes([42], [[42]]); //=> true\n * R.includes('ba', 'banana'); //=>true\n */\n\nvar includes =\n/*#__PURE__*/\n_curry2(_includes);\n\nexport default includes;","import _curry2 from \"./internal/_curry2.js\";\nimport _indexOf from \"./internal/_indexOf.js\";\nimport _isArray from \"./internal/_isArray.js\";\n/**\n * Returns the position of the first occurrence of an item in an array, or -1\n * if the item is not included in the array. [`R.equals`](#equals) is used to\n * determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Number\n * @param {*} target The item to find.\n * @param {Array} xs The array to search in.\n * @return {Number} the index of the target, or -1 if the target is not found.\n * @see R.lastIndexOf, R.findIndex\n * @example\n *\n * R.indexOf(3, [1,2,3,4]); //=> 2\n * R.indexOf(10, [1,2,3,4]); //=> -1\n */\n\nvar indexOf =\n/*#__PURE__*/\n_curry2(function indexOf(target, xs) {\n return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0);\n});\n\nexport default indexOf;","import _curry3 from \"./internal/_curry3.js\";\n/**\n * Inserts the sub-list into the list, at the specified `index`. _Note that this is not\n * destructive_: it returns a copy of the list with the changes.\n * No lists have been harmed in the application of this function.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig Number -> [a] -> [a] -> [a]\n * @param {Number} index The position to insert the sub-list\n * @param {Array} elts The sub-list to insert into the Array\n * @param {Array} list The list to insert the sub-list into\n * @return {Array} A new Array with `elts` inserted starting at `index`.\n * @example\n *\n * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4]\n */\n\nvar insertAll =\n/*#__PURE__*/\n_curry3(function insertAll(idx, elts, list) {\n idx = idx < list.length && idx >= 0 ? idx : list.length;\n return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx));\n});\n\nexport default insertAll;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n/**\n * Returns a new function much like the supplied one, except that the first two\n * arguments' order is reversed.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z)\n * @param {Function} fn The function to invoke with its first two parameters reversed.\n * @return {*} The result of invoking `fn` with its first two parameters' order reversed.\n * @example\n *\n * const mergeThree = (a, b, c) => [].concat(a, b, c);\n *\n * mergeThree(1, 2, 3); //=> [1, 2, 3]\n *\n * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]\n * @symb R.flip(f)(a, b, c) = f(b, a, c)\n */\n\nvar flip =\n/*#__PURE__*/\n_curry1(function flip(fn) {\n return curryN(fn.length, function (a, b) {\n var args = Array.prototype.slice.call(arguments, 0);\n args[0] = b;\n args[1] = a;\n return fn.apply(this, args);\n });\n});\n\nexport default flip;","export default function _identity(x) {\n return x;\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _identity from \"./internal/_identity.js\";\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\n\nvar identity =\n/*#__PURE__*/\n_curry1(_identity);\n\nexport default identity;","import _curry2 from \"./_curry2.js\";\nimport _Set from \"./_Set.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XUniqBy =\n/*#__PURE__*/\nfunction () {\n function XUniqBy(f, xf) {\n this.xf = xf;\n this.f = f;\n this.set = new _Set();\n }\n\n XUniqBy.prototype['@@transducer/init'] = _xfBase.init;\n XUniqBy.prototype['@@transducer/result'] = _xfBase.result;\n\n XUniqBy.prototype['@@transducer/step'] = function (result, input) {\n return this.set.add(this.f(input)) ? this.xf['@@transducer/step'](result, input) : result;\n };\n\n return XUniqBy;\n}();\n\nvar _xuniqBy =\n/*#__PURE__*/\n_curry2(function _xuniqBy(f, xf) {\n return new XUniqBy(f, xf);\n});\n\nexport default _xuniqBy;","import identity from \"./identity.js\";\nimport uniqBy from \"./uniqBy.js\";\n/**\n * Returns a new list containing only one copy of each element in the original\n * list. [`R.equals`](#equals) is used to determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniq([1, 1, 2, 1]); //=> [1, 2]\n * R.uniq([1, '1']); //=> [1, '1']\n * R.uniq([[42], [42]]); //=> [[42]]\n */\n\nvar uniq =\n/*#__PURE__*/\nuniqBy(identity);\nexport default uniq;","import _Set from \"./internal/_Set.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xuniqBy from \"./internal/_xuniqBy.js\";\n/**\n * Returns a new list containing only one copy of each element in the original\n * list, based upon the value returned by applying the supplied function to\n * each list element. Prefers the first item if the supplied function produces\n * the same value on two items. [`R.equals`](#equals) is used for comparison.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> b) -> [a] -> [a]\n * @param {Function} fn A function used to produce a value to use during comparisons.\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10]\n */\n\nvar uniqBy =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable([], _xuniqBy, function (fn, list) {\n var set = new _Set();\n var result = [];\n var idx = 0;\n var appliedItem, item;\n\n while (idx < list.length) {\n item = list[idx];\n appliedItem = fn(item);\n\n if (set.add(appliedItem)) {\n result.push(item);\n }\n\n idx += 1;\n }\n\n return result;\n}));\n\nexport default uniqBy;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _filter from \"./internal/_filter.js\";\nimport flip from \"./flip.js\";\nimport uniq from \"./uniq.js\";\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of those\n * elements common to both lists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The list of elements found in both `list1` and `list2`.\n * @see R.innerJoin\n * @example\n *\n * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3]\n */\n\nvar intersection =\n/*#__PURE__*/\n_curry2(function intersection(list1, list2) {\n var lookupList, filteredList;\n\n if (list1.length > list2.length) {\n lookupList = list1;\n filteredList = list2;\n } else {\n lookupList = list2;\n filteredList = list1;\n }\n\n return uniq(_filter(flip(_includes)(lookupList), filteredList));\n});\n\nexport default intersection;","import _has from \"./_has.js\"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n\n while (idx < length) {\n var source = arguments[idx];\n\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n\n idx += 1;\n }\n\n return output;\n}\n\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * See if an object (i.e. `val`) is an instance of the supplied constructor. This\n * function will check up the inheritance chain, if any.\n * If `val` was created using `Object.create`, `R.is(Object, val) === true`.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Type\n * @sig (* -> {*}) -> a -> Boolean\n * @param {Object} ctor A constructor\n * @param {*} val The value to test\n * @return {Boolean}\n * @example\n *\n * R.is(Object, {}); //=> true\n * R.is(Number, 1); //=> true\n * R.is(Object, 1); //=> false\n * R.is(String, 's'); //=> true\n * R.is(String, new String('')); //=> true\n * R.is(Object, new String('')); //=> true\n * R.is(Object, 's'); //=> false\n * R.is(Number, {}); //=> false\n */\n\nvar is =\n/*#__PURE__*/\n_curry2(function is(Ctor, val) {\n return val instanceof Ctor || val != null && (val.constructor === Ctor || Ctor.name === 'Object' && typeof val === 'object');\n});\n\nexport default is;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Returns a list containing the names of all the properties of the supplied\n * object, including prototype properties.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own and prototype properties.\n * @see R.keys, R.valuesIn\n * @example\n *\n * const F = function() { this.x = 'X'; };\n * F.prototype.y = 'Y';\n * const f = new F();\n * R.keysIn(f); //=> ['x', 'y']\n */\n\nvar keysIn =\n/*#__PURE__*/\n_curry1(function keysIn(obj) {\n var prop;\n var ks = [];\n\n for (prop in obj) {\n ks[ks.length] = prop;\n }\n\n return ks;\n});\n\nexport default keysIn;","import _curry2 from \"./internal/_curry2.js\";\nimport map from \"./map.js\";\n/**\n * Returns a lens for the given getter and setter functions. The getter \"gets\"\n * the value of the focus; the setter \"sets\" the value of the focus. The setter\n * should not mutate the data structure.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig (s -> a) -> ((a, s) -> s) -> Lens s a\n * @param {Function} getter\n * @param {Function} setter\n * @return {Lens}\n * @see R.view, R.set, R.over, R.lensIndex, R.lensProp\n * @example\n *\n * const xLens = R.lens(R.prop('x'), R.assoc('x'));\n *\n * R.view(xLens, {x: 1, y: 2}); //=> 1\n * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}\n * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2}\n */\n\nvar lens =\n/*#__PURE__*/\n_curry2(function lens(getter, setter) {\n return function (toFunctorFn) {\n return function (target) {\n return map(function (focus) {\n return setter(focus, target);\n }, toFunctorFn(getter(target)));\n };\n };\n});\n\nexport default lens;","import _curry2 from \"./internal/_curry2.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport nth from \"./nth.js\";\n/**\n * Retrieves the values at given paths of an object.\n *\n * @func\n * @memberOf R\n * @since v0.27.1\n * @category Object\n * @typedefn Idx = [String | Int | Symbol]\n * @sig [Idx] -> {a} -> [a | Undefined]\n * @param {Array} pathsArray The array of paths to be fetched.\n * @param {Object} obj The object to retrieve the nested properties from.\n * @return {Array} A list consisting of values at paths specified by \"pathsArray\".\n * @see R.path\n * @example\n *\n * R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3]\n * R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined]\n */\n\nvar paths =\n/*#__PURE__*/\n_curry2(function paths(pathsArray, obj) {\n return pathsArray.map(function (paths) {\n var val = obj;\n var idx = 0;\n var p;\n\n while (idx < paths.length) {\n if (val == null) {\n return;\n }\n\n p = paths[idx];\n val = _isInteger(p) ? nth(p, val) : val[p];\n idx += 1;\n }\n\n return val;\n });\n});\n\nexport default paths;","import _curry2 from \"./internal/_curry2.js\";\nimport paths from \"./paths.js\";\n/**\n * Retrieve the value at a given path.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {a} -> a | Undefined\n * @param {Array} path The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop, R.nth\n * @example\n *\n * R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1\n * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2\n */\n\nvar path =\n/*#__PURE__*/\n_curry2(function path(pathAr, obj) {\n return paths([pathAr], obj)[0];\n});\n\nexport default path;","import _curry1 from \"./internal/_curry1.js\";\nimport assocPath from \"./assocPath.js\";\nimport lens from \"./lens.js\";\nimport path from \"./path.js\";\n/**\n * Returns a lens whose focus is the specified path.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig [Idx] -> Lens s a\n * @param {Array} path The path to use.\n * @return {Lens}\n * @see R.view, R.set, R.over\n * @example\n *\n * const xHeadYLens = R.lensPath(['x', 0, 'y']);\n *\n * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n * //=> 2\n * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]}\n * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]}\n */\n\nvar lensPath =\n/*#__PURE__*/\n_curry1(function lensPath(p) {\n return lens(path(p), assocPath(p));\n});\n\nexport default lensPath;","import add from \"./add.js\";\nimport reduce from \"./reduce.js\";\n/**\n * Adds together all the elements of a list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig [Number] -> Number\n * @param {Array} list An array of numbers\n * @return {Number} The sum of all the numbers in the list.\n * @see R.reduce\n * @example\n *\n * R.sum([2,4,6,8,100,1]); //=> 121\n */\n\nvar sum =\n/*#__PURE__*/\nreduce(add, 0);\nexport default sum;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Adds two values.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} a\n * @param {Number} b\n * @return {Number}\n * @see R.subtract\n * @example\n *\n * R.add(2, 3); //=> 5\n * R.add(7)(10); //=> 17\n */\n\nvar add =\n/*#__PURE__*/\n_curry2(function add(a, b) {\n return Number(a) + Number(b);\n});\n\nexport default add;","import _objectAssign from \"./internal/_objectAssign.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n/**\n * Creates one new object with the own properties from a list of objects.\n * If a key exists in more than one object, the value from the last\n * object it exists in will be used.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig [{k: v}] -> {k: v}\n * @param {Array} list An array of objects\n * @return {Object} A merged object.\n * @see R.reduce\n * @example\n *\n * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3}\n * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2}\n * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 }\n */\n\nvar mergeAll =\n/*#__PURE__*/\n_curry1(function mergeAll(list) {\n return _objectAssign.apply(null, [{}].concat(list));\n});\n\nexport default mergeAll;","import _objectAssign from \"./internal/_objectAssign.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * const withDefaults = R.mergeRight({x: 0, y: 0});\n * withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeRight(a, b) = {...a, ...b}\n */\n\nvar mergeRight =\n/*#__PURE__*/\n_curry2(function mergeRight(l, r) {\n return _objectAssign({}, l, r);\n});\n\nexport default mergeRight;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns the smaller of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.minBy, R.max\n * @example\n *\n * R.min(789, 123); //=> 123\n * R.min('a', 'b'); //=> 'a'\n */\n\nvar min =\n/*#__PURE__*/\n_curry2(function min(a, b) {\n return b < a ? b : a;\n});\n\nexport default min;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\n\nvar omit =\n/*#__PURE__*/\n_curry2(function omit(names, obj) {\n var result = {};\n var index = {};\n var idx = 0;\n var len = names.length;\n\n while (idx < len) {\n index[names[idx]] = 1;\n idx += 1;\n }\n\n for (var prop in obj) {\n if (!index.hasOwnProperty(prop)) {\n result[prop] = obj[prop];\n }\n }\n\n return result;\n});\n\nexport default omit;","import _arity from \"./internal/_arity.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n/**\n * Accepts a function `fn` and returns a function that guards invocation of\n * `fn` such that `fn` can only ever be called once, no matter how many times\n * the returned function is invoked. The first value calculated is returned in\n * subsequent invocations.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (a... -> b) -> (a... -> b)\n * @param {Function} fn The function to wrap in a call-only-once wrapper.\n * @return {Function} The wrapped function.\n * @example\n *\n * const addOneOnce = R.once(x => x + 1);\n * addOneOnce(10); //=> 11\n * addOneOnce(addOneOnce(50)); //=> 11\n */\n\nvar once =\n/*#__PURE__*/\n_curry1(function once(fn) {\n var called = false;\n var result;\n return _arity(fn.length, function () {\n if (called) {\n return result;\n }\n\n called = true;\n result = fn.apply(this, arguments);\n return result;\n });\n});\n\nexport default once;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object containing only the keys specified. If\n * the key does not exist, the property is ignored.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> {k: v}\n * @param {Array} names an array of String property names to copy onto a new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties from `names` on it.\n * @see R.omit, R.props\n * @example\n *\n * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}\n * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}\n */\n\nvar pick =\n/*#__PURE__*/\n_curry2(function pick(names, obj) {\n var result = {};\n var idx = 0;\n\n while (idx < names.length) {\n if (names[idx] in obj) {\n result[names[idx]] = obj[names[idx]];\n }\n\n idx += 1;\n }\n\n return result;\n});\n\nexport default pick;","import _curry2 from \"./internal/_curry2.js\";\nimport path from \"./path.js\";\n/**\n * Acts as multiple `prop`: array of keys in, array of values out. Preserves\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> [v]\n * @param {Array} ps The property names to fetch\n * @param {Object} obj The object to query\n * @return {Array} The corresponding values or partially applied function.\n * @see R.prop, R.pluck, R.project\n * @example\n *\n * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2]\n * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2]\n *\n * const fullName = R.compose(R.join(' '), R.props(['first', 'last']));\n * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth'\n */\n\nvar props =\n/*#__PURE__*/\n_curry2(function props(ps, obj) {\n return ps.map(function (p) {\n return path([p], obj);\n });\n});\n\nexport default props;","export default function _isNumber(x) {\n return Object.prototype.toString.call(x) === '[object Number]';\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _isNumber from \"./internal/_isNumber.js\";\n/**\n * Returns a list of numbers from `from` (inclusive) to `to` (exclusive).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> Number -> [Number]\n * @param {Number} from The first number in the list.\n * @param {Number} to One more than the last number in the list.\n * @return {Array} The list of numbers in the set `[a, b)`.\n * @example\n *\n * R.range(1, 5); //=> [1, 2, 3, 4]\n * R.range(50, 53); //=> [50, 51, 52]\n */\n\nvar range =\n/*#__PURE__*/\n_curry2(function range(from, to) {\n if (!(_isNumber(from) && _isNumber(to))) {\n throw new TypeError('Both arguments to range must be numbers');\n }\n\n var result = [];\n var n = from;\n\n while (n < to) {\n result.push(n);\n n += 1;\n }\n\n return result;\n});\n\nexport default range;","import _curryN from \"./internal/_curryN.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _reduced from \"./internal/_reduced.js\";\n/**\n * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating\n * through the list, successively calling the iterator function. `reduceWhile`\n * also takes a predicate that is evaluated before each step. If the predicate\n * returns `false`, it \"short-circuits\" the iteration and returns the current\n * value of the accumulator. `reduceWhile` may alternatively be short-circuited\n * via [`reduced`](#reduced).\n *\n * @func\n * @memberOf R\n * @since v0.22.0\n * @category List\n * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} pred The predicate. It is passed the accumulator and the\n * current element.\n * @param {Function} fn The iterator function. Receives two values, the\n * accumulator and the current element.\n * @param {*} a The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduce, R.reduced\n * @example\n *\n * const isOdd = (acc, x) => x % 2 !== 0;\n * const xs = [1, 3, 5, 60, 777, 800];\n * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9\n *\n * const ys = [2, 4, 6]\n * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111\n */\n\nvar reduceWhile =\n/*#__PURE__*/\n_curryN(4, [], function _reduceWhile(pred, fn, a, list) {\n return _reduce(function (acc, x) {\n return pred(acc, x) ? fn(acc, x) : _reduced(acc);\n }, a, list);\n});\n\nexport default reduceWhile;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n * const t = R.always('Tee');\n * t(); //=> 'Tee'\n */\n\nvar always =\n/*#__PURE__*/\n_curry1(function always(val) {\n return function () {\n return val;\n };\n});\n\nexport default always;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Calls an input function `n` times, returning an array containing the results\n * of those function calls.\n *\n * `fn` is passed one argument: The current value of `n`, which begins at `0`\n * and is gradually incremented to `n - 1`.\n *\n * @func\n * @memberOf R\n * @since v0.2.3\n * @category List\n * @sig (Number -> a) -> Number -> [a]\n * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`.\n * @param {Number} n A value between `0` and `n - 1`. Increments after each function call.\n * @return {Array} An array containing the return values of all calls to `fn`.\n * @see R.repeat\n * @example\n *\n * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4]\n * @symb R.times(f, 0) = []\n * @symb R.times(f, 1) = [f(0)]\n * @symb R.times(f, 2) = [f(0), f(1)]\n */\n\nvar times =\n/*#__PURE__*/\n_curry2(function times(fn, n) {\n var len = Number(n);\n var idx = 0;\n var list;\n\n if (len < 0 || isNaN(len)) {\n throw new RangeError('n must be a non-negative number');\n }\n\n list = new Array(len);\n\n while (idx < len) {\n list[idx] = fn(idx);\n idx += 1;\n }\n\n return list;\n});\n\nexport default times;","import _curry2 from \"./internal/_curry2.js\";\nimport always from \"./always.js\";\nimport times from \"./times.js\";\n/**\n * Returns a fixed list of size `n` containing a specified identical value.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig a -> n -> [a]\n * @param {*} value The value to repeat.\n * @param {Number} n The desired size of the output list.\n * @return {Array} A new array containing `n` `value`s.\n * @see R.times\n * @example\n *\n * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi']\n *\n * const obj = {};\n * const repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}]\n * repeatedObjs[0] === repeatedObjs[1]; //=> true\n * @symb R.repeat(a, 0) = []\n * @symb R.repeat(a, 1) = [a]\n * @symb R.repeat(a, 2) = [a, a]\n */\n\nvar repeat =\n/*#__PURE__*/\n_curry2(function repeat(value, n) {\n return times(always(value), n);\n});\n\nexport default repeat;","import _curry3 from \"./internal/_curry3.js\"; // `Identity` is a functor that holds a single value, where `map` simply\n// transforms the held value with the provided function.\n\nvar Identity = function (x) {\n return {\n value: x,\n map: function (f) {\n return Identity(f(x));\n }\n };\n};\n/**\n * Returns the result of \"setting\" the portion of the given data structure\n * focused by the given lens to the result of applying the given function to\n * the focused value.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> (a -> a) -> s -> s\n * @param {Lens} lens\n * @param {*} v\n * @param {*} x\n * @return {*}\n * @see R.view, R.set, R.lens, R.lensIndex, R.lensProp, R.lensPath\n * @example\n *\n * const headLens = R.lensIndex(0);\n *\n * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz']\n */\n\n\nvar over =\n/*#__PURE__*/\n_curry3(function over(lens, f, x) {\n // The value returned by the getter function is first transformed with `f`,\n // then set as the value of an `Identity`. This is then mapped over with the\n // setter function of the lens.\n return lens(function (y) {\n return Identity(f(y));\n })(x).value;\n});\n\nexport default over;","import _curry3 from \"./internal/_curry3.js\";\nimport always from \"./always.js\";\nimport over from \"./over.js\";\n/**\n * Returns the result of \"setting\" the portion of the given data structure\n * focused by the given lens to the given value.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> a -> s -> s\n * @param {Lens} lens\n * @param {*} v\n * @param {*} x\n * @return {*}\n * @see R.view, R.over, R.lens, R.lensIndex, R.lensProp, R.lensPath\n * @example\n *\n * const xLens = R.lensProp('x');\n *\n * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}\n * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2}\n */\n\nvar set =\n/*#__PURE__*/\n_curry3(function set(lens, v, x) {\n return over(lens, always(v), x);\n});\n\nexport default set;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Sorts a list according to a list of comparators.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Relation\n * @sig [(a, a) -> Number] -> [a] -> [a]\n * @param {Array} functions A list of comparator functions.\n * @param {Array} list The list to sort.\n * @return {Array} A new list sorted according to the comarator functions.\n * @see R.ascend, R.descend\n * @example\n *\n * const alice = {\n * name: 'alice',\n * age: 40\n * };\n * const bob = {\n * name: 'bob',\n * age: 30\n * };\n * const clara = {\n * name: 'clara',\n * age: 40\n * };\n * const people = [clara, bob, alice];\n * const ageNameSort = R.sortWith([\n * R.descend(R.prop('age')),\n * R.ascend(R.prop('name'))\n * ]);\n * ageNameSort(people); //=> [alice, clara, bob]\n */\n\nvar sortWith =\n/*#__PURE__*/\n_curry2(function sortWith(fns, list) {\n return Array.prototype.slice.call(list, 0).sort(function (a, b) {\n var result = 0;\n var i = 0;\n\n while (result === 0 && i < fns.length) {\n result = fns[i](a, b);\n i += 1;\n }\n\n return result;\n });\n});\n\nexport default sortWith;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\n/**\n * Converts an object into an array of key, value arrays. Only the object's\n * own properties are used.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.4.0\n * @category Object\n * @sig {String: *} -> [[String,*]]\n * @param {Object} obj The object to extract from\n * @return {Array} An array of key, value arrays from the object's own properties.\n * @see R.fromPairs, R.keys, R.values\n * @example\n *\n * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]]\n */\n\nvar toPairs =\n/*#__PURE__*/\n_curry1(function toPairs(obj) {\n var pairs = [];\n\n for (var prop in obj) {\n if (_has(prop, obj)) {\n pairs[pairs.length] = [prop, obj[prop]];\n }\n }\n\n return pairs;\n});\n\nexport default toPairs;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Transposes the rows and columns of a 2D list.\n * When passed a list of `n` lists of length `x`,\n * returns a list of `x` lists of length `n`.\n *\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [[a]] -> [[a]]\n * @param {Array} list A 2D list\n * @return {Array} A 2D list\n * @example\n *\n * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']]\n * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']]\n *\n * // If some of the rows are shorter than the following rows, their elements are skipped:\n * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]]\n * @symb R.transpose([[a], [b], [c]]) = [a, b, c]\n * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]]\n * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]]\n */\n\nvar transpose =\n/*#__PURE__*/\n_curry1(function transpose(outerlist) {\n var i = 0;\n var result = [];\n\n while (i < outerlist.length) {\n var innerlist = outerlist[i];\n var j = 0;\n\n while (j < innerlist.length) {\n if (typeof result[j] === 'undefined') {\n result[j] = [];\n }\n\n result[j].push(innerlist[j]);\n j += 1;\n }\n\n i += 1;\n }\n\n return result;\n});\n\nexport default transpose;","import _concat from \"./internal/_concat.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport compose from \"./compose.js\";\nimport uniq from \"./uniq.js\";\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of the elements\n * of each list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} as The first list.\n * @param {Array} bs The second list.\n * @return {Array} The first and second lists concatenated, with\n * duplicates removed.\n * @example\n *\n * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4]\n */\n\nvar union =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\ncompose(uniq, _concat));\n\nexport default union;","import _curry1 from \"./internal/_curry1.js\";\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\n\nvar trim = !hasProtoTrim ||\n/*#__PURE__*/\nws.trim() || !\n/*#__PURE__*/\nzeroWidth.trim() ?\n/*#__PURE__*/\n_curry1(function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n}) :\n/*#__PURE__*/\n_curry1(function trim(str) {\n return str.trim();\n});\nexport default trim;","import _identity from \"./internal/_identity.js\";\nimport chain from \"./chain.js\";\n/**\n * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from\n * any [Chain](https://github.com/fantasyland/fantasy-land#chain).\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig Chain c => c (c a) -> c a\n * @param {*} list\n * @return {*}\n * @see R.flatten, R.chain\n * @example\n *\n * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]]\n * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6]\n */\n\nvar unnest =\n/*#__PURE__*/\nchain(_identity);\nexport default unnest;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport flip from \"./flip.js\";\nimport reject from \"./reject.js\";\n/**\n * Returns a new list without values in the first argument.\n * [`R.equals`](#equals) is used to determine equality.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @param {Array} list1 The values to be removed from `list2`.\n * @param {Array} list2 The array to remove values from.\n * @return {Array} The new array without values in `list1`.\n * @see R.transduce, R.difference, R.remove\n * @example\n *\n * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4]\n */\n\nvar without =\n/*#__PURE__*/\n_curry2(function (xs, list) {\n return reject(flip(_includes)(xs), list);\n});\n\nexport default without;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Creates a new list out of the two supplied by creating each possible pair\n * from the lists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b] -> [[a,b]]\n * @param {Array} as The first list.\n * @param {Array} bs The second list.\n * @return {Array} The list made by combining each possible pair from\n * `as` and `bs` into pairs (`[a, b]`).\n * @example\n *\n * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]\n * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]]\n */\n\nvar xprod =\n/*#__PURE__*/\n_curry2(function xprod(a, b) {\n // = xprodWith(prepend); (takes about 3 times as long...)\n var idx = 0;\n var ilen = a.length;\n var j;\n var jlen = b.length;\n var result = [];\n\n while (idx < ilen) {\n j = 0;\n\n while (j < jlen) {\n result[result.length] = [a[idx], b[j]];\n j += 1;\n }\n\n idx += 1;\n }\n\n return result;\n});\n\nexport default xprod;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Creates a new list out of the two supplied by pairing up equally-positioned\n * items from both lists. The returned list is truncated to the length of the\n * shorter of the two input lists.\n * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b] -> [[a,b]]\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`.\n * @example\n *\n * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']]\n * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]]\n */\n\nvar zip =\n/*#__PURE__*/\n_curry2(function zip(a, b) {\n var rv = [];\n var idx = 0;\n var len = Math.min(a.length, b.length);\n\n while (idx < len) {\n rv[idx] = [a[idx], b[idx]];\n idx += 1;\n }\n\n return rv;\n});\n\nexport default zip;","import _curry3 from \"./internal/_curry3.js\";\n/**\n * Creates a new list out of the two supplied by applying the function to each\n * equally-positioned pair in the lists. The returned list is truncated to the\n * length of the shorter of the two input lists.\n *\n * @function\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> c) -> [a] -> [b] -> [c]\n * @param {Function} fn The function used to combine the two elements into one value.\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by combining same-indexed elements of `list1` and `list2`\n * using `fn`.\n * @example\n *\n * const f = (x, y) => {\n * // ...\n * };\n * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']);\n * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')]\n * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)]\n */\n\nvar zipWith =\n/*#__PURE__*/\n_curry3(function zipWith(fn, a, b) {\n var rv = [];\n var idx = 0;\n var len = Math.min(a.length, b.length);\n\n while (idx < len) {\n rv[idx] = fn(a[idx], b[idx]);\n idx += 1;\n }\n\n return rv;\n});\n\nexport default zipWith;","import _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _curry3 from \"./internal/_curry3.js\";\n/**\n * Removes the sub-list of `list` starting at index `start` and containing\n * `count` elements. _Note that this is not destructive_: it returns a copy of\n * the list with the changes.\n * No lists have been harmed in the application of this function.\n *\n * @func\n * @memberOf R\n * @since v0.2.2\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @param {Number} start The position to start removing elements\n * @param {Number} count The number of elements to remove\n * @param {Array} list The list to remove from\n * @return {Array} A new Array with `count` elements from `start` removed.\n * @see R.without\n * @example\n *\n * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]\n */\n\nvar remove =\n/*#__PURE__*/\n_curry3(function remove(start, count, list) {\n var result = Array.prototype.slice.call(list, 0);\n result.splice(start, count);\n return result;\n});\n\nexport default remove;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"108\":\"async-table\",\"471\":\"async-export\",\"790\":\"async-highlight\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var getCurrentScript = function() {\n var script = document.currentScript;\n if (!script) {\n /* Shim for IE11 and below */\n /* Do not take into account async scripts and inline scripts */\n\n var doc_scripts = document.getElementsByTagName('script');\n var scripts = [];\n\n for (var i = 0; i < doc_scripts.length; i++) {\n scripts.push(doc_scripts[i]);\n }\n\n scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n script = scripts.slice(-1)[0];\n }\n\n return script;\n};\n\nvar isLocalScript = function(script) {\n return /\\/_dash-component-suites\\//.test(script.src);\n};\n\nObject.defineProperty(__webpack_require__, 'p', {\n get: (function () {\n var script = getCurrentScript();\n\n var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n return function() {\n return url;\n };\n })()\n});\n\nif (typeof jsonpScriptSrc !== 'undefined') {\n var __jsonpScriptSrc__ = jsonpScriptSrc;\n jsonpScriptSrc = function(chunkId) {\n var script = getCurrentScript();\n var isLocal = isLocalScript(script);\n\n var src = __jsonpScriptSrc__(chunkId);\n\n if(!isLocal) {\n return src;\n }\n\n var srcFragments = src.split('/');\n var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n fileFragments.splice(1, 0, \"v5_2_1m1670858504\");\n srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n return srcFragments.join('/');\n };\n}\n","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t296: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdash_table\"] = self[\"webpackChunkdash_table\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","import 'css.escape'; // polyfill\nimport Environment from 'core/environment';\nimport Logger from 'core/Logger';\nimport DataTable from 'dash-table/dash/DataTable';\nLogger.setDebugLevel(Environment.debugLevel);\nLogger.setLogLevel(Environment.logLevel);\nexport { DataTable };\n"],"names":["leafPrototypes","getProto","inProgress","dataWebpackPrefix","e","window","module","exports","n","t","r","o","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","default","prototype","hasOwnProperty","p","s","u","a","done","Promise","resolve","then","this","arguments","apply","isReady","lazy","setTimeout","regeneratorRuntime","mark","wrap","prev","next","stop","_dashprivate_isLazyComponentReady","f","length","configurable","writable","key","TypeError","dispatchEvent","CustomEvent","addEventListener","removeEventListener","DebugLevel","LogLevel","LogString","__logLevel","__debugLevel","logFn","level","currentLevel","fn","console","log","warn","error","Error","prefix","toUpperCase","logger","setDebugLevel","setLogLevel","defineProperties","trace","info","warning","fatal","debug","freeze","__1day","__20years","CookieStorage","id","domain","path","enabled","expires","Date","now","toUTCString","document","cookie","toLowerCase","split","map","fragments","trim","find","toLocaleLowerCase","entry","delete","R","ret","indexOf","DASH_DEBUG","DASH_LOG","Environment","URL","constructor","location","href","searchParams","_activeEdge","_supportsCssVariables","Boolean","CSS","supports","LazyLoader","hljs","result","DataTable","Suspense","fallback","RealDataTable","props","Component","asyncDecorator","defaultProps","page_action","page_current","page_size","css","filter_query","filter_action","sort_as_null","sort_action","sort_mode","sort_by","style_as_list_view","derived_viewport_data","derived_viewport_indices","derived_viewport_row_ids","derived_viewport_selected_rows","derived_viewport_selected_row_ids","derived_virtual_data","derived_virtual_indices","derived_virtual_row_ids","derived_virtual_selected_rows","derived_virtual_selected_row_ids","dropdown","dropdown_conditional","dropdown_data","fill_width","filter_options","fixed_columns","headers","data","fixed_rows","markdown_options","link_target","html","tooltip","tooltip_conditional","tooltip_data","tooltip_header","tooltip_delay","tooltip_duration","column_selectable","editable","export_columns","export_format","include_headers_on_copy_paste","selected_cells","selected_columns","selected_rows","selected_row_ids","cell_selectable","row_selectable","style_table","style_cell_conditional","style_data_conditional","style_filter_conditional","style_header_conditional","virtualization","persisted_props","persistence_type","propTypes","PropTypes","columns","name","isRequired","type","presentation","selectable","clearable","deletable","hideable","renamable","case","placeholder_text","format","locale","symbol","decimal","group","grouping","numerals","percent","separate_4digits","nully","specifier","on_change","action","failure","validation","allow_null","allow_YY","row_deletable","active_cell","row","column","row_id","column_id","start_cell","end_cell","data_previous","hidden_columns","is_focused","merge_duplicate_headers","data_timestamp","export_headers","page_count","operator","direction","options","label","if","delay","duration","use_with","row_index","locale_format","selector","rule","style_cell","style_data","style_filter","style_header","column_type","state","column_editable","header_index","derived_filter_query_structure","derived_viewport_selected_columns","setProps","loading_state","is_loading","prop_name","component_name","persistence","persistenceTransforms","extract","propValue","storedValue","root","g","escape","cssEscape","codeUnit","string","String","index","firstCodeUnit","charCodeAt","toString","charAt","factory","set1","set2","idx","len1","len2","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","_curryN","received","combined","argsIdx","left","combinedIdx","_isPlaceholder","addIndex","origFn","list","args","Array","slice","isArray","val","obj","_dispatchable","methodNames","transducerCreator","transducer","_reduced","x","init","xf","XAll","all","_xfBase","input","functor","len","XWrap","acc","thisObj","_iterableReduce","iter","step","_methodReduce","methodName","symIterator","iterator","_arrayReduce","reduce","XMap","prop","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","item","keys","nIdx","ks","checkArgsLength","Number","isInteger","offset","XAny","any","el","vals","assocPath","nextObj","arr","concat","rxf","preservingReduced","monad","jlen","j","ilen","undefined","refFrom","refTo","deep","pattern","copy","copiedValue","getPrototypeOf","valueOf","RegExp","source","global","ignoreCase","multiline","sticky","unicode","clone","pred","b","_pipe","methodname","fromIndex","toIndex","Infinity","pipe","reverse","join","compose","_arrayFromIterator","push","_includesWith","is","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_a","_b","_equals","aItem","match","typeA","equals","message","size","entries","values","keysA","extendedStackA","extendedStackB","_indexOf","inf","_includes","_quote","replace","pad","toISOString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","_filter","XFilter","filterable","reject","seen","recur","y","xs","mapPairs","k","sort","test","isNaN","NaN","repr","hasOrAdd","shouldAdd","set","prevSize","_items","_nativeSet","add","has","bIdx","_Set","Set","XFind","found","XFindIndex","XFindLast","last","_path","ifElse","condition","onTrue","onFalse","Math","max","target","elts","flip","_identity","XUniqBy","appliedItem","list1","list2","lookupList","filteredList","assign","output","nextKey","Ctor","getter","setter","toFunctorFn","focus","pathsArray","paths","pathAr","names","once","called","ps","_isNumber","from","to","RangeError","Identity","lens","v","fns","pairs","outerlist","innerlist","rv","min","_curry1","f1","_curry2","f2","_curry3","f3","_c","remove","start","count","splice","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__proto__","mode","ns","def","current","getOwnPropertyNames","forEach","definition","chunkId","promises","globalThis","Function","url","script","needAttach","scripts","getElementsByTagName","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","head","appendChild","scriptUrl","importScripts","currentScript","getCurrentScript","doc_scripts","filter","async","text","textContent","jsonpScriptSrc","__jsonpScriptSrc__","isLocal","srcFragments","fileFragments","installedChunks","installedChunkData","promise","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","Logger"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"bundle.js","mappings":"gBACIA,EADAC,ECAAC,EACAC,E,wBCDwR,IAAUC,EAAjBC,OAApNC,EAAOC,SAA8NH,EAApN,EAAQ,MAAsN,SAASA,GAAG,IAAII,EAAE,CAAC,EAAE,SAASC,EAAEC,G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,iBACb5H,EAAM8H,KAAO8X,EACb5f,EAAM8f,QAAUD,EAChBH,EAAmB,GAAG1f,EACvB,CAEF,GACyC,SAAWid,EAASA,EAE/D,CAEH,EAaA,IAAI8C,EAAuB,SAASC,EAA4Bra,GAC/D,IAKI2W,EAAUW,EALVgD,EAAWta,EAAK,GAChBua,EAAcva,EAAK,GACnBwa,EAAUxa,EAAK,GAGIzJ,EAAI,EAC3B,GAAG+jB,EAASG,MAAK,SAASnf,GAAM,OAA+B,IAAxBwe,EAAgBxe,EAAW,IAAI,CACrE,IAAIqb,KAAY4D,EACZ7D,EAAoBpgB,EAAEikB,EAAa5D,KACrCD,EAAoBhgB,EAAEigB,GAAY4D,EAAY5D,IAG7C6D,GAAsBA,EAAQ9D,EAClC,CAEA,IADG2D,GAA4BA,EAA2Bra,GACrDzJ,EAAI+jB,EAASthB,OAAQzC,IACzB+gB,EAAUgD,EAAS/jB,GAChBmgB,EAAoBpgB,EAAEwjB,EAAiBxC,IAAYwC,EAAgBxC,IACrEwC,EAAgBxC,GAAS,KAE1BwC,EAAgBxC,GAAW,CAG7B,EAEIoD,EAAqBC,KAA6B,uBAAIA,KAA6B,wBAAK,GAC5FD,EAAmBtD,QAAQgD,EAAqB9iB,KAAK,KAAM,IAC3DojB,EAAmB9L,KAAOwL,EAAqB9iB,KAAK,KAAMojB,EAAmB9L,KAAKtX,KAAKojB,G,ICvFvFhE,EAAoByB,QAAKpL,E,8HCIzB6N,EAAAA,GAAAA,cAAqB9d,EAAAA,EAAAA,YACrB8d,EAAAA,GAAAA,YAAmB9d,EAAAA,EAAAA,S","sources":["webpack://dash_table/webpack/runtime/create fake namespace object","webpack://dash_table/webpack/runtime/load script","webpack://dash_table/./node_modules/@plotly/dash-component-plugins/dist/index.js","webpack://dash_table/./src/core/Logger/DebugLevel.ts","webpack://dash_table/./src/core/Logger/LogLevel.ts","webpack://dash_table/./src/core/Logger/index.ts","webpack://dash_table/./src/core/storage/Cookie.ts","webpack://dash_table/./src/core/environment/index.ts","webpack://dash_table/./src/dash-table/LazyLoader.ts","webpack://dash_table/./src/dash-table/dash/DataTable.js","webpack://dash_table/./node_modules/css.escape/css.escape.js","webpack://dash_table/external window \"PropTypes\"","webpack://dash_table/external window \"React\"","webpack://dash_table/external window \"ReactDOM\"","webpack://dash_table/./node_modules/ramda/es/internal/_concat.js","webpack://dash_table/./node_modules/ramda/es/internal/_arity.js","webpack://dash_table/./node_modules/ramda/es/internal/_curryN.js","webpack://dash_table/./node_modules/ramda/es/curryN.js","webpack://dash_table/./node_modules/ramda/es/addIndex.js","webpack://dash_table/./node_modules/ramda/es/internal/_isArray.js","webpack://dash_table/./node_modules/ramda/es/internal/_isTransformer.js","webpack://dash_table/./node_modules/ramda/es/internal/_dispatchable.js","webpack://dash_table/./node_modules/ramda/es/internal/_reduced.js","webpack://dash_table/./node_modules/ramda/es/internal/_xfBase.js","webpack://dash_table/./node_modules/ramda/es/internal/_xall.js","webpack://dash_table/./node_modules/ramda/es/all.js","webpack://dash_table/./node_modules/ramda/es/internal/_map.js","webpack://dash_table/./node_modules/ramda/es/internal/_isString.js","webpack://dash_table/./node_modules/ramda/es/internal/_isArrayLike.js","webpack://dash_table/./node_modules/ramda/es/internal/_xwrap.js","webpack://dash_table/./node_modules/ramda/es/bind.js","webpack://dash_table/./node_modules/ramda/es/internal/_reduce.js","webpack://dash_table/./node_modules/ramda/es/internal/_xmap.js","webpack://dash_table/./node_modules/ramda/es/internal/_has.js","webpack://dash_table/./node_modules/ramda/es/internal/_isArguments.js","webpack://dash_table/./node_modules/ramda/es/keys.js","webpack://dash_table/./node_modules/ramda/es/map.js","webpack://dash_table/./node_modules/ramda/es/internal/_isInteger.js","webpack://dash_table/./node_modules/ramda/es/nth.js","webpack://dash_table/./node_modules/ramda/es/prop.js","webpack://dash_table/./node_modules/ramda/es/pluck.js","webpack://dash_table/./node_modules/ramda/es/reduce.js","webpack://dash_table/./node_modules/ramda/es/internal/_xany.js","webpack://dash_table/./node_modules/ramda/es/any.js","webpack://dash_table/./node_modules/ramda/es/append.js","webpack://dash_table/./node_modules/ramda/es/values.js","webpack://dash_table/./node_modules/ramda/es/isNil.js","webpack://dash_table/./node_modules/ramda/es/assocPath.js","webpack://dash_table/./node_modules/ramda/es/internal/_assoc.js","webpack://dash_table/./node_modules/ramda/es/assoc.js","webpack://dash_table/./node_modules/ramda/es/internal/_xchain.js","webpack://dash_table/./node_modules/ramda/es/internal/_flatCat.js","webpack://dash_table/./node_modules/ramda/es/internal/_forceReduced.js","webpack://dash_table/./node_modules/ramda/es/chain.js","webpack://dash_table/./node_modules/ramda/es/internal/_makeFlat.js","webpack://dash_table/./node_modules/ramda/es/type.js","webpack://dash_table/./node_modules/ramda/es/internal/_clone.js","webpack://dash_table/./node_modules/ramda/es/internal/_cloneRegExp.js","webpack://dash_table/./node_modules/ramda/es/clone.js","webpack://dash_table/./node_modules/ramda/es/comparator.js","webpack://dash_table/./node_modules/ramda/es/internal/_pipe.js","webpack://dash_table/./node_modules/ramda/es/internal/_checkForMethod.js","webpack://dash_table/./node_modules/ramda/es/slice.js","webpack://dash_table/./node_modules/ramda/es/tail.js","webpack://dash_table/./node_modules/ramda/es/pipe.js","webpack://dash_table/./node_modules/ramda/es/reverse.js","webpack://dash_table/./node_modules/ramda/es/compose.js","webpack://dash_table/./node_modules/ramda/es/internal/_isFunction.js","webpack://dash_table/./node_modules/ramda/es/internal/_arrayFromIterator.js","webpack://dash_table/./node_modules/ramda/es/internal/_includesWith.js","webpack://dash_table/./node_modules/ramda/es/internal/_objectIs.js","webpack://dash_table/./node_modules/ramda/es/internal/_equals.js","webpack://dash_table/./node_modules/ramda/es/internal/_functionName.js","webpack://dash_table/./node_modules/ramda/es/equals.js","webpack://dash_table/./node_modules/ramda/es/internal/_indexOf.js","webpack://dash_table/./node_modules/ramda/es/internal/_includes.js","webpack://dash_table/./node_modules/ramda/es/internal/_quote.js","webpack://dash_table/./node_modules/ramda/es/internal/_toISOString.js","webpack://dash_table/./node_modules/ramda/es/internal/_filter.js","webpack://dash_table/./node_modules/ramda/es/internal/_xfilter.js","webpack://dash_table/./node_modules/ramda/es/filter.js","webpack://dash_table/./node_modules/ramda/es/internal/_isObject.js","webpack://dash_table/./node_modules/ramda/es/reject.js","webpack://dash_table/./node_modules/ramda/es/internal/_complement.js","webpack://dash_table/./node_modules/ramda/es/internal/_toString.js","webpack://dash_table/./node_modules/ramda/es/toString.js","webpack://dash_table/./node_modules/ramda/es/concat.js","webpack://dash_table/./node_modules/ramda/es/max.js","webpack://dash_table/./node_modules/ramda/es/internal/_Set.js","webpack://dash_table/./node_modules/ramda/es/last.js","webpack://dash_table/./node_modules/ramda/es/internal/_xfind.js","webpack://dash_table/./node_modules/ramda/es/find.js","webpack://dash_table/./node_modules/ramda/es/internal/_xfindIndex.js","webpack://dash_table/./node_modules/ramda/es/findIndex.js","webpack://dash_table/./node_modules/ramda/es/internal/_xfindLast.js","webpack://dash_table/./node_modules/ramda/es/findLast.js","webpack://dash_table/./node_modules/ramda/es/forEach.js","webpack://dash_table/./node_modules/ramda/es/hasPath.js","webpack://dash_table/./node_modules/ramda/es/has.js","webpack://dash_table/./node_modules/ramda/es/head.js","webpack://dash_table/./node_modules/ramda/es/ifElse.js","webpack://dash_table/./node_modules/ramda/es/includes.js","webpack://dash_table/./node_modules/ramda/es/indexOf.js","webpack://dash_table/./node_modules/ramda/es/insertAll.js","webpack://dash_table/./node_modules/ramda/es/flip.js","webpack://dash_table/./node_modules/ramda/es/internal/_identity.js","webpack://dash_table/./node_modules/ramda/es/identity.js","webpack://dash_table/./node_modules/ramda/es/internal/_xuniqBy.js","webpack://dash_table/./node_modules/ramda/es/uniq.js","webpack://dash_table/./node_modules/ramda/es/uniqBy.js","webpack://dash_table/./node_modules/ramda/es/intersection.js","webpack://dash_table/./node_modules/ramda/es/internal/_objectAssign.js","webpack://dash_table/./node_modules/ramda/es/is.js","webpack://dash_table/./node_modules/ramda/es/keysIn.js","webpack://dash_table/./node_modules/ramda/es/lens.js","webpack://dash_table/./node_modules/ramda/es/paths.js","webpack://dash_table/./node_modules/ramda/es/path.js","webpack://dash_table/./node_modules/ramda/es/lensPath.js","webpack://dash_table/./node_modules/ramda/es/sum.js","webpack://dash_table/./node_modules/ramda/es/add.js","webpack://dash_table/./node_modules/ramda/es/mergeAll.js","webpack://dash_table/./node_modules/ramda/es/mergeRight.js","webpack://dash_table/./node_modules/ramda/es/min.js","webpack://dash_table/./node_modules/ramda/es/omit.js","webpack://dash_table/./node_modules/ramda/es/once.js","webpack://dash_table/./node_modules/ramda/es/pick.js","webpack://dash_table/./node_modules/ramda/es/props.js","webpack://dash_table/./node_modules/ramda/es/internal/_isNumber.js","webpack://dash_table/./node_modules/ramda/es/range.js","webpack://dash_table/./node_modules/ramda/es/reduceWhile.js","webpack://dash_table/./node_modules/ramda/es/always.js","webpack://dash_table/./node_modules/ramda/es/times.js","webpack://dash_table/./node_modules/ramda/es/repeat.js","webpack://dash_table/./node_modules/ramda/es/over.js","webpack://dash_table/./node_modules/ramda/es/set.js","webpack://dash_table/./node_modules/ramda/es/sortWith.js","webpack://dash_table/./node_modules/ramda/es/toPairs.js","webpack://dash_table/./node_modules/ramda/es/transpose.js","webpack://dash_table/./node_modules/ramda/es/union.js","webpack://dash_table/./node_modules/ramda/es/trim.js","webpack://dash_table/./node_modules/ramda/es/unnest.js","webpack://dash_table/./node_modules/ramda/es/without.js","webpack://dash_table/./node_modules/ramda/es/xprod.js","webpack://dash_table/./node_modules/ramda/es/zip.js","webpack://dash_table/./node_modules/ramda/es/zipWith.js","webpack://dash_table/./node_modules/ramda/es/internal/_curry1.js","webpack://dash_table/./node_modules/ramda/es/internal/_curry2.js","webpack://dash_table/./node_modules/ramda/es/internal/_curry3.js","webpack://dash_table/./node_modules/ramda/es/internal/_isPlaceholder.js","webpack://dash_table/./node_modules/ramda/es/remove.js","webpack://dash_table/webpack/bootstrap","webpack://dash_table/webpack/runtime/compat get default export","webpack://dash_table/webpack/runtime/define property getters","webpack://dash_table/webpack/runtime/ensure chunk","webpack://dash_table/webpack/runtime/get javascript chunk filename","webpack://dash_table/webpack/runtime/global","webpack://dash_table/webpack/runtime/hasOwnProperty shorthand","webpack://dash_table/webpack/runtime/make namespace object","webpack://dash_table/webpack/runtime/publicPath","webpack://dash_table/webpack/runtime/compat","webpack://dash_table/webpack/runtime/jsonp chunk loading","webpack://dash_table/webpack/runtime/nonce","webpack://dash_table/./src/dash-table/index.ts"],"sourcesContent":["var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"dash_table:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","!function(e,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],n):\"object\"==typeof exports?exports[\"dash-component-plugins\"]=n(require(\"react\")):e[\"dash-component-plugins\"]=n(e.React)}(window,(function(e){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&n&&\"string\"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p=\"\",t(t.s=1)}([function(n,t){n.exports=e},function(e,n,t){\"use strict\";t.r(n),t.d(n,\"asyncDecorator\",(function(){return u})),t.d(n,\"inheritAsyncDecorator\",(function(){return a})),t.d(n,\"isReady\",(function(){return c})),t.d(n,\"History\",(function(){return d}));var r=t(0);function o(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=e.apply(n,t);function a(e){o(u,r,i,a,c,\"next\",e)}function c(e){o(u,r,i,a,c,\"throw\",e)}a(void 0)}))}}var u=function(e,n){var t,o={isReady:new Promise((function(e){t=e})),get:Object(r.lazy)((function(){return Promise.resolve(n()).then((function(e){return setTimeout(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(!0);case 2:o.isReady=!0;case 3:case\"end\":return e.stop()}}),e)}))),0),e}))}))};return Object.defineProperty(e,\"_dashprivate_isLazyComponentReady\",{get:function(){return o.isReady}}),o.get},a=function(e,n){Object.defineProperty(e,\"_dashprivate_isLazyComponentReady\",{get:function(){return c(n)}})},c=function(e){return e&&e._dashprivate_isLazyComponentReady};function f(e,n){for(var t=0;t { };\n }\n let fn;\n let fnStyle = '';\n switch (level) {\n case LogLevel.TRACE:\n case LogLevel.INFO:\n fn = window.console.log;\n fnStyle = 'color: white; background-color: #3166A2;';\n break;\n case DebugLevel.DEBUG:\n case LogLevel.WARNING:\n fn = window.console.warn;\n fnStyle = 'color: white; background-color: #E9B606;';\n break;\n case LogLevel.ERROR:\n case LogLevel.FATAL:\n fn = window.console.error;\n fnStyle = 'color: white; background-color: #FF0000;';\n break;\n default:\n throw new Error(`Unknown log ${level}`);\n }\n const prefix = `${fnStyle && __highlightPrefix ? '%c' : ''}[${LogString[level].toUpperCase()}]`;\n if (fnStyle && __highlightPrefix) {\n return fn.bind(window.console, prefix, fnStyle);\n }\n else {\n return fn.bind(window.console, prefix);\n }\n}\nconst logger = {\n setDebugLevel(level) {\n __debugLevel = level;\n },\n setLogLevel(level) {\n __logLevel = level;\n }\n};\nObject.defineProperties(logger, {\n trace: {\n get: () => {\n return logFn(LogLevel.TRACE, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n info: {\n get: () => {\n return logFn(LogLevel.INFO, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n warning: {\n get: () => {\n return logFn(LogLevel.WARNING, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n error: {\n get: () => {\n return logFn(LogLevel.ERROR, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n fatal: {\n get: () => {\n return logFn(LogLevel.FATAL, __logLevel);\n },\n configurable: false,\n enumerable: false\n },\n debug: {\n get: () => {\n return logFn(DebugLevel.DEBUG, __debugLevel);\n },\n configurable: false,\n enumerable: false\n }\n});\nObject.freeze(logger);\nexport default logger;\nexport { DebugLevel, LogLevel };\n","import * as R from 'ramda';\nconst __1day = 86400 * 1000;\nconst __20years = 86400 * 1000 * 365 * 20;\nexport default class CookieStorage {\n // From https://github.com/Modernizr/Modernizr/blob/f4d3aa0b3c9eeb7338e8d89ed77929a8e969c502/feature-detects/cookies.js#L1\n // try..catch because some in situations `document.cookie` is exposed but throws a\n // SecurityError if you try to access it; e.g. documents created from data URIs\n // or in sandboxed iframes (depending on flags/context)\n static enabled = R.once(() => {\n try {\n // Create cookie\n document.cookie = 'cookietest=1';\n const ret = document.cookie.indexOf('cookietest=') !== -1;\n // Delete cookie\n document.cookie =\n 'cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT';\n return ret;\n }\n catch (e) {\n return false;\n }\n });\n static delete(id, domain = '', path = '/') {\n if (!CookieStorage.enabled()) {\n return;\n }\n const expires = new Date(Date.now() - __1day).toUTCString();\n document.cookie = `${id}=;expires=${expires};domain=${domain};path=${path}`;\n }\n static get(id) {\n if (!id.length) {\n return;\n }\n if (!CookieStorage.enabled()) {\n return;\n }\n id = id.toLowerCase();\n const cookies = document.cookie.split(';').map(cookie => {\n const fragments = cookie.split('=');\n return {\n id: fragments[0].trim(),\n value: fragments[1]\n };\n });\n return (cookies.find(cookie => id === cookie.id.toLocaleLowerCase()) ||\n {}).value;\n }\n static set(id, value, domain = '', path = '/') {\n if (!CookieStorage.enabled()) {\n return;\n }\n const expires = new Date(Date.now() + __20years).toUTCString();\n const entry = `${id}=${value};expires=${expires};domain=${domain};path=${path}`;\n if (CookieStorage.get(id)) {\n CookieStorage.delete(id, domain, path);\n }\n document.cookie = entry;\n }\n}\n","import CookieStorage from 'core/storage/Cookie';\nimport { DebugLevel, LogLevel } from 'core/Logger';\nconst DASH_DEBUG = 'dash_debug';\nconst DASH_LOG = 'dash_log';\nexport default class Environment {\n static _supportsCssVariables = Boolean(window.CSS?.supports?.('.some-selector', 'var(--some-var)'));\n static _activeEdge = Environment._supportsCssVariables\n ? '1px solid var(--accent)'\n : '1px solid hotpink';\n static get searchParams() {\n return ((typeof URL !== 'undefined' &&\n URL.prototype &&\n URL.prototype.constructor &&\n new URL(window.location.href).searchParams) || { get: () => null });\n }\n static get debugLevel() {\n const debug = this.searchParams.get(DASH_DEBUG) || CookieStorage.get(DASH_DEBUG);\n return debug\n ? DebugLevel[debug] || DebugLevel.NONE\n : DebugLevel.NONE;\n }\n static get logLevel() {\n const log = this.searchParams.get(DASH_LOG) || CookieStorage.get(DASH_LOG);\n return log ? LogLevel[log] || LogLevel.ERROR : LogLevel.ERROR;\n }\n static get defaultEdge() {\n return '1px solid #d3d3d3';\n }\n static get activeEdge() {\n return Environment._activeEdge;\n }\n static get supportsCssVariables() {\n return Environment._supportsCssVariables;\n }\n}\n","export default class LazyLoader {\n static get xlsx() {\n return import(\n /* webpackChunkName: \"export\", webpackMode: \"lazy\" */ 'xlsx');\n }\n static get hljs() {\n return Promise.resolve(window.hljs ||\n import(\n /* webpackChunkName: \"highlight\", webpackMode: \"lazy\" */ '../third-party/highlight.js').then(result => result.default));\n }\n static table() {\n return import(\n /* webpackChunkName: \"table\", webpackMode: \"lazy\" */ 'dash-table/dash/fragments/DataTable');\n }\n}\n","\nimport * as R from 'ramda';\nimport React, {Component, Suspense} from 'react';\nimport PropTypes from 'prop-types';\nimport {asyncDecorator} from '@plotly/dash-component-plugins';\nimport LazyLoader from 'dash-table/LazyLoader';\n/**\n * Dash DataTable is an interactive table component designed for\n * viewing, editing, and exploring large datasets.\n * DataTable is rendered with standard, semantic HTML
markup,\n * which makes it accessible, responsive, and easy to style. This\n * component was written from scratch in React.js specifically for the\n * Dash community. Its API was designed to be ergonomic and its behavior\n * is completely customizable through its properties.\n */\nexport default class DataTable extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\nconst RealDataTable = asyncDecorator(DataTable, LazyLoader.table);\nexport const defaultProps = {\n page_action: 'native',\n page_current: 0,\n page_size: 250,\n css: [],\n filter_query: '',\n filter_action: 'none',\n sort_as_null: [],\n sort_action: 'none',\n sort_mode: 'single',\n sort_by: [],\n style_as_list_view: false,\n derived_viewport_data: [],\n derived_viewport_indices: [],\n derived_viewport_row_ids: [],\n derived_viewport_selected_rows: [],\n derived_viewport_selected_row_ids: [],\n derived_virtual_data: [],\n derived_virtual_indices: [],\n derived_virtual_row_ids: [],\n derived_virtual_selected_rows: [],\n derived_virtual_selected_row_ids: [],\n dropdown: {},\n dropdown_conditional: [],\n dropdown_data: [],\n fill_width: true,\n filter_options: {},\n fixed_columns: {\n headers: false,\n data: 0\n },\n fixed_rows: {\n headers: false,\n data: 0\n },\n markdown_options: {\n link_target: '_blank',\n html: false\n },\n tooltip: {},\n tooltip_conditional: [],\n tooltip_data: [],\n tooltip_header: {},\n tooltip_delay: 350,\n tooltip_duration: 2000,\n column_selectable: false,\n editable: false,\n export_columns: 'visible',\n export_format: 'none',\n include_headers_on_copy_paste: false,\n selected_cells: [],\n selected_columns: [],\n selected_rows: [],\n selected_row_ids: [],\n cell_selectable: true,\n row_selectable: false,\n style_table: {},\n style_cell_conditional: [],\n style_data_conditional: [],\n style_filter_conditional: [],\n style_header_conditional: [],\n virtualization: false,\n persisted_props: [\n 'columns.name',\n 'filter_query',\n 'hidden_columns',\n 'page_current',\n 'selected_columns',\n 'selected_rows',\n 'sort_by'\n ],\n persistence_type: 'local'\n};\nexport const propTypes = {\n /**\n * The contents of the table.\n * The keys of each item in data should match the column IDs.\n * Each item can also have an 'id' key, whose value is its row ID. If there\n * is a column with ID='id' this will display the row ID, otherwise it is\n * just used to reference the row for selections, filtering, etc.\n * Example:\n * [\n * {'column-1': 4.5, 'column-2': 'montreal', 'column-3': 'canada'},\n * {'column-1': 8, 'column-2': 'boston', 'column-3': 'america'}\n * ]\n */\n data: PropTypes.arrayOf(\n PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool\n ])\n )\n ),\n /**\n * Columns describes various aspects about each individual column.\n * `name` and `id` are the only required parameters.\n */\n columns: PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The `id` of the column.\n * The column `id` is used to match cells in data with particular columns.\n * The `id` is not visible in the table.\n */\n id: PropTypes.string.isRequired,\n /**\n * The `name` of the column, as it appears in the column header.\n * If `name` is a list of strings, then the columns\n * will render with multiple headers rows.\n */\n name: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]).isRequired,\n /**\n * The data-type provides support for per column typing and allows for data\n * validation and coercion.\n * 'numeric': represents both floats and ints.\n * 'text': represents a string.\n * 'datetime': a string representing a date or date-time, in the form:\n * 'YYYY-MM-DD HH:MM:SS.ssssss' or some truncation thereof. Years must\n * have 4 digits, unless you use `validation.allow_YY: true`. Also\n * accepts 'T' or 't' between date and time, and allows timezone info\n * at the end. To convert these strings to Python `datetime` objects,\n * use `dateutil.parser.isoparse`. In R use `parse_iso_8601` from the\n * `parsedate` library.\n * WARNING: these parsers do not work with 2-digit years, if you use\n * `validation.allow_YY: true` and do not coerce to 4-digit years.\n * And parsers that do work with 2-digit years may make a different\n * guess about the century than we make on the front end.\n * 'any': represents any type of data.\n * Defaults to 'any' if undefined.\n *\n *\n */\n type: PropTypes.oneOf(['any', 'numeric', 'text', 'datetime']),\n /**\n * The `presentation` to use to display data. Markdown can be used on\n * columns with type 'text'. See 'dropdown' for more info.\n * Defaults to 'input' for ['datetime', 'numeric', 'text', 'any'].\n */\n presentation: PropTypes.oneOf(['input', 'dropdown', 'markdown']),\n /**\n * If true, the user can select the column by clicking on the checkbox or radio button\n * in the column. If there are multiple header rows, true will display the input\n * on each row.\n * If `last`, the input will only appear on the last header row. If `first` it will only\n * appear on the first header row. These are respectively shortcut equivalents to\n * `[false, ..., false, true]` and `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose which column header\n * row to display the input in by supplying an array of booleans.\n * For example, `[true, false]` will display the `selectable` input on the first row,\n * but now on the second row.\n * If the `selectable` input appears on a merged columns, then clicking on that input\n * will select *all* of the merged columns associated with it.\n * The table-level prop `column_selectable` is used to determine the type of column\n * selection to use.\n *\n */\n selectable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * If true, the user can clear the column by clicking on the `clear`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `clear` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `clear` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `clear` action button\n * on the first row, but not the second row.\n * If the `clear` action button appears on a merged column, then clicking\n * on that button will clear *all* of the merged columns associated with it.\n * Unlike `column.deletable`, this action does not remove the column(s)\n * from the table. It only removed the associated entries from `data`.\n */\n clearable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * If true, the user can remove the column by clicking on the `delete`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `delete` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `delete` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `delete` action button\n * on the first row, but not the second row.\n * If the `delete` action button appears on a merged column, then clicking\n * on that button will remove *all* of the merged columns associated with it.\n */\n deletable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * There are two `editable` flags in the table.\n * This is the column-level editable flag and there is\n * also the table-level `editable` flag.\n * These flags determine whether the contents of the table\n * are editable or not.\n * If the column-level `editable` flag is set it overrides\n * the table-level `editable` flag for that column.\n */\n editable: PropTypes.bool,\n /**\n * If true, the user can hide the column by clicking on the `hide`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `hide` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `hide` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `hide` action button\n * on the first row, but not the second row.\n * If the `hide` action button appears on a merged column, then clicking\n * on that button will hide *all* of the merged columns associated with it.\n */\n hideable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * If true, the user can rename the column by clicking on the `rename`\n * action button on the column. If there are multiple header rows, true\n * will display the action button on each row.\n * If `last`, the `rename` action button will only appear on the last header\n * row. If `first` it will only appear on the first header row. These\n * are respectively shortcut equivalents to `[false, ..., false, true]` and\n * `[true, false, ..., false]`.\n * If there are merged, multi-header columns then you can choose\n * which column header row to display the `rename` action button in by\n * supplying an array of booleans.\n * For example, `[true, false]` will display the `rename` action button\n * on the first row, but not the second row.\n * If the `rename` action button appears on a merged column, then clicking\n * on that button will rename *all* of the merged columns associated with it.\n */\n renamable: PropTypes.oneOfType([\n PropTypes.oneOf(['first', 'last']),\n PropTypes.bool,\n PropTypes.arrayOf(PropTypes.bool)\n ]),\n /**\n * There are two `filter_options` props in the table.\n * This is the column-level filter_options prop and there is\n * also the table-level `filter_options` prop.\n * If the column-level `filter_options` prop is set it overrides\n * the table-level `filter_options` prop for that column.\n */\n filter_options: PropTypes.shape({\n /**\n * (default: 'sensitive') Determine whether the applicable filter relational operators will default to `sensitive` or `insensitive` comparison.\n */\n case: PropTypes.oneOf(['sensitive', 'insensitive']),\n /**\n * (default: 'filter data...') The filter cell placeholder text.\n */\n placeholder_text: PropTypes.string\n }),\n /**\n * The formatting applied to the column's data.\n * This prop is derived from the [d3-format](https://github.com/d3/d3-format) library specification. Apart from\n * being structured slightly differently (under a single prop), the usage is the same.\n * See also dash_table.FormatTemplate. It contains helper functions for typical number formats.\n */\n format: PropTypes.exact({\n /**\n * Represents localization specific formatting information.\n * When left unspecified, will use the default value provided by d3-format.\n */\n locale: PropTypes.exact({\n /**\n * (default: ['$', '']). A list of two strings representing the\n * prefix and suffix symbols. Typically used for currency, and implemented using d3's\n * currency format, but you can use this for other symbols such as measurement units\n */\n symbol: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '.'). The string used for the decimal separator\n */\n decimal: PropTypes.string,\n /**\n * (default: ','). The string used for the groups separator\n */\n group: PropTypes.string,\n /**\n * (default: [3]). A list of integers representing the grouping pattern. The default is\n * 3 for thousands.\n */\n grouping: PropTypes.arrayOf(PropTypes.number),\n /**\n * A list of ten strings used as replacements for numbers 0-9\n */\n numerals: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '%'). The string used for the percentage symbol\n */\n percent: PropTypes.string,\n /**\n * (default: True). Separates integers with 4-digits or less\n */\n separate_4digits: PropTypes.bool\n }),\n /**\n * A value that will be used in place of the nully value during formatting.\n * If the value type matches the column type, it will be formatted normally.\n */\n nully: PropTypes.any,\n /**\n * A number representing the SI unit to use during formatting.\n * See `dash_table.Format.Prefix` enumeration for the list of valid values\n */\n prefix: PropTypes.number,\n /**\n * (default: ''). Represents the d3 rules to apply when formatting the number.\n */\n specifier: PropTypes.string\n }),\n /**\n * The `on_change` behavior of the column for user-initiated modifications.\n */\n on_change: PropTypes.exact({\n /**\n * (default 'coerce'): 'none': do not validate data;\n * 'coerce': check if the data corresponds to the destination type and\n * attempts to coerce it into the destination type if not;\n * 'validate': check if the data corresponds to the destination type (no coercion).\n */\n action: PropTypes.oneOf(['coerce', 'none', 'validate']),\n /**\n * (default 'reject'): What to do with the value if the action fails.\n * 'accept': use the invalid value;\n * 'default': replace the provided value with `validation.default`;\n * 'reject': do not modify the existing value.\n */\n failure: PropTypes.oneOf(['accept', 'default', 'reject'])\n }),\n /**\n * An array of string, number and boolean values that are treated as `null`\n * (i.e. ignored and always displayed last) when sorting.\n * This value overrides the table-level `sort_as_null`.\n */\n sort_as_null: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool\n ])\n ),\n /**\n * The `validation` options for user input processing that can accept, reject or apply a\n * default value.\n */\n validation: PropTypes.exact({\n /**\n * Allow the use of nully values. (undefined, null, NaN) (default: False)\n */\n allow_null: PropTypes.bool,\n /**\n * The default value to apply with on_change.failure = 'default'. (default: None)\n */\n default: PropTypes.any,\n /**\n * This is for `datetime` columns only. Allow 2-digit years (default: False).\n * If True, we interpret years as ranging from now-70 to now+29 - in 2019\n * this is 1949 to 2048 but in 2020 it will be different. If used with\n * `action: 'coerce'`, will convert user input to a 4-digit year.\n */\n allow_YY: PropTypes.bool\n })\n })\n ),\n /**\n * If True, then the data in all of the cells is editable.\n * When `editable` is True, particular columns can be made\n * uneditable by setting `editable` to `False` inside the `columns`\n * property.\n * If False, then the data in all of the cells is uneditable.\n * When `editable` is False, particular columns can be made\n * editable by setting `editable` to `True` inside the `columns`\n * property.\n */\n editable: PropTypes.bool,\n /**\n * `fixed_columns` will \"fix\" the set of columns so that\n * they remain visible when scrolling horizontally across\n * the unfixed columns. `fixed_columns` fixes columns\n * from left-to-right.\n * If `headers` is False, no columns are fixed.\n * If `headers` is True, all operation columns (see `row_deletable` and `row_selectable`)\n * are fixed. Additional data columns can be fixed by\n * assigning a number to `data`.\n *\n * Note that fixing columns introduces some changes to the\n * underlying markup of the table and may impact the\n * way that your columns are rendered or sized.\n * View the documentation examples to learn more.\n *\n */\n fixed_columns: PropTypes.oneOfType([\n PropTypes.exact({\n /**\n * Example `{'headers':False, 'data':0}` No columns are fixed (the default)\n */\n data: PropTypes.oneOf([0]),\n headers: PropTypes.oneOf([false])\n }),\n PropTypes.exact({\n /**\n * Example `{'headers':True, 'data':1}` one column is fixed.\n */\n data: PropTypes.number,\n headers: PropTypes.oneOf([true]).isRequired\n })\n ]),\n /**\n * `fixed_rows` will \"fix\" the set of rows so that\n * they remain visible when scrolling vertically down\n * the table. `fixed_rows` fixes rows\n * from top-to-bottom, starting from the headers.\n * If `headers` is False, no rows are fixed.\n * If `headers` is True, all header and filter rows (see `filter_action`) are\n * fixed. Additional data rows can be fixed by assigning\n * a number to `data`. Note that fixing rows introduces some changes to the\n * underlying markup of the table and may impact the\n * way that your columns are rendered or sized.\n * View the documentation examples to learn more.\n */\n fixed_rows: PropTypes.oneOfType([\n PropTypes.exact({\n /**\n * Example `{'headers':False, 'data':0}` No rows are fixed (the default)\n */\n data: PropTypes.oneOf([0]),\n headers: PropTypes.oneOf([false])\n }),\n PropTypes.exact({\n /**\n * Example `{'headers':True, 'data':1}` one row is fixed.\n */\n data: PropTypes.number,\n headers: PropTypes.oneOf([true]).isRequired\n })\n ]),\n /**\n * If `single`, then the user can select a single column or group\n * of merged columns via the radio button that will appear in the\n * header rows.\n * If `multi`, then the user can select multiple columns or groups\n * of merged columns via the checkbox that will appear in the header\n * rows.\n * If false, then the user will not be able to select columns and no\n * input will appear in the header rows.\n * When a column is selected, its id will be contained in `selected_columns`\n * and `derived_viewport_selected_columns`.\n */\n column_selectable: PropTypes.oneOf(['single', 'multi', false]),\n /**\n * If True (default), then it is possible to click and navigate\n * table cells.\n */\n cell_selectable: PropTypes.bool,\n /**\n * If `single`, then the user can select a single row\n * via a radio button that will appear next to each row.\n * If `multi`, then the user can select multiple rows\n * via a checkbox that will appear next to each row.\n * If false, then the user will not be able to select rows\n * and no additional UI elements will appear.\n * When a row is selected, its index will be contained\n * in `selected_rows`.\n */\n row_selectable: PropTypes.oneOf(['single', 'multi', false]),\n /**\n * If True, then a `x` will appear next to each `row`\n * and the user can delete the row.\n */\n row_deletable: PropTypes.bool,\n /**\n * The row and column indices and IDs of the currently active cell.\n * `row_id` is only returned if the data rows have an `id` key.\n */\n active_cell: PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n }),\n /**\n * `selected_cells` represents the set of cells that are selected,\n * as an array of objects, each item similar to `active_cell`.\n * Multiple cells can be selected by holding down shift and\n * clicking on a different cell or holding down shift and navigating\n * with the arrow keys.\n */\n selected_cells: PropTypes.arrayOf(\n PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n })\n ),\n /**\n * `selected_rows` contains the indices of rows that\n * are selected via the UI elements that appear when\n * `row_selectable` is `'single'` or `'multi'`.\n */\n selected_rows: PropTypes.arrayOf(PropTypes.number),\n /**\n * `selected_columns` contains the ids of columns that\n * are selected via the UI elements that appear when\n * `column_selectable` is `'single' or 'multi'`.\n */\n selected_columns: PropTypes.arrayOf(PropTypes.string),\n /**\n * `selected_row_ids` contains the ids of rows that\n * are selected via the UI elements that appear when\n * `row_selectable` is `'single'` or `'multi'`.\n */\n selected_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * When selecting multiple cells\n * (via clicking on a cell and then shift-clicking on another cell),\n * `start_cell` represents the [row, column] coordinates of the cell\n * in one of the corners of the region.\n * `end_cell` represents the coordinates of the other corner.\n */\n start_cell: PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n }),\n /**\n * When selecting multiple cells\n * (via clicking on a cell and then shift-clicking on another cell),\n * `end_cell` represents the row / column coordinates and IDs of the cell\n * in one of the corners of the region.\n * `start_cell` represents the coordinates of the other corner.\n */\n end_cell: PropTypes.exact({\n row: PropTypes.number,\n column: PropTypes.number,\n row_id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n column_id: PropTypes.string\n }),\n /**\n * The previous state of `data`. `data_previous`\n * has the same structure as `data` and it will be updated\n * whenever `data` changes, either through a callback or\n * by editing the table.\n * This is a read-only property: setting this property will not\n * have any impact on the table.\n */\n data_previous: PropTypes.arrayOf(PropTypes.object),\n /**\n * List of columns ids of the columns that are currently hidden.\n * See the associated nested prop `columns.hideable`.\n */\n hidden_columns: PropTypes.arrayOf(PropTypes.string),\n /**\n * If True, then the `active_cell` is in a focused state.\n */\n is_focused: PropTypes.bool,\n /**\n * If True, then column headers that have neighbors with duplicate names\n * will be merged into a single cell.\n * This will be applied for single column headers and multi-column\n * headers.\n */\n merge_duplicate_headers: PropTypes.bool,\n /**\n * The unix timestamp when the data was last edited.\n * Use this property with other timestamp properties\n * (such as `n_clicks_timestamp` in `dash_html_components`)\n * to determine which property has changed within a callback.\n */\n data_timestamp: PropTypes.number,\n /**\n * If true, headers are included when copying from the table to different\n * tabs and elsewhere. Note that headers are ignored when copying from the table onto itself and\n * between two tables within the same tab.\n */\n include_headers_on_copy_paste: PropTypes.bool,\n /**\n * Denotes the columns that will be used in the export data file.\n * If `all`, all columns will be used (visible + hidden). If `visible`,\n * only the visible columns will be used. Defaults to `visible`.\n */\n export_columns: PropTypes.oneOf(['all', 'visible']),\n /**\n * Denotes the type of the export data file,\n * Defaults to `'none'`\n */\n export_format: PropTypes.oneOf(['csv', 'xlsx', 'none']),\n /**\n * Denotes the format of the headers in the export data file.\n * If `'none'`, there will be no header. If `'display'`, then the header\n * of the data file will be be how it is currently displayed. Note that\n * `'display'` is only supported for `'xlsx'` export_format and will behave\n * like `'names'` for `'csv'` export format. If `'ids'` or `'names'`,\n * then the headers of data file will be the column id or the column\n * names, respectively\n */\n export_headers: PropTypes.oneOf(['none', 'ids', 'names', 'display']),\n /**\n * `page_action` refers to a mode of the table where\n * not all of the rows are displayed at once: only a subset\n * are displayed (a \"page\") and the next subset of rows\n * can viewed by clicking \"Next\" or \"Previous\" buttons\n * at the bottom of the page.\n * Pagination is used to improve performance: instead of\n * rendering all of the rows at once (which can be expensive),\n * we only display a subset of them.\n * With pagination, we can either page through data that exists\n * in the table (e.g. page through `10,000` rows in `data` `100` rows at a time)\n * or we can update the data on-the-fly with callbacks\n * when the user clicks on the \"Previous\" or \"Next\" buttons.\n * These modes can be toggled with this `page_action` parameter:\n * `'native'`: all data is passed to the table up-front, paging logic is\n * handled by the table;\n * `'custom'`: data is passed to the table one page at a time, paging logic\n * is handled via callbacks;\n * `'none'`: disables paging, render all of the data at once.\n */\n page_action: PropTypes.oneOf(['custom', 'native', 'none']),\n /**\n * `page_current` represents which page the user is on.\n * Use this property to index through data in your callbacks with\n * backend paging.\n */\n page_current: PropTypes.number,\n /**\n * `page_count` represents the number of the pages in the\n * paginated table. This is really only useful when performing\n * backend pagination, since the front end is able to use the\n * full size of the table to calculate the number of pages.\n */\n page_count: PropTypes.number,\n /**\n * `page_size` represents the number of rows that will be\n * displayed on a particular page when `page_action` is `'custom'` or `'native'`\n */\n page_size: PropTypes.number,\n /**\n * If `filter_action` is enabled, then the current filtering\n * string is represented in this `filter_query`\n * property.\n */\n filter_query: PropTypes.string,\n /**\n * The `filter_action` property controls the behavior of the `filtering` UI.\n * If `'none'`, then the filtering UI is not displayed.\n * If `'native'`, then the filtering UI is displayed and the filtering\n * logic is handled by the table. That is, it is performed on the data\n * that exists in the `data` property.\n * If `'custom'`, then the filtering UI is displayed but it is the\n * responsibility of the developer to program the filtering\n * through a callback (where `filter_query` or `derived_filter_query_structure` would be the input\n * and `data` would be the output).\n */\n filter_action: PropTypes.oneOfType([\n PropTypes.oneOf(['custom', 'native', 'none']),\n PropTypes.shape({\n type: PropTypes.oneOf(['custom', 'native']).isRequired,\n operator: PropTypes.oneOf(['and', 'or'])\n })\n ]),\n /**\n * There are two `filter_options` props in the table.\n * This is the table-level filter_options prop and there is\n * also the column-level `filter_options` prop.\n * If the column-level `filter_options` prop is set it overrides\n * the table-level `filter_options` prop for that column.\n */\n filter_options: PropTypes.shape({\n /**\n * (default: 'sensitive') Determine whether the applicable filter relational operators will default to `sensitive` or `insensitive` comparison.\n */\n case: PropTypes.oneOf(['sensitive', 'insensitive']),\n /**\n * (default: 'filter data...') The filter cell placeholder text.\n */\n placeholder_text: PropTypes.string\n }),\n /**\n * The `sort_action` property enables data to be\n * sorted on a per-column basis.\n * If `'none'`, then the sorting UI is not displayed.\n * If `'native'`, then the sorting UI is displayed and the sorting\n * logic is handled by the table. That is, it is performed on the data\n * that exists in the `data` property.\n * If `'custom'`, the the sorting UI is displayed but it is the\n * responsibility of the developer to program the sorting\n * through a callback (where `sort_by` would be the input and `data`\n * would be the output).\n * Clicking on the sort arrows will update the\n * `sort_by` property.\n */\n sort_action: PropTypes.oneOf(['custom', 'native', 'none']),\n /**\n * Sorting can be performed across multiple columns\n * (e.g. sort by country, sort within each country,\n * sort by year) or by a single column.\n * NOTE - With multi-column sort, it's currently\n * not possible to determine the order in which\n * the columns were sorted through the UI.\n * See [https://github.com/plotly/dash-table/issues/170](https://github.com/plotly/dash-table/issues/170)\n */\n sort_mode: PropTypes.oneOf(['single', 'multi']),\n /**\n * `sort_by` describes the current state\n * of the sorting UI.\n * That is, if the user clicked on the sort arrow\n * of a column, then this property will be updated\n * with the column ID and the direction\n * (`asc` or `desc`) of the sort.\n * For multi-column sorting, this will be a list of\n * sorting parameters, in the order in which they were\n * clicked.\n */\n sort_by: PropTypes.arrayOf(\n PropTypes.exact({\n column_id: PropTypes.string.isRequired,\n direction: PropTypes.oneOf(['asc', 'desc']).isRequired\n })\n ),\n /**\n * An array of string, number and boolean values that are treated as `None`\n * (i.e. ignored and always displayed last) when sorting.\n * This value will be used by columns without `sort_as_null`.\n * Defaults to `[]`.\n */\n sort_as_null: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool\n ])\n ),\n /**\n * `dropdown` specifies dropdown options for different columns.\n * Each entry refers to the column ID.\n * The `clearable` property defines whether the value can be deleted.\n * The `options` property refers to the `options` of the dropdown.\n */\n dropdown: PropTypes.objectOf(\n PropTypes.exact({\n clearable: PropTypes.bool,\n options: PropTypes.arrayOf(\n PropTypes.exact({\n label: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.bool\n ]).isRequired\n })\n ).isRequired\n })\n ),\n /**\n * `dropdown_conditional` specifies dropdown options in various columns and cells.\n * This property allows you to specify different dropdowns\n * depending on certain conditions. For example, you may\n * render different \"city\" dropdowns in a row depending on the\n * current value in the \"state\" column.\n */\n dropdown_conditional: PropTypes.arrayOf(\n PropTypes.exact({\n clearable: PropTypes.bool,\n if: PropTypes.exact({\n column_id: PropTypes.string,\n filter_query: PropTypes.string\n }),\n options: PropTypes.arrayOf(\n PropTypes.exact({\n label: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.bool\n ]).isRequired\n })\n ).isRequired\n })\n ),\n /**\n * `dropdown_data` specifies dropdown options on a row-by-row, column-by-column basis.\n * Each item in the array corresponds to the corresponding dropdowns for the `data` item\n * at the same index. Each entry in the item refers to the Column ID.\n */\n dropdown_data: PropTypes.arrayOf(\n PropTypes.objectOf(\n PropTypes.exact({\n clearable: PropTypes.bool,\n options: PropTypes.arrayOf(\n PropTypes.exact({\n label: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.string,\n PropTypes.bool\n ]).isRequired\n })\n ).isRequired\n })\n )\n ),\n /**\n * `tooltip` is the column based tooltip configuration applied to all rows. The key is the column\n * id and the value is a tooltip configuration.\n * Example: {i: {'value': i, 'use_with: 'both'} for i in df.columns}\n */\n tooltip: PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n /**\n * Represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n */\n duration: PropTypes.number,\n /**\n * refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * Refers to whether the tooltip will be shown\n * only on data or headers. Can be `both`, `data`, `header`.\n * Defaults to `both`.\n */\n use_with: PropTypes.oneOf(['both', 'data', 'header']),\n /**\n * refers to the syntax-based content of\n * the tooltip. This value is required. Alternatively, the value of the\n * property can also be a plain string. The `text` syntax will be used in\n * that case.\n */\n value: PropTypes.string.isRequired\n })\n ])\n ),\n /**\n * `tooltip_conditional` represents the tooltip shown\n * for different columns and cells.\n * This property allows you to specify different tooltips\n * depending on certain conditions. For example, you may have\n * different tooltips in the same column based on the value\n * of a certain data property.\n * Priority is from first to last defined conditional tooltip\n * in the list. Higher priority (more specific) conditional\n * tooltips should be put at the beginning of the list.\n */\n tooltip_conditional: PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The `delay` represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * The `duration` represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n */\n duration: PropTypes.number,\n /**\n * The `if` refers to the condition that needs to be fulfilled\n * in order for the associated tooltip configuration to be\n * used. If multiple conditions are defined, all conditions\n * must be met for the tooltip to be used by a cell.\n */\n if: PropTypes.exact({\n /**\n * `column_id` refers to the column ID that must be matched.\n */\n column_id: PropTypes.string,\n /**\n * `filter_query` refers to the query that must evaluate to True.\n */\n filter_query: PropTypes.string,\n /**\n * `row_index` refers to the index of the row in the source `data`.\n */\n row_index: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.oneOf(['odd', 'even'])\n ])\n }).isRequired,\n /**\n * The `type` refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * The `value` refers to the syntax-based content of the tooltip. This value is required.\n */\n value: PropTypes.string.isRequired\n })\n ),\n /**\n * `tooltip_data` represents the tooltip shown\n * for different columns and cells.\n * A list of dicts for which each key is\n * a column id and the value is a tooltip configuration.\n */\n tooltip_data: PropTypes.arrayOf(\n PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n /**\n * The `delay` represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * The `duration` represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n * Alternatively, the value of the property can also be\n * a plain string. The `text` syntax will be used in\n * that case.\n */\n duration: PropTypes.number,\n /**\n * For each tooltip configuration,\n * The `type` refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * The `value` refers to the syntax-based content of the tooltip. This value is required.\n */\n value: PropTypes.string.isRequired\n })\n ])\n )\n ),\n /**\n * `tooltip_header` represents the tooltip shown\n * for each header column and optionally each header row.\n * Example to show long column names in a tooltip: {i: i for i in df.columns}.\n * Example to show different column names in a tooltip: {'Rep': 'Republican', 'Dem': 'Democrat'}.\n * If the table has multiple rows of headers, then use a list as the value of the\n * `tooltip_header` items.\n *\n *\n */\n tooltip_header: PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n /**\n * The `delay` represents the delay in milliseconds before\n * the tooltip is shown when hovering a cell. This overrides\n * the table's `tooltip_delay` property. If set to `None`,\n * the tooltip will be shown immediately.\n */\n delay: PropTypes.number,\n /**\n * The `duration` represents the duration in milliseconds\n * during which the tooltip is shown when hovering a cell.\n * This overrides the table's `tooltip_duration` property.\n * If set to `None`, the tooltip will not disappear.\n * Alternatively, the value of the property can also be\n * a plain string. The `text` syntax will be used in\n * that case.\n */\n duration: PropTypes.number,\n /**\n * For each tooltip configuration,\n * The `type` refers to the type of tooltip syntax used\n * for the tooltip generation. Can either be `markdown`\n * or `text`. Defaults to `text`.\n */\n type: PropTypes.oneOf(['text', 'markdown']),\n /**\n * The `value` refers to the syntax-based content of the tooltip. This value is required.\n */\n value: PropTypes.string.isRequired\n }),\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.oneOf([null]),\n PropTypes.string,\n PropTypes.exact({\n delay: PropTypes.number,\n duration: PropTypes.number,\n type: PropTypes.oneOf(['text', 'markdown']),\n value: PropTypes.string.isRequired\n })\n ])\n )\n ])\n ),\n /**\n * `tooltip_delay` represents the table-wide delay in milliseconds before\n * the tooltip is shown when hovering a cell. If set to `None`, the tooltip\n * will be shown immediately.\n * Defaults to 350.\n */\n tooltip_delay: PropTypes.number,\n /**\n * `tooltip_duration` represents the table-wide duration in milliseconds\n * during which the tooltip will be displayed when hovering a cell. If\n * set to `None`, the tooltip will not disappear.\n * Defaults to 2000.\n */\n tooltip_duration: PropTypes.number,\n /**\n * The localization specific formatting information applied to all columns in the table.\n * This prop is derived from the [d3.formatLocale](https://github.com/d3/d3-format#formatLocale) data structure specification.\n * When left unspecified, each individual nested prop will default to a pre-determined value.\n */\n locale_format: PropTypes.exact({\n /**\n * (default: ['$', '']). A list of two strings representing the\n * prefix and suffix symbols. Typically used for currency, and implemented using d3's\n * currency format, but you can use this for other symbols such as measurement units.\n */\n symbol: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '.'). The string used for the decimal separator.\n */\n decimal: PropTypes.string,\n /**\n * (default: ','). The string used for the groups separator.\n */\n group: PropTypes.string,\n /**\n * (default: [3]). A list of integers representing the grouping pattern.\n */\n grouping: PropTypes.arrayOf(PropTypes.number),\n /**\n * A list of ten strings used as replacements for numbers 0-9.\n */\n numerals: PropTypes.arrayOf(PropTypes.string),\n /**\n * (default: '%'). The string used for the percentage symbol.\n */\n percent: PropTypes.string,\n /**\n * (default: True). Separate integers with 4-digits or less.\n */\n separate_4digits: PropTypes.bool\n }),\n /**\n * If True, then the table will be styled like a list view\n * and not have borders between the columns.\n */\n style_as_list_view: PropTypes.bool,\n /**\n * `fill_width` toggles between a set of CSS for two common behaviors:\n * True: The table container's width will grow to fill the available space;\n * False: The table container's width will equal the width of its content.\n */\n fill_width: PropTypes.bool,\n /**\n * The `markdown_options` property allows customization of the markdown cells behavior.\n */\n markdown_options: PropTypes.exact({\n /**\n * (default: '_blank'). The link's behavior (_blank opens the link in a\n * new tab, _parent opens the link in the parent frame, _self opens the link in the\n * current tab, and _top opens the link in the top frame) or a string\n */\n link_target: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.oneOf(['_blank', '_parent', '_self', '_top'])\n ]),\n /**\n * (default: False) If True, html may be used in markdown cells\n * Be careful enabling html if the content being rendered can come\n * from an untrusted user, as this may create an XSS vulnerability.\n */\n html: PropTypes.bool\n }),\n /**\n * The `css` property is a way to embed CSS selectors and rules\n * onto the page.\n * We recommend starting with the `style_*` properties\n * before using this `css` property.\n * Example:\n * [\n * {\"selector\": \".dash-spreadsheet\", \"rule\": 'font-family: \"monospace\"'}\n * ]\n */\n css: PropTypes.arrayOf(\n PropTypes.exact({\n selector: PropTypes.string.isRequired,\n rule: PropTypes.string.isRequired\n })\n ),\n /**\n * CSS styles to be applied to the outer `table` container.\n * This is commonly used for setting properties like the\n * width or the height of the table.\n */\n style_table: PropTypes.object,\n /**\n * CSS styles to be applied to each individual cell of the table.\n * This includes the header cells, the `data` cells, and the filter\n * cells.\n */\n style_cell: PropTypes.object,\n /**\n * CSS styles to be applied to each individual data cell.\n * That is, unlike `style_cell`, it excludes the header and filter cells.\n */\n style_data: PropTypes.object,\n /**\n * CSS styles to be applied to the filter cells.\n * Note that this may change in the future as we build out a\n * more complex filtering UI.\n */\n style_filter: PropTypes.object,\n /**\n * CSS styles to be applied to each individual header cell.\n * That is, unlike `style_cell`, it excludes the `data` and filter cells.\n */\n style_header: PropTypes.object,\n /**\n * Conditional CSS styles for the cells.\n * This can be used to apply styles to cells on a per-column basis.\n */\n style_cell_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ])\n })\n })\n ),\n /**\n * Conditional CSS styles for the data cells.\n * This can be used to apply styles to data cells on a per-column basis.\n */\n style_data_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ]),\n filter_query: PropTypes.string,\n state: PropTypes.oneOf(['active', 'selected']),\n row_index: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.oneOf(['odd', 'even']),\n PropTypes.arrayOf(PropTypes.number)\n ]),\n column_editable: PropTypes.bool\n })\n })\n ),\n /**\n * Conditional CSS styles for the filter cells.\n * This can be used to apply styles to filter cells on a per-column basis.\n */\n style_filter_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ]),\n column_editable: PropTypes.bool\n })\n })\n ),\n /**\n * Conditional CSS styles for the header cells.\n * This can be used to apply styles to header cells on a per-column basis.\n */\n style_header_conditional: PropTypes.arrayOf(\n PropTypes.shape({\n if: PropTypes.exact({\n column_id: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string)\n ]),\n column_type: PropTypes.oneOf([\n 'any',\n 'numeric',\n 'text',\n 'datetime'\n ]),\n header_index: PropTypes.oneOfType([\n PropTypes.number,\n PropTypes.arrayOf(PropTypes.number),\n PropTypes.oneOf(['odd', 'even'])\n ]),\n column_editable: PropTypes.bool\n })\n })\n ),\n /**\n * This property tells the table to use virtualization when rendering.\n * Assumptions are that:\n * the width of the columns is fixed;\n * the height of the rows is always the same; and\n * runtime styling changes will not affect width and height vs. first rendering\n */\n virtualization: PropTypes.bool,\n /**\n * This property represents the current structure of\n * `filter_query` as a tree structure. Each node of the\n * query structure has:\n * type (string; required):\n * 'open-block',\n * 'logical-operator',\n * 'relational-operator',\n * 'unary-operator', or\n * 'expression';\n * subType (string; optional):\n * 'open-block': '()',\n * 'logical-operator': '&&', '||',\n * 'relational-operator': '=', '>=', '>', '<=', '<', '!=', 'contains',\n * 'unary-operator': '!', 'is bool', 'is even', 'is nil', 'is num', 'is object', 'is odd', 'is prime', 'is str',\n * 'expression': 'value', 'field';\n * value (any):\n * 'expression, value': passed value,\n * 'expression, field': the field/prop name.\n * block (nested query structure; optional).\n * left (nested query structure; optional).\n * right (nested query structure; optional).\n * If the query is invalid or empty, the `derived_filter_query_structure` will\n * be `None`.\n */\n derived_filter_query_structure: PropTypes.object,\n /**\n * This property represents the current state of `data`\n * on the current page. This property will be updated\n * on paging, sorting, and filtering.\n */\n derived_viewport_data: PropTypes.arrayOf(PropTypes.object),\n /**\n * `derived_viewport_indices` indicates the order in which the original\n * rows appear after being filtered, sorted, and/or paged.\n * `derived_viewport_indices` contains indices for the current page,\n * while `derived_virtual_indices` contains indices across all pages.\n */\n derived_viewport_indices: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_viewport_row_ids` lists row IDs in the order they appear\n * after being filtered, sorted, and/or paged.\n * `derived_viewport_row_ids` contains IDs for the current page,\n * while `derived_virtual_row_ids` contains IDs across all pages.\n */\n derived_viewport_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * `derived_viewport_selected_columns` contains the ids of the\n * `selected_columns` that are not currently hidden.\n */\n derived_viewport_selected_columns: PropTypes.arrayOf(PropTypes.string),\n /**\n * `derived_viewport_selected_rows` represents the indices of the\n * `selected_rows` from the perspective of the `derived_viewport_indices`.\n */\n derived_viewport_selected_rows: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_viewport_selected_row_ids` represents the IDs of the\n * `selected_rows` on the currently visible page.\n */\n derived_viewport_selected_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * This property represents the visible state of `data`\n * across all pages after the front-end sorting and filtering\n * as been applied.\n */\n derived_virtual_data: PropTypes.arrayOf(PropTypes.object),\n /**\n * `derived_virtual_indices` indicates the order in which the original\n * rows appear after being filtered and sorted.\n * `derived_viewport_indices` contains indices for the current page,\n * while `derived_virtual_indices` contains indices across all pages.\n */\n derived_virtual_indices: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_virtual_row_ids` indicates the row IDs in the order in which\n * they appear after being filtered and sorted.\n * `derived_viewport_row_ids` contains IDs for the current page,\n * while `derived_virtual_row_ids` contains IDs across all pages.\n */\n derived_virtual_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * `derived_virtual_selected_rows` represents the indices of the\n * `selected_rows` from the perspective of the `derived_virtual_indices`.\n */\n derived_virtual_selected_rows: PropTypes.arrayOf(PropTypes.number),\n /**\n * `derived_virtual_selected_row_ids` represents the IDs of the\n * `selected_rows` as they appear after filtering and sorting,\n * across all pages.\n */\n derived_virtual_selected_row_ids: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n ),\n /**\n * The ID of the table.\n */\n id: PropTypes.string,\n /**\n * Dash-assigned callback that gets fired when the user makes changes.\n */\n setProps: PropTypes.func,\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string\n }),\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, any `persisted_props` that the\n * user has changed while using the app will keep those changes, as long as\n * the new prop value also matches what was given originally.\n * Used in conjunction with `persistence_type` and `persisted_props`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number\n ]),\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page.\n */\n persisted_props: PropTypes.arrayOf(\n PropTypes.oneOf([\n 'columns.name',\n 'data',\n 'filter_query',\n 'hidden_columns',\n 'page_current',\n 'selected_columns',\n 'selected_rows',\n 'sort_by'\n ])\n ),\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory'])\n};\nDataTable.persistenceTransforms = {\n columns: {\n name: {\n extract: propValue => R.pluck('name', propValue),\n apply: (storedValue, propValue) =>\n R.zipWith(R.assoc('name'), storedValue, propValue)\n }\n }\n};\nDataTable.defaultProps = defaultProps;\nDataTable.propTypes = propTypes;\n","/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */\n;(function(root, factory) {\n\t// https://github.com/umdjs/umd/blob/master/returnExports.js\n\tif (typeof exports == 'object') {\n\t\t// For Node.js.\n\t\tmodule.exports = factory(root);\n\t} else if (typeof define == 'function' && define.amd) {\n\t\t// For AMD. Register as an anonymous module.\n\t\tdefine([], factory.bind(root, root));\n\t} else {\n\t\t// For browser globals (not exposing the function separately).\n\t\tfactory(root);\n\t}\n}(typeof global != 'undefined' ? global : this, function(root) {\n\n\tif (root.CSS && root.CSS.escape) {\n\t\treturn root.CSS.escape;\n\t}\n\n\t// https://drafts.csswg.org/cssom/#serialize-an-identifier\n\tvar cssEscape = function(value) {\n\t\tif (arguments.length == 0) {\n\t\t\tthrow new TypeError('`CSS.escape` requires an argument.');\n\t\t}\n\t\tvar string = String(value);\n\t\tvar length = string.length;\n\t\tvar index = -1;\n\t\tvar codeUnit;\n\t\tvar result = '';\n\t\tvar firstCodeUnit = string.charCodeAt(0);\n\t\twhile (++index < length) {\n\t\t\tcodeUnit = string.charCodeAt(index);\n\t\t\t// Note: there’s no need to special-case astral symbols, surrogate\n\t\t\t// pairs, or lone surrogates.\n\n\t\t\t// If the character is NULL (U+0000), then the REPLACEMENT CHARACTER\n\t\t\t// (U+FFFD).\n\t\t\tif (codeUnit == 0x0000) {\n\t\t\t\tresult += '\\uFFFD';\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// If the character is in the range [\\1-\\1F] (U+0001 to U+001F) or is\n\t\t\t\t// U+007F, […]\n\t\t\t\t(codeUnit >= 0x0001 && codeUnit <= 0x001F) || codeUnit == 0x007F ||\n\t\t\t\t// If the character is the first character and is in the range [0-9]\n\t\t\t\t// (U+0030 to U+0039), […]\n\t\t\t\t(index == 0 && codeUnit >= 0x0030 && codeUnit <= 0x0039) ||\n\t\t\t\t// If the character is the second character and is in the range [0-9]\n\t\t\t\t// (U+0030 to U+0039) and the first character is a `-` (U+002D), […]\n\t\t\t\t(\n\t\t\t\t\tindex == 1 &&\n\t\t\t\t\tcodeUnit >= 0x0030 && codeUnit <= 0x0039 &&\n\t\t\t\t\tfirstCodeUnit == 0x002D\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t// https://drafts.csswg.org/cssom/#escape-a-character-as-code-point\n\t\t\t\tresult += '\\\\' + codeUnit.toString(16) + ' ';\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\t// If the character is the first character and is a `-` (U+002D), and\n\t\t\t\t// there is no second character, […]\n\t\t\t\tindex == 0 &&\n\t\t\t\tlength == 1 &&\n\t\t\t\tcodeUnit == 0x002D\n\t\t\t) {\n\t\t\t\tresult += '\\\\' + string.charAt(index);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If the character is not handled by one of the above rules and is\n\t\t\t// greater than or equal to U+0080, is `-` (U+002D) or `_` (U+005F), or\n\t\t\t// is in one of the ranges [0-9] (U+0030 to U+0039), [A-Z] (U+0041 to\n\t\t\t// U+005A), or [a-z] (U+0061 to U+007A), […]\n\t\t\tif (\n\t\t\t\tcodeUnit >= 0x0080 ||\n\t\t\t\tcodeUnit == 0x002D ||\n\t\t\t\tcodeUnit == 0x005F ||\n\t\t\t\tcodeUnit >= 0x0030 && codeUnit <= 0x0039 ||\n\t\t\t\tcodeUnit >= 0x0041 && codeUnit <= 0x005A ||\n\t\t\t\tcodeUnit >= 0x0061 && codeUnit <= 0x007A\n\t\t\t) {\n\t\t\t\t// the character itself\n\t\t\t\tresult += string.charAt(index);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Otherwise, the escaped character.\n\t\t\t// https://drafts.csswg.org/cssom/#escape-a-character\n\t\t\tresult += '\\\\' + string.charAt(index);\n\n\t\t}\n\t\treturn result;\n\t};\n\n\tif (!root.CSS) {\n\t\troot.CSS = {};\n\t}\n\n\troot.CSS.escape = cssEscape;\n\treturn cssEscape;\n\n}));\n","module.exports = window[\"PropTypes\"];","module.exports = window[\"React\"];","module.exports = window[\"ReactDOM\"];","/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nexport default function _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n idx = 0;\n\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n\n idx = 0;\n\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n\n return result;\n}","export default function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}","import _arity from \"./_arity.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n\n combined[combinedIdx] = result;\n\n if (!_isPlaceholder(result)) {\n left -= 1;\n }\n\n combinedIdx += 1;\n }\n\n return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));\n };\n}","import _arity from \"./internal/_arity.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _curryN from \"./internal/_curryN.js\";\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * const sumArgs = (...args) => R.sum(args);\n *\n * const curriedAddFourNumbers = R.curryN(4, sumArgs);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n */\n\nvar curryN =\n/*#__PURE__*/\n_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n\n return _arity(length, _curryN(length, [], fn));\n});\n\nexport default curryN;","import _concat from \"./internal/_concat.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n/**\n * Creates a new list iteration function from an existing one by adding two new\n * parameters to its callback function: the current index, and the entire list.\n *\n * This would turn, for instance, [`R.map`](#map) function into one that\n * more closely resembles `Array.prototype.map`. Note that this will only work\n * for functions in which the iteration callback function is the first\n * parameter, and where the list is the last parameter. (This latter might be\n * unimportant if the list parameter is not used.)\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Function\n * @category List\n * @sig (((a ...) -> b) ... -> [a] -> *) -> (((a ..., Int, [a]) -> b) ... -> [a] -> *)\n * @param {Function} fn A list iteration function that does not pass index or list to its callback\n * @return {Function} An altered list iteration function that passes (item, index, list) to its callback\n * @example\n *\n * const mapIndexed = R.addIndex(R.map);\n * mapIndexed((val, idx) => idx + '-' + val, ['f', 'o', 'o', 'b', 'a', 'r']);\n * //=> ['0-f', '1-o', '2-o', '3-b', '4-a', '5-r']\n */\n\nvar addIndex =\n/*#__PURE__*/\n_curry1(function addIndex(fn) {\n return curryN(fn.length, function () {\n var idx = 0;\n var origFn = arguments[0];\n var list = arguments[arguments.length - 1];\n var args = Array.prototype.slice.call(arguments, 0);\n\n args[0] = function () {\n var result = origFn.apply(this, _concat(arguments, [idx, list]));\n idx += 1;\n return result;\n };\n\n return fn.apply(this, args);\n });\n});\n\nexport default addIndex;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","export default function _isTransformer(obj) {\n return obj != null && typeof obj['@@transducer/step'] === 'function';\n}","import _isArray from \"./_isArray.js\";\nimport _isTransformer from \"./_isTransformer.js\";\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer created by [transducerCreator] to return a new transformer\n * (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} transducerCreator transducer factory if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\n\nexport default function _dispatchable(methodNames, transducerCreator, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n\n var obj = arguments[arguments.length - 1];\n\n if (!_isArray(obj)) {\n var idx = 0;\n\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1));\n }\n\n idx += 1;\n }\n\n if (_isTransformer(obj)) {\n var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1));\n return transducer(obj);\n }\n }\n\n return fn.apply(this, arguments);\n };\n}","export default function _reduced(x) {\n return x && x['@@transducer/reduced'] ? x : {\n '@@transducer/value': x,\n '@@transducer/reduced': true\n };\n}","export default {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XAll =\n/*#__PURE__*/\nfunction () {\n function XAll(f, xf) {\n this.xf = xf;\n this.f = f;\n this.all = true;\n }\n\n XAll.prototype['@@transducer/init'] = _xfBase.init;\n\n XAll.prototype['@@transducer/result'] = function (result) {\n if (this.all) {\n result = this.xf['@@transducer/step'](result, true);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XAll.prototype['@@transducer/step'] = function (result, input) {\n if (!this.f(input)) {\n this.all = false;\n result = _reduced(this.xf['@@transducer/step'](result, false));\n }\n\n return result;\n };\n\n return XAll;\n}();\n\nvar _xall =\n/*#__PURE__*/\n_curry2(function _xall(f, xf) {\n return new XAll(f, xf);\n});\n\nexport default _xall;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xall from \"./internal/_xall.js\";\n/**\n * Returns `true` if all elements of the list match the predicate, `false` if\n * there are any that don't.\n *\n * Dispatches to the `all` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by every element, `false`\n * otherwise.\n * @see R.any, R.none, R.transduce\n * @example\n *\n * const equals3 = R.equals(3);\n * R.all(equals3)([3, 3, 3, 3]); //=> true\n * R.all(equals3)([3, 3, 1, 3]); //=> false\n */\n\nvar all =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['all'], _xall, function all(fn, list) {\n var idx = 0;\n\n while (idx < list.length) {\n if (!fn(list[idx])) {\n return false;\n }\n\n idx += 1;\n }\n\n return true;\n}));\n\nexport default all;","export default function _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n\n return result;\n}","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _curry1 from \"./_curry1.js\";\nimport _isArray from \"./_isArray.js\";\nimport _isString from \"./_isString.js\";\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n * _isArrayLike({nodeType: 1, length: 1}) // => false\n */\n\nvar _isArrayLike =\n/*#__PURE__*/\n_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n\n if (!x) {\n return false;\n }\n\n if (typeof x !== 'object') {\n return false;\n }\n\n if (_isString(x)) {\n return false;\n }\n\n if (x.length === 0) {\n return true;\n }\n\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n\n return false;\n});\n\nexport default _isArrayLike;","var XWrap =\n/*#__PURE__*/\nfunction () {\n function XWrap(fn) {\n this.f = fn;\n }\n\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nexport default function _xwrap(fn) {\n return new XWrap(fn);\n}","import _arity from \"./internal/_arity.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\nvar bind =\n/*#__PURE__*/\n_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\n\nexport default bind;","import _isArrayLike from \"./_isArrayLike.js\";\nimport _xwrap from \"./_xwrap.js\";\nimport bind from \"../bind.js\";\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n idx += 1;\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n step = iter.next();\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nexport default function _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XMap =\n/*#__PURE__*/\nfunction () {\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n\n return XMap;\n}();\n\nvar _xmap =\n/*#__PURE__*/\n_curry2(function _xmap(f, xf) {\n return new XMap(f, xf);\n});\n\nexport default _xmap;","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _has from \"./_has.js\";\nvar toString = Object.prototype.toString;\n\nvar _isArguments =\n/*#__PURE__*/\nfunction () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\nimport _isArguments from \"./internal/_isArguments.js\"; // cover IE < 9 keys issues\n\nvar hasEnumBug = !\n/*#__PURE__*/\n{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug\n\nvar hasArgsEnumBug =\n/*#__PURE__*/\nfunction () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n};\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values, R.toPairs\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\n\n\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?\n/*#__PURE__*/\n_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) :\n/*#__PURE__*/\n_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n\n var prop, nIdx;\n var ks = [];\n\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n\n nIdx -= 1;\n }\n }\n\n return ks;\n});\nexport default keys;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _map from \"./internal/_map.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _xmap from \"./internal/_xmap.js\";\nimport curryN from \"./curryN.js\";\nimport keys from \"./keys.js\";\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex, R.pluck, R.project\n * @example\n *\n * const double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\n\nvar map =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n\n case '[object Object]':\n return _reduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys(functor));\n\n default:\n return _map(fn, functor);\n }\n}));\n\nexport default map;","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _curry2 from \"./internal/_curry2.js\";\nimport _isString from \"./internal/_isString.js\";\n/**\n * Returns the nth element of the given list or string. If n is negative the\n * element at index length + n is returned.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> a | Undefined\n * @sig Number -> String -> String\n * @param {Number} offset\n * @param {*} list\n * @return {*}\n * @example\n *\n * const list = ['foo', 'bar', 'baz', 'quux'];\n * R.nth(1, list); //=> 'bar'\n * R.nth(-1, list); //=> 'quux'\n * R.nth(-99, list); //=> undefined\n *\n * R.nth(2, 'abc'); //=> 'c'\n * R.nth(3, 'abc'); //=> ''\n * @symb R.nth(-1, [a, b, c]) = c\n * @symb R.nth(0, [a, b, c]) = a\n * @symb R.nth(1, [a, b, c]) = b\n */\n\nvar nth =\n/*#__PURE__*/\n_curry2(function nth(offset, list) {\n var idx = offset < 0 ? list.length + offset : offset;\n return _isString(list) ? list.charAt(idx) : list[idx];\n});\n\nexport default nth;","import _curry2 from \"./internal/_curry2.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport nth from \"./nth.js\";\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig Idx -> {s: a} -> a | Undefined\n * @param {String|Number} p The property name or array index\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path, R.props, R.pluck, R.project, R.nth\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n * R.prop(0, [100]); //=> 100\n * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\nvar prop =\n/*#__PURE__*/\n_curry2(function prop(p, obj) {\n if (obj == null) {\n return;\n }\n\n return _isInteger(p) ? nth(p, obj) : obj[p];\n});\n\nexport default prop;","import _curry2 from \"./internal/_curry2.js\";\nimport map from \"./map.js\";\nimport prop from \"./prop.js\";\n/**\n * Returns a new list by plucking the same named property off all objects in\n * the list supplied.\n *\n * `pluck` will work on\n * any [functor](https://github.com/fantasyland/fantasy-land#functor) in\n * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => k -> f {k: v} -> f v\n * @param {Number|String} key The key name to pluck off of each object.\n * @param {Array} f The array or functor to consider.\n * @return {Array} The list of values for the given key.\n * @see R.project, R.prop, R.props\n * @example\n *\n * var getAges = R.pluck('age');\n * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]\n *\n * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3]\n * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}\n * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]\n * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]\n */\n\nvar pluck =\n/*#__PURE__*/\n_curry2(function pluck(p, list) {\n return map(prop(p), list);\n});\n\nexport default pluck;","import _curry3 from \"./internal/_curry3.js\";\nimport _reduce from \"./internal/_reduce.js\";\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\n\nvar reduce =\n/*#__PURE__*/\n_curry3(_reduce);\n\nexport default reduce;","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XAny =\n/*#__PURE__*/\nfunction () {\n function XAny(f, xf) {\n this.xf = xf;\n this.f = f;\n this.any = false;\n }\n\n XAny.prototype['@@transducer/init'] = _xfBase.init;\n\n XAny.prototype['@@transducer/result'] = function (result) {\n if (!this.any) {\n result = this.xf['@@transducer/step'](result, false);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XAny.prototype['@@transducer/step'] = function (result, input) {\n if (this.f(input)) {\n this.any = true;\n result = _reduced(this.xf['@@transducer/step'](result, true));\n }\n\n return result;\n };\n\n return XAny;\n}();\n\nvar _xany =\n/*#__PURE__*/\n_curry2(function _xany(f, xf) {\n return new XAny(f, xf);\n});\n\nexport default _xany;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xany from \"./internal/_xany.js\";\n/**\n * Returns `true` if at least one of the elements of the list match the predicate,\n * `false` otherwise.\n *\n * Dispatches to the `any` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> Boolean\n * @param {Function} fn The predicate function.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if the predicate is satisfied by at least one element, `false`\n * otherwise.\n * @see R.all, R.none, R.transduce\n * @example\n *\n * const lessThan0 = R.flip(R.lt)(0);\n * const lessThan2 = R.flip(R.lt)(2);\n * R.any(lessThan0)([1, 2]); //=> false\n * R.any(lessThan2)([1, 2]); //=> true\n */\n\nvar any =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['any'], _xany, function any(fn, list) {\n var idx = 0;\n\n while (idx < list.length) {\n if (fn(list[idx])) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n}));\n\nexport default any;","import _concat from \"./internal/_concat.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a new list containing the contents of the given list, followed by\n * the given element.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} el The element to add to the end of the new list.\n * @param {Array} list The list of elements to add a new item to.\n * list.\n * @return {Array} A new list containing the elements of the old list followed by `el`.\n * @see R.prepend\n * @example\n *\n * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']\n * R.append('tests', []); //=> ['tests']\n * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]\n */\n\nvar append =\n/*#__PURE__*/\n_curry2(function append(el, list) {\n return _concat(list, [el]);\n});\n\nexport default append;","import _curry1 from \"./internal/_curry1.js\";\nimport keys from \"./keys.js\";\n/**\n * Returns a list of all the enumerable own properties of the supplied object.\n * Note that the order of the output array is not guaranteed across different\n * JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [v]\n * @param {Object} obj The object to extract values from\n * @return {Array} An array of the values of the object's own properties.\n * @see R.valuesIn, R.keys, R.toPairs\n * @example\n *\n * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]\n */\n\nvar values =\n/*#__PURE__*/\n_curry1(function values(obj) {\n var props = keys(obj);\n var len = props.length;\n var vals = [];\n var idx = 0;\n\n while (idx < len) {\n vals[idx] = obj[props[idx]];\n idx += 1;\n }\n\n return vals;\n});\n\nexport default values;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\n\nvar isNil =\n/*#__PURE__*/\n_curry1(function isNil(x) {\n return x == null;\n});\n\nexport default isNil;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport isNil from \"./isNil.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the nodes required\n * to create the given path, and placing the specific value at the tail end of\n * that path. Note that this copies and flattens prototype properties onto the\n * new object as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> a -> {a} -> {a}\n * @param {Array} path the path to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except along the specified path.\n * @see R.dissocPath\n * @example\n *\n * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}\n *\n * // Any missing or non-object keys in path will be overridden\n * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}\n */\n\nvar assocPath =\n/*#__PURE__*/\n_curry3(function assocPath(path, val, obj) {\n if (path.length === 0) {\n return val;\n }\n\n var idx = path[0];\n\n if (path.length > 1) {\n var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {};\n val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);\n }\n\n return _assoc(idx, val, obj);\n});\n\nexport default assocPath;","import _isArray from \"./_isArray.js\";\nimport _isInteger from \"./_isInteger.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @private\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object|Array} obj The object to clone\n * @return {Object|Array} A new object equivalent to the original except for the changed property.\n */\n\nexport default function _assoc(prop, val, obj) {\n if (_isInteger(prop) && _isArray(obj)) {\n var arr = [].concat(obj);\n arr[prop] = val;\n return arr;\n }\n\n var result = {};\n\n for (var p in obj) {\n result[p] = obj[p];\n }\n\n result[prop] = val;\n return result;\n}","import _curry3 from \"./internal/_curry3.js\";\nimport assocPath from \"./assocPath.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig Idx -> a -> {k: v} -> {k: v}\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except for the changed property.\n * @see R.dissoc, R.pick\n * @example\n *\n * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}\n */\n\nvar assoc =\n/*#__PURE__*/\n_curry3(function assoc(prop, val, obj) {\n return assocPath([prop], val, obj);\n});\n\nexport default assoc;","import _curry2 from \"./_curry2.js\";\nimport _flatCat from \"./_flatCat.js\";\nimport map from \"../map.js\";\n\nvar _xchain =\n/*#__PURE__*/\n_curry2(function _xchain(f, xf) {\n return map(f, _flatCat(xf));\n});\n\nexport default _xchain;","import _forceReduced from \"./_forceReduced.js\";\nimport _isArrayLike from \"./_isArrayLike.js\";\nimport _reduce from \"./_reduce.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar preservingReduced = function (xf) {\n return {\n '@@transducer/init': _xfBase.init,\n '@@transducer/result': function (result) {\n return xf['@@transducer/result'](result);\n },\n '@@transducer/step': function (result, input) {\n var ret = xf['@@transducer/step'](result, input);\n return ret['@@transducer/reduced'] ? _forceReduced(ret) : ret;\n }\n };\n};\n\nvar _flatCat = function _xcat(xf) {\n var rxf = preservingReduced(xf);\n return {\n '@@transducer/init': _xfBase.init,\n '@@transducer/result': function (result) {\n return rxf['@@transducer/result'](result);\n },\n '@@transducer/step': function (result, input) {\n return !_isArrayLike(input) ? _reduce(rxf, result, [input]) : _reduce(rxf, result, input);\n }\n };\n};\n\nexport default _flatCat;","export default function _forceReduced(x) {\n return {\n '@@transducer/value': x,\n '@@transducer/reduced': true\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _makeFlat from \"./internal/_makeFlat.js\";\nimport _xchain from \"./internal/_xchain.js\";\nimport map from \"./map.js\";\n/**\n * `chain` maps a function over a list and concatenates the results. `chain`\n * is also known as `flatMap` in some libraries.\n *\n * Dispatches to the `chain` method of the second argument, if present,\n * according to the [FantasyLand Chain spec](https://github.com/fantasyland/fantasy-land#chain).\n *\n * If second argument is a function, `chain(f, g)(x)` is equivalent to `f(g(x), x)`.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig Chain m => (a -> m b) -> m a -> m b\n * @param {Function} fn The function to map with\n * @param {Array} list The list to map over\n * @return {Array} The result of flat-mapping `list` with `fn`\n * @example\n *\n * const duplicate = n => [n, n];\n * R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3]\n *\n * R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1]\n */\n\nvar chain =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/chain', 'chain'], _xchain, function chain(fn, monad) {\n if (typeof monad === 'function') {\n return function (x) {\n return fn(monad(x))(x);\n };\n }\n\n return _makeFlat(false)(map(fn, monad));\n}));\n\nexport default chain;","import _isArrayLike from \"./_isArrayLike.js\";\n/**\n * `_makeFlat` is a helper function that returns a one-level or fully recursive\n * function based on the flag passed in.\n *\n * @private\n */\n\nexport default function _makeFlat(recursive) {\n return function flatt(list) {\n var value, jlen, j;\n var result = [];\n var idx = 0;\n var ilen = list.length;\n\n while (idx < ilen) {\n if (_isArrayLike(list[idx])) {\n value = recursive ? flatt(list[idx]) : list[idx];\n j = 0;\n jlen = value.length;\n\n while (j < jlen) {\n result[result.length] = value[j];\n j += 1;\n }\n } else {\n result[result.length] = list[idx];\n }\n\n idx += 1;\n }\n\n return result;\n };\n}","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\nvar type =\n/*#__PURE__*/\n_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\n\nexport default type;","import _cloneRegExp from \"./_cloneRegExp.js\";\nimport type from \"../type.js\";\n/**\n * Copies an object.\n *\n * @private\n * @param {*} value The value to be copied\n * @param {Array} refFrom Array containing the source references\n * @param {Array} refTo Array containing the copied source references\n * @param {Boolean} deep Whether or not to perform deep cloning.\n * @return {*} The copied value.\n */\n\nexport default function _clone(value, refFrom, refTo, deep) {\n var copy = function copy(copiedValue) {\n var len = refFrom.length;\n var idx = 0;\n\n while (idx < len) {\n if (value === refFrom[idx]) {\n return refTo[idx];\n }\n\n idx += 1;\n }\n\n refFrom[idx] = value;\n refTo[idx] = copiedValue;\n\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key];\n }\n }\n\n return copiedValue;\n };\n\n switch (type(value)) {\n case 'Object':\n return copy(Object.create(Object.getPrototypeOf(value)));\n\n case 'Array':\n return copy([]);\n\n case 'Date':\n return new Date(value.valueOf());\n\n case 'RegExp':\n return _cloneRegExp(value);\n\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'BigInt64Array':\n case 'BigUint64Array':\n return value.slice();\n\n default:\n return value;\n }\n}","export default function _cloneRegExp(pattern) {\n return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));\n}","import _clone from \"./internal/_clone.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n/**\n * Creates a deep copy of the source that can be used in place of the source\n * object without retaining any references to it.\n * The source object may contain (nested) `Array`s and `Object`s,\n * `Number`s, `String`s, `Boolean`s and `Date`s.\n * `Function`s are assigned by reference rather than copied.\n *\n * Dispatches to a `clone` method if present.\n *\n * Note that if the source object has multiple nodes that share a reference,\n * the returned object will have the same structure, but the references will\n * be pointed to the location within the cloned value.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {*} -> {*}\n * @param {*} value The object or array to clone\n * @return {*} A deeply cloned copy of `val`\n * @example\n *\n * const objects = [{}, {}, {}];\n * const objectsClone = R.clone(objects);\n * objects === objectsClone; //=> false\n * objects[0] === objectsClone[0]; //=> false\n */\n\nvar clone =\n/*#__PURE__*/\n_curry1(function clone(value) {\n return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true);\n});\n\nexport default clone;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Makes a comparator function out of a function that reports whether the first\n * element is less than the second.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b) -> Boolean) -> ((a, b) -> Number)\n * @param {Function} pred A predicate function of arity two which will return `true` if the first argument\n * is less than the second, `false` otherwise\n * @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0`\n * @example\n *\n * const byAge = R.comparator((a, b) => a.age < b.age);\n * const people = [\n * { name: 'Emma', age: 70 },\n * { name: 'Peter', age: 78 },\n * { name: 'Mikhail', age: 62 },\n * ];\n * const peopleByIncreasingAge = R.sort(byAge, people);\n * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]\n */\n\nvar comparator =\n/*#__PURE__*/\n_curry1(function comparator(pred) {\n return function (a, b) {\n return pred(a, b) ? -1 : pred(b, a) ? 1 : 0;\n };\n});\n\nexport default comparator;","export default function _pipe(f, g) {\n return function () {\n return g.call(this, f.apply(this, arguments));\n };\n}","import _isArray from \"./_isArray.js\";\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implementation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\n\nexport default function _checkForMethod(methodname, fn) {\n return function () {\n var length = arguments.length;\n\n if (length === 0) {\n return fn();\n }\n\n var obj = arguments[length - 1];\n return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n };\n}","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry3 from \"./internal/_curry3.js\";\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']\n * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(0, 3, 'ramda'); //=> 'ram'\n */\n\nvar slice =\n/*#__PURE__*/\n_curry3(\n/*#__PURE__*/\n_checkForMethod('slice', function slice(fromIndex, toIndex, list) {\n return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\n\nexport default slice;","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport slice from \"./slice.js\";\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n * R.tail([1, 2, 3]); //=> [2, 3]\n * R.tail([1, 2]); //=> [2]\n * R.tail([1]); //=> []\n * R.tail([]); //=> []\n *\n * R.tail('abc'); //=> 'bc'\n * R.tail('ab'); //=> 'b'\n * R.tail('a'); //=> ''\n * R.tail(''); //=> ''\n */\n\nvar tail =\n/*#__PURE__*/\n_curry1(\n/*#__PURE__*/\n_checkForMethod('tail',\n/*#__PURE__*/\nslice(1, Infinity)));\n\nexport default tail;","import _arity from \"./internal/_arity.js\";\nimport _pipe from \"./internal/_pipe.js\";\nimport reduce from \"./reduce.js\";\nimport tail from \"./tail.js\";\n/**\n * Performs left-to-right function composition. The first argument may have\n * any arity; the remaining arguments must be unary.\n *\n * In some libraries this function is named `sequence`.\n *\n * **Note:** The result of pipe is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.compose\n * @example\n *\n * const f = R.pipe(Math.pow, R.negate, R.inc);\n *\n * f(3, 4); // -(3^4) + 1\n * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))\n * @symb R.pipe(f, g, h)(a)(b) = h(g(f(a)))(b)\n */\n\nexport default function pipe() {\n if (arguments.length === 0) {\n throw new Error('pipe requires at least one argument');\n }\n\n return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments)));\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _isString from \"./internal/_isString.js\";\n/**\n * Returns a new list or string with the elements or characters in reverse\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {Array|String} list\n * @return {Array|String}\n * @example\n *\n * R.reverse([1, 2, 3]); //=> [3, 2, 1]\n * R.reverse([1, 2]); //=> [2, 1]\n * R.reverse([1]); //=> [1]\n * R.reverse([]); //=> []\n *\n * R.reverse('abc'); //=> 'cba'\n * R.reverse('ab'); //=> 'ba'\n * R.reverse('a'); //=> 'a'\n * R.reverse(''); //=> ''\n */\n\nvar reverse =\n/*#__PURE__*/\n_curry1(function reverse(list) {\n return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse();\n});\n\nexport default reverse;","import pipe from \"./pipe.js\";\nimport reverse from \"./reverse.js\";\n/**\n * Performs right-to-left function composition. The last argument may have\n * any arity; the remaining arguments must be unary.\n *\n * **Note:** The result of compose is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z)\n * @param {...Function} ...functions The functions to compose\n * @return {Function}\n * @see R.pipe\n * @example\n *\n * const classyGreeting = (firstName, lastName) => \"The name's \" + lastName + \", \" + firstName + \" \" + lastName\n * const yellGreeting = R.compose(R.toUpper, classyGreeting);\n * yellGreeting('James', 'Bond'); //=> \"THE NAME'S BOND, JAMES BOND\"\n *\n * R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7\n *\n * @symb R.compose(f, g, h)(a, b) = f(g(h(a, b)))\n * @symb R.compose(f, g, h)(a)(b) = f(g(h(a)))(b)\n */\n\nexport default function compose() {\n if (arguments.length === 0) {\n throw new Error('compose requires at least one argument');\n }\n\n return pipe.apply(this, reverse(arguments));\n}","export default function _isFunction(x) {\n var type = Object.prototype.toString.call(x);\n return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';\n}","export default function _arrayFromIterator(iter) {\n var list = [];\n var next;\n\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n\n return list;\n}","export default function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n}","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","import _arrayFromIterator from \"./_arrayFromIterator.js\";\nimport _includesWith from \"./_includesWith.js\";\nimport _functionName from \"./_functionName.js\";\nimport _has from \"./_has.js\";\nimport _objectIs from \"./_objectIs.js\";\nimport keys from \"../keys.js\";\nimport type from \"../type.js\";\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparison of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n } // if *a* array contains any element that is not included in *b*\n\n\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nexport default function _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n\n break;\n\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n\n break;\n\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n\n break;\n\n case 'Error':\n return a.name === b.name && a.message === b.message;\n\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n\n break;\n }\n\n var idx = stackA.length - 1;\n\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n idx = keysA.length - 1;\n\n while (idx >= 0) {\n var key = keysA[idx];\n\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n\n idx -= 1;\n }\n\n return true;\n}","export default function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _equals from \"./internal/_equals.js\";\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\nvar equals =\n/*#__PURE__*/\n_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\n\nexport default equals;","import equals from \"../equals.js\";\nexport default function _indexOf(list, a, idx) {\n var inf, item; // Array.prototype.indexOf doesn't exist below IE9\n\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n\n while (idx < list.length) {\n item = list[idx];\n\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } // non-zero numbers can utilise Set\n\n\n return list.indexOf(a, idx);\n // all these types can utilise Set\n\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n\n }\n } // anything else not covered above, defer to R.equals\n\n\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n}","import _indexOf from \"./_indexOf.js\";\nexport default function _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}","export default function _quote(s) {\n var escaped = s.replace(/\\\\/g, '\\\\\\\\').replace(/[\\b]/g, '\\\\b') // \\b matches word boundary; [\\b] matches backspace\n .replace(/\\f/g, '\\\\f').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t').replace(/\\v/g, '\\\\v').replace(/\\0/g, '\\\\0');\n return '\"' + escaped.replace(/\"/g, '\\\\\"') + '\"';\n}","/**\n * Polyfill from .\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nexport default _toISOString;","export default function _filter(fn, list) {\n var idx = 0;\n var len = list.length;\n var result = [];\n\n while (idx < len) {\n if (fn(list[idx])) {\n result[result.length] = list[idx];\n }\n\n idx += 1;\n }\n\n return result;\n}","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFilter =\n/*#__PURE__*/\nfunction () {\n function XFilter(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XFilter.prototype['@@transducer/init'] = _xfBase.init;\n XFilter.prototype['@@transducer/result'] = _xfBase.result;\n\n XFilter.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n };\n\n return XFilter;\n}();\n\nvar _xfilter =\n/*#__PURE__*/\n_curry2(function _xfilter(f, xf) {\n return new XFilter(f, xf);\n});\n\nexport default _xfilter;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _filter from \"./internal/_filter.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _xfilter from \"./internal/_xfilter.js\";\nimport keys from \"./keys.js\";\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar filter =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filterable) {\n return _isObject(filterable) ? _reduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n\n return acc;\n }, {}, keys(filterable)) : // else\n _filter(pred, filterable);\n}));\n\nexport default filter;","export default function _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}","import _complement from \"./internal/_complement.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport filter from \"./filter.js\";\n/**\n * The complement of [`filter`](#filter).\n *\n * Acts as a transducer if a transformer is given in list position. Filterable\n * objects include plain objects or any object that has a filter method such\n * as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array}\n * @see R.filter, R.transduce, R.addIndex\n * @example\n *\n * const isOdd = (n) => n % 2 !== 0;\n *\n * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar reject =\n/*#__PURE__*/\n_curry2(function reject(pred, filterable) {\n return filter(_complement(pred), filterable);\n});\n\nexport default reject;","export default function _complement(f) {\n return function () {\n return !f.apply(this, arguments);\n };\n}","import _includes from \"./_includes.js\";\nimport _map from \"./_map.js\";\nimport _quote from \"./_quote.js\";\nimport _toISOString from \"./_toISOString.js\";\nimport keys from \"../keys.js\";\nimport reject from \"../reject.js\";\nexport default function _toString(x, seen) {\n var recur = function recur(y) {\n var xs = seen.concat([x]);\n return _includes(y, xs) ? '' : _toString(y, xs);\n }; // mapPairs :: (Object, [String]) -> [String]\n\n\n var mapPairs = function (obj, keys) {\n return _map(function (k) {\n return _quote(k) + ': ' + recur(obj[k]);\n }, keys.slice().sort());\n };\n\n switch (Object.prototype.toString.call(x)) {\n case '[object Arguments]':\n return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';\n\n case '[object Array]':\n return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {\n return /^\\d+$/.test(k);\n }, keys(x)))).join(', ') + ']';\n\n case '[object Boolean]':\n return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();\n\n case '[object Date]':\n return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';\n\n case '[object Null]':\n return 'null';\n\n case '[object Number]':\n return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);\n\n case '[object String]':\n return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);\n\n case '[object Undefined]':\n return 'undefined';\n\n default:\n if (typeof x.toString === 'function') {\n var repr = x.toString();\n\n if (repr !== '[object Object]') {\n return repr;\n }\n }\n\n return '{' + mapPairs(x, keys(x)).join(', ') + '}';\n }\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _toString from \"./internal/_toString.js\";\n/**\n * Returns the string representation of the given value. `eval`'ing the output\n * should result in a value equivalent to the input value. Many of the built-in\n * `toString` methods do not satisfy this requirement.\n *\n * If the given value is an `[object Object]` with a `toString` method other\n * than `Object.prototype.toString`, this method is invoked with no arguments\n * to produce the return value. This means user-defined constructor functions\n * can provide a suitable `toString` method. For example:\n *\n * function Point(x, y) {\n * this.x = x;\n * this.y = y;\n * }\n *\n * Point.prototype.toString = function() {\n * return 'new Point(' + this.x + ', ' + this.y + ')';\n * };\n *\n * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category String\n * @sig * -> String\n * @param {*} val\n * @return {String}\n * @example\n *\n * R.toString(42); //=> '42'\n * R.toString('abc'); //=> '\"abc\"'\n * R.toString([1, 2, 3]); //=> '[1, 2, 3]'\n * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{\"bar\": 2, \"baz\": 3, \"foo\": 1}'\n * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date(\"2001-02-03T04:05:06.000Z\")'\n */\n\nvar toString =\n/*#__PURE__*/\n_curry1(function toString(val) {\n return _toString(val, []);\n});\n\nexport default toString;","import _curry2 from \"./internal/_curry2.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport _isFunction from \"./internal/_isFunction.js\";\nimport _isString from \"./internal/_isString.js\";\nimport toString from \"./toString.js\";\n/**\n * Returns the result of concatenating the given lists or strings.\n *\n * Note: `R.concat` expects both arguments to be of the same type,\n * unlike the native `Array.prototype.concat` method. It will throw\n * an error if you `concat` an Array with a non-Array value.\n *\n * Dispatches to the `concat` method of the first argument, if present.\n * Can also concatenate two members of a [fantasy-land\n * compatible semigroup](https://github.com/fantasyland/fantasy-land#semigroup).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @sig String -> String -> String\n * @param {Array|String} firstList The first list\n * @param {Array|String} secondList The second list\n * @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of\n * `secondList`.\n *\n * @example\n *\n * R.concat('ABC', 'DEF'); // 'ABCDEF'\n * R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n * R.concat([], []); //=> []\n */\n\nvar concat =\n/*#__PURE__*/\n_curry2(function concat(a, b) {\n if (_isArray(a)) {\n if (_isArray(b)) {\n return a.concat(b);\n }\n\n throw new TypeError(toString(b) + ' is not an array');\n }\n\n if (_isString(a)) {\n if (_isString(b)) {\n return a + b;\n }\n\n throw new TypeError(toString(b) + ' is not a string');\n }\n\n if (a != null && _isFunction(a['fantasy-land/concat'])) {\n return a['fantasy-land/concat'](b);\n }\n\n if (a != null && _isFunction(a.concat)) {\n return a.concat(b);\n }\n\n throw new TypeError(toString(a) + ' does not have a method named \"concat\" or \"fantasy-land/concat\"');\n});\n\nexport default concat;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns the larger of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.maxBy, R.min\n * @example\n *\n * R.max(789, 123); //=> 789\n * R.max('a', 'b'); //=> 'b'\n */\n\nvar max =\n/*#__PURE__*/\n_curry2(function max(a, b) {\n return b > a ? b : a;\n});\n\nexport default max;","import _includes from \"./_includes.js\";\n\nvar _Set =\n/*#__PURE__*/\nfunction () {\n function _Set() {\n /* globals Set */\n this._nativeSet = typeof Set === 'function' ? new Set() : null;\n this._items = {};\n }\n\n // until we figure out why jsdoc chokes on this\n // @param item The item to add to the Set\n // @returns {boolean} true if the item did not exist prior, otherwise false\n //\n _Set.prototype.add = function (item) {\n return !hasOrAdd(item, true, this);\n }; //\n // @param item The item to check for existence in the Set\n // @returns {boolean} true if the item exists in the Set, otherwise false\n //\n\n\n _Set.prototype.has = function (item) {\n return hasOrAdd(item, false, this);\n }; //\n // Combines the logic for checking whether an item is a member of the set and\n // for adding a new item to the set.\n //\n // @param item The item to check or add to the Set instance.\n // @param shouldAdd If true, the item will be added to the set if it doesn't\n // already exist.\n // @param set The set instance to check or add to.\n // @return {boolean} true if the item already existed, otherwise false.\n //\n\n\n return _Set;\n}();\n\nfunction hasOrAdd(item, shouldAdd, set) {\n var type = typeof item;\n var prevSize, newSize;\n\n switch (type) {\n case 'string':\n case 'number':\n // distinguish between +0 and -0\n if (item === 0 && 1 / item === -Infinity) {\n if (set._items['-0']) {\n return true;\n } else {\n if (shouldAdd) {\n set._items['-0'] = true;\n }\n\n return false;\n }\n } // these types can all utilise the native Set\n\n\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n\n set._nativeSet.add(item);\n\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = {};\n set._items[type][item] = true;\n }\n\n return false;\n } else if (item in set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][item] = true;\n }\n\n return false;\n }\n }\n\n case 'boolean':\n // set._items['boolean'] holds a two element array\n // representing [ falseExists, trueExists ]\n if (type in set._items) {\n var bIdx = item ? 1 : 0;\n\n if (set._items[type][bIdx]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][bIdx] = true;\n }\n\n return false;\n }\n } else {\n if (shouldAdd) {\n set._items[type] = item ? [false, true] : [true, false];\n }\n\n return false;\n }\n\n case 'function':\n // compare functions for reference equality\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n\n set._nativeSet.add(item);\n\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n\n return false;\n }\n\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n\n return false;\n }\n\n return true;\n }\n\n case 'undefined':\n if (set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type] = true;\n }\n\n return false;\n }\n\n case 'object':\n if (item === null) {\n if (!set._items['null']) {\n if (shouldAdd) {\n set._items['null'] = true;\n }\n\n return false;\n }\n\n return true;\n }\n\n /* falls through */\n\n default:\n // reduce the search size of heterogeneous sets by creating buckets\n // for each type.\n type = Object.prototype.toString.call(item);\n\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n\n return false;\n } // scan through all previously applied items\n\n\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n\n return false;\n }\n\n return true;\n }\n} // A simple Set type that honours R.equals semantics\n\n\nexport default _Set;","import nth from \"./nth.js\";\n/**\n * Returns the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.init, R.head, R.tail\n * @example\n *\n * R.last(['fi', 'fo', 'fum']); //=> 'fum'\n * R.last([]); //=> undefined\n *\n * R.last('abc'); //=> 'c'\n * R.last(''); //=> ''\n */\n\nvar last =\n/*#__PURE__*/\nnth(-1);\nexport default last;","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFind =\n/*#__PURE__*/\nfunction () {\n function XFind(f, xf) {\n this.xf = xf;\n this.f = f;\n this.found = false;\n }\n\n XFind.prototype['@@transducer/init'] = _xfBase.init;\n\n XFind.prototype['@@transducer/result'] = function (result) {\n if (!this.found) {\n result = this.xf['@@transducer/step'](result, void 0);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XFind.prototype['@@transducer/step'] = function (result, input) {\n if (this.f(input)) {\n this.found = true;\n result = _reduced(this.xf['@@transducer/step'](result, input));\n }\n\n return result;\n };\n\n return XFind;\n}();\n\nvar _xfind =\n/*#__PURE__*/\n_curry2(function _xfind(f, xf) {\n return new XFind(f, xf);\n});\n\nexport default _xfind;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xfind from \"./internal/_xfind.js\";\n/**\n * Returns the first element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Dispatches to the `find` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n * const xs = [{a: 1}, {a: 2}, {a: 3}];\n * R.find(R.propEq('a', 2))(xs); //=> {a: 2}\n * R.find(R.propEq('a', 4))(xs); //=> undefined\n */\n\nvar find =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['find'], _xfind, function find(fn, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (fn(list[idx])) {\n return list[idx];\n }\n\n idx += 1;\n }\n}));\n\nexport default find;","import _curry2 from \"./_curry2.js\";\nimport _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFindIndex =\n/*#__PURE__*/\nfunction () {\n function XFindIndex(f, xf) {\n this.xf = xf;\n this.f = f;\n this.idx = -1;\n this.found = false;\n }\n\n XFindIndex.prototype['@@transducer/init'] = _xfBase.init;\n\n XFindIndex.prototype['@@transducer/result'] = function (result) {\n if (!this.found) {\n result = this.xf['@@transducer/step'](result, -1);\n }\n\n return this.xf['@@transducer/result'](result);\n };\n\n XFindIndex.prototype['@@transducer/step'] = function (result, input) {\n this.idx += 1;\n\n if (this.f(input)) {\n this.found = true;\n result = _reduced(this.xf['@@transducer/step'](result, this.idx));\n }\n\n return result;\n };\n\n return XFindIndex;\n}();\n\nvar _xfindIndex =\n/*#__PURE__*/\n_curry2(function _xfindIndex(f, xf) {\n return new XFindIndex(f, xf);\n});\n\nexport default _xfindIndex;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xfindIndex from \"./internal/_xfindIndex.js\";\n/**\n * Returns the index of the first element of the list which matches the\n * predicate, or `-1` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> Number\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Number} The index of the element found, or `-1`.\n * @see R.transduce, R.indexOf\n * @example\n *\n * const xs = [{a: 1}, {a: 2}, {a: 3}];\n * R.findIndex(R.propEq('a', 2))(xs); //=> 1\n * R.findIndex(R.propEq('a', 4))(xs); //=> -1\n */\n\nvar findIndex =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable([], _xfindIndex, function findIndex(fn, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (fn(list[idx])) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n}));\n\nexport default findIndex;","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFindLast =\n/*#__PURE__*/\nfunction () {\n function XFindLast(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XFindLast.prototype['@@transducer/init'] = _xfBase.init;\n\n XFindLast.prototype['@@transducer/result'] = function (result) {\n return this.xf['@@transducer/result'](this.xf['@@transducer/step'](result, this.last));\n };\n\n XFindLast.prototype['@@transducer/step'] = function (result, input) {\n if (this.f(input)) {\n this.last = input;\n }\n\n return result;\n };\n\n return XFindLast;\n}();\n\nvar _xfindLast =\n/*#__PURE__*/\n_curry2(function _xfindLast(f, xf) {\n return new XFindLast(f, xf);\n});\n\nexport default _xfindLast;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xfindLast from \"./internal/_xfindLast.js\";\n/**\n * Returns the last element of the list which matches the predicate, or\n * `undefined` if no element matches.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> Boolean) -> [a] -> a | undefined\n * @param {Function} fn The predicate function used to determine if the element is the\n * desired one.\n * @param {Array} list The array to consider.\n * @return {Object} The element found, or `undefined`.\n * @see R.transduce\n * @example\n *\n * const xs = [{a: 1, b: 0}, {a:1, b: 1}];\n * R.findLast(R.propEq('a', 1))(xs); //=> {a: 1, b: 1}\n * R.findLast(R.propEq('a', 4))(xs); //=> undefined\n */\n\nvar findLast =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable([], _xfindLast, function findLast(fn, list) {\n var idx = list.length - 1;\n\n while (idx >= 0) {\n if (fn(list[idx])) {\n return list[idx];\n }\n\n idx -= 1;\n }\n}));\n\nexport default findLast;","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Iterate over an input `list`, calling a provided function `fn` for each\n * element in the list.\n *\n * `fn` receives one argument: *(value)*.\n *\n * Note: `R.forEach` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.forEach` method. For more\n * details on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach#Description\n *\n * Also note that, unlike `Array.prototype.forEach`, Ramda's `forEach` returns\n * the original array. In some libraries this function is named `each`.\n *\n * Dispatches to the `forEach` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig (a -> *) -> [a] -> [a]\n * @param {Function} fn The function to invoke. Receives one argument, `value`.\n * @param {Array} list The list to iterate over.\n * @return {Array} The original list.\n * @see R.addIndex\n * @example\n *\n * const printXPlusFive = x => console.log(x + 5);\n * R.forEach(printXPlusFive, [1, 2, 3]); //=> [1, 2, 3]\n * // logs 6\n * // logs 7\n * // logs 8\n * @symb R.forEach(f, [a, b, c]) = [a, b, c]\n */\n\nvar forEach =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_checkForMethod('forEach', function forEach(fn, list) {\n var len = list.length;\n var idx = 0;\n\n while (idx < len) {\n fn(list[idx]);\n idx += 1;\n }\n\n return list;\n}));\n\nexport default forEach;","import _curry2 from \"./internal/_curry2.js\";\nimport _has from \"./internal/_has.js\";\nimport isNil from \"./isNil.js\";\n/**\n * Returns whether or not a path exists in an object. Only the object's\n * own properties are checked.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {a} -> Boolean\n * @param {Array} path The path to use.\n * @param {Object} obj The object to check the path in.\n * @return {Boolean} Whether the path exists.\n * @see R.has\n * @example\n *\n * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true\n * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true\n * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false\n * R.hasPath(['a', 'b'], {}); // => false\n */\n\nvar hasPath =\n/*#__PURE__*/\n_curry2(function hasPath(_path, obj) {\n if (_path.length === 0 || isNil(obj)) {\n return false;\n }\n\n var val = obj;\n var idx = 0;\n\n while (idx < _path.length) {\n if (!isNil(val) && _has(_path[idx], val)) {\n val = val[_path[idx]];\n idx += 1;\n } else {\n return false;\n }\n }\n\n return true;\n});\n\nexport default hasPath;","import _curry2 from \"./internal/_curry2.js\";\nimport hasPath from \"./hasPath.js\";\n/**\n * Returns whether or not an object has an own property with the specified name\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Object\n * @sig s -> {s: x} -> Boolean\n * @param {String} prop The name of the property to check for.\n * @param {Object} obj The object to query.\n * @return {Boolean} Whether the property exists.\n * @example\n *\n * const hasName = R.has('name');\n * hasName({name: 'alice'}); //=> true\n * hasName({name: 'bob'}); //=> true\n * hasName({}); //=> false\n *\n * const point = {x: 0, y: 0};\n * const pointHas = R.has(R.__, point);\n * pointHas('x'); //=> true\n * pointHas('y'); //=> true\n * pointHas('z'); //=> false\n */\n\nvar has =\n/*#__PURE__*/\n_curry2(function has(prop, obj) {\n return hasPath([prop], obj);\n});\n\nexport default has;","import nth from \"./nth.js\";\n/**\n * Returns the first element of the given list or string. In some libraries\n * this function is named `first`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String\n * @param {Array|String} list\n * @return {*}\n * @see R.tail, R.init, R.last\n * @example\n *\n * R.head(['fi', 'fo', 'fum']); //=> 'fi'\n * R.head([]); //=> undefined\n *\n * R.head('abc'); //=> 'a'\n * R.head(''); //=> ''\n */\n\nvar head =\n/*#__PURE__*/\nnth(0);\nexport default head;","import _curry3 from \"./internal/_curry3.js\";\nimport curryN from \"./curryN.js\";\n/**\n * Creates a function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Logic\n * @sig (*... -> Boolean) -> (*... -> *) -> (*... -> *) -> (*... -> *)\n * @param {Function} condition A predicate function\n * @param {Function} onTrue A function to invoke when the `condition` evaluates to a truthy value.\n * @param {Function} onFalse A function to invoke when the `condition` evaluates to a falsy value.\n * @return {Function} A new function that will process either the `onTrue` or the `onFalse`\n * function depending upon the result of the `condition` predicate.\n * @see R.unless, R.when, R.cond\n * @example\n *\n * const incCount = R.ifElse(\n * R.has('count'),\n * R.over(R.lensProp('count'), R.inc),\n * R.assoc('count', 1)\n * );\n * incCount({ count: 1 }); //=> { count: 2 }\n * incCount({}); //=> { count: 1 }\n */\n\nvar ifElse =\n/*#__PURE__*/\n_curry3(function ifElse(condition, onTrue, onFalse) {\n return curryN(Math.max(condition.length, onTrue.length, onFalse.length), function _ifElse() {\n return condition.apply(this, arguments) ? onTrue.apply(this, arguments) : onFalse.apply(this, arguments);\n });\n});\n\nexport default ifElse;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Also works with strings.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.includes(3, [1, 2, 3]); //=> true\n * R.includes(4, [1, 2, 3]); //=> false\n * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.includes([42], [[42]]); //=> true\n * R.includes('ba', 'banana'); //=>true\n */\n\nvar includes =\n/*#__PURE__*/\n_curry2(_includes);\n\nexport default includes;","import _curry2 from \"./internal/_curry2.js\";\nimport _indexOf from \"./internal/_indexOf.js\";\nimport _isArray from \"./internal/_isArray.js\";\n/**\n * Returns the position of the first occurrence of an item in an array, or -1\n * if the item is not included in the array. [`R.equals`](#equals) is used to\n * determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> Number\n * @param {*} target The item to find.\n * @param {Array} xs The array to search in.\n * @return {Number} the index of the target, or -1 if the target is not found.\n * @see R.lastIndexOf, R.findIndex\n * @example\n *\n * R.indexOf(3, [1,2,3,4]); //=> 2\n * R.indexOf(10, [1,2,3,4]); //=> -1\n */\n\nvar indexOf =\n/*#__PURE__*/\n_curry2(function indexOf(target, xs) {\n return typeof xs.indexOf === 'function' && !_isArray(xs) ? xs.indexOf(target) : _indexOf(xs, target, 0);\n});\n\nexport default indexOf;","import _curry3 from \"./internal/_curry3.js\";\n/**\n * Inserts the sub-list into the list, at the specified `index`. _Note that this is not\n * destructive_: it returns a copy of the list with the changes.\n * No lists have been harmed in the application of this function.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig Number -> [a] -> [a] -> [a]\n * @param {Number} index The position to insert the sub-list\n * @param {Array} elts The sub-list to insert into the Array\n * @param {Array} list The list to insert the sub-list into\n * @return {Array} A new Array with `elts` inserted starting at `index`.\n * @example\n *\n * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4]\n */\n\nvar insertAll =\n/*#__PURE__*/\n_curry3(function insertAll(idx, elts, list) {\n idx = idx < list.length && idx >= 0 ? idx : list.length;\n return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx));\n});\n\nexport default insertAll;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n/**\n * Returns a new function much like the supplied one, except that the first two\n * arguments' order is reversed.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z)\n * @param {Function} fn The function to invoke with its first two parameters reversed.\n * @return {*} The result of invoking `fn` with its first two parameters' order reversed.\n * @example\n *\n * const mergeThree = (a, b, c) => [].concat(a, b, c);\n *\n * mergeThree(1, 2, 3); //=> [1, 2, 3]\n *\n * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]\n * @symb R.flip(f)(a, b, c) = f(b, a, c)\n */\n\nvar flip =\n/*#__PURE__*/\n_curry1(function flip(fn) {\n return curryN(fn.length, function (a, b) {\n var args = Array.prototype.slice.call(arguments, 0);\n args[0] = b;\n args[1] = a;\n return fn.apply(this, args);\n });\n});\n\nexport default flip;","export default function _identity(x) {\n return x;\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _identity from \"./internal/_identity.js\";\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\n\nvar identity =\n/*#__PURE__*/\n_curry1(_identity);\n\nexport default identity;","import _curry2 from \"./_curry2.js\";\nimport _Set from \"./_Set.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XUniqBy =\n/*#__PURE__*/\nfunction () {\n function XUniqBy(f, xf) {\n this.xf = xf;\n this.f = f;\n this.set = new _Set();\n }\n\n XUniqBy.prototype['@@transducer/init'] = _xfBase.init;\n XUniqBy.prototype['@@transducer/result'] = _xfBase.result;\n\n XUniqBy.prototype['@@transducer/step'] = function (result, input) {\n return this.set.add(this.f(input)) ? this.xf['@@transducer/step'](result, input) : result;\n };\n\n return XUniqBy;\n}();\n\nvar _xuniqBy =\n/*#__PURE__*/\n_curry2(function _xuniqBy(f, xf) {\n return new XUniqBy(f, xf);\n});\n\nexport default _xuniqBy;","import identity from \"./identity.js\";\nimport uniqBy from \"./uniqBy.js\";\n/**\n * Returns a new list containing only one copy of each element in the original\n * list. [`R.equals`](#equals) is used to determine equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniq([1, 1, 2, 1]); //=> [1, 2]\n * R.uniq([1, '1']); //=> [1, '1']\n * R.uniq([[42], [42]]); //=> [[42]]\n */\n\nvar uniq =\n/*#__PURE__*/\nuniqBy(identity);\nexport default uniq;","import _Set from \"./internal/_Set.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xuniqBy from \"./internal/_xuniqBy.js\";\n/**\n * Returns a new list containing only one copy of each element in the original\n * list, based upon the value returned by applying the supplied function to\n * each list element. Prefers the first item if the supplied function produces\n * the same value on two items. [`R.equals`](#equals) is used for comparison.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig (a -> b) -> [a] -> [a]\n * @param {Function} fn A function used to produce a value to use during comparisons.\n * @param {Array} list The array to consider.\n * @return {Array} The list of unique items.\n * @example\n *\n * R.uniqBy(Math.abs, [-1, -5, 2, 10, 1, 2]); //=> [-1, -5, 2, 10]\n */\n\nvar uniqBy =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable([], _xuniqBy, function (fn, list) {\n var set = new _Set();\n var result = [];\n var idx = 0;\n var appliedItem, item;\n\n while (idx < list.length) {\n item = list[idx];\n appliedItem = fn(item);\n\n if (set.add(appliedItem)) {\n result.push(item);\n }\n\n idx += 1;\n }\n\n return result;\n}));\n\nexport default uniqBy;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _filter from \"./internal/_filter.js\";\nimport flip from \"./flip.js\";\nimport uniq from \"./uniq.js\";\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of those\n * elements common to both lists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The list of elements found in both `list1` and `list2`.\n * @see R.innerJoin\n * @example\n *\n * R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3]\n */\n\nvar intersection =\n/*#__PURE__*/\n_curry2(function intersection(list1, list2) {\n var lookupList, filteredList;\n\n if (list1.length > list2.length) {\n lookupList = list1;\n filteredList = list2;\n } else {\n lookupList = list2;\n filteredList = list1;\n }\n\n return uniq(_filter(flip(_includes)(lookupList), filteredList));\n});\n\nexport default intersection;","import _has from \"./_has.js\"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n\n while (idx < length) {\n var source = arguments[idx];\n\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n\n idx += 1;\n }\n\n return output;\n}\n\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * See if an object (i.e. `val`) is an instance of the supplied constructor. This\n * function will check up the inheritance chain, if any.\n * If `val` was created using `Object.create`, `R.is(Object, val) === true`.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Type\n * @sig (* -> {*}) -> a -> Boolean\n * @param {Object} ctor A constructor\n * @param {*} val The value to test\n * @return {Boolean}\n * @example\n *\n * R.is(Object, {}); //=> true\n * R.is(Number, 1); //=> true\n * R.is(Object, 1); //=> false\n * R.is(String, 's'); //=> true\n * R.is(String, new String('')); //=> true\n * R.is(Object, new String('')); //=> true\n * R.is(Object, 's'); //=> false\n * R.is(Number, {}); //=> false\n */\n\nvar is =\n/*#__PURE__*/\n_curry2(function is(Ctor, val) {\n return val instanceof Ctor || val != null && (val.constructor === Ctor || Ctor.name === 'Object' && typeof val === 'object');\n});\n\nexport default is;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Returns a list containing the names of all the properties of the supplied\n * object, including prototype properties.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own and prototype properties.\n * @see R.keys, R.valuesIn\n * @example\n *\n * const F = function() { this.x = 'X'; };\n * F.prototype.y = 'Y';\n * const f = new F();\n * R.keysIn(f); //=> ['x', 'y']\n */\n\nvar keysIn =\n/*#__PURE__*/\n_curry1(function keysIn(obj) {\n var prop;\n var ks = [];\n\n for (prop in obj) {\n ks[ks.length] = prop;\n }\n\n return ks;\n});\n\nexport default keysIn;","import _curry2 from \"./internal/_curry2.js\";\nimport map from \"./map.js\";\n/**\n * Returns a lens for the given getter and setter functions. The getter \"gets\"\n * the value of the focus; the setter \"sets\" the value of the focus. The setter\n * should not mutate the data structure.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig (s -> a) -> ((a, s) -> s) -> Lens s a\n * @param {Function} getter\n * @param {Function} setter\n * @return {Lens}\n * @see R.view, R.set, R.over, R.lensIndex, R.lensProp\n * @example\n *\n * const xLens = R.lens(R.prop('x'), R.assoc('x'));\n *\n * R.view(xLens, {x: 1, y: 2}); //=> 1\n * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}\n * R.over(xLens, R.negate, {x: 1, y: 2}); //=> {x: -1, y: 2}\n */\n\nvar lens =\n/*#__PURE__*/\n_curry2(function lens(getter, setter) {\n return function (toFunctorFn) {\n return function (target) {\n return map(function (focus) {\n return setter(focus, target);\n }, toFunctorFn(getter(target)));\n };\n };\n});\n\nexport default lens;","import _curry2 from \"./internal/_curry2.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport nth from \"./nth.js\";\n/**\n * Retrieves the values at given paths of an object.\n *\n * @func\n * @memberOf R\n * @since v0.27.1\n * @category Object\n * @typedefn Idx = [String | Int | Symbol]\n * @sig [Idx] -> {a} -> [a | Undefined]\n * @param {Array} pathsArray The array of paths to be fetched.\n * @param {Object} obj The object to retrieve the nested properties from.\n * @return {Array} A list consisting of values at paths specified by \"pathsArray\".\n * @see R.path\n * @example\n *\n * R.paths([['a', 'b'], ['p', 0, 'q']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, 3]\n * R.paths([['a', 'b'], ['p', 'r']], {a: {b: 2}, p: [{q: 3}]}); //=> [2, undefined]\n */\n\nvar paths =\n/*#__PURE__*/\n_curry2(function paths(pathsArray, obj) {\n return pathsArray.map(function (paths) {\n var val = obj;\n var idx = 0;\n var p;\n\n while (idx < paths.length) {\n if (val == null) {\n return;\n }\n\n p = paths[idx];\n val = _isInteger(p) ? nth(p, val) : val[p];\n idx += 1;\n }\n\n return val;\n });\n});\n\nexport default paths;","import _curry2 from \"./internal/_curry2.js\";\nimport paths from \"./paths.js\";\n/**\n * Retrieve the value at a given path.\n *\n * @func\n * @memberOf R\n * @since v0.2.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {a} -> a | Undefined\n * @param {Array} path The path to use.\n * @param {Object} obj The object to retrieve the nested property from.\n * @return {*} The data at `path`.\n * @see R.prop, R.nth\n * @example\n *\n * R.path(['a', 'b'], {a: {b: 2}}); //=> 2\n * R.path(['a', 'b'], {c: {b: 2}}); //=> undefined\n * R.path(['a', 'b', 0], {a: {b: [1, 2, 3]}}); //=> 1\n * R.path(['a', 'b', -2], {a: {b: [1, 2, 3]}}); //=> 2\n */\n\nvar path =\n/*#__PURE__*/\n_curry2(function path(pathAr, obj) {\n return paths([pathAr], obj)[0];\n});\n\nexport default path;","import _curry1 from \"./internal/_curry1.js\";\nimport assocPath from \"./assocPath.js\";\nimport lens from \"./lens.js\";\nimport path from \"./path.js\";\n/**\n * Returns a lens whose focus is the specified path.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig [Idx] -> Lens s a\n * @param {Array} path The path to use.\n * @return {Lens}\n * @see R.view, R.set, R.over\n * @example\n *\n * const xHeadYLens = R.lensPath(['x', 0, 'y']);\n *\n * R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n * //=> 2\n * R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n * //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]}\n * R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]});\n * //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]}\n */\n\nvar lensPath =\n/*#__PURE__*/\n_curry1(function lensPath(p) {\n return lens(path(p), assocPath(p));\n});\n\nexport default lensPath;","import add from \"./add.js\";\nimport reduce from \"./reduce.js\";\n/**\n * Adds together all the elements of a list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig [Number] -> Number\n * @param {Array} list An array of numbers\n * @return {Number} The sum of all the numbers in the list.\n * @see R.reduce\n * @example\n *\n * R.sum([2,4,6,8,100,1]); //=> 121\n */\n\nvar sum =\n/*#__PURE__*/\nreduce(add, 0);\nexport default sum;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Adds two values.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Math\n * @sig Number -> Number -> Number\n * @param {Number} a\n * @param {Number} b\n * @return {Number}\n * @see R.subtract\n * @example\n *\n * R.add(2, 3); //=> 5\n * R.add(7)(10); //=> 17\n */\n\nvar add =\n/*#__PURE__*/\n_curry2(function add(a, b) {\n return Number(a) + Number(b);\n});\n\nexport default add;","import _objectAssign from \"./internal/_objectAssign.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n/**\n * Creates one new object with the own properties from a list of objects.\n * If a key exists in more than one object, the value from the last\n * object it exists in will be used.\n *\n * @func\n * @memberOf R\n * @since v0.10.0\n * @category List\n * @sig [{k: v}] -> {k: v}\n * @param {Array} list An array of objects\n * @return {Object} A merged object.\n * @see R.reduce\n * @example\n *\n * R.mergeAll([{foo:1},{bar:2},{baz:3}]); //=> {foo:1,bar:2,baz:3}\n * R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2}\n * @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 }\n */\n\nvar mergeAll =\n/*#__PURE__*/\n_curry1(function mergeAll(list) {\n return _objectAssign.apply(null, [{}].concat(list));\n});\n\nexport default mergeAll;","import _objectAssign from \"./internal/_objectAssign.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * const withDefaults = R.mergeRight({x: 0, y: 0});\n * withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeRight(a, b) = {...a, ...b}\n */\n\nvar mergeRight =\n/*#__PURE__*/\n_curry2(function mergeRight(l, r) {\n return _objectAssign({}, l, r);\n});\n\nexport default mergeRight;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns the smaller of its two arguments.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord a => a -> a -> a\n * @param {*} a\n * @param {*} b\n * @return {*}\n * @see R.minBy, R.max\n * @example\n *\n * R.min(789, 123); //=> 123\n * R.min('a', 'b'); //=> 'a'\n */\n\nvar min =\n/*#__PURE__*/\n_curry2(function min(a, b) {\n return b < a ? b : a;\n});\n\nexport default min;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\n\nvar omit =\n/*#__PURE__*/\n_curry2(function omit(names, obj) {\n var result = {};\n var index = {};\n var idx = 0;\n var len = names.length;\n\n while (idx < len) {\n index[names[idx]] = 1;\n idx += 1;\n }\n\n for (var prop in obj) {\n if (!index.hasOwnProperty(prop)) {\n result[prop] = obj[prop];\n }\n }\n\n return result;\n});\n\nexport default omit;","import _arity from \"./internal/_arity.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n/**\n * Accepts a function `fn` and returns a function that guards invocation of\n * `fn` such that `fn` can only ever be called once, no matter how many times\n * the returned function is invoked. The first value calculated is returned in\n * subsequent invocations.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (a... -> b) -> (a... -> b)\n * @param {Function} fn The function to wrap in a call-only-once wrapper.\n * @return {Function} The wrapped function.\n * @example\n *\n * const addOneOnce = R.once(x => x + 1);\n * addOneOnce(10); //=> 11\n * addOneOnce(addOneOnce(50)); //=> 11\n */\n\nvar once =\n/*#__PURE__*/\n_curry1(function once(fn) {\n var called = false;\n var result;\n return _arity(fn.length, function () {\n if (called) {\n return result;\n }\n\n called = true;\n result = fn.apply(this, arguments);\n return result;\n });\n});\n\nexport default once;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object containing only the keys specified. If\n * the key does not exist, the property is ignored.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> {k: v}\n * @param {Array} names an array of String property names to copy onto a new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties from `names` on it.\n * @see R.omit, R.props\n * @example\n *\n * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}\n * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}\n */\n\nvar pick =\n/*#__PURE__*/\n_curry2(function pick(names, obj) {\n var result = {};\n var idx = 0;\n\n while (idx < names.length) {\n if (names[idx] in obj) {\n result[names[idx]] = obj[names[idx]];\n }\n\n idx += 1;\n }\n\n return result;\n});\n\nexport default pick;","import _curry2 from \"./internal/_curry2.js\";\nimport path from \"./path.js\";\n/**\n * Acts as multiple `prop`: array of keys in, array of values out. Preserves\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> [v]\n * @param {Array} ps The property names to fetch\n * @param {Object} obj The object to query\n * @return {Array} The corresponding values or partially applied function.\n * @see R.prop, R.pluck, R.project\n * @example\n *\n * R.props(['x', 'y'], {x: 1, y: 2}); //=> [1, 2]\n * R.props(['c', 'a', 'b'], {b: 2, a: 1}); //=> [undefined, 1, 2]\n *\n * const fullName = R.compose(R.join(' '), R.props(['first', 'last']));\n * fullName({last: 'Bullet-Tooth', age: 33, first: 'Tony'}); //=> 'Tony Bullet-Tooth'\n */\n\nvar props =\n/*#__PURE__*/\n_curry2(function props(ps, obj) {\n return ps.map(function (p) {\n return path([p], obj);\n });\n});\n\nexport default props;","export default function _isNumber(x) {\n return Object.prototype.toString.call(x) === '[object Number]';\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _isNumber from \"./internal/_isNumber.js\";\n/**\n * Returns a list of numbers from `from` (inclusive) to `to` (exclusive).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> Number -> [Number]\n * @param {Number} from The first number in the list.\n * @param {Number} to One more than the last number in the list.\n * @return {Array} The list of numbers in the set `[a, b)`.\n * @example\n *\n * R.range(1, 5); //=> [1, 2, 3, 4]\n * R.range(50, 53); //=> [50, 51, 52]\n */\n\nvar range =\n/*#__PURE__*/\n_curry2(function range(from, to) {\n if (!(_isNumber(from) && _isNumber(to))) {\n throw new TypeError('Both arguments to range must be numbers');\n }\n\n var result = [];\n var n = from;\n\n while (n < to) {\n result.push(n);\n n += 1;\n }\n\n return result;\n});\n\nexport default range;","import _curryN from \"./internal/_curryN.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _reduced from \"./internal/_reduced.js\";\n/**\n * Like [`reduce`](#reduce), `reduceWhile` returns a single item by iterating\n * through the list, successively calling the iterator function. `reduceWhile`\n * also takes a predicate that is evaluated before each step. If the predicate\n * returns `false`, it \"short-circuits\" the iteration and returns the current\n * value of the accumulator. `reduceWhile` may alternatively be short-circuited\n * via [`reduced`](#reduced).\n *\n * @func\n * @memberOf R\n * @since v0.22.0\n * @category List\n * @sig ((a, b) -> Boolean) -> ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} pred The predicate. It is passed the accumulator and the\n * current element.\n * @param {Function} fn The iterator function. Receives two values, the\n * accumulator and the current element.\n * @param {*} a The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduce, R.reduced\n * @example\n *\n * const isOdd = (acc, x) => x % 2 !== 0;\n * const xs = [1, 3, 5, 60, 777, 800];\n * R.reduceWhile(isOdd, R.add, 0, xs); //=> 9\n *\n * const ys = [2, 4, 6]\n * R.reduceWhile(isOdd, R.add, 111, ys); //=> 111\n */\n\nvar reduceWhile =\n/*#__PURE__*/\n_curryN(4, [], function _reduceWhile(pred, fn, a, list) {\n return _reduce(function (acc, x) {\n return pred(acc, x) ? fn(acc, x) : _reduced(acc);\n }, a, list);\n});\n\nexport default reduceWhile;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n * const t = R.always('Tee');\n * t(); //=> 'Tee'\n */\n\nvar always =\n/*#__PURE__*/\n_curry1(function always(val) {\n return function () {\n return val;\n };\n});\n\nexport default always;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Calls an input function `n` times, returning an array containing the results\n * of those function calls.\n *\n * `fn` is passed one argument: The current value of `n`, which begins at `0`\n * and is gradually incremented to `n - 1`.\n *\n * @func\n * @memberOf R\n * @since v0.2.3\n * @category List\n * @sig (Number -> a) -> Number -> [a]\n * @param {Function} fn The function to invoke. Passed one argument, the current value of `n`.\n * @param {Number} n A value between `0` and `n - 1`. Increments after each function call.\n * @return {Array} An array containing the return values of all calls to `fn`.\n * @see R.repeat\n * @example\n *\n * R.times(R.identity, 5); //=> [0, 1, 2, 3, 4]\n * @symb R.times(f, 0) = []\n * @symb R.times(f, 1) = [f(0)]\n * @symb R.times(f, 2) = [f(0), f(1)]\n */\n\nvar times =\n/*#__PURE__*/\n_curry2(function times(fn, n) {\n var len = Number(n);\n var idx = 0;\n var list;\n\n if (len < 0 || isNaN(len)) {\n throw new RangeError('n must be a non-negative number');\n }\n\n list = new Array(len);\n\n while (idx < len) {\n list[idx] = fn(idx);\n idx += 1;\n }\n\n return list;\n});\n\nexport default times;","import _curry2 from \"./internal/_curry2.js\";\nimport always from \"./always.js\";\nimport times from \"./times.js\";\n/**\n * Returns a fixed list of size `n` containing a specified identical value.\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category List\n * @sig a -> n -> [a]\n * @param {*} value The value to repeat.\n * @param {Number} n The desired size of the output list.\n * @return {Array} A new array containing `n` `value`s.\n * @see R.times\n * @example\n *\n * R.repeat('hi', 5); //=> ['hi', 'hi', 'hi', 'hi', 'hi']\n *\n * const obj = {};\n * const repeatedObjs = R.repeat(obj, 5); //=> [{}, {}, {}, {}, {}]\n * repeatedObjs[0] === repeatedObjs[1]; //=> true\n * @symb R.repeat(a, 0) = []\n * @symb R.repeat(a, 1) = [a]\n * @symb R.repeat(a, 2) = [a, a]\n */\n\nvar repeat =\n/*#__PURE__*/\n_curry2(function repeat(value, n) {\n return times(always(value), n);\n});\n\nexport default repeat;","import _curry3 from \"./internal/_curry3.js\"; // `Identity` is a functor that holds a single value, where `map` simply\n// transforms the held value with the provided function.\n\nvar Identity = function (x) {\n return {\n value: x,\n map: function (f) {\n return Identity(f(x));\n }\n };\n};\n/**\n * Returns the result of \"setting\" the portion of the given data structure\n * focused by the given lens to the result of applying the given function to\n * the focused value.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> (a -> a) -> s -> s\n * @param {Lens} lens\n * @param {*} v\n * @param {*} x\n * @return {*}\n * @see R.view, R.set, R.lens, R.lensIndex, R.lensProp, R.lensPath\n * @example\n *\n * const headLens = R.lensIndex(0);\n *\n * R.over(headLens, R.toUpper, ['foo', 'bar', 'baz']); //=> ['FOO', 'bar', 'baz']\n */\n\n\nvar over =\n/*#__PURE__*/\n_curry3(function over(lens, f, x) {\n // The value returned by the getter function is first transformed with `f`,\n // then set as the value of an `Identity`. This is then mapped over with the\n // setter function of the lens.\n return lens(function (y) {\n return Identity(f(y));\n })(x).value;\n});\n\nexport default over;","import _curry3 from \"./internal/_curry3.js\";\nimport always from \"./always.js\";\nimport over from \"./over.js\";\n/**\n * Returns the result of \"setting\" the portion of the given data structure\n * focused by the given lens to the given value.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category Object\n * @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s\n * @sig Lens s a -> a -> s -> s\n * @param {Lens} lens\n * @param {*} v\n * @param {*} x\n * @return {*}\n * @see R.view, R.over, R.lens, R.lensIndex, R.lensProp, R.lensPath\n * @example\n *\n * const xLens = R.lensProp('x');\n *\n * R.set(xLens, 4, {x: 1, y: 2}); //=> {x: 4, y: 2}\n * R.set(xLens, 8, {x: 1, y: 2}); //=> {x: 8, y: 2}\n */\n\nvar set =\n/*#__PURE__*/\n_curry3(function set(lens, v, x) {\n return over(lens, always(v), x);\n});\n\nexport default set;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Sorts a list according to a list of comparators.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Relation\n * @sig [(a, a) -> Number] -> [a] -> [a]\n * @param {Array} functions A list of comparator functions.\n * @param {Array} list The list to sort.\n * @return {Array} A new list sorted according to the comarator functions.\n * @see R.ascend, R.descend\n * @example\n *\n * const alice = {\n * name: 'alice',\n * age: 40\n * };\n * const bob = {\n * name: 'bob',\n * age: 30\n * };\n * const clara = {\n * name: 'clara',\n * age: 40\n * };\n * const people = [clara, bob, alice];\n * const ageNameSort = R.sortWith([\n * R.descend(R.prop('age')),\n * R.ascend(R.prop('name'))\n * ]);\n * ageNameSort(people); //=> [alice, clara, bob]\n */\n\nvar sortWith =\n/*#__PURE__*/\n_curry2(function sortWith(fns, list) {\n return Array.prototype.slice.call(list, 0).sort(function (a, b) {\n var result = 0;\n var i = 0;\n\n while (result === 0 && i < fns.length) {\n result = fns[i](a, b);\n i += 1;\n }\n\n return result;\n });\n});\n\nexport default sortWith;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\n/**\n * Converts an object into an array of key, value arrays. Only the object's\n * own properties are used.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.4.0\n * @category Object\n * @sig {String: *} -> [[String,*]]\n * @param {Object} obj The object to extract from\n * @return {Array} An array of key, value arrays from the object's own properties.\n * @see R.fromPairs, R.keys, R.values\n * @example\n *\n * R.toPairs({a: 1, b: 2, c: 3}); //=> [['a', 1], ['b', 2], ['c', 3]]\n */\n\nvar toPairs =\n/*#__PURE__*/\n_curry1(function toPairs(obj) {\n var pairs = [];\n\n for (var prop in obj) {\n if (_has(prop, obj)) {\n pairs[pairs.length] = [prop, obj[prop]];\n }\n }\n\n return pairs;\n});\n\nexport default toPairs;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Transposes the rows and columns of a 2D list.\n * When passed a list of `n` lists of length `x`,\n * returns a list of `x` lists of length `n`.\n *\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [[a]] -> [[a]]\n * @param {Array} list A 2D list\n * @return {Array} A 2D list\n * @example\n *\n * R.transpose([[1, 'a'], [2, 'b'], [3, 'c']]) //=> [[1, 2, 3], ['a', 'b', 'c']]\n * R.transpose([[1, 2, 3], ['a', 'b', 'c']]) //=> [[1, 'a'], [2, 'b'], [3, 'c']]\n *\n * // If some of the rows are shorter than the following rows, their elements are skipped:\n * R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]]\n * @symb R.transpose([[a], [b], [c]]) = [a, b, c]\n * @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]]\n * @symb R.transpose([[a, b], [c]]) = [[a, c], [b]]\n */\n\nvar transpose =\n/*#__PURE__*/\n_curry1(function transpose(outerlist) {\n var i = 0;\n var result = [];\n\n while (i < outerlist.length) {\n var innerlist = outerlist[i];\n var j = 0;\n\n while (j < innerlist.length) {\n if (typeof result[j] === 'undefined') {\n result[j] = [];\n }\n\n result[j].push(innerlist[j]);\n j += 1;\n }\n\n i += 1;\n }\n\n return result;\n});\n\nexport default transpose;","import _concat from \"./internal/_concat.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport compose from \"./compose.js\";\nimport uniq from \"./uniq.js\";\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of the elements\n * of each list.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} as The first list.\n * @param {Array} bs The second list.\n * @return {Array} The first and second lists concatenated, with\n * duplicates removed.\n * @example\n *\n * R.union([1, 2, 3], [2, 3, 4]); //=> [1, 2, 3, 4]\n */\n\nvar union =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\ncompose(uniq, _concat));\n\nexport default union;","import _curry1 from \"./internal/_curry1.js\";\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\n\nvar trim = !hasProtoTrim ||\n/*#__PURE__*/\nws.trim() || !\n/*#__PURE__*/\nzeroWidth.trim() ?\n/*#__PURE__*/\n_curry1(function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n}) :\n/*#__PURE__*/\n_curry1(function trim(str) {\n return str.trim();\n});\nexport default trim;","import _identity from \"./internal/_identity.js\";\nimport chain from \"./chain.js\";\n/**\n * Shorthand for `R.chain(R.identity)`, which removes one level of nesting from\n * any [Chain](https://github.com/fantasyland/fantasy-land#chain).\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig Chain c => c (c a) -> c a\n * @param {*} list\n * @return {*}\n * @see R.flatten, R.chain\n * @example\n *\n * R.unnest([1, [2], [[3]]]); //=> [1, 2, [3]]\n * R.unnest([[1, 2], [3, 4], [5, 6]]); //=> [1, 2, 3, 4, 5, 6]\n */\n\nvar unnest =\n/*#__PURE__*/\nchain(_identity);\nexport default unnest;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport flip from \"./flip.js\";\nimport reject from \"./reject.js\";\n/**\n * Returns a new list without values in the first argument.\n * [`R.equals`](#equals) is used to determine equality.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @param {Array} list1 The values to be removed from `list2`.\n * @param {Array} list2 The array to remove values from.\n * @return {Array} The new array without values in `list1`.\n * @see R.transduce, R.difference, R.remove\n * @example\n *\n * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4]\n */\n\nvar without =\n/*#__PURE__*/\n_curry2(function (xs, list) {\n return reject(flip(_includes)(xs), list);\n});\n\nexport default without;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Creates a new list out of the two supplied by creating each possible pair\n * from the lists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b] -> [[a,b]]\n * @param {Array} as The first list.\n * @param {Array} bs The second list.\n * @return {Array} The list made by combining each possible pair from\n * `as` and `bs` into pairs (`[a, b]`).\n * @example\n *\n * R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']]\n * @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]]\n */\n\nvar xprod =\n/*#__PURE__*/\n_curry2(function xprod(a, b) {\n // = xprodWith(prepend); (takes about 3 times as long...)\n var idx = 0;\n var ilen = a.length;\n var j;\n var jlen = b.length;\n var result = [];\n\n while (idx < ilen) {\n j = 0;\n\n while (j < jlen) {\n result[result.length] = [a[idx], b[j]];\n j += 1;\n }\n\n idx += 1;\n }\n\n return result;\n});\n\nexport default xprod;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Creates a new list out of the two supplied by pairing up equally-positioned\n * items from both lists. The returned list is truncated to the length of the\n * shorter of the two input lists.\n * Note: `zip` is equivalent to `zipWith(function(a, b) { return [a, b] })`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [b] -> [[a,b]]\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by pairing up same-indexed elements of `list1` and `list2`.\n * @example\n *\n * R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']]\n * @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]]\n */\n\nvar zip =\n/*#__PURE__*/\n_curry2(function zip(a, b) {\n var rv = [];\n var idx = 0;\n var len = Math.min(a.length, b.length);\n\n while (idx < len) {\n rv[idx] = [a[idx], b[idx]];\n idx += 1;\n }\n\n return rv;\n});\n\nexport default zip;","import _curry3 from \"./internal/_curry3.js\";\n/**\n * Creates a new list out of the two supplied by applying the function to each\n * equally-positioned pair in the lists. The returned list is truncated to the\n * length of the shorter of the two input lists.\n *\n * @function\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> c) -> [a] -> [b] -> [c]\n * @param {Function} fn The function used to combine the two elements into one value.\n * @param {Array} list1 The first array to consider.\n * @param {Array} list2 The second array to consider.\n * @return {Array} The list made by combining same-indexed elements of `list1` and `list2`\n * using `fn`.\n * @example\n *\n * const f = (x, y) => {\n * // ...\n * };\n * R.zipWith(f, [1, 2, 3], ['a', 'b', 'c']);\n * //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')]\n * @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)]\n */\n\nvar zipWith =\n/*#__PURE__*/\n_curry3(function zipWith(fn, a, b) {\n var rv = [];\n var idx = 0;\n var len = Math.min(a.length, b.length);\n\n while (idx < len) {\n rv[idx] = fn(a[idx], b[idx]);\n idx += 1;\n }\n\n return rv;\n});\n\nexport default zipWith;","import _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _curry3 from \"./internal/_curry3.js\";\n/**\n * Removes the sub-list of `list` starting at index `start` and containing\n * `count` elements. _Note that this is not destructive_: it returns a copy of\n * the list with the changes.\n * No lists have been harmed in the application of this function.\n *\n * @func\n * @memberOf R\n * @since v0.2.2\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @param {Number} start The position to start removing elements\n * @param {Number} count The number of elements to remove\n * @param {Array} list The list to remove from\n * @return {Array} A new Array with `count` elements from `start` removed.\n * @see R.without\n * @example\n *\n * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]\n */\n\nvar remove =\n/*#__PURE__*/\n_curry3(function remove(start, count, list) {\n var result = Array.prototype.slice.call(list, 0);\n result.splice(start, count);\n return result;\n});\n\nexport default remove;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"108\":\"async-table\",\"471\":\"async-export\",\"790\":\"async-highlight\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var getCurrentScript = function() {\n var script = document.currentScript;\n if (!script) {\n /* Shim for IE11 and below */\n /* Do not take into account async scripts and inline scripts */\n\n var doc_scripts = document.getElementsByTagName('script');\n var scripts = [];\n\n for (var i = 0; i < doc_scripts.length; i++) {\n scripts.push(doc_scripts[i]);\n }\n\n scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n script = scripts.slice(-1)[0];\n }\n\n return script;\n};\n\nvar isLocalScript = function(script) {\n return /\\/_dash-component-suites\\//.test(script.src);\n};\n\nObject.defineProperty(__webpack_require__, 'p', {\n get: (function () {\n var script = getCurrentScript();\n\n var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n return function() {\n return url;\n };\n })()\n});\n\nif (typeof jsonpScriptSrc !== 'undefined') {\n var __jsonpScriptSrc__ = jsonpScriptSrc;\n jsonpScriptSrc = function(chunkId) {\n var script = getCurrentScript();\n var isLocal = isLocalScript(script);\n\n var src = __jsonpScriptSrc__(chunkId);\n\n if(!isLocal) {\n return src;\n }\n\n var srcFragments = src.split('/');\n var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n fileFragments.splice(1, 0, \"v5_2_2m1674572540\");\n srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n return srcFragments.join('/');\n };\n}\n","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t296: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdash_table\"] = self[\"webpackChunkdash_table\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","import 'css.escape'; // polyfill\nimport Environment from 'core/environment';\nimport Logger from 'core/Logger';\nimport DataTable from 'dash-table/dash/DataTable';\nLogger.setDebugLevel(Environment.debugLevel);\nLogger.setLogLevel(Environment.logLevel);\nexport { DataTable };\n"],"names":["leafPrototypes","getProto","inProgress","dataWebpackPrefix","e","window","module","exports","n","t","r","o","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","default","prototype","hasOwnProperty","p","s","u","a","done","Promise","resolve","then","this","arguments","apply","isReady","lazy","setTimeout","regeneratorRuntime","mark","wrap","prev","next","stop","_dashprivate_isLazyComponentReady","f","length","configurable","writable","key","TypeError","dispatchEvent","CustomEvent","addEventListener","removeEventListener","DebugLevel","LogLevel","LogString","__logLevel","__debugLevel","logFn","level","currentLevel","fn","console","log","warn","error","Error","prefix","toUpperCase","logger","setDebugLevel","setLogLevel","defineProperties","trace","info","warning","fatal","debug","freeze","__1day","__20years","CookieStorage","id","domain","path","enabled","expires","Date","now","toUTCString","document","cookie","toLowerCase","split","map","fragments","trim","find","toLocaleLowerCase","entry","delete","R","ret","indexOf","DASH_DEBUG","DASH_LOG","Environment","URL","constructor","location","href","searchParams","_activeEdge","_supportsCssVariables","Boolean","CSS","supports","LazyLoader","hljs","result","DataTable","Suspense","fallback","RealDataTable","props","Component","asyncDecorator","defaultProps","page_action","page_current","page_size","css","filter_query","filter_action","sort_as_null","sort_action","sort_mode","sort_by","style_as_list_view","derived_viewport_data","derived_viewport_indices","derived_viewport_row_ids","derived_viewport_selected_rows","derived_viewport_selected_row_ids","derived_virtual_data","derived_virtual_indices","derived_virtual_row_ids","derived_virtual_selected_rows","derived_virtual_selected_row_ids","dropdown","dropdown_conditional","dropdown_data","fill_width","filter_options","fixed_columns","headers","data","fixed_rows","markdown_options","link_target","html","tooltip","tooltip_conditional","tooltip_data","tooltip_header","tooltip_delay","tooltip_duration","column_selectable","editable","export_columns","export_format","include_headers_on_copy_paste","selected_cells","selected_columns","selected_rows","selected_row_ids","cell_selectable","row_selectable","style_table","style_cell_conditional","style_data_conditional","style_filter_conditional","style_header_conditional","virtualization","persisted_props","persistence_type","propTypes","PropTypes","columns","name","isRequired","type","presentation","selectable","clearable","deletable","hideable","renamable","case","placeholder_text","format","locale","symbol","decimal","group","grouping","numerals","percent","separate_4digits","nully","specifier","on_change","action","failure","validation","allow_null","allow_YY","row_deletable","active_cell","row","column","row_id","column_id","start_cell","end_cell","data_previous","hidden_columns","is_focused","merge_duplicate_headers","data_timestamp","export_headers","page_count","operator","direction","options","label","if","delay","duration","use_with","row_index","locale_format","selector","rule","style_cell","style_data","style_filter","style_header","column_type","state","column_editable","header_index","derived_filter_query_structure","derived_viewport_selected_columns","setProps","loading_state","is_loading","prop_name","component_name","persistence","persistenceTransforms","extract","propValue","storedValue","root","g","escape","cssEscape","codeUnit","string","String","index","firstCodeUnit","charCodeAt","toString","charAt","factory","set1","set2","idx","len1","len2","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","_curryN","received","combined","argsIdx","left","combinedIdx","_isPlaceholder","addIndex","origFn","list","args","Array","slice","isArray","val","obj","_dispatchable","methodNames","transducerCreator","transducer","_reduced","x","init","xf","XAll","all","_xfBase","input","functor","len","XWrap","acc","thisObj","_iterableReduce","iter","step","_methodReduce","methodName","symIterator","iterator","_arrayReduce","reduce","XMap","prop","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","item","keys","nIdx","ks","checkArgsLength","Number","isInteger","offset","XAny","any","el","vals","assocPath","nextObj","arr","concat","rxf","preservingReduced","monad","jlen","j","ilen","undefined","refFrom","refTo","deep","pattern","copy","copiedValue","getPrototypeOf","valueOf","RegExp","source","global","ignoreCase","multiline","sticky","unicode","clone","pred","b","_pipe","methodname","fromIndex","toIndex","Infinity","pipe","reverse","join","compose","_arrayFromIterator","push","_includesWith","is","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_a","_b","_equals","aItem","match","typeA","equals","message","size","entries","values","keysA","extendedStackA","extendedStackB","_indexOf","inf","_includes","_quote","replace","pad","toISOString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","toFixed","_filter","XFilter","filterable","reject","seen","recur","y","xs","mapPairs","k","sort","test","isNaN","NaN","repr","hasOrAdd","shouldAdd","set","prevSize","_items","_nativeSet","add","has","bIdx","_Set","Set","XFind","found","XFindIndex","XFindLast","last","_path","ifElse","condition","onTrue","onFalse","Math","max","target","elts","flip","_identity","XUniqBy","appliedItem","list1","list2","lookupList","filteredList","assign","output","nextKey","Ctor","getter","setter","toFunctorFn","focus","pathsArray","paths","pathAr","names","once","called","ps","_isNumber","from","to","RangeError","Identity","lens","v","fns","pairs","outerlist","innerlist","rv","min","_curry1","f1","_curry2","f2","_curry3","f3","_c","remove","start","count","splice","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","__proto__","mode","ns","def","current","getOwnPropertyNames","forEach","definition","chunkId","promises","globalThis","Function","url","script","needAttach","scripts","getElementsByTagName","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","head","appendChild","scriptUrl","importScripts","currentScript","getCurrentScript","doc_scripts","filter","async","text","textContent","jsonpScriptSrc","__jsonpScriptSrc__","isLocal","srcFragments","fileFragments","installedChunks","installedChunkData","promise","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self","Logger"],"sourceRoot":""} \ No newline at end of file diff --git a/dash/dash_table/demo.js b/dash/dash_table/demo.js index 56ae401073..1fd7755f8c 100644 --- a/dash/dash_table/demo.js +++ b/dash/dash_table/demo.js @@ -1,2 +1,2 @@ -!function(){var t,n,e,r,o={1983:function(t,n,e){"use strict";e(6266),e(990),e(911),e(4160),e(6197),e(6728),e(4039),e(3568),e(8051),e(8250),e(5434),e(4952),e(6337),e(5666)},919:function(t,n,e){e(1983)},7800:function(t,n,e){var r;window,t.exports=(r=e(9196),function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=1)}([function(t,n){t.exports=r},function(t,n,e){"use strict";e.r(n),e.d(n,"asyncDecorator",(function(){return u})),e.d(n,"inheritAsyncDecorator",(function(){return a})),e.d(n,"isReady",(function(){return c})),e.d(n,"History",(function(){return l}));var r=e(0);function o(t,n,e,r,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void e(t)}a.done?n(c):Promise.resolve(c).then(r,o)}function i(t){return function(){var n=this,e=arguments;return new Promise((function(r,i){var u=t.apply(n,e);function a(t){o(u,r,i,a,c,"next",t)}function c(t){o(u,r,i,a,c,"throw",t)}a(void 0)}))}}var u=function(t,n){var e,o={isReady:new Promise((function(t){e=t})),get:Object(r.lazy)((function(){return Promise.resolve(n()).then((function(t){return setTimeout(i(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e(!0);case 2:o.isReady=!0;case 3:case"end":return t.stop()}}),t)}))),0),t}))}))};return Object.defineProperty(t,"_dashprivate_isLazyComponentReady",{get:function(){return o.isReady}}),o.get},a=function(t,n){Object.defineProperty(t,"_dashprivate_isLazyComponentReady",{get:function(){return c(n)}})},c=function(t){return t&&t._dashprivate_isLazyComponentReady};function f(t,n){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/";if(t.enabled()){var o=new Date(Date.now()-c).toUTCString();document.cookie="".concat(n,"=;expires=").concat(o,";domain=").concat(e,";path=").concat(r)}}},{key:"get",value:function(n){if(n.length&&t.enabled())return n=n.toLowerCase(),(document.cookie.split(";").map((function(t){var n=t.split("=");return{id:n[0].trim(),value:n[1]}})).find((function(t){return n===t.id.toLocaleLowerCase()}))||{}).value}},{key:"set",value:function(n,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";if(t.enabled()){var i=new Date(Date.now()+f).toUTCString(),u="".concat(n,"=").concat(e,";expires=").concat(i,";domain=").concat(r,";path=").concat(o);t.get(n)&&t.delete(n,r,o),document.cookie=u}}}],null&&o(n.prototype,null),e&&o(n,e),Object.defineProperty(n,"prototype",{writable:!1}),t}();i=s,u="enabled",a=r.IHq((function(){try{document.cookie="cookietest=1";var t=-1!==document.cookie.indexOf("cookietest=");return document.cookie="cookietest=1; expires=Thu, 01-Jan-1970 00:00:01 GMT",t}catch(t){return!1}})),u in i?Object.defineProperty(i,u,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[u]=a;var l,p,d=e(3936);function h(t,n){for(var e=0;e2?arguments[2]:void 0,s=Math.min((void 0===f?u:o(f,u))-c,u-a),l=1;for(c0;)c in e?e[a]=e[c]:delete e[a],a+=l,c+=l;return e}},6852:function(t,n,e){"use strict";var r=e(508),o=e(2337),i=e(875);t.exports=function(t){for(var n=r(this),e=i(n.length),u=arguments.length,a=o(u>1?arguments[1]:void 0,e),c=u>2?arguments[2]:void 0,f=void 0===c?e:o(c,e);f>a;)n[a++]=t;return n}},9315:function(t,n,e){var r=e(2110),o=e(875),i=e(2337);t.exports=function(t){return function(n,e,u){var a,c=r(n),f=o(c.length),s=i(u,f);if(t&&e!=e){for(;f>s;)if((a=c[s++])!=a)return!0}else for(;f>s;s++)if((t||s in c)&&c[s]===e)return t||s||0;return!t&&-1}}},50:function(t,n,e){var r=e(741),o=e(9797),i=e(508),u=e(875),a=e(6886);t.exports=function(t,n){var e=1==t,c=2==t,f=3==t,s=4==t,l=6==t,p=5==t||l,d=n||a;return function(n,a,h){for(var v,y,g=i(n),b=o(g),m=r(a,h,3),w=u(b.length),_=0,x=e?d(n,w):c?d(n,0):void 0;w>_;_++)if((p||_ in b)&&(y=m(v=b[_],_,g),t))if(e)x[_]=y;else if(y)switch(t){case 3:return!0;case 5:return v;case 6:return _;case 2:x.push(v)}else if(s)return!1;return l?-1:f||s?s:x}}},7628:function(t,n,e){var r=e(4963),o=e(508),i=e(9797),u=e(875);t.exports=function(t,n,e,a,c){r(n);var f=o(t),s=i(f),l=u(f.length),p=c?l-1:0,d=c?-1:1;if(e<2)for(;;){if(p in s){a=s[p],p+=d;break}if(p+=d,c?p<0:l<=p)throw TypeError("Reduce of empty array with no initial value")}for(;c?p>=0:l>p;p+=d)p in s&&(a=n(a,s[p],p,f));return a}},2736:function(t,n,e){var r=e(5286),o=e(4302),i=e(6314)("species");t.exports=function(t){var n;return o(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!o(n.prototype)||(n=void 0),r(n)&&null===(n=n[i])&&(n=void 0)),void 0===n?Array:n}},6886:function(t,n,e){var r=e(2736);t.exports=function(t,n){return new(r(t))(n)}},4398:function(t,n,e){"use strict";var r=e(4963),o=e(5286),i=e(7242),u=[].slice,a={},c=function(t,n,e){if(!(n in a)){for(var r=[],o=0;o1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(r(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!y(h(this,n),t)}}),p&&r(s.prototype,"size",{get:function(){return h(this,n)[v]}}),s},def:function(t,n,e){var r,o,i=y(t,n);return i?i.v=e:(t._l=i={i:o=d(n,!0),k:n,v:e,p:r=t._l,n:void 0,r:!1},t._f||(t._f=i),r&&(r.n=i),t[v]++,"F"!==o&&(t._i[o]=i)),t},getEntry:y,setStrong:function(t,n,e){f(t,n,(function(t,e){this._t=h(t,n),this._k=e,this._l=void 0}),(function(){for(var t=this,n=t._k,e=t._l;e&&e.r;)e=e.p;return t._t&&(t._l=e=e?e.n:t._t._f)?s(0,"keys"==n?e.k:"values"==n?e.v:[e.k,e.v]):(t._t=void 0,s(1))}),e?"entries":"values",!e,!0),l(n)}}},3657:function(t,n,e){"use strict";var r=e(4408),o=e(4728).getWeak,i=e(7007),u=e(5286),a=e(3328),c=e(3531),f=e(50),s=e(9181),l=e(1616),p=f(5),d=f(6),h=0,v=function(t){return t._l||(t._l=new y)},y=function(){this.a=[]},g=function(t,n){return p(t.a,(function(t){return t[0]===n}))};y.prototype={get:function(t){var n=g(this,t);if(n)return n[1]},has:function(t){return!!g(this,t)},set:function(t,n){var e=g(this,t);e?e[1]=n:this.a.push([t,n])},delete:function(t){var n=d(this.a,(function(n){return n[0]===t}));return~n&&this.a.splice(n,1),!!~n}},t.exports={getConstructor:function(t,n,e,i){var f=t((function(t,r){a(t,f,n,"_i"),t._t=n,t._i=h++,t._l=void 0,null!=r&&c(r,e,t[i],t)}));return r(f.prototype,{delete:function(t){if(!u(t))return!1;var e=o(t);return!0===e?v(l(this,n)).delete(t):e&&s(e,this._i)&&delete e[this._i]},has:function(t){if(!u(t))return!1;var e=o(t);return!0===e?v(l(this,n)).has(t):e&&s(e,this._i)}}),f},def:function(t,n,e){var r=o(i(n),!0);return!0===r?v(t).set(n,e):r[t._i]=e,t},ufstore:v}},5795:function(t,n,e){"use strict";var r=e(3816),o=e(2985),i=e(7234),u=e(4408),a=e(4728),c=e(3531),f=e(3328),s=e(5286),l=e(4253),p=e(7462),d=e(2943),h=e(266);t.exports=function(t,n,e,v,y,g){var b=r[t],m=b,w=y?"set":"add",_=m&&m.prototype,x={},O=function(t){var n=_[t];i(_,t,"delete"==t||"has"==t?function(t){return!(g&&!s(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return g&&!s(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof m&&(g||_.forEach&&!l((function(){(new m).entries().next()})))){var S=new m,j=S[w](g?{}:-0,1)!=S,P=l((function(){S.has(1)})),E=p((function(t){new m(t)})),A=!g&&l((function(){for(var t=new m,n=5;n--;)t[w](n,n);return!t.has(-0)}));E||((m=n((function(n,e){f(n,m,t);var r=h(new b,n,m);return null!=e&&c(e,y,r[w],r),r}))).prototype=_,_.constructor=m),(P||A)&&(O("delete"),O("has"),y&&O("get")),(A||j)&&O(w),g&&_.clear&&delete _.clear}else m=v.getConstructor(n,t,y,w),u(m.prototype,e),a.NEED=!0;return d(m,t),x[t]=m,o(o.G+o.W+o.F*(m!=b),x),g||v.setStrong(m,t,y),m}},5645:function(t){var n=t.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},2811:function(t,n,e){"use strict";var r=e(9275),o=e(681);t.exports=function(t,n,e){n in t?r.f(t,n,o(0,e)):t[n]=e}},741:function(t,n,e){var r=e(4963);t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},3537:function(t,n,e){"use strict";var r=e(4253),o=Date.prototype.getTime,i=Date.prototype.toISOString,u=function(t){return t>9?t:"0"+t};t.exports=r((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!r((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(o.call(this)))throw RangeError("Invalid time value");var t=this,n=t.getUTCFullYear(),e=t.getUTCMilliseconds(),r=n<0?"-":n>9999?"+":"";return r+("00000"+Math.abs(n)).slice(r?-6:-4)+"-"+u(t.getUTCMonth()+1)+"-"+u(t.getUTCDate())+"T"+u(t.getUTCHours())+":"+u(t.getUTCMinutes())+":"+u(t.getUTCSeconds())+"."+(e>99?e:"0"+u(e))+"Z"}:i},870:function(t,n,e){"use strict";var r=e(7007),o=e(1689),i="number";t.exports=function(t){if("string"!==t&&t!==i&&"default"!==t)throw TypeError("Incorrect hint");return o(r(this),t!=i)}},1355:function(t){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},7057:function(t,n,e){t.exports=!e(4253)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},2457:function(t,n,e){var r=e(5286),o=e(3816).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},4430:function(t){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},5541:function(t,n,e){var r=e(7184),o=e(4548),i=e(4682);t.exports=function(t){var n=r(t),e=o.f;if(e)for(var u,a=e(t),c=i.f,f=0;a.length>f;)c.call(t,u=a[f++])&&n.push(u);return n}},2985:function(t,n,e){var r=e(3816),o=e(5645),i=e(7728),u=e(7234),a=e(741),c=function(t,n,e){var f,s,l,p,d=t&c.F,h=t&c.G,v=t&c.S,y=t&c.P,g=t&c.B,b=h?r:v?r[n]||(r[n]={}):(r[n]||{}).prototype,m=h?o:o[n]||(o[n]={}),w=m.prototype||(m.prototype={});for(f in h&&(e=n),e)l=((s=!d&&b&&void 0!==b[f])?b:e)[f],p=g&&s?a(l,r):y&&"function"==typeof l?a(Function.call,l):l,b&&u(b,f,l,t&c.U),m[f]!=l&&i(m,f,p),y&&w[f]!=l&&(w[f]=l)};r.core=o,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},8852:function(t,n,e){var r=e(6314)("match");t.exports=function(t){var n=/./;try{"/./"[t](n)}catch(e){try{return n[r]=!1,!"/./"[t](n)}catch(t){}}return!0}},4253:function(t){t.exports=function(t){try{return!!t()}catch(t){return!0}}},8082:function(t,n,e){"use strict";e(6673);var r=e(7234),o=e(7728),i=e(4253),u=e(1355),a=e(6314),c=e(1165),f=a("species"),s=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),l=function(){var t=/(?:)/,n=t.exec;t.exec=function(){return n.apply(this,arguments)};var e="ab".split(t);return 2===e.length&&"a"===e[0]&&"b"===e[1]}();t.exports=function(t,n,e){var p=a(t),d=!i((function(){var n={};return n[p]=function(){return 7},7!=""[t](n)})),h=d?!i((function(){var n=!1,e=/a/;return e.exec=function(){return n=!0,null},"split"===t&&(e.constructor={},e.constructor[f]=function(){return e}),e[p](""),!n})):void 0;if(!d||!h||"replace"===t&&!s||"split"===t&&!l){var v=/./[p],y=e(u,p,""[t],(function(t,n,e,r,o){return n.exec===c?d&&!o?{done:!0,value:v.call(n,e,r)}:{done:!0,value:t.call(e,n,r)}:{done:!1}})),g=y[0],b=y[1];r(String.prototype,t,g),o(RegExp.prototype,p,2==n?function(t,n){return b.call(t,this,n)}:function(t){return b.call(t,this)})}}},3218:function(t,n,e){"use strict";var r=e(7007);t.exports=function(){var t=r(this),n="";return t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),t.sticky&&(n+="y"),n}},3325:function(t,n,e){"use strict";var r=e(4302),o=e(5286),i=e(875),u=e(741),a=e(6314)("isConcatSpreadable");t.exports=function t(n,e,c,f,s,l,p,d){for(var h,v,y=s,g=0,b=!!p&&u(p,d,3);g0)y=t(n,e,h,i(h.length),y,l-1)-1;else{if(y>=9007199254740991)throw TypeError();n[y]=h}y++}g++}return y}},3531:function(t,n,e){var r=e(741),o=e(8851),i=e(6555),u=e(7007),a=e(875),c=e(9002),f={},s={},l=t.exports=function(t,n,e,l,p){var d,h,v,y,g=p?function(){return t}:c(t),b=r(e,l,n?2:1),m=0;if("function"!=typeof g)throw TypeError(t+" is not iterable!");if(i(g)){for(d=a(t.length);d>m;m++)if((y=n?b(u(h=t[m])[0],h[1]):b(t[m]))===f||y===s)return y}else for(v=g.call(t);!(h=v.next()).done;)if((y=o(v,b,h.value,n))===f||y===s)return y};l.BREAK=f,l.RETURN=s},18:function(t,n,e){t.exports=e(3825)("native-function-to-string",Function.toString)},3816:function(t){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},9181:function(t){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},7728:function(t,n,e){var r=e(9275),o=e(681);t.exports=e(7057)?function(t,n,e){return r.f(t,n,o(1,e))}:function(t,n,e){return t[n]=e,t}},639:function(t,n,e){var r=e(3816).document;t.exports=r&&r.documentElement},1734:function(t,n,e){t.exports=!e(7057)&&!e(4253)((function(){return 7!=Object.defineProperty(e(2457)("div"),"a",{get:function(){return 7}}).a}))},266:function(t,n,e){var r=e(5286),o=e(7375).set;t.exports=function(t,n,e){var i,u=n.constructor;return u!==e&&"function"==typeof u&&(i=u.prototype)!==e.prototype&&r(i)&&o&&o(t,i),t}},7242:function(t){t.exports=function(t,n,e){var r=void 0===e;switch(n.length){case 0:return r?t():t.call(e);case 1:return r?t(n[0]):t.call(e,n[0]);case 2:return r?t(n[0],n[1]):t.call(e,n[0],n[1]);case 3:return r?t(n[0],n[1],n[2]):t.call(e,n[0],n[1],n[2]);case 4:return r?t(n[0],n[1],n[2],n[3]):t.call(e,n[0],n[1],n[2],n[3])}return t.apply(e,n)}},9797:function(t,n,e){var r=e(2032);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6555:function(t,n,e){var r=e(2803),o=e(6314)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},4302:function(t,n,e){var r=e(2032);t.exports=Array.isArray||function(t){return"Array"==r(t)}},8367:function(t,n,e){var r=e(5286),o=Math.floor;t.exports=function(t){return!r(t)&&isFinite(t)&&o(t)===t}},5286:function(t){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},5364:function(t,n,e){var r=e(5286),o=e(2032),i=e(6314)("match");t.exports=function(t){var n;return r(t)&&(void 0!==(n=t[i])?!!n:"RegExp"==o(t))}},8851:function(t,n,e){var r=e(7007);t.exports=function(t,n,e,o){try{return o?n(r(e)[0],e[1]):n(e)}catch(n){var i=t.return;throw void 0!==i&&r(i.call(t)),n}}},9988:function(t,n,e){"use strict";var r=e(2503),o=e(681),i=e(2943),u={};e(7728)(u,e(6314)("iterator"),(function(){return this})),t.exports=function(t,n,e){t.prototype=r(u,{next:o(1,e)}),i(t,n+" Iterator")}},2923:function(t,n,e){"use strict";var r=e(4461),o=e(2985),i=e(7234),u=e(7728),a=e(2803),c=e(9988),f=e(2943),s=e(468),l=e(6314)("iterator"),p=!([].keys&&"next"in[].keys()),d="keys",h="values",v=function(){return this};t.exports=function(t,n,e,y,g,b,m){c(e,n,y);var w,_,x,O=function(t){if(!p&&t in E)return E[t];switch(t){case d:case h:return function(){return new e(this,t)}}return function(){return new e(this,t)}},S=n+" Iterator",j=g==h,P=!1,E=t.prototype,A=E[l]||E["@@iterator"]||g&&E[g],T=A||O(g),k=g?j?O("entries"):T:void 0,N="Array"==n&&E.entries||A;if(N&&(x=s(N.call(new t)))!==Object.prototype&&x.next&&(f(x,S,!0),r||"function"==typeof x[l]||u(x,l,v)),j&&A&&A.name!==h&&(P=!0,T=function(){return A.call(this)}),r&&!m||!p&&!P&&E[l]||u(E,l,T),a[n]=T,a[S]=v,g)if(w={values:j?T:O(h),keys:b?T:O(d),entries:k},m)for(_ in w)_ in E||i(E,_,w[_]);else o(o.P+o.F*(p||P),n,w);return w}},7462:function(t,n,e){var r=e(6314)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(t){}t.exports=function(t,n){if(!n&&!o)return!1;var e=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:e=!0}},i[r]=function(){return u},t(i)}catch(t){}return e}},5436:function(t){t.exports=function(t,n){return{value:n,done:!!t}}},2803:function(t){t.exports={}},4461:function(t){t.exports=!1},3086:function(t){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},4934:function(t,n,e){var r=e(1801),o=Math.pow,i=o(2,-52),u=o(2,-23),a=o(2,127)*(2-u),c=o(2,-126);t.exports=Math.fround||function(t){var n,e,o=Math.abs(t),f=r(t);return oa||e!=e?f*(1/0):f*e}},6206:function(t){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},1801:function(t){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},4728:function(t,n,e){var r=e(3953)("meta"),o=e(5286),i=e(9181),u=e(9275).f,a=0,c=Object.isExtensible||function(){return!0},f=!e(4253)((function(){return c(Object.preventExtensions({}))})),s=function(t){u(t,r,{value:{i:"O"+ ++a,w:{}}})},l=t.exports={KEY:r,NEED:!1,fastKey:function(t,n){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!n)return"E";s(t)}return t[r].i},getWeak:function(t,n){if(!i(t,r)){if(!c(t))return!0;if(!n)return!1;s(t)}return t[r].w},onFreeze:function(t){return f&&l.NEED&&c(t)&&!i(t,r)&&s(t),t}}},4351:function(t,n,e){var r=e(3816),o=e(4193).set,i=r.MutationObserver||r.WebKitMutationObserver,u=r.process,a=r.Promise,c="process"==e(2032)(u);t.exports=function(){var t,n,e,f=function(){var r,o;for(c&&(r=u.domain)&&r.exit();t;){o=t.fn,t=t.next;try{o()}catch(r){throw t?e():n=void 0,r}}n=void 0,r&&r.enter()};if(c)e=function(){u.nextTick(f)};else if(!i||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var s=a.resolve(void 0);e=function(){s.then(f)}}else e=function(){o.call(r,f)};else{var l=!0,p=document.createTextNode("");new i(f).observe(p,{characterData:!0}),e=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};n&&(n.next=o),t||(t=o,e()),n=o}}},3499:function(t,n,e){"use strict";var r=e(4963);function o(t){var n,e;this.promise=new t((function(t,r){if(void 0!==n||void 0!==e)throw TypeError("Bad Promise constructor");n=t,e=r})),this.resolve=r(n),this.reject=r(e)}t.exports.f=function(t){return new o(t)}},5345:function(t,n,e){"use strict";var r=e(7057),o=e(7184),i=e(4548),u=e(4682),a=e(508),c=e(9797),f=Object.assign;t.exports=!f||e(4253)((function(){var t={},n={},e=Symbol(),r="abcdefghijklmnopqrst";return t[e]=7,r.split("").forEach((function(t){n[t]=t})),7!=f({},t)[e]||Object.keys(f({},n)).join("")!=r}))?function(t,n){for(var e=a(t),f=arguments.length,s=1,l=i.f,p=u.f;f>s;)for(var d,h=c(arguments[s++]),v=l?o(h).concat(l(h)):o(h),y=v.length,g=0;y>g;)d=v[g++],r&&!p.call(h,d)||(e[d]=h[d]);return e}:f},2503:function(t,n,e){var r=e(7007),o=e(5588),i=e(4430),u=e(9335)("IE_PROTO"),a=function(){},c=function(){var t,n=e(2457)("iframe"),r=i.length;for(n.style.display="none",e(639).appendChild(n),n.src="javascript:",(t=n.contentWindow.document).open(),t.write("\n if (val === '') return true;\n if (val === 'false') return false;\n if (val === 'true') return true;\n return val;\n}\n\nif (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {\n var attrs = [['data-family-prefix', 'familyPrefix'], ['data-replacement-class', 'replacementClass'], ['data-auto-replace-svg', 'autoReplaceSvg'], ['data-auto-add-css', 'autoAddCss'], ['data-auto-a11y', 'autoA11y'], ['data-search-pseudo-elements', 'searchPseudoElements'], ['data-observe-mutations', 'observeMutations'], ['data-mutate-approach', 'mutateApproach'], ['data-keep-original-source', 'keepOriginalSource'], ['data-measure-performance', 'measurePerformance'], ['data-show-missing-icons', 'showMissingIcons']];\n attrs.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n attr = _ref2[0],\n key = _ref2[1];\n\n var val = coerce(getAttrConfig(attr));\n\n if (val !== undefined && val !== null) {\n initial[key] = val;\n }\n });\n}\n\nvar _default = {\n familyPrefix: DEFAULT_FAMILY_PREFIX,\n replacementClass: DEFAULT_REPLACEMENT_CLASS,\n autoReplaceSvg: true,\n autoAddCss: true,\n autoA11y: true,\n searchPseudoElements: false,\n observeMutations: true,\n mutateApproach: 'async',\n keepOriginalSource: true,\n measurePerformance: false,\n showMissingIcons: true\n};\n\nvar _config = _objectSpread({}, _default, initial);\n\nif (!_config.autoReplaceSvg) _config.observeMutations = false;\n\nvar config = _objectSpread({}, _config);\n\nWINDOW.FontAwesomeConfig = config;\n\nvar w = WINDOW || {};\nif (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};\nif (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};\nif (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};\nif (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];\nvar namespace = w[NAMESPACE_IDENTIFIER];\n\nvar functions = [];\n\nvar listener = function listener() {\n DOCUMENT.removeEventListener('DOMContentLoaded', listener);\n loaded = 1;\n functions.map(function (fn) {\n return fn();\n });\n};\n\nvar loaded = false;\n\nif (IS_DOM) {\n loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);\n if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);\n}\n\nfunction domready (fn) {\n if (!IS_DOM) return;\n loaded ? setTimeout(fn, 0) : functions.push(fn);\n}\n\nvar PENDING = 'pending';\nvar SETTLED = 'settled';\nvar FULFILLED = 'fulfilled';\nvar REJECTED = 'rejected';\n\nvar NOOP = function NOOP() {};\n\nvar isNode = typeof global !== 'undefined' && typeof global.process !== 'undefined' && typeof global.process.emit === 'function';\nvar asyncSetTimer = typeof setImmediate === 'undefined' ? setTimeout : setImmediate;\nvar asyncQueue = [];\nvar asyncTimer;\n\nfunction asyncFlush() {\n // run promise callbacks\n for (var i = 0; i < asyncQueue.length; i++) {\n asyncQueue[i][0](asyncQueue[i][1]);\n } // reset async asyncQueue\n\n\n asyncQueue = [];\n asyncTimer = false;\n}\n\nfunction asyncCall(callback, arg) {\n asyncQueue.push([callback, arg]);\n\n if (!asyncTimer) {\n asyncTimer = true;\n asyncSetTimer(asyncFlush, 0);\n }\n}\n\nfunction invokeResolver(resolver, promise) {\n function resolvePromise(value) {\n resolve(promise, value);\n }\n\n function rejectPromise(reason) {\n reject(promise, reason);\n }\n\n try {\n resolver(resolvePromise, rejectPromise);\n } catch (e) {\n rejectPromise(e);\n }\n}\n\nfunction invokeCallback(subscriber) {\n var owner = subscriber.owner;\n var settled = owner._state;\n var value = owner._data;\n var callback = subscriber[settled];\n var promise = subscriber.then;\n\n if (typeof callback === 'function') {\n settled = FULFILLED;\n\n try {\n value = callback(value);\n } catch (e) {\n reject(promise, e);\n }\n }\n\n if (!handleThenable(promise, value)) {\n if (settled === FULFILLED) {\n resolve(promise, value);\n }\n\n if (settled === REJECTED) {\n reject(promise, value);\n }\n }\n}\n\nfunction handleThenable(promise, value) {\n var resolved;\n\n try {\n if (promise === value) {\n throw new TypeError('A promises callback cannot return that same promise.');\n }\n\n if (value && (typeof value === 'function' || _typeof(value) === 'object')) {\n // then should be retrieved only once\n var then = value.then;\n\n if (typeof then === 'function') {\n then.call(value, function (val) {\n if (!resolved) {\n resolved = true;\n\n if (value === val) {\n fulfill(promise, val);\n } else {\n resolve(promise, val);\n }\n }\n }, function (reason) {\n if (!resolved) {\n resolved = true;\n reject(promise, reason);\n }\n });\n return true;\n }\n }\n } catch (e) {\n if (!resolved) {\n reject(promise, e);\n }\n\n return true;\n }\n\n return false;\n}\n\nfunction resolve(promise, value) {\n if (promise === value || !handleThenable(promise, value)) {\n fulfill(promise, value);\n }\n}\n\nfunction fulfill(promise, value) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = value;\n asyncCall(publishFulfillment, promise);\n }\n}\n\nfunction reject(promise, reason) {\n if (promise._state === PENDING) {\n promise._state = SETTLED;\n promise._data = reason;\n asyncCall(publishRejection, promise);\n }\n}\n\nfunction publish(promise) {\n promise._then = promise._then.forEach(invokeCallback);\n}\n\nfunction publishFulfillment(promise) {\n promise._state = FULFILLED;\n publish(promise);\n}\n\nfunction publishRejection(promise) {\n promise._state = REJECTED;\n publish(promise);\n\n if (!promise._handled && isNode) {\n global.process.emit('unhandledRejection', promise._data, promise);\n }\n}\n\nfunction notifyRejectionHandled(promise) {\n global.process.emit('rejectionHandled', promise);\n}\n/**\n * @class\n */\n\n\nfunction P(resolver) {\n if (typeof resolver !== 'function') {\n throw new TypeError('Promise resolver ' + resolver + ' is not a function');\n }\n\n if (this instanceof P === false) {\n throw new TypeError('Failed to construct \\'Promise\\': Please use the \\'new\\' operator, this object constructor cannot be called as a function.');\n }\n\n this._then = [];\n invokeResolver(resolver, this);\n}\n\nP.prototype = {\n constructor: P,\n _state: PENDING,\n _then: null,\n _data: undefined,\n _handled: false,\n then: function then(onFulfillment, onRejection) {\n var subscriber = {\n owner: this,\n then: new this.constructor(NOOP),\n fulfilled: onFulfillment,\n rejected: onRejection\n };\n\n if ((onRejection || onFulfillment) && !this._handled) {\n this._handled = true;\n\n if (this._state === REJECTED && isNode) {\n asyncCall(notifyRejectionHandled, this);\n }\n }\n\n if (this._state === FULFILLED || this._state === REJECTED) {\n // already resolved, call callback async\n asyncCall(invokeCallback, subscriber);\n } else {\n // subscribe\n this._then.push(subscriber);\n }\n\n return subscriber.then;\n },\n catch: function _catch(onRejection) {\n return this.then(null, onRejection);\n }\n};\n\nP.all = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.all().');\n }\n\n return new P(function (resolve, reject) {\n var results = [];\n var remaining = 0;\n\n function resolver(index) {\n remaining++;\n return function (value) {\n results[index] = value;\n\n if (! --remaining) {\n resolve(results);\n }\n };\n }\n\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function') {\n promise.then(resolver(i), reject);\n } else {\n results[i] = promise;\n }\n }\n\n if (!remaining) {\n resolve(results);\n }\n });\n};\n\nP.race = function (promises) {\n if (!Array.isArray(promises)) {\n throw new TypeError('You must pass an array to Promise.race().');\n }\n\n return new P(function (resolve, reject) {\n for (var i = 0, promise; i < promises.length; i++) {\n promise = promises[i];\n\n if (promise && typeof promise.then === 'function') {\n promise.then(resolve, reject);\n } else {\n resolve(promise);\n }\n }\n });\n};\n\nP.resolve = function (value) {\n if (value && _typeof(value) === 'object' && value.constructor === P) {\n return value;\n }\n\n return new P(function (resolve) {\n resolve(value);\n });\n};\n\nP.reject = function (reason) {\n return new P(function (resolve, reject) {\n reject(reason);\n });\n};\n\nvar picked = typeof Promise === 'function' ? Promise : P;\n\nvar d = UNITS_IN_GRID;\nvar meaninglessTransform = {\n size: 16,\n x: 0,\n y: 0,\n rotate: 0,\n flipX: false,\n flipY: false\n};\n\nfunction isReserved(name) {\n return ~RESERVED_CLASSES.indexOf(name);\n}\nfunction insertCss(css) {\n if (!css || !IS_DOM) {\n return;\n }\n\n var style = DOCUMENT.createElement('style');\n style.setAttribute('type', 'text/css');\n style.innerHTML = css;\n var headChildren = DOCUMENT.head.childNodes;\n var beforeChild = null;\n\n for (var i = headChildren.length - 1; i > -1; i--) {\n var child = headChildren[i];\n var tagName = (child.tagName || '').toUpperCase();\n\n if (['STYLE', 'LINK'].indexOf(tagName) > -1) {\n beforeChild = child;\n }\n }\n\n DOCUMENT.head.insertBefore(style, beforeChild);\n return css;\n}\nvar idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\nfunction nextUniqueId() {\n var size = 12;\n var id = '';\n\n while (size-- > 0) {\n id += idPool[Math.random() * 62 | 0];\n }\n\n return id;\n}\nfunction toArray(obj) {\n var array = [];\n\n for (var i = (obj || []).length >>> 0; i--;) {\n array[i] = obj[i];\n }\n\n return array;\n}\nfunction classArray(node) {\n if (node.classList) {\n return toArray(node.classList);\n } else {\n return (node.getAttribute('class') || '').split(' ').filter(function (i) {\n return i;\n });\n }\n}\nfunction getIconName(familyPrefix, cls) {\n var parts = cls.split('-');\n var prefix = parts[0];\n var iconName = parts.slice(1).join('-');\n\n if (prefix === familyPrefix && iconName !== '' && !isReserved(iconName)) {\n return iconName;\n } else {\n return null;\n }\n}\nfunction htmlEscape(str) {\n return \"\".concat(str).replace(/&/g, '&').replace(/\"/g, '"').replace(/'/g, ''').replace(//g, '>');\n}\nfunction joinAttributes(attributes) {\n return Object.keys(attributes || {}).reduce(function (acc, attributeName) {\n return acc + \"\".concat(attributeName, \"=\\\"\").concat(htmlEscape(attributes[attributeName]), \"\\\" \");\n }, '').trim();\n}\nfunction joinStyles(styles) {\n return Object.keys(styles || {}).reduce(function (acc, styleName) {\n return acc + \"\".concat(styleName, \": \").concat(styles[styleName], \";\");\n }, '');\n}\nfunction transformIsMeaningful(transform) {\n return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;\n}\nfunction transformForSvg(_ref) {\n var transform = _ref.transform,\n containerWidth = _ref.containerWidth,\n iconWidth = _ref.iconWidth;\n var outer = {\n transform: \"translate(\".concat(containerWidth / 2, \" 256)\")\n };\n var innerTranslate = \"translate(\".concat(transform.x * 32, \", \").concat(transform.y * 32, \") \");\n var innerScale = \"scale(\".concat(transform.size / 16 * (transform.flipX ? -1 : 1), \", \").concat(transform.size / 16 * (transform.flipY ? -1 : 1), \") \");\n var innerRotate = \"rotate(\".concat(transform.rotate, \" 0 0)\");\n var inner = {\n transform: \"\".concat(innerTranslate, \" \").concat(innerScale, \" \").concat(innerRotate)\n };\n var path = {\n transform: \"translate(\".concat(iconWidth / 2 * -1, \" -256)\")\n };\n return {\n outer: outer,\n inner: inner,\n path: path\n };\n}\nfunction transformForCss(_ref2) {\n var transform = _ref2.transform,\n _ref2$width = _ref2.width,\n width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width,\n _ref2$height = _ref2.height,\n height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height,\n _ref2$startCentered = _ref2.startCentered,\n startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;\n var val = '';\n\n if (startCentered && IS_IE) {\n val += \"translate(\".concat(transform.x / d - width / 2, \"em, \").concat(transform.y / d - height / 2, \"em) \");\n } else if (startCentered) {\n val += \"translate(calc(-50% + \".concat(transform.x / d, \"em), calc(-50% + \").concat(transform.y / d, \"em)) \");\n } else {\n val += \"translate(\".concat(transform.x / d, \"em, \").concat(transform.y / d, \"em) \");\n }\n\n val += \"scale(\".concat(transform.size / d * (transform.flipX ? -1 : 1), \", \").concat(transform.size / d * (transform.flipY ? -1 : 1), \") \");\n val += \"rotate(\".concat(transform.rotate, \"deg) \");\n return val;\n}\n\nvar ALL_SPACE = {\n x: 0,\n y: 0,\n width: '100%',\n height: '100%'\n};\n\nfunction fillBlack(abstract) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (abstract.attributes && (abstract.attributes.fill || force)) {\n abstract.attributes.fill = 'black';\n }\n\n return abstract;\n}\n\nfunction deGroup(abstract) {\n if (abstract.tag === 'g') {\n return abstract.children;\n } else {\n return [abstract];\n }\n}\n\nfunction makeIconMasking (_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n mask = _ref.mask,\n explicitMaskId = _ref.maskId,\n transform = _ref.transform;\n var mainWidth = main.width,\n mainPath = main.icon;\n var maskWidth = mask.width,\n maskPath = mask.icon;\n var trans = transformForSvg({\n transform: transform,\n containerWidth: maskWidth,\n iconWidth: mainWidth\n });\n var maskRect = {\n tag: 'rect',\n attributes: _objectSpread({}, ALL_SPACE, {\n fill: 'white'\n })\n };\n var maskInnerGroupChildrenMixin = mainPath.children ? {\n children: mainPath.children.map(fillBlack)\n } : {};\n var maskInnerGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [fillBlack(_objectSpread({\n tag: mainPath.tag,\n attributes: _objectSpread({}, mainPath.attributes, trans.path)\n }, maskInnerGroupChildrenMixin))]\n };\n var maskOuterGroup = {\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [maskInnerGroup]\n };\n var maskId = \"mask-\".concat(explicitMaskId || nextUniqueId());\n var clipId = \"clip-\".concat(explicitMaskId || nextUniqueId());\n var maskTag = {\n tag: 'mask',\n attributes: _objectSpread({}, ALL_SPACE, {\n id: maskId,\n maskUnits: 'userSpaceOnUse',\n maskContentUnits: 'userSpaceOnUse'\n }),\n children: [maskRect, maskOuterGroup]\n };\n var defs = {\n tag: 'defs',\n children: [{\n tag: 'clipPath',\n attributes: {\n id: clipId\n },\n children: deGroup(maskPath)\n }, maskTag]\n };\n children.push(defs, {\n tag: 'rect',\n attributes: _objectSpread({\n fill: 'currentColor',\n 'clip-path': \"url(#\".concat(clipId, \")\"),\n mask: \"url(#\".concat(maskId, \")\")\n }, ALL_SPACE)\n });\n return {\n children: children,\n attributes: attributes\n };\n}\n\nfunction makeIconStandard (_ref) {\n var children = _ref.children,\n attributes = _ref.attributes,\n main = _ref.main,\n transform = _ref.transform,\n styles = _ref.styles;\n var styleString = joinStyles(styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n if (transformIsMeaningful(transform)) {\n var trans = transformForSvg({\n transform: transform,\n containerWidth: main.width,\n iconWidth: main.width\n });\n children.push({\n tag: 'g',\n attributes: _objectSpread({}, trans.outer),\n children: [{\n tag: 'g',\n attributes: _objectSpread({}, trans.inner),\n children: [{\n tag: main.icon.tag,\n children: main.icon.children,\n attributes: _objectSpread({}, main.icon.attributes, trans.path)\n }]\n }]\n });\n } else {\n children.push(main.icon);\n }\n\n return {\n children: children,\n attributes: attributes\n };\n}\n\nfunction asIcon (_ref) {\n var children = _ref.children,\n main = _ref.main,\n mask = _ref.mask,\n attributes = _ref.attributes,\n styles = _ref.styles,\n transform = _ref.transform;\n\n if (transformIsMeaningful(transform) && main.found && !mask.found) {\n var width = main.width,\n height = main.height;\n var offset = {\n x: width / height / 2,\n y: 0.5\n };\n attributes['style'] = joinStyles(_objectSpread({}, styles, {\n 'transform-origin': \"\".concat(offset.x + transform.x / 16, \"em \").concat(offset.y + transform.y / 16, \"em\")\n }));\n }\n\n return [{\n tag: 'svg',\n attributes: attributes,\n children: children\n }];\n}\n\nfunction asSymbol (_ref) {\n var prefix = _ref.prefix,\n iconName = _ref.iconName,\n children = _ref.children,\n attributes = _ref.attributes,\n symbol = _ref.symbol;\n var id = symbol === true ? \"\".concat(prefix, \"-\").concat(config.familyPrefix, \"-\").concat(iconName) : symbol;\n return [{\n tag: 'svg',\n attributes: {\n style: 'display: none;'\n },\n children: [{\n tag: 'symbol',\n attributes: _objectSpread({}, attributes, {\n id: id\n }),\n children: children\n }]\n }];\n}\n\nfunction makeInlineSvgAbstract(params) {\n var _params$icons = params.icons,\n main = _params$icons.main,\n mask = _params$icons.mask,\n prefix = params.prefix,\n iconName = params.iconName,\n transform = params.transform,\n symbol = params.symbol,\n title = params.title,\n maskId = params.maskId,\n titleId = params.titleId,\n extra = params.extra,\n _params$watchable = params.watchable,\n watchable = _params$watchable === void 0 ? false : _params$watchable;\n\n var _ref = mask.found ? mask : main,\n width = _ref.width,\n height = _ref.height;\n\n var isUploadedIcon = prefix === 'fak';\n var widthClass = isUploadedIcon ? '' : \"fa-w-\".concat(Math.ceil(width / height * 16));\n var attrClass = [config.replacementClass, iconName ? \"\".concat(config.familyPrefix, \"-\").concat(iconName) : '', widthClass].filter(function (c) {\n return extra.classes.indexOf(c) === -1;\n }).filter(function (c) {\n return c !== '' || !!c;\n }).concat(extra.classes).join(' ');\n var content = {\n children: [],\n attributes: _objectSpread({}, extra.attributes, {\n 'data-prefix': prefix,\n 'data-icon': iconName,\n 'class': attrClass,\n 'role': extra.attributes.role || 'img',\n 'xmlns': 'http://www.w3.org/2000/svg',\n 'viewBox': \"0 0 \".concat(width, \" \").concat(height)\n })\n };\n var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {\n width: \"\".concat(width / height * 16 * 0.0625, \"em\")\n } : {};\n\n if (watchable) {\n content.attributes[DATA_FA_I2SVG] = '';\n }\n\n if (title) content.children.push({\n tag: 'title',\n attributes: {\n id: content.attributes['aria-labelledby'] || \"title-\".concat(titleId || nextUniqueId())\n },\n children: [title]\n });\n\n var args = _objectSpread({}, content, {\n prefix: prefix,\n iconName: iconName,\n main: main,\n mask: mask,\n maskId: maskId,\n transform: transform,\n symbol: symbol,\n styles: _objectSpread({}, uploadedIconWidthStyle, extra.styles)\n });\n\n var _ref2 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args),\n children = _ref2.children,\n attributes = _ref2.attributes;\n\n args.children = children;\n args.attributes = attributes;\n\n if (symbol) {\n return asSymbol(args);\n } else {\n return asIcon(args);\n }\n}\nfunction makeLayersTextAbstract(params) {\n var content = params.content,\n width = params.width,\n height = params.height,\n transform = params.transform,\n title = params.title,\n extra = params.extra,\n _params$watchable2 = params.watchable,\n watchable = _params$watchable2 === void 0 ? false : _params$watchable2;\n\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n\n if (watchable) {\n attributes[DATA_FA_I2SVG] = '';\n }\n\n var styles = _objectSpread({}, extra.styles);\n\n if (transformIsMeaningful(transform)) {\n styles['transform'] = transformForCss({\n transform: transform,\n startCentered: true,\n width: width,\n height: height\n });\n styles['-webkit-transform'] = styles['transform'];\n }\n\n var styleString = joinStyles(styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n\n return val;\n}\nfunction makeLayersCounterAbstract(params) {\n var content = params.content,\n title = params.title,\n extra = params.extra;\n\n var attributes = _objectSpread({}, extra.attributes, title ? {\n 'title': title\n } : {}, {\n 'class': extra.classes.join(' ')\n });\n\n var styleString = joinStyles(extra.styles);\n\n if (styleString.length > 0) {\n attributes['style'] = styleString;\n }\n\n var val = [];\n val.push({\n tag: 'span',\n attributes: attributes,\n children: [content]\n });\n\n if (title) {\n val.push({\n tag: 'span',\n attributes: {\n class: 'sr-only'\n },\n children: [title]\n });\n }\n\n return val;\n}\n\nvar noop$1 = function noop() {};\n\nvar p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {\n mark: noop$1,\n measure: noop$1\n};\nvar preamble = \"FA \\\"5.15.4\\\"\";\n\nvar begin = function begin(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" begins\"));\n return function () {\n return end(name);\n };\n};\n\nvar end = function end(name) {\n p.mark(\"\".concat(preamble, \" \").concat(name, \" ends\"));\n p.measure(\"\".concat(preamble, \" \").concat(name), \"\".concat(preamble, \" \").concat(name, \" begins\"), \"\".concat(preamble, \" \").concat(name, \" ends\"));\n};\n\nvar perf = {\n begin: begin,\n end: end\n};\n\n/**\n * Internal helper to bind a function known to have 4 arguments\n * to a given context.\n */\n\nvar bindInternal4 = function bindInternal4(func, thisContext) {\n return function (a, b, c, d) {\n return func.call(thisContext, a, b, c, d);\n };\n};\n\n/**\n * # Reduce\n *\n * A fast object `.reduce()` implementation.\n *\n * @param {Object} subject The object to reduce over.\n * @param {Function} fn The reducer function.\n * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].\n * @param {Object} thisContext The context for the reducer.\n * @return {mixed} The final result.\n */\n\n\nvar reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {\n var keys = Object.keys(subject),\n length = keys.length,\n iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,\n i,\n key,\n result;\n\n if (initialValue === undefined) {\n i = 1;\n result = subject[keys[0]];\n } else {\n i = 0;\n result = initialValue;\n }\n\n for (; i < length; i++) {\n key = keys[i];\n result = iterator(result, subject[key], key, subject);\n }\n\n return result;\n};\n\nfunction toHex(unicode) {\n var result = '';\n\n for (var i = 0; i < unicode.length; i++) {\n var hex = unicode.charCodeAt(i).toString(16);\n result += ('000' + hex).slice(-4);\n }\n\n return result;\n}\n\nfunction defineIcons(prefix, icons) {\n var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var _params$skipHooks = params.skipHooks,\n skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;\n var normalized = Object.keys(icons).reduce(function (acc, iconName) {\n var icon = icons[iconName];\n var expanded = !!icon.icon;\n\n if (expanded) {\n acc[icon.iconName] = icon.icon;\n } else {\n acc[iconName] = icon;\n }\n\n return acc;\n }, {});\n\n if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {\n namespace.hooks.addPack(prefix, normalized);\n } else {\n namespace.styles[prefix] = _objectSpread({}, namespace.styles[prefix] || {}, normalized);\n }\n /**\n * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction\n * of new styles we needed to differentiate between them. Prefix `fa` is now an alias\n * for `fas` so we'll easy the upgrade process for our users by automatically defining\n * this as well.\n */\n\n\n if (prefix === 'fas') {\n defineIcons('fa', icons);\n }\n}\n\nvar styles = namespace.styles,\n shims = namespace.shims;\nvar _byUnicode = {};\nvar _byLigature = {};\nvar _byOldName = {};\nvar build = function build() {\n var lookup = function lookup(reducer) {\n return reduce(styles, function (o, style, prefix) {\n o[prefix] = reduce(style, reducer, {});\n return o;\n }, {});\n };\n\n _byUnicode = lookup(function (acc, icon, iconName) {\n if (icon[3]) {\n acc[icon[3]] = iconName;\n }\n\n return acc;\n });\n _byLigature = lookup(function (acc, icon, iconName) {\n var ligatures = icon[2];\n acc[iconName] = iconName;\n ligatures.forEach(function (ligature) {\n acc[ligature] = iconName;\n });\n return acc;\n });\n var hasRegular = 'far' in styles;\n _byOldName = reduce(shims, function (acc, shim) {\n var oldName = shim[0];\n var prefix = shim[1];\n var iconName = shim[2];\n\n if (prefix === 'far' && !hasRegular) {\n prefix = 'fas';\n }\n\n acc[oldName] = {\n prefix: prefix,\n iconName: iconName\n };\n return acc;\n }, {});\n};\nbuild();\nfunction byUnicode(prefix, unicode) {\n return (_byUnicode[prefix] || {})[unicode];\n}\nfunction byLigature(prefix, ligature) {\n return (_byLigature[prefix] || {})[ligature];\n}\nfunction byOldName(name) {\n return _byOldName[name] || {\n prefix: null,\n iconName: null\n };\n}\n\nvar styles$1 = namespace.styles;\nvar emptyCanonicalIcon = function emptyCanonicalIcon() {\n return {\n prefix: null,\n iconName: null,\n rest: []\n };\n};\nfunction getCanonicalIcon(values) {\n return values.reduce(function (acc, cls) {\n var iconName = getIconName(config.familyPrefix, cls);\n\n if (styles$1[cls]) {\n acc.prefix = cls;\n } else if (config.autoFetchSvg && Object.keys(PREFIX_TO_STYLE).indexOf(cls) > -1) {\n acc.prefix = cls;\n } else if (iconName) {\n var shim = acc.prefix === 'fa' ? byOldName(iconName) : {};\n acc.iconName = shim.iconName || iconName;\n acc.prefix = shim.prefix || acc.prefix;\n } else if (cls !== config.replacementClass && cls.indexOf('fa-w-') !== 0) {\n acc.rest.push(cls);\n }\n\n return acc;\n }, emptyCanonicalIcon());\n}\nfunction iconFromMapping(mapping, prefix, iconName) {\n if (mapping && mapping[prefix] && mapping[prefix][iconName]) {\n return {\n prefix: prefix,\n iconName: iconName,\n icon: mapping[prefix][iconName]\n };\n }\n}\n\nfunction toHtml(abstractNodes) {\n var tag = abstractNodes.tag,\n _abstractNodes$attrib = abstractNodes.attributes,\n attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib,\n _abstractNodes$childr = abstractNodes.children,\n children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;\n\n if (typeof abstractNodes === 'string') {\n return htmlEscape(abstractNodes);\n } else {\n return \"<\".concat(tag, \" \").concat(joinAttributes(attributes), \">\").concat(children.map(toHtml).join(''), \"\");\n }\n}\n\nvar noop$2 = function noop() {};\n\nfunction isWatched(node) {\n var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;\n return typeof i2svg === 'string';\n}\n\nfunction getMutator() {\n if (config.autoReplaceSvg === true) {\n return mutators.replace;\n }\n\n var mutator = mutators[config.autoReplaceSvg];\n return mutator || mutators.replace;\n}\n\nvar mutators = {\n replace: function replace(mutation) {\n var node = mutation[0];\n var abstract = mutation[1];\n var newOuterHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n\n if (node.parentNode && node.outerHTML) {\n node.outerHTML = newOuterHTML + (config.keepOriginalSource && node.tagName.toLowerCase() !== 'svg' ? \"\") : '');\n } else if (node.parentNode) {\n var newNode = document.createElement('span');\n node.parentNode.replaceChild(newNode, node);\n newNode.outerHTML = newOuterHTML;\n }\n },\n nest: function nest(mutation) {\n var node = mutation[0];\n var abstract = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it.\n // Short-circuit to the standard replacement\n\n if (~classArray(node).indexOf(config.replacementClass)) {\n return mutators.replace(mutation);\n }\n\n var forSvg = new RegExp(\"\".concat(config.familyPrefix, \"-.*\"));\n delete abstract[0].attributes.style;\n delete abstract[0].attributes.id;\n var splitClasses = abstract[0].attributes.class.split(' ').reduce(function (acc, cls) {\n if (cls === config.replacementClass || cls.match(forSvg)) {\n acc.toSvg.push(cls);\n } else {\n acc.toNode.push(cls);\n }\n\n return acc;\n }, {\n toNode: [],\n toSvg: []\n });\n abstract[0].attributes.class = splitClasses.toSvg.join(' ');\n var newInnerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.setAttribute('class', splitClasses.toNode.join(' '));\n node.setAttribute(DATA_FA_I2SVG, '');\n node.innerHTML = newInnerHTML;\n }\n};\n\nfunction performOperationSync(op) {\n op();\n}\n\nfunction perform(mutations, callback) {\n var callbackFunction = typeof callback === 'function' ? callback : noop$2;\n\n if (mutations.length === 0) {\n callbackFunction();\n } else {\n var frame = performOperationSync;\n\n if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {\n frame = WINDOW.requestAnimationFrame || performOperationSync;\n }\n\n frame(function () {\n var mutator = getMutator();\n var mark = perf.begin('mutate');\n mutations.map(mutator);\n mark();\n callbackFunction();\n });\n }\n}\nvar disabled = false;\nfunction disableObservation() {\n disabled = true;\n}\nfunction enableObservation() {\n disabled = false;\n}\nvar mo = null;\nfunction observe(options) {\n if (!MUTATION_OBSERVER) {\n return;\n }\n\n if (!config.observeMutations) {\n return;\n }\n\n var treeCallback = options.treeCallback,\n nodeCallback = options.nodeCallback,\n pseudoElementsCallback = options.pseudoElementsCallback,\n _options$observeMutat = options.observeMutationsRoot,\n observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;\n mo = new MUTATION_OBSERVER(function (objects) {\n if (disabled) return;\n toArray(objects).forEach(function (mutationRecord) {\n if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {\n if (config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target);\n }\n\n treeCallback(mutationRecord.target);\n }\n\n if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {\n pseudoElementsCallback(mutationRecord.target.parentNode);\n }\n\n if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {\n if (mutationRecord.attributeName === 'class') {\n var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),\n prefix = _getCanonicalIcon.prefix,\n iconName = _getCanonicalIcon.iconName;\n\n if (prefix) mutationRecord.target.setAttribute('data-prefix', prefix);\n if (iconName) mutationRecord.target.setAttribute('data-icon', iconName);\n } else {\n nodeCallback(mutationRecord.target);\n }\n }\n });\n });\n if (!IS_DOM) return;\n mo.observe(observeMutationsRoot, {\n childList: true,\n attributes: true,\n characterData: true,\n subtree: true\n });\n}\nfunction disconnect() {\n if (!mo) return;\n mo.disconnect();\n}\n\nfunction styleParser (node) {\n var style = node.getAttribute('style');\n var val = [];\n\n if (style) {\n val = style.split(';').reduce(function (acc, style) {\n var styles = style.split(':');\n var prop = styles[0];\n var value = styles.slice(1);\n\n if (prop && value.length > 0) {\n acc[prop] = value.join(':').trim();\n }\n\n return acc;\n }, {});\n }\n\n return val;\n}\n\nfunction classParser (node) {\n var existingPrefix = node.getAttribute('data-prefix');\n var existingIconName = node.getAttribute('data-icon');\n var innerText = node.innerText !== undefined ? node.innerText.trim() : '';\n var val = getCanonicalIcon(classArray(node));\n\n if (existingPrefix && existingIconName) {\n val.prefix = existingPrefix;\n val.iconName = existingIconName;\n }\n\n if (val.prefix && innerText.length > 1) {\n val.iconName = byLigature(val.prefix, node.innerText);\n } else if (val.prefix && innerText.length === 1) {\n val.iconName = byUnicode(val.prefix, toHex(node.innerText));\n }\n\n return val;\n}\n\nvar parseTransformString = function parseTransformString(transformString) {\n var transform = {\n size: 16,\n x: 0,\n y: 0,\n flipX: false,\n flipY: false,\n rotate: 0\n };\n\n if (!transformString) {\n return transform;\n } else {\n return transformString.toLowerCase().split(' ').reduce(function (acc, n) {\n var parts = n.toLowerCase().split('-');\n var first = parts[0];\n var rest = parts.slice(1).join('-');\n\n if (first && rest === 'h') {\n acc.flipX = true;\n return acc;\n }\n\n if (first && rest === 'v') {\n acc.flipY = true;\n return acc;\n }\n\n rest = parseFloat(rest);\n\n if (isNaN(rest)) {\n return acc;\n }\n\n switch (first) {\n case 'grow':\n acc.size = acc.size + rest;\n break;\n\n case 'shrink':\n acc.size = acc.size - rest;\n break;\n\n case 'left':\n acc.x = acc.x - rest;\n break;\n\n case 'right':\n acc.x = acc.x + rest;\n break;\n\n case 'up':\n acc.y = acc.y - rest;\n break;\n\n case 'down':\n acc.y = acc.y + rest;\n break;\n\n case 'rotate':\n acc.rotate = acc.rotate + rest;\n break;\n }\n\n return acc;\n }, transform);\n }\n};\nfunction transformParser (node) {\n return parseTransformString(node.getAttribute('data-fa-transform'));\n}\n\nfunction symbolParser (node) {\n var symbol = node.getAttribute('data-fa-symbol');\n return symbol === null ? false : symbol === '' ? true : symbol;\n}\n\nfunction attributesParser (node) {\n var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {\n if (acc.name !== 'class' && acc.name !== 'style') {\n acc[attr.name] = attr.value;\n }\n\n return acc;\n }, {});\n var title = node.getAttribute('title');\n var titleId = node.getAttribute('data-fa-title-id');\n\n if (config.autoA11y) {\n if (title) {\n extraAttributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n } else {\n extraAttributes['aria-hidden'] = 'true';\n extraAttributes['focusable'] = 'false';\n }\n }\n\n return extraAttributes;\n}\n\nfunction maskParser (node) {\n var mask = node.getAttribute('data-fa-mask');\n\n if (!mask) {\n return emptyCanonicalIcon();\n } else {\n return getCanonicalIcon(mask.split(' ').map(function (i) {\n return i.trim();\n }));\n }\n}\n\nfunction blankMeta() {\n return {\n iconName: null,\n title: null,\n titleId: null,\n prefix: null,\n transform: meaninglessTransform,\n symbol: false,\n mask: null,\n maskId: null,\n extra: {\n classes: [],\n styles: {},\n attributes: {}\n }\n };\n}\nfunction parseMeta(node) {\n var _classParser = classParser(node),\n iconName = _classParser.iconName,\n prefix = _classParser.prefix,\n extraClasses = _classParser.rest;\n\n var extraStyles = styleParser(node);\n var transform = transformParser(node);\n var symbol = symbolParser(node);\n var extraAttributes = attributesParser(node);\n var mask = maskParser(node);\n return {\n iconName: iconName,\n title: node.getAttribute('title'),\n titleId: node.getAttribute('data-fa-title-id'),\n prefix: prefix,\n transform: transform,\n symbol: symbol,\n mask: mask,\n maskId: node.getAttribute('data-fa-mask-id'),\n extra: {\n classes: extraClasses,\n styles: extraStyles,\n attributes: extraAttributes\n }\n };\n}\n\nfunction MissingIcon(error) {\n this.name = 'MissingIcon';\n this.message = error || 'Icon unavailable';\n this.stack = new Error().stack;\n}\nMissingIcon.prototype = Object.create(Error.prototype);\nMissingIcon.prototype.constructor = MissingIcon;\n\nvar FILL = {\n fill: 'currentColor'\n};\nvar ANIMATION_BASE = {\n attributeType: 'XML',\n repeatCount: 'indefinite',\n dur: '2s'\n};\nvar RING = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n d: 'M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z'\n })\n};\n\nvar OPACITY_ANIMATE = _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'opacity'\n});\n\nvar DOT = {\n tag: 'circle',\n attributes: _objectSpread({}, FILL, {\n cx: '256',\n cy: '364',\n r: '28'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, ANIMATION_BASE, {\n attributeName: 'r',\n values: '28;14;28;28;14;28;'\n })\n }, {\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;1;1;0;1;'\n })\n }]\n};\nvar QUESTION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '1',\n d: 'M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '1;0;0;0;0;1;'\n })\n }]\n};\nvar EXCLAMATION = {\n tag: 'path',\n attributes: _objectSpread({}, FILL, {\n opacity: '0',\n d: 'M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z'\n }),\n children: [{\n tag: 'animate',\n attributes: _objectSpread({}, OPACITY_ANIMATE, {\n values: '0;0;1;1;0;0;'\n })\n }]\n};\nvar missing = {\n tag: 'g',\n children: [RING, DOT, QUESTION, EXCLAMATION]\n};\n\nvar styles$2 = namespace.styles;\nfunction asFoundIcon(icon) {\n var width = icon[0];\n var height = icon[1];\n\n var _icon$slice = icon.slice(4),\n _icon$slice2 = _slicedToArray(_icon$slice, 1),\n vectorData = _icon$slice2[0];\n\n var element = null;\n\n if (Array.isArray(vectorData)) {\n element = {\n tag: 'g',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.GROUP)\n },\n children: [{\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.SECONDARY),\n fill: 'currentColor',\n d: vectorData[0]\n }\n }, {\n tag: 'path',\n attributes: {\n class: \"\".concat(config.familyPrefix, \"-\").concat(DUOTONE_CLASSES.PRIMARY),\n fill: 'currentColor',\n d: vectorData[1]\n }\n }]\n };\n } else {\n element = {\n tag: 'path',\n attributes: {\n fill: 'currentColor',\n d: vectorData\n }\n };\n }\n\n return {\n found: true,\n width: width,\n height: height,\n icon: element\n };\n}\nfunction findIcon(iconName, prefix) {\n return new picked(function (resolve, reject) {\n var val = {\n found: false,\n width: 512,\n height: 512,\n icon: missing\n };\n\n if (iconName && prefix && styles$2[prefix] && styles$2[prefix][iconName]) {\n var icon = styles$2[prefix][iconName];\n return resolve(asFoundIcon(icon));\n }\n\n if (iconName && prefix && !config.showMissingIcons) {\n reject(new MissingIcon(\"Icon is missing for prefix \".concat(prefix, \" with icon name \").concat(iconName)));\n } else {\n resolve(val);\n }\n });\n}\n\nvar styles$3 = namespace.styles;\n\nfunction generateSvgReplacementMutation(node, nodeMeta) {\n var iconName = nodeMeta.iconName,\n title = nodeMeta.title,\n titleId = nodeMeta.titleId,\n prefix = nodeMeta.prefix,\n transform = nodeMeta.transform,\n symbol = nodeMeta.symbol,\n mask = nodeMeta.mask,\n maskId = nodeMeta.maskId,\n extra = nodeMeta.extra;\n return new picked(function (resolve, reject) {\n picked.all([findIcon(iconName, prefix), findIcon(mask.iconName, mask.prefix)]).then(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n main = _ref2[0],\n mask = _ref2[1];\n\n resolve([node, makeInlineSvgAbstract({\n icons: {\n main: main,\n mask: mask\n },\n prefix: prefix,\n iconName: iconName,\n transform: transform,\n symbol: symbol,\n mask: mask,\n maskId: maskId,\n title: title,\n titleId: titleId,\n extra: extra,\n watchable: true\n })]);\n });\n });\n}\n\nfunction generateLayersText(node, nodeMeta) {\n var title = nodeMeta.title,\n transform = nodeMeta.transform,\n extra = nodeMeta.extra;\n var width = null;\n var height = null;\n\n if (IS_IE) {\n var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);\n var boundingClientRect = node.getBoundingClientRect();\n width = boundingClientRect.width / computedFontSize;\n height = boundingClientRect.height / computedFontSize;\n }\n\n if (config.autoA11y && !title) {\n extra.attributes['aria-hidden'] = 'true';\n }\n\n return picked.resolve([node, makeLayersTextAbstract({\n content: node.innerHTML,\n width: width,\n height: height,\n transform: transform,\n title: title,\n extra: extra,\n watchable: true\n })]);\n}\n\nfunction generateMutation(node) {\n var nodeMeta = parseMeta(node);\n\n if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {\n return generateLayersText(node, nodeMeta);\n } else {\n return generateSvgReplacementMutation(node, nodeMeta);\n }\n}\n\nfunction onTree(root) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n if (!IS_DOM) return;\n var htmlClassList = DOCUMENT.documentElement.classList;\n\n var hclAdd = function hclAdd(suffix) {\n return htmlClassList.add(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n\n var hclRemove = function hclRemove(suffix) {\n return htmlClassList.remove(\"\".concat(HTML_CLASS_I2SVG_BASE_CLASS, \"-\").concat(suffix));\n };\n\n var prefixes = config.autoFetchSvg ? Object.keys(PREFIX_TO_STYLE) : Object.keys(styles$3);\n var prefixesDomQuery = [\".\".concat(LAYERS_TEXT_CLASSNAME, \":not([\").concat(DATA_FA_I2SVG, \"])\")].concat(prefixes.map(function (p) {\n return \".\".concat(p, \":not([\").concat(DATA_FA_I2SVG, \"])\");\n })).join(', ');\n\n if (prefixesDomQuery.length === 0) {\n return;\n }\n\n var candidates = [];\n\n try {\n candidates = toArray(root.querySelectorAll(prefixesDomQuery));\n } catch (e) {// noop\n }\n\n if (candidates.length > 0) {\n hclAdd('pending');\n hclRemove('complete');\n } else {\n return;\n }\n\n var mark = perf.begin('onTree');\n var mutations = candidates.reduce(function (acc, node) {\n try {\n var mutation = generateMutation(node);\n\n if (mutation) {\n acc.push(mutation);\n }\n } catch (e) {\n if (!PRODUCTION) {\n if (e instanceof MissingIcon) {\n console.error(e);\n }\n }\n }\n\n return acc;\n }, []);\n return new picked(function (resolve, reject) {\n picked.all(mutations).then(function (resolvedMutations) {\n perform(resolvedMutations, function () {\n hclAdd('active');\n hclAdd('complete');\n hclRemove('pending');\n if (typeof callback === 'function') callback();\n mark();\n resolve();\n });\n }).catch(function () {\n mark();\n reject();\n });\n });\n}\nfunction onNode(node) {\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n generateMutation(node).then(function (mutation) {\n if (mutation) {\n perform([mutation], callback);\n }\n });\n}\n\nfunction replaceForPosition(node, position) {\n var pendingAttribute = \"\".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));\n return new picked(function (resolve, reject) {\n if (node.getAttribute(pendingAttribute) !== null) {\n // This node is already being processed\n return resolve();\n }\n\n var children = toArray(node.children);\n var alreadyProcessedPseudoElement = children.filter(function (c) {\n return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;\n })[0];\n var styles = WINDOW.getComputedStyle(node, position);\n var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);\n var fontWeight = styles.getPropertyValue('font-weight');\n var content = styles.getPropertyValue('content');\n\n if (alreadyProcessedPseudoElement && !fontFamily) {\n // If we've already processed it but the current computed style does not result in a font-family,\n // that probably means that a class name that was previously present to make the icon has been\n // removed. So we now should delete the icon.\n node.removeChild(alreadyProcessedPseudoElement);\n return resolve();\n } else if (fontFamily && content !== 'none' && content !== '') {\n var _content = styles.getPropertyValue('content');\n\n var prefix = ~['Solid', 'Regular', 'Light', 'Duotone', 'Brands', 'Kit'].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[fontWeight];\n var hexValue = toHex(_content.length === 3 ? _content.substr(1, 1) : _content);\n var iconName = byUnicode(prefix, hexValue);\n var iconIdentifier = iconName; // Only convert the pseudo element in this :before/:after position into an icon if we haven't\n // already done so with the same prefix and iconName\n\n if (iconName && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {\n node.setAttribute(pendingAttribute, iconIdentifier);\n\n if (alreadyProcessedPseudoElement) {\n // Delete the old one, since we're replacing it with a new one\n node.removeChild(alreadyProcessedPseudoElement);\n }\n\n var meta = blankMeta();\n var extra = meta.extra;\n extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;\n findIcon(iconName, prefix).then(function (main) {\n var abstract = makeInlineSvgAbstract(_objectSpread({}, meta, {\n icons: {\n main: main,\n mask: emptyCanonicalIcon()\n },\n prefix: prefix,\n iconName: iconIdentifier,\n extra: extra,\n watchable: true\n }));\n var element = DOCUMENT.createElement('svg');\n\n if (position === ':before') {\n node.insertBefore(element, node.firstChild);\n } else {\n node.appendChild(element);\n }\n\n element.outerHTML = abstract.map(function (a) {\n return toHtml(a);\n }).join('\\n');\n node.removeAttribute(pendingAttribute);\n resolve();\n }).catch(reject);\n } else {\n resolve();\n }\n } else {\n resolve();\n }\n });\n}\n\nfunction replace(node) {\n return picked.all([replaceForPosition(node, ':before'), replaceForPosition(node, ':after')]);\n}\n\nfunction processable(node) {\n return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');\n}\n\nfunction searchPseudoElements (root) {\n if (!IS_DOM) return;\n return new picked(function (resolve, reject) {\n var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);\n var end = perf.begin('searchPseudoElements');\n disableObservation();\n picked.all(operations).then(function () {\n end();\n enableObservation();\n resolve();\n }).catch(function () {\n end();\n enableObservation();\n reject();\n });\n });\n}\n\nvar baseStyles = \"svg:not(:root).svg-inline--fa {\\n overflow: visible;\\n}\\n\\n.svg-inline--fa {\\n display: inline-block;\\n font-size: inherit;\\n height: 1em;\\n overflow: visible;\\n vertical-align: -0.125em;\\n}\\n.svg-inline--fa.fa-lg {\\n vertical-align: -0.225em;\\n}\\n.svg-inline--fa.fa-w-1 {\\n width: 0.0625em;\\n}\\n.svg-inline--fa.fa-w-2 {\\n width: 0.125em;\\n}\\n.svg-inline--fa.fa-w-3 {\\n width: 0.1875em;\\n}\\n.svg-inline--fa.fa-w-4 {\\n width: 0.25em;\\n}\\n.svg-inline--fa.fa-w-5 {\\n width: 0.3125em;\\n}\\n.svg-inline--fa.fa-w-6 {\\n width: 0.375em;\\n}\\n.svg-inline--fa.fa-w-7 {\\n width: 0.4375em;\\n}\\n.svg-inline--fa.fa-w-8 {\\n width: 0.5em;\\n}\\n.svg-inline--fa.fa-w-9 {\\n width: 0.5625em;\\n}\\n.svg-inline--fa.fa-w-10 {\\n width: 0.625em;\\n}\\n.svg-inline--fa.fa-w-11 {\\n width: 0.6875em;\\n}\\n.svg-inline--fa.fa-w-12 {\\n width: 0.75em;\\n}\\n.svg-inline--fa.fa-w-13 {\\n width: 0.8125em;\\n}\\n.svg-inline--fa.fa-w-14 {\\n width: 0.875em;\\n}\\n.svg-inline--fa.fa-w-15 {\\n width: 0.9375em;\\n}\\n.svg-inline--fa.fa-w-16 {\\n width: 1em;\\n}\\n.svg-inline--fa.fa-w-17 {\\n width: 1.0625em;\\n}\\n.svg-inline--fa.fa-w-18 {\\n width: 1.125em;\\n}\\n.svg-inline--fa.fa-w-19 {\\n width: 1.1875em;\\n}\\n.svg-inline--fa.fa-w-20 {\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-pull-left {\\n margin-right: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-pull-right {\\n margin-left: 0.3em;\\n width: auto;\\n}\\n.svg-inline--fa.fa-border {\\n height: 1.5em;\\n}\\n.svg-inline--fa.fa-li {\\n width: 2em;\\n}\\n.svg-inline--fa.fa-fw {\\n width: 1.25em;\\n}\\n\\n.fa-layers svg.svg-inline--fa {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.fa-layers {\\n display: inline-block;\\n height: 1em;\\n position: relative;\\n text-align: center;\\n vertical-align: -0.125em;\\n width: 1em;\\n}\\n.fa-layers svg.svg-inline--fa {\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter, .fa-layers-text {\\n display: inline-block;\\n position: absolute;\\n text-align: center;\\n}\\n\\n.fa-layers-text {\\n left: 50%;\\n top: 50%;\\n -webkit-transform: translate(-50%, -50%);\\n transform: translate(-50%, -50%);\\n -webkit-transform-origin: center center;\\n transform-origin: center center;\\n}\\n\\n.fa-layers-counter {\\n background-color: #ff253a;\\n border-radius: 1em;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n color: #fff;\\n height: 1.5em;\\n line-height: 1;\\n max-width: 5em;\\n min-width: 1.5em;\\n overflow: hidden;\\n padding: 0.25em;\\n right: 0;\\n text-overflow: ellipsis;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-bottom-right {\\n bottom: 0;\\n right: 0;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom right;\\n transform-origin: bottom right;\\n}\\n\\n.fa-layers-bottom-left {\\n bottom: 0;\\n left: 0;\\n right: auto;\\n top: auto;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: bottom left;\\n transform-origin: bottom left;\\n}\\n\\n.fa-layers-top-right {\\n right: 0;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top right;\\n transform-origin: top right;\\n}\\n\\n.fa-layers-top-left {\\n left: 0;\\n right: auto;\\n top: 0;\\n -webkit-transform: scale(0.25);\\n transform: scale(0.25);\\n -webkit-transform-origin: top left;\\n transform-origin: top left;\\n}\\n\\n.fa-lg {\\n font-size: 1.3333333333em;\\n line-height: 0.75em;\\n vertical-align: -0.0667em;\\n}\\n\\n.fa-xs {\\n font-size: 0.75em;\\n}\\n\\n.fa-sm {\\n font-size: 0.875em;\\n}\\n\\n.fa-1x {\\n font-size: 1em;\\n}\\n\\n.fa-2x {\\n font-size: 2em;\\n}\\n\\n.fa-3x {\\n font-size: 3em;\\n}\\n\\n.fa-4x {\\n font-size: 4em;\\n}\\n\\n.fa-5x {\\n font-size: 5em;\\n}\\n\\n.fa-6x {\\n font-size: 6em;\\n}\\n\\n.fa-7x {\\n font-size: 7em;\\n}\\n\\n.fa-8x {\\n font-size: 8em;\\n}\\n\\n.fa-9x {\\n font-size: 9em;\\n}\\n\\n.fa-10x {\\n font-size: 10em;\\n}\\n\\n.fa-fw {\\n text-align: center;\\n width: 1.25em;\\n}\\n\\n.fa-ul {\\n list-style-type: none;\\n margin-left: 2.5em;\\n padding-left: 0;\\n}\\n.fa-ul > li {\\n position: relative;\\n}\\n\\n.fa-li {\\n left: -2em;\\n position: absolute;\\n text-align: center;\\n width: 2em;\\n line-height: inherit;\\n}\\n\\n.fa-border {\\n border: solid 0.08em #eee;\\n border-radius: 0.1em;\\n padding: 0.2em 0.25em 0.15em;\\n}\\n\\n.fa-pull-left {\\n float: left;\\n}\\n\\n.fa-pull-right {\\n float: right;\\n}\\n\\n.fa.fa-pull-left,\\n.fas.fa-pull-left,\\n.far.fa-pull-left,\\n.fal.fa-pull-left,\\n.fab.fa-pull-left {\\n margin-right: 0.3em;\\n}\\n.fa.fa-pull-right,\\n.fas.fa-pull-right,\\n.far.fa-pull-right,\\n.fal.fa-pull-right,\\n.fab.fa-pull-right {\\n margin-left: 0.3em;\\n}\\n\\n.fa-spin {\\n -webkit-animation: fa-spin 2s infinite linear;\\n animation: fa-spin 2s infinite linear;\\n}\\n\\n.fa-pulse {\\n -webkit-animation: fa-spin 1s infinite steps(8);\\n animation: fa-spin 1s infinite steps(8);\\n}\\n\\n@-webkit-keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n\\n@keyframes fa-spin {\\n 0% {\\n -webkit-transform: rotate(0deg);\\n transform: rotate(0deg);\\n }\\n 100% {\\n -webkit-transform: rotate(360deg);\\n transform: rotate(360deg);\\n }\\n}\\n.fa-rotate-90 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)\\\";\\n -webkit-transform: rotate(90deg);\\n transform: rotate(90deg);\\n}\\n\\n.fa-rotate-180 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)\\\";\\n -webkit-transform: rotate(180deg);\\n transform: rotate(180deg);\\n}\\n\\n.fa-rotate-270 {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)\\\";\\n -webkit-transform: rotate(270deg);\\n transform: rotate(270deg);\\n}\\n\\n.fa-flip-horizontal {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)\\\";\\n -webkit-transform: scale(-1, 1);\\n transform: scale(-1, 1);\\n}\\n\\n.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(1, -1);\\n transform: scale(1, -1);\\n}\\n\\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\\n -ms-filter: \\\"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)\\\";\\n -webkit-transform: scale(-1, -1);\\n transform: scale(-1, -1);\\n}\\n\\n:root .fa-rotate-90,\\n:root .fa-rotate-180,\\n:root .fa-rotate-270,\\n:root .fa-flip-horizontal,\\n:root .fa-flip-vertical,\\n:root .fa-flip-both {\\n -webkit-filter: none;\\n filter: none;\\n}\\n\\n.fa-stack {\\n display: inline-block;\\n height: 2em;\\n position: relative;\\n width: 2.5em;\\n}\\n\\n.fa-stack-1x,\\n.fa-stack-2x {\\n bottom: 0;\\n left: 0;\\n margin: auto;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n\\n.svg-inline--fa.fa-stack-1x {\\n height: 1em;\\n width: 1.25em;\\n}\\n.svg-inline--fa.fa-stack-2x {\\n height: 2em;\\n width: 2.5em;\\n}\\n\\n.fa-inverse {\\n color: #fff;\\n}\\n\\n.sr-only {\\n border: 0;\\n clip: rect(0, 0, 0, 0);\\n height: 1px;\\n margin: -1px;\\n overflow: hidden;\\n padding: 0;\\n position: absolute;\\n width: 1px;\\n}\\n\\n.sr-only-focusable:active, .sr-only-focusable:focus {\\n clip: auto;\\n height: auto;\\n margin: 0;\\n overflow: visible;\\n position: static;\\n width: auto;\\n}\\n\\n.svg-inline--fa .fa-primary {\\n fill: var(--fa-primary-color, currentColor);\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa .fa-secondary {\\n fill: var(--fa-secondary-color, currentColor);\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-primary {\\n opacity: 0.4;\\n opacity: var(--fa-secondary-opacity, 0.4);\\n}\\n\\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\\n opacity: 1;\\n opacity: var(--fa-primary-opacity, 1);\\n}\\n\\n.svg-inline--fa mask .fa-primary,\\n.svg-inline--fa mask .fa-secondary {\\n fill: black;\\n}\\n\\n.fad.fa-inverse {\\n color: #fff;\\n}\";\n\nfunction css () {\n var dfp = DEFAULT_FAMILY_PREFIX;\n var drc = DEFAULT_REPLACEMENT_CLASS;\n var fp = config.familyPrefix;\n var rc = config.replacementClass;\n var s = baseStyles;\n\n if (fp !== dfp || rc !== drc) {\n var dPatt = new RegExp(\"\\\\.\".concat(dfp, \"\\\\-\"), 'g');\n var customPropPatt = new RegExp(\"\\\\--\".concat(dfp, \"\\\\-\"), 'g');\n var rPatt = new RegExp(\"\\\\.\".concat(drc), 'g');\n s = s.replace(dPatt, \".\".concat(fp, \"-\")).replace(customPropPatt, \"--\".concat(fp, \"-\")).replace(rPatt, \".\".concat(rc));\n }\n\n return s;\n}\n\nvar Library =\n/*#__PURE__*/\nfunction () {\n function Library() {\n _classCallCheck(this, Library);\n\n this.definitions = {};\n }\n\n _createClass(Library, [{\n key: \"add\",\n value: function add() {\n var _this = this;\n\n for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {\n definitions[_key] = arguments[_key];\n }\n\n var additions = definitions.reduce(this._pullDefinitions, {});\n Object.keys(additions).forEach(function (key) {\n _this.definitions[key] = _objectSpread({}, _this.definitions[key] || {}, additions[key]);\n defineIcons(key, additions[key]);\n build();\n });\n }\n }, {\n key: \"reset\",\n value: function reset() {\n this.definitions = {};\n }\n }, {\n key: \"_pullDefinitions\",\n value: function _pullDefinitions(additions, definition) {\n var normalized = definition.prefix && definition.iconName && definition.icon ? {\n 0: definition\n } : definition;\n Object.keys(normalized).map(function (key) {\n var _normalized$key = normalized[key],\n prefix = _normalized$key.prefix,\n iconName = _normalized$key.iconName,\n icon = _normalized$key.icon;\n if (!additions[prefix]) additions[prefix] = {};\n additions[prefix][iconName] = icon;\n });\n return additions;\n }\n }]);\n\n return Library;\n}();\n\nfunction ensureCss() {\n if (config.autoAddCss && !_cssInserted) {\n insertCss(css());\n\n _cssInserted = true;\n }\n}\n\nfunction apiObject(val, abstractCreator) {\n Object.defineProperty(val, 'abstract', {\n get: abstractCreator\n });\n Object.defineProperty(val, 'html', {\n get: function get() {\n return val.abstract.map(function (a) {\n return toHtml(a);\n });\n }\n });\n Object.defineProperty(val, 'node', {\n get: function get() {\n if (!IS_DOM) return;\n var container = DOCUMENT.createElement('div');\n container.innerHTML = val.html;\n return container.children;\n }\n });\n return val;\n}\n\nfunction findIconDefinition(iconLookup) {\n var _iconLookup$prefix = iconLookup.prefix,\n prefix = _iconLookup$prefix === void 0 ? 'fa' : _iconLookup$prefix,\n iconName = iconLookup.iconName;\n if (!iconName) return;\n return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);\n}\n\nfunction resolveIcons(next) {\n return function (maybeIconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});\n var mask = params.mask;\n\n if (mask) {\n mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});\n }\n\n return next(iconDefinition, _objectSpread({}, params, {\n mask: mask\n }));\n };\n}\n\nvar library = new Library();\nvar noAuto = function noAuto() {\n config.autoReplaceSvg = false;\n config.observeMutations = false;\n disconnect();\n};\nvar _cssInserted = false;\nvar dom = {\n i2svg: function i2svg() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (IS_DOM) {\n ensureCss();\n var _params$node = params.node,\n node = _params$node === void 0 ? DOCUMENT : _params$node,\n _params$callback = params.callback,\n callback = _params$callback === void 0 ? function () {} : _params$callback;\n\n if (config.searchPseudoElements) {\n searchPseudoElements(node);\n }\n\n return onTree(node, callback);\n } else {\n return picked.reject('Operation requires a DOM of some kind.');\n }\n },\n css: css,\n insertCss: function insertCss$$1() {\n if (!_cssInserted) {\n insertCss(css());\n\n _cssInserted = true;\n }\n },\n watch: function watch() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var autoReplaceSvgRoot = params.autoReplaceSvgRoot,\n observeMutationsRoot = params.observeMutationsRoot;\n\n if (config.autoReplaceSvg === false) {\n config.autoReplaceSvg = true;\n }\n\n config.observeMutations = true;\n domready(function () {\n autoReplace({\n autoReplaceSvgRoot: autoReplaceSvgRoot\n });\n observe({\n treeCallback: onTree,\n nodeCallback: onNode,\n pseudoElementsCallback: searchPseudoElements,\n observeMutationsRoot: observeMutationsRoot\n });\n });\n }\n};\nvar parse = {\n transform: function transform(transformString) {\n return parseTransformString(transformString);\n }\n};\nvar icon = resolveIcons(function (iconDefinition) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform = params.transform,\n transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,\n _params$symbol = params.symbol,\n symbol = _params$symbol === void 0 ? false : _params$symbol,\n _params$mask = params.mask,\n mask = _params$mask === void 0 ? null : _params$mask,\n _params$maskId = params.maskId,\n maskId = _params$maskId === void 0 ? null : _params$maskId,\n _params$title = params.title,\n title = _params$title === void 0 ? null : _params$title,\n _params$titleId = params.titleId,\n titleId = _params$titleId === void 0 ? null : _params$titleId,\n _params$classes = params.classes,\n classes = _params$classes === void 0 ? [] : _params$classes,\n _params$attributes = params.attributes,\n attributes = _params$attributes === void 0 ? {} : _params$attributes,\n _params$styles = params.styles,\n styles = _params$styles === void 0 ? {} : _params$styles;\n if (!iconDefinition) return;\n var prefix = iconDefinition.prefix,\n iconName = iconDefinition.iconName,\n icon = iconDefinition.icon;\n return apiObject(_objectSpread({\n type: 'icon'\n }, iconDefinition), function () {\n ensureCss();\n\n if (config.autoA11y) {\n if (title) {\n attributes['aria-labelledby'] = \"\".concat(config.replacementClass, \"-title-\").concat(titleId || nextUniqueId());\n } else {\n attributes['aria-hidden'] = 'true';\n attributes['focusable'] = 'false';\n }\n }\n\n return makeInlineSvgAbstract({\n icons: {\n main: asFoundIcon(icon),\n mask: mask ? asFoundIcon(mask.icon) : {\n found: false,\n width: null,\n height: null,\n icon: {}\n }\n },\n prefix: prefix,\n iconName: iconName,\n transform: _objectSpread({}, meaninglessTransform, transform),\n symbol: symbol,\n title: title,\n maskId: maskId,\n titleId: titleId,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: classes\n }\n });\n });\n});\nvar text = function text(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$transform2 = params.transform,\n transform = _params$transform2 === void 0 ? meaninglessTransform : _params$transform2,\n _params$title2 = params.title,\n title = _params$title2 === void 0 ? null : _params$title2,\n _params$classes2 = params.classes,\n classes = _params$classes2 === void 0 ? [] : _params$classes2,\n _params$attributes2 = params.attributes,\n attributes = _params$attributes2 === void 0 ? {} : _params$attributes2,\n _params$styles2 = params.styles,\n styles = _params$styles2 === void 0 ? {} : _params$styles2;\n return apiObject({\n type: 'text',\n content: content\n }, function () {\n ensureCss();\n return makeLayersTextAbstract({\n content: content,\n transform: _objectSpread({}, meaninglessTransform, transform),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-text\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar counter = function counter(content) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$title3 = params.title,\n title = _params$title3 === void 0 ? null : _params$title3,\n _params$classes3 = params.classes,\n classes = _params$classes3 === void 0 ? [] : _params$classes3,\n _params$attributes3 = params.attributes,\n attributes = _params$attributes3 === void 0 ? {} : _params$attributes3,\n _params$styles3 = params.styles,\n styles = _params$styles3 === void 0 ? {} : _params$styles3;\n return apiObject({\n type: 'counter',\n content: content\n }, function () {\n ensureCss();\n return makeLayersCounterAbstract({\n content: content.toString(),\n title: title,\n extra: {\n attributes: attributes,\n styles: styles,\n classes: [\"\".concat(config.familyPrefix, \"-layers-counter\")].concat(_toConsumableArray(classes))\n }\n });\n });\n};\nvar layer = function layer(assembler) {\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _params$classes4 = params.classes,\n classes = _params$classes4 === void 0 ? [] : _params$classes4;\n return apiObject({\n type: 'layer'\n }, function () {\n ensureCss();\n var children = [];\n assembler(function (args) {\n Array.isArray(args) ? args.map(function (a) {\n children = children.concat(a.abstract);\n }) : children = children.concat(args.abstract);\n });\n return [{\n tag: 'span',\n attributes: {\n class: [\"\".concat(config.familyPrefix, \"-layers\")].concat(_toConsumableArray(classes)).join(' ')\n },\n children: children\n }];\n });\n};\nvar api = {\n noAuto: noAuto,\n config: config,\n dom: dom,\n library: library,\n parse: parse,\n findIconDefinition: findIconDefinition,\n icon: icon,\n text: text,\n counter: counter,\n layer: layer,\n toHtml: toHtml\n};\n\nvar autoReplace = function autoReplace() {\n var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _params$autoReplaceSv = params.autoReplaceSvgRoot,\n autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;\n if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({\n node: autoReplaceSvgRoot\n });\n};\n\nexport { icon, noAuto, config, toHtml, layer, text, counter, library, dom, parse, findIconDefinition };\n","import { parse, icon } from '@fortawesome/fontawesome-svg-core';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n}\n\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\n// Get CSS class list from a props object\nfunction classList(props) {\n var _classes;\n\n var beat = props.beat,\n fade = props.fade,\n beatFade = props.beatFade,\n bounce = props.bounce,\n shake = props.shake,\n flash = props.flash,\n spin = props.spin,\n spinPulse = props.spinPulse,\n spinReverse = props.spinReverse,\n pulse = props.pulse,\n fixedWidth = props.fixedWidth,\n inverse = props.inverse,\n border = props.border,\n listItem = props.listItem,\n flip = props.flip,\n size = props.size,\n rotation = props.rotation,\n pull = props.pull; // map of CSS class names to properties\n\n var classes = (_classes = {\n 'fa-beat': beat,\n 'fa-fade': fade,\n 'fa-beat-fade': beatFade,\n 'fa-bounce': bounce,\n 'fa-shake': shake,\n 'fa-flash': flash,\n 'fa-spin': spin,\n 'fa-spin-reverse': spinReverse,\n 'fa-spin-pulse': spinPulse,\n 'fa-pulse': pulse,\n 'fa-fw': fixedWidth,\n 'fa-inverse': inverse,\n 'fa-border': border,\n 'fa-li': listItem,\n 'fa-flip': flip === true,\n 'fa-flip-horizontal': flip === 'horizontal' || flip === 'both',\n 'fa-flip-vertical': flip === 'vertical' || flip === 'both'\n }, _defineProperty(_classes, \"fa-\".concat(size), typeof size !== 'undefined' && size !== null), _defineProperty(_classes, \"fa-rotate-\".concat(rotation), typeof rotation !== 'undefined' && rotation !== null && rotation !== 0), _defineProperty(_classes, \"fa-pull-\".concat(pull), typeof pull !== 'undefined' && pull !== null), _defineProperty(_classes, 'fa-swap-opacity', props.swapOpacity), _classes); // map over all the keys in the classes object\n // return an array of the keys where the value for the key is not null\n\n return Object.keys(classes).map(function (key) {\n return classes[key] ? key : null;\n }).filter(function (key) {\n return key;\n });\n}\n\n// Camelize taken from humps\n// humps is copyright © 2012+ Dom Christie\n// Released under the MIT license.\n// Performant way to determine if object coerces to a number\nfunction _isNumerical(obj) {\n obj = obj - 0; // eslint-disable-next-line no-self-compare\n\n return obj === obj;\n}\n\nfunction camelize(string) {\n if (_isNumerical(string)) {\n return string;\n } // eslint-disable-next-line no-useless-escape\n\n\n string = string.replace(/[\\-_\\s]+(.)?/g, function (match, chr) {\n return chr ? chr.toUpperCase() : '';\n }); // Ensure 1st char is always lowercase\n\n return string.substr(0, 1).toLowerCase() + string.substr(1);\n}\n\nvar _excluded$1 = [\"style\"];\n\nfunction capitalize(val) {\n return val.charAt(0).toUpperCase() + val.slice(1);\n}\n\nfunction styleToObject(style) {\n return style.split(';').map(function (s) {\n return s.trim();\n }).filter(function (s) {\n return s;\n }).reduce(function (acc, pair) {\n var i = pair.indexOf(':');\n var prop = camelize(pair.slice(0, i));\n var value = pair.slice(i + 1).trim();\n prop.startsWith('webkit') ? acc[capitalize(prop)] = value : acc[prop] = value;\n return acc;\n }, {});\n}\n\nfunction convert(createElement, element) {\n var extraProps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (typeof element === 'string') {\n return element;\n }\n\n var children = (element.children || []).map(function (child) {\n return convert(createElement, child);\n });\n /* eslint-disable dot-notation */\n\n var mixins = Object.keys(element.attributes || {}).reduce(function (acc, key) {\n var val = element.attributes[key];\n\n switch (key) {\n case 'class':\n acc.attrs['className'] = val;\n delete element.attributes['class'];\n break;\n\n case 'style':\n acc.attrs['style'] = styleToObject(val);\n break;\n\n default:\n if (key.indexOf('aria-') === 0 || key.indexOf('data-') === 0) {\n acc.attrs[key.toLowerCase()] = val;\n } else {\n acc.attrs[camelize(key)] = val;\n }\n\n }\n\n return acc;\n }, {\n attrs: {}\n });\n\n var _extraProps$style = extraProps.style,\n existingStyle = _extraProps$style === void 0 ? {} : _extraProps$style,\n remaining = _objectWithoutProperties(extraProps, _excluded$1);\n\n mixins.attrs['style'] = _objectSpread2(_objectSpread2({}, mixins.attrs['style']), existingStyle);\n /* eslint-enable */\n\n return createElement.apply(void 0, [element.tag, _objectSpread2(_objectSpread2({}, mixins.attrs), remaining)].concat(_toConsumableArray(children)));\n}\n\nvar PRODUCTION = false;\n\ntry {\n PRODUCTION = process.env.NODE_ENV === 'production';\n} catch (e) {}\n\nfunction log () {\n if (!PRODUCTION && console && typeof console.error === 'function') {\n var _console;\n\n (_console = console).error.apply(_console, arguments);\n }\n}\n\nfunction normalizeIconArgs(icon) {\n // this has everything that it needs to be rendered which means it was probably imported\n // directly from an icon svg package\n if (icon && _typeof(icon) === 'object' && icon.prefix && icon.iconName && icon.icon) {\n return icon;\n }\n\n if (parse.icon) {\n return parse.icon(icon);\n } // if the icon is null, there's nothing to do\n\n\n if (icon === null) {\n return null;\n } // if the icon is an object and has a prefix and an icon name, return it\n\n\n if (icon && _typeof(icon) === 'object' && icon.prefix && icon.iconName) {\n return icon;\n } // if it's an array with length of two\n\n\n if (Array.isArray(icon) && icon.length === 2) {\n // use the first item as prefix, second as icon name\n return {\n prefix: icon[0],\n iconName: icon[1]\n };\n } // if it's a string, use it as the icon name\n\n\n if (typeof icon === 'string') {\n return {\n prefix: 'fas',\n iconName: icon\n };\n }\n}\n\n// creates an object with a key of key\n// and a value of value\n// if certain conditions are met\nfunction objectWithKey(key, value) {\n // if the value is a non-empty array\n // or it's not an array but it is truthy\n // then create the object with the key and the value\n // if not, return an empty array\n return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? _defineProperty({}, key, value) : {};\n}\n\nvar _excluded = [\"forwardedRef\"];\nfunction FontAwesomeIcon(_ref) {\n var forwardedRef = _ref.forwardedRef,\n props = _objectWithoutProperties(_ref, _excluded);\n\n var iconArgs = props.icon,\n maskArgs = props.mask,\n symbol = props.symbol,\n className = props.className,\n title = props.title,\n titleId = props.titleId,\n maskId = props.maskId;\n var iconLookup = normalizeIconArgs(iconArgs);\n var classes = objectWithKey('classes', [].concat(_toConsumableArray(classList(props)), _toConsumableArray(className.split(' '))));\n var transform = objectWithKey('transform', typeof props.transform === 'string' ? parse.transform(props.transform) : props.transform);\n var mask = objectWithKey('mask', normalizeIconArgs(maskArgs));\n var renderedIcon = icon(iconLookup, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, classes), transform), mask), {}, {\n symbol: symbol,\n title: title,\n titleId: titleId,\n maskId: maskId\n }));\n\n if (!renderedIcon) {\n log('Could not find icon', iconLookup);\n return null;\n }\n\n var abstract = renderedIcon.abstract;\n var extraProps = {\n ref: forwardedRef\n };\n Object.keys(props).forEach(function (key) {\n // eslint-disable-next-line no-prototype-builtins\n if (!FontAwesomeIcon.defaultProps.hasOwnProperty(key)) {\n extraProps[key] = props[key];\n }\n });\n return convertCurry(abstract[0], extraProps);\n}\nFontAwesomeIcon.displayName = 'FontAwesomeIcon';\nFontAwesomeIcon.propTypes = {\n beat: PropTypes.bool,\n border: PropTypes.bool,\n beatFade: PropTypes.bool,\n bounce: PropTypes.bool,\n className: PropTypes.string,\n fade: PropTypes.bool,\n flash: PropTypes.bool,\n mask: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),\n maskId: PropTypes.string,\n fixedWidth: PropTypes.bool,\n inverse: PropTypes.bool,\n flip: PropTypes.oneOf([true, false, 'horizontal', 'vertical', 'both']),\n icon: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string]),\n listItem: PropTypes.bool,\n pull: PropTypes.oneOf(['right', 'left']),\n pulse: PropTypes.bool,\n rotation: PropTypes.oneOf([0, 90, 180, 270]),\n shake: PropTypes.bool,\n size: PropTypes.oneOf(['2xs', 'xs', 'sm', 'lg', 'xl', '2xl', '1x', '2x', '3x', '4x', '5x', '6x', '7x', '8x', '9x', '10x']),\n spin: PropTypes.bool,\n spinPulse: PropTypes.bool,\n spinReverse: PropTypes.bool,\n symbol: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n title: PropTypes.string,\n titleId: PropTypes.string,\n transform: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n swapOpacity: PropTypes.bool\n};\nFontAwesomeIcon.defaultProps = {\n border: false,\n className: '',\n mask: null,\n maskId: null,\n fixedWidth: false,\n inverse: false,\n flip: false,\n icon: null,\n listItem: false,\n pull: null,\n pulse: false,\n rotation: null,\n size: null,\n spin: false,\n spinPulse: false,\n spinReverse: false,\n beat: false,\n fade: false,\n beatFade: false,\n bounce: false,\n shake: false,\n symbol: false,\n title: '',\n titleId: null,\n transform: null,\n swapOpacity: false\n};\nvar convertCurry = convert.bind(null, React.createElement);\n\nexport { FontAwesomeIcon };\n","/*!\n * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n */\nvar prefix = \"far\";\nvar faAddressBook = {\n prefix: 'far',\n iconName: 'address-book',\n icon: [448, 512, [], \"f2b9\", \"M436 160c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-20v-64h20zm-68 304H48V48h320v416zM208 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2z\"]\n};\nvar faAddressCard = {\n prefix: 'far',\n iconName: 'address-card',\n icon: [576, 512, [], \"f2bb\", \"M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 400H48V80h480v352zM208 256c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2zM360 320h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8z\"]\n};\nvar faAngry = {\n prefix: 'far',\n iconName: 'angry',\n icon: [496, 512, [], \"f556\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm0-144c-33.6 0-65.2 14.8-86.8 40.6-8.5 10.2-7.1 25.3 3.1 33.8s25.3 7.2 33.8-3c24.8-29.7 75-29.7 99.8 0 8.1 9.7 23.2 11.9 33.8 3 10.2-8.5 11.5-23.6 3.1-33.8-21.6-25.8-53.2-40.6-86.8-40.6zm-48-72c10.3 0 19.9-6.7 23-17.1 3.8-12.7-3.4-26.1-16.1-29.9l-80-24c-12.8-3.9-26.1 3.4-29.9 16.1-3.8 12.7 3.4 26.1 16.1 29.9l28.2 8.5c-3.1 4.9-5.3 10.4-5.3 16.6 0 17.7 14.3 32 32 32s32-14.4 32-32.1zm199-54.9c-3.8-12.7-17.1-19.9-29.9-16.1l-80 24c-12.7 3.8-19.9 17.2-16.1 29.9 3.1 10.4 12.7 17.1 23 17.1 0 17.7 14.3 32 32 32s32-14.3 32-32c0-6.2-2.2-11.7-5.3-16.6l28.2-8.5c12.7-3.7 19.9-17.1 16.1-29.8z\"]\n};\nvar faArrowAltCircleDown = {\n prefix: 'far',\n iconName: 'arrow-alt-circle-down',\n icon: [512, 512, [], \"f358\", \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm-32-316v116h-67c-10.7 0-16 12.9-8.5 20.5l99 99c4.7 4.7 12.3 4.7 17 0l99-99c7.6-7.6 2.2-20.5-8.5-20.5h-67V140c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12z\"]\n};\nvar faArrowAltCircleLeft = {\n prefix: 'far',\n iconName: 'arrow-alt-circle-left',\n icon: [512, 512, [], \"f359\", \"M8 256c0 137 111 248 248 248s248-111 248-248S393 8 256 8 8 119 8 256zm448 0c0 110.5-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56s200 89.5 200 200zm-72-20v40c0 6.6-5.4 12-12 12H256v67c0 10.7-12.9 16-20.5 8.5l-99-99c-4.7-4.7-4.7-12.3 0-17l99-99c7.6-7.6 20.5-2.2 20.5 8.5v67h116c6.6 0 12 5.4 12 12z\"]\n};\nvar faArrowAltCircleRight = {\n prefix: 'far',\n iconName: 'arrow-alt-circle-right',\n icon: [512, 512, [], \"f35a\", \"M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm72 20v-40c0-6.6 5.4-12 12-12h116v-67c0-10.7 12.9-16 20.5-8.5l99 99c4.7 4.7 4.7 12.3 0 17l-99 99c-7.6 7.6-20.5 2.2-20.5-8.5v-67H140c-6.6 0-12-5.4-12-12z\"]\n};\nvar faArrowAltCircleUp = {\n prefix: 'far',\n iconName: 'arrow-alt-circle-up',\n icon: [512, 512, [], \"f35b\", \"M256 504c137 0 248-111 248-248S393 8 256 8 8 119 8 256s111 248 248 248zm0-448c110.5 0 200 89.5 200 200s-89.5 200-200 200S56 366.5 56 256 145.5 56 256 56zm20 328h-40c-6.6 0-12-5.4-12-12V256h-67c-10.7 0-16-12.9-8.5-20.5l99-99c4.7-4.7 12.3-4.7 17 0l99 99c7.6 7.6 2.2 20.5-8.5 20.5h-67v116c0 6.6-5.4 12-12 12z\"]\n};\nvar faBell = {\n prefix: 'far',\n iconName: 'bell',\n icon: [448, 512, [], \"f0f3\", \"M439.39 362.29c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71zM67.53 368c21.22-27.97 44.42-74.33 44.53-159.42 0-.2-.06-.38-.06-.58 0-61.86 50.14-112 112-112s112 50.14 112 112c0 .2-.06.38-.06.58.11 85.1 23.31 131.46 44.53 159.42H67.53zM224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64z\"]\n};\nvar faBellSlash = {\n prefix: 'far',\n iconName: 'bell-slash',\n icon: [640, 512, [], \"f1f6\", \"M633.99 471.02L36 3.51C29.1-2.01 19.03-.9 13.51 6l-10 12.49C-2.02 25.39-.9 35.46 6 40.98l598 467.51c6.9 5.52 16.96 4.4 22.49-2.49l10-12.49c5.52-6.9 4.41-16.97-2.5-22.49zM163.53 368c16.71-22.03 34.48-55.8 41.4-110.58l-45.47-35.55c-3.27 90.73-36.47 120.68-54.84 140.42-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h279.66l-61.4-48H163.53zM320 96c61.86 0 112 50.14 112 112 0 .2-.06.38-.06.58.02 16.84 1.16 31.77 2.79 45.73l59.53 46.54c-8.31-22.13-14.34-51.49-14.34-92.85 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84c-26.02 5.41-49.45 16.94-69.13 32.72l38.17 29.84C275 103.18 296.65 96 320 96zm0 416c35.32 0 63.97-28.65 63.97-64H256.03c0 35.35 28.65 64 63.97 64z\"]\n};\nvar faBookmark = {\n prefix: 'far',\n iconName: 'bookmark',\n icon: [384, 512, [], \"f02e\", \"M336 0H48C21.49 0 0 21.49 0 48v464l192-112 192 112V48c0-26.51-21.49-48-48-48zm0 428.43l-144-84-144 84V54a6 6 0 0 1 6-6h276c3.314 0 6 2.683 6 5.996V428.43z\"]\n};\nvar faBuilding = {\n prefix: 'far',\n iconName: 'building',\n icon: [448, 512, [], \"f1ad\", \"M128 148v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12h-40c-6.6 0-12-5.4-12-12zm140 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-128 96h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm128 0h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm-76 84v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm76 12h40c6.6 0 12-5.4 12-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12zm180 124v36H0v-36c0-6.6 5.4-12 12-12h19.5V24c0-13.3 10.7-24 24-24h337c13.3 0 24 10.7 24 24v440H436c6.6 0 12 5.4 12 12zM79.5 463H192v-67c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v67h112.5V49L80 48l-.5 415z\"]\n};\nvar faCalendar = {\n prefix: 'far',\n iconName: 'calendar',\n icon: [448, 512, [], \"f133\", \"M400 64h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V160h352v298c0 3.3-2.7 6-6 6z\"]\n};\nvar faCalendarAlt = {\n prefix: 'far',\n iconName: 'calendar-alt',\n icon: [448, 512, [], \"f073\", \"M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faCalendarCheck = {\n prefix: 'far',\n iconName: 'calendar-check',\n icon: [448, 512, [], \"f274\", \"M400 64h-48V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H160V12c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v52H48C21.49 64 0 85.49 0 112v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V160h352v298a6 6 0 0 1-6 6zm-52.849-200.65L198.842 404.519c-4.705 4.667-12.303 4.637-16.971-.068l-75.091-75.699c-4.667-4.705-4.637-12.303.068-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l44.104 44.461 111.072-110.181c4.705-4.667 12.303-4.637 16.971.068l22.536 22.718c4.667 4.705 4.636 12.303-.069 16.97z\"]\n};\nvar faCalendarMinus = {\n prefix: 'far',\n iconName: 'calendar-minus',\n icon: [448, 512, [], \"f272\", \"M124 328c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h200c6.6 0 12 5.4 12 12v24c0 6.6-5.4 12-12 12H124zm324-216v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faCalendarPlus = {\n prefix: 'far',\n iconName: 'calendar-plus',\n icon: [448, 512, [], \"f271\", \"M336 292v24c0 6.6-5.4 12-12 12h-76v76c0 6.6-5.4 12-12 12h-24c-6.6 0-12-5.4-12-12v-76h-76c-6.6 0-12-5.4-12-12v-24c0-6.6 5.4-12 12-12h76v-76c0-6.6 5.4-12 12-12h24c6.6 0 12 5.4 12 12v76h76c6.6 0 12 5.4 12 12zm112-180v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faCalendarTimes = {\n prefix: 'far',\n iconName: 'calendar-times',\n icon: [448, 512, [], \"f273\", \"M311.7 374.7l-17 17c-4.7 4.7-12.3 4.7-17 0L224 337.9l-53.7 53.7c-4.7 4.7-12.3 4.7-17 0l-17-17c-4.7-4.7-4.7-12.3 0-17l53.7-53.7-53.7-53.7c-4.7-4.7-4.7-12.3 0-17l17-17c4.7-4.7 12.3-4.7 17 0l53.7 53.7 53.7-53.7c4.7-4.7 12.3-4.7 17 0l17 17c4.7 4.7 4.7 12.3 0 17L257.9 304l53.7 53.7c4.8 4.7 4.8 12.3.1 17zM448 112v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faCaretSquareDown = {\n prefix: 'far',\n iconName: 'caret-square-down',\n icon: [448, 512, [], \"f150\", \"M125.1 208h197.8c10.7 0 16.1 13 8.5 20.5l-98.9 98.3c-4.7 4.7-12.2 4.7-16.9 0l-98.9-98.3c-7.7-7.5-2.3-20.5 8.4-20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faCaretSquareLeft = {\n prefix: 'far',\n iconName: 'caret-square-left',\n icon: [448, 512, [], \"f191\", \"M272 157.1v197.8c0 10.7-13 16.1-20.5 8.5l-98.3-98.9c-4.7-4.7-4.7-12.2 0-16.9l98.3-98.9c7.5-7.7 20.5-2.3 20.5 8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faCaretSquareRight = {\n prefix: 'far',\n iconName: 'caret-square-right',\n icon: [448, 512, [], \"f152\", \"M176 354.9V157.1c0-10.7 13-16.1 20.5-8.5l98.3 98.9c4.7 4.7 4.7 12.2 0 16.9l-98.3 98.9c-7.5 7.7-20.5 2.3-20.5-8.4zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faCaretSquareUp = {\n prefix: 'far',\n iconName: 'caret-square-up',\n icon: [448, 512, [], \"f151\", \"M322.9 304H125.1c-10.7 0-16.1-13-8.5-20.5l98.9-98.3c4.7-4.7 12.2-4.7 16.9 0l98.9 98.3c7.7 7.5 2.3 20.5-8.4 20.5zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faChartBar = {\n prefix: 'far',\n iconName: 'chart-bar',\n icon: [512, 512, [], \"f080\", \"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\"]\n};\nvar faCheckCircle = {\n prefix: 'far',\n iconName: 'check-circle',\n icon: [512, 512, [], \"f058\", \"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z\"]\n};\nvar faCheckSquare = {\n prefix: 'far',\n iconName: 'check-square',\n icon: [448, 512, [], \"f14a\", \"M400 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm0 400H48V80h352v352zm-35.864-241.724L191.547 361.48c-4.705 4.667-12.303 4.637-16.97-.068l-90.781-91.516c-4.667-4.705-4.637-12.303.069-16.971l22.719-22.536c4.705-4.667 12.303-4.637 16.97.069l59.792 60.277 141.352-140.216c4.705-4.667 12.303-4.637 16.97.068l22.536 22.718c4.667 4.706 4.637 12.304-.068 16.971z\"]\n};\nvar faCircle = {\n prefix: 'far',\n iconName: 'circle',\n icon: [512, 512, [], \"f111\", \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200z\"]\n};\nvar faClipboard = {\n prefix: 'far',\n iconName: 'clipboard',\n icon: [384, 512, [], \"f328\", \"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z\"]\n};\nvar faClock = {\n prefix: 'far',\n iconName: 'clock',\n icon: [512, 512, [], \"f017\", \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z\"]\n};\nvar faClone = {\n prefix: 'far',\n iconName: 'clone',\n icon: [512, 512, [], \"f24d\", \"M464 0H144c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h320c26.51 0 48-21.49 48-48v-48h48c26.51 0 48-21.49 48-48V48c0-26.51-21.49-48-48-48zM362 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h42v224c0 26.51 21.49 48 48 48h224v42a6 6 0 0 1-6 6zm96-96H150a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h308a6 6 0 0 1 6 6v308a6 6 0 0 1-6 6z\"]\n};\nvar faClosedCaptioning = {\n prefix: 'far',\n iconName: 'closed-captioning',\n icon: [512, 512, [], \"f20a\", \"M464 64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 336H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v276c0 3.3-2.7 6-6 6zm-211.1-85.7c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.8-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7l-17.5 30.5c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7zm190.4 0c1.7 2.4 1.5 5.6-.5 7.7-53.6 56.9-172.8 32.1-172.8-67.9 0-97.3 121.7-119.5 172.5-70.1 2.1 2 2.5 3.2 1 5.7L420 220.2c-1.9 3.1-6.2 4-9.1 1.7-40.8-32-94.6-14.9-94.6 31.2 0 48 51 70.5 92.2 32.6 2.8-2.5 7.1-2.1 9.2.9l19.6 27.7z\"]\n};\nvar faComment = {\n prefix: 'far',\n iconName: 'comment',\n icon: [512, 512, [], \"f075\", \"M256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z\"]\n};\nvar faCommentAlt = {\n prefix: 'far',\n iconName: 'comment-alt',\n icon: [512, 512, [], \"f27a\", \"M448 0H64C28.7 0 0 28.7 0 64v288c0 35.3 28.7 64 64 64h96v84c0 7.1 5.8 12 12 12 2.4 0 4.9-.7 7.1-2.4L304 416h144c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64zm16 352c0 8.8-7.2 16-16 16H288l-12.8 9.6L208 428v-60H64c-8.8 0-16-7.2-16-16V64c0-8.8 7.2-16 16-16h384c8.8 0 16 7.2 16 16v288z\"]\n};\nvar faCommentDots = {\n prefix: 'far',\n iconName: 'comment-dots',\n icon: [512, 512, [], \"f4ad\", \"M144 208c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm112 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zM256 32C114.6 32 0 125.1 0 240c0 47.6 19.9 91.2 52.9 126.3C38 405.7 7 439.1 6.5 439.5c-6.6 7-8.4 17.2-4.6 26S14.4 480 24 480c61.5 0 110-25.7 139.1-46.3C192 442.8 223.2 448 256 448c141.4 0 256-93.1 256-208S397.4 32 256 32zm0 368c-26.7 0-53.1-4.1-78.4-12.1l-22.7-7.2-19.5 13.8c-14.3 10.1-33.9 21.4-57.5 29 7.3-12.1 14.4-25.7 19.9-40.2l10.6-28.1-20.6-21.8C69.7 314.1 48 282.2 48 240c0-88.2 93.3-160 208-160s208 71.8 208 160-93.3 160-208 160z\"]\n};\nvar faComments = {\n prefix: 'far',\n iconName: 'comments',\n icon: [576, 512, [], \"f086\", \"M532 386.2c27.5-27.1 44-61.1 44-98.2 0-80-76.5-146.1-176.2-157.9C368.3 72.5 294.3 32 208 32 93.1 32 0 103.6 0 192c0 37 16.5 71 44 98.2-15.3 30.7-37.3 54.5-37.7 54.9-6.3 6.7-8.1 16.5-4.4 25 3.6 8.5 12 14 21.2 14 53.5 0 96.7-20.2 125.2-38.8 9.2 2.1 18.7 3.7 28.4 4.9C208.1 407.6 281.8 448 368 448c20.8 0 40.8-2.4 59.8-6.8C456.3 459.7 499.4 480 553 480c9.2 0 17.5-5.5 21.2-14 3.6-8.5 1.9-18.3-4.4-25-.4-.3-22.5-24.1-37.8-54.8zm-392.8-92.3L122.1 305c-14.1 9.1-28.5 16.3-43.1 21.4 2.7-4.7 5.4-9.7 8-14.8l15.5-31.1L77.7 256C64.2 242.6 48 220.7 48 192c0-60.7 73.3-112 160-112s160 51.3 160 112-73.3 112-160 112c-16.5 0-33-1.9-49-5.6l-19.8-4.5zM498.3 352l-24.7 24.4 15.5 31.1c2.6 5.1 5.3 10.1 8 14.8-14.6-5.1-29-12.3-43.1-21.4l-17.1-11.1-19.9 4.6c-16 3.7-32.5 5.6-49 5.6-54 0-102.2-20.1-131.3-49.7C338 339.5 416 272.9 416 192c0-3.4-.4-6.7-.7-10C479.7 196.5 528 238.8 528 288c0 28.7-16.2 50.6-29.7 64z\"]\n};\nvar faCompass = {\n prefix: 'far',\n iconName: 'compass',\n icon: [496, 512, [], \"f14e\", \"M347.94 129.86L203.6 195.83a31.938 31.938 0 0 0-15.77 15.77l-65.97 144.34c-7.61 16.65 9.54 33.81 26.2 26.2l144.34-65.97a31.938 31.938 0 0 0 15.77-15.77l65.97-144.34c7.61-16.66-9.54-33.81-26.2-26.2zm-77.36 148.72c-12.47 12.47-32.69 12.47-45.16 0-12.47-12.47-12.47-32.69 0-45.16 12.47-12.47 32.69-12.47 45.16 0 12.47 12.47 12.47 32.69 0 45.16zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 448c-110.28 0-200-89.72-200-200S137.72 56 248 56s200 89.72 200 200-89.72 200-200 200z\"]\n};\nvar faCopy = {\n prefix: 'far',\n iconName: 'copy',\n icon: [448, 512, [], \"f0c5\", \"M433.941 65.941l-51.882-51.882A48 48 0 0 0 348.118 0H176c-26.51 0-48 21.49-48 48v48H48c-26.51 0-48 21.49-48 48v320c0 26.51 21.49 48 48 48h224c26.51 0 48-21.49 48-48v-48h80c26.51 0 48-21.49 48-48V99.882a48 48 0 0 0-14.059-33.941zM266 464H54a6 6 0 0 1-6-6V150a6 6 0 0 1 6-6h74v224c0 26.51 21.49 48 48 48h96v42a6 6 0 0 1-6 6zm128-96H182a6 6 0 0 1-6-6V54a6 6 0 0 1 6-6h106v88c0 13.255 10.745 24 24 24h88v202a6 6 0 0 1-6 6zm6-256h-64V48h9.632c1.591 0 3.117.632 4.243 1.757l48.368 48.368a6 6 0 0 1 1.757 4.243V112z\"]\n};\nvar faCopyright = {\n prefix: 'far',\n iconName: 'copyright',\n icon: [512, 512, [], \"f1f9\", \"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm107.351-101.064c-9.614 9.712-45.53 41.396-104.065 41.396-82.43 0-140.484-61.425-140.484-141.567 0-79.152 60.275-139.401 139.762-139.401 55.531 0 88.738 26.62 97.593 34.779a11.965 11.965 0 0 1 1.936 15.322l-18.155 28.113c-3.841 5.95-11.966 7.282-17.499 2.921-8.595-6.776-31.814-22.538-61.708-22.538-48.303 0-77.916 35.33-77.916 80.082 0 41.589 26.888 83.692 78.277 83.692 32.657 0 56.843-19.039 65.726-27.225 5.27-4.857 13.596-4.039 17.82 1.738l19.865 27.17a11.947 11.947 0 0 1-1.152 15.518z\"]\n};\nvar faCreditCard = {\n prefix: 'far',\n iconName: 'credit-card',\n icon: [576, 512, [], \"f09d\", \"M527.9 32H48.1C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48.1 48h479.8c26.6 0 48.1-21.5 48.1-48V80c0-26.5-21.5-48-48.1-48zM54.1 80h467.8c3.3 0 6 2.7 6 6v42H48.1V86c0-3.3 2.7-6 6-6zm467.8 352H54.1c-3.3 0-6-2.7-6-6V256h479.8v170c0 3.3-2.7 6-6 6zM192 332v40c0 6.6-5.4 12-12 12h-72c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h72c6.6 0 12 5.4 12 12zm192 0v40c0 6.6-5.4 12-12 12H236c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h136c6.6 0 12 5.4 12 12z\"]\n};\nvar faDizzy = {\n prefix: 'far',\n iconName: 'dizzy',\n icon: [496, 512, [], \"f567\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-33.8-217.9c7.8-7.8 7.8-20.5 0-28.3L196.3 192l17.9-17.9c7.8-7.8 7.8-20.5 0-28.3-7.8-7.8-20.5-7.8-28.3 0L168 163.7l-17.8-17.8c-7.8-7.8-20.5-7.8-28.3 0-7.8 7.8-7.8 20.5 0 28.3l17.9 17.9-17.9 17.9c-7.8 7.8-7.8 20.5 0 28.3 7.8 7.8 20.5 7.8 28.3 0l17.8-17.8 17.8 17.8c7.9 7.7 20.5 7.7 28.4-.2zm160-92.2c-7.8-7.8-20.5-7.8-28.3 0L328 163.7l-17.8-17.8c-7.8-7.8-20.5-7.8-28.3 0-7.8 7.8-7.8 20.5 0 28.3l17.9 17.9-17.9 17.9c-7.8 7.8-7.8 20.5 0 28.3 7.8 7.8 20.5 7.8 28.3 0l17.8-17.8 17.8 17.8c7.8 7.8 20.5 7.8 28.3 0 7.8-7.8 7.8-20.5 0-28.3l-17.8-18 17.9-17.9c7.7-7.8 7.7-20.4 0-28.2zM248 272c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64z\"]\n};\nvar faDotCircle = {\n prefix: 'far',\n iconName: 'dot-circle',\n icon: [512, 512, [], \"f192\", \"M256 56c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m0-48C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 168c-44.183 0-80 35.817-80 80s35.817 80 80 80 80-35.817 80-80-35.817-80-80-80z\"]\n};\nvar faEdit = {\n prefix: 'far',\n iconName: 'edit',\n icon: [576, 512, [], \"f044\", \"M402.3 344.9l32-32c5-5 13.7-1.5 13.7 5.7V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h273.5c7.1 0 10.7 8.6 5.7 13.7l-32 32c-1.5 1.5-3.5 2.3-5.7 2.3H48v352h352V350.5c0-2.1.8-4.1 2.3-5.6zm156.6-201.8L296.3 405.7l-90.4 10c-26.2 2.9-48.5-19.2-45.6-45.6l10-90.4L432.9 17.1c22.9-22.9 59.9-22.9 82.7 0l43.2 43.2c22.9 22.9 22.9 60 .1 82.8zM460.1 174L402 115.9 216.2 301.8l-7.3 65.3 65.3-7.3L460.1 174zm64.8-79.7l-43.2-43.2c-4.1-4.1-10.8-4.1-14.8 0L436 82l58.1 58.1 30.9-30.9c4-4.2 4-10.8-.1-14.9z\"]\n};\nvar faEnvelope = {\n prefix: 'far',\n iconName: 'envelope',\n icon: [512, 512, [], \"f0e0\", \"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z\"]\n};\nvar faEnvelopeOpen = {\n prefix: 'far',\n iconName: 'envelope-open',\n icon: [512, 512, [], \"f2b6\", \"M494.586 164.516c-4.697-3.883-111.723-89.95-135.251-108.657C337.231 38.191 299.437 0 256 0c-43.205 0-80.636 37.717-103.335 55.859-24.463 19.45-131.07 105.195-135.15 108.549A48.004 48.004 0 0 0 0 201.485V464c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V201.509a48 48 0 0 0-17.414-36.993zM464 458a6 6 0 0 1-6 6H54a6 6 0 0 1-6-6V204.347c0-1.813.816-3.526 2.226-4.665 15.87-12.814 108.793-87.554 132.364-106.293C200.755 78.88 232.398 48 256 48c23.693 0 55.857 31.369 73.41 45.389 23.573 18.741 116.503 93.493 132.366 106.316a5.99 5.99 0 0 1 2.224 4.663V458zm-31.991-187.704c4.249 5.159 3.465 12.795-1.745 16.981-28.975 23.283-59.274 47.597-70.929 56.863C336.636 362.283 299.205 400 256 400c-43.452 0-81.287-38.237-103.335-55.86-11.279-8.967-41.744-33.413-70.927-56.865-5.21-4.187-5.993-11.822-1.745-16.981l15.258-18.528c4.178-5.073 11.657-5.843 16.779-1.726 28.618 23.001 58.566 47.035 70.56 56.571C200.143 320.631 232.307 352 256 352c23.602 0 55.246-30.88 73.41-45.389 11.994-9.535 41.944-33.57 70.563-56.568 5.122-4.116 12.601-3.346 16.778 1.727l15.258 18.526z\"]\n};\nvar faEye = {\n prefix: 'far',\n iconName: 'eye',\n icon: [576, 512, [], \"f06e\", \"M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z\"]\n};\nvar faEyeSlash = {\n prefix: 'far',\n iconName: 'eye-slash',\n icon: [640, 512, [], \"f070\", \"M634 471L36 3.51A16 16 0 0 0 13.51 6l-10 12.49A16 16 0 0 0 6 41l598 467.49a16 16 0 0 0 22.49-2.49l10-12.49A16 16 0 0 0 634 471zM296.79 146.47l134.79 105.38C429.36 191.91 380.48 144 320 144a112.26 112.26 0 0 0-23.21 2.47zm46.42 219.07L208.42 260.16C210.65 320.09 259.53 368 320 368a113 113 0 0 0 23.21-2.46zM320 112c98.65 0 189.09 55 237.93 144a285.53 285.53 0 0 1-44 60.2l37.74 29.5a333.7 333.7 0 0 0 52.9-75.11 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64c-36.7 0-71.71 7-104.63 18.81l46.41 36.29c18.94-4.3 38.34-7.1 58.22-7.1zm0 288c-98.65 0-189.08-55-237.93-144a285.47 285.47 0 0 1 44.05-60.19l-37.74-29.5a333.6 333.6 0 0 0-52.89 75.1 32.35 32.35 0 0 0 0 29.19C89.72 376.41 197.08 448 320 448c36.7 0 71.71-7.05 104.63-18.81l-46.41-36.28C359.28 397.2 339.89 400 320 400z\"]\n};\nvar faFile = {\n prefix: 'far',\n iconName: 'file',\n icon: [384, 512, [], \"f15b\", \"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48z\"]\n};\nvar faFileAlt = {\n prefix: 'far',\n iconName: 'file-alt',\n icon: [384, 512, [], \"f15c\", \"M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z\"]\n};\nvar faFileArchive = {\n prefix: 'far',\n iconName: 'file-archive',\n icon: [384, 512, [], \"f1c6\", \"M128.3 160v32h32v-32zm64-96h-32v32h32zm-64 32v32h32V96zm64 32h-32v32h32zm177.6-30.1L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM256 51.9l76.1 76.1H256zM336 464H48V48h79.7v16h32V48H208v104c0 13.3 10.7 24 24 24h104zM194.2 265.7c-1.1-5.6-6-9.7-11.8-9.7h-22.1v-32h-32v32l-19.7 97.1C102 385.6 126.8 416 160 416c33.1 0 57.9-30.2 51.5-62.6zm-33.9 124.4c-17.9 0-32.4-12.1-32.4-27s14.5-27 32.4-27 32.4 12.1 32.4 27-14.5 27-32.4 27zm32-198.1h-32v32h32z\"]\n};\nvar faFileAudio = {\n prefix: 'far',\n iconName: 'file-audio',\n icon: [384, 512, [], \"f1c7\", \"M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm144-76.024c0 10.691-12.926 16.045-20.485 8.485L136 360.486h-28c-6.627 0-12-5.373-12-12v-56c0-6.627 5.373-12 12-12h28l35.515-36.947c7.56-7.56 20.485-2.206 20.485 8.485v135.952zm41.201-47.13c9.051-9.297 9.06-24.133.001-33.439-22.149-22.752 12.235-56.246 34.395-33.481 27.198 27.94 27.212 72.444.001 100.401-21.793 22.386-56.947-10.315-34.397-33.481z\"]\n};\nvar faFileCode = {\n prefix: 'far',\n iconName: 'file-code',\n icon: [384, 512, [], \"f1c9\", \"M149.9 349.1l-.2-.2-32.8-28.9 32.8-28.9c3.6-3.2 4-8.8.8-12.4l-.2-.2-17.4-18.6c-3.4-3.6-9-3.7-12.4-.4l-57.7 54.1c-3.7 3.5-3.7 9.4 0 12.8l57.7 54.1c1.6 1.5 3.8 2.4 6 2.4 2.4 0 4.8-1 6.4-2.8l17.4-18.6c3.3-3.5 3.1-9.1-.4-12.4zm220-251.2L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM256 51.9l76.1 76.1H256zM336 464H48V48h160v104c0 13.3 10.7 24 24 24h104zM209.6 214c-4.7-1.4-9.5 1.3-10.9 6L144 408.1c-1.4 4.7 1.3 9.6 6 10.9l24.4 7.1c4.7 1.4 9.6-1.4 10.9-6L240 231.9c1.4-4.7-1.3-9.6-6-10.9zm24.5 76.9l.2.2 32.8 28.9-32.8 28.9c-3.6 3.2-4 8.8-.8 12.4l.2.2 17.4 18.6c3.3 3.5 8.9 3.7 12.4.4l57.7-54.1c3.7-3.5 3.7-9.4 0-12.8l-57.7-54.1c-3.5-3.3-9.1-3.2-12.4.4l-17.4 18.6c-3.3 3.5-3.1 9.1.4 12.4z\"]\n};\nvar faFileExcel = {\n prefix: 'far',\n iconName: 'file-excel',\n icon: [384, 512, [], \"f1c3\", \"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm212-240h-28.8c-4.4 0-8.4 2.4-10.5 6.3-18 33.1-22.2 42.4-28.6 57.7-13.9-29.1-6.9-17.3-28.6-57.7-2.1-3.9-6.2-6.3-10.6-6.3H124c-9.3 0-15 10-10.4 18l46.3 78-46.3 78c-4.7 8 1.1 18 10.4 18h28.9c4.4 0 8.4-2.4 10.5-6.3 21.7-40 23-45 28.6-57.7 14.9 30.2 5.9 15.9 28.6 57.7 2.1 3.9 6.2 6.3 10.6 6.3H260c9.3 0 15-10 10.4-18L224 320c.7-1.1 30.3-50.5 46.3-78 4.7-8-1.1-18-10.3-18z\"]\n};\nvar faFileImage = {\n prefix: 'far',\n iconName: 'file-image',\n icon: [384, 512, [], \"f1c5\", \"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm32-48h224V288l-23.5-23.5c-4.7-4.7-12.3-4.7-17 0L176 352l-39.5-39.5c-4.7-4.7-12.3-4.7-17 0L80 352v64zm48-240c-26.5 0-48 21.5-48 48s21.5 48 48 48 48-21.5 48-48-21.5-48-48-48z\"]\n};\nvar faFilePdf = {\n prefix: 'far',\n iconName: 'file-pdf',\n icon: [384, 512, [], \"f1c1\", \"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm250.2-143.7c-12.2-12-47-8.7-64.4-6.5-17.2-10.5-28.7-25-36.8-46.3 3.9-16.1 10.1-40.6 5.4-56-4.2-26.2-37.8-23.6-42.6-5.9-4.4 16.1-.4 38.5 7 67.1-10 23.9-24.9 56-35.4 74.4-20 10.3-47 26.2-51 46.2-3.3 15.8 26 55.2 76.1-31.2 22.4-7.4 46.8-16.5 68.4-20.1 18.9 10.2 41 17 55.8 17 25.5 0 28-28.2 17.5-38.7zm-198.1 77.8c5.1-13.7 24.5-29.5 30.4-35-19 30.3-30.4 35.7-30.4 35zm81.6-190.6c7.4 0 6.7 32.1 1.8 40.8-4.4-13.9-4.3-40.8-1.8-40.8zm-24.4 136.6c9.7-16.9 18-37 24.7-54.7 8.3 15.1 18.9 27.2 30.1 35.5-20.8 4.3-38.9 13.1-54.8 19.2zm131.6-5s-5 6-37.3-7.8c35.1-2.6 40.9 5.4 37.3 7.8z\"]\n};\nvar faFilePowerpoint = {\n prefix: 'far',\n iconName: 'file-powerpoint',\n icon: [384, 512, [], \"f1c4\", \"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm72-60V236c0-6.6 5.4-12 12-12h69.2c36.7 0 62.8 27 62.8 66.3 0 74.3-68.7 66.5-95.5 66.5V404c0 6.6-5.4 12-12 12H132c-6.6 0-12-5.4-12-12zm48.5-87.4h23c7.9 0 13.9-2.4 18.1-7.2 8.5-9.8 8.4-28.5.1-37.8-4.1-4.6-9.9-7-17.4-7h-23.9v52z\"]\n};\nvar faFileVideo = {\n prefix: 'far',\n iconName: 'file-video',\n icon: [384, 512, [], \"f1c8\", \"M369.941 97.941l-83.882-83.882A48 48 0 0 0 252.118 0H48C21.49 0 0 21.49 0 48v416c0 26.51 21.49 48 48 48h288c26.51 0 48-21.49 48-48V131.882a48 48 0 0 0-14.059-33.941zM332.118 128H256V51.882L332.118 128zM48 464V48h160v104c0 13.255 10.745 24 24 24h104v288H48zm228.687-211.303L224 305.374V268c0-11.046-8.954-20-20-20H100c-11.046 0-20 8.954-20 20v104c0 11.046 8.954 20 20 20h104c11.046 0 20-8.954 20-20v-37.374l52.687 52.674C286.704 397.318 304 390.28 304 375.986V264.011c0-14.311-17.309-21.319-27.313-11.314z\"]\n};\nvar faFileWord = {\n prefix: 'far',\n iconName: 'file-word',\n icon: [384, 512, [], \"f1c2\", \"M369.9 97.9L286 14C277 5 264.8-.1 252.1-.1H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V131.9c0-12.7-5.1-25-14.1-34zM332.1 128H256V51.9l76.1 76.1zM48 464V48h160v104c0 13.3 10.7 24 24 24h104v288H48zm220.1-208c-5.7 0-10.6 4-11.7 9.5-20.6 97.7-20.4 95.4-21 103.5-.2-1.2-.4-2.6-.7-4.3-.8-5.1.3.2-23.6-99.5-1.3-5.4-6.1-9.2-11.7-9.2h-13.3c-5.5 0-10.3 3.8-11.7 9.1-24.4 99-24 96.2-24.8 103.7-.1-1.1-.2-2.5-.5-4.2-.7-5.2-14.1-73.3-19.1-99-1.1-5.6-6-9.7-11.8-9.7h-16.8c-7.8 0-13.5 7.3-11.7 14.8 8 32.6 26.7 109.5 33.2 136 1.3 5.4 6.1 9.1 11.7 9.1h25.2c5.5 0 10.3-3.7 11.6-9.1l17.9-71.4c1.5-6.2 2.5-12 3-17.3l2.9 17.3c.1.4 12.6 50.5 17.9 71.4 1.3 5.3 6.1 9.1 11.6 9.1h24.7c5.5 0 10.3-3.7 11.6-9.1 20.8-81.9 30.2-119 34.5-136 1.9-7.6-3.8-14.9-11.6-14.9h-15.8z\"]\n};\nvar faFlag = {\n prefix: 'far',\n iconName: 'flag',\n icon: [512, 512, [], \"f024\", \"M336.174 80c-49.132 0-93.305-32-161.913-32-31.301 0-58.303 6.482-80.721 15.168a48.04 48.04 0 0 0 2.142-20.727C93.067 19.575 74.167 1.594 51.201.104 23.242-1.71 0 20.431 0 48c0 17.764 9.657 33.262 24 41.562V496c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-83.443C109.869 395.28 143.259 384 199.826 384c49.132 0 93.305 32 161.913 32 58.479 0 101.972-22.617 128.548-39.981C503.846 367.161 512 352.051 512 335.855V95.937c0-34.459-35.264-57.768-66.904-44.117C409.193 67.309 371.641 80 336.174 80zM464 336c-21.783 15.412-60.824 32-102.261 32-59.945 0-102.002-32-161.913-32-43.361 0-96.379 9.403-127.826 24V128c21.784-15.412 60.824-32 102.261-32 59.945 0 102.002 32 161.913 32 43.271 0 96.32-17.366 127.826-32v240z\"]\n};\nvar faFlushed = {\n prefix: 'far',\n iconName: 'flushed',\n icon: [496, 512, [], \"f579\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm96-312c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80zm0 128c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm-112 24c0-44.2-35.8-80-80-80s-80 35.8-80 80 35.8 80 80 80 80-35.8 80-80zm-80 48c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm160 144H184c-13.2 0-24 10.8-24 24s10.8 24 24 24h128c13.2 0 24-10.8 24-24s-10.8-24-24-24z\"]\n};\nvar faFolder = {\n prefix: 'far',\n iconName: 'folder',\n icon: [512, 512, [], \"f07b\", \"M464 128H272l-54.63-54.63c-6-6-14.14-9.37-22.63-9.37H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V176c0-26.51-21.49-48-48-48zm0 272H48V112h140.12l54.63 54.63c6 6 14.14 9.37 22.63 9.37H464v224z\"]\n};\nvar faFolderOpen = {\n prefix: 'far',\n iconName: 'folder-open',\n icon: [576, 512, [], \"f07c\", \"M527.9 224H480v-48c0-26.5-21.5-48-48-48H272l-64-64H48C21.5 64 0 85.5 0 112v288c0 26.5 21.5 48 48 48h400c16.5 0 31.9-8.5 40.7-22.6l79.9-128c20-31.9-3-73.4-40.7-73.4zM48 118c0-3.3 2.7-6 6-6h134.1l64 64H426c3.3 0 6 2.7 6 6v42H152c-16.8 0-32.4 8.8-41.1 23.2L48 351.4zm400 282H72l77.2-128H528z\"]\n};\nvar faFontAwesomeLogoFull = {\n prefix: 'far',\n iconName: 'font-awesome-logo-full',\n icon: [3992, 512, [\"Font Awesome\"], \"f4e6\", \"M454.6 0H57.4C25.9 0 0 25.9 0 57.4v397.3C0 486.1 25.9 512 57.4 512h397.3c31.4 0 57.4-25.9 57.4-57.4V57.4C512 25.9 486.1 0 454.6 0zm-58.9 324.9c0 4.8-4.1 6.9-8.9 8.9-19.2 8.1-39.7 15.7-61.5 15.7-40.5 0-68.7-44.8-163.2 2.5v51.8c0 30.3-45.7 30.2-45.7 0v-250c-9-7-15-17.9-15-30.3 0-21 17.1-38.2 38.2-38.2 21 0 38.2 17.1 38.2 38.2 0 12.2-5.8 23.2-14.9 30.2v21c37.1-12 65.5-34.4 146.1-3.4 26.6 11.4 68.7-15.7 76.5-15.7 5.5 0 10.3 4.1 10.3 8.9v160.4zm432.9-174.2h-137v70.1H825c39.8 0 40.4 62.2 0 62.2H691.6v105.6c0 45.5-70.7 46.4-70.7 0V128.3c0-22 18-39.8 39.8-39.8h167.8c39.6 0 40.5 62.2.1 62.2zm191.1 23.4c-169.3 0-169.1 252.4 0 252.4 169.9 0 169.9-252.4 0-252.4zm0 196.1c-81.6 0-82.1-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm372.4 53.4c-17.5 0-31.4-13.9-31.4-31.4v-117c0-62.4-72.6-52.5-99.1-16.4v133.4c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c43.3-51.6 162.4-60.4 162.4 39.3v141.5c.3 30.4-31.5 31.4-31.7 31.4zm179.7 2.9c-44.3 0-68.3-22.9-68.3-65.8V235.2H1488c-35.6 0-36.7-55.3 0-55.3h15.5v-37.3c0-41.3 63.8-42.1 63.8 0v37.5h24.9c35.4 0 35.7 55.3 0 55.3h-24.9v108.5c0 29.6 26.1 26.3 27.4 26.3 31.4 0 52.6 56.3-22.9 56.3zM1992 123c-19.5-50.2-95.5-50-114.5 0-107.3 275.7-99.5 252.7-99.5 262.8 0 42.8 58.3 51.2 72.1 14.4l13.5-35.9H2006l13 35.9c14.2 37.7 72.1 27.2 72.1-14.4 0-10.1 5.3 6.8-99.1-262.8zm-108.9 179.1l51.7-142.9 51.8 142.9h-103.5zm591.3-85.6l-53.7 176.3c-12.4 41.2-72 41-84 0l-42.3-135.9-42.3 135.9c-12.4 40.9-72 41.2-84.5 0l-54.2-176.3c-12.5-39.4 49.8-56.1 60.2-16.9L2213 342l45.3-139.5c10.9-32.7 59.6-34.7 71.2 0l45.3 139.5 39.3-142.4c10.3-38.3 72.6-23.8 60.3 16.9zm275.4 75.1c0-42.4-33.9-117.5-119.5-117.5-73.2 0-124.4 56.3-124.4 126 0 77.2 55.3 126.4 128.5 126.4 31.7 0 93-11.5 93-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-109 8.4-115.9-43.8h148.3c16.3 0 29.3-13.4 29.3-28.9zM2571 277.7c9.5-73.4 113.9-68.6 118.6 0H2571zm316.7 148.8c-31.4 0-81.6-10.5-96.6-31.9-12.4-17 2.5-39.8 21.8-39.8 16.3 0 36.8 22.9 77.7 22.9 27.4 0 40.4-11 40.4-25.8 0-39.8-142.9-7.4-142.9-102 0-40.4 35.3-75.7 98.6-75.7 31.4 0 74.1 9.9 87.6 29.4 10.8 14.8-1.4 36.2-20.9 36.2-15.1 0-26.7-17.3-66.2-17.3-22.9 0-37.8 10.5-37.8 23.8 0 35.9 142.4 6 142.4 103.1-.1 43.7-37.4 77.1-104.1 77.1zm266.8-252.4c-169.3 0-169.1 252.4 0 252.4 170.1 0 169.6-252.4 0-252.4zm0 196.1c-81.8 0-82-139.8 0-139.8 82.5 0 82.4 139.8 0 139.8zm476.9 22V268.7c0-53.8-61.4-45.8-85.7-10.5v134c0 41.3-63.8 42.1-63.8 0V268.7c0-52.1-59.5-47.4-85.7-10.1v133.6c0 41.5-63.3 41.8-63.3 0V208c0-40 63.1-41.6 63.1 0v3.4c9.9-14.4 41.8-37.3 78.6-37.3 35.3 0 57.7 16.4 66.7 43.8 13.9-21.8 45.8-43.8 82.6-43.8 44.3 0 70.7 23.4 70.7 72.7v145.3c.5 17.3-13.5 31.4-31.9 31.4 3.5.1-31.3 1.1-31.3-31.3zM3992 291.6c0-42.4-32.4-117.5-117.9-117.5-73.2 0-127.5 56.3-127.5 126 0 77.2 58.3 126.4 131.6 126.4 31.7 0 91.5-11.5 91.5-39.8 0-18.3-21.1-31.5-39.3-22.4-49.4 26.2-110.5 8.4-117.5-43.8h149.8c16.3 0 29.1-13.4 29.3-28.9zm-180.5-13.9c9.7-74.4 115.9-68.3 120.1 0h-120.1z\"]\n};\nvar faFrown = {\n prefix: 'far',\n iconName: 'frown',\n icon: [496, 512, [], \"f119\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 128c-40.2 0-78 17.7-103.8 48.6-8.5 10.2-7.1 25.3 3.1 33.8 10.2 8.4 25.3 7.1 33.8-3.1 16.6-19.9 41-31.4 66.9-31.4s50.3 11.4 66.9 31.4c8.1 9.7 23.1 11.9 33.8 3.1 10.2-8.5 11.5-23.6 3.1-33.8C326 321.7 288.2 304 248 304z\"]\n};\nvar faFrownOpen = {\n prefix: 'far',\n iconName: 'frown-open',\n icon: [496, 512, [], \"f57a\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-48-248c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32zm128-32c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-80 112c-35.6 0-88.8 21.3-95.8 61.2-2 11.8 9 21.5 20.5 18.1 31.2-9.6 59.4-15.3 75.3-15.3s44.1 5.7 75.3 15.3c11.4 3.5 22.5-6.3 20.5-18.1-7-39.9-60.2-61.2-95.8-61.2z\"]\n};\nvar faFutbol = {\n prefix: 'far',\n iconName: 'futbol',\n icon: [496, 512, [], \"f1e3\", \"M483.8 179.4C449.8 74.6 352.6 8 248.1 8c-25.4 0-51.2 3.9-76.7 12.2C41.2 62.5-30.1 202.4 12.2 332.6 46.2 437.4 143.4 504 247.9 504c25.4 0 51.2-3.9 76.7-12.2 130.2-42.3 201.5-182.2 159.2-312.4zm-74.5 193.7l-52.2 6.4-43.7-60.9 24.4-75.2 71.1-22.1 38.9 36.4c-.2 30.7-7.4 61.1-21.7 89.2-4.7 9.3-10.7 17.8-16.8 26.2zm0-235.4l-10.4 53.1-70.7 22-64.2-46.5V92.5l47.4-26.2c39.2 13 73.4 38 97.9 71.4zM184.9 66.4L232 92.5v73.8l-64.2 46.5-70.6-22-10.1-52.5c24.3-33.4 57.9-58.6 97.8-71.9zM139 379.5L85.9 373c-14.4-20.1-37.3-59.6-37.8-115.3l39-36.4 71.1 22.2 24.3 74.3-43.5 61.7zm48.2 67l-22.4-48.1 43.6-61.7H287l44.3 61.7-22.4 48.1c-6.2 1.8-57.6 20.4-121.7 0z\"]\n};\nvar faGem = {\n prefix: 'far',\n iconName: 'gem',\n icon: [576, 512, [], \"f3a5\", \"M464 0H112c-4 0-7.8 2-10 5.4L2 152.6c-2.9 4.4-2.6 10.2.7 14.2l276 340.8c4.8 5.9 13.8 5.9 18.6 0l276-340.8c3.3-4.1 3.6-9.8.7-14.2L474.1 5.4C471.8 2 468.1 0 464 0zm-19.3 48l63.3 96h-68.4l-51.7-96h56.8zm-202.1 0h90.7l51.7 96H191l51.6-96zm-111.3 0h56.8l-51.7 96H68l63.3-96zm-43 144h51.4L208 352 88.3 192zm102.9 0h193.6L288 435.3 191.2 192zM368 352l68.2-160h51.4L368 352z\"]\n};\nvar faGrimace = {\n prefix: 'far',\n iconName: 'grimace',\n icon: [496, 512, [], \"f57f\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm16 16H152c-26.5 0-48 21.5-48 48v32c0 26.5 21.5 48 48 48h192c26.5 0 48-21.5 48-48v-32c0-26.5-21.5-48-48-48zm-168 96h-24c-8.8 0-16-7.2-16-16v-8h40v24zm0-40h-40v-8c0-8.8 7.2-16 16-16h24v24zm64 40h-48v-24h48v24zm0-40h-48v-24h48v24zm64 40h-48v-24h48v24zm0-40h-48v-24h48v24zm56 24c0 8.8-7.2 16-16 16h-24v-24h40v8zm0-24h-40v-24h24c8.8 0 16 7.2 16 16v8z\"]\n};\nvar faGrin = {\n prefix: 'far',\n iconName: 'grin',\n icon: [496, 512, [], \"f580\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.4-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zM168 240c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32z\"]\n};\nvar faGrinAlt = {\n prefix: 'far',\n iconName: 'grin-alt',\n icon: [496, 512, [], \"f581\", \"M200.3 248c12.4-18.7 15.1-37.3 15.7-56-.5-18.7-3.3-37.3-15.7-56-8-12-25.1-11.4-32.7 0-12.4 18.7-15.1 37.3-15.7 56 .5 18.7 3.3 37.3 15.7 56 8.1 12 25.2 11.4 32.7 0zm128 0c12.4-18.7 15.1-37.3 15.7-56-.5-18.7-3.3-37.3-15.7-56-8-12-25.1-11.4-32.7 0-12.4 18.7-15.1 37.3-15.7 56 .5 18.7 3.3 37.3 15.7 56 8.1 12 25.2 11.4 32.7 0zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3z\"]\n};\nvar faGrinBeam = {\n prefix: 'far',\n iconName: 'grin-beam',\n icon: [496, 512, [], \"f582\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-235.9-72.9c3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3zm160 0c3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3z\"]\n};\nvar faGrinBeamSweat = {\n prefix: 'far',\n iconName: 'grin-beam-sweat',\n icon: [496, 512, [], \"f583\", \"M440 160c29.5 0 53.3-26.3 53.3-58.7 0-25-31.7-75.5-46.2-97.3-3.6-5.3-10.7-5.3-14.2 0-14.5 21.8-46.2 72.3-46.2 97.3 0 32.4 23.8 58.7 53.3 58.7zM248 400c51.9 0 115.3-32.9 123.3-80 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 8 47.1 71.4 80 123.3 80zm130.3-168.3c3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.6 6.2 4.6 9.3 3.7zm105.3-52.9c-24.6 15.7-46 12.9-46.4 12.9 6.9 20.2 10.8 41.8 10.8 64.3 0 110.3-89.7 200-200 200S48 366.3 48 256 137.7 56 248 56c39.8 0 76.8 11.8 108 31.9 1.7-9.5 6.3-24.1 17.2-45.7C336.4 20.6 293.7 8 248 8 111 8 0 119 0 256s111 248 248 248 248-111 248-248c0-27-4.4-52.9-12.4-77.2zM168 189.4c12.3 0 23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.8 19.2-21.6 31.5-21.6z\"]\n};\nvar faGrinHearts = {\n prefix: 'far',\n iconName: 'grin-hearts',\n icon: [496, 512, [], \"f584\", \"M353.6 304.6c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-152.8-48.9c4.5 1.2 9.2-1.5 10.5-6l19.4-69.9c5.6-20.3-7.4-41.1-28.8-44.5-18.6-3-36.4 9.8-41.5 27.9l-2 7.1-7.1-1.9c-18.2-4.7-38.2 4.3-44.9 22-7.7 20.2 3.8 41.9 24.2 47.2l70.2 18.1zm188.8-65.3c-6.7-17.6-26.7-26.7-44.9-22l-7.1 1.9-2-7.1c-5-18.1-22.8-30.9-41.5-27.9-21.4 3.4-34.4 24.2-28.8 44.5l19.4 69.9c1.2 4.5 5.9 7.2 10.5 6l70.2-18.2c20.4-5.3 31.9-26.9 24.2-47.1zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200z\"]\n};\nvar faGrinSquint = {\n prefix: 'far',\n iconName: 'grin-squint',\n icon: [496, 512, [], \"f585\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.4-17.7 15.3 7.9 47.1 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-234.7-40.8c3.6 4.2 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3s-2.2-8.1-5.8-10.3l-80-48c-5.1-3-11.4-1.9-15.3 2.5-3.8 4.5-3.8 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11.1.1 15.5zm242.9 2.5c5.4 3.2 11.7 1.7 15.3-2.5 3.8-4.5 3.8-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11-.1-15.5-3.8-4.4-10.2-5.4-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48z\"]\n};\nvar faGrinSquintTears = {\n prefix: 'far',\n iconName: 'grin-squint-tears',\n icon: [512, 512, [], \"f586\", \"M117.1 384.1c-25.8 3.7-84 13.7-100.9 30.6-21.9 21.9-21.5 57.9.9 80.3s58.3 22.8 80.3.9C114.3 479 124.3 420.8 128 395c.8-6.4-4.6-11.8-10.9-10.9zm-41.2-41.7C40.3 268 53 176.1 114.6 114.6 152.4 76.8 202.6 56 256 56c36.2 0 70.8 9.8 101.2 27.7 3.8-20.3 8-36.1 12-48.3C333.8 17.2 294.9 8 256 8 192.5 8 129.1 32.2 80.6 80.6c-74.1 74.1-91.3 183.4-52 274 12.2-4.1 27.7-8.3 47.3-12.2zm352.3-187.6c45 76.6 34.9 176.9-30.8 242.6-37.8 37.8-88 58.6-141.4 58.6-30.5 0-59.8-7-86.4-19.8-3.9 19.5-8 35-12.2 47.2 31.4 13.6 65 20.6 98.7 20.6 63.5 0 126.9-24.2 175.4-72.6 78.1-78.1 93.1-195.4 45.2-288.6-12.3 4-28.2 8.1-48.5 12zm-33.3-26.9c25.8-3.7 84-13.7 100.9-30.6 21.9-21.9 21.5-57.9-.9-80.3s-58.3-22.8-80.3-.9C397.7 33 387.7 91.2 384 117c-.8 6.4 4.6 11.8 10.9 10.9zm-187 108.3c-3-3-7.2-4.2-11.4-3.2L106 255.7c-5.7 1.4-9.5 6.7-9.1 12.6.5 5.8 5.1 10.5 10.9 11l52.3 4.8 4.8 52.3c.5 5.8 5.2 10.4 11 10.9h.9c5.5 0 10.3-3.7 11.7-9.1l22.6-90.5c1-4.2-.2-8.5-3.2-11.5zm39.7-25.1l90.5-22.6c5.7-1.4 9.5-6.7 9.1-12.6-.5-5.8-5.1-10.5-10.9-11l-52.3-4.8-4.8-52.3c-.5-5.8-5.2-10.4-11-10.9-5.6-.1-11.2 3.4-12.6 9.1L233 196.5c-1 4.1.2 8.4 3.2 11.4 5 5 11.3 3.2 11.4 3.2zm52 88.5c-29.1 29.1-59.7 52.9-83.9 65.4-9.2 4.8-10 17.5-1.7 23.4 38.9 27.7 107 6.2 143.7-30.6S416 253 388.3 214.1c-5.8-8.2-18.5-7.6-23.4 1.7-12.3 24.2-36.2 54.7-65.3 83.8z\"]\n};\nvar faGrinStars = {\n prefix: 'far',\n iconName: 'grin-stars',\n icon: [496, 512, [], \"f587\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm105.6-151.4c-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 7.9 47.2 71.3 80 123.3 80s115.3-32.9 123.3-80c1.6-9.8-7.7-18.4-17.7-15.3zm-227.9-57.5c-1 6.2 5.4 11 11 7.9l31.3-16.3 31.3 16.3c5.6 3.1 12-1.7 11-7.9l-6-34.9 25.4-24.6c4.5-4.5 1.9-12.2-4.3-13.2l-34.9-5-15.5-31.6c-2.9-5.8-11-5.8-13.9 0l-15.5 31.6-34.9 5c-6.2.9-8.9 8.6-4.3 13.2l25.4 24.6-6.1 34.9zm259.7-72.7l-34.9-5-15.5-31.6c-2.9-5.8-11-5.8-13.9 0l-15.5 31.6-34.9 5c-6.2.9-8.9 8.6-4.3 13.2l25.4 24.6-6 34.9c-1 6.2 5.4 11 11 7.9l31.3-16.3 31.3 16.3c5.6 3.1 12-1.7 11-7.9l-6-34.9 25.4-24.6c4.5-4.6 1.8-12.2-4.4-13.2z\"]\n};\nvar faGrinTears = {\n prefix: 'far',\n iconName: 'grin-tears',\n icon: [640, 512, [], \"f588\", \"M117.1 256.1c-25.8 3.7-84 13.7-100.9 30.6-21.9 21.9-21.5 57.9.9 80.3s58.3 22.8 80.3.9C114.3 351 124.3 292.8 128 267c.8-6.4-4.6-11.8-10.9-10.9zm506.7 30.6c-16.9-16.9-75.1-26.9-100.9-30.6-6.3-.9-11.7 4.5-10.8 10.8 3.7 25.8 13.7 84 30.6 100.9 21.9 21.9 57.9 21.5 80.3-.9 22.3-22.3 22.7-58.3.8-80.2zm-126.6 61.7C463.8 412.3 396.9 456 320 456c-76.9 0-143.8-43.7-177.2-107.6-12.5 37.4-25.2 43.9-28.3 46.5C159.1 460.7 234.5 504 320 504s160.9-43.3 205.5-109.1c-3.2-2.7-15.9-9.2-28.3-46.5zM122.7 224.5C137.9 129.2 220.5 56 320 56c99.5 0 182.1 73.2 197.3 168.5 2.1-.2 5.2-2.4 49.5 7C554.4 106 448.7 8 320 8S85.6 106 73.2 231.4c44.5-9.4 47.1-7.2 49.5-6.9zM320 400c51.9 0 115.3-32.9 123.3-80 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.8-3.1-19.4 5.3-17.7 15.3 8 47.1 71.4 80 123.3 80zm130.3-168.3c3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.6 6.2 4.6 9.3 3.7zM240 189.4c12.3 0 23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.8 19.2-21.6 31.5-21.6z\"]\n};\nvar faGrinTongue = {\n prefix: 'far',\n iconName: 'grin-tongue',\n icon: [496, 512, [], \"f589\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3zM168 176c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z\"]\n};\nvar faGrinTongueSquint = {\n prefix: 'far',\n iconName: 'grin-tongue-squint',\n icon: [496, 512, [], \"f58a\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3zm36.9-281.1c-3.8-4.4-10.3-5.5-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48c5.4 3.2 11.7 1.7 15.3-2.5 3.8-4.5 3.8-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11.1-.1-15.5zm-162.9 45.5l-80-48c-5-3-11.4-2-15.3 2.5-3.8 4.5-3.8 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11 .1 15.5 3.6 4.2 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3s-2.2-8.1-5.8-10.3z\"]\n};\nvar faGrinTongueWink = {\n prefix: 'far',\n iconName: 'grin-tongue-wink',\n icon: [496, 512, [], \"f58b\", \"M152 180c-25.7 0-55.9 16.9-59.8 42.1-.8 5 1.7 10 6.1 12.4 4.4 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.2 8 4.7 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-3.9-25.2-34.1-42.1-59.8-42.1zm176-52c-44.2 0-80 35.8-80 80s35.8 80 80 80 80-35.8 80-80-35.8-80-80-80zm0 128c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-72c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm64 400c0 35.6-29.1 64.5-64.9 64-35.1-.5-63.1-29.8-63.1-65v-42.8l17.7-8.8c15-7.5 31.5 1.7 34.9 16.5l2.8 12.1c2.1 9.2 15.2 9.2 17.3 0l2.8-12.1c3.4-14.8 19.8-24.1 34.9-16.5l17.7 8.8V408zm28.2 25.3c2.2-8.1 3.8-16.5 3.8-25.3v-43.5c14.2-12.4 24.4-27.5 27.3-44.5 1.7-9.9-7.7-18.5-17.7-15.3-25.9 8.3-64.4 13.1-105.6 13.1s-79.6-4.8-105.6-13.1c-9.9-3.1-19.4 5.3-17.7 15.3 2.9 17 13.1 32.1 27.3 44.5V408c0 8.8 1.6 17.2 3.8 25.3C91.8 399.9 48 333 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 77-43.8 143.9-107.8 177.3z\"]\n};\nvar faGrinWink = {\n prefix: 'far',\n iconName: 'grin-wink',\n icon: [496, 512, [], \"f58c\", \"M328 180c-25.69 0-55.88 16.92-59.86 42.12-1.75 11.22 11.5 18.24 19.83 10.84l9.55-8.48c14.81-13.19 46.16-13.19 60.97 0l9.55 8.48c8.48 7.43 21.56.25 19.83-10.84C383.88 196.92 353.69 180 328 180zm-160 60c17.67 0 32-14.33 32-32s-14.33-32-32-32-32 14.33-32 32 14.33 32 32 32zm185.55 64.64c-25.93 8.3-64.4 13.06-105.55 13.06s-79.62-4.75-105.55-13.06c-9.94-3.13-19.4 5.37-17.71 15.34C132.67 367.13 196.06 400 248 400s115.33-32.87 123.26-80.02c1.68-9.89-7.67-18.48-17.71-15.34zM248 8C111.03 8 0 119.03 0 256s111.03 248 248 248 248-111.03 248-248S384.97 8 248 8zm0 448c-110.28 0-200-89.72-200-200S137.72 56 248 56s200 89.72 200 200-89.72 200-200 200z\"]\n};\nvar faHandLizard = {\n prefix: 'far',\n iconName: 'hand-lizard',\n icon: [576, 512, [], \"f258\", \"M556.686 290.542L410.328 64.829C397.001 44.272 374.417 32 349.917 32H56C25.121 32 0 57.122 0 88v8c0 44.112 35.888 80 80 80h196.042l-18.333 48H144c-48.523 0-88 39.477-88 88 0 30.879 25.121 56 56 56h131.552c2.987 0 5.914.549 8.697 1.631L352 408.418V480h224V355.829c0-23.225-6.679-45.801-19.314-65.287zM528 432H400v-23.582c0-19.948-12.014-37.508-30.604-44.736l-99.751-38.788A71.733 71.733 0 0 0 243.552 320H112c-4.411 0-8-3.589-8-8 0-22.056 17.944-40 40-40h113.709c19.767 0 37.786-12.407 44.84-30.873l24.552-64.281c8.996-23.553-8.428-48.846-33.63-48.846H80c-17.645 0-32-14.355-32-32v-8c0-4.411 3.589-8 8-8h293.917c8.166 0 15.693 4.09 20.137 10.942l146.358 225.715A71.84 71.84 0 0 1 528 355.829V432z\"]\n};\nvar faHandPaper = {\n prefix: 'far',\n iconName: 'hand-paper',\n icon: [448, 512, [], \"f256\", \"M372.57 112.641v-10.825c0-43.612-40.52-76.691-83.039-65.546-25.629-49.5-94.09-47.45-117.982.747C130.269 26.456 89.144 57.945 89.144 102v126.13c-19.953-7.427-43.308-5.068-62.083 8.871-29.355 21.796-35.794 63.333-14.55 93.153L132.48 498.569a32 32 0 0 0 26.062 13.432h222.897c14.904 0 27.835-10.289 31.182-24.813l30.184-130.958A203.637 203.637 0 0 0 448 310.564V179c0-40.62-35.523-71.992-75.43-66.359zm27.427 197.922c0 11.731-1.334 23.469-3.965 34.886L368.707 464h-201.92L51.591 302.303c-14.439-20.27 15.023-42.776 29.394-22.605l27.128 38.079c8.995 12.626 29.031 6.287 29.031-9.283V102c0-25.645 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V67c0-25.663 36.571-24.81 36.571.691V256c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16V101.125c0-25.672 36.57-24.81 36.57.691V256c0 8.837 7.163 16 16 16h6.857c8.837 0 16-7.163 16-16v-76.309c0-26.242 36.57-25.64 36.57-.691v131.563z\"]\n};\nvar faHandPeace = {\n prefix: 'far',\n iconName: 'hand-peace',\n icon: [448, 512, [], \"f25b\", \"M362.146 191.976c-13.71-21.649-38.761-34.016-65.006-30.341V74c0-40.804-32.811-74-73.141-74-40.33 0-73.14 33.196-73.14 74L160 168l-18.679-78.85C126.578 50.843 83.85 32.11 46.209 47.208 8.735 62.238-9.571 104.963 5.008 142.85l55.757 144.927c-30.557 24.956-43.994 57.809-24.733 92.218l54.853 97.999C102.625 498.97 124.73 512 148.575 512h205.702c30.744 0 57.558-21.44 64.555-51.797l27.427-118.999a67.801 67.801 0 0 0 1.729-15.203L448 256c0-44.956-43.263-77.343-85.854-64.024zM399.987 326c0 1.488-.169 2.977-.502 4.423l-27.427 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H148.575c-6.486 0-12.542-3.621-15.805-9.449l-54.854-98c-4.557-8.141-2.619-18.668 4.508-24.488l26.647-21.764a16 16 0 0 0 4.812-18.139l-64.09-166.549C37.226 92.956 84.37 74.837 96.51 106.389l59.784 155.357A16 16 0 0 0 171.227 272h11.632c8.837 0 16-7.163 16-16V74c0-34.375 50.281-34.43 50.281 0v182c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16v-28c0-25.122 36.567-25.159 36.567 0v28c0 8.837 7.163 16 16 16h6.856c8.837 0 16-7.163 16-16 0-25.12 36.567-25.16 36.567 0v70z\"]\n};\nvar faHandPointDown = {\n prefix: 'far',\n iconName: 'hand-point-down',\n icon: [448, 512, [], \"f0a7\", \"M188.8 512c45.616 0 83.2-37.765 83.2-83.2v-35.647a93.148 93.148 0 0 0 22.064-7.929c22.006 2.507 44.978-3.503 62.791-15.985C409.342 368.1 448 331.841 448 269.299V248c0-60.063-40-98.512-40-127.2v-2.679c4.952-5.747 8-13.536 8-22.12V32c0-17.673-12.894-32-28.8-32H156.8C140.894 0 128 14.327 128 32v64c0 8.584 3.048 16.373 8 22.12v2.679c0 6.964-6.193 14.862-23.668 30.183l-.148.129-.146.131c-9.937 8.856-20.841 18.116-33.253 25.851C48.537 195.798 0 207.486 0 252.8c0 56.928 35.286 92 83.2 92 8.026 0 15.489-.814 22.4-2.176V428.8c0 45.099 38.101 83.2 83.2 83.2zm0-48c-18.7 0-35.2-16.775-35.2-35.2V270.4c-17.325 0-35.2 26.4-70.4 26.4-26.4 0-35.2-20.625-35.2-44 0-8.794 32.712-20.445 56.1-34.926 14.575-9.074 27.225-19.524 39.875-30.799 18.374-16.109 36.633-33.836 39.596-59.075h176.752C364.087 170.79 400 202.509 400 248v21.299c0 40.524-22.197 57.124-61.325 50.601-8.001 14.612-33.979 24.151-53.625 12.925-18.225 19.365-46.381 17.787-61.05 4.95V428.8c0 18.975-16.225 35.2-35.2 35.2zM328 64c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24z\"]\n};\nvar faHandPointLeft = {\n prefix: 'far',\n iconName: 'hand-point-left',\n icon: [512, 512, [], \"f0a5\", \"M0 220.8C0 266.416 37.765 304 83.2 304h35.647a93.148 93.148 0 0 0 7.929 22.064c-2.507 22.006 3.503 44.978 15.985 62.791C143.9 441.342 180.159 480 242.701 480H264c60.063 0 98.512-40 127.2-40h2.679c5.747 4.952 13.536 8 22.12 8h64c17.673 0 32-12.894 32-28.8V188.8c0-15.906-14.327-28.8-32-28.8h-64c-8.584 0-16.373 3.048-22.12 8H391.2c-6.964 0-14.862-6.193-30.183-23.668l-.129-.148-.131-.146c-8.856-9.937-18.116-20.841-25.851-33.253C316.202 80.537 304.514 32 259.2 32c-56.928 0-92 35.286-92 83.2 0 8.026.814 15.489 2.176 22.4H83.2C38.101 137.6 0 175.701 0 220.8zm48 0c0-18.7 16.775-35.2 35.2-35.2h158.4c0-17.325-26.4-35.2-26.4-70.4 0-26.4 20.625-35.2 44-35.2 8.794 0 20.445 32.712 34.926 56.1 9.074 14.575 19.524 27.225 30.799 39.875 16.109 18.374 33.836 36.633 59.075 39.596v176.752C341.21 396.087 309.491 432 264 432h-21.299c-40.524 0-57.124-22.197-50.601-61.325-14.612-8.001-24.151-33.979-12.925-53.625-19.365-18.225-17.787-46.381-4.95-61.05H83.2C64.225 256 48 239.775 48 220.8zM448 360c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z\"]\n};\nvar faHandPointRight = {\n prefix: 'far',\n iconName: 'hand-point-right',\n icon: [512, 512, [], \"f0a4\", \"M428.8 137.6h-86.177a115.52 115.52 0 0 0 2.176-22.4c0-47.914-35.072-83.2-92-83.2-45.314 0-57.002 48.537-75.707 78.784-7.735 12.413-16.994 23.317-25.851 33.253l-.131.146-.129.148C135.662 161.807 127.764 168 120.8 168h-2.679c-5.747-4.952-13.536-8-22.12-8H32c-17.673 0-32 12.894-32 28.8v230.4C0 435.106 14.327 448 32 448h64c8.584 0 16.373-3.048 22.12-8h2.679c28.688 0 67.137 40 127.2 40h21.299c62.542 0 98.8-38.658 99.94-91.145 12.482-17.813 18.491-40.785 15.985-62.791A93.148 93.148 0 0 0 393.152 304H428.8c45.435 0 83.2-37.584 83.2-83.2 0-45.099-38.101-83.2-83.2-83.2zm0 118.4h-91.026c12.837 14.669 14.415 42.825-4.95 61.05 11.227 19.646 1.687 45.624-12.925 53.625 6.524 39.128-10.076 61.325-50.6 61.325H248c-45.491 0-77.21-35.913-120-39.676V215.571c25.239-2.964 42.966-21.222 59.075-39.596 11.275-12.65 21.725-25.3 30.799-39.875C232.355 112.712 244.006 80 252.8 80c23.375 0 44 8.8 44 35.2 0 35.2-26.4 53.075-26.4 70.4h158.4c18.425 0 35.2 16.5 35.2 35.2 0 18.975-16.225 35.2-35.2 35.2zM88 384c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z\"]\n};\nvar faHandPointUp = {\n prefix: 'far',\n iconName: 'hand-point-up',\n icon: [448, 512, [], \"f0a6\", \"M105.6 83.2v86.177a115.52 115.52 0 0 0-22.4-2.176c-47.914 0-83.2 35.072-83.2 92 0 45.314 48.537 57.002 78.784 75.707 12.413 7.735 23.317 16.994 33.253 25.851l.146.131.148.129C129.807 376.338 136 384.236 136 391.2v2.679c-4.952 5.747-8 13.536-8 22.12v64c0 17.673 12.894 32 28.8 32h230.4c15.906 0 28.8-14.327 28.8-32v-64c0-8.584-3.048-16.373-8-22.12V391.2c0-28.688 40-67.137 40-127.2v-21.299c0-62.542-38.658-98.8-91.145-99.94-17.813-12.482-40.785-18.491-62.791-15.985A93.148 93.148 0 0 0 272 118.847V83.2C272 37.765 234.416 0 188.8 0c-45.099 0-83.2 38.101-83.2 83.2zm118.4 0v91.026c14.669-12.837 42.825-14.415 61.05 4.95 19.646-11.227 45.624-1.687 53.625 12.925 39.128-6.524 61.325 10.076 61.325 50.6V264c0 45.491-35.913 77.21-39.676 120H183.571c-2.964-25.239-21.222-42.966-39.596-59.075-12.65-11.275-25.3-21.725-39.875-30.799C80.712 279.645 48 267.994 48 259.2c0-23.375 8.8-44 35.2-44 35.2 0 53.075 26.4 70.4 26.4V83.2c0-18.425 16.5-35.2 35.2-35.2 18.975 0 35.2 16.225 35.2 35.2zM352 424c13.255 0 24 10.745 24 24s-10.745 24-24 24-24-10.745-24-24 10.745-24 24-24z\"]\n};\nvar faHandPointer = {\n prefix: 'far',\n iconName: 'hand-pointer',\n icon: [448, 512, [], \"f25a\", \"M358.182 179.361c-19.493-24.768-52.679-31.945-79.872-19.098-15.127-15.687-36.182-22.487-56.595-19.629V67c0-36.944-29.736-67-66.286-67S89.143 30.056 89.143 67v161.129c-19.909-7.41-43.272-5.094-62.083 8.872-29.355 21.795-35.793 63.333-14.55 93.152l109.699 154.001C134.632 501.59 154.741 512 176 512h178.286c30.802 0 57.574-21.5 64.557-51.797l27.429-118.999A67.873 67.873 0 0 0 448 326v-84c0-46.844-46.625-79.273-89.818-62.639zM80.985 279.697l27.126 38.079c8.995 12.626 29.031 6.287 29.031-9.283V67c0-25.12 36.571-25.16 36.571 0v175c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16v-35c0-25.12 36.571-25.16 36.571 0v35c0 8.836 7.163 16 16 16H272c8.837 0 16-7.164 16-16v-21c0-25.12 36.571-25.16 36.571 0v21c0 8.836 7.163 16 16 16h6.857c8.837 0 16-7.164 16-16 0-25.121 36.571-25.16 36.571 0v84c0 1.488-.169 2.977-.502 4.423l-27.43 119.001c-1.978 8.582-9.29 14.576-17.782 14.576H176c-5.769 0-11.263-2.878-14.697-7.697l-109.712-154c-14.406-20.223 14.994-42.818 29.394-22.606zM176.143 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.733 0-14-7.163-14-16zm75.428 0v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16zM327 400v-96c0-8.837 6.268-16 14-16h6c7.732 0 14 7.163 14 16v96c0 8.837-6.268 16-14 16h-6c-7.732 0-14-7.163-14-16z\"]\n};\nvar faHandRock = {\n prefix: 'far',\n iconName: 'hand-rock',\n icon: [512, 512, [], \"f255\", \"M408.864 79.052c-22.401-33.898-66.108-42.273-98.813-23.588-29.474-31.469-79.145-31.093-108.334-.022-47.16-27.02-108.71 5.055-110.671 60.806C44.846 105.407 0 140.001 0 187.429v56.953c0 32.741 14.28 63.954 39.18 85.634l97.71 85.081c4.252 3.702 3.11 5.573 3.11 32.903 0 17.673 14.327 32 32 32h252c17.673 0 32-14.327 32-32 0-23.513-1.015-30.745 3.982-42.37l42.835-99.656c6.094-14.177 9.183-29.172 9.183-44.568V146.963c0-52.839-54.314-88.662-103.136-67.911zM464 261.406a64.505 64.505 0 0 1-5.282 25.613l-42.835 99.655c-5.23 12.171-7.883 25.04-7.883 38.25V432H188v-10.286c0-16.37-7.14-31.977-19.59-42.817l-97.71-85.08C56.274 281.255 48 263.236 48 244.381v-56.953c0-33.208 52-33.537 52 .677v41.228a16 16 0 0 0 5.493 12.067l7 6.095A16 16 0 0 0 139 235.429V118.857c0-33.097 52-33.725 52 .677v26.751c0 8.836 7.164 16 16 16h7c8.836 0 16-7.164 16-16v-41.143c0-33.134 52-33.675 52 .677v40.466c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16v-27.429c0-33.03 52-33.78 52 .677v26.751c0 8.836 7.163 16 16 16h7c8.837 0 16-7.164 16-16 0-33.146 52-33.613 52 .677v114.445z\"]\n};\nvar faHandScissors = {\n prefix: 'far',\n iconName: 'hand-scissors',\n icon: [512, 512, [], \"f257\", \"M256 480l70-.013c5.114 0 10.231-.583 15.203-1.729l118.999-27.427C490.56 443.835 512 417.02 512 386.277V180.575c0-23.845-13.03-45.951-34.005-57.69l-97.999-54.853c-34.409-19.261-67.263-5.824-92.218 24.733L142.85 37.008c-37.887-14.579-80.612 3.727-95.642 41.201-15.098 37.642 3.635 80.37 41.942 95.112L168 192l-94-9.141c-40.804 0-74 32.811-74 73.14 0 40.33 33.196 73.141 74 73.141h87.635c-3.675 26.245 8.692 51.297 30.341 65.006C178.657 436.737 211.044 480 256 480zm0-48.013c-25.16 0-25.12-36.567 0-36.567 8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16h-28c-25.159 0-25.122-36.567 0-36.567h28c8.837 0 16-7.163 16-16v-6.856c0-8.837-7.163-16-16-16H74c-34.43 0-34.375-50.281 0-50.281h182c8.837 0 16-7.163 16-16v-11.632a16 16 0 0 0-10.254-14.933L106.389 128.51c-31.552-12.14-13.432-59.283 19.222-46.717l166.549 64.091a16.001 16.001 0 0 0 18.139-4.812l21.764-26.647c5.82-7.127 16.348-9.064 24.488-4.508l98 54.854c5.828 3.263 9.449 9.318 9.449 15.805v205.701c0 8.491-5.994 15.804-14.576 17.782l-119.001 27.427a19.743 19.743 0 0 1-4.423.502h-70z\"]\n};\nvar faHandSpock = {\n prefix: 'far',\n iconName: 'hand-spock',\n icon: [512, 512, [], \"f259\", \"M501.03053,116.17605c-19.39059-31.50779-51.24406-35.72849-66.31044-35.01756-14.11325-50.81051-62.0038-54.08-70.73816-54.08a74.03091,74.03091,0,0,0-72.23816,58.916l-4.64648,22.66014-13.68357-53.207c-9.09569-35.37107-46.412-64.05074-89.66-53.07223a73.89749,73.89749,0,0,0-55.121,78.94722,73.68273,73.68273,0,0,0-64.8495,94.42181l24.35933,82.19721c-38.24017-7.54492-62.79677,16.18358-68.11512,21.84764a73.6791,73.6791,0,0,0,3.19921,104.19329l91.36509,85.9765A154.164,154.164,0,0,0,220.62279,512h107.4549A127.30079,127.30079,0,0,0,452.3392,413.86139l57.623-241.96272A73.20274,73.20274,0,0,0,501.03053,116.17605Zm-37.7597,44.60544L405.64788,402.74812a79.46616,79.46616,0,0,1-77.57019,61.25972H220.62279a106.34052,106.34052,0,0,1-73.1366-28.998l-91.369-85.98041C31.34381,325.72669,66.61133,288.131,91.39644,311.5392l51.123,48.10739c5.42577,5.10937,13.48239.71679,13.48239-5.82617a246.79914,246.79914,0,0,0-10.17771-70.1523l-36.01362-121.539c-9.7324-32.88279,39.69916-47.27145,49.38664-14.625l31.3437,105.77923c5.59374,18.90428,33.78119,10.71288,28.9648-8.00781L177.06427,80.23662c-8.50389-33.1035,41.43157-45.64646,49.86515-12.83593l47.32609,184.035c4.42773,17.24218,29.16207,16.5039,32.71089-.80468l31.791-154.9706c6.81054-33.1074,57.51748-24.10741,50.11906,11.96288L360.32764,246.78924c-3.72265,18.10936,23.66793,24.63084,28.05659,6.21679L413.185,148.85962C421.1498,115.512,471.14,127.79713,463.27083,160.78149Z\"]\n};\nvar faHandshake = {\n prefix: 'far',\n iconName: 'handshake',\n icon: [640, 512, [], \"f2b5\", \"M519.2 127.9l-47.6-47.6A56.252 56.252 0 0 0 432 64H205.2c-14.8 0-29.1 5.9-39.6 16.3L118 127.9H0v255.7h64c17.6 0 31.8-14.2 31.9-31.7h9.1l84.6 76.4c30.9 25.1 73.8 25.7 105.6 3.8 12.5 10.8 26 15.9 41.1 15.9 18.2 0 35.3-7.4 48.8-24 22.1 8.7 48.2 2.6 64-16.8l26.2-32.3c5.6-6.9 9.1-14.8 10.9-23h57.9c.1 17.5 14.4 31.7 31.9 31.7h64V127.9H519.2zM48 351.6c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16c0 8.9-7.2 16-16 16zm390-6.9l-26.1 32.2c-2.8 3.4-7.8 4-11.3 1.2l-23.9-19.4-30 36.5c-6 7.3-15 4.8-18 2.4l-36.8-31.5-15.6 19.2c-13.9 17.1-39.2 19.7-55.3 6.6l-97.3-88H96V175.8h41.9l61.7-61.6c2-.8 3.7-1.5 5.7-2.3H262l-38.7 35.5c-29.4 26.9-31.1 72.3-4.4 101.3 14.8 16.2 61.2 41.2 101.5 4.4l8.2-7.5 108.2 87.8c3.4 2.8 3.9 7.9 1.2 11.3zm106-40.8h-69.2c-2.3-2.8-4.9-5.4-7.7-7.7l-102.7-83.4 12.5-11.4c6.5-6 7-16.1 1-22.6L367 167.1c-6-6.5-16.1-6.9-22.6-1l-55.2 50.6c-9.5 8.7-25.7 9.4-34.6 0-9.3-9.9-8.5-25.1 1.2-33.9l65.6-60.1c7.4-6.8 17-10.5 27-10.5l83.7-.2c2.1 0 4.1.8 5.5 2.3l61.7 61.6H544v128zm48 47.7c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16c0 8.9-7.2 16-16 16z\"]\n};\nvar faHdd = {\n prefix: 'far',\n iconName: 'hdd',\n icon: [576, 512, [], \"f0a0\", \"M567.403 235.642L462.323 84.589A48 48 0 0 0 422.919 64H153.081a48 48 0 0 0-39.404 20.589L8.597 235.642A48.001 48.001 0 0 0 0 263.054V400c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V263.054c0-9.801-3-19.366-8.597-27.412zM153.081 112h269.838l77.913 112H75.168l77.913-112zM528 400H48V272h480v128zm-32-64c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32zm-96 0c0 17.673-14.327 32-32 32s-32-14.327-32-32 14.327-32 32-32 32 14.327 32 32z\"]\n};\nvar faHeart = {\n prefix: 'far',\n iconName: 'heart',\n icon: [512, 512, [], \"f004\", \"M458.4 64.3C400.6 15.7 311.3 23 256 79.3 200.7 23 111.4 15.6 53.6 64.3-21.6 127.6-10.6 230.8 43 285.5l175.4 178.7c10 10.2 23.4 15.9 37.6 15.9 14.3 0 27.6-5.6 37.6-15.8L469 285.6c53.5-54.7 64.7-157.9-10.6-221.3zm-23.6 187.5L259.4 430.5c-2.4 2.4-4.4 2.4-6.8 0L77.2 251.8c-36.5-37.2-43.9-107.6 7.3-150.7 38.9-32.7 98.9-27.8 136.5 10.5l35 35.7 35-35.7c37.8-38.5 97.8-43.2 136.5-10.6 51.1 43.1 43.5 113.9 7.3 150.8z\"]\n};\nvar faHospital = {\n prefix: 'far',\n iconName: 'hospital',\n icon: [448, 512, [], \"f0f8\", \"M128 244v-40c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v40c0 6.627-5.373 12-12 12h-40c-6.627 0-12-5.373-12-12zm140 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm-76 84v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12h40c6.627 0 12-5.373 12-12zm76 12h40c6.627 0 12-5.373 12-12v-40c0-6.627-5.373-12-12-12h-40c-6.627 0-12 5.373-12 12v40c0 6.627 5.373 12 12 12zm180 124v36H0v-36c0-6.627 5.373-12 12-12h19.5V85.035C31.5 73.418 42.245 64 55.5 64H144V24c0-13.255 10.745-24 24-24h112c13.255 0 24 10.745 24 24v40h88.5c13.255 0 24 9.418 24 21.035V464H436c6.627 0 12 5.373 12 12zM79.5 463H192v-67c0-6.627 5.373-12 12-12h40c6.627 0 12 5.373 12 12v67h112.5V112H304v24c0 13.255-10.745 24-24 24H168c-13.255 0-24-10.745-24-24v-24H79.5v351zM266 64h-26V38a6 6 0 0 0-6-6h-20a6 6 0 0 0-6 6v26h-26a6 6 0 0 0-6 6v20a6 6 0 0 0 6 6h26v26a6 6 0 0 0 6 6h20a6 6 0 0 0 6-6V96h26a6 6 0 0 0 6-6V70a6 6 0 0 0-6-6z\"]\n};\nvar faHourglass = {\n prefix: 'far',\n iconName: 'hourglass',\n icon: [384, 512, [], \"f254\", \"M368 48h4c6.627 0 12-5.373 12-12V12c0-6.627-5.373-12-12-12H12C5.373 0 0 5.373 0 12v24c0 6.627 5.373 12 12 12h4c0 80.564 32.188 165.807 97.18 208C47.899 298.381 16 383.9 16 464h-4c-6.627 0-12 5.373-12 12v24c0 6.627 5.373 12 12 12h360c6.627 0 12-5.373 12-12v-24c0-6.627-5.373-12-12-12h-4c0-80.564-32.188-165.807-97.18-208C336.102 213.619 368 128.1 368 48zM64 48h256c0 101.62-57.307 184-128 184S64 149.621 64 48zm256 416H64c0-101.62 57.308-184 128-184s128 82.38 128 184z\"]\n};\nvar faIdBadge = {\n prefix: 'far',\n iconName: 'id-badge',\n icon: [384, 512, [], \"f2c1\", \"M336 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm0 464H48V48h288v416zM144 112h96c8.8 0 16-7.2 16-16s-7.2-16-16-16h-96c-8.8 0-16 7.2-16 16s7.2 16 16 16zm48 176c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64zm-89.6 128h179.2c12.4 0 22.4-8.6 22.4-19.2v-19.2c0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6v19.2c0 10.6 10 19.2 22.4 19.2z\"]\n};\nvar faIdCard = {\n prefix: 'far',\n iconName: 'id-card',\n icon: [576, 512, [], \"f2c2\", \"M528 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h480c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 400H303.2c.9-4.5.8 3.6.8-22.4 0-31.8-30.1-57.6-67.2-57.6-10.8 0-18.7 8-44.8 8-26.9 0-33.4-8-44.8-8-37.1 0-67.2 25.8-67.2 57.6 0 26-.2 17.9.8 22.4H48V144h480v288zm-168-80h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm0-64h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8H360c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8zm-168 96c35.3 0 64-28.7 64-64s-28.7-64-64-64-64 28.7-64 64 28.7 64 64 64z\"]\n};\nvar faImage = {\n prefix: 'far',\n iconName: 'image',\n icon: [512, 512, [], \"f03e\", \"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z\"]\n};\nvar faImages = {\n prefix: 'far',\n iconName: 'images',\n icon: [576, 512, [], \"f302\", \"M480 416v16c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V176c0-26.51 21.49-48 48-48h16v48H54a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6v-10h48zm42-336H150a6 6 0 0 0-6 6v244a6 6 0 0 0 6 6h372a6 6 0 0 0 6-6V86a6 6 0 0 0-6-6zm6-48c26.51 0 48 21.49 48 48v256c0 26.51-21.49 48-48 48H144c-26.51 0-48-21.49-48-48V80c0-26.51 21.49-48 48-48h384zM264 144c0 22.091-17.909 40-40 40s-40-17.909-40-40 17.909-40 40-40 40 17.909 40 40zm-72 96l39.515-39.515c4.686-4.686 12.284-4.686 16.971 0L288 240l103.515-103.515c4.686-4.686 12.284-4.686 16.971 0L480 208v80H192v-48z\"]\n};\nvar faKeyboard = {\n prefix: 'far',\n iconName: 'keyboard',\n icon: [576, 512, [], \"f11c\", \"M528 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h480c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm8 336c0 4.411-3.589 8-8 8H48c-4.411 0-8-3.589-8-8V112c0-4.411 3.589-8 8-8h480c4.411 0 8 3.589 8 8v288zM170 270v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-336 82v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm384 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zM122 188v-28c0-6.627-5.373-12-12-12H82c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm96 0v-28c0-6.627-5.373-12-12-12h-28c-6.627 0-12 5.373-12 12v28c0 6.627 5.373 12 12 12h28c6.627 0 12-5.373 12-12zm-98 158v-16c0-6.627-5.373-12-12-12H180c-6.627 0-12 5.373-12 12v16c0 6.627 5.373 12 12 12h216c6.627 0 12-5.373 12-12z\"]\n};\nvar faKiss = {\n prefix: 'far',\n iconName: 'kiss',\n icon: [496, 512, [], \"f596\", \"M168 176c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm136 132c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36C290.6 335.3 304 321 304 308zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm80-280c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z\"]\n};\nvar faKissBeam = {\n prefix: 'far',\n iconName: 'kiss-beam',\n icon: [496, 512, [], \"f597\", \"M168 152c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2 7.2 5.6 8.3 3.5 1 7.5-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 5.9-4.5 5.6-8.3-3.1-42.1-32-71.4-55.8-71.4zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm56-148c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36C290.6 335.3 304 321 304 308zm24-156c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2 7.2 5.6 8.3 3.5 1 7.5-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 5.9-4.5 5.6-8.3-3.1-42.1-32-71.4-55.8-71.4z\"]\n};\nvar faKissWinkHeart = {\n prefix: 'far',\n iconName: 'kiss-wink-heart',\n icon: [504, 512, [], \"f598\", \"M304 308.5c0-19.2-28.8-41.5-71.5-44-3.8-.4-7.4 2.4-8.2 6.2-.9 3.8 1.1 7.7 4.7 9.2l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-5.7 2.4-6 12.2 0 14.8l16.9 7.2c13 5.5 20.8 13.5 20.8 21.5s-7.8 16-20.7 21.5l-17 7.2c-3.6 1.5-5.6 5.4-4.7 9.2.8 3.6 4.1 6.2 7.8 6.2h.5c42.8-2.5 71.5-24.8 71.5-44 0-13-13.4-27.3-35.2-36 21.7-9.1 35.1-23.4 35.1-36.4zm70.5-83.5l9.5 8.5c3.8 3.3 9.3 4 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-4-25.2-34.2-42.1-59.8-42.1s-55.9 16.9-59.8 42.1c-.8 5 1.7 10 6.1 12.4 5.8 3.1 11.2.7 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0zM136 208.5c0 17.7 14.3 32 32 32s32-14.3 32-32-14.3-32-32-32-32 14.3-32 32zm365.1 194c-8-20.8-31.5-31.5-53.1-25.9l-8.4 2.2-2.3-8.4c-5.9-21.4-27-36.5-49-33-25.2 4-40.6 28.6-34 52.6l22.9 82.6c1.5 5.3 7 8.5 12.4 7.1l83-21.5c24.1-6.3 37.7-31.8 28.5-55.7zM334 436.3c-26.1 12.5-55.2 19.7-86 19.7-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200c0 22.1-3.7 43.3-10.4 63.2 9 6.4 17 14.2 22.6 23.9 6.4.1 12.6 1.4 18.6 2.9 10.9-27.9 17.1-58.2 17.1-90C496 119 385 8 248 8S0 119 0 256s111 248 248 248c35.4 0 68.9-7.5 99.4-20.9-2.5-7.3 4.3 17.2-13.4-46.8z\"]\n};\nvar faLaugh = {\n prefix: 'far',\n iconName: 'laugh',\n icon: [496, 512, [], \"f599\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM328 224c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm-160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm194.4 64H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z\"]\n};\nvar faLaughBeam = {\n prefix: 'far',\n iconName: 'laugh-beam',\n icon: [496, 512, [], \"f59a\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM328 152c-23.8 0-52.7 29.3-56 71.4-.7 8.6 10.8 11.9 14.9 4.5l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c4.1 7.4 15.6 4 14.9-4.5-3.1-42.1-32-71.4-55.8-71.4zm-201 75.9l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c4.1 7.4 15.6 4 14.9-4.5-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.6 8.5 10.9 11.9 15.1 4.5zM362.4 288H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z\"]\n};\nvar faLaughSquint = {\n prefix: 'far',\n iconName: 'laugh-squint',\n icon: [496, 512, [], \"f59b\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6S48 309.4 48 256s20.8-103.6 58.6-141.4S194.6 56 248 56s103.6 20.8 141.4 58.6S448 202.6 448 256s-20.8 103.6-58.6 141.4zM343.6 196l33.6-40.3c8.6-10.3-3.8-24.8-15.4-18l-80 48c-7.8 4.7-7.8 15.9 0 20.6l80 48c11.5 6.8 24-7.6 15.4-18L343.6 196zm-209.4 58.3l80-48c7.8-4.7 7.8-15.9 0-20.6l-80-48c-11.6-6.9-24 7.7-15.4 18l33.6 40.3-33.6 40.3c-8.7 10.4 3.8 24.8 15.4 18zM362.4 288H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z\"]\n};\nvar faLaughWink = {\n prefix: 'far',\n iconName: 'laugh-wink',\n icon: [496, 512, [], \"f59c\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm141.4 389.4c-37.8 37.8-88 58.6-141.4 58.6s-103.6-20.8-141.4-58.6C68.8 359.6 48 309.4 48 256s20.8-103.6 58.6-141.4C144.4 76.8 194.6 56 248 56s103.6 20.8 141.4 58.6c37.8 37.8 58.6 88 58.6 141.4s-20.8 103.6-58.6 141.4zM328 164c-25.7 0-55.9 16.9-59.9 42.1-1.7 11.2 11.5 18.2 19.8 10.8l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c8.5 7.4 21.6.3 19.8-10.8-3.8-25.2-34-42.1-59.7-42.1zm-160 60c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm194.4 64H133.6c-8.2 0-14.5 7-13.5 15 7.5 59.2 58.9 105 121.1 105h13.6c62.2 0 113.6-45.8 121.1-105 1-8-5.3-15-13.5-15z\"]\n};\nvar faLemon = {\n prefix: 'far',\n iconName: 'lemon',\n icon: [512, 512, [], \"f094\", \"M484.112 27.889C455.989-.233 416.108-8.057 387.059 8.865 347.604 31.848 223.504-41.111 91.196 91.197-41.277 223.672 31.923 347.472 8.866 387.058c-16.922 29.051-9.1 68.932 19.022 97.054 28.135 28.135 68.011 35.938 97.057 19.021 39.423-22.97 163.557 49.969 295.858-82.329 132.474-132.477 59.273-256.277 82.331-295.861 16.922-29.05 9.1-68.931-19.022-97.054zm-22.405 72.894c-38.8 66.609 45.6 165.635-74.845 286.08-120.44 120.443-219.475 36.048-286.076 74.843-22.679 13.207-64.035-27.241-50.493-50.488 38.8-66.609-45.6-165.635 74.845-286.08C245.573 4.702 344.616 89.086 411.219 50.292c22.73-13.24 64.005 27.288 50.488 50.491zm-169.861 8.736c1.37 10.96-6.404 20.957-17.365 22.327-54.846 6.855-135.779 87.787-142.635 142.635-1.373 10.989-11.399 18.734-22.326 17.365-10.961-1.37-18.735-11.366-17.365-22.326 9.162-73.286 104.167-168.215 177.365-177.365 10.953-1.368 20.956 6.403 22.326 17.364z\"]\n};\nvar faLifeRing = {\n prefix: 'far',\n iconName: 'life-ring',\n icon: [512, 512, [], \"f1cd\", \"M256 504c136.967 0 248-111.033 248-248S392.967 8 256 8 8 119.033 8 256s111.033 248 248 248zm-103.398-76.72l53.411-53.411c31.806 13.506 68.128 13.522 99.974 0l53.411 53.411c-63.217 38.319-143.579 38.319-206.796 0zM336 256c0 44.112-35.888 80-80 80s-80-35.888-80-80 35.888-80 80-80 80 35.888 80 80zm91.28 103.398l-53.411-53.411c13.505-31.806 13.522-68.128 0-99.974l53.411-53.411c38.319 63.217 38.319 143.579 0 206.796zM359.397 84.72l-53.411 53.411c-31.806-13.505-68.128-13.522-99.973 0L152.602 84.72c63.217-38.319 143.579-38.319 206.795 0zM84.72 152.602l53.411 53.411c-13.506 31.806-13.522 68.128 0 99.974L84.72 359.398c-38.319-63.217-38.319-143.579 0-206.796z\"]\n};\nvar faLightbulb = {\n prefix: 'far',\n iconName: 'lightbulb',\n icon: [352, 512, [], \"f0eb\", \"M176 80c-52.94 0-96 43.06-96 96 0 8.84 7.16 16 16 16s16-7.16 16-16c0-35.3 28.72-64 64-64 8.84 0 16-7.16 16-16s-7.16-16-16-16zM96.06 459.17c0 3.15.93 6.22 2.68 8.84l24.51 36.84c2.97 4.46 7.97 7.14 13.32 7.14h78.85c5.36 0 10.36-2.68 13.32-7.14l24.51-36.84c1.74-2.62 2.67-5.7 2.68-8.84l.05-43.18H96.02l.04 43.18zM176 0C73.72 0 0 82.97 0 176c0 44.37 16.45 84.85 43.56 115.78 16.64 18.99 42.74 58.8 52.42 92.16v.06h48v-.12c-.01-4.77-.72-9.51-2.15-14.07-5.59-17.81-22.82-64.77-62.17-109.67-20.54-23.43-31.52-53.15-31.61-84.14-.2-73.64 59.67-128 127.95-128 70.58 0 128 57.42 128 128 0 30.97-11.24 60.85-31.65 84.14-39.11 44.61-56.42 91.47-62.1 109.46a47.507 47.507 0 0 0-2.22 14.3v.1h48v-.05c9.68-33.37 35.78-73.18 52.42-92.16C335.55 260.85 352 220.37 352 176 352 78.8 273.2 0 176 0z\"]\n};\nvar faListAlt = {\n prefix: 'far',\n iconName: 'list-alt',\n icon: [512, 512, [], \"f022\", \"M464 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48zm-6 400H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v340a6 6 0 0 1-6 6zm-42-92v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm0-96v24c0 6.627-5.373 12-12 12H204c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h200c6.627 0 12 5.373 12 12zm-252 12c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36zm0 96c0 19.882-16.118 36-36 36s-36-16.118-36-36 16.118-36 36-36 36 16.118 36 36z\"]\n};\nvar faMap = {\n prefix: 'far',\n iconName: 'map',\n icon: [576, 512, [], \"f279\", \"M560.02 32c-1.96 0-3.98.37-5.96 1.16L384.01 96H384L212 35.28A64.252 64.252 0 0 0 191.76 32c-6.69 0-13.37 1.05-19.81 3.14L20.12 87.95A32.006 32.006 0 0 0 0 117.66v346.32C0 473.17 7.53 480 15.99 480c1.96 0 3.97-.37 5.96-1.16L192 416l172 60.71a63.98 63.98 0 0 0 40.05.15l151.83-52.81A31.996 31.996 0 0 0 576 394.34V48.02c0-9.19-7.53-16.02-15.98-16.02zM224 90.42l128 45.19v285.97l-128-45.19V90.42zM48 418.05V129.07l128-44.53v286.2l-.64.23L48 418.05zm480-35.13l-128 44.53V141.26l.64-.24L528 93.95v288.97z\"]\n};\nvar faMeh = {\n prefix: 'far',\n iconName: 'meh',\n icon: [496, 512, [], \"f11a\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm8 144H160c-13.2 0-24 10.8-24 24s10.8 24 24 24h176c13.2 0 24-10.8 24-24s-10.8-24-24-24z\"]\n};\nvar faMehBlank = {\n prefix: 'far',\n iconName: 'meh-blank',\n icon: [496, 512, [], \"f5a4\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-280c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm160 0c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z\"]\n};\nvar faMehRollingEyes = {\n prefix: 'far',\n iconName: 'meh-rolling-eyes',\n icon: [496, 512, [], \"f5a5\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm88-304c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72zm0 112c-22.1 0-40-17.9-40-40 0-13.6 7.3-25.1 17.7-32.3-1 2.6-1.7 5.3-1.7 8.3 0 13.3 10.7 24 24 24s24-10.7 24-24c0-2.9-.7-5.7-1.7-8.3 10.4 7.2 17.7 18.7 17.7 32.3 0 22.1-17.9 40-40 40zm-104-40c0-39.8-32.2-72-72-72s-72 32.2-72 72 32.2 72 72 72 72-32.2 72-72zm-112 0c0-13.6 7.3-25.1 17.7-32.3-1 2.6-1.7 5.3-1.7 8.3 0 13.3 10.7 24 24 24s24-10.7 24-24c0-2.9-.7-5.7-1.7-8.3 10.4 7.2 17.7 18.7 17.7 32.3 0 22.1-17.9 40-40 40s-40-17.9-40-40zm192 128H184c-13.2 0-24 10.8-24 24s10.8 24 24 24h128c13.2 0 24-10.8 24-24s-10.8-24-24-24z\"]\n};\nvar faMinusSquare = {\n prefix: 'far',\n iconName: 'minus-square',\n icon: [448, 512, [], \"f146\", \"M108 284c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h232c6.6 0 12 5.4 12 12v32c0 6.6-5.4 12-12 12H108zM448 80v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faMoneyBillAlt = {\n prefix: 'far',\n iconName: 'money-bill-alt',\n icon: [640, 512, [], \"f3d1\", \"M320 144c-53.02 0-96 50.14-96 112 0 61.85 42.98 112 96 112 53 0 96-50.13 96-112 0-61.86-42.98-112-96-112zm40 168c0 4.42-3.58 8-8 8h-64c-4.42 0-8-3.58-8-8v-16c0-4.42 3.58-8 8-8h16v-55.44l-.47.31a7.992 7.992 0 0 1-11.09-2.22l-8.88-13.31a7.992 7.992 0 0 1 2.22-11.09l15.33-10.22a23.99 23.99 0 0 1 13.31-4.03H328c4.42 0 8 3.58 8 8v88h16c4.42 0 8 3.58 8 8v16zM608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h576c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zm-16 272c-35.35 0-64 28.65-64 64H112c0-35.35-28.65-64-64-64V176c35.35 0 64-28.65 64-64h416c0 35.35 28.65 64 64 64v160z\"]\n};\nvar faMoon = {\n prefix: 'far',\n iconName: 'moon',\n icon: [512, 512, [], \"f186\", \"M279.135 512c78.756 0 150.982-35.804 198.844-94.775 28.27-34.831-2.558-85.722-46.249-77.401-82.348 15.683-158.272-47.268-158.272-130.792 0-48.424 26.06-92.292 67.434-115.836 38.745-22.05 28.999-80.788-15.022-88.919A257.936 257.936 0 0 0 279.135 0c-141.36 0-256 114.575-256 256 0 141.36 114.576 256 256 256zm0-464c12.985 0 25.689 1.201 38.016 3.478-54.76 31.163-91.693 90.042-91.693 157.554 0 113.848 103.641 199.2 215.252 177.944C402.574 433.964 344.366 464 279.135 464c-114.875 0-208-93.125-208-208s93.125-208 208-208z\"]\n};\nvar faNewspaper = {\n prefix: 'far',\n iconName: 'newspaper',\n icon: [576, 512, [], \"f1ea\", \"M552 64H112c-20.858 0-38.643 13.377-45.248 32H24c-13.255 0-24 10.745-24 24v272c0 30.928 25.072 56 56 56h496c13.255 0 24-10.745 24-24V88c0-13.255-10.745-24-24-24zM48 392V144h16v248c0 4.411-3.589 8-8 8s-8-3.589-8-8zm480 8H111.422c.374-2.614.578-5.283.578-8V112h416v288zM172 280h136c6.627 0 12-5.373 12-12v-96c0-6.627-5.373-12-12-12H172c-6.627 0-12 5.373-12 12v96c0 6.627 5.373 12 12 12zm28-80h80v40h-80v-40zm-40 140v-24c0-6.627 5.373-12 12-12h136c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H172c-6.627 0-12-5.373-12-12zm192 0v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0-144v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12zm0 72v-24c0-6.627 5.373-12 12-12h104c6.627 0 12 5.373 12 12v24c0 6.627-5.373 12-12 12H364c-6.627 0-12-5.373-12-12z\"]\n};\nvar faObjectGroup = {\n prefix: 'far',\n iconName: 'object-group',\n icon: [512, 512, [], \"f247\", \"M500 128c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v256H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V128h12zm-52-64h32v32h-32V64zM32 64h32v32H32V64zm32 384H32v-32h32v32zm416 0h-32v-32h32v32zm-40-64h-12c-6.627 0-12 5.373-12 12v12H96v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h320v12c0 6.627 5.373 12 12 12h12v256zm-36-192h-84v-52c0-6.628-5.373-12-12-12H108c-6.627 0-12 5.372-12 12v168c0 6.628 5.373 12 12 12h84v52c0 6.628 5.373 12 12 12h200c6.627 0 12-5.372 12-12V204c0-6.628-5.373-12-12-12zm-268-24h144v112H136V168zm240 176H232v-24h76c6.627 0 12-5.372 12-12v-76h56v112z\"]\n};\nvar faObjectUngroup = {\n prefix: 'far',\n iconName: 'object-ungroup',\n icon: [576, 512, [], \"f248\", \"M564 224c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12h-88v-24h12c6.627 0 12-5.373 12-12V44c0-6.627-5.373-12-12-12h-72c-6.627 0-12 5.373-12 12v12H96V44c0-6.627-5.373-12-12-12H12C5.373 32 0 37.373 0 44v72c0 6.627 5.373 12 12 12h12v160H12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h88v24h-12c-6.627 0-12 5.373-12 12v72c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12V224h12zM352 64h32v32h-32V64zm0 256h32v32h-32v-32zM64 352H32v-32h32v32zm0-256H32V64h32v32zm32 216v-12c0-6.627-5.373-12-12-12H72V128h12c6.627 0 12-5.373 12-12v-12h224v12c0 6.627 5.373 12 12 12h12v160h-12c-6.627 0-12 5.373-12 12v12H96zm128 136h-32v-32h32v32zm280-64h-12c-6.627 0-12 5.373-12 12v12H256v-12c0-6.627-5.373-12-12-12h-12v-24h88v12c0 6.627 5.373 12 12 12h72c6.627 0 12-5.373 12-12v-72c0-6.627-5.373-12-12-12h-12v-88h88v12c0 6.627 5.373 12 12 12h12v160zm40 64h-32v-32h32v32zm0-256h-32v-32h32v32z\"]\n};\nvar faPaperPlane = {\n prefix: 'far',\n iconName: 'paper-plane',\n icon: [512, 512, [], \"f1d8\", \"M440 6.5L24 246.4c-34.4 19.9-31.1 70.8 5.7 85.9L144 379.6V464c0 46.4 59.2 65.5 86.6 28.6l43.8-59.1 111.9 46.2c5.9 2.4 12.1 3.6 18.3 3.6 8.2 0 16.3-2.1 23.6-6.2 12.8-7.2 21.6-20 23.9-34.5l59.4-387.2c6.1-40.1-36.9-68.8-71.5-48.9zM192 464v-64.6l36.6 15.1L192 464zm212.6-28.7l-153.8-63.5L391 169.5c10.7-15.5-9.5-33.5-23.7-21.2L155.8 332.6 48 288 464 48l-59.4 387.3z\"]\n};\nvar faPauseCircle = {\n prefix: 'far',\n iconName: 'pause-circle',\n icon: [512, 512, [], \"f28b\", \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm96-280v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16zm-112 0v160c0 8.8-7.2 16-16 16h-48c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16z\"]\n};\nvar faPlayCircle = {\n prefix: 'far',\n iconName: 'play-circle',\n icon: [512, 512, [], \"f144\", \"M371.7 238l-176-107c-15.8-8.8-35.7 2.5-35.7 21v208c0 18.4 19.8 29.8 35.7 21l176-101c16.4-9.1 16.4-32.8 0-42zM504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256z\"]\n};\nvar faPlusSquare = {\n prefix: 'far',\n iconName: 'plus-square',\n icon: [448, 512, [], \"f0fe\", \"M352 240v32c0 6.6-5.4 12-12 12h-88v88c0 6.6-5.4 12-12 12h-32c-6.6 0-12-5.4-12-12v-88h-88c-6.6 0-12-5.4-12-12v-32c0-6.6 5.4-12 12-12h88v-88c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v88h88c6.6 0 12 5.4 12 12zm96-160v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V80c0-26.5 21.5-48 48-48h352c26.5 0 48 21.5 48 48zm-48 346V86c0-3.3-2.7-6-6-6H54c-3.3 0-6 2.7-6 6v340c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z\"]\n};\nvar faQuestionCircle = {\n prefix: 'far',\n iconName: 'question-circle',\n icon: [512, 512, [], \"f059\", \"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z\"]\n};\nvar faRegistered = {\n prefix: 'far',\n iconName: 'registered',\n icon: [512, 512, [], \"f25d\", \"M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 448c-110.532 0-200-89.451-200-200 0-110.531 89.451-200 200-200 110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200zm110.442-81.791c-53.046-96.284-50.25-91.468-53.271-96.085 24.267-13.879 39.482-41.563 39.482-73.176 0-52.503-30.247-85.252-101.498-85.252h-78.667c-6.617 0-12 5.383-12 12V380c0 6.617 5.383 12 12 12h38.568c6.617 0 12-5.383 12-12v-83.663h31.958l47.515 89.303a11.98 11.98 0 0 0 10.593 6.36h42.81c9.14 0 14.914-9.799 10.51-17.791zM256.933 239.906h-33.875v-64.14h27.377c32.417 0 38.929 12.133 38.929 31.709-.001 20.913-11.518 32.431-32.431 32.431z\"]\n};\nvar faSadCry = {\n prefix: 'far',\n iconName: 'sad-cry',\n icon: [496, 512, [], \"f5b3\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm144 386.4V280c0-13.2-10.8-24-24-24s-24 10.8-24 24v151.4C315.5 447 282.8 456 248 456s-67.5-9-96-24.6V280c0-13.2-10.8-24-24-24s-24 10.8-24 24v114.4c-34.6-36-56-84.7-56-138.4 0-110.3 89.7-200 200-200s200 89.7 200 200c0 53.7-21.4 102.5-56 138.4zM205.8 234.5c4.4-2.4 6.9-7.4 6.1-12.4-4-25.2-34.2-42.1-59.8-42.1s-55.9 16.9-59.8 42.1c-.8 5 1.7 10 6.1 12.4 4.4 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.3 7.9 4.8 13.7 1.6zM344 180c-25.7 0-55.9 16.9-59.8 42.1-.8 5 1.7 10 6.1 12.4 4.5 2.4 9.9 1.8 13.7-1.6l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c2.5 2.2 8 4.7 13.7 1.6 4.4-2.4 6.9-7.4 6.1-12.4-3.9-25.2-34.1-42.1-59.8-42.1zm-96 92c-30.9 0-56 28.7-56 64s25.1 64 56 64 56-28.7 56-64-25.1-64-56-64z\"]\n};\nvar faSadTear = {\n prefix: 'far',\n iconName: 'sad-tear',\n icon: [496, 512, [], \"f5b4\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm8-152c-13.2 0-24 10.8-24 24s10.8 24 24 24c23.8 0 46.3 10.5 61.6 28.8 8.1 9.8 23.2 11.9 33.8 3.1 10.2-8.5 11.6-23.6 3.1-33.8C330 320.8 294.1 304 256 304zm-88-64c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-64c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32zm-165.6 98.8C151 290.1 126 325.4 126 342.9c0 22.7 18.8 41.1 42 41.1s42-18.4 42-41.1c0-17.5-25-52.8-36.4-68.1-2.8-3.7-8.4-3.7-11.2 0z\"]\n};\nvar faSave = {\n prefix: 'far',\n iconName: 'save',\n icon: [448, 512, [], \"f0c7\", \"M433.941 129.941l-83.882-83.882A48 48 0 0 0 316.118 32H48C21.49 32 0 53.49 0 80v352c0 26.51 21.49 48 48 48h352c26.51 0 48-21.49 48-48V163.882a48 48 0 0 0-14.059-33.941zM272 80v80H144V80h128zm122 352H54a6 6 0 0 1-6-6V86a6 6 0 0 1 6-6h42v104c0 13.255 10.745 24 24 24h176c13.255 0 24-10.745 24-24V83.882l78.243 78.243a6 6 0 0 1 1.757 4.243V426a6 6 0 0 1-6 6zM224 232c-48.523 0-88 39.477-88 88s39.477 88 88 88 88-39.477 88-88-39.477-88-88-88zm0 128c-22.056 0-40-17.944-40-40s17.944-40 40-40 40 17.944 40 40-17.944 40-40 40z\"]\n};\nvar faShareSquare = {\n prefix: 'far',\n iconName: 'share-square',\n icon: [576, 512, [], \"f14d\", \"M561.938 158.06L417.94 14.092C387.926-15.922 336 5.097 336 48.032v57.198c-42.45 1.88-84.03 6.55-120.76 17.99-35.17 10.95-63.07 27.58-82.91 49.42C108.22 199.2 96 232.6 96 271.94c0 61.697 33.178 112.455 84.87 144.76 37.546 23.508 85.248-12.651 71.02-55.74-15.515-47.119-17.156-70.923 84.11-78.76V336c0 42.993 51.968 63.913 81.94 33.94l143.998-144c18.75-18.74 18.75-49.14 0-67.88zM384 336V232.16C255.309 234.082 166.492 255.35 206.31 376 176.79 357.55 144 324.08 144 271.94c0-109.334 129.14-118.947 240-119.85V48l144 144-144 144zm24.74 84.493a82.658 82.658 0 0 0 20.974-9.303c7.976-4.952 18.286.826 18.286 10.214V464c0 26.51-21.49 48-48 48H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h132c6.627 0 12 5.373 12 12v4.486c0 4.917-2.987 9.369-7.569 11.152-13.702 5.331-26.396 11.537-38.05 18.585a12.138 12.138 0 0 1-6.28 1.777H54a6 6 0 0 0-6 6v340a6 6 0 0 0 6 6h340a6 6 0 0 0 6-6v-25.966c0-5.37 3.579-10.059 8.74-11.541z\"]\n};\nvar faSmile = {\n prefix: 'far',\n iconName: 'smile',\n icon: [496, 512, [], \"f118\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z\"]\n};\nvar faSmileBeam = {\n prefix: 'far',\n iconName: 'smile-beam',\n icon: [496, 512, [], \"f5b8\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm84-143.4c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.6-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.2-8.4-25.3-7.1-33.8 3.1zM136.5 211c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4s-52.7 29.3-56 71.4c-.3 3.7 2.1 7.2 5.7 8.3 3.4 1.1 7.4-.5 9.3-3.7l9.5-17zM328 152c-23.8 0-52.7 29.3-56 71.4-.3 3.7 2.1 7.2 5.7 8.3 3.5 1.1 7.4-.5 9.3-3.7l9.5-17c7.7-13.7 19.2-21.6 31.5-21.6s23.8 7.9 31.5 21.6l9.5 17c2.1 3.7 6.2 4.7 9.3 3.7 3.6-1.1 6-4.5 5.7-8.3-3.3-42.1-32.2-71.4-56-71.4z\"]\n};\nvar faSmileWink = {\n prefix: 'far',\n iconName: 'smile-wink',\n icon: [496, 512, [], \"f4da\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm117.8-146.4c-10.2-8.5-25.3-7.1-33.8 3.1-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8zM168 240c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160-60c-25.7 0-55.9 16.9-59.9 42.1-1.7 11.2 11.5 18.2 19.8 10.8l9.5-8.5c14.8-13.2 46.2-13.2 61 0l9.5 8.5c8.5 7.4 21.6.3 19.8-10.8-3.8-25.2-34-42.1-59.7-42.1z\"]\n};\nvar faSnowflake = {\n prefix: 'far',\n iconName: 'snowflake',\n icon: [448, 512, [], \"f2dc\", \"M440.1 355.2l-39.2-23 34.1-9.3c8.4-2.3 13.4-11.1 11.1-19.6l-4.1-15.5c-2.2-8.5-10.9-13.6-19.3-11.3L343 298.2 271.2 256l71.9-42.2 79.7 21.7c8.4 2.3 17-2.8 19.3-11.3l4.1-15.5c2.2-8.5-2.7-17.3-11.1-19.6l-34.1-9.3 39.2-23c7.5-4.4 10.1-14.2 5.8-21.9l-7.9-13.9c-4.3-7.7-14-10.3-21.5-5.9l-39.2 23 9.1-34.7c2.2-8.5-2.7-17.3-11.1-19.6l-15.2-4.1c-8.4-2.3-17 2.8-19.3 11.3l-21.3 81-71.9 42.2v-84.5L306 70.4c6.1-6.2 6.1-16.4 0-22.6l-11.1-11.3c-6.1-6.2-16.1-6.2-22.2 0l-24.9 25.4V16c0-8.8-7-16-15.7-16h-15.7c-8.7 0-15.7 7.2-15.7 16v46.1l-24.9-25.4c-6.1-6.2-16.1-6.2-22.2 0L142.1 48c-6.1 6.2-6.1 16.4 0 22.6l58.3 59.3v84.5l-71.9-42.2-21.3-81c-2.2-8.5-10.9-13.6-19.3-11.3L72.7 84c-8.4 2.3-13.4 11.1-11.1 19.6l9.1 34.7-39.2-23c-7.5-4.4-17.1-1.8-21.5 5.9l-7.9 13.9c-4.3 7.7-1.8 17.4 5.8 21.9l39.2 23-34.1 9.1c-8.4 2.3-13.4 11.1-11.1 19.6L6 224.2c2.2 8.5 10.9 13.6 19.3 11.3l79.7-21.7 71.9 42.2-71.9 42.2-79.7-21.7c-8.4-2.3-17 2.8-19.3 11.3l-4.1 15.5c-2.2 8.5 2.7 17.3 11.1 19.6l34.1 9.3-39.2 23c-7.5 4.4-10.1 14.2-5.8 21.9L10 391c4.3 7.7 14 10.3 21.5 5.9l39.2-23-9.1 34.7c-2.2 8.5 2.7 17.3 11.1 19.6l15.2 4.1c8.4 2.3 17-2.8 19.3-11.3l21.3-81 71.9-42.2v84.5l-58.3 59.3c-6.1 6.2-6.1 16.4 0 22.6l11.1 11.3c6.1 6.2 16.1 6.2 22.2 0l24.9-25.4V496c0 8.8 7 16 15.7 16h15.7c8.7 0 15.7-7.2 15.7-16v-46.1l24.9 25.4c6.1 6.2 16.1 6.2 22.2 0l11.1-11.3c6.1-6.2 6.1-16.4 0-22.6l-58.3-59.3v-84.5l71.9 42.2 21.3 81c2.2 8.5 10.9 13.6 19.3 11.3L375 428c8.4-2.3 13.4-11.1 11.1-19.6l-9.1-34.7 39.2 23c7.5 4.4 17.1 1.8 21.5-5.9l7.9-13.9c4.6-7.5 2.1-17.3-5.5-21.7z\"]\n};\nvar faSquare = {\n prefix: 'far',\n iconName: 'square',\n icon: [448, 512, [], \"f0c8\", \"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h340c3.3 0 6 2.7 6 6v340c0 3.3-2.7 6-6 6z\"]\n};\nvar faStar = {\n prefix: 'far',\n iconName: 'star',\n icon: [576, 512, [], \"f005\", \"M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z\"]\n};\nvar faStarHalf = {\n prefix: 'far',\n iconName: 'star-half',\n icon: [576, 512, [], \"f089\", \"M288 385.3l-124.3 65.4 23.7-138.4-100.6-98 139-20.2 62.2-126V0c-11.4 0-22.8 5.9-28.7 17.8L194 150.2 47.9 171.4c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.1 23 46 46.4 33.7L288 439.6v-54.3z\"]\n};\nvar faStickyNote = {\n prefix: 'far',\n iconName: 'sticky-note',\n icon: [448, 512, [], \"f249\", \"M448 348.106V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80v351.988c0 26.51 21.49 48 48 48h268.118a48 48 0 0 0 33.941-14.059l83.882-83.882A48 48 0 0 0 448 348.106zm-128 80v-76.118h76.118L320 428.106zM400 80v223.988H296c-13.255 0-24 10.745-24 24v104H48V80h352z\"]\n};\nvar faStopCircle = {\n prefix: 'far',\n iconName: 'stop-circle',\n icon: [512, 512, [], \"f28d\", \"M504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256zm296-80v160c0 8.8-7.2 16-16 16H176c-8.8 0-16-7.2-16-16V176c0-8.8 7.2-16 16-16h160c8.8 0 16 7.2 16 16z\"]\n};\nvar faSun = {\n prefix: 'far',\n iconName: 'sun',\n icon: [512, 512, [], \"f185\", \"M494.2 221.9l-59.8-40.5 13.7-71c2.6-13.2-1.6-26.8-11.1-36.4-9.6-9.5-23.2-13.7-36.2-11.1l-70.9 13.7-40.4-59.9c-15.1-22.3-51.9-22.3-67 0l-40.4 59.9-70.8-13.7C98 60.4 84.5 64.5 75 74.1c-9.5 9.6-13.7 23.1-11.1 36.3l13.7 71-59.8 40.5C6.6 229.5 0 242 0 255.5s6.7 26 17.8 33.5l59.8 40.5-13.7 71c-2.6 13.2 1.6 26.8 11.1 36.3 9.5 9.5 22.9 13.7 36.3 11.1l70.8-13.7 40.4 59.9C230 505.3 242.6 512 256 512s26-6.7 33.5-17.8l40.4-59.9 70.9 13.7c13.4 2.7 26.8-1.6 36.3-11.1 9.5-9.5 13.6-23.1 11.1-36.3l-13.7-71 59.8-40.5c11.1-7.5 17.8-20.1 17.8-33.5-.1-13.6-6.7-26.1-17.9-33.7zm-112.9 85.6l17.6 91.2-91-17.6L256 458l-51.9-77-90.9 17.6 17.6-91.2-76.8-52 76.8-52-17.6-91.2 91 17.6L256 53l51.9 76.9 91-17.6-17.6 91.1 76.8 52-76.8 52.1zM256 152c-57.3 0-104 46.7-104 104s46.7 104 104 104 104-46.7 104-104-46.7-104-104-104zm0 160c-30.9 0-56-25.1-56-56s25.1-56 56-56 56 25.1 56 56-25.1 56-56 56z\"]\n};\nvar faSurprise = {\n prefix: 'far',\n iconName: 'surprise',\n icon: [496, 512, [], \"f5c2\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm0-176c-35.3 0-64 28.7-64 64s28.7 64 64 64 64-28.7 64-64-28.7-64-64-64zm-48-72c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32zm128-32c-17.7 0-32 14.3-32 32s14.3 32 32 32 32-14.3 32-32-14.3-32-32-32z\"]\n};\nvar faThumbsDown = {\n prefix: 'far',\n iconName: 'thumbs-down',\n icon: [512, 512, [], \"f165\", \"M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z\"]\n};\nvar faThumbsUp = {\n prefix: 'far',\n iconName: 'thumbs-up',\n icon: [512, 512, [], \"f164\", \"M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z\"]\n};\nvar faTimesCircle = {\n prefix: 'far',\n iconName: 'times-circle',\n icon: [512, 512, [], \"f057\", \"M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm101.8-262.2L295.6 256l62.2 62.2c4.7 4.7 4.7 12.3 0 17l-22.6 22.6c-4.7 4.7-12.3 4.7-17 0L256 295.6l-62.2 62.2c-4.7 4.7-12.3 4.7-17 0l-22.6-22.6c-4.7-4.7-4.7-12.3 0-17l62.2-62.2-62.2-62.2c-4.7-4.7-4.7-12.3 0-17l22.6-22.6c4.7-4.7 12.3-4.7 17 0l62.2 62.2 62.2-62.2c4.7-4.7 12.3-4.7 17 0l22.6 22.6c4.7 4.7 4.7 12.3 0 17z\"]\n};\nvar faTired = {\n prefix: 'far',\n iconName: 'tired',\n icon: [496, 512, [], \"f5c8\", \"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm129.1-303.8c-3.8-4.4-10.3-5.4-15.3-2.5l-80 48c-3.6 2.2-5.8 6.1-5.8 10.3s2.2 8.1 5.8 10.3l80 48c5.4 3.2 11.8 1.6 15.3-2.5 3.8-4.5 3.9-11 .1-15.5L343.6 208l33.6-40.3c3.8-4.5 3.7-11.1-.1-15.5zM220 208c0-4.2-2.2-8.1-5.8-10.3l-80-48c-5-3-11.5-1.9-15.3 2.5-3.8 4.5-3.9 11-.1 15.5l33.6 40.3-33.6 40.3c-3.8 4.5-3.7 11 .1 15.5 3.5 4.1 9.9 5.7 15.3 2.5l80-48c3.6-2.2 5.8-6.1 5.8-10.3zm28 64c-45.4 0-100.9 38.3-107.8 93.3-1.5 11.8 6.9 21.6 15.5 17.9C178.4 373.5 212 368 248 368s69.6 5.5 92.3 15.2c8.5 3.7 17-6 15.5-17.9-6.9-55-62.4-93.3-107.8-93.3z\"]\n};\nvar faTrashAlt = {\n prefix: 'far',\n iconName: 'trash-alt',\n icon: [448, 512, [], \"f2ed\", \"M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z\"]\n};\nvar faUser = {\n prefix: 'far',\n iconName: 'user',\n icon: [448, 512, [], \"f007\", \"M313.6 304c-28.7 0-42.5 16-89.6 16-47.1 0-60.8-16-89.6-16C60.2 304 0 364.2 0 438.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-25.6c0-74.2-60.2-134.4-134.4-134.4zM400 464H48v-25.6c0-47.6 38.8-86.4 86.4-86.4 14.6 0 38.3 16 89.6 16 51.7 0 74.9-16 89.6-16 47.6 0 86.4 38.8 86.4 86.4V464zM224 288c79.5 0 144-64.5 144-144S303.5 0 224 0 80 64.5 80 144s64.5 144 144 144zm0-240c52.9 0 96 43.1 96 96s-43.1 96-96 96-96-43.1-96-96 43.1-96 96-96z\"]\n};\nvar faUserCircle = {\n prefix: 'far',\n iconName: 'user-circle',\n icon: [496, 512, [], \"f2bd\", \"M248 104c-53 0-96 43-96 96s43 96 96 96 96-43 96-96-43-96-96-96zm0 144c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm0-240C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-49.7 0-95.1-18.3-130.1-48.4 14.9-23 40.4-38.6 69.6-39.5 20.8 6.4 40.6 9.6 60.5 9.6s39.7-3.1 60.5-9.6c29.2 1 54.7 16.5 69.6 39.5-35 30.1-80.4 48.4-130.1 48.4zm162.7-84.1c-24.4-31.4-62.1-51.9-105.1-51.9-10.2 0-26 9.6-57.6 9.6-31.5 0-47.4-9.6-57.6-9.6-42.9 0-80.6 20.5-105.1 51.9C61.9 339.2 48 299.2 48 256c0-110.3 89.7-200 200-200s200 89.7 200 200c0 43.2-13.9 83.2-37.3 115.9z\"]\n};\nvar faWindowClose = {\n prefix: 'far',\n iconName: 'window-close',\n icon: [512, 512, [], \"f410\", \"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V86c0-3.3 2.7-6 6-6h404c3.3 0 6 2.7 6 6v340zM356.5 194.6L295.1 256l61.4 61.4c4.6 4.6 4.6 12.1 0 16.8l-22.3 22.3c-4.6 4.6-12.1 4.6-16.8 0L256 295.1l-61.4 61.4c-4.6 4.6-12.1 4.6-16.8 0l-22.3-22.3c-4.6-4.6-4.6-12.1 0-16.8l61.4-61.4-61.4-61.4c-4.6-4.6-4.6-12.1 0-16.8l22.3-22.3c4.6-4.6 12.1-4.6 16.8 0l61.4 61.4 61.4-61.4c4.6-4.6 12.1-4.6 16.8 0l22.3 22.3c4.7 4.6 4.7 12.1 0 16.8z\"]\n};\nvar faWindowMaximize = {\n prefix: 'far',\n iconName: 'window-maximize',\n icon: [512, 512, [], \"f2d0\", \"M464 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h416c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm0 394c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V192h416v234z\"]\n};\nvar faWindowMinimize = {\n prefix: 'far',\n iconName: 'window-minimize',\n icon: [512, 512, [], \"f2d1\", \"M480 480H32c-17.7 0-32-14.3-32-32s14.3-32 32-32h448c17.7 0 32 14.3 32 32s-14.3 32-32 32z\"]\n};\nvar faWindowRestore = {\n prefix: 'far',\n iconName: 'window-restore',\n icon: [512, 512, [], \"f2d2\", \"M464 0H144c-26.5 0-48 21.5-48 48v48H48c-26.5 0-48 21.5-48 48v320c0 26.5 21.5 48 48 48h320c26.5 0 48-21.5 48-48v-48h48c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zm-96 464H48V256h320v208zm96-96h-48V144c0-26.5-21.5-48-48-48H144V48h320v320z\"]\n};\nvar _iconsCache = {\n faAddressBook: faAddressBook,\n faAddressCard: faAddressCard,\n faAngry: faAngry,\n faArrowAltCircleDown: faArrowAltCircleDown,\n faArrowAltCircleLeft: faArrowAltCircleLeft,\n faArrowAltCircleRight: faArrowAltCircleRight,\n faArrowAltCircleUp: faArrowAltCircleUp,\n faBell: faBell,\n faBellSlash: faBellSlash,\n faBookmark: faBookmark,\n faBuilding: faBuilding,\n faCalendar: faCalendar,\n faCalendarAlt: faCalendarAlt,\n faCalendarCheck: faCalendarCheck,\n faCalendarMinus: faCalendarMinus,\n faCalendarPlus: faCalendarPlus,\n faCalendarTimes: faCalendarTimes,\n faCaretSquareDown: faCaretSquareDown,\n faCaretSquareLeft: faCaretSquareLeft,\n faCaretSquareRight: faCaretSquareRight,\n faCaretSquareUp: faCaretSquareUp,\n faChartBar: faChartBar,\n faCheckCircle: faCheckCircle,\n faCheckSquare: faCheckSquare,\n faCircle: faCircle,\n faClipboard: faClipboard,\n faClock: faClock,\n faClone: faClone,\n faClosedCaptioning: faClosedCaptioning,\n faComment: faComment,\n faCommentAlt: faCommentAlt,\n faCommentDots: faCommentDots,\n faComments: faComments,\n faCompass: faCompass,\n faCopy: faCopy,\n faCopyright: faCopyright,\n faCreditCard: faCreditCard,\n faDizzy: faDizzy,\n faDotCircle: faDotCircle,\n faEdit: faEdit,\n faEnvelope: faEnvelope,\n faEnvelopeOpen: faEnvelopeOpen,\n faEye: faEye,\n faEyeSlash: faEyeSlash,\n faFile: faFile,\n faFileAlt: faFileAlt,\n faFileArchive: faFileArchive,\n faFileAudio: faFileAudio,\n faFileCode: faFileCode,\n faFileExcel: faFileExcel,\n faFileImage: faFileImage,\n faFilePdf: faFilePdf,\n faFilePowerpoint: faFilePowerpoint,\n faFileVideo: faFileVideo,\n faFileWord: faFileWord,\n faFlag: faFlag,\n faFlushed: faFlushed,\n faFolder: faFolder,\n faFolderOpen: faFolderOpen,\n faFontAwesomeLogoFull: faFontAwesomeLogoFull,\n faFrown: faFrown,\n faFrownOpen: faFrownOpen,\n faFutbol: faFutbol,\n faGem: faGem,\n faGrimace: faGrimace,\n faGrin: faGrin,\n faGrinAlt: faGrinAlt,\n faGrinBeam: faGrinBeam,\n faGrinBeamSweat: faGrinBeamSweat,\n faGrinHearts: faGrinHearts,\n faGrinSquint: faGrinSquint,\n faGrinSquintTears: faGrinSquintTears,\n faGrinStars: faGrinStars,\n faGrinTears: faGrinTears,\n faGrinTongue: faGrinTongue,\n faGrinTongueSquint: faGrinTongueSquint,\n faGrinTongueWink: faGrinTongueWink,\n faGrinWink: faGrinWink,\n faHandLizard: faHandLizard,\n faHandPaper: faHandPaper,\n faHandPeace: faHandPeace,\n faHandPointDown: faHandPointDown,\n faHandPointLeft: faHandPointLeft,\n faHandPointRight: faHandPointRight,\n faHandPointUp: faHandPointUp,\n faHandPointer: faHandPointer,\n faHandRock: faHandRock,\n faHandScissors: faHandScissors,\n faHandSpock: faHandSpock,\n faHandshake: faHandshake,\n faHdd: faHdd,\n faHeart: faHeart,\n faHospital: faHospital,\n faHourglass: faHourglass,\n faIdBadge: faIdBadge,\n faIdCard: faIdCard,\n faImage: faImage,\n faImages: faImages,\n faKeyboard: faKeyboard,\n faKiss: faKiss,\n faKissBeam: faKissBeam,\n faKissWinkHeart: faKissWinkHeart,\n faLaugh: faLaugh,\n faLaughBeam: faLaughBeam,\n faLaughSquint: faLaughSquint,\n faLaughWink: faLaughWink,\n faLemon: faLemon,\n faLifeRing: faLifeRing,\n faLightbulb: faLightbulb,\n faListAlt: faListAlt,\n faMap: faMap,\n faMeh: faMeh,\n faMehBlank: faMehBlank,\n faMehRollingEyes: faMehRollingEyes,\n faMinusSquare: faMinusSquare,\n faMoneyBillAlt: faMoneyBillAlt,\n faMoon: faMoon,\n faNewspaper: faNewspaper,\n faObjectGroup: faObjectGroup,\n faObjectUngroup: faObjectUngroup,\n faPaperPlane: faPaperPlane,\n faPauseCircle: faPauseCircle,\n faPlayCircle: faPlayCircle,\n faPlusSquare: faPlusSquare,\n faQuestionCircle: faQuestionCircle,\n faRegistered: faRegistered,\n faSadCry: faSadCry,\n faSadTear: faSadTear,\n faSave: faSave,\n faShareSquare: faShareSquare,\n faSmile: faSmile,\n faSmileBeam: faSmileBeam,\n faSmileWink: faSmileWink,\n faSnowflake: faSnowflake,\n faSquare: faSquare,\n faStar: faStar,\n faStarHalf: faStarHalf,\n faStickyNote: faStickyNote,\n faStopCircle: faStopCircle,\n faSun: faSun,\n faSurprise: faSurprise,\n faThumbsDown: faThumbsDown,\n faThumbsUp: faThumbsUp,\n faTimesCircle: faTimesCircle,\n faTired: faTired,\n faTrashAlt: faTrashAlt,\n faUser: faUser,\n faUserCircle: faUserCircle,\n faWindowClose: faWindowClose,\n faWindowMaximize: faWindowMaximize,\n faWindowMinimize: faWindowMinimize,\n faWindowRestore: faWindowRestore\n};\n\nexport { _iconsCache as far, prefix, faAddressBook, faAddressCard, faAngry, faArrowAltCircleDown, faArrowAltCircleLeft, faArrowAltCircleRight, faArrowAltCircleUp, faBell, faBellSlash, faBookmark, faBuilding, faCalendar, faCalendarAlt, faCalendarCheck, faCalendarMinus, faCalendarPlus, faCalendarTimes, faCaretSquareDown, faCaretSquareLeft, faCaretSquareRight, faCaretSquareUp, faChartBar, faCheckCircle, faCheckSquare, faCircle, faClipboard, faClock, faClone, faClosedCaptioning, faComment, faCommentAlt, faCommentDots, faComments, faCompass, faCopy, faCopyright, faCreditCard, faDizzy, faDotCircle, faEdit, faEnvelope, faEnvelopeOpen, faEye, faEyeSlash, faFile, faFileAlt, faFileArchive, faFileAudio, faFileCode, faFileExcel, faFileImage, faFilePdf, faFilePowerpoint, faFileVideo, faFileWord, faFlag, faFlushed, faFolder, faFolderOpen, faFontAwesomeLogoFull, faFrown, faFrownOpen, faFutbol, faGem, faGrimace, faGrin, faGrinAlt, faGrinBeam, faGrinBeamSweat, faGrinHearts, faGrinSquint, faGrinSquintTears, faGrinStars, faGrinTears, faGrinTongue, faGrinTongueSquint, faGrinTongueWink, faGrinWink, faHandLizard, faHandPaper, faHandPeace, faHandPointDown, faHandPointLeft, faHandPointRight, faHandPointUp, faHandPointer, faHandRock, faHandScissors, faHandSpock, faHandshake, faHdd, faHeart, faHospital, faHourglass, faIdBadge, faIdCard, faImage, faImages, faKeyboard, faKiss, faKissBeam, faKissWinkHeart, faLaugh, faLaughBeam, faLaughSquint, faLaughWink, faLemon, faLifeRing, faLightbulb, faListAlt, faMap, faMeh, faMehBlank, faMehRollingEyes, faMinusSquare, faMoneyBillAlt, faMoon, faNewspaper, faObjectGroup, faObjectUngroup, faPaperPlane, faPauseCircle, faPlayCircle, faPlusSquare, faQuestionCircle, faRegistered, faSadCry, faSadTear, faSave, faShareSquare, faSmile, faSmileBeam, faSmileWink, faSnowflake, faSquare, faStar, faStarHalf, faStickyNote, faStopCircle, faSun, faSurprise, faThumbsDown, faThumbsUp, faTimesCircle, faTired, faTrashAlt, faUser, faUserCircle, faWindowClose, faWindowMaximize, faWindowMinimize, faWindowRestore };\n","import React, {Component} from 'react'; // eslint-disable-line no-unused-vars\nimport PropTypes from 'prop-types';\nimport {FontAwesomeIcon} from '@fortawesome/react-fontawesome';\nimport {faCopy, faCheckCircle} from '@fortawesome/free-regular-svg-icons';\n\nconst clipboardAPI = navigator.clipboard;\n\nfunction wait(ms) {\n return new Promise(r => setTimeout(r, ms));\n}\n\n/**\n * The Clipboard component copies text to the clipboard\n */\n\nexport default class Clipboard extends React.Component {\n constructor(props) {\n super(props);\n this.copyToClipboard = this.copyToClipboard.bind(this);\n this.copySuccess = this.copySuccess.bind(this);\n this.getTargetText = this.getTargetText.bind(this);\n this.loading = this.loading.bind(this);\n this.stringifyId = this.stringifyId.bind(this);\n this.state = {\n copied: false,\n };\n }\n\n // stringifies object ids used in pattern matching callbacks\n stringifyId(id) {\n if (typeof id !== 'object') {\n return id;\n }\n const stringifyVal = v => (v && v.wild) || JSON.stringify(v);\n const parts = Object.keys(id)\n .sort()\n .map(k => JSON.stringify(k) + ':' + stringifyVal(id[k]));\n return '{' + parts.join(',') + '}';\n }\n\n async copySuccess(content) {\n const showCopiedIcon = 1000;\n await clipboardAPI.writeText(content);\n this.setState({copied: true});\n await wait(showCopiedIcon);\n this.setState({copied: false});\n }\n\n getTargetText() {\n // get the inner text. If none, use the content of the value param\n const id = this.stringifyId(this.props.target_id);\n const target = document.getElementById(id);\n if (!target) {\n throw new Error(\n 'Clipboard copy failed: no element found for target_id ' +\n this.props.target_id\n );\n }\n let content = target.innerText;\n if (!content) {\n content = target.value;\n content = content === undefined ? null : content;\n }\n return content;\n }\n\n async loading() {\n while (this.props.loading_state?.is_loading) {\n await wait(100);\n }\n }\n\n async copyToClipboard() {\n this.props.setProps({\n n_clicks: this.props.n_clicks + 1,\n });\n\n let content;\n if (this.props.target_id) {\n content = this.getTargetText();\n } else {\n await wait(100); // gives time for callback to start\n await this.loading();\n content = this.props.content;\n }\n if (content) {\n this.copySuccess(content);\n }\n }\n\n componentDidMount() {\n if (!clipboardAPI) {\n console.warn('Copy to clipboard not available with this browser'); // eslint-disable-line no-console\n }\n }\n\n render() {\n const {id, title, className, style, loading_state} = this.props;\n const copyIcon = ;\n const copiedIcon = ;\n const btnIcon = this.state.copied ? copiedIcon : copyIcon;\n\n return clipboardAPI ? (\n \n {btnIcon}\n \n ) : null;\n }\n}\n\nClipboard.defaultProps = {\n content: null,\n target_id: null,\n n_clicks: 0,\n};\n\nClipboard.propTypes = {\n /**\n * The ID used to identify this component.\n */\n id: PropTypes.string,\n\n /**\n * The id of target component containing text to copy to the clipboard.\n * The inner text of the `children` prop will be copied to the clipboard. If none, then the text from the\n * `value` prop will be copied.\n */\n target_id: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * The text to be copied to the clipboard if the `target_id` is None.\n */\n content: PropTypes.string,\n\n /**\n * The number of times copy button was clicked\n */\n n_clicks: PropTypes.number,\n\n /**\n * The text shown as a tooltip when hovering over the copy icon.\n */\n title: PropTypes.string,\n\n /**\n * The icon's styles\n */\n style: PropTypes.object,\n\n /**\n * The class name of the icon element\n */\n className: PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n};\n","import PropTypes from 'prop-types';\nimport {Component} from 'react';\n\n/**\n * ConfirmDialog is used to display the browser's native \"confirm\" modal,\n * with an optional message and two buttons (\"OK\" and \"Cancel\").\n * This ConfirmDialog can be used in conjunction with buttons when the user\n * is performing an action that should require an extra step of verification.\n */\nexport default class ConfirmDialog extends Component {\n componentDidUpdate(prevProps) {\n this._update(!prevProps.displayed && this.props.displayed);\n }\n\n componentDidMount() {\n this._update(this.props.displayed);\n }\n\n _update(shouldTriggerDisplay) {\n const {message, setProps, cancel_n_clicks, submit_n_clicks} =\n this.props;\n\n if (shouldTriggerDisplay) {\n new Promise(resolve => resolve(window.confirm(message))).then(\n result => {\n if (result) {\n setProps({\n submit_n_clicks: submit_n_clicks + 1,\n submit_n_clicks_timestamp: Date.now(),\n displayed: false,\n });\n } else {\n setProps({\n cancel_n_clicks: cancel_n_clicks + 1,\n cancel_n_clicks_timestamp: Date.now(),\n displayed: false,\n });\n }\n }\n );\n }\n }\n\n render() {\n return null;\n }\n}\n\nConfirmDialog.defaultProps = {\n submit_n_clicks: 0,\n submit_n_clicks_timestamp: -1,\n cancel_n_clicks: 0,\n cancel_n_clicks_timestamp: -1,\n};\n\nConfirmDialog.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Message to show in the popup.\n */\n message: PropTypes.string,\n /**\n * Number of times the submit button was clicked\n */\n submit_n_clicks: PropTypes.number,\n /**\n * Last time the submit button was clicked.\n */\n submit_n_clicks_timestamp: PropTypes.number,\n /**\n * Number of times the popup was canceled.\n */\n cancel_n_clicks: PropTypes.number,\n /**\n * Last time the cancel button was clicked.\n */\n cancel_n_clicks_timestamp: PropTypes.number,\n /**\n * Set to true to send the ConfirmDialog.\n */\n displayed: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n};\n","import {clone} from 'ramda';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ConfirmDialog from './ConfirmDialog.react';\n\n/**\n * A wrapper component that will display a confirmation dialog\n * when its child component has been clicked on.\n *\n * For example:\n * ```\n * dcc.ConfirmDialogProvider(\n * html.Button('click me', id='btn'),\n * message='Danger - Are you sure you want to continue.'\n * id='confirm')\n * ```\n */\nexport default class ConfirmDialogProvider extends React.Component {\n render() {\n const {displayed, id, setProps, children, loading_state} = this.props;\n\n // Will lose the previous onClick of the child\n const wrapClick = child => {\n const props = clone(child.props);\n props._dashprivate_layout.props.onClick = () => {\n setProps({displayed: true});\n };\n\n return React.cloneElement(child, props);\n };\n\n return (\n \n {Array.isArray(children)\n ? children.map(wrapClick)\n : wrapClick(children)}\n \n \n );\n }\n}\n\nConfirmDialogProvider.defaultProps = {\n submit_n_clicks: 0,\n submit_n_clicks_timestamp: -1,\n cancel_n_clicks: 0,\n cancel_n_clicks_timestamp: -1,\n};\n\nConfirmDialogProvider.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Message to show in the popup.\n */\n message: PropTypes.string,\n /**\n * Number of times the submit was clicked\n */\n submit_n_clicks: PropTypes.number,\n /**\n * Last time the submit button was clicked.\n */\n submit_n_clicks_timestamp: PropTypes.number,\n /**\n * Number of times the popup was canceled.\n */\n cancel_n_clicks: PropTypes.number,\n /**\n * Last time the cancel button was clicked.\n */\n cancel_n_clicks_timestamp: PropTypes.number,\n /**\n * Is the modal currently displayed.\n */\n displayed: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n /**\n * The children to hijack clicks from and display the popup.\n */\n children: PropTypes.any,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n","import PropTypes from 'prop-types';\nimport {Component} from 'react';\nimport {toByteArray} from 'base64-js';\nimport {saveAs} from 'file-saver';\n\nconst getValue = (src, fallback, key) =>\n key in src ? src[key] : fallback[key];\n\n/**\n * The Download component opens a download dialog when the data property changes.\n */\nexport default class Download extends Component {\n componentDidUpdate(prevProps) {\n const {data} = this.props;\n // If the data hasn't changed, do nothing.\n if (!data || data === prevProps.data) {\n return;\n }\n // Extract options from data if provided, fallback to props.\n const type = getValue(data, this.props, 'type');\n const base64 = getValue(data, this.props, 'base64');\n // Invoke the download using a Blob.\n const content = base64 ? toByteArray(data.content) : data.content;\n const blob = new Blob([content], {type: type});\n saveAs(blob, data.filename);\n }\n\n render() {\n return null;\n }\n}\n\nDownload.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n */\n id: PropTypes.string,\n\n /**\n * On change, a download is invoked.\n */\n data: PropTypes.exact({\n /**\n * Suggested filename in the download dialogue.\n */\n filename: PropTypes.string.isRequired,\n /**\n * File content.\n */\n content: PropTypes.string.isRequired,\n /**\n * Set to true, when data is base64 encoded.\n */\n base64: PropTypes.bool,\n /**\n * Blob type, usually a MIME-type.\n */\n type: PropTypes.string,\n }),\n\n /**\n * Default value for base64, used when not set as part of the data property.\n */\n base64: PropTypes.bool,\n\n /**\n * Default value for type, used when not set as part of the data property.\n */\n type: PropTypes.string,\n\n /**\n * Dash-supplied function for updating props.\n */\n setProps: PropTypes.func,\n};\n\nDownload.defaultProps = {\n type: 'text/plain',\n base64: false,\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./input.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./input.css\";\n export default content && content.locals ? content.locals : undefined;\n","import {isNil, omit} from 'ramda';\nimport React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport isNumeric from 'fast-isnumeric';\nimport './css/input.css';\n\n// eslint-disable-next-line no-implicit-coercion\nconst convert = val => (isNumeric(val) ? +val : NaN);\n\nconst isEquivalent = (v1, v2) => v1 === v2 || (isNaN(v1) && isNaN(v2));\n\n/**\n * A basic HTML input control for entering text, numbers, or passwords.\n *\n * Note that checkbox and radio types are supported through\n * the Checklist and RadioItems component. Dates, times, and file uploads\n * are also supported through separate components.\n */\nexport default class Input extends PureComponent {\n constructor(props) {\n super(props);\n\n this.input = React.createRef();\n\n this.onBlur = this.onBlur.bind(this);\n this.onChange = this.onChange.bind(this);\n this.onEvent = this.onEvent.bind(this);\n this.onKeyPress = this.onKeyPress.bind(this);\n this.setInputValue = this.setInputValue.bind(this);\n this.setPropValue = this.setPropValue.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const {value} = this.input.current;\n const valueAsNumber = convert(value);\n this.setInputValue(\n isNil(valueAsNumber) ? value : valueAsNumber,\n nextProps.value\n );\n if (this.props.type !== 'number') {\n this.setState({value: nextProps.value});\n }\n }\n\n componentDidMount() {\n const {value} = this.input.current;\n const valueAsNumber = convert(value);\n this.setInputValue(\n isNil(valueAsNumber) ? value : valueAsNumber,\n this.props.value\n );\n }\n\n UNSAFE_componentWillMount() {\n if (this.props.type !== 'number') {\n this.setState({value: this.props.value});\n }\n }\n\n render() {\n const valprops =\n this.props.type === 'number' ? {} : {value: this.state.value};\n const {loading_state} = this.props;\n return (\n \n );\n }\n\n setInputValue(base, value) {\n const __value = value;\n base = this.input.current.checkValidity() ? convert(base) : NaN;\n value = convert(value);\n\n if (!isEquivalent(base, value)) {\n this.input.current.value = isNumeric(value) ? value : __value;\n }\n }\n\n setPropValue(base, value) {\n base = convert(base);\n value = this.input.current.checkValidity() ? convert(value) : NaN;\n\n if (!isEquivalent(base, value)) {\n this.props.setProps({value});\n }\n }\n\n onEvent() {\n const {value} = this.input.current;\n const valueAsNumber = convert(value);\n if (this.props.type === 'number') {\n this.setPropValue(\n this.props.value,\n isNil(valueAsNumber) ? value : valueAsNumber\n );\n } else {\n this.props.setProps({value});\n }\n }\n\n onBlur() {\n this.props.setProps({\n n_blur: this.props.n_blur + 1,\n n_blur_timestamp: Date.now(),\n });\n this.input.current.checkValidity();\n return this.props.debounce && this.onEvent();\n }\n\n onKeyPress(e) {\n if (e.key === 'Enter') {\n this.props.setProps({\n n_submit: this.props.n_submit + 1,\n n_submit_timestamp: Date.now(),\n });\n this.input.current.checkValidity();\n }\n return this.props.debounce && e.key === 'Enter' && this.onEvent();\n }\n\n onChange() {\n if (!this.props.debounce) {\n this.onEvent();\n } else if (this.props.type !== 'number') {\n this.setState({value: this.input.current.value});\n }\n }\n}\n\nInput.defaultProps = {\n type: 'text',\n n_blur: 0,\n n_blur_timestamp: -1,\n n_submit: 0,\n n_submit_timestamp: -1,\n debounce: false,\n step: 'any',\n persisted_props: ['value'],\n persistence_type: 'local',\n};\n\nInput.propTypes = {\n /**\n * The value of the input\n */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The type of control to render.\n */\n type: PropTypes.oneOf([\n // Only allowing the input types with wide browser compatibility\n 'text',\n 'number',\n 'password',\n 'email',\n 'range',\n 'search',\n 'tel',\n 'url',\n 'hidden',\n ]),\n\n /**\n * If true, changes to input will be sent back to the Dash server only on enter or when losing focus.\n * If it's false, it will sent the value back on every change.\n */\n debounce: PropTypes.bool,\n\n /**\n * A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. Note: Do not use the placeholder attribute instead of a
\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nGraphSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default GraphSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * Spinner created by Tobias Ahlin, https://github.com/tobiasahlin/SpinKit\n */\nconst DefaultSpinner = ({\n status,\n color,\n fullscreen,\n debug,\n className,\n style,\n}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nDefaultSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default DefaultSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport changeColor from 'color';\n\nconst CubeSpinner = ({status, color, fullscreen, debug, className, style}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n /* eslint-disable no-magic-numbers */\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nCubeSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default CubeSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * Spinner created by Tobias Ahlin, https://github.com/tobiasahlin/SpinKit\n */\nconst CircleSpinner = ({\n status,\n color,\n fullscreen,\n debug,\n className,\n style,\n}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nCircleSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default CircleSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * Spinner created by Tobias Ahlin, https://github.com/tobiasahlin/SpinKit\n */\nconst DotSpinner = ({status, color, fullscreen, debug, className, style}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nDotSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default DotSpinner;\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport GraphSpinner from '../fragments/Loading/spinners/GraphSpinner.jsx';\nimport DefaultSpinner from '../fragments/Loading/spinners/DefaultSpinner.jsx';\nimport CubeSpinner from '../fragments/Loading/spinners/CubeSpinner.jsx';\nimport CircleSpinner from '../fragments/Loading/spinners/CircleSpinner.jsx';\nimport DotSpinner from '../fragments/Loading/spinners/DotSpinner.jsx';\nimport {mergeRight} from 'ramda';\n\nfunction getSpinner(spinnerType) {\n switch (spinnerType) {\n case 'graph':\n return GraphSpinner;\n case 'cube':\n return CubeSpinner;\n case 'circle':\n return CircleSpinner;\n case 'dot':\n return DotSpinner;\n default:\n return DefaultSpinner;\n }\n}\n\nconst hiddenContainer = {visibility: 'hidden', position: 'relative'};\n\nconst coveringSpinner = {\n visibility: 'visible',\n position: 'absolute',\n top: '0',\n height: '100%',\n width: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n};\n\n/**\n * A Loading component that wraps any other component and displays a spinner until the wrapped component has rendered.\n */\nexport default class Loading extends Component {\n render() {\n const {\n loading_state,\n color,\n className,\n style,\n parent_className,\n parent_style,\n fullscreen,\n debug,\n type: spinnerType,\n } = this.props;\n\n const isLoading = loading_state && loading_state.is_loading;\n const Spinner = isLoading && getSpinner(spinnerType);\n\n return (\n \n {this.props.children}\n
\n {isLoading && (\n \n )}\n
\n
\n );\n }\n}\n\nLoading._dashprivate_isLoadingComponent = true;\n\nLoading.defaultProps = {\n type: 'default',\n color: '#119DFF',\n};\n\nLoading.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Array that holds components to render\n */\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n\n /**\n * Property that determines which spinner to show\n * one of 'graph', 'cube', 'circle', 'dot', or 'default'.\n */\n type: PropTypes.oneOf(['graph', 'cube', 'circle', 'dot', 'default']),\n\n /**\n * Boolean that makes the spinner display full-screen\n */\n fullscreen: PropTypes.bool,\n\n /**\n * If true, the spinner will display the component_name and prop_name\n * while loading\n */\n debug: PropTypes.bool,\n\n /**\n * Additional CSS class for the spinner root DOM node\n */\n className: PropTypes.string,\n\n /**\n * Additional CSS class for the outermost dcc.Loading parent div DOM node\n */\n parent_className: PropTypes.string,\n\n /**\n * Additional CSS styling for the spinner root DOM node\n */\n style: PropTypes.object,\n\n /**\n * Additional CSS styling for the outermost dcc.Loading parent div DOM node\n */\n parent_style: PropTypes.object,\n\n /**\n * Primary colour used for the loading spinners\n */\n color: PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n","import {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {type} from 'ramda';\n\nimport {History} from '@plotly/dash-component-plugins';\n\n/**\n * Update and track the current window.location object through the window.history state.\n * Use in conjunction with the `dash_core_components.Link` component to make apps with multiple pages.\n */\nexport default class Location extends Component {\n constructor(props) {\n super(props);\n this.updateLocation = this.updateLocation.bind(this);\n this.onLocationChange = this.onLocationChange.bind(this);\n }\n\n updateLocation(props) {\n const {hash, href, pathname, refresh, search, setProps} = props;\n\n // Keep track of props relating to window.location that may need to be updated via setProps\n const propsToSet = {};\n\n /**\n * Check if the field exists in props. If the prop with \"fieldName\" is not defined,\n * then it was not set by the user and needs to be equal to the value in window.location.\n * This only happens on page load (since props will no longer be undefined after componentDidMount).\n *\n * @param {string} fieldName\n * The name of the prop in window.location and in the component's prop\n *\n * @returns {boolean}\n * Returns true if the prop with fieldName is different and the window state needs to be updated\n */\n const checkExistsUpdateWindowLocation = fieldName => {\n const propVal = props[fieldName];\n\n if (\n (type(propVal) === 'Undefined' || propVal === null) &&\n type(window.location[fieldName]) !== 'Undefined'\n ) {\n // propVal is undefined or null, but window.location has this fieldName defined\n propsToSet[fieldName] = window.location[fieldName];\n } else if (propVal !== window.location[fieldName]) {\n // Prop has changed?\n if (refresh) {\n // Refresh the page?\n window.location[fieldName] = propVal;\n } else if (this.props[fieldName] !== propVal) {\n // If this prop has changed, need to setProps\n propsToSet[fieldName] = propVal;\n // This (`${fieldName}`: propVal) needs to be pushed in the window.history\n return true;\n }\n }\n // This (`${fieldName}`: propVal) DOES NOT need to be pushed in the window.history\n return false;\n };\n\n // Check if the prop value needs to be updated (note that this mutates propsToSet)\n const pathnameUpdated = checkExistsUpdateWindowLocation('pathname');\n const hrefUpdated = checkExistsUpdateWindowLocation('href');\n const hashUpdated = checkExistsUpdateWindowLocation('hash');\n const searchUpdated = checkExistsUpdateWindowLocation('search');\n\n // propsToSet has been updated -- batch update to Dash\n if (Object.keys(propsToSet).length > 0) {\n setProps(propsToSet);\n }\n\n // Special case -- overrides everything!\n if (hrefUpdated) {\n window.history.pushState({}, '', href);\n } else if (pathnameUpdated || hashUpdated || searchUpdated) {\n // Otherwise, we can mash everything together\n const searchVal = type(search) !== 'Undefined' ? search : '';\n const hashVal = type(hash) !== 'Undefined' ? hash : '';\n window.history.pushState(\n {},\n '',\n `${pathname}${searchVal}${hashVal}`\n );\n }\n }\n\n onLocationChange() {\n const {setProps} = this.props;\n const propsToChange = {};\n\n if (this.props.pathname !== window.location.pathname) {\n propsToChange.pathname = window.location.pathname;\n }\n if (this.props.href !== window.location.href) {\n propsToChange.href = window.location.href;\n }\n if (this.props.hash !== window.location.hash) {\n propsToChange.hash = window.location.hash;\n }\n if (this.props.search !== window.location.search) {\n propsToChange.search = window.location.search;\n }\n\n setProps(propsToChange);\n\n History.dispatchChangeEvent();\n }\n\n componentDidMount() {\n window.onpopstate = this.onLocationChange;\n\n window.addEventListener(\n '_dashprivate_pushstate',\n this.onLocationChange\n );\n this.updateLocation(this.props);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.updateLocation(nextProps);\n }\n\n render() {\n return null;\n }\n}\n\nLocation.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string.isRequired,\n\n /** pathname in window.location - e.g., \"/my/full/pathname\" */\n pathname: PropTypes.string,\n /** search in window.location - e.g., \"?myargument=1\" */\n search: PropTypes.string,\n /** hash in window.location - e.g., \"#myhash\" */\n hash: PropTypes.string,\n /** href in window.location - e.g., \"/my/full/pathname?myargument=1#myhash\" */\n href: PropTypes.string,\n\n /** Refresh the page when the location is updated? */\n refresh: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n};\n\nLocation.defaultProps = {\n refresh: true,\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./logout.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./logout.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport './css/logout.css';\n\n/**\n * Logout button to submit a form post request to the `logout_url` prop.\n * Usage is intended for dash-deployment-server authentication.\n *\n * DDS usage:\n *\n * `dcc.LogoutButton(logout_url=os.getenv('DASH_LOGOUT_URL'))`\n *\n * Custom usage:\n *\n * - Implement a login mechanism.\n * - Create a flask route with a post method handler.\n * `@app.server.route('/logout', methods=['POST'])`\n * - The logout route should perform what's necessary for the user to logout.\n * - If you store the session in a cookie, clear the cookie:\n * `rep = flask.Response(); rep.set_cookie('session', '', expires=0)`\n *\n * - Create a logout button component and assign it the logout_url\n * `dcc.LogoutButton(logout_url='/logout')`\n *\n * See https://dash.plotly.com/dash-core-components/logout_button\n * for more documentation and examples.\n */\nexport default class LogoutButton extends React.Component {\n render() {\n const {id, logout_url, label, className, style, method, loading_state} =\n this.props;\n\n let url, submitMethod;\n if (!logout_url) {\n url =\n logout_url ||\n 'https://dash.plotly.com/dash-core-components/logout_button';\n submitMethod = 'get';\n } else {\n url = logout_url;\n submitMethod = method;\n }\n\n return (\n \n \n {label}\n \n \n );\n }\n}\n\nLogoutButton.defaultProps = {\n label: 'Logout',\n method: 'post',\n};\n\nLogoutButton.propTypes = {\n /**\n * Id of the button.\n */\n id: PropTypes.string,\n\n /**\n * Text of the button\n */\n label: PropTypes.string,\n /**\n * Url to submit a post logout request.\n */\n logout_url: PropTypes.string,\n /**\n * Style of the button\n */\n style: PropTypes.object,\n /**\n * Http method to submit the logout form.\n */\n method: PropTypes.string,\n /**\n * CSS class for the button.\n */\n className: PropTypes.string,\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-select@1.0.0-rc.3.min.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-select@1.0.0-rc.3.min.css\";\n export default content && content.locals ? content.locals : undefined;\n","import PropTypes from 'prop-types';\nimport React, {Component} from 'react';\nimport './css/react-select@1.0.0-rc.3.min.css';\nimport {sanitizeOptions} from '../utils/optionTypes';\n\n/**\n * RadioItems is a component that encapsulates several radio item inputs.\n * The values and labels of the RadioItems is specified in the `options`\n * property and the seleced item is specified with the `value` property.\n * Each radio item is rendered as an input with a surrounding label.\n */\n\nexport default class RadioItems extends Component {\n render() {\n const {\n id,\n className,\n style,\n inputClassName,\n inputStyle,\n labelClassName,\n labelStyle,\n options,\n setProps,\n loading_state,\n value,\n inline,\n } = this.props;\n\n let ids = {};\n if (id) {\n ids = {id, key: id};\n }\n return (\n \n {sanitizeOptions(options).map(option => (\n \n {\n setProps({value: option.value});\n }}\n />\n {option.label}\n \n ))}\n
\n );\n }\n}\n\nRadioItems.propTypes = {\n /**\n * An array of options, or inline dictionary of options\n */\n options: PropTypes.oneOfType([\n /**\n * Array of options where the label and the value are the same thing - [string|number|bool]\n */\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ])\n ),\n /**\n * Simpler `options` representation in dictionary format. The order is not guaranteed.\n * {`value1`: `label1`, `value2`: `label2`, ... }\n * which is equal to\n * [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]\n */\n PropTypes.object,\n /**\n * An array of options {label: [string|number], value: [string|number]},\n * an optional disabled field can be used for each option\n */\n PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The option's label\n */\n label: PropTypes.node.isRequired,\n\n /**\n * The value of the option. This value\n * corresponds to the items specified in the\n * `value` property.\n */\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ]).isRequired,\n\n /**\n * If true, this option is disabled and cannot be selected.\n */\n disabled: PropTypes.bool,\n\n /**\n * The HTML 'title' attribute for the option. Allows for\n * information on hover. For more information on this attribute,\n * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title\n */\n title: PropTypes.string,\n })\n ),\n ]),\n\n /**\n * The currently selected value\n */\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ]),\n\n /**\n * Indicates whether labelStyle should be inline or not\n * True: Automatically set { 'display': 'inline-block' } to labelStyle\n * False: No additional styles are passed into labelStyle.\n */\n inline: PropTypes.bool,\n\n /**\n * The style of the container (div)\n */\n style: PropTypes.object,\n\n /**\n * The class of the container (div)\n */\n className: PropTypes.string,\n\n /**\n * The style of the radio element\n */\n inputStyle: PropTypes.object,\n\n /**\n * The class of the radio element\n */\n inputClassName: PropTypes.string,\n\n /**\n * The style of the
\n );\n};\n\nEnhancedTab.defaultProps = {\n loading_state: {\n is_loading: false,\n component_name: '',\n prop_name: '',\n },\n};\n\n/**\n * A Dash component that lets you render pages with tabs - the Tabs component's children\n * can be dcc.Tab components, which can hold a label that will be displayed as a tab, and can in turn hold\n * children components that will be that tab's content.\n */\nexport default class Tabs extends Component {\n constructor(props) {\n super(props);\n\n this.selectHandler = this.selectHandler.bind(this);\n this.parseChildrenToArray = this.parseChildrenToArray.bind(this);\n this.valueOrDefault = this.valueOrDefault.bind(this);\n\n if (!has('value', this.props)) {\n this.props.setProps({\n value: this.valueOrDefault(),\n });\n }\n }\n\n valueOrDefault() {\n if (has('value', this.props)) {\n return this.props.value;\n }\n const children = this.parseChildrenToArray();\n if (children && children[0].props.children) {\n return children[0].props.children.props.value || 'tab-1';\n }\n return 'tab-1';\n }\n\n parseChildrenToArray() {\n if (this.props.children && !is(Array, this.props.children)) {\n // if dcc.Tabs.children contains just one single element, it gets passed as an object\n // instead of an array - so we put in in a array ourselves!\n return [this.props.children];\n }\n return this.props.children;\n }\n\n selectHandler(value) {\n this.props.setProps({value: value});\n }\n\n render() {\n let EnhancedTabs;\n let selectedTab;\n\n if (this.props.children) {\n const children = this.parseChildrenToArray();\n\n const amountOfTabs = children.length;\n\n EnhancedTabs = children.map((child, index) => {\n // TODO: handle components that are not dcc.Tab components (throw error)\n // enhance Tab components coming from Dash (as dcc.Tab) with methods needed for handling logic\n let childProps;\n\n if (\n // disabled is a defaultProp (so it's always set)\n // meaning that if it's not set on child.props, the actual\n // props we want are lying a bit deeper - which means they\n // are coming from Dash\n isNil(child.props.disabled) &&\n child.props._dashprivate_layout &&\n child.props._dashprivate_layout.props\n ) {\n // props are coming from Dash\n childProps = child.props._dashprivate_layout.props;\n } else {\n // else props are coming from React (Demo.react.js, or Tabs.test.js)\n childProps = child.props;\n }\n\n if (!childProps.value) {\n childProps = {...childProps, value: `tab-${index + 1}`};\n }\n\n // check if this child/Tab is currently selected\n if (childProps.value === this.valueOrDefault()) {\n selectedTab = child;\n }\n\n return (\n \n );\n });\n }\n\n const selectedTabContent = !isNil(selectedTab) ? selectedTab : '';\n\n const tabContainerClass = this.props.vertical\n ? 'tab-container tab-container--vert'\n : 'tab-container';\n\n const tabContentClass = this.props.vertical\n ? 'tab-content tab-content--vert'\n : 'tab-content';\n\n const tabParentClass = this.props.vertical\n ? 'tab-parent tab-parent--vert'\n : 'tab-parent';\n\n return (\n \n \n {EnhancedTabs}\n
\n \n {selectedTabContent || ''}\n
\n \n
\n );\n }\n}\n\nTabs.defaultProps = {\n mobile_breakpoint: 800,\n colors: {\n border: '#d6d6d6',\n primary: '#1975FA',\n background: '#f9f9f9',\n },\n vertical: false,\n persisted_props: ['value'],\n persistence_type: 'local',\n};\n\nTabs.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The value of the currently selected Tab\n */\n value: PropTypes.string,\n\n /**\n * Appends a class to the Tabs container holding the individual Tab components.\n */\n className: PropTypes.string,\n\n /**\n * Appends a class to the Tab content container holding the children of the Tab that is selected.\n */\n content_className: PropTypes.string,\n\n /**\n * Appends a class to the top-level parent container holding both the Tabs container and the content container.\n */\n parent_className: PropTypes.string,\n\n /**\n * Appends (inline) styles to the Tabs container holding the individual Tab components.\n */\n style: PropTypes.object,\n\n /**\n * Appends (inline) styles to the top-level parent container holding both the Tabs container and the content container.\n */\n parent_style: PropTypes.object,\n\n /**\n * Appends (inline) styles to the tab content container holding the children of the Tab that is selected.\n */\n content_style: PropTypes.object,\n\n /**\n * Renders the tabs vertically (on the side)\n */\n vertical: PropTypes.bool,\n\n /**\n * Breakpoint at which tabs are rendered full width (can be 0 if you don't want full width tabs on mobile)\n */\n mobile_breakpoint: PropTypes.number,\n\n /**\n * Array that holds Tab components\n */\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n\n /**\n * Holds the colors used by the Tabs and Tab components. If you set these, you should specify colors for all properties, so:\n * colors: {\n * border: '#d6d6d6',\n * primary: '#1975FA',\n * background: '#f9f9f9'\n * }\n */\n colors: PropTypes.exact({\n border: PropTypes.string,\n primary: PropTypes.string,\n background: PropTypes.string,\n }),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `value` that the user has\n * changed while using the app will keep that change, as long as\n * the new `value` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `value` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * A basic HTML textarea for entering multiline text.\n *\n */\nexport default class Textarea extends Component {\n render() {\n const {setProps, loading_state, value} = this.props;\n\n return (\n {\n setProps({value: e.target.value});\n }}\n onBlur={() => {\n setProps({\n n_blur: this.props.n_blur + 1,\n n_blur_timestamp: Date.now(),\n });\n }}\n onClick={() => {\n setProps({\n n_clicks: this.props.n_clicks + 1,\n n_clicks_timestamp: Date.now(),\n });\n }}\n {...omit(['setProps', 'value'], this.props)}\n />\n );\n }\n}\n\nTextarea.defaultProps = {\n n_blur: 0,\n n_blur_timestamp: -1,\n n_clicks: 0,\n n_clicks_timestamp: -1,\n persisted_props: ['value'],\n persistence_type: 'local',\n};\n\nTextarea.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The value of the textarea\n */\n value: PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n autoFocus: PropTypes.string,\n\n /**\n * Defines the number of columns in a textarea.\n */\n cols: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n disabled: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n form: PropTypes.string,\n\n /**\n * Defines the maximum number of characters allowed in the element.\n */\n maxLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Defines the minimum number of characters allowed in the element.\n */\n minLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n name: PropTypes.string,\n\n /**\n * Provides a hint to the user of what can be entered in the field.\n */\n placeholder: PropTypes.string,\n\n /**\n * Indicates whether the element can be edited.\n * readOnly is an HTML boolean attribute - it is enabled by a boolean or\n * 'readOnly'. Alternative capitalizations `readonly` & `READONLY`\n * are also acccepted.\n */\n readOnly: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.oneOf(['readOnly', 'readonly', 'READONLY']),\n ]),\n\n /**\n * Indicates whether this element is required to fill out or not.\n * required is an HTML boolean attribute - it is enabled by a boolean or\n * 'required'. Alternative capitalizations `REQUIRED`\n * are also acccepted.\n */\n required: PropTypes.oneOfType([\n PropTypes.oneOf(['required', 'REQUIRED']),\n PropTypes.bool,\n ]),\n\n /**\n * Defines the number of rows in a text area.\n */\n rows: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Indicates whether the text should be wrapped.\n */\n wrap: PropTypes.string,\n\n /**\n * Defines a keyboard shortcut to activate or add focus to the element.\n */\n accessKey: PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n className: PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n contentEditable: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n contextMenu: PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n dir: PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n draggable: PropTypes.oneOfType([\n // enumerated property, not a boolean property: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable\n PropTypes.oneOf(['true', 'false']),\n PropTypes.bool,\n ]),\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n hidden: PropTypes.string,\n\n /**\n * Defines the language used in the element.\n */\n lang: PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n spellCheck: PropTypes.oneOfType([\n // enumerated property, not a boolean property: https://www.w3.org/TR/html51/editing.html#spelling-and-grammar-checking\n PropTypes.oneOf(['true', 'false']),\n PropTypes.bool,\n ]),\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n style: PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n title: PropTypes.string,\n\n /**\n * Number of times the textarea lost focus.\n */\n n_blur: PropTypes.number,\n /**\n * Last time the textarea lost focus.\n */\n n_blur_timestamp: PropTypes.number,\n\n /**\n * Number of times the textarea has been clicked.\n */\n n_clicks: PropTypes.number,\n /**\n * Last time the textarea was clicked.\n */\n n_clicks_timestamp: PropTypes.number,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `value` that the user has\n * changed while using the app will keep that change, as long as\n * the new `value` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `value` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport _JSXStyle from 'styled-jsx/style'; // eslint-disable-line no-unused-vars\n\n/**\n * A tooltip with an absolute position.\n */\nconst Tooltip = props => {\n const {bbox, border_color, background_color, id, loading_state} = props;\n const is_loading = loading_state?.is_loading;\n const show = props.show && bbox;\n\n return (\n <>\n
\n \n \n {is_loading ? (\n {props.loading_text}\n ) : (\n props.children\n )}\n \n \n
\n \n \n );\n};\n\nTooltip.defaultProps = {\n show: true,\n targetable: false,\n direction: 'right',\n border_color: '#d6d6d6',\n background_color: 'white',\n className: '',\n zindex: 1,\n loading_text: 'Loading...',\n};\n\nTooltip.propTypes = {\n /**\n * The contents of the tooltip\n */\n children: PropTypes.node,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The class of the tooltip\n */\n className: PropTypes.string,\n\n /**\n * The style of the tooltip\n */\n style: PropTypes.object,\n\n /**\n * The bounding box coordinates of the item to label, in px relative to\n * the positioning parent of the Tooltip component.\n */\n bbox: PropTypes.exact({\n x0: PropTypes.number,\n y0: PropTypes.number,\n x1: PropTypes.number,\n y1: PropTypes.number,\n }),\n\n /**\n * Whether to show the tooltip\n */\n show: PropTypes.bool,\n\n /**\n * The side of the `bbox` on which the tooltip should open.\n */\n direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),\n\n /**\n * Color of the tooltip border, as a CSS color string.\n */\n border_color: PropTypes.string,\n\n /**\n * Color of the tooltip background, as a CSS color string.\n */\n background_color: PropTypes.string,\n\n /**\n * The text displayed in the tooltip while loading\n */\n loading_text: PropTypes.string,\n\n /**\n * The `z-index` CSS property to assign to the tooltip. Components with\n * higher values will be displayed on top of components with lower values.\n */\n zindex: PropTypes.number,\n\n /**\n * Whether the tooltip itself can be targeted by pointer events.\n * For tooltips triggered by hover events, typically this should be left\n * `false` to avoid the tooltip interfering with those same events.\n */\n targetable: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport default Tooltip;\n","\n import API from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../css-loader/dist/cjs.js!./_datepicker.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../css-loader/dist/cjs.js!./_datepicker.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-dates@20.1.0-fix.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-dates@20.1.0-fix.css\";\n export default content && content.locals ? content.locals : undefined;\n"],"names":["leafPrototypes","getProto","inProgress","dataWebpackPrefix","e","window","module","exports","n","t","r","o","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","default","prototype","hasOwnProperty","p","s","u","a","done","Promise","resolve","then","this","arguments","apply","isReady","lazy","setTimeout","regeneratorRuntime","mark","wrap","prev","next","stop","_dashprivate_isLazyComponentReady","f","length","configurable","writable","key","TypeError","dispatchEvent","CustomEvent","addEventListener","removeEventListener","_typeof","obj","iterator","constructor","isDeepEqual","isDeepStrictEqual","_require$codes","codes","ERR_AMBIGUOUS_ARGUMENT","ERR_INVALID_ARG_TYPE","ERR_INVALID_ARG_VALUE","ERR_INVALID_RETURN_VALUE","ERR_MISSING_ARGS","AssertionError","inspect","_require$types","isPromise","isRegExp","objectAssign","assign","objectIs","is","lazyLoadComparison","comparison","Map","warned","assert","ok","NO_EXCEPTION_SENTINEL","innerFail","message","Error","innerOk","fn","argLen","generatedMessage","err","actual","expected","operator","stackStartFn","_len","args","Array","_key","concat","fail","internalMessage","argsLen","undefined","warn","process","emitWarning","console","errArgs","equal","notEqual","deepEqual","notDeepEqual","deepStrictEqual","notDeepStrictEqual","strictEqual","notStrictEqual","Comparison","keys","_this","instance","Constructor","_classCallCheck","forEach","test","compareExceptionKey","b","name","expectedException","msg","push","isPrototypeOf","getActual","checkIsPromise","catch","waitForActual","promiseFn","resultPromise","expectsError","error","details","fnType","expectsNoError","strict","_len6","_key6","throws","_len2","_key2","rejects","_len3","_key3","result","doesNotThrow","_len4","_key4","doesNotReject","_len5","_key5","ifError","newErr","origStack","stack","tmp2","split","shift","tmp1","pos","indexOf","slice","join","_defineProperty","_defineProperties","target","props","descriptor","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","_wrapNativeSuper","Class","_cache","Function","toString","has","set","Wrapper","_construct","_getPrototypeOf","_setPrototypeOf","isNativeReflectConstruct","Reflect","construct","sham","Proxy","Date","Parent","setPrototypeOf","__proto__","getPrototypeOf","endsWith","str","search","this_len","substring","blue","green","red","white","kReadableOperator","strictEqualObject","notStrictEqualObject","notIdentical","copyError","source","inspectValue","val","compact","customInspect","depth","maxArrayLength","Infinity","showHidden","breakLength","showProxy","sorted","getters","_Error","options","limit","stackTraceLimit","String","stderr","isTTY","getColorDepth","other","res","lastPos","end","skipped","actualInspected","actualLines","expectedLines","indicator","inputLength","columns","count","Math","floor","maxCount","log","repeat","pop","maxLines","max","_actualLines","printedLines","skippedMsg","cur","expectedLine","actualLine","divergingLines","createErrDiff","base","_res","knownOperators","code","captureStackTrace","protoProps","subClass","superClass","_inherits","custom","recurseTimes","ctx","ownKeys","getOwnPropertySymbols","filter","sym","getOwnPropertyDescriptor","_objectSpread","util","createErrorType","Base","NodeError","_Base","arg1","arg2","arg3","getMessage","oneOf","thing","isArray","len","map","determiner","start","substr","replace","type","reason","inspected","RangeError","input","_slicedToArray","arr","_arrayWithHoles","_arr","_n","_d","_e","_s","_i","_iterableToArrayLimit","_nonIterableRest","regexFlagsSupported","flags","arrayFromSet","array","arrayFromMap","objectGetOwnPropertySymbols","numberIsNaN","Number","isNaN","uncurryThis","propertyIsEnumerable","objectToString","isAnyArrayBuffer","isArrayBufferView","isDate","isMap","isSet","isNativeError","isBoxedPrimitive","isNumberObject","isStringObject","isBooleanObject","isBigIntObject","isSymbolObject","isFloat32Array","isFloat64Array","isNonIndex","charCodeAt","pow","getOwnNonIndexProperties","compare","x","y","min","innerDeepEqual","val1","val2","memos","buf1","buf2","val1Tag","keys1","keys2","keyCheck","getTime","RegExp","byteLength","Uint8Array","buffer","byteOffset","areSimilarTypedArrays","offset","areSimilarFloatArrays","_keys","_keys2","size","valueOf","Boolean","BigInt","isEqualBoxedPrimitive","getEnumerables","k","iterationType","aKeys","bKeys","symbolKeysA","symbolKeysB","_symbolKeysB","position","val2MemoA","val2MemoB","areEq","objEquiv","delete","setHasEqualElement","memo","setValues","findLooseMatchingPrimitives","prim","setMightHaveLoosePrim","altValue","mapMightHaveLoosePrim","item","curB","mapHasEqualEntry","key1","item1","key2","aValues","Set","add","bValues","_val","setEquiv","aEntries","_aEntries$i","item2","bEntries","_i2","_bEntries$_i","mapEquiv","keysA","RealDatePickerRange","datePickerRange","DatePickerRange","Suspense","fallback","Component","propTypes","start_date","PropTypes","end_date","min_date_allowed","max_date_allowed","disabled_days","minimum_nights","updatemode","start_date_placeholder_text","end_date_placeholder_text","initial_visible_month","clearable","reopen_calendar_on_clear","display_format","month_format","first_day_of_week","show_outside_days","stay_open_on_select","calendar_orientation","number_of_months_shown","with_portal","with_full_screen_portal","day_size","is_RTL","disabled","start_date_id","end_date_id","style","className","id","setProps","loading_state","is_loading","prop_name","component_name","persistence","persisted_props","persistence_type","persistenceTransforms","transformDate","defaultProps","RealDateSingleRange","datePickerSingle","DatePickerSingle","date","placeholder","RealDropdown","dropdown","Dropdown","label","isRequired","title","multi","searchable","search_value","optionHeight","maxHeight","privatePropTypes","_dashprivate_transformConfig","_dashprivate_transformFigure","_dashprivate_onFigureModified","EMPTY_DATA","PlotlyGraph","mathjax","_loadMathjax","state","prependData","extendData","clearState","setState","nextProps","figure","dataKey","data","ControlledPlotlyGraph","RealPlotlyGraph","asyncDecorator","all","Plotly","lazyLoadMathJax","extendedClassName","displayName","responsive","clickData","clickAnnotationData","hoverData","clear_on_unhover","selectedData","relayoutData","restyleData","layout","frames","animate","animation_options","config","staticPlot","plotlyServerURL","editable","editSelection","edits","annotationPosition","annotationTail","annotationText","axisTitleText","colorbarPosition","colorbarTitleText","legendPosition","legendText","shapePosition","titleText","autosizable","queueLength","fillFrame","frameMargins","scrollZoom","doubleClick","doubleClickDelay","showTips","showAxisDragHandles","showAxisRangeEntryBoxes","showLink","sendData","linkText","displayModeBar","showSendToCloud","showEditInChartStudio","modeBarButtonsToRemove","modeBarButtonsToAdd","modeBarButtons","toImageButtonOptions","format","filename","width","height","scale","displaylogo","watermark","plotGlPixelRatio","topojsonURL","mapboxAccessToken","locale","locales","frame","redraw","transition","duration","ease","graphPropTypes","graphDefaultProps","event","params","bubbles","cancelable","detail","evt","document","createEvent","initCustomEvent","Event","Link","updateLocation","hasModifiers","metaKey","shiftKey","altKey","ctrlKey","href","refresh","isNil","preventDefault","location","history","pushState","scrollTo","children","onClick","DashMarkdown","RealDashMarkdown","dangerously_allow_html","link_target","dedent","highlight_config","theme","RealRangeSlider","rangeSlider","RangeSlider","step","marks","drag_value","allowCross","pushable","dots","included","tooltip","always_visible","placement","vertical","verticalHeight","RealSlider","slider","Slider","RealUpload","upload","Upload","contents","last_modified","accept","disable_click","max_size","min_size","multiple","className_active","className_reject","className_disabled","style_active","style_reject","style_disabled","borderStyle","borderColor","backgroundColor","opacity","extract","propValue","moment","startOf","storedValue","MathJax","sanitizeOptions","entries","React","includes","option","colorString","require","convert","skippedModels","hashedModelKeys","model","labels","sort","limiters","Color","object","channels","color","valpha","newArray","zeroArray","splice","alpha","hashedKeys","JSON","stringify","freeze","string","toJSON","places","to","rgb","round","percentString","percent","unitArray","unitObject","g","number","toFixed","roundTo","roundToPlace","getset","maxfn","hue","saturationl","lightness","saturationv","chroma","gray","wblack","cyan","magenta","yellow","black","z","keyword","hex","hexa","rgbArray","alphaHex","toUpperCase","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","isDark","isLight","negate","lighten","ratio","hsl","darken","saturate","desaturate","whiten","hwb","blacken","grayscale","fade","opaquer","rotate","degrees","mix","mixinColor","weight","color1","w","w1","w2","assertArray","raw","channel","modifier","v","cssKeywords","reverseKeywords","hsv","cmyk","xyz","lab","lch","ansi16","ansi256","hcg","apple","h","delta","rdif","gdif","bdif","diff","diffc","reversed","currentClosestKeyword","currentClosestDistance","distance","t2","t3","t1","smin","lmin","hi","q","sl","vmin","wh","bl","y2","x2","z2","atan2","PI","sqrt","hr","cos","sin","saturation","ansi","mult","rem","match","char","integer","parseInt","mg","pure","conversions","route","fromModel","routes","toModel","wrappedFn","arg0","conversion","wrapRounded","wrapRaw","link","from","wrapConversion","graph","path","parent","unshift","models","buildGraph","queue","current","adjacents","adjacent","node","deriveBFS","defineLocale","months","monthsShort","weekdays","weekdaysShort","weekdaysMin","meridiemParse","isPM","meridiem","hours","minutes","isLower","longDateFormat","LT","LTS","L","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","ss","mm","hh","dd","M","MM","yy","dayOfMonthOrdinalParse","ordinal","week","dow","doy","factory","pluralForm","plurals","pluralize","withoutSuffix","isFuture","weekdaysParseExact","hour","minute","postformat","symbolMap","preparse","numberMap","suffixes","relativeTimeWithPlural","num","forms","standalone","isFormat","day","period","ww","lastDigit","last2Digits","meridiemHour","monthsShortRegex","monthsParseExact","relativeTimeWithMutation","text","mutationTable","charAt","softMutation","mutation","lastNumber","monthsParse","monthsRegex","minWeekdaysParse","weekdaysParse","fullWeekdaysParse","shortWeekdaysParse","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","token","translate","ll","lll","llll","output","plural","exec","processRelativeTime","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","month","_monthsNominativeEl","toLowerCase","calendarEl","mom","_calendarEl","monthsShortDot","invalidDate","numbersPast","numbersFuture","verbalNumber","monthsShortWithDots","monthsShortWithoutDots","weekEndings","eras","since","narrow","abbr","until","eraYearOrdinalRegex","eraYearOrdinalParse","now","$0","$1","$2","isUpper","eifelerRegelAppliesToNumber","units","translateSingular","special","relativeTimeWithSingular","translator","words","correctGrammaticalCase","wordKey","relativeTimeMr","monthsNominative","monthsSubjective","separator","days","word","numbersNouns","numberNoun","hundred","ten","one","numberAsNoun","time","hm","processHoursFunction","nominative","accusative","genitive","hookCallback","some","hooks","isObject","hasOwnProp","isObjectEmpty","getOwnPropertyNames","isUndefined","isNumber","arrLen","extend","createUTC","createLocalOrUTC","utc","getParsingFlags","_pf","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","rfc2822","weekdayMismatch","isValid","_isValid","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","fun","momentProperties","updateInProgress","copyConfig","prop","momentPropertiesLen","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","deprecations","deprecateSimple","isFunction","mergeConfigs","parentConfig","childConfig","Locale","zeroFill","targetLength","forceSign","absNumber","abs","zerosToFill","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","callback","func","localeData","formatMoment","expandFormat","makeFormatFunction","replaceLongDateFormatTokens","lastIndex","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","isLeapYear","year","absFloor","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","daysInMonth","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","_a","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","dayOfMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","daysInYear","parseTwoDigitYear","getSetYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","fwd","getUTCDay","dayOfYearFromWeeks","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","lowercase","matchMeridiem","_meridiemParse","seconds","kInput","_isPm","_meridiem","pos1","pos2","getSetHour","globalLocale","baseConfig","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","loadLocale","oldLocale","isLocaleNameSane","_abbr","aliasedRequire","getSetGlobalLocale","values","getLocale","_config","parentLocale","names","j","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","monthStr","dayStr","hourStr","minuteStr","secondStr","weekdayStr","parsedInput","getDay","checkWeekday","obsOffset","militaryOffset","numOffset","calculateOffset","setUTCMinutes","getUTCMinutes","defaults","configFromArray","currentDate","expectedWeekday","yearToUse","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","currentDateArray","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","_week","gg","_dayOfYear","dayOfYearFromWeekInfo","_nextDay","ISO_8601","RFC_2822","stringLength","totalParsedInputLength","isPm","meridiemFixWrap","erasConvertYear","prepareConfig","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromStringAndArray","createFromInputFallback","configFromString","dayOrDate","second","millisecond","configFromObject","configFromInput","isUTC","prototypeMin","prototypeMax","pickBy","moments","ordering","Duration","years","quarters","quarter","weeks","isoWeek","milliseconds","unitHasDecimal","orderLen","parseFloat","isDurationValid","_milliseconds","_days","_months","_data","_bubble","isDuration","absRound","utcOffset","sign","offsetFromString","chunkOffset","matcher","parts","matches","cloneWithOffset","clone","setTime","local","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","ret","diffRes","parseIso","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","direction","tmp","addSubtract","isAdding","invalid","subtract","isString","isMomentInput","arrayTest","dataTypeTest","isNumberOrStringArray","property","objectTest","propertyTest","properties","propertyLen","isMomentInputObject","isCalendarSpec","monthDiff","wholeMonthDiff","anchor","newLocaleData","defaultFormat","defaultFormatUtc","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","abbrPieces","namePieces","narrowPieces","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","isoWeekYear","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","proto","preParsePostFormat","formats","sod","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","isoWeekday","inputString","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","getPrioritizedUnits","prioritizedLen","toArray","toObject","toDate","toISOString","keepOffset","prefix","suffix","zone","isLocal","for","unix","creationData","eraName","eraNarrow","eraAbbr","eraYear","dir","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","parseWeekday","parseIsoWeekday","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","isDSTShifted","_isDSTShifted","array1","array2","dontConvert","lengthDiff","diffs","compareArrays","proto$1","get$1","index","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","tok","_invalidDate","_ordinal","_relativeTime","pastFuture","_eras","_monthsShort","_monthsParseExact","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","as","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","proto$2","monthsFromDays","argWithSuffix","argThresholds","withSuffix","th","posNegDuration","relativeTime$1","toIsoString","version","updateLocale","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","DATE","TIME","TIME_SECONDS","TIME_MS","WEEK","MONTH","b64","lens","validLen","getLens","placeHoldersLen","Arr","_byteLength","curByte","revLookup","lookup","GetIntrinsic","callBind","$indexOf","allowMissing","intrinsic","$apply","$call","$reflectApply","$gOPD","$defineProperty","$max","originalFunction","desc","applyBind","colorNames","swizzle","reverseNames","cs","clamp","hexDouble","hexAlpha","i2","rgba","hsla","hwba","times","functions","expression","tuple","___CSS_LOADER_EXPORT___","cssWithMappingToString","list","content","needLayer","modules","media","dedupe","supports","layer","alreadyImportedModules","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","sourceMapping","sourceURLs","sources","sourceRoot","hasSymbols","toStr","origDefineProperty","hasPropertyDescriptors","supportsDescriptors","predicate","defineProperties","predicates","firstSource","nextSource","keysArray","nextIndex","nextKey","polyfill","allBlankCharCodes","original","XMLHttpRequest","open","responseType","onload","response","onerror","send","status","MouseEvent","initMouseEvent","global","navigator","userAgent","saveAs","HTMLAnchorElement","URL","webkitURL","createElement","download","rel","origin","createObjectURL","revokeObjectURL","msSaveOrOpenBlob","autoBom","Blob","body","innerText","HTMLElement","safari","FileReader","onloadend","readAsDataURL","isCallable","forEachArray","receiver","forEachString","forEachObject","thisArg","ERROR_MESSAGE","funcType","bound","binder","boundLength","boundArgs","Empty","implementation","$SyntaxError","SyntaxError","$Function","$TypeError","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","needsEval","TypedArray","INTRINSICS","AggregateError","ArrayBuffer","Atomics","DataView","decodeURI","decodeURIComponent","encodeURI","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","$strSlice","$exec","rePropName","reEscapeChar","stringToPath","first","last","quote","subString","getBaseIntrinsic","intrinsicName","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","origSymbol","hasSymbolSham","symObj","syms","ctor","superCtor","super_","TempCtor","hasToStringTag","$toString","callBound","isStandardArguments","isLegacyArguments","callee","supportsStandardArguments","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","strClass","GeneratorFunction","isFnRegex","generatorFunc","getGeneratorFunc","define","getPolyfill","shim","availableTypedArrays","globalThis","typedArrays","$slice","toStrTags","gOPD","typedArray","superProto","tag","anyTrue","tryTypedArrays","webpackContext","req","webpackContextResolve","__webpack_require__","keysShim","isArgs","isEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","keysWorksWithArguments","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","clearTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","nextTick","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","isArrayish","results","hash","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","indexByIdentifier","css","sourceMap","references","updater","addElementStyle","byIndex","api","domAPI","update","newObj","remove","lastIdentifiers","newList","newLastIdentifiers","_index","element","setAttributes","attributes","insert","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","appendChild","createTextNode","isProd","StyleSheet","_temp","_ref","_ref$name","_ref$optimizeForSpeed","optimizeForSpeed","_ref$isBrowser","isBrowser","invariant","_name","_deletedRulePlaceholder","_optimizeForSpeed","_isBrowser","_serverSheet","_tags","_injected","_rulesCount","querySelector","_nonce","getAttribute","_proto","setOptimizeForSpeed","bool","flush","inject","isOptimizeForSpeed","makeStyleTag","getSheet","cssRules","insertRule","rule","deleteRule","getSheetForTag","sheet","styleSheets","ownerNode","insertionPoint","replaceRule","trim","textContent","_this2","reduce","rules","cssString","relativeToTag","head","getElementsByTagName","insertBefore","condition","_react","styleSheetRegistry","JSXStyle","_Component","prevProps","dynamic","info","tagInfo","baseId","computeId","shouldComponentUpdate","otherProps","componentWillUnmount","render","_stringHash","_interopRequireDefault","_stylesheet","StyleSheetRegistry","_ref$styleSheet","_sheet","_fromServer","_indices","_instancesCounts","createComputeId","computeSelector","createComputeSelector","selectFromServer","acc","tagName","_this$getIdAndRules","getIdAndRules","styleId","indices","tagFromServer","_this3","fromServer","cache","propsToString","selectoPlaceholderRegexp","idcss","_this4","querySelectorAll","copy","fill","readUInt8","isArgumentsObject","isGeneratorFunction","whichTypedArray","isTypedArray","BigIntSupported","SymbolSupported","ObjectToString","numberValue","stringValue","booleanValue","bigIntValue","symbolValue","checkBoxedPrimitive","prototypeValueOf","isMapToString","isSetToString","isWeakMapToString","isWeakSetToString","isArrayBufferToString","isArrayBuffer","working","isDataViewToString","isDataView","isView","isUint8Array","isUint8ClampedArray","isUint16Array","isUint32Array","isInt8Array","isInt16Array","isInt32Array","isBigInt64Array","isBigUint64Array","isWeakMap","isWeakSet","SharedArrayBufferCopy","isSharedArrayBufferToString","isSharedArrayBuffer","isAsyncFunction","isMapIterator","isSetIterator","isGeneratorObject","isWebAssemblyCompiledModule","method","getOwnPropertyDescriptors","descriptors","formatRegExp","objects","isNull","noDeprecation","throwDeprecation","traceDeprecation","trace","debugs","debugEnvRegex","NODE_DEBUG","debugEnv","opts","seen","stylize","stylizeNoColor","colors","isBoolean","_extend","stylizeWithColor","formatValue","styleType","styles","primitive","simple","formatPrimitive","visibleKeys","idx","arrayToHash","isError","formatError","braces","toUTCString","formatProperty","formatArray","reduceToSingleString","line","ar","re","pad","debuglog","pid","types","isNullOrUndefined","isSymbol","isPrimitive","isBuffer","timestamp","getHours","getMinutes","getSeconds","inherits","kCustomPromisifiedSymbol","callbackifyOnRejected","cb","newReason","promisify","promiseResolve","promiseReject","promise","reject","callbackify","callbackified","maybeCb","rej","foundName","possibleNames","_isPlaceholder","f1","f2","_b","_dispatchable","methodNames","transducerCreator","transducer","xf","XWrap","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","thisObj","_iterableReduce","iter","_methodReduce","methodName","symIterator","_arrayReduce","XMap","_xfBase","received","combined","argsIdx","left","combinedIdx","_isArguments","hasEnumBug","nonEnumerableProps","hasArgsEnumBug","contains","nIdx","ks","checkArgsLength","functor","isInteger","f3","_c","el","set1","set2","len1","len2","assocPath","nextObj","refFrom","refTo","deep","pattern","copiedValue","ignoreCase","multiline","sticky","unicode","_arrayFromIterator","_includesWith","pred","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_equals","aItem","typeA","equals","extendedStackA","extendedStackB","inf","XFilter","filterable","_path","_identity","Ctor","memoizeWith","mFn","mergeDeepWithKey","lObj","rObj","lVal","rVal","xs","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","mode","ns","def","definition","chunkId","promises","url","script","needAttach","scripts","charset","nc","src","onScriptComplete","doneFns","nmd","paths","scriptUrl","importScripts","currentScript","getCurrentScript","doc_scripts","async","jsonpScriptSrc","__jsonpScriptSrc__","srcFragments","fileFragments","installedChunks","installedChunkData","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","chunkLoadingGlobal","Checklist","inputClassName","inputStyle","labelClassName","labelStyle","inline","display","checked","onChange","newValue","without","append","_WINDOW","_DOCUMENT","_PERFORMANCE","measure","MutationObserver","performance","_ref$userAgent","WINDOW","DOCUMENT","PERFORMANCE","IS_DOM","documentElement","DEFAULT_REPLACEMENT_CLASS","oneToTen","oneToTwenty","DUOTONE_CLASSES","GROUP","SWAP_OPACITY","PRIMARY","SECONDARY","initial","FontAwesomeConfig","_ref2","attr","coerce","getAttrConfig","familyPrefix","replacementClass","autoReplaceSvg","autoAddCss","autoA11y","searchPseudoElements","observeMutations","mutateApproach","keepOriginalSource","measurePerformance","showMissingIcons","shims","namespace","doScroll","readyState","listener","asyncTimer","PENDING","SETTLED","FULFILLED","REJECTED","NOOP","isNode","asyncSetTimer","setImmediate","asyncQueue","asyncFlush","asyncCall","invokeCallback","subscriber","owner","settled","_state","handleThenable","resolved","fulfill","publishFulfillment","publishRejection","publish","_then","_handled","notifyRejectionHandled","P","resolver","rejectPromise","invokeResolver","onFulfillment","onRejection","fulfilled","rejected","remaining","race","meaninglessTransform","flipX","flipY","nextUniqueId","random","htmlEscape","joinStyles","styleName","transformIsMeaningful","transform","transformForSvg","containerWidth","iconWidth","outer","innerTranslate","innerScale","innerRotate","inner","ALL_SPACE","fillBlack","abstract","force","makeInlineSvgAbstract","_params$icons","icons","main","mask","iconName","symbol","maskId","titleId","extra","_params$watchable","watchable","found","isUploadedIcon","widthClass","attrClass","classes","role","uploadedIconWidthStyle","explicitMaskId","mainWidth","mainPath","icon","maskWidth","maskPath","trans","maskRect","maskInnerGroupChildrenMixin","maskInnerGroup","maskOuterGroup","clipId","maskTag","maskUnits","maskContentUnits","defs","makeIconMasking","styleString","makeIconStandard","asSymbol","asIcon","subject","initialValue","thisContext","bindInternal4","defineIcons","_params$skipHooks","skipHooks","normalized","addPack","build","reducer","ligatures","ligature","hasRegular","oldName","iconFromMapping","mapping","toHtml","abstractNodes","_abstractNodes$attrib","_abstractNodes$childr","attributeName","joinAttributes","MissingIcon","FILL","ANIMATION_BASE","attributeType","repeatCount","dur","OPACITY_ANIMATE","asFoundIcon","vectorData","class","cx","cy","Library","definitions","additions","_pullDefinitions","_normalized$key","ensureCss","_cssInserted","innerHTML","headChildren","childNodes","beforeChild","child","insertCss","dfp","drc","fp","rc","dPatt","customPropPatt","rPatt","apiObject","abstractCreator","container","html","findIconDefinition","iconLookup","_iconLookup$prefix","library","parse","transformString","rest","parseTransformString","iconDefinition","_params$transform","_params$symbol","_params$mask","_params$maskId","_params$title","_params$titleId","_params$classes","_params$attributes","_params$styles","maybeIconDefinition","enumerableOnly","symbols","_objectSpread2","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","_arrayLikeToArray","minLen","_unsupportedIterableToArray","camelize","chr","_excluded$1","styleToObject","pair","startsWith","normalizeIconArgs","objectWithKey","_excluded","FontAwesomeIcon","forwardedRef","iconArgs","maskArgs","_classes","beat","beatFade","bounce","shake","flash","spin","spinPulse","spinReverse","pulse","fixedWidth","inverse","border","listItem","flip","rotation","pull","swapOpacity","classList","renderedIcon","_console","extraProps","ref","convertCurry","mixins","attrs","_extraProps$style","existingStyle","faCheckCircle","faCopy","clipboardAPI","clipboard","wait","Clipboard","copyToClipboard","copySuccess","getTargetText","loading","stringifyId","copied","wild","showCopiedIcon","writeText","target_id","getElementById","n_clicks","copyIcon","copiedIcon","btnIcon","ConfirmDialog","_update","displayed","shouldTriggerDisplay","cancel_n_clicks","submit_n_clicks","confirm","submit_n_clicks_timestamp","cancel_n_clicks_timestamp","ConfirmDialogProvider","wrapClick","_dashprivate_layout","getValue","Download","toByteArray","blob","lastInsertedElement","_lastElementInsertedByStyleLoader","nextSibling","isNumeric","isEquivalent","v1","v2","Input","onBlur","onEvent","onKeyPress","setInputValue","setPropValue","valueAsNumber","valprops","omit","__value","checkValidity","n_blur","n_blur_timestamp","debounce","n_submit","n_submit_timestamp","PureComponent","inputMode","autoComplete","readOnly","required","autoFocus","spellCheck","minLength","maxLength","selectionStart","selectionEnd","selectionDirection","Interval","intervalId","reportInterval","handleTimer","max_intervals","n_intervals","clearTimer","setInterval","interval","clearInterval","resetTimer","GraphSpinner","debugTitle","fullscreen","debug","spinnerClass","DefaultSpinner","CubeSpinner","changeColor","CircleSpinner","DotSpinner","hiddenContainer","visibility","coveringSpinner","top","justifyContent","alignItems","Loading","parent_className","parent_style","spinnerType","isLoading","Spinner","getSpinner","mergeRight","_dashprivate_isLoadingComponent","Location","onLocationChange","pathname","propsToSet","checkExistsUpdateWindowLocation","fieldName","propVal","pathnameUpdated","hrefUpdated","hashUpdated","searchUpdated","searchVal","hashVal","propsToChange","History","onpopstate","LogoutButton","submitMethod","logout_url","action","RadioItems","ids","MemStore","_modified","setModified","WebStore","storage","_storage","getItem","setItem","removeItem","Store","storage_type","_backstore","localStorage","sessionStorage","onStorageChange","oldValue","modified_timestamp","getModified","old","clear_data","Tab","Fragment","disabled_style","disabled_className","selected_className","selected_style","EnhancedTab","selected","selectedClassName","selectHandler","mobile_breakpoint","amountOfTabs","tabStyle","labelDisplay","tabClassName","background","primary","Tabs","parseChildrenToArray","valueOrDefault","EnhancedTabs","selectedTab","childProps","selectedTabContent","tabContainerClass","tabContentClass","tabParentClass","content_style","content_className","Textarea","n_clicks_timestamp","cols","form","rows","accessKey","contentEditable","contextMenu","draggable","hidden","tabIndex","Tooltip","bbox","border_color","background_color","show","y0","x0","x1","y1","targetable","zindex","loading_text"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"dash_core_components.js","mappings":";gBACIA,EADAC,ECAAC,EACAC,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xB,GAAQE,OAAS,SAAqBH,GACF,IAAI7lC,EAAShP,SAASg3C,cAAc,QAEhCkoB,EACAzjF,OAAO0jF,kCAEND,EAEMA,EAAoBE,YAC3BpwD,EAAO8pC,aAAajE,EAASqqB,EAAoBE,aAEjDpwD,EAAO4mC,YAAYf,GAJnB7lC,EAAO8pC,aAAajE,EAAS7lC,EAAO2mC,YAQxCl6D,OAAO0jF,kCAAoCtqB,CAC/C,EAChC,GAAQR,OAAS,KACjB,GAAQe,mBAAqB,KAEhB,KAAI,KAAS,IAKJ,MAAW,aAAiB,YALlD,gBCxBI,GAAU,CAAC,EAEf,GAAQC,kBAAoB,KAC5B,GAAQP,cAAgB,KACxB,GAAQE,OAAS,SAAqBH,GACF,IAAI7lC,EAAShP,SAASg3C,cAAc,QAEhCkoB,EACAzjF,OAAO0jF,kCAEND,EAEMA,EAAoBE,YAC3BpwD,EAAO8pC,aAAajE,EAASqqB,EAAoBE,aAEjDpwD,EAAO4mC,YAAYf,GAJnB7lC,EAAO8pC,aAAajE,EAAS7lC,EAAO2mC,YAQxCl6D,OAAO0jF,kCAAoCtqB,CAC/C,EAChC,GAAQR,OAAS,KACjB,GAAQe,mBAAqB,KAEhB,KAAI,KAAS,IAKJ,MAAW,aAAiB","sources":["webpack:///webpack/runtime/create fake namespace object","webpack:///webpack/runtime/load script","webpack:///./node_modules/@plotly/dash-component-plugins/dist/index.js","webpack:///./node_modules/assert/build/assert.js","webpack:///./node_modules/assert/build/internal/assert/assertion_error.js","webpack:///./node_modules/assert/build/internal/errors.js","webpack:///./node_modules/assert/build/internal/util/comparisons.js","webpack:///./src/utils/LazyLoader/datePickerRange.js","webpack:///./src/components/DatePickerRange.react.js","webpack:///./src/utils/LazyLoader/datePickerSingle.js","webpack:///./src/components/DatePickerSingle.react.js","webpack:///./src/utils/LazyLoader/dropdown.js","webpack:///./src/components/Dropdown.react.js","webpack:///./src/fragments/Graph.privateprops.js","webpack:///./src/components/Graph.react.js","webpack:///./src/utils/LazyLoader/graph.js","webpack:///./src/utils/LazyLoader/plotly.js","webpack:///./src/components/Link.react.js","webpack:///./src/components/Markdown.react.js","webpack:///./src/utils/LazyLoader/markdown.js","webpack:///./src/utils/LazyLoader/rangeSlider.js","webpack:///./src/components/RangeSlider.react.js","webpack:///./src/utils/LazyLoader/slider.js","webpack:///./src/components/Slider.react.js","webpack:///./src/utils/LazyLoader/upload.js","webpack:///./src/components/Upload.react.js","webpack:///./src/utils/DatePickerPersistence.js","webpack:///./src/utils/LazyLoader/mathjax.js","webpack:///./src/utils/optionTypes.js","webpack:///./node_modules/color/index.js","webpack:///./node_modules/color/node_modules/color-convert/conversions.js","webpack:///./node_modules/color/node_modules/color-convert/index.js","webpack:///./node_modules/color/node_modules/color-convert/route.js","webpack:///./node_modules/color/node_modules/color-name/index.js","webpack:///./node_modules/moment/locale/af.js","webpack:///./node_modules/moment/locale/ar-dz.js","webpack:///./node_modules/moment/locale/ar-kw.js","webpack:///./node_modules/moment/locale/ar-ly.js","webpack:///./node_modules/moment/locale/ar-ma.js","webpack:///./node_modules/moment/locale/ar-sa.js","webpack:///./node_modules/moment/locale/ar-tn.js","webpack:///./node_modules/moment/locale/ar.js","webpack:///./node_modules/moment/locale/az.js","webpack:///./node_modules/moment/locale/be.js","webpack:///./node_modules/moment/locale/bg.js","webpack:///./node_modules/moment/locale/bm.js","webpack:///./node_modules/moment/locale/bn-bd.js","webpack:///./node_modules/moment/locale/bn.js","webpack:///./node_modules/moment/locale/bo.js","webpack:///./node_modules/moment/locale/br.js","webpack:///./node_modules/moment/locale/bs.js","webpack:///./node_modules/moment/locale/ca.js","webpack:///./node_modules/moment/locale/cs.js","webpack:///./node_modules/moment/locale/cv.js","webpack:///./node_modules/moment/locale/cy.js","webpack:///./node_modules/moment/locale/da.js","webpack:///./node_modules/moment/locale/de-at.js","webpack:///./node_modules/moment/locale/de-ch.js","webpack:///./node_modules/moment/locale/de.js","webpack:///./node_modules/moment/locale/dv.js","webpack:///./node_modules/moment/locale/el.js","webpack:///./node_modules/moment/locale/en-au.js","webpack:///./node_modules/moment/locale/en-ca.js","webpack:///./node_modules/moment/locale/en-gb.js","webpack:///./node_modules/moment/locale/en-ie.js","webpack:///./node_modules/moment/locale/en-il.js","webpack:///./node_modules/moment/locale/en-in.js","webpack:///./node_modules/moment/locale/en-nz.js","webpack:///./node_modules/moment/locale/en-sg.js","webpack:///./node_modules/moment/locale/eo.js","webpack:///./node_modules/moment/locale/es-do.js","webpack:///./node_modules/moment/locale/es-mx.js","webpack:///./node_modules/moment/locale/es-us.js","webpack:///./node_modules/moment/locale/es.js","webpack:///./node_modules/moment/locale/et.js","webpack:///./node_modules/moment/locale/eu.js","webpack:///./node_modules/moment/locale/fa.js","webpack:///./node_modules/moment/locale/fi.js","webpack:///./node_modules/moment/locale/fil.js","webpack:///./node_modules/moment/locale/fo.js","webpack:///./node_modules/moment/locale/fr-ca.js","webpack:///./node_modules/moment/locale/fr-ch.js","webpack:///./node_modules/moment/locale/fr.js","webpack:///./node_modules/moment/locale/fy.js","webpack:///./node_modules/moment/locale/ga.js","webpack:///./node_modules/moment/locale/gd.js","webpack:///./node_modules/moment/locale/gl.js","webpack:///./node_modules/moment/locale/gom-deva.js","webpack:///./node_modules/moment/locale/gom-latn.js","webpack:///./node_modules/moment/locale/gu.js","webpack:///./node_modules/moment/locale/he.js","webpack:///./node_modules/moment/locale/hi.js","webpack:///./node_modules/moment/locale/hr.js","webpack:///./node_modules/moment/locale/hu.js","webpack:///./node_modules/moment/locale/hy-am.js","webpack:///./node_modules/moment/locale/id.js","webpack:///./node_modules/moment/locale/is.js","webpack:///./node_modules/moment/locale/it-ch.js","webpack:///./node_modules/moment/locale/it.js","webpack:///./node_modules/moment/locale/ja.js","webpack:///./node_modules/moment/locale/jv.js","webpack:///./node_modules/moment/locale/ka.js","webpack:///./node_modules/moment/locale/kk.js","webpack:///./node_modules/moment/locale/km.js","webpack:///./node_modules/moment/locale/kn.js","webpack:///./node_modules/moment/locale/ko.js","webpack:///./node_modules/moment/locale/ku.js","webpack:///./node_modules/moment/locale/ky.js","webpack:///./node_modules/moment/locale/lb.js","webpack:///./node_modules/moment/locale/lo.js","webpack:///./node_modules/moment/locale/lt.js","webpack:///./node_modules/moment/locale/lv.js","webpack:///./node_modules/moment/locale/me.js","webpack:///./node_modules/moment/locale/mi.js","webpack:///./node_modules/moment/locale/mk.js","webpack:///./node_modules/moment/locale/ml.js","webpack:///./node_modules/moment/locale/mn.js","webpack:///./node_modules/moment/locale/mr.js","webpack:///./node_modules/moment/locale/ms-my.js","webpack:///./node_modules/moment/locale/ms.js","webpack:///./node_modules/moment/locale/mt.js","webpack:///./node_modules/moment/locale/my.js","webpack:///./node_modules/moment/locale/nb.js","webpack:///./node_modules/moment/locale/ne.js","webpack:///./node_modules/moment/locale/nl-be.js","webpack:///./node_modules/moment/locale/nl.js","webpack:///./node_modules/moment/locale/nn.js","webpack:///./node_modules/moment/locale/oc-lnc.js","webpack:///./node_modules/moment/locale/pa-in.js","webpack:///./node_modules/moment/locale/pl.js","webpack:///./node_modules/moment/locale/pt-br.js","webpack:///./node_modules/moment/locale/pt.js","webpack:///./node_modules/moment/locale/ro.js","webpack:///./node_modules/moment/locale/ru.js","webpack:///./node_modules/moment/locale/sd.js","webpack:///./node_modules/moment/locale/se.js","webpack:///./node_modules/moment/locale/si.js","webpack:///./node_modules/moment/locale/sk.js","webpack:///./node_modules/moment/locale/sl.js","webpack:///./node_modules/moment/locale/sq.js","webpack:///./node_modules/moment/locale/sr-cyrl.js","webpack:///./node_modules/moment/locale/sr.js","webpack:///./node_modules/moment/locale/ss.js","webpack:///./node_modules/moment/locale/sv.js","webpack:///./node_modules/moment/locale/sw.js","webpack:///./node_modules/moment/locale/ta.js","webpack:///./node_modules/moment/locale/te.js","webpack:///./node_modules/moment/locale/tet.js","webpack:///./node_modules/moment/locale/tg.js","webpack:///./node_modules/moment/locale/th.js","webpack:///./node_modules/moment/locale/tk.js","webpack:///./node_modules/moment/locale/tl-ph.js","webpack:///./node_modules/moment/locale/tlh.js","webpack:///./node_modules/moment/locale/tr.js","webpack:///./node_modules/moment/locale/tzl.js","webpack:///./node_modules/moment/locale/tzm-latn.js","webpack:///./node_modules/moment/locale/tzm.js","webpack:///./node_modules/moment/locale/ug-cn.js","webpack:///./node_modules/moment/locale/uk.js","webpack:///./node_modules/moment/locale/ur.js","webpack:///./node_modules/moment/locale/uz-latn.js","webpack:///./node_modules/moment/locale/uz.js","webpack:///./node_modules/moment/locale/vi.js","webpack:///./node_modules/moment/locale/x-pseudo.js","webpack:///./node_modules/moment/locale/yo.js","webpack:///./node_modules/moment/locale/zh-cn.js","webpack:///./node_modules/moment/locale/zh-hk.js","webpack:///./node_modules/moment/locale/zh-mo.js","webpack:///./node_modules/moment/locale/zh-tw.js","webpack:///./node_modules/moment/moment.js","webpack:///./node_modules/base64-js/index.js","webpack:///./node_modules/call-bind/callBound.js","webpack:///./node_modules/call-bind/index.js","webpack:///./node_modules/color-name/index.js","webpack:///./node_modules/color-string/index.js","webpack:///./node_modules/console-browserify/index.js","webpack:///./node_modules/react-dates/lib/css/_datepicker.css","webpack:///./src/components/css/input.css","webpack:///./src/components/css/logout.css","webpack:///./src/components/css/react-dates@20.1.0-fix.css","webpack:///./src/components/css/react-select@1.0.0-rc.3.min.css","webpack:///./node_modules/css-loader/dist/runtime/api.js","webpack:///./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack:///./node_modules/define-properties/index.js","webpack:///./node_modules/es6-object-assign/index.js","webpack:///./node_modules/fast-isnumeric/index.js","webpack:///./node_modules/file-saver/dist/FileSaver.min.js","webpack:///./node_modules/for-each/index.js","webpack:///./node_modules/function-bind/implementation.js","webpack:///./node_modules/function-bind/index.js","webpack:///./node_modules/get-intrinsic/index.js","webpack:///./node_modules/has-property-descriptors/index.js","webpack:///./node_modules/has-symbols/index.js","webpack:///./node_modules/has-symbols/shams.js","webpack:///./node_modules/has-tostringtag/shams.js","webpack:///./node_modules/has/src/index.js","webpack:///./node_modules/inherits/inherits_browser.js","webpack:///./node_modules/is-arguments/index.js","webpack:///./node_modules/is-callable/index.js","webpack:///./node_modules/is-generator-function/index.js","webpack:///./node_modules/is-nan/implementation.js","webpack:///./node_modules/is-nan/index.js","webpack:///./node_modules/is-nan/polyfill.js","webpack:///./node_modules/is-nan/shim.js","webpack:///./node_modules/is-string-blank/index.js","webpack:///./node_modules/is-typed-array/index.js","webpack:///./node_modules/moment/locale/ sync ^\\.\\/.*$","webpack:///./node_modules/object-is/implementation.js","webpack:///./node_modules/object-is/index.js","webpack:///./node_modules/object-is/polyfill.js","webpack:///./node_modules/object-is/shim.js","webpack:///./node_modules/object-keys/implementation.js","webpack:///./node_modules/object-keys/index.js","webpack:///./node_modules/object-keys/isArguments.js","webpack:///./node_modules/process/browser.js","webpack:///./node_modules/simple-swizzle/index.js","webpack:///./node_modules/simple-swizzle/node_modules/is-arrayish/index.js","webpack:///./node_modules/string-hash/index.js","webpack:///./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack:///./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack:///./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack:///./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack:///./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack:///./node_modules/styled-jsx/dist/lib/stylesheet.js","webpack:///./node_modules/styled-jsx/dist/style.js","webpack:///./node_modules/styled-jsx/dist/stylesheet-registry.js","webpack:///./node_modules/styled-jsx/style.js","webpack:///./node_modules/util/support/isBufferBrowser.js","webpack:///./node_modules/util/support/types.js","webpack:///./node_modules/util/util.js","webpack:///./node_modules/which-typed-array/index.js","webpack:///external window \"PropTypes\"","webpack:///external window \"React\"","webpack:///external window \"ReactDOM\"","webpack:///./node_modules/available-typed-arrays/index.js","webpack:///./node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js","webpack:///./node_modules/ramda/es/internal/_isPlaceholder.js","webpack:///./node_modules/ramda/es/internal/_curry1.js","webpack:///./node_modules/ramda/es/internal/_curry2.js","webpack:///./node_modules/ramda/es/internal/_isArray.js","webpack:///./node_modules/ramda/es/internal/_isTransformer.js","webpack:///./node_modules/ramda/es/internal/_dispatchable.js","webpack:///./node_modules/ramda/es/internal/_xfBase.js","webpack:///./node_modules/ramda/es/internal/_isString.js","webpack:///./node_modules/ramda/es/internal/_isArrayLike.js","webpack:///./node_modules/ramda/es/internal/_xwrap.js","webpack:///./node_modules/ramda/es/internal/_arity.js","webpack:///./node_modules/ramda/es/bind.js","webpack:///./node_modules/ramda/es/internal/_reduce.js","webpack:///./node_modules/ramda/es/internal/_xmap.js","webpack:///./node_modules/ramda/es/internal/_curryN.js","webpack:///./node_modules/ramda/es/curryN.js","webpack:///./node_modules/ramda/es/internal/_has.js","webpack:///./node_modules/ramda/es/internal/_isArguments.js","webpack:///./node_modules/ramda/es/keys.js","webpack:///./node_modules/ramda/es/map.js","webpack:///./node_modules/ramda/es/internal/_map.js","webpack:///./node_modules/ramda/es/internal/_isInteger.js","webpack:///./node_modules/ramda/es/nth.js","webpack:///./node_modules/ramda/es/prop.js","webpack:///./node_modules/ramda/es/pluck.js","webpack:///./node_modules/ramda/es/internal/_curry3.js","webpack:///./node_modules/ramda/es/internal/_xaperture.js","webpack:///./node_modules/ramda/es/append.js","webpack:///./node_modules/ramda/es/internal/_concat.js","webpack:///./node_modules/ramda/es/isNil.js","webpack:///./node_modules/ramda/es/assocPath.js","webpack:///./node_modules/ramda/es/internal/_assoc.js","webpack:///./node_modules/ramda/es/assoc.js","webpack:///./node_modules/ramda/es/type.js","webpack:///./node_modules/ramda/es/internal/_clone.js","webpack:///./node_modules/ramda/es/internal/_cloneRegExp.js","webpack:///./node_modules/ramda/es/clone.js","webpack:///./node_modules/ramda/es/internal/_arrayFromIterator.js","webpack:///./node_modules/ramda/es/internal/_includesWith.js","webpack:///./node_modules/ramda/es/internal/_objectIs.js","webpack:///./node_modules/ramda/es/internal/_equals.js","webpack:///./node_modules/ramda/es/internal/_functionName.js","webpack:///./node_modules/ramda/es/equals.js","webpack:///./node_modules/ramda/es/internal/_includes.js","webpack:///./node_modules/ramda/es/internal/_indexOf.js","webpack:///./node_modules/ramda/es/internal/_isObject.js","webpack:///./node_modules/ramda/es/internal/_toISOString.js","webpack:///./node_modules/ramda/es/internal/_xfilter.js","webpack:///./node_modules/ramda/es/filter.js","webpack:///./node_modules/ramda/es/internal/_filter.js","webpack:///./node_modules/ramda/es/reject.js","webpack:///./node_modules/ramda/es/internal/_complement.js","webpack:///./node_modules/ramda/es/empty.js","webpack:///./node_modules/ramda/es/internal/_isTypedArray.js","webpack:///./node_modules/ramda/es/hasPath.js","webpack:///./node_modules/ramda/es/has.js","webpack:///./node_modules/ramda/es/internal/_identity.js","webpack:///./node_modules/ramda/es/identity.js","webpack:///./node_modules/ramda/es/includes.js","webpack:///./node_modules/ramda/es/internal/_objectAssign.js","webpack:///./node_modules/ramda/es/is.js","webpack:///./node_modules/ramda/es/isEmpty.js","webpack:///./node_modules/ramda/es/memoizeWith.js","webpack:///./node_modules/ramda/es/mergeWithKey.js","webpack:///./node_modules/ramda/es/mergeDeepWithKey.js","webpack:///./node_modules/ramda/es/mergeDeepRight.js","webpack:///./node_modules/ramda/es/mergeRight.js","webpack:///./node_modules/ramda/es/omit.js","webpack:///./node_modules/ramda/es/pick.js","webpack:///./node_modules/ramda/es/pickBy.js","webpack:///./node_modules/ramda/es/flip.js","webpack:///./node_modules/ramda/es/trim.js","webpack:///./node_modules/ramda/es/without.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/ensure chunk","webpack:///webpack/runtime/get javascript chunk filename","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///webpack/runtime/make namespace object","webpack:///webpack/runtime/node module decorator","webpack:///webpack/runtime/publicPath","webpack:///webpack/runtime/compat","webpack:///webpack/runtime/jsonp chunk loading","webpack:///webpack/runtime/nonce","webpack:///./src/components/Checklist.react.js","webpack:///./node_modules/@fortawesome/fontawesome-svg-core/index.es.js","webpack:///./node_modules/@fortawesome/react-fontawesome/index.es.js","webpack:///./node_modules/@fortawesome/free-regular-svg-icons/index.es.js","webpack:///./src/components/Clipboard.react.js","webpack:///./src/components/ConfirmDialog.react.js","webpack:///./src/components/ConfirmDialogProvider.react.js","webpack:///./src/components/Download.react.js","webpack:///./src/components/css/input.css?4f77","webpack:///./src/components/Input.react.js","webpack:///./src/components/Interval.react.js","webpack:///./src/fragments/Loading/spinners/GraphSpinner.jsx","webpack:///./src/fragments/Loading/spinners/DefaultSpinner.jsx","webpack:///./src/fragments/Loading/spinners/CubeSpinner.jsx","webpack:///./src/fragments/Loading/spinners/CircleSpinner.jsx","webpack:///./src/fragments/Loading/spinners/DotSpinner.jsx","webpack:///./src/components/Loading.react.js","webpack:///./src/components/Location.react.js","webpack:///./src/components/css/logout.css?d957","webpack:///./src/components/LogoutButton.react.js","webpack:///./src/components/css/react-select@1.0.0-rc.3.min.css?908f","webpack:///./src/components/RadioItems.react.js","webpack:///./src/components/Store.react.js","webpack:///./src/components/Tab.react.js","webpack:///./src/components/Tabs.react.js","webpack:///./src/components/Textarea.react.js","webpack:///./src/components/Tooltip.react.js","webpack:///./node_modules/react-dates/lib/css/_datepicker.css?6084","webpack:///./src/components/css/react-dates@20.1.0-fix.css?ebb9"],"sourcesContent":["var getProto = Object.getPrototypeOf ? function(obj) { return Object.getPrototypeOf(obj); } : function(obj) { return obj.__proto__; };\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach(function(key) { def[key] = function() { return value[key]; }; });\n\t}\n\tdef['default'] = function() { return value; };\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"dash_core_components:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\t;\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","!function(e,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],n):\"object\"==typeof exports?exports[\"dash-component-plugins\"]=n(require(\"react\")):e[\"dash-component-plugins\"]=n(e.React)}(window,(function(e){return function(e){var n={};function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:r})},t.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&n&&\"string\"!=typeof e)for(var o in e)t.d(r,o,function(n){return e[n]}.bind(null,o));return r},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p=\"\",t(t.s=1)}([function(n,t){n.exports=e},function(e,n,t){\"use strict\";t.r(n),t.d(n,\"asyncDecorator\",(function(){return u})),t.d(n,\"inheritAsyncDecorator\",(function(){return a})),t.d(n,\"isReady\",(function(){return c})),t.d(n,\"History\",(function(){return d}));var r=t(0);function o(e,n,t,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void t(e)}a.done?n(c):Promise.resolve(c).then(r,o)}function i(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var u=e.apply(n,t);function a(e){o(u,r,i,a,c,\"next\",e)}function c(e){o(u,r,i,a,c,\"throw\",e)}a(void 0)}))}}var u=function(e,n){var t,o={isReady:new Promise((function(e){t=e})),get:Object(r.lazy)((function(){return Promise.resolve(n()).then((function(e){return setTimeout(i(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t(!0);case 2:o.isReady=!0;case 3:case\"end\":return e.stop()}}),e)}))),0),e}))}))};return Object.defineProperty(e,\"_dashprivate_isLazyComponentReady\",{get:function(){return o.isReady}}),o.get},a=function(e,n){Object.defineProperty(e,\"_dashprivate_isLazyComponentReady\",{get:function(){return c(n)}})},c=function(e){return e&&e._dashprivate_isLazyComponentReady};function f(e,n){for(var t=0;t\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n'use strict';\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar _require = require('./internal/errors'),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\n\nvar AssertionError = require('./internal/assert/assertion_error');\n\nvar _require2 = require('util/'),\n inspect = _require2.inspect;\n\nvar _require$types = require('util/').types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\n\nvar objectAssign = Object.assign ? Object.assign : require('es6-object-assign').assign;\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\n\nfunction lazyLoadComparison() {\n var comparison = require('./internal/util/comparisons');\n\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n} // Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\n\n\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\n\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\n\nvar warned = false; // The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {}; // All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\n\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n\n if (argsLen === 2) operator = '!=';\n }\n\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n\n if (message !== undefined) {\n errArgs.message = message;\n }\n\n var err = new AssertionError(errArgs);\n\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n\n throw err;\n}\n\nassert.fail = fail; // The AssertionError is defined in internal/error.\n\nassert.AssertionError = AssertionError;\n\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n} // Pure assertion tests whether a value is truthy, as determined\n// by !!value.\n\n\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\n\nassert.ok = ok; // The equality assertion tests shallow, coercive equality with ==.\n\n/* eslint-disable no-restricted-properties */\n\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n}; // The non-equality assertion tests for whether two objects are not\n// equal with !=.\n\n\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n } // eslint-disable-next-line eqeqeq\n\n\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n}; // The equivalence assertion tests a deep equality relation.\n\n\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n}; // The non-equivalence assertion tests for any deep inequality.\n\n\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\n\nassert.notDeepStrictEqual = notDeepStrictEqual;\n\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\n\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\n\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\n\nvar Comparison = function Comparison(obj, keys, actual) {\n var _this = this;\n\n _classCallCheck(this, Comparison);\n\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && obj[key].test(actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n};\n\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\n\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return expected.test(actual); // assert.doesNotThrow does not accept objects.\n\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n } // Handle primitives properly.\n\n\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n\n var keys = Object.keys(expected); // Special handle errors to make sure the name and the message are compared\n // as well.\n\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && expected[key].test(actual[key])) {\n return;\n }\n\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n } // Guard instanceof against arrow functions as they don't have a prototype.\n\n\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n\n return expected.call({}, actual) === true;\n}\n\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n\n try {\n fn();\n } catch (e) {\n return e;\n }\n\n return NO_EXCEPTION_SENTINEL;\n}\n\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\n\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn(); // Fail in case no promise is returned.\n\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\n\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\n\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n\n throw actual;\n}\n\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\n\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\n\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\n\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\n\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n }); // Make sure we actually have a stack trace!\n\n var origStack = err.stack;\n\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift(); // Filter all frames existing in err.stack.\n\n var tmp1 = newErr.stack.split('\\n');\n\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n\n throw newErr;\n }\n}; // Expose a strict only variant of assert\n\n\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\n\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;","// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n'use strict';\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar _require = require('util/'),\n inspect = _require.inspect;\n\nvar _require2 = require('../errors'),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\n\n\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n\n while (count) {\n str += str;\n count--;\n }\n\n str += str.substring(0, maxCount - str.length);\n return str;\n}\n\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n}; // Comparing short primitives should just show === / !== instead of using the\n// diff.\n\nvar kMaxShortLength = 10;\n\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\n\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\n\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = ''; // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n } // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n\n\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length; // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n } // Ignore the first characters.\n\n\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n } // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n\n\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n\n var maxLines = Math.max(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n'); // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the expected line to the cache.\n\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++; // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++; // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n } // Mark the current line as the last diverging one.\n\n\n lastPos = i; // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2; // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = ''; // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n } // Inspected object to big (Show ~20 rows max)\n\n\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\n\nvar AssertionError =\n/*#__PURE__*/\nfunction (_Error) {\n _inherits(AssertionError, _Error);\n\n function AssertionError(options) {\n var _this;\n\n _classCallCheck(this, AssertionError);\n\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n\n if (message != null) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, String(message)));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n } // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n\n\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, createErrDiff(actual, expected, operator)));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n'); // In case \"actual\" is an object, it should not be reference equal.\n\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n } // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n\n\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n\n while (res.length > 27) {\n res.pop();\n }\n } // Only print a single input.\n\n\n if (res.length === 1) {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \" \").concat(res[0])));\n } else {\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\")));\n }\n } else {\n var _res = inspectValue(actual);\n\n var other = '';\n var knownOperators = kReadableOperator[operator];\n\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, \"\".concat(_res).concat(other)));\n }\n }\n\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n } // Create error message including the error code in the name.\n\n\n _this.stack; // Reset the name.\n\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: inspect.custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread({}, ctx, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n\n return AssertionError;\n}(_wrapNativeSuper(Error));\n\nmodule.exports = AssertionError;","// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n\n/* eslint node-core/alphabetize-errors: \"error\" */\n\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n'use strict'; // The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nvar codes = {}; // Lazy loaded\n\nvar assert;\nvar util;\n\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n\n var NodeError =\n /*#__PURE__*/\n function (_Base) {\n _inherits(NodeError, _Base);\n\n function NodeError(arg1, arg2, arg3) {\n var _this;\n\n _classCallCheck(this, NodeError);\n\n _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3)));\n _this.code = code;\n return _this;\n }\n\n return NodeError;\n }(Base);\n\n codes[code] = NodeError;\n} // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\n\n\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n\n\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n\n\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n\n return str.substring(this_len - search.length, this_len) === search;\n} // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n\n\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\n\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = require('../assert');\n assert(typeof name === 'string', \"'name' must be a string\"); // determiner: 'must be' or 'must not be'\n\n var determiner;\n\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n\n var msg;\n\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } // TODO(BridgeAR): Improve the output by showing `null` and similar.\n\n\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = require('util/');\n var inspected = util.inspect(value);\n\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (assert === undefined) assert = require('../assert');\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;","// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar regexFlagsSupported = /a/g.flags !== undefined;\n\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\n\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\n\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : require('is-nan');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\n\nvar _require$types = require('util/').types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\n\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n } // The maximum size for an array is 2 ** 32 -1.\n\n\n return key.length === 10 && key >= Math.pow(2, 32);\n}\n\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n} // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n\n var x = a.length;\n var y = b.length;\n\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n\n if (x < y) {\n return -1;\n }\n\n if (y < x) {\n return 1;\n }\n\n return 0;\n}\n\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3; // Check if they have the same source and flags\n\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\n\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\n\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\n\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n} // Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n } // Check more closely if val1 and val2 are equal.\n\n\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n\n return false;\n }\n\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n\n if (val1Tag !== val2Tag) {\n return false;\n }\n\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (keys1.length !== keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n } // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n\n\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n } // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n\n\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n\n if (_keys.length !== _keys2.length) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\n\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\n\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2); // The pair must have the same number of owned properties.\n\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n } // Cheap key test\n\n\n var i = 0;\n\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n\n if (symbolKeysA.length !== 0) {\n var count = 0;\n\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n } // Use memos to handle cycles.\n\n\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n\n memos.position++;\n }\n\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\n\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n\n return false;\n} // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\n\n\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n\n case 'object':\n // Only pass in null as object!\n return undefined;\n\n case 'symbol':\n return false;\n\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n\n }\n\n return true;\n}\n\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\n\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n\n if (altValue != null) {\n return altValue;\n }\n\n var curB = b.get(altValue);\n\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\n\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i]; // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n } // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n\n\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null values.\n\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(val);\n }\n }\n\n if (set !== null) {\n var bValues = arrayFromSet(b);\n\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i]; // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n\n return false;\n}\n\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false; // Fast path to detect missing string, symbol, undefined and null\n // keys.\n\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n\n if (set === null) {\n set = new Set();\n }\n\n set.add(key);\n }\n }\n }\n\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n\n if (_typeof(key) === 'object' && key !== null) {\n if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {\n return false;\n }\n }\n\n return set.size === 0;\n }\n\n return true;\n}\n\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n\n return true;\n }\n }\n } // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n\n\n for (i = 0; i < keys.length; i++) {\n var _key = keys[i];\n\n if (!innerDeepEqual(a[_key], b[_key], strict, memos)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\n\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\n\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};","export default () =>\n import(/* webpackChunkName: \"datepicker\" */ '../../fragments/DatePickerRange.react');\n\n\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport datePickerRange from '../utils/LazyLoader/datePickerRange';\nimport transformDate from '../utils/DatePickerPersistence';\n\nconst RealDatePickerRange = lazy(datePickerRange);\n\n/**\n * DatePickerRange is a tailor made component designed for selecting\n * timespan across multiple days off of a calendar.\n *\n * The DatePicker integrates well with the Python datetime module with the\n * startDate and endDate being returned in a string format suitable for\n * creating datetime objects.\n *\n * This component is based off of Airbnb's react-dates react component\n * which can be found here: https://github.com/airbnb/react-dates\n */\nexport default class DatePickerRange extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nDatePickerRange.propTypes = {\n /**\n * Specifies the starting date for the component.\n * Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n start_date: PropTypes.string,\n\n /**\n * Specifies the ending date for the component.\n * Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n end_date: PropTypes.string,\n\n /**\n * Specifies the lowest selectable date for the component.\n * Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n min_date_allowed: PropTypes.string,\n\n /**\n * Specifies the highest selectable date for the component.\n * Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n max_date_allowed: PropTypes.string,\n\n /**\n * Specifies additional days between min_date_allowed and max_date_allowed\n * that should be disabled. Accepted datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n disabled_days: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * Specifies a minimum number of nights that must be selected between\n * the startDate and the endDate\n */\n minimum_nights: PropTypes.number,\n\n /**\n * Determines when the component should update\n * its value. If `bothdates`, then the DatePicker\n * will only trigger its value when the user has\n * finished picking both dates. If `singledate`, then\n * the DatePicker will update its value\n * as one date is picked.\n */\n updatemode: PropTypes.oneOf(['singledate', 'bothdates']),\n\n /**\n * Text that will be displayed in the first input\n * box of the date picker when no date is selected. Default value is 'Start Date'\n */\n start_date_placeholder_text: PropTypes.string,\n\n /**\n * Text that will be displayed in the second input\n * box of the date picker when no date is selected. Default value is 'End Date'\n */\n end_date_placeholder_text: PropTypes.string,\n\n /**\n * Specifies the month that is initially presented when the user\n * opens the calendar. Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n *\n */\n initial_visible_month: PropTypes.string,\n\n /**\n * Whether or not the dropdown is \"clearable\", that is, whether or\n * not a small \"x\" appears on the right of the dropdown that removes\n * the selected value.\n */\n clearable: PropTypes.bool,\n\n /**\n * If True, the calendar will automatically open when cleared\n */\n reopen_calendar_on_clear: PropTypes.bool,\n\n /**\n * Specifies the format that the selected dates will be displayed\n * valid formats are variations of \"MM YY DD\". For example:\n * \"MM YY DD\" renders as '05 10 97' for May 10th 1997\n * \"MMMM, YY\" renders as 'May, 1997' for May 10th 1997\n * \"M, D, YYYY\" renders as '07, 10, 1997' for September 10th 1997\n * \"MMMM\" renders as 'May' for May 10 1997\n */\n display_format: PropTypes.string,\n\n /**\n * Specifies the format that the month will be displayed in the calendar,\n * valid formats are variations of \"MM YY\". For example:\n * \"MM YY\" renders as '05 97' for May 1997\n * \"MMMM, YYYY\" renders as 'May, 1997' for May 1997\n * \"MMM, YY\" renders as 'Sep, 97' for September 1997\n */\n month_format: PropTypes.string,\n\n /**\n * Specifies what day is the first day of the week, values must be\n * from [0, ..., 6] with 0 denoting Sunday and 6 denoting Saturday\n */\n first_day_of_week: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),\n\n /**\n * If True the calendar will display days that rollover into\n * the next month\n */\n show_outside_days: PropTypes.bool,\n\n /**\n * If True the calendar will not close when the user has selected a value\n * and will wait until the user clicks off the calendar\n */\n stay_open_on_select: PropTypes.bool,\n\n /**\n * Orientation of calendar, either vertical or horizontal.\n * Valid options are 'vertical' or 'horizontal'.\n */\n calendar_orientation: PropTypes.oneOf(['vertical', 'horizontal']),\n\n /**\n * Number of calendar months that are shown when calendar is opened\n */\n number_of_months_shown: PropTypes.number,\n\n /**\n * If True, calendar will open in a screen overlay portal,\n * not supported on vertical calendar\n */\n with_portal: PropTypes.bool,\n\n /**\n * If True, calendar will open in a full screen overlay portal, will\n * take precedent over 'withPortal' if both are set to true,\n * not supported on vertical calendar\n */\n with_full_screen_portal: PropTypes.bool,\n\n /**\n * Size of rendered calendar days, higher number\n * means bigger day size and larger calendar overall\n */\n day_size: PropTypes.number,\n\n /**\n * Determines whether the calendar and days operate\n * from left to right or from right to left\n */\n is_RTL: PropTypes.bool,\n\n /**\n * If True, no dates can be selected.\n */\n disabled: PropTypes.bool,\n\n /**\n * The HTML element ID of the start date input field.\n * Not used by Dash, only by CSS.\n */\n start_date_id: PropTypes.string,\n\n /**\n * The HTML element ID of the end date input field.\n * Not used by Dash, only by CSS.\n */\n end_date_id: PropTypes.string,\n\n /**\n * CSS styles appended to wrapper div\n */\n style: PropTypes.object,\n\n /**\n * Appends a CSS class to the wrapper div component.\n */\n className: PropTypes.string,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, any `persisted_props` that the\n * user has changed while using the app will keep those changes, as long as\n * the new prop value also matches what was given originally.\n * Used in conjunction with `persistence_type` and `persisted_props`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page.\n */\n persisted_props: PropTypes.arrayOf(\n PropTypes.oneOf(['start_date', 'end_date'])\n ),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n\nDatePickerRange.persistenceTransforms = {\n end_date: transformDate,\n start_date: transformDate,\n};\n\nDatePickerRange.defaultProps = {\n calendar_orientation: 'horizontal',\n is_RTL: false,\n day_size: 39,\n with_portal: false,\n with_full_screen_portal: false,\n first_day_of_week: 0,\n number_of_months_shown: 1,\n stay_open_on_select: false,\n reopen_calendar_on_clear: false,\n clearable: false,\n disabled: false,\n updatemode: 'singledate',\n persisted_props: ['start_date', 'end_date'],\n persistence_type: 'local',\n disabled_days: [],\n};\n\nexport const propTypes = DatePickerRange.propTypes;\nexport const defaultProps = DatePickerRange.defaultProps;\n","export default () => import(/* webpackChunkName: \"datepicker\" */ '../../fragments/DatePickerSingle.react');\n\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport datePickerSingle from '../utils/LazyLoader/datePickerSingle';\nimport transformDate from '../utils/DatePickerPersistence';\n\nconst RealDateSingleRange = lazy(datePickerSingle);\n\n/**\n * DatePickerSingle is a tailor made component designed for selecting\n * a single day off of a calendar.\n *\n * The DatePicker integrates well with the Python datetime module with the\n * startDate and endDate being returned in a string format suitable for\n * creating datetime objects.\n *\n * This component is based off of Airbnb's react-dates react component\n * which can be found here: https://github.com/airbnb/react-dates\n */\nexport default class DatePickerSingle extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nDatePickerSingle.propTypes = {\n /**\n * Specifies the starting date for the component, best practice is to pass\n * value via datetime object\n */\n date: PropTypes.string,\n\n /**\n * Specifies the lowest selectable date for the component.\n * Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n min_date_allowed: PropTypes.string,\n\n /**\n * Specifies the highest selectable date for the component.\n * Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n max_date_allowed: PropTypes.string,\n\n /**\n * Specifies additional days between min_date_allowed and max_date_allowed\n * that should be disabled. Accepted datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n */\n disabled_days: PropTypes.arrayOf(PropTypes.string),\n\n /**\n * Text that will be displayed in the input\n * box of the date picker when no date is selected.\n * Default value is 'Start Date'\n */\n placeholder: PropTypes.string,\n\n /**\n * Specifies the month that is initially presented when the user\n * opens the calendar. Accepts datetime.datetime objects or strings\n * in the format 'YYYY-MM-DD'\n *\n */\n initial_visible_month: PropTypes.string,\n\n /**\n * Whether or not the dropdown is \"clearable\", that is, whether or\n * not a small \"x\" appears on the right of the dropdown that removes\n * the selected value.\n */\n clearable: PropTypes.bool,\n\n /**\n * If True, the calendar will automatically open when cleared\n */\n reopen_calendar_on_clear: PropTypes.bool,\n\n /**\n * Specifies the format that the selected dates will be displayed\n * valid formats are variations of \"MM YY DD\". For example:\n * \"MM YY DD\" renders as '05 10 97' for May 10th 1997\n * \"MMMM, YY\" renders as 'May, 1997' for May 10th 1997\n * \"M, D, YYYY\" renders as '07, 10, 1997' for September 10th 1997\n * \"MMMM\" renders as 'May' for May 10 1997\n */\n display_format: PropTypes.string,\n\n /**\n * Specifies the format that the month will be displayed in the calendar,\n * valid formats are variations of \"MM YY\". For example:\n * \"MM YY\" renders as '05 97' for May 1997\n * \"MMMM, YYYY\" renders as 'May, 1997' for May 1997\n * \"MMM, YY\" renders as 'Sep, 97' for September 1997\n */\n month_format: PropTypes.string,\n\n /**\n * Specifies what day is the first day of the week, values must be\n * from [0, ..., 6] with 0 denoting Sunday and 6 denoting Saturday\n */\n first_day_of_week: PropTypes.oneOf([0, 1, 2, 3, 4, 5, 6]),\n\n /**\n * If True the calendar will display days that rollover into\n * the next month\n */\n show_outside_days: PropTypes.bool,\n\n /**\n * If True the calendar will not close when the user has selected a value\n * and will wait until the user clicks off the calendar\n */\n stay_open_on_select: PropTypes.bool,\n\n /**\n * Orientation of calendar, either vertical or horizontal.\n * Valid options are 'vertical' or 'horizontal'.\n */\n calendar_orientation: PropTypes.oneOf(['vertical', 'horizontal']),\n\n /**\n * Number of calendar months that are shown when calendar is opened\n */\n number_of_months_shown: PropTypes.number,\n\n /**\n * If True, calendar will open in a screen overlay portal,\n * not supported on vertical calendar\n */\n with_portal: PropTypes.bool,\n\n /**\n * If True, calendar will open in a full screen overlay portal, will\n * take precedent over 'withPortal' if both are set to True,\n * not supported on vertical calendar\n */\n with_full_screen_portal: PropTypes.bool,\n\n /**\n * Size of rendered calendar days, higher number\n * means bigger day size and larger calendar overall\n */\n day_size: PropTypes.number,\n\n /**\n * Determines whether the calendar and days operate\n * from left to right or from right to left\n */\n is_RTL: PropTypes.bool,\n\n /**\n * If True, no dates can be selected.\n */\n disabled: PropTypes.bool,\n\n /**\n * CSS styles appended to wrapper div\n */\n style: PropTypes.object,\n\n /**\n * Appends a CSS class to the wrapper div component.\n */\n className: PropTypes.string,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `date` that the user has\n * changed while using the app will keep that change, as long as\n * the new `date` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `date` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['date'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n\nDatePickerSingle.persistenceTransforms = {\n date: transformDate,\n};\n\nDatePickerSingle.defaultProps = {\n calendar_orientation: 'horizontal',\n is_RTL: false,\n day_size: 39,\n with_portal: false,\n with_full_screen_portal: false,\n show_outside_days: true,\n first_day_of_week: 0,\n number_of_months_shown: 1,\n stay_open_on_select: false,\n reopen_calendar_on_clear: false,\n clearable: false,\n disabled: false,\n persisted_props: ['date'],\n persistence_type: 'local',\n disabled_days: [],\n};\n\nexport const propTypes = DatePickerSingle.propTypes;\nexport const defaultProps = DatePickerSingle.defaultProps;\n","export default () => import(/* webpackChunkName: \"dropdown\" */ '../../fragments/Dropdown.react');\n\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport dropdown from '../utils/LazyLoader/dropdown';\n\nconst RealDropdown = lazy(dropdown);\n\n/**\n * Dropdown is an interactive dropdown element for selecting one or more\n * items.\n * The values and labels of the dropdown items are specified in the `options`\n * property and the selected item(s) are specified with the `value` property.\n *\n * Use a dropdown when you have many options (more than 5) or when you are\n * constrained for space. Otherwise, you can use RadioItems or a Checklist,\n * which have the benefit of showing the users all of the items at once.\n */\nexport default class Dropdown extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nDropdown.propTypes = {\n /**\n * An array of options {label: [string|number], value: [string|number]},\n * an optional disabled field can be used for each option\n */\n options: PropTypes.oneOfType([\n /**\n * Array of options where the label and the value are the same thing - [string|number|bool]\n */\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ])\n ),\n /**\n * Simpler `options` representation in dictionary format. The order is not guaranteed.\n * {`value1`: `label1`, `value2`: `label2`, ... }\n * which is equal to\n * [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]\n */\n PropTypes.object,\n /**\n * An array of options {label: [string|number], value: [string|number]},\n * an optional disabled field can be used for each option\n */\n PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The option's label\n */\n label: PropTypes.node.isRequired,\n\n /**\n * The value of the option. This value\n * corresponds to the items specified in the\n * `value` property.\n */\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ]).isRequired,\n\n /**\n * If true, this option is disabled and cannot be selected.\n */\n disabled: PropTypes.bool,\n\n /**\n * The HTML 'title' attribute for the option. Allows for\n * information on hover. For more information on this attribute,\n * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title\n */\n title: PropTypes.string,\n\n /**\n * Optional search value for the option, to use if the label\n * is a component or provide a custom search value different\n * from the label. If no search value and the label is a\n * component, the `value` will be used for search.\n */\n search: PropTypes.string,\n })\n ),\n ]),\n\n /**\n * The value of the input. If `multi` is false (the default)\n * then value is just a string that corresponds to the values\n * provided in the `options` property. If `multi` is true, then\n * multiple values can be selected at once, and `value` is an\n * array of items with values corresponding to those in the\n * `options` prop.\n */\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ])\n ),\n ]),\n\n /**\n * If true, the user can select multiple values\n */\n multi: PropTypes.bool,\n\n /**\n * Whether or not the dropdown is \"clearable\", that is, whether or\n * not a small \"x\" appears on the right of the dropdown that removes\n * the selected value.\n */\n clearable: PropTypes.bool,\n\n /**\n * Whether to enable the searching feature or not\n */\n searchable: PropTypes.bool,\n\n /**\n * The value typed in the DropDown for searching.\n */\n search_value: PropTypes.string,\n\n /**\n * The grey, default text shown when no option is selected\n */\n placeholder: PropTypes.string,\n\n /**\n * If true, this dropdown is disabled and the selection cannot be changed.\n */\n disabled: PropTypes.bool,\n\n /**\n * height of each option. Can be increased when label lengths would wrap around\n */\n optionHeight: PropTypes.number,\n\n /**\n * height of the options dropdown.\n */\n maxHeight: PropTypes.number,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n style: PropTypes.object,\n\n /**\n * className of the dropdown element\n */\n className: PropTypes.string,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that gets fired when the input changes\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `value` that the user has\n * changed while using the app will keep that change, as long as\n * the new `value` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `value` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n\nDropdown.defaultProps = {\n clearable: true,\n disabled: false,\n multi: false,\n searchable: true,\n optionHeight: 35,\n maxHeight: 200,\n persisted_props: ['value'],\n persistence_type: 'local',\n};\n\nexport const propTypes = Dropdown.propTypes;\nexport const defaultProps = Dropdown.defaultProps;\n","import PropTypes from 'prop-types';\n\nexport const privatePropTypes = {\n _dashprivate_transformConfig: PropTypes.func,\n _dashprivate_transformFigure: PropTypes.func,\n _dashprivate_onFigureModified: PropTypes.func,\n};\n\nexport const privateDefaultProps = {\n _dashprivate_transformConfig: c => c,\n _dashprivate_transformFigure: f => f,\n _dashprivate_onFigureModified: f => f,\n};\n","import React, {Component, memo, Suspense} from 'react';\nimport PropTypes from 'prop-types';\n\nimport {asyncDecorator} from '@plotly/dash-component-plugins';\nimport graph from '../utils/LazyLoader/graph';\nimport plotly from '../utils/LazyLoader/plotly';\nimport lazyLoadMathJax from '../utils/LazyLoader/mathjax';\nimport {\n privatePropTypes,\n privateDefaultProps,\n} from '../fragments/Graph.privateprops';\n\nconst EMPTY_DATA = [];\n\n/**\n * Graph can be used to render any plotly.js-powered data visualization.\n *\n * You can define callbacks based on user interaction with Graphs such as\n * hovering, clicking or selecting\n */\nclass PlotlyGraph extends Component {\n constructor(props) {\n super(props);\n\n if (props.mathjax) {\n PlotlyGraph._loadMathjax = true;\n }\n\n this.state = {\n prependData: [],\n extendData: [],\n };\n\n this.clearState = this.clearState.bind(this);\n }\n\n componentDidMount() {\n if (this.props.prependData) {\n this.setState({\n prependData: [this.props.prependData],\n });\n }\n if (this.props.extendData) {\n this.setState({\n extendData: [this.props.extendData],\n });\n }\n }\n\n componentWillUnmount() {\n this.setState({\n prependData: [],\n extendData: [],\n });\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n let prependData = this.state.prependData.slice(0);\n\n if (this.props.figure !== nextProps.figure) {\n prependData = EMPTY_DATA;\n }\n\n if (\n nextProps.prependData &&\n this.props.prependData !== nextProps.prependData\n ) {\n prependData.push(nextProps.prependData);\n } else {\n prependData = EMPTY_DATA;\n }\n\n if (prependData !== EMPTY_DATA) {\n this.setState({\n prependData,\n });\n }\n\n let extendData = this.state.extendData.slice(0);\n\n if (this.props.figure !== nextProps.figure) {\n extendData = EMPTY_DATA;\n }\n\n if (\n nextProps.extendData &&\n this.props.extendData !== nextProps.extendData\n ) {\n extendData.push(nextProps.extendData);\n } else {\n extendData = EMPTY_DATA;\n }\n\n if (extendData !== EMPTY_DATA) {\n this.setState({\n extendData,\n });\n }\n }\n\n clearState(dataKey) {\n this.setState(props => {\n var data = props[dataKey];\n const res =\n data && data.length\n ? {\n [dataKey]: EMPTY_DATA,\n }\n : undefined;\n\n return res;\n });\n }\n\n render() {\n return (\n \n );\n }\n}\n\nconst RealPlotlyGraph = asyncDecorator(PlotlyGraph, () =>\n Promise.all([\n graph(),\n plotly(),\n PlotlyGraph._loadMathjax ? lazyLoadMathJax() : undefined,\n ]).then(([graph]) => graph)\n);\n\nconst ControlledPlotlyGraph = memo(props => {\n const {className, id} = props;\n\n const extendedClassName = className\n ? 'dash-graph ' + className\n : 'dash-graph';\n\n return (\n \n }\n >\n \n \n );\n});\n\nControlledPlotlyGraph.displayName = 'ControlledPlotlyGraph';\n\nPlotlyGraph.propTypes = {\n ...privatePropTypes,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * If True, the Plotly.js plot will be fully responsive to window resize\n * and parent element resize event. This is achieved by overriding\n * `config.responsive` to True, `figure.layout.autosize` to True and unsetting\n * `figure.layout.height` and `figure.layout.width`.\n * If False, the Plotly.js plot not be responsive to window resize and\n * parent element resize event. This is achieved by overriding `config.responsive`\n * to False and `figure.layout.autosize` to False.\n * If 'auto' (default), the Graph will determine if the Plotly.js plot can be made fully\n * responsive (True) or not (False) based on the values in `config.responsive`,\n * `figure.layout.autosize`, `figure.layout.height`, `figure.layout.width`.\n * This is the legacy behavior of the Graph component.\n *\n * Needs to be combined with appropriate dimension / styling through the `style` prop\n * to fully take effect.\n */\n responsive: PropTypes.oneOf([true, false, 'auto']),\n\n /**\n * Data from latest click event. Read-only.\n */\n clickData: PropTypes.object,\n\n /**\n * Data from latest click annotation event. Read-only.\n */\n clickAnnotationData: PropTypes.object,\n\n /**\n * Data from latest hover event. Read-only.\n */\n hoverData: PropTypes.object,\n\n /**\n * If True, `clear_on_unhover` will clear the `hoverData` property\n * when the user \"unhovers\" from a point.\n * If False, then the `hoverData` property will be equal to the\n * data from the last point that was hovered over.\n */\n clear_on_unhover: PropTypes.bool,\n\n /**\n * Data from latest select event. Read-only.\n */\n selectedData: PropTypes.object,\n\n /**\n * Data from latest relayout event which occurs\n * when the user zooms or pans on the plot or other\n * layout-level edits. Has the form `{: }`\n * describing the changes made. Read-only.\n */\n relayoutData: PropTypes.object,\n\n /**\n * Data that should be appended to existing traces. Has the form\n * `[updateData, traceIndices, maxPoints]`, where `updateData` is an object\n * containing the data to extend, `traceIndices` (optional) is an array of\n * trace indices that should be extended, and `maxPoints` (optional) is\n * either an integer defining the maximum number of points allowed or an\n * object with key:value pairs matching `updateData`\n * Reference the Plotly.extendTraces API for full usage:\n * https://plotly.com/javascript/plotlyjs-function-reference/#plotlyextendtraces\n */\n extendData: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n\n /**\n * Data that should be prepended to existing traces. Has the form\n * `[updateData, traceIndices, maxPoints]`, where `updateData` is an object\n * containing the data to prepend, `traceIndices` (optional) is an array of\n * trace indices that should be prepended, and `maxPoints` (optional) is\n * either an integer defining the maximum number of points allowed or an\n * object with key:value pairs matching `updateData`\n * Reference the Plotly.prependTraces API for full usage:\n * https://plotly.com/javascript/plotlyjs-function-reference/#plotlyprependtraces\n */\n prependData: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),\n\n /**\n * Data from latest restyle event which occurs\n * when the user toggles a legend item, changes\n * parcoords selections, or other trace-level edits.\n * Has the form `[edits, indices]`, where `edits` is an object\n * `{: }` describing the changes made,\n * and `indices` is an array of trace indices that were edited.\n * Read-only.\n */\n restyleData: PropTypes.array,\n\n /**\n * Plotly `figure` object. See schema:\n * https://plotly.com/javascript/reference\n *\n * `config` is set separately by the `config` property\n */\n figure: PropTypes.exact({\n data: PropTypes.arrayOf(PropTypes.object),\n layout: PropTypes.object,\n frames: PropTypes.arrayOf(PropTypes.object),\n }),\n\n /**\n * Generic style overrides on the plot div\n */\n style: PropTypes.object,\n\n /**\n * className of the parent div\n */\n className: PropTypes.string,\n\n /**\n * If true, loads mathjax v3 (tex-svg) into the page and use it in the graph\n */\n mathjax: PropTypes.bool,\n\n /**\n * Beta: If true, animate between updates using\n * plotly.js's `animate` function\n */\n animate: PropTypes.bool,\n\n /**\n * Beta: Object containing animation settings.\n * Only applies if `animate` is `true`\n */\n animation_options: PropTypes.object,\n\n /**\n * Plotly.js config options.\n * See https://plotly.com/javascript/configuration-options/\n * for more info.\n */\n config: PropTypes.exact({\n /**\n * No interactivity, for export or image generation\n */\n staticPlot: PropTypes.bool,\n\n /**\n * Base URL for a Plotly cloud instance, if `showSendToCloud` is enabled\n */\n plotlyServerURL: PropTypes.string,\n\n /**\n * We can edit titles, move annotations, etc - sets all pieces of `edits`\n * unless a separate `edits` config item overrides individual parts\n */\n editable: PropTypes.bool,\n\n /**\n * Enables moving selections\n */\n editSelection: PropTypes.bool,\n\n /**\n * A set of editable properties\n */\n edits: PropTypes.exact({\n /**\n * The main anchor of the annotation, which is the\n * text (if no arrow) or the arrow (which drags the whole thing leaving\n * the arrow length & direction unchanged)\n */\n annotationPosition: PropTypes.bool,\n\n /**\n * Just for annotations with arrows, change the length and direction of the arrow\n */\n annotationTail: PropTypes.bool,\n\n annotationText: PropTypes.bool,\n\n axisTitleText: PropTypes.bool,\n\n colorbarPosition: PropTypes.bool,\n\n colorbarTitleText: PropTypes.bool,\n\n legendPosition: PropTypes.bool,\n\n /**\n * Edit the trace name fields from the legend\n */\n legendText: PropTypes.bool,\n\n shapePosition: PropTypes.bool,\n\n /**\n * The global `layout.title`\n */\n titleText: PropTypes.bool,\n }),\n\n /**\n * DO autosize once regardless of layout.autosize\n * (use default width or height values otherwise)\n */\n autosizable: PropTypes.bool,\n\n /**\n * Whether to change layout size when the window size changes\n */\n responsive: PropTypes.bool,\n\n /**\n * Set the length of the undo/redo queue\n */\n queueLength: PropTypes.number,\n\n /**\n * If we DO autosize, do we fill the container or the screen?\n */\n fillFrame: PropTypes.bool,\n\n /**\n * If we DO autosize, set the frame margins in percents of plot size\n */\n frameMargins: PropTypes.number,\n\n /**\n * Mousewheel or two-finger scroll zooms the plot\n */\n scrollZoom: PropTypes.bool,\n\n /**\n * Double click interaction (false, 'reset', 'autosize' or 'reset+autosize')\n */\n doubleClick: PropTypes.oneOf([\n false,\n 'reset',\n 'autosize',\n 'reset+autosize',\n ]),\n\n /**\n * Delay for registering a double-click event in ms. The\n * minimum value is 100 and the maximum value is 1000. By\n * default this is 300.\n */\n doubleClickDelay: PropTypes.number,\n\n /**\n * New users see some hints about interactivity\n */\n showTips: PropTypes.bool,\n\n /**\n * Enable axis pan/zoom drag handles\n */\n showAxisDragHandles: PropTypes.bool,\n\n /**\n * Enable direct range entry at the pan/zoom drag points\n * (drag handles must be enabled above)\n */\n showAxisRangeEntryBoxes: PropTypes.bool,\n\n /**\n * Link to open this plot in plotly\n */\n showLink: PropTypes.bool,\n\n /**\n * If we show a link, does it contain data or just link to a plotly file?\n */\n sendData: PropTypes.bool,\n\n /**\n * Text appearing in the sendData link\n */\n linkText: PropTypes.string,\n\n /**\n * Display the mode bar (true, false, or 'hover')\n */\n displayModeBar: PropTypes.oneOf([true, false, 'hover']),\n\n /**\n * Should we include a modebar button to send this data to a\n * Plotly Cloud instance, linked by `plotlyServerURL`.\n * By default this is false.\n */\n showSendToCloud: PropTypes.bool,\n\n /**\n * Should we show a modebar button to send this data to a\n * Plotly Chart Studio plot. If both this and showSendToCloud\n * are selected, only showEditInChartStudio will be\n * honored. By default this is false.\n */\n showEditInChartStudio: PropTypes.bool,\n\n /**\n * Remove mode bar button by name.\n * All modebar button names at https://github.com/plotly/plotly.js/blob/master/src/components/modebar/buttons.js\n * Common names include:\n * sendDataToCloud;\n * (2D) zoom2d, pan2d, select2d, lasso2d, zoomIn2d, zoomOut2d, autoScale2d, resetScale2d;\n * (Cartesian) hoverClosestCartesian, hoverCompareCartesian;\n * (3D) zoom3d, pan3d, orbitRotation, tableRotation, handleDrag3d, resetCameraDefault3d, resetCameraLastSave3d, hoverClosest3d;\n * (Geo) zoomInGeo, zoomOutGeo, resetGeo, hoverClosestGeo;\n * hoverClosestGl2d, hoverClosestPie, toggleHover, resetViews.\n */\n modeBarButtonsToRemove: PropTypes.array,\n\n /**\n * Add mode bar button using config objects\n */\n modeBarButtonsToAdd: PropTypes.array,\n\n /**\n * Fully custom mode bar buttons as nested array,\n * where the outer arrays represents button groups, and\n * the inner arrays have buttons config objects or names of default buttons\n */\n modeBarButtons: PropTypes.any,\n\n /**\n * Modifications to how the toImage modebar button works\n */\n toImageButtonOptions: PropTypes.exact({\n /**\n * The file format to create\n */\n format: PropTypes.oneOf(['jpeg', 'png', 'webp', 'svg']),\n /**\n * The name given to the downloaded file\n */\n filename: PropTypes.string,\n /**\n * Width of the downloaded file, in px\n */\n width: PropTypes.number,\n /**\n * Height of the downloaded file, in px\n */\n height: PropTypes.number,\n /**\n * Extra resolution to give the file after\n * rendering it with the given width and height\n */\n scale: PropTypes.number,\n }),\n\n /**\n * Add the plotly logo on the end of the mode bar\n */\n displaylogo: PropTypes.bool,\n\n /**\n * Add the plotly logo even with no modebar\n */\n watermark: PropTypes.bool,\n\n /**\n * Increase the pixel ratio for Gl plot images\n */\n plotGlPixelRatio: PropTypes.number,\n\n /**\n * URL to topojson files used in geo charts\n */\n topojsonURL: PropTypes.string,\n\n /**\n * Mapbox access token (required to plot mapbox trace types)\n * If using an Mapbox Atlas server, set this option to '',\n * so that plotly.js won't attempt to authenticate to the public Mapbox server.\n */\n mapboxAccessToken: PropTypes.any,\n\n /**\n * The locale to use. Locales may be provided with the plot\n * (`locales` below) or by loading them on the page, see:\n * https://github.com/plotly/plotly.js/blob/master/dist/README.md#to-include-localization\n */\n locale: PropTypes.string,\n\n /**\n * Localization definitions, if you choose to provide them with the\n * plot rather than registering them globally.\n */\n locales: PropTypes.object,\n }),\n\n /**\n * Function that updates the state tree.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nControlledPlotlyGraph.propTypes = PlotlyGraph.propTypes;\n\nPlotlyGraph.defaultProps = {\n ...privateDefaultProps,\n\n clickData: null,\n clickAnnotationData: null,\n hoverData: null,\n selectedData: null,\n relayoutData: null,\n prependData: null,\n extendData: null,\n restyleData: null,\n figure: {\n data: [],\n layout: {},\n frames: [],\n },\n responsive: 'auto',\n mathjax: false,\n animate: false,\n animation_options: {\n frame: {\n redraw: false,\n },\n transition: {\n duration: 750,\n ease: 'cubic-in-out',\n },\n },\n clear_on_unhover: false,\n config: {},\n};\n\nexport const graphPropTypes = PlotlyGraph.propTypes;\nexport const graphDefaultProps = PlotlyGraph.defaultProps;\n\nexport default PlotlyGraph;\n","export default () => import(/* webpackChunkName: \"graph\" */ '../../fragments/Graph.react');\n\n","export default () => Promise.resolve(window.Plotly ||\n import(/* webpackChunkName: \"plotlyjs\" */ 'plotly.js-dist-min').then(({ default: Plotly }) => {\n window.Plotly = Plotly;\n return Plotly;\n }));\n\n","import PropTypes from 'prop-types';\n\nimport React, {Component} from 'react';\n\nimport {isNil} from 'ramda';\n\n/*\n * event polyfill for IE\n * https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent\n */\nfunction CustomEvent(event, params) {\n // eslint-disable-next-line no-param-reassign\n params = params || {\n bubbles: false,\n cancelable: false,\n // eslint-disable-next-line no-undefined\n detail: undefined,\n };\n const evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(\n event,\n params.bubbles,\n params.cancelable,\n params.detail\n );\n return evt;\n}\nCustomEvent.prototype = window.Event.prototype;\n\n/**\n * Link allows you to create a clickable link within a multi-page app.\n *\n * For links with destinations outside the current app, `html.A` is a better\n * component to use.\n */\nexport default class Link extends Component {\n constructor(props) {\n super(props);\n this.updateLocation = this.updateLocation.bind(this);\n }\n\n updateLocation(e) {\n const hasModifiers = e.metaKey || e.shiftKey || e.altKey || e.ctrlKey;\n const {href, refresh, target} = this.props;\n\n if (hasModifiers) {\n return;\n }\n if (target !== '_self' && !isNil(target)) {\n return;\n }\n // prevent anchor from updating location\n e.preventDefault();\n if (refresh) {\n window.location = href;\n } else {\n window.history.pushState({}, '', href);\n window.dispatchEvent(new CustomEvent('_dashprivate_pushstate'));\n }\n // scroll back to top\n window.scrollTo(0, 0);\n }\n\n render() {\n const {\n className,\n style,\n id,\n href,\n loading_state,\n children,\n title,\n target,\n } = this.props;\n /*\n * ideally, we would use cloneElement however\n * that doesn't work with dash's recursive\n * renderTree implementation for some reason\n */\n return (\n this.updateLocation(e)}\n title={title}\n target={target}\n >\n {isNil(children) ? href : children}\n \n );\n }\n}\n\nLink.propTypes = {\n /**\n * The children of this component\n */\n children: PropTypes.node,\n /**\n * The URL of a linked resource.\n */\n href: PropTypes.string.isRequired,\n /**\n * Specifies where to open the link reference.\n */\n target: PropTypes.string,\n /**\n * Controls whether or not the page will refresh when the link is clicked\n */\n refresh: PropTypes.bool,\n\n /**\n * Adds the title attribute to your link, which can contain supplementary\n * information.\n */\n title: PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n className: PropTypes.string,\n /**\n * Defines CSS styles which will override styles previously set.\n */\n style: PropTypes.object,\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nLink.defaultProps = {\n refresh: false,\n};\n","import {asyncDecorator} from '@plotly/dash-component-plugins';\nimport PropTypes from 'prop-types';\nimport React, {Component, Suspense} from 'react';\nimport markdown from '../utils/LazyLoader/markdown';\nimport lazyLoadMathJax from '../utils/LazyLoader/mathjax';\n\n// eslint-disable-next-line valid-jsdoc\n/**\n * A component that renders Markdown text as specified by the\n * GitHub Markdown spec. These component uses\n * [react-markdown](https://rexxars.github.io/react-markdown/) under the hood.\n */\nexport default class DashMarkdown extends Component {\n constructor(props) {\n super(props);\n\n if (props.mathjax) {\n DashMarkdown._loadMathjax = true;\n }\n }\n\n render() {\n return (\n \n \n \n );\n }\n}\n\nDashMarkdown.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n /**\n * Class name of the container element\n */\n className: PropTypes.string,\n\n /**\n * If true, loads mathjax v3 (tex-svg) into the page and use it in the markdown\n */\n mathjax: PropTypes.bool,\n\n /**\n * A boolean to control raw HTML escaping.\n * Setting HTML from code is risky because it's easy to\n * inadvertently expose your users to a cross-site scripting (XSS)\n * (https://en.wikipedia.org/wiki/Cross-site_scripting) attack.\n */\n dangerously_allow_html: PropTypes.bool,\n\n /**\n * A string for the target attribute to use on links (such as \"_blank\")\n */\n link_target: PropTypes.string,\n\n /**\n * A markdown string (or array of strings) that adheres to the CommonMark spec\n */\n children: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.arrayOf(PropTypes.string),\n ]),\n\n /**\n * Remove matching leading whitespace from all lines.\n * Lines that are empty, or contain *only* whitespace, are ignored.\n * Both spaces and tab characters are removed, but only if they match;\n * we will not convert tabs to spaces or vice versa.\n */\n dedent: PropTypes.bool,\n\n /**\n * Config options for syntax highlighting.\n */\n highlight_config: PropTypes.exact({\n /**\n * Color scheme; default 'light'\n */\n theme: PropTypes.oneOf(['dark', 'light']),\n }),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * User-defined inline styles for the rendered Markdown\n */\n style: PropTypes.object,\n};\n\nDashMarkdown.defaultProps = {\n mathjax: false,\n dangerously_allow_html: false,\n highlight_config: {},\n dedent: true,\n};\n\nconst RealDashMarkdown = asyncDecorator(DashMarkdown, () =>\n Promise.all([\n markdown(),\n DashMarkdown._loadMathjax ? lazyLoadMathJax() : undefined,\n ]).then(([md]) => md)\n);\n\nexport const propTypes = DashMarkdown.propTypes;\nexport const defaultProps = DashMarkdown.defaultProps;\n","export default () => import(/* webpackChunkName: \"markdown\" */ '../../fragments/Markdown.react');\n\n","export default () => import(/* webpackChunkName: \"slider\" */ '../../fragments/RangeSlider.react');\n\n","import React, {Component, lazy, Suspense} from 'react';\nimport PropTypes from 'prop-types';\nimport rangeSlider from '../utils/LazyLoader/rangeSlider';\n\nconst RealRangeSlider = lazy(rangeSlider);\n\n/**\n * A double slider with two handles.\n * Used for specifying a range of numerical values.\n */\nexport default class RangeSlider extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nRangeSlider.propTypes = {\n /**\n * Minimum allowed value of the slider\n */\n min: PropTypes.number,\n\n /**\n * Maximum allowed value of the slider\n */\n max: PropTypes.number,\n\n /**\n * Value by which increments or decrements are made\n */\n step: PropTypes.number,\n\n /**\n * Marks on the slider.\n * The key determines the position (a number),\n * and the value determines what will show.\n * If you want to set the style of a specific mark point,\n * the value should be an object which\n * contains style and label properties.\n */\n marks: PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n label: PropTypes.string,\n style: PropTypes.object,\n }),\n ])\n ),\n\n /**\n * The value of the input\n */\n value: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * The value of the input during a drag\n */\n drag_value: PropTypes.arrayOf(PropTypes.number),\n\n /**\n * allowCross could be set as true to allow those handles to cross.\n */\n allowCross: PropTypes.bool,\n\n /**\n * pushable could be set as true to allow pushing of\n * surrounding handles when moving an handle.\n * When set to a number, the number will be the\n * minimum ensured distance between handles.\n */\n pushable: PropTypes.oneOfType([PropTypes.bool, PropTypes.number]),\n\n /**\n * If true, the handles can't be moved.\n */\n disabled: PropTypes.bool,\n\n /**\n * Determine how many ranges to render, and multiple handles\n * will be rendered (number + 1).\n */\n count: PropTypes.number,\n\n /**\n * When the step value is greater than 1,\n * you can set the dots to true if you want to\n * render the slider with dots.\n */\n dots: PropTypes.bool,\n\n /**\n * If the value is true, it means a continuous\n * value is included. Otherwise, it is an independent value.\n */\n included: PropTypes.bool,\n\n /**\n * Configuration for tooltips describing the current slider values\n */\n tooltip: PropTypes.exact({\n /**\n * Determines whether tooltips should always be visible\n * (as opposed to the default, visible on hover)\n */\n always_visible: PropTypes.bool,\n\n /**\n * Determines the placement of tooltips\n * See https://github.com/react-component/tooltip#api\n * top/bottom{*} sets the _origin_ of the tooltip, so e.g. `topLeft`\n * will in reality appear to be on the top right of the handle\n */\n placement: PropTypes.oneOf([\n 'left',\n 'right',\n 'top',\n 'bottom',\n 'topLeft',\n 'topRight',\n 'bottomLeft',\n 'bottomRight',\n ]),\n }),\n\n /**\n * Determines when the component should update its `value`\n * property. If `mouseup` (the default) then the slider\n * will only trigger its value when the user has finished\n * dragging the slider. If `drag`, then the slider will\n * update its value continuously as it is being dragged.\n * Note that for the latter case, the `drag_value`\n * property could be used instead.\n */\n updatemode: PropTypes.oneOf(['mouseup', 'drag']),\n\n /**\n * If true, the slider will be vertical\n */\n vertical: PropTypes.bool,\n\n /**\n * The height, in px, of the slider if it is vertical.\n */\n verticalHeight: PropTypes.number,\n\n /**\n * Additional CSS class for the root DOM node\n */\n className: PropTypes.string,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that gets fired when the value or drag_value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `value` that the user has\n * changed while using the app will keep that change, as long as\n * the new `value` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `value` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n\nRangeSlider.defaultProps = {\n updatemode: 'mouseup',\n persisted_props: ['value'],\n persistence_type: 'local',\n verticalHeight: 400,\n};\n\nexport const propTypes = RangeSlider.propTypes;\nexport const defaultProps = RangeSlider.defaultProps;\n","export default () => import(/* webpackChunkName: \"slider\" */ '../../fragments/Slider.react');\n\n","import React, {Component, lazy, Suspense} from 'react';\nimport PropTypes from 'prop-types';\nimport slider from '../utils/LazyLoader/slider';\n\nconst RealSlider = lazy(slider);\n\n/**\n * A slider component with a single handle.\n */\nexport default class Slider extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nSlider.propTypes = {\n /**\n * Minimum allowed value of the slider\n */\n min: PropTypes.number,\n\n /**\n * Maximum allowed value of the slider\n */\n max: PropTypes.number,\n\n /**\n * Value by which increments or decrements are made\n */\n step: PropTypes.number,\n\n /**\n * Marks on the slider.\n * The key determines the position (a number),\n * and the value determines what will show.\n * If you want to set the style of a specific mark point,\n * the value should be an object which\n * contains style and label properties.\n */\n marks: PropTypes.objectOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.exact({\n label: PropTypes.string,\n style: PropTypes.object,\n }),\n ])\n ),\n\n /**\n * The value of the input\n */\n value: PropTypes.number,\n\n /**\n * The value of the input during a drag\n */\n drag_value: PropTypes.number,\n\n /**\n * If true, the handles can't be moved.\n */\n disabled: PropTypes.bool,\n\n /**\n * When the step value is greater than 1,\n * you can set the dots to true if you want to\n * render the slider with dots.\n */\n dots: PropTypes.bool,\n\n /**\n * If the value is true, it means a continuous\n * value is included. Otherwise, it is an independent value.\n */\n included: PropTypes.bool,\n\n /**\n * Configuration for tooltips describing the current slider value\n */\n tooltip: PropTypes.exact({\n /**\n * Determines whether tooltips should always be visible\n * (as opposed to the default, visible on hover)\n */\n always_visible: PropTypes.bool,\n\n /**\n * Determines the placement of tooltips\n * See https://github.com/react-component/tooltip#api\n * top/bottom{*} sets the _origin_ of the tooltip, so e.g. `topLeft`\n * will in reality appear to be on the top right of the handle\n */\n placement: PropTypes.oneOf([\n 'left',\n 'right',\n 'top',\n 'bottom',\n 'topLeft',\n 'topRight',\n 'bottomLeft',\n 'bottomRight',\n ]),\n }),\n\n /**\n * Determines when the component should update its `value`\n * property. If `mouseup` (the default) then the slider\n * will only trigger its value when the user has finished\n * dragging the slider. If `drag`, then the slider will\n * update its value continuously as it is being dragged.\n * If you want different actions during and after drag,\n * leave `updatemode` as `mouseup` and use `drag_value`\n * for the continuously updating value.\n */\n updatemode: PropTypes.oneOf(['mouseup', 'drag']),\n\n /**\n * If true, the slider will be vertical\n */\n vertical: PropTypes.bool,\n\n /**\n * The height, in px, of the slider if it is vertical.\n */\n verticalHeight: PropTypes.number,\n\n /**\n * Additional CSS class for the root DOM node\n */\n className: PropTypes.string,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Dash-assigned callback that gets fired when the value or drag_value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `value` that the user has\n * changed while using the app will keep that change, as long as\n * the new `value` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `value` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n\nSlider.defaultProps = {\n updatemode: 'mouseup',\n persisted_props: ['value'],\n persistence_type: 'local',\n verticalHeight: 400,\n};\n\nexport const propTypes = Slider.propTypes;\nexport const defaultProps = Slider.defaultProps;\n","export default () => import(/* webpackChunkName: \"upload\" */ '../../fragments/Upload.react');\n","import PropTypes from 'prop-types';\nimport React, {Component, lazy, Suspense} from 'react';\nimport upload from '../utils/LazyLoader/upload';\n\nconst RealUpload = lazy(upload);\n\n/**\n * Upload components allow your app to accept user-uploaded files via drag'n'drop\n */\nexport default class Upload extends Component {\n render() {\n return (\n \n \n \n );\n }\n}\n\nUpload.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The contents of the uploaded file as a binary string\n */\n contents: PropTypes.oneOfType([\n /**\n * If `multiple` is `false`, then the contents will be a string\n */\n PropTypes.string,\n\n /**\n * If `multiple` is `true`, then the contents will be a list of strings\n */\n PropTypes.arrayOf(PropTypes.string),\n ]),\n\n /**\n * The name of the file(s) that was(were) uploaded.\n * Note that this does not include the path of the file\n * (for security reasons).\n */\n filename: PropTypes.oneOfType([\n /**\n * If `multiple` is `false`, then the contents will be a string\n */\n PropTypes.string,\n\n /**\n * If `multiple` is `true`, then the contents will be a list of strings\n */\n PropTypes.arrayOf(PropTypes.string),\n ]),\n\n /**\n * The last modified date of the file that was uploaded in unix time\n * (seconds since 1970).\n */\n last_modified: PropTypes.oneOfType([\n /**\n * If `multiple` is `false`, then the contents will be a number\n */\n PropTypes.number,\n\n /**\n * If `multiple` is `true`, then the contents will be a list of numbers\n */\n PropTypes.arrayOf(PropTypes.number),\n ]),\n\n /**\n * Contents of the upload component\n */\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.string]),\n\n /**\n * Allow specific types of files.\n * See https://github.com/okonet/attr-accept for more information.\n * Keep in mind that mime type determination is not reliable across\n * platforms. CSV files, for example, are reported as text/plain\n * under macOS but as application/vnd.ms-excel under Windows.\n * In some cases there might not be a mime type set at all.\n * See: https://github.com/react-dropzone/react-dropzone/issues/276\n */\n accept: PropTypes.string,\n\n /**\n * Enable/disable the upload component entirely\n */\n disabled: PropTypes.bool,\n\n /**\n * Disallow clicking on the component to open the file dialog\n */\n disable_click: PropTypes.bool,\n\n /**\n * Maximum file size in bytes. If `-1`, then infinite\n */\n max_size: PropTypes.number,\n\n /**\n * Minimum file size in bytes\n */\n min_size: PropTypes.number,\n\n /**\n * Allow dropping multiple files\n */\n multiple: PropTypes.bool,\n\n /**\n * HTML class name of the component\n */\n className: PropTypes.string,\n\n /**\n * HTML class name of the component while active\n */\n className_active: PropTypes.string,\n\n /**\n * HTML class name of the component if rejected\n */\n className_reject: PropTypes.string,\n\n /**\n * HTML class name of the component if disabled\n */\n className_disabled: PropTypes.string,\n\n /**\n * CSS styles to apply\n */\n style: PropTypes.object,\n\n /**\n * CSS styles to apply while active\n */\n style_active: PropTypes.object,\n\n /**\n * CSS styles if rejected\n */\n style_reject: PropTypes.object,\n\n /**\n * CSS styles if disabled\n */\n style_disabled: PropTypes.object,\n\n /**\n * Dash-supplied function for updating props\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nUpload.defaultProps = {\n disabled: false,\n disable_click: false,\n max_size: -1,\n min_size: 0,\n multiple: false,\n style: {},\n style_active: {\n borderStyle: 'solid',\n borderColor: '#6c6',\n backgroundColor: '#eee',\n },\n style_disabled: {\n opacity: 0.5,\n },\n style_reject: {\n borderStyle: 'solid',\n borderColor: '#c66',\n backgroundColor: '#eee',\n },\n};\n\nexport const propTypes = Upload.propTypes;\nexport const defaultProps = Upload.defaultProps;\n","import moment from 'moment';\nimport {isNil} from 'ramda';\n\nexport default {\n extract: propValue => {\n if (!isNil(propValue)) {\n return moment(propValue).startOf('day').format('YYYY-MM-DD');\n }\n return propValue;\n },\n apply: storedValue => storedValue,\n};\n","export default (mathjax) => Promise.resolve(window.MathJax || (\n mathjax === false ?\n undefined :\n import(/* webpackChunkName: \"mathjax\" */ '../mathjax').then(() => window.MathJax)\n));\n","import React from 'react';\nimport {type} from 'ramda';\n\nexport const sanitizeOptions = options => {\n if (type(options) === 'Object') {\n return Object.entries(options).map(([value, label]) => ({\n label: React.isValidElement(label) ? label : String(label),\n value,\n }));\n }\n\n if (type(options) === 'Array') {\n if (\n options.length > 0 &&\n ['String', 'Number', 'Bool'].includes(type(options[0]))\n ) {\n return options.map(option => ({\n label: String(option),\n value: option,\n }));\n }\n return options;\n }\n\n return options;\n};\n","const colorString = require('color-string');\nconst convert = require('color-convert');\n\nconst skippedModels = [\n\t// To be honest, I don't really feel like keyword belongs in color convert, but eh.\n\t'keyword',\n\n\t// Gray conflicts with some method names, and has its own method defined.\n\t'gray',\n\n\t// Shouldn't really be in color-convert either...\n\t'hex',\n];\n\nconst hashedModelKeys = {};\nfor (const model of Object.keys(convert)) {\n\thashedModelKeys[[...convert[model].labels].sort().join('')] = model;\n}\n\nconst limiters = {};\n\nfunction Color(object, model) {\n\tif (!(this instanceof Color)) {\n\t\treturn new Color(object, model);\n\t}\n\n\tif (model && model in skippedModels) {\n\t\tmodel = null;\n\t}\n\n\tif (model && !(model in convert)) {\n\t\tthrow new Error('Unknown model: ' + model);\n\t}\n\n\tlet i;\n\tlet channels;\n\n\tif (object == null) { // eslint-disable-line no-eq-null,eqeqeq\n\t\tthis.model = 'rgb';\n\t\tthis.color = [0, 0, 0];\n\t\tthis.valpha = 1;\n\t} else if (object instanceof Color) {\n\t\tthis.model = object.model;\n\t\tthis.color = [...object.color];\n\t\tthis.valpha = object.valpha;\n\t} else if (typeof object === 'string') {\n\t\tconst result = colorString.get(object);\n\t\tif (result === null) {\n\t\t\tthrow new Error('Unable to parse color from string: ' + object);\n\t\t}\n\n\t\tthis.model = result.model;\n\t\tchannels = convert[this.model].channels;\n\t\tthis.color = result.value.slice(0, channels);\n\t\tthis.valpha = typeof result.value[channels] === 'number' ? result.value[channels] : 1;\n\t} else if (object.length > 0) {\n\t\tthis.model = model || 'rgb';\n\t\tchannels = convert[this.model].channels;\n\t\tconst newArray = Array.prototype.slice.call(object, 0, channels);\n\t\tthis.color = zeroArray(newArray, channels);\n\t\tthis.valpha = typeof object[channels] === 'number' ? object[channels] : 1;\n\t} else if (typeof object === 'number') {\n\t\t// This is always RGB - can be converted later on.\n\t\tthis.model = 'rgb';\n\t\tthis.color = [\n\t\t\t(object >> 16) & 0xFF,\n\t\t\t(object >> 8) & 0xFF,\n\t\t\tobject & 0xFF,\n\t\t];\n\t\tthis.valpha = 1;\n\t} else {\n\t\tthis.valpha = 1;\n\n\t\tconst keys = Object.keys(object);\n\t\tif ('alpha' in object) {\n\t\t\tkeys.splice(keys.indexOf('alpha'), 1);\n\t\t\tthis.valpha = typeof object.alpha === 'number' ? object.alpha : 0;\n\t\t}\n\n\t\tconst hashedKeys = keys.sort().join('');\n\t\tif (!(hashedKeys in hashedModelKeys)) {\n\t\t\tthrow new Error('Unable to parse color from object: ' + JSON.stringify(object));\n\t\t}\n\n\t\tthis.model = hashedModelKeys[hashedKeys];\n\n\t\tconst {labels} = convert[this.model];\n\t\tconst color = [];\n\t\tfor (i = 0; i < labels.length; i++) {\n\t\t\tcolor.push(object[labels[i]]);\n\t\t}\n\n\t\tthis.color = zeroArray(color);\n\t}\n\n\t// Perform limitations (clamping, etc.)\n\tif (limiters[this.model]) {\n\t\tchannels = convert[this.model].channels;\n\t\tfor (i = 0; i < channels; i++) {\n\t\t\tconst limit = limiters[this.model][i];\n\t\t\tif (limit) {\n\t\t\t\tthis.color[i] = limit(this.color[i]);\n\t\t\t}\n\t\t}\n\t}\n\n\tthis.valpha = Math.max(0, Math.min(1, this.valpha));\n\n\tif (Object.freeze) {\n\t\tObject.freeze(this);\n\t}\n}\n\nColor.prototype = {\n\ttoString() {\n\t\treturn this.string();\n\t},\n\n\ttoJSON() {\n\t\treturn this[this.model]();\n\t},\n\n\tstring(places) {\n\t\tlet self = this.model in colorString.to ? this : this.rgb();\n\t\tself = self.round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to[self.model](args);\n\t},\n\n\tpercentString(places) {\n\t\tconst self = this.rgb().round(typeof places === 'number' ? places : 1);\n\t\tconst args = self.valpha === 1 ? self.color : [...self.color, this.valpha];\n\t\treturn colorString.to.rgb.percent(args);\n\t},\n\n\tarray() {\n\t\treturn this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];\n\t},\n\n\tobject() {\n\t\tconst result = {};\n\t\tconst {channels} = convert[this.model];\n\t\tconst {labels} = convert[this.model];\n\n\t\tfor (let i = 0; i < channels; i++) {\n\t\t\tresult[labels[i]] = this.color[i];\n\t\t}\n\n\t\tif (this.valpha !== 1) {\n\t\t\tresult.alpha = this.valpha;\n\t\t}\n\n\t\treturn result;\n\t},\n\n\tunitArray() {\n\t\tconst rgb = this.rgb().color;\n\t\trgb[0] /= 255;\n\t\trgb[1] /= 255;\n\t\trgb[2] /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.push(this.valpha);\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tunitObject() {\n\t\tconst rgb = this.rgb().object();\n\t\trgb.r /= 255;\n\t\trgb.g /= 255;\n\t\trgb.b /= 255;\n\n\t\tif (this.valpha !== 1) {\n\t\t\trgb.alpha = this.valpha;\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tround(places) {\n\t\tplaces = Math.max(places || 0, 0);\n\t\treturn new Color([...this.color.map(roundToPlace(places)), this.valpha], this.model);\n\t},\n\n\talpha(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color([...this.color, Math.max(0, Math.min(1, value))], this.model);\n\t\t}\n\n\t\treturn this.valpha;\n\t},\n\n\t// Rgb\n\tred: getset('rgb', 0, maxfn(255)),\n\tgreen: getset('rgb', 1, maxfn(255)),\n\tblue: getset('rgb', 2, maxfn(255)),\n\n\thue: getset(['hsl', 'hsv', 'hsl', 'hwb', 'hcg'], 0, value => ((value % 360) + 360) % 360),\n\n\tsaturationl: getset('hsl', 1, maxfn(100)),\n\tlightness: getset('hsl', 2, maxfn(100)),\n\n\tsaturationv: getset('hsv', 1, maxfn(100)),\n\tvalue: getset('hsv', 2, maxfn(100)),\n\n\tchroma: getset('hcg', 1, maxfn(100)),\n\tgray: getset('hcg', 2, maxfn(100)),\n\n\twhite: getset('hwb', 1, maxfn(100)),\n\twblack: getset('hwb', 2, maxfn(100)),\n\n\tcyan: getset('cmyk', 0, maxfn(100)),\n\tmagenta: getset('cmyk', 1, maxfn(100)),\n\tyellow: getset('cmyk', 2, maxfn(100)),\n\tblack: getset('cmyk', 3, maxfn(100)),\n\n\tx: getset('xyz', 0, maxfn(95.047)),\n\ty: getset('xyz', 1, maxfn(100)),\n\tz: getset('xyz', 2, maxfn(108.833)),\n\n\tl: getset('lab', 0, maxfn(100)),\n\ta: getset('lab', 1),\n\tb: getset('lab', 2),\n\n\tkeyword(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn convert[this.model].keyword(this.color);\n\t},\n\n\thex(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\treturn colorString.to.hex(this.rgb().round().color);\n\t},\n\n\thexa(value) {\n\t\tif (value !== undefined) {\n\t\t\treturn new Color(value);\n\t\t}\n\n\t\tconst rgbArray = this.rgb().round().color;\n\n\t\tlet alphaHex = Math.round(this.valpha * 255).toString(16).toUpperCase();\n\t\tif (alphaHex.length === 1) {\n\t\t\talphaHex = '0' + alphaHex;\n\t\t}\n\n\t\treturn colorString.to.hex(rgbArray) + alphaHex;\n\t},\n\n\trgbNumber() {\n\t\tconst rgb = this.rgb().color;\n\t\treturn ((rgb[0] & 0xFF) << 16) | ((rgb[1] & 0xFF) << 8) | (rgb[2] & 0xFF);\n\t},\n\n\tluminosity() {\n\t\t// http://www.w3.org/TR/WCAG20/#relativeluminancedef\n\t\tconst rgb = this.rgb().color;\n\n\t\tconst lum = [];\n\t\tfor (const [i, element] of rgb.entries()) {\n\t\t\tconst chan = element / 255;\n\t\t\tlum[i] = (chan <= 0.04045) ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;\n\t\t}\n\n\t\treturn 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];\n\t},\n\n\tcontrast(color2) {\n\t\t// http://www.w3.org/TR/WCAG20/#contrast-ratiodef\n\t\tconst lum1 = this.luminosity();\n\t\tconst lum2 = color2.luminosity();\n\n\t\tif (lum1 > lum2) {\n\t\t\treturn (lum1 + 0.05) / (lum2 + 0.05);\n\t\t}\n\n\t\treturn (lum2 + 0.05) / (lum1 + 0.05);\n\t},\n\n\tlevel(color2) {\n\t\t// https://www.w3.org/TR/WCAG/#contrast-enhanced\n\t\tconst contrastRatio = this.contrast(color2);\n\t\tif (contrastRatio >= 7) {\n\t\t\treturn 'AAA';\n\t\t}\n\n\t\treturn (contrastRatio >= 4.5) ? 'AA' : '';\n\t},\n\n\tisDark() {\n\t\t// YIQ equation from http://24ways.org/2010/calculating-color-contrast\n\t\tconst rgb = this.rgb().color;\n\t\tconst yiq = (rgb[0] * 2126 + rgb[1] * 7152 + rgb[2] * 722) / 10000;\n\t\treturn yiq < 128;\n\t},\n\n\tisLight() {\n\t\treturn !this.isDark();\n\t},\n\n\tnegate() {\n\t\tconst rgb = this.rgb();\n\t\tfor (let i = 0; i < 3; i++) {\n\t\t\trgb.color[i] = 255 - rgb.color[i];\n\t\t}\n\n\t\treturn rgb;\n\t},\n\n\tlighten(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] += hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdarken(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[2] -= hsl.color[2] * ratio;\n\t\treturn hsl;\n\t},\n\n\tsaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] += hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\tdesaturate(ratio) {\n\t\tconst hsl = this.hsl();\n\t\thsl.color[1] -= hsl.color[1] * ratio;\n\t\treturn hsl;\n\t},\n\n\twhiten(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[1] += hwb.color[1] * ratio;\n\t\treturn hwb;\n\t},\n\n\tblacken(ratio) {\n\t\tconst hwb = this.hwb();\n\t\thwb.color[2] += hwb.color[2] * ratio;\n\t\treturn hwb;\n\t},\n\n\tgrayscale() {\n\t\t// http://en.wikipedia.org/wiki/Grayscale#Converting_color_to_grayscale\n\t\tconst rgb = this.rgb().color;\n\t\tconst value = rgb[0] * 0.3 + rgb[1] * 0.59 + rgb[2] * 0.11;\n\t\treturn Color.rgb(value, value, value);\n\t},\n\n\tfade(ratio) {\n\t\treturn this.alpha(this.valpha - (this.valpha * ratio));\n\t},\n\n\topaquer(ratio) {\n\t\treturn this.alpha(this.valpha + (this.valpha * ratio));\n\t},\n\n\trotate(degrees) {\n\t\tconst hsl = this.hsl();\n\t\tlet hue = hsl.color[0];\n\t\thue = (hue + degrees) % 360;\n\t\thue = hue < 0 ? 360 + hue : hue;\n\t\thsl.color[0] = hue;\n\t\treturn hsl;\n\t},\n\n\tmix(mixinColor, weight) {\n\t\t// Ported from sass implementation in C\n\t\t// https://github.com/sass/libsass/blob/0e6b4a2850092356aa3ece07c6b249f0221caced/functions.cpp#L209\n\t\tif (!mixinColor || !mixinColor.rgb) {\n\t\t\tthrow new Error('Argument to \"mix\" was not a Color instance, but rather an instance of ' + typeof mixinColor);\n\t\t}\n\n\t\tconst color1 = mixinColor.rgb();\n\t\tconst color2 = this.rgb();\n\t\tconst p = weight === undefined ? 0.5 : weight;\n\n\t\tconst w = 2 * p - 1;\n\t\tconst a = color1.alpha() - color2.alpha();\n\n\t\tconst w1 = (((w * a === -1) ? w : (w + a) / (1 + w * a)) + 1) / 2;\n\t\tconst w2 = 1 - w1;\n\n\t\treturn Color.rgb(\n\t\t\tw1 * color1.red() + w2 * color2.red(),\n\t\t\tw1 * color1.green() + w2 * color2.green(),\n\t\t\tw1 * color1.blue() + w2 * color2.blue(),\n\t\t\tcolor1.alpha() * p + color2.alpha() * (1 - p));\n\t},\n};\n\n// Model conversion methods and static constructors\nfor (const model of Object.keys(convert)) {\n\tif (skippedModels.includes(model)) {\n\t\tcontinue;\n\t}\n\n\tconst {channels} = convert[model];\n\n\t// Conversion methods\n\tColor.prototype[model] = function (...args) {\n\t\tif (this.model === model) {\n\t\t\treturn new Color(this);\n\t\t}\n\n\t\tif (args.length > 0) {\n\t\t\treturn new Color(args, model);\n\t\t}\n\n\t\treturn new Color([...assertArray(convert[this.model][model].raw(this.color)), this.valpha], model);\n\t};\n\n\t// 'static' construction methods\n\tColor[model] = function (...args) {\n\t\tlet color = args[0];\n\t\tif (typeof color === 'number') {\n\t\t\tcolor = zeroArray(args, channels);\n\t\t}\n\n\t\treturn new Color(color, model);\n\t};\n}\n\nfunction roundTo(number, places) {\n\treturn Number(number.toFixed(places));\n}\n\nfunction roundToPlace(places) {\n\treturn function (number) {\n\t\treturn roundTo(number, places);\n\t};\n}\n\nfunction getset(model, channel, modifier) {\n\tmodel = Array.isArray(model) ? model : [model];\n\n\tfor (const m of model) {\n\t\t(limiters[m] || (limiters[m] = []))[channel] = modifier;\n\t}\n\n\tmodel = model[0];\n\n\treturn function (value) {\n\t\tlet result;\n\n\t\tif (value !== undefined) {\n\t\t\tif (modifier) {\n\t\t\t\tvalue = modifier(value);\n\t\t\t}\n\n\t\t\tresult = this[model]();\n\t\t\tresult.color[channel] = value;\n\t\t\treturn result;\n\t\t}\n\n\t\tresult = this[model]().color[channel];\n\t\tif (modifier) {\n\t\t\tresult = modifier(result);\n\t\t}\n\n\t\treturn result;\n\t};\n}\n\nfunction maxfn(max) {\n\treturn function (v) {\n\t\treturn Math.max(0, Math.min(max, v));\n\t};\n}\n\nfunction assertArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\nfunction zeroArray(array, length) {\n\tfor (let i = 0; i < length; i++) {\n\t\tif (typeof array[i] !== 'number') {\n\t\t\tarray[i] = 0;\n\t\t}\n\t}\n\n\treturn array;\n}\n\nmodule.exports = Color;\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","//! moment.js locale configuration\n//! locale : Afrikaans [af]\n//! author : Werner Mollentze : https://github.com/wernerm\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var af = moment.defineLocale('af', {\n months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split(\n '_'\n ),\n weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'),\n weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'),\n meridiemParse: /vm|nm/i,\n isPM: function (input) {\n return /^nm$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'vm' : 'VM';\n } else {\n return isLower ? 'nm' : 'NM';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Vandag om] LT',\n nextDay: '[Môre om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[Gister om] LT',\n lastWeek: '[Laas] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oor %s',\n past: '%s gelede',\n s: \"'n paar sekondes\",\n ss: '%d sekondes',\n m: \"'n minuut\",\n mm: '%d minute',\n h: \"'n uur\",\n hh: '%d ure',\n d: \"'n dag\",\n dd: '%d dae',\n M: \"'n maand\",\n MM: '%d maande',\n y: \"'n jaar\",\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n ); // Thanks to Joris Röling : https://github.com/jjupiter\n },\n week: {\n dow: 1, // Maandag is die eerste dag van die week.\n doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.\n },\n });\n\n return af;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Algeria) [ar-dz]\n//! author : Amine Roukh: https://github.com/Amine27\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n//! author : Noureddine LOUAHEDJ : https://github.com/noureddinem\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'جانفي',\n 'فيفري',\n 'مارس',\n 'أفريل',\n 'ماي',\n 'جوان',\n 'جويلية',\n 'أوت',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arDz = moment.defineLocale('ar-dz', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arDz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Kuwait) [ar-kw]\n//! author : Nusret Parlak: https://github.com/nusretparlak\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arKw = moment.defineLocale('ar-kw', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arKw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Libya) [ar-ly]\n//! author : Ali Hmer: https://github.com/kikoanis\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '1',\n 2: '2',\n 3: '3',\n 4: '4',\n 5: '5',\n 6: '6',\n 7: '7',\n 8: '8',\n 9: '9',\n 0: '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var arLy = moment.defineLocale('ar-ly', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return arLy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Morocco) [ar-ma]\n//! author : ElFadili Yassine : https://github.com/ElFadiliY\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arMa = moment.defineLocale('ar-ma', {\n months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arMa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Saudi Arabia) [ar-sa]\n//! author : Suhail Alkowaileet : https://github.com/xsoh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n };\n\n var arSa = moment.defineLocale('ar-sa', {\n months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return arSa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic (Tunisia) [ar-tn]\n//! author : Nader Toukabri : https://github.com/naderio\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var arTn = moment.defineLocale('ar-tn', {\n months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n monthsShort:\n 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split(\n '_'\n ),\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[اليوم على الساعة] LT',\n nextDay: '[غدا على الساعة] LT',\n nextWeek: 'dddd [على الساعة] LT',\n lastDay: '[أمس على الساعة] LT',\n lastWeek: 'dddd [على الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'في %s',\n past: 'منذ %s',\n s: 'ثوان',\n ss: '%d ثانية',\n m: 'دقيقة',\n mm: '%d دقائق',\n h: 'ساعة',\n hh: '%d ساعات',\n d: 'يوم',\n dd: '%d أيام',\n M: 'شهر',\n MM: '%d أشهر',\n y: 'سنة',\n yy: '%d سنوات',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return arTn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Arabic [ar]\n//! author : Abdel Said: https://github.com/abdelsaid\n//! author : Ahmed Elkhatib\n//! author : forabi https://github.com/forabi\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n pluralForm = function (n) {\n return n === 0\n ? 0\n : n === 1\n ? 1\n : n === 2\n ? 2\n : n % 100 >= 3 && n % 100 <= 10\n ? 3\n : n % 100 >= 11\n ? 4\n : 5;\n },\n plurals = {\n s: [\n 'أقل من ثانية',\n 'ثانية واحدة',\n ['ثانيتان', 'ثانيتين'],\n '%d ثوان',\n '%d ثانية',\n '%d ثانية',\n ],\n m: [\n 'أقل من دقيقة',\n 'دقيقة واحدة',\n ['دقيقتان', 'دقيقتين'],\n '%d دقائق',\n '%d دقيقة',\n '%d دقيقة',\n ],\n h: [\n 'أقل من ساعة',\n 'ساعة واحدة',\n ['ساعتان', 'ساعتين'],\n '%d ساعات',\n '%d ساعة',\n '%d ساعة',\n ],\n d: [\n 'أقل من يوم',\n 'يوم واحد',\n ['يومان', 'يومين'],\n '%d أيام',\n '%d يومًا',\n '%d يوم',\n ],\n M: [\n 'أقل من شهر',\n 'شهر واحد',\n ['شهران', 'شهرين'],\n '%d أشهر',\n '%d شهرا',\n '%d شهر',\n ],\n y: [\n 'أقل من عام',\n 'عام واحد',\n ['عامان', 'عامين'],\n '%d أعوام',\n '%d عامًا',\n '%d عام',\n ],\n },\n pluralize = function (u) {\n return function (number, withoutSuffix, string, isFuture) {\n var f = pluralForm(number),\n str = plurals[u][pluralForm(number)];\n if (f === 2) {\n str = str[withoutSuffix ? 0 : 1];\n }\n return str.replace(/%d/i, number);\n };\n },\n months = [\n 'يناير',\n 'فبراير',\n 'مارس',\n 'أبريل',\n 'مايو',\n 'يونيو',\n 'يوليو',\n 'أغسطس',\n 'سبتمبر',\n 'أكتوبر',\n 'نوفمبر',\n 'ديسمبر',\n ];\n\n var ar = moment.defineLocale('ar', {\n months: months,\n monthsShort: months,\n weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'),\n weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'),\n weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/\\u200FM/\\u200FYYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ص|م/,\n isPM: function (input) {\n return 'م' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ص';\n } else {\n return 'م';\n }\n },\n calendar: {\n sameDay: '[اليوم عند الساعة] LT',\n nextDay: '[غدًا عند الساعة] LT',\n nextWeek: 'dddd [عند الساعة] LT',\n lastDay: '[أمس عند الساعة] LT',\n lastWeek: 'dddd [عند الساعة] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'بعد %s',\n past: 'منذ %s',\n s: pluralize('s'),\n ss: pluralize('s'),\n m: pluralize('m'),\n mm: pluralize('m'),\n h: pluralize('h'),\n hh: pluralize('h'),\n d: pluralize('d'),\n dd: pluralize('d'),\n M: pluralize('M'),\n MM: pluralize('M'),\n y: pluralize('y'),\n yy: pluralize('y'),\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ar;\n\n})));\n","//! moment.js locale configuration\n//! locale : Azerbaijani [az]\n//! author : topchiyev : https://github.com/topchiyev\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: '-inci',\n 5: '-inci',\n 8: '-inci',\n 70: '-inci',\n 80: '-inci',\n 2: '-nci',\n 7: '-nci',\n 20: '-nci',\n 50: '-nci',\n 3: '-üncü',\n 4: '-üncü',\n 100: '-üncü',\n 6: '-ncı',\n 9: '-uncu',\n 10: '-uncu',\n 30: '-uncu',\n 60: '-ıncı',\n 90: '-ıncı',\n };\n\n var az = moment.defineLocale('az', {\n months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split(\n '_'\n ),\n monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'),\n weekdays:\n 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split(\n '_'\n ),\n weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'),\n weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[sabah saat] LT',\n nextWeek: '[gələn həftə] dddd [saat] LT',\n lastDay: '[dünən] LT',\n lastWeek: '[keçən həftə] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s əvvəl',\n s: 'bir neçə saniyə',\n ss: '%d saniyə',\n m: 'bir dəqiqə',\n mm: '%d dəqiqə',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir il',\n yy: '%d il',\n },\n meridiemParse: /gecə|səhər|gündüz|axşam/,\n isPM: function (input) {\n return /^(gündüz|axşam)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'gecə';\n } else if (hour < 12) {\n return 'səhər';\n } else if (hour < 17) {\n return 'gündüz';\n } else {\n return 'axşam';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,\n ordinal: function (number) {\n if (number === 0) {\n // special case for zero\n return number + '-ıncı';\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return az;\n\n})));\n","//! moment.js locale configuration\n//! locale : Belarusian [be]\n//! author : Dmitry Demidov : https://github.com/demidov91\n//! author: Praleska: http://praleska.pro/\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін',\n hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін',\n dd: 'дзень_дні_дзён',\n MM: 'месяц_месяцы_месяцаў',\n yy: 'год_гады_гадоў',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвіліна' : 'хвіліну';\n } else if (key === 'h') {\n return withoutSuffix ? 'гадзіна' : 'гадзіну';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n\n var be = moment.defineLocale('be', {\n months: {\n format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split(\n '_'\n ),\n standalone:\n 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split(\n '_'\n ),\n },\n monthsShort:\n 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split('_'),\n weekdays: {\n format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split(\n '_'\n ),\n standalone:\n 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split(\n '_'\n ),\n isFormat: /\\[ ?[Ууў] ?(?:мінулую|наступную)? ?\\] ?dddd/,\n },\n weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., HH:mm',\n LLLL: 'dddd, D MMMM YYYY г., HH:mm',\n },\n calendar: {\n sameDay: '[Сёння ў] LT',\n nextDay: '[Заўтра ў] LT',\n lastDay: '[Учора ў] LT',\n nextWeek: function () {\n return '[У] dddd [ў] LT';\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return '[У мінулую] dddd [ў] LT';\n case 1:\n case 2:\n case 4:\n return '[У мінулы] dddd [ў] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'праз %s',\n past: '%s таму',\n s: 'некалькі секунд',\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithPlural,\n hh: relativeTimeWithPlural,\n d: 'дзень',\n dd: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночы|раніцы|дня|вечара/,\n isPM: function (input) {\n return /^(дня|вечара)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночы';\n } else if (hour < 12) {\n return 'раніцы';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечара';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(і|ы|га)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return (number % 10 === 2 || number % 10 === 3) &&\n number % 100 !== 12 &&\n number % 100 !== 13\n ? number + '-і'\n : number + '-ы';\n case 'D':\n return number + '-га';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return be;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bulgarian [bg]\n//! author : Krasen Borisov : https://github.com/kraz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bg = moment.defineLocale('bg', {\n months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Днес в] LT',\n nextDay: '[Утре в] LT',\n nextWeek: 'dddd [в] LT',\n lastDay: '[Вчера в] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Миналата] dddd [в] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Миналия] dddd [в] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'след %s',\n past: 'преди %s',\n s: 'няколко секунди',\n ss: '%d секунди',\n m: 'минута',\n mm: '%d минути',\n h: 'час',\n hh: '%d часа',\n d: 'ден',\n dd: '%d дена',\n w: 'седмица',\n ww: '%d седмици',\n M: 'месец',\n MM: '%d месеца',\n y: 'година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bambara [bm]\n//! author : Estelle Comment : https://github.com/estellecomment\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var bm = moment.defineLocale('bm', {\n months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split(\n '_'\n ),\n monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'),\n weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'),\n weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'),\n weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'MMMM [tile] D [san] YYYY',\n LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm',\n },\n calendar: {\n sameDay: '[Bi lɛrɛ] LT',\n nextDay: '[Sini lɛrɛ] LT',\n nextWeek: 'dddd [don lɛrɛ] LT',\n lastDay: '[Kunu lɛrɛ] LT',\n lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s kɔnɔ',\n past: 'a bɛ %s bɔ',\n s: 'sanga dama dama',\n ss: 'sekondi %d',\n m: 'miniti kelen',\n mm: 'miniti %d',\n h: 'lɛrɛ kelen',\n hh: 'lɛrɛ %d',\n d: 'tile kelen',\n dd: 'tile %d',\n M: 'kalo kelen',\n MM: 'kalo %d',\n y: 'san kelen',\n yy: 'san %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return bm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali (Bangladesh) [bn-bd]\n//! author : Asraf Hossain Patoary : https://github.com/ashwoolford\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bnBd = moment.defineLocale('bn-bd', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n\n meridiemParse: /রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'রাত') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ভোর') {\n return hour;\n } else if (meridiem === 'সকাল') {\n return hour;\n } else if (meridiem === 'দুপুর') {\n return hour >= 3 ? hour : hour + 12;\n } else if (meridiem === 'বিকাল') {\n return hour + 12;\n } else if (meridiem === 'সন্ধ্যা') {\n return hour + 12;\n }\n },\n\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 6) {\n return 'ভোর';\n } else if (hour < 12) {\n return 'সকাল';\n } else if (hour < 15) {\n return 'দুপুর';\n } else if (hour < 18) {\n return 'বিকাল';\n } else if (hour < 20) {\n return 'সন্ধ্যা';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bnBd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bengali [bn]\n//! author : Kaushik Gandhi : https://github.com/kaushikgandhi\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '১',\n 2: '২',\n 3: '৩',\n 4: '৪',\n 5: '৫',\n 6: '৬',\n 7: '৭',\n 8: '৮',\n 9: '৯',\n 0: '০',\n },\n numberMap = {\n '১': '1',\n '২': '2',\n '৩': '3',\n '৪': '4',\n '৫': '5',\n '৬': '6',\n '৭': '7',\n '৮': '8',\n '৯': '9',\n '০': '0',\n };\n\n var bn = moment.defineLocale('bn', {\n months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split(\n '_'\n ),\n monthsShort:\n 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split(\n '_'\n ),\n weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split(\n '_'\n ),\n weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),\n weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'),\n longDateFormat: {\n LT: 'A h:mm সময়',\n LTS: 'A h:mm:ss সময়',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm সময়',\n LLLL: 'dddd, D MMMM YYYY, A h:mm সময়',\n },\n calendar: {\n sameDay: '[আজ] LT',\n nextDay: '[আগামীকাল] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[গতকাল] LT',\n lastWeek: '[গত] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s পরে',\n past: '%s আগে',\n s: 'কয়েক সেকেন্ড',\n ss: '%d সেকেন্ড',\n m: 'এক মিনিট',\n mm: '%d মিনিট',\n h: 'এক ঘন্টা',\n hh: '%d ঘন্টা',\n d: 'এক দিন',\n dd: '%d দিন',\n M: 'এক মাস',\n MM: '%d মাস',\n y: 'এক বছর',\n yy: '%d বছর',\n },\n preparse: function (string) {\n return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'রাত' && hour >= 4) ||\n (meridiem === 'দুপুর' && hour < 5) ||\n meridiem === 'বিকাল'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'রাত';\n } else if (hour < 10) {\n return 'সকাল';\n } else if (hour < 17) {\n return 'দুপুর';\n } else if (hour < 20) {\n return 'বিকাল';\n } else {\n return 'রাত';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tibetan [bo]\n//! author : Thupten N. Chakrishar : https://github.com/vajradog\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '༡',\n 2: '༢',\n 3: '༣',\n 4: '༤',\n 5: '༥',\n 6: '༦',\n 7: '༧',\n 8: '༨',\n 9: '༩',\n 0: '༠',\n },\n numberMap = {\n '༡': '1',\n '༢': '2',\n '༣': '3',\n '༤': '4',\n '༥': '5',\n '༦': '6',\n '༧': '7',\n '༨': '8',\n '༩': '9',\n '༠': '0',\n };\n\n var bo = moment.defineLocale('bo', {\n months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split(\n '_'\n ),\n monthsShort:\n 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split(\n '_'\n ),\n monthsShortRegex: /^(ཟླ་\\d{1,2})/,\n monthsParseExact: true,\n weekdays:\n 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split(\n '_'\n ),\n weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split(\n '_'\n ),\n weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[དི་རིང] LT',\n nextDay: '[སང་ཉིན] LT',\n nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT',\n lastDay: '[ཁ་སང] LT',\n lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ལ་',\n past: '%s སྔན་ལ',\n s: 'ལམ་སང',\n ss: '%d སྐར་ཆ།',\n m: 'སྐར་མ་གཅིག',\n mm: '%d སྐར་མ',\n h: 'ཆུ་ཚོད་གཅིག',\n hh: '%d ཆུ་ཚོད',\n d: 'ཉིན་གཅིག',\n dd: '%d ཉིན་',\n M: 'ཟླ་བ་གཅིག',\n MM: '%d ཟླ་བ',\n y: 'ལོ་གཅིག',\n yy: '%d ལོ',\n },\n preparse: function (string) {\n return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'མཚན་མོ' && hour >= 4) ||\n (meridiem === 'ཉིན་གུང' && hour < 5) ||\n meridiem === 'དགོང་དག'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'མཚན་མོ';\n } else if (hour < 10) {\n return 'ཞོགས་ཀས';\n } else if (hour < 17) {\n return 'ཉིན་གུང';\n } else if (hour < 20) {\n return 'དགོང་དག';\n } else {\n return 'མཚན་མོ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return bo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Breton [br]\n//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithMutation(number, withoutSuffix, key) {\n var format = {\n mm: 'munutenn',\n MM: 'miz',\n dd: 'devezh',\n };\n return number + ' ' + mutation(format[key], number);\n }\n function specialMutationForYears(number) {\n switch (lastNumber(number)) {\n case 1:\n case 3:\n case 4:\n case 5:\n case 9:\n return number + ' bloaz';\n default:\n return number + ' vloaz';\n }\n }\n function lastNumber(number) {\n if (number > 9) {\n return lastNumber(number % 10);\n }\n return number;\n }\n function mutation(text, number) {\n if (number === 2) {\n return softMutation(text);\n }\n return text;\n }\n function softMutation(text) {\n var mutationTable = {\n m: 'v',\n b: 'v',\n d: 'z',\n };\n if (mutationTable[text.charAt(0)] === undefined) {\n return text;\n }\n return mutationTable[text.charAt(0)] + text.substring(1);\n }\n\n var monthsParse = [\n /^gen/i,\n /^c[ʼ\\']hwe/i,\n /^meu/i,\n /^ebr/i,\n /^mae/i,\n /^(mez|eve)/i,\n /^gou/i,\n /^eos/i,\n /^gwe/i,\n /^her/i,\n /^du/i,\n /^ker/i,\n ],\n monthsRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n monthsStrictRegex =\n /^(genver|c[ʼ\\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,\n monthsShortStrictRegex =\n /^(gen|c[ʼ\\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,\n fullWeekdaysParse = [\n /^sul/i,\n /^lun/i,\n /^meurzh/i,\n /^merc[ʼ\\']her/i,\n /^yaou/i,\n /^gwener/i,\n /^sadorn/i,\n ],\n shortWeekdaysParse = [\n /^Sul/i,\n /^Lun/i,\n /^Meu/i,\n /^Mer/i,\n /^Yao/i,\n /^Gwe/i,\n /^Sad/i,\n ],\n minWeekdaysParse = [\n /^Su/i,\n /^Lu/i,\n /^Me([^r]|$)/i,\n /^Mer/i,\n /^Ya/i,\n /^Gw/i,\n /^Sa/i,\n ];\n\n var br = moment.defineLocale('br', {\n months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split(\n '_'\n ),\n monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'),\n weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'),\n weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'),\n weekdaysParse: minWeekdaysParse,\n fullWeekdaysParse: fullWeekdaysParse,\n shortWeekdaysParse: shortWeekdaysParse,\n minWeekdaysParse: minWeekdaysParse,\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [a viz] MMMM YYYY',\n LLL: 'D [a viz] MMMM YYYY HH:mm',\n LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hiziv da] LT',\n nextDay: '[Warcʼhoazh da] LT',\n nextWeek: 'dddd [da] LT',\n lastDay: '[Decʼh da] LT',\n lastWeek: 'dddd [paset da] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'a-benn %s',\n past: '%s ʼzo',\n s: 'un nebeud segondennoù',\n ss: '%d eilenn',\n m: 'ur vunutenn',\n mm: relativeTimeWithMutation,\n h: 'un eur',\n hh: '%d eur',\n d: 'un devezh',\n dd: relativeTimeWithMutation,\n M: 'ur miz',\n MM: relativeTimeWithMutation,\n y: 'ur bloaz',\n yy: specialMutationForYears,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(añ|vet)/,\n ordinal: function (number) {\n var output = number === 1 ? 'añ' : 'vet';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn\n isPM: function (token) {\n return token === 'g.m.';\n },\n meridiem: function (hour, minute, isLower) {\n return hour < 12 ? 'a.m.' : 'g.m.';\n },\n });\n\n return br;\n\n})));\n","//! moment.js locale configuration\n//! locale : Bosnian [bs]\n//! author : Nedim Cholich : https://github.com/frontyard\n//! based on (hr) translation by Bojan Marković\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var bs = moment.defineLocale('bs', {\n months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n return '[prošlu] dddd [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return bs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Catalan [ca]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ca = moment.defineLocale('ca', {\n months: {\n standalone:\n 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split(\n '_'\n ),\n format: \"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a les] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextDay: function () {\n return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastDay: function () {\n return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [passat a ' +\n (this.hours() !== 1 ? 'les' : 'la') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'uns segons',\n ss: '%d segons',\n m: 'un minut',\n mm: '%d minuts',\n h: 'una hora',\n hh: '%d hores',\n d: 'un dia',\n dd: '%d dies',\n M: 'un mes',\n MM: '%d mesos',\n y: 'un any',\n yy: '%d anys',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ca;\n\n})));\n","//! moment.js locale configuration\n//! locale : Czech [cs]\n//! author : petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = {\n format: 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split(\n '_'\n ),\n standalone:\n 'ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince'.split(\n '_'\n ),\n },\n monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'),\n monthsParse = [\n /^led/i,\n /^úno/i,\n /^bře/i,\n /^dub/i,\n /^kvě/i,\n /^(čvn|červen$|června)/i,\n /^(čvc|červenec|července)/i,\n /^srp/i,\n /^zář/i,\n /^říj/i,\n /^lis/i,\n /^pro/i,\n ],\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsRegex =\n /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;\n\n function plural(n) {\n return n > 1 && n < 5 && ~~(n / 10) !== 1;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekund');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minuty' : 'minut');\n } else {\n return result + 'minutami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodin');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'den' : 'dnem';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dny' : 'dní');\n } else {\n return result + 'dny';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'měsíc' : 'měsícem';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'měsíce' : 'měsíců');\n } else {\n return result + 'měsíci';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokem';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'let');\n } else {\n return result + 'lety';\n }\n }\n }\n\n var cs = moment.defineLocale('cs', {\n months: months,\n monthsShort: monthsShort,\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched.\n // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'.\n monthsStrictRegex:\n /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,\n monthsShortStrictRegex:\n /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'),\n weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'),\n weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n l: 'D. M. YYYY',\n },\n calendar: {\n sameDay: '[dnes v] LT',\n nextDay: '[zítra v] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v neděli v] LT';\n case 1:\n case 2:\n return '[v] dddd [v] LT';\n case 3:\n return '[ve středu v] LT';\n case 4:\n return '[ve čtvrtek v] LT';\n case 5:\n return '[v pátek v] LT';\n case 6:\n return '[v sobotu v] LT';\n }\n },\n lastDay: '[včera v] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulou neděli v] LT';\n case 1:\n case 2:\n return '[minulé] dddd [v] LT';\n case 3:\n return '[minulou středu v] LT';\n case 4:\n case 5:\n return '[minulý] dddd [v] LT';\n case 6:\n return '[minulou sobotu v] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'před %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chuvash [cv]\n//! author : Anatoly Mironov : https://github.com/mirontoli\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cv = moment.defineLocale('cv', {\n months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split(\n '_'\n ),\n monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'),\n weekdays:\n 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split(\n '_'\n ),\n weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'),\n weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]',\n LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm',\n },\n calendar: {\n sameDay: '[Паян] LT [сехетре]',\n nextDay: '[Ыран] LT [сехетре]',\n lastDay: '[Ӗнер] LT [сехетре]',\n nextWeek: '[Ҫитес] dddd LT [сехетре]',\n lastWeek: '[Иртнӗ] dddd LT [сехетре]',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (output) {\n var affix = /сехет$/i.exec(output)\n ? 'рен'\n : /ҫул$/i.exec(output)\n ? 'тан'\n : 'ран';\n return output + affix;\n },\n past: '%s каялла',\n s: 'пӗр-ик ҫеккунт',\n ss: '%d ҫеккунт',\n m: 'пӗр минут',\n mm: '%d минут',\n h: 'пӗр сехет',\n hh: '%d сехет',\n d: 'пӗр кун',\n dd: '%d кун',\n M: 'пӗр уйӑх',\n MM: '%d уйӑх',\n y: 'пӗр ҫул',\n yy: '%d ҫул',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-мӗш/,\n ordinal: '%d-мӗш',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return cv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Welsh [cy]\n//! author : Robert Allen : https://github.com/robgallen\n//! author : https://github.com/ryangreaves\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var cy = moment.defineLocale('cy', {\n months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split(\n '_'\n ),\n monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split(\n '_'\n ),\n weekdays:\n 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split(\n '_'\n ),\n weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),\n weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),\n weekdaysParseExact: true,\n // time formats are the same as en-gb\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Heddiw am] LT',\n nextDay: '[Yfory am] LT',\n nextWeek: 'dddd [am] LT',\n lastDay: '[Ddoe am] LT',\n lastWeek: 'dddd [diwethaf am] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'mewn %s',\n past: '%s yn ôl',\n s: 'ychydig eiliadau',\n ss: '%d eiliad',\n m: 'munud',\n mm: '%d munud',\n h: 'awr',\n hh: '%d awr',\n d: 'diwrnod',\n dd: '%d diwrnod',\n M: 'mis',\n MM: '%d mis',\n y: 'blwyddyn',\n yy: '%d flynedd',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,\n // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh\n ordinal: function (number) {\n var b = number,\n output = '',\n lookup = [\n '',\n 'af',\n 'il',\n 'ydd',\n 'ydd',\n 'ed',\n 'ed',\n 'ed',\n 'fed',\n 'fed',\n 'fed', // 1af to 10fed\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'eg',\n 'fed',\n 'eg',\n 'fed', // 11eg to 20fed\n ];\n if (b > 20) {\n if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {\n output = 'fed'; // not 30ain, 70ain or 90ain\n } else {\n output = 'ain';\n }\n } else if (b > 0) {\n output = lookup[b];\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return cy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Danish [da]\n//! author : Ulrik Nielsen : https://github.com/mrbase\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var da = moment.defineLocale('da', {\n months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'på dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[i] dddd[s kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'få sekunder',\n ss: '%d sekunder',\n m: 'et minut',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dage',\n M: 'en måned',\n MM: '%d måneder',\n y: 'et år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return da;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Austria) [de-at]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Martin Groller : https://github.com/MadMG\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deAt = moment.defineLocale('de-at', {\n months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deAt;\n\n})));\n","//! moment.js locale configuration\n//! locale : German (Switzerland) [de-ch]\n//! author : sschueller : https://github.com/sschueller\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var deCh = moment.defineLocale('de-ch', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return deCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : German [de]\n//! author : lluchs : https://github.com/lluchs\n//! author: Menelion Elensúle: https://github.com/Oire\n//! author : Mikolaj Dadela : https://github.com/mik01aj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eine Minute', 'einer Minute'],\n h: ['eine Stunde', 'einer Stunde'],\n d: ['ein Tag', 'einem Tag'],\n dd: [number + ' Tage', number + ' Tagen'],\n w: ['eine Woche', 'einer Woche'],\n M: ['ein Monat', 'einem Monat'],\n MM: [number + ' Monate', number + ' Monaten'],\n y: ['ein Jahr', 'einem Jahr'],\n yy: [number + ' Jahre', number + ' Jahren'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n\n var de = moment.defineLocale('de', {\n months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays:\n 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(\n '_'\n ),\n weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY HH:mm',\n LLLL: 'dddd, D. MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[heute um] LT [Uhr]',\n sameElse: 'L',\n nextDay: '[morgen um] LT [Uhr]',\n nextWeek: 'dddd [um] LT [Uhr]',\n lastDay: '[gestern um] LT [Uhr]',\n lastWeek: '[letzten] dddd [um] LT [Uhr]',\n },\n relativeTime: {\n future: 'in %s',\n past: 'vor %s',\n s: 'ein paar Sekunden',\n ss: '%d Sekunden',\n m: processRelativeTime,\n mm: '%d Minuten',\n h: processRelativeTime,\n hh: '%d Stunden',\n d: processRelativeTime,\n dd: processRelativeTime,\n w: processRelativeTime,\n ww: '%d Wochen',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return de;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maldivian [dv]\n//! author : Jawish Hameed : https://github.com/jawish\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'ޖެނުއަރީ',\n 'ފެބްރުއަރީ',\n 'މާރިޗު',\n 'އޭޕްރީލު',\n 'މޭ',\n 'ޖޫން',\n 'ޖުލައި',\n 'އޯގަސްޓު',\n 'ސެޕްޓެމްބަރު',\n 'އޮކްޓޯބަރު',\n 'ނޮވެމްބަރު',\n 'ޑިސެމްބަރު',\n ],\n weekdays = [\n 'އާދިއްތަ',\n 'ހޯމަ',\n 'އަންގާރަ',\n 'ބުދަ',\n 'ބުރާސްފަތި',\n 'ހުކުރު',\n 'ހޮނިހިރު',\n ];\n\n var dv = moment.defineLocale('dv', {\n months: months,\n monthsShort: months,\n weekdays: weekdays,\n weekdaysShort: weekdays,\n weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'D/M/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /މކ|މފ/,\n isPM: function (input) {\n return 'މފ' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'މކ';\n } else {\n return 'މފ';\n }\n },\n calendar: {\n sameDay: '[މިއަދު] LT',\n nextDay: '[މާދަމާ] LT',\n nextWeek: 'dddd LT',\n lastDay: '[އިއްޔެ] LT',\n lastWeek: '[ފާއިތުވި] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ތެރޭގައި %s',\n past: 'ކުރިން %s',\n s: 'ސިކުންތުކޮޅެއް',\n ss: 'd% ސިކުންތު',\n m: 'މިނިޓެއް',\n mm: 'މިނިޓު %d',\n h: 'ގަޑިއިރެއް',\n hh: 'ގަޑިއިރު %d',\n d: 'ދުވަހެއް',\n dd: 'ދުވަސް %d',\n M: 'މަހެއް',\n MM: 'މަސް %d',\n y: 'އަހަރެއް',\n yy: 'އަހަރު %d',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 7, // Sunday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return dv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Greek [el]\n//! author : Aggelos Karalias : https://github.com/mehiel\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n var el = moment.defineLocale('el', {\n monthsNominativeEl:\n 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split(\n '_'\n ),\n monthsGenitiveEl:\n 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split(\n '_'\n ),\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return this._monthsNominativeEl;\n } else if (\n typeof format === 'string' &&\n /D/.test(format.substring(0, format.indexOf('MMMM')))\n ) {\n // if there is a day number before 'MMMM'\n return this._monthsGenitiveEl[momentToFormat.month()];\n } else {\n return this._monthsNominativeEl[momentToFormat.month()];\n }\n },\n monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'),\n weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split(\n '_'\n ),\n weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'),\n weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'μμ' : 'ΜΜ';\n } else {\n return isLower ? 'πμ' : 'ΠΜ';\n }\n },\n isPM: function (input) {\n return (input + '').toLowerCase()[0] === 'μ';\n },\n meridiemParse: /[ΠΜ]\\.?Μ?\\.?/i,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendarEl: {\n sameDay: '[Σήμερα {}] LT',\n nextDay: '[Αύριο {}] LT',\n nextWeek: 'dddd [{}] LT',\n lastDay: '[Χθες {}] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 6:\n return '[το προηγούμενο] dddd [{}] LT';\n default:\n return '[την προηγούμενη] dddd [{}] LT';\n }\n },\n sameElse: 'L',\n },\n calendar: function (key, mom) {\n var output = this._calendarEl[key],\n hours = mom && mom.hours();\n if (isFunction(output)) {\n output = output.apply(mom);\n }\n return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις');\n },\n relativeTime: {\n future: 'σε %s',\n past: '%s πριν',\n s: 'λίγα δευτερόλεπτα',\n ss: '%d δευτερόλεπτα',\n m: 'ένα λεπτό',\n mm: '%d λεπτά',\n h: 'μία ώρα',\n hh: '%d ώρες',\n d: 'μία μέρα',\n dd: '%d μέρες',\n M: 'ένας μήνας',\n MM: '%d μήνες',\n y: 'ένας χρόνος',\n yy: '%d χρόνια',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}η/,\n ordinal: '%dη',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4st is the first week of the year.\n },\n });\n\n return el;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Australia) [en-au]\n//! author : Jared Morse : https://github.com/jarcoal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enAu = moment.defineLocale('en-au', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enAu;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Canada) [en-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enCa = moment.defineLocale('en-ca', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'YYYY-MM-DD',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (United Kingdom) [en-gb]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enGb = moment.defineLocale('en-gb', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enGb;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Ireland) [en-ie]\n//! author : Chris Cartlidge : https://github.com/chriscartlidge\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIe = moment.defineLocale('en-ie', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enIe;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Israel) [en-il]\n//! author : Chris Gedrim : https://github.com/chrisgedrim\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIl = moment.defineLocale('en-il', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n return enIl;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (India) [en-in]\n//! author : Jatin Agrawal : https://github.com/jatinag22\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enIn = moment.defineLocale('en-in', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return enIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (New Zealand) [en-nz]\n//! author : Luke McGregor : https://github.com/lukemcgregor\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enNz = moment.defineLocale('en-nz', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enNz;\n\n})));\n","//! moment.js locale configuration\n//! locale : English (Singapore) [en-sg]\n//! author : Matthew Castrillon-Madrigal : https://github.com/techdimension\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var enSg = moment.defineLocale('en-sg', {\n months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(\n '_'\n ),\n weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return enSg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Esperanto [eo]\n//! author : Colin Dean : https://github.com/colindean\n//! author : Mia Nordentoft Imperatori : https://github.com/miestasmia\n//! comment : miestasmia corrected the translation by colindean\n//! comment : Vivakvo corrected the translation by colindean and miestasmia\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eo = moment.defineLocale('eo', {\n months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'),\n weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'),\n weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'),\n weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: '[la] D[-an de] MMMM, YYYY',\n LLL: '[la] D[-an de] MMMM, YYYY HH:mm',\n LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm',\n llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm',\n },\n meridiemParse: /[ap]\\.t\\.m/i,\n isPM: function (input) {\n return input.charAt(0).toLowerCase() === 'p';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'p.t.m.' : 'P.T.M.';\n } else {\n return isLower ? 'a.t.m.' : 'A.T.M.';\n }\n },\n calendar: {\n sameDay: '[Hodiaŭ je] LT',\n nextDay: '[Morgaŭ je] LT',\n nextWeek: 'dddd[n je] LT',\n lastDay: '[Hieraŭ je] LT',\n lastWeek: '[pasintan] dddd[n je] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'post %s',\n past: 'antaŭ %s',\n s: 'kelkaj sekundoj',\n ss: '%d sekundoj',\n m: 'unu minuto',\n mm: '%d minutoj',\n h: 'unu horo',\n hh: '%d horoj',\n d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo\n dd: '%d tagoj',\n M: 'unu monato',\n MM: '%d monatoj',\n y: 'unu jaro',\n yy: '%d jaroj',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}a/,\n ordinal: '%da',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Dominican Republic) [es-do]\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esDo = moment.defineLocale('es-do', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return esDo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (Mexico) [es-mx]\n//! author : JC Franco : https://github.com/jcfranco\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esMx = moment.defineLocale('es-mx', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return esMx;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish (United States) [es-us]\n//! author : bustta : https://github.com/bustta\n//! author : chrisrodz : https://github.com/chrisrodz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var esUs = moment.defineLocale('es-us', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'MM/DD/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY h:mm A',\n LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return esUs;\n\n})));\n","//! moment.js locale configuration\n//! locale : Spanish [es]\n//! author : Julio Napurí : https://github.com/julionc\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortDot =\n 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split(\n '_'\n ),\n monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),\n monthsParse = [\n /^ene/i,\n /^feb/i,\n /^mar/i,\n /^abr/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^ago/i,\n /^sep/i,\n /^oct/i,\n /^nov/i,\n /^dic/i,\n ],\n monthsRegex =\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i;\n\n var es = moment.defineLocale('es', {\n months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortDot;\n } else if (/-MMM-/.test(format)) {\n return monthsShort[m.month()];\n } else {\n return monthsShortDot[m.month()];\n }\n },\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,\n monthsShortStrictRegex:\n /^(ene\\.?|feb\\.?|mar\\.?|abr\\.?|may\\.?|jun\\.?|jul\\.?|ago\\.?|sep\\.?|oct\\.?|nov\\.?|dic\\.?)/i,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextDay: function () {\n return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastDay: function () {\n return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT';\n },\n lastWeek: function () {\n return (\n '[el] dddd [pasado a la' +\n (this.hours() !== 1 ? 's' : '') +\n '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'en %s',\n past: 'hace %s',\n s: 'unos segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'una hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n w: 'una semana',\n ww: '%d semanas',\n M: 'un mes',\n MM: '%d meses',\n y: 'un año',\n yy: '%d años',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n invalidDate: 'Fecha inválida',\n });\n\n return es;\n\n})));\n","//! moment.js locale configuration\n//! locale : Estonian [et]\n//! author : Henry Kehlmann : https://github.com/madhenry\n//! improvements : Illimar Tambek : https://github.com/ragulka\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'],\n ss: [number + 'sekundi', number + 'sekundit'],\n m: ['ühe minuti', 'üks minut'],\n mm: [number + ' minuti', number + ' minutit'],\n h: ['ühe tunni', 'tund aega', 'üks tund'],\n hh: [number + ' tunni', number + ' tundi'],\n d: ['ühe päeva', 'üks päev'],\n M: ['kuu aja', 'kuu aega', 'üks kuu'],\n MM: [number + ' kuu', number + ' kuud'],\n y: ['ühe aasta', 'aasta', 'üks aasta'],\n yy: [number + ' aasta', number + ' aastat'],\n };\n if (withoutSuffix) {\n return format[key][2] ? format[key][2] : format[key][1];\n }\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var et = moment.defineLocale('et', {\n months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split(\n '_'\n ),\n monthsShort:\n 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split('_'),\n weekdays:\n 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split(\n '_'\n ),\n weekdaysShort: 'P_E_T_K_N_R_L'.split('_'),\n weekdaysMin: 'P_E_T_K_N_R_L'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Täna,] LT',\n nextDay: '[Homme,] LT',\n nextWeek: '[Järgmine] dddd LT',\n lastDay: '[Eile,] LT',\n lastWeek: '[Eelmine] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s pärast',\n past: '%s tagasi',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: '%d päeva',\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return et;\n\n})));\n","//! moment.js locale configuration\n//! locale : Basque [eu]\n//! author : Eneko Illarramendi : https://github.com/eillarra\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var eu = moment.defineLocale('eu', {\n months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split(\n '_'\n ),\n monthsShort:\n 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split(\n '_'\n ),\n weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'),\n weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY[ko] MMMM[ren] D[a]',\n LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm',\n LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm',\n l: 'YYYY-M-D',\n ll: 'YYYY[ko] MMM D[a]',\n lll: 'YYYY[ko] MMM D[a] HH:mm',\n llll: 'ddd, YYYY[ko] MMM D[a] HH:mm',\n },\n calendar: {\n sameDay: '[gaur] LT[etan]',\n nextDay: '[bihar] LT[etan]',\n nextWeek: 'dddd LT[etan]',\n lastDay: '[atzo] LT[etan]',\n lastWeek: '[aurreko] dddd LT[etan]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s barru',\n past: 'duela %s',\n s: 'segundo batzuk',\n ss: '%d segundo',\n m: 'minutu bat',\n mm: '%d minutu',\n h: 'ordu bat',\n hh: '%d ordu',\n d: 'egun bat',\n dd: '%d egun',\n M: 'hilabete bat',\n MM: '%d hilabete',\n y: 'urte bat',\n yy: '%d urte',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return eu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Persian [fa]\n//! author : Ebrahim Byagowi : https://github.com/ebraminio\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '۱',\n 2: '۲',\n 3: '۳',\n 4: '۴',\n 5: '۵',\n 6: '۶',\n 7: '۷',\n 8: '۸',\n 9: '۹',\n 0: '۰',\n },\n numberMap = {\n '۱': '1',\n '۲': '2',\n '۳': '3',\n '۴': '4',\n '۵': '5',\n '۶': '6',\n '۷': '7',\n '۸': '8',\n '۹': '9',\n '۰': '0',\n };\n\n var fa = moment.defineLocale('fa', {\n months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n monthsShort:\n 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split(\n '_'\n ),\n weekdays:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysShort:\n 'یک\\u200cشنبه_دوشنبه_سه\\u200cشنبه_چهارشنبه_پنج\\u200cشنبه_جمعه_شنبه'.split(\n '_'\n ),\n weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /قبل از ظهر|بعد از ظهر/,\n isPM: function (input) {\n return /بعد از ظهر/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'قبل از ظهر';\n } else {\n return 'بعد از ظهر';\n }\n },\n calendar: {\n sameDay: '[امروز ساعت] LT',\n nextDay: '[فردا ساعت] LT',\n nextWeek: 'dddd [ساعت] LT',\n lastDay: '[دیروز ساعت] LT',\n lastWeek: 'dddd [پیش] [ساعت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'در %s',\n past: '%s پیش',\n s: 'چند ثانیه',\n ss: '%d ثانیه',\n m: 'یک دقیقه',\n mm: '%d دقیقه',\n h: 'یک ساعت',\n hh: '%d ساعت',\n d: 'یک روز',\n dd: '%d روز',\n M: 'یک ماه',\n MM: '%d ماه',\n y: 'یک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string\n .replace(/[۰-۹]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n dayOfMonthOrdinalParse: /\\d{1,2}م/,\n ordinal: '%dم',\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return fa;\n\n})));\n","//! moment.js locale configuration\n//! locale : Finnish [fi]\n//! author : Tarmo Aidantausta : https://github.com/bleadof\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersPast =\n 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(\n ' '\n ),\n numbersFuture = [\n 'nolla',\n 'yhden',\n 'kahden',\n 'kolmen',\n 'neljän',\n 'viiden',\n 'kuuden',\n numbersPast[7],\n numbersPast[8],\n numbersPast[9],\n ];\n function translate(number, withoutSuffix, key, isFuture) {\n var result = '';\n switch (key) {\n case 's':\n return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';\n case 'ss':\n result = isFuture ? 'sekunnin' : 'sekuntia';\n break;\n case 'm':\n return isFuture ? 'minuutin' : 'minuutti';\n case 'mm':\n result = isFuture ? 'minuutin' : 'minuuttia';\n break;\n case 'h':\n return isFuture ? 'tunnin' : 'tunti';\n case 'hh':\n result = isFuture ? 'tunnin' : 'tuntia';\n break;\n case 'd':\n return isFuture ? 'päivän' : 'päivä';\n case 'dd':\n result = isFuture ? 'päivän' : 'päivää';\n break;\n case 'M':\n return isFuture ? 'kuukauden' : 'kuukausi';\n case 'MM':\n result = isFuture ? 'kuukauden' : 'kuukautta';\n break;\n case 'y':\n return isFuture ? 'vuoden' : 'vuosi';\n case 'yy':\n result = isFuture ? 'vuoden' : 'vuotta';\n break;\n }\n result = verbalNumber(number, isFuture) + ' ' + result;\n return result;\n }\n function verbalNumber(number, isFuture) {\n return number < 10\n ? isFuture\n ? numbersFuture[number]\n : numbersPast[number]\n : number;\n }\n\n var fi = moment.defineLocale('fi', {\n months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split(\n '_'\n ),\n monthsShort:\n 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split(\n '_'\n ),\n weekdays:\n 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split(\n '_'\n ),\n weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'),\n weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM[ta] YYYY',\n LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm',\n LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm',\n l: 'D.M.YYYY',\n ll: 'Do MMM YYYY',\n lll: 'Do MMM YYYY, [klo] HH.mm',\n llll: 'ddd, Do MMM YYYY, [klo] HH.mm',\n },\n calendar: {\n sameDay: '[tänään] [klo] LT',\n nextDay: '[huomenna] [klo] LT',\n nextWeek: 'dddd [klo] LT',\n lastDay: '[eilen] [klo] LT',\n lastWeek: '[viime] dddd[na] [klo] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s päästä',\n past: '%s sitten',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Filipino [fil]\n//! author : Dan Hagman : https://github.com/hagmandan\n//! author : Matthew Co : https://github.com/matthewdeeco\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fil = moment.defineLocale('fil', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fil;\n\n})));\n","//! moment.js locale configuration\n//! locale : Faroese [fo]\n//! author : Ragnar Johannesen : https://github.com/ragnar123\n//! author : Kristian Sakarisson : https://github.com/sakarisson\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var fo = moment.defineLocale('fo', {\n months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'),\n weekdays:\n 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'),\n weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D. MMMM, YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Í dag kl.] LT',\n nextDay: '[Í morgin kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[Í gjár kl.] LT',\n lastWeek: '[síðstu] dddd [kl] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'um %s',\n past: '%s síðani',\n s: 'fá sekund',\n ss: '%d sekundir',\n m: 'ein minuttur',\n mm: '%d minuttir',\n h: 'ein tími',\n hh: '%d tímar',\n d: 'ein dagur',\n dd: '%d dagar',\n M: 'ein mánaður',\n MM: '%d mánaðir',\n y: 'eitt ár',\n yy: '%d ár',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fo;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Canada) [fr-ca]\n//! author : Jonathan Abourbih : https://github.com/jonbca\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCa = moment.defineLocale('fr-ca', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n });\n\n return frCa;\n\n})));\n","//! moment.js locale configuration\n//! locale : French (Switzerland) [fr-ch]\n//! author : Gaspard Bucher : https://github.com/gaspard\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var frCh = moment.defineLocale('fr-ch', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|e)/,\n ordinal: function (number, period) {\n switch (period) {\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'D':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return frCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : French [fr]\n//! author : John Fischer : https://github.com/jfroffice\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsStrictRegex =\n /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsShortStrictRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?)/i,\n monthsRegex =\n /(janv\\.?|févr\\.?|mars|avr\\.?|mai|juin|juil\\.?|août|sept\\.?|oct\\.?|nov\\.?|déc\\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,\n monthsParse = [\n /^janv/i,\n /^févr/i,\n /^mars/i,\n /^avr/i,\n /^mai/i,\n /^juin/i,\n /^juil/i,\n /^août/i,\n /^sept/i,\n /^oct/i,\n /^nov/i,\n /^déc/i,\n ];\n\n var fr = moment.defineLocale('fr', {\n months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(\n '_'\n ),\n monthsShort:\n 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(\n '_'\n ),\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex: monthsStrictRegex,\n monthsShortStrictRegex: monthsShortStrictRegex,\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),\n weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),\n weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Aujourd’hui à] LT',\n nextDay: '[Demain à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[Hier à] LT',\n lastWeek: 'dddd [dernier à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dans %s',\n past: 'il y a %s',\n s: 'quelques secondes',\n ss: '%d secondes',\n m: 'une minute',\n mm: '%d minutes',\n h: 'une heure',\n hh: '%d heures',\n d: 'un jour',\n dd: '%d jours',\n w: 'une semaine',\n ww: '%d semaines',\n M: 'un mois',\n MM: '%d mois',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er|)/,\n ordinal: function (number, period) {\n switch (period) {\n // TODO: Return 'e' when day of month > 1. Move this case inside\n // block for masculine words below.\n // See https://github.com/moment/moment/issues/3375\n case 'D':\n return number + (number === 1 ? 'er' : '');\n\n // Words with masculine grammatical gender: mois, trimestre, jour\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n return number + (number === 1 ? 'er' : 'e');\n\n // Words with feminine grammatical gender: semaine\n case 'w':\n case 'W':\n return number + (number === 1 ? 're' : 'e');\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Frisian [fy]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');\n\n var fy = moment.defineLocale('fy', {\n months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n monthsParseExact: true,\n weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split(\n '_'\n ),\n weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'),\n weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[hjoed om] LT',\n nextDay: '[moarn om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[juster om] LT',\n lastWeek: '[ôfrûne] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'oer %s',\n past: '%s lyn',\n s: 'in pear sekonden',\n ss: '%d sekonden',\n m: 'ien minút',\n mm: '%d minuten',\n h: 'ien oere',\n hh: '%d oeren',\n d: 'ien dei',\n dd: '%d dagen',\n M: 'ien moanne',\n MM: '%d moannen',\n y: 'ien jier',\n yy: '%d jierren',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return fy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Irish or Irish Gaelic [ga]\n//! author : André Silva : https://github.com/askpt\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Eanáir',\n 'Feabhra',\n 'Márta',\n 'Aibreán',\n 'Bealtaine',\n 'Meitheamh',\n 'Iúil',\n 'Lúnasa',\n 'Meán Fómhair',\n 'Deireadh Fómhair',\n 'Samhain',\n 'Nollaig',\n ],\n monthsShort = [\n 'Ean',\n 'Feabh',\n 'Márt',\n 'Aib',\n 'Beal',\n 'Meith',\n 'Iúil',\n 'Lún',\n 'M.F.',\n 'D.F.',\n 'Samh',\n 'Noll',\n ],\n weekdays = [\n 'Dé Domhnaigh',\n 'Dé Luain',\n 'Dé Máirt',\n 'Dé Céadaoin',\n 'Déardaoin',\n 'Dé hAoine',\n 'Dé Sathairn',\n ],\n weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'],\n weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa'];\n\n var ga = moment.defineLocale('ga', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Inniu ag] LT',\n nextDay: '[Amárach ag] LT',\n nextWeek: 'dddd [ag] LT',\n lastDay: '[Inné ag] LT',\n lastWeek: 'dddd [seo caite] [ag] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i %s',\n past: '%s ó shin',\n s: 'cúpla soicind',\n ss: '%d soicind',\n m: 'nóiméad',\n mm: '%d nóiméad',\n h: 'uair an chloig',\n hh: '%d uair an chloig',\n d: 'lá',\n dd: '%d lá',\n M: 'mí',\n MM: '%d míonna',\n y: 'bliain',\n yy: '%d bliain',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ga;\n\n})));\n","//! moment.js locale configuration\n//! locale : Scottish Gaelic [gd]\n//! author : Jon Ashdown : https://github.com/jonashdown\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'Am Faoilleach',\n 'An Gearran',\n 'Am Màrt',\n 'An Giblean',\n 'An Cèitean',\n 'An t-Ògmhios',\n 'An t-Iuchar',\n 'An Lùnastal',\n 'An t-Sultain',\n 'An Dàmhair',\n 'An t-Samhain',\n 'An Dùbhlachd',\n ],\n monthsShort = [\n 'Faoi',\n 'Gear',\n 'Màrt',\n 'Gibl',\n 'Cèit',\n 'Ògmh',\n 'Iuch',\n 'Lùn',\n 'Sult',\n 'Dàmh',\n 'Samh',\n 'Dùbh',\n ],\n weekdays = [\n 'Didòmhnaich',\n 'Diluain',\n 'Dimàirt',\n 'Diciadain',\n 'Diardaoin',\n 'Dihaoine',\n 'Disathairne',\n ],\n weekdaysShort = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'],\n weekdaysMin = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa'];\n\n var gd = moment.defineLocale('gd', {\n months: months,\n monthsShort: monthsShort,\n monthsParseExact: true,\n weekdays: weekdays,\n weekdaysShort: weekdaysShort,\n weekdaysMin: weekdaysMin,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[An-diugh aig] LT',\n nextDay: '[A-màireach aig] LT',\n nextWeek: 'dddd [aig] LT',\n lastDay: '[An-dè aig] LT',\n lastWeek: 'dddd [seo chaidh] [aig] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ann an %s',\n past: 'bho chionn %s',\n s: 'beagan diogan',\n ss: '%d diogan',\n m: 'mionaid',\n mm: '%d mionaidean',\n h: 'uair',\n hh: '%d uairean',\n d: 'latha',\n dd: '%d latha',\n M: 'mìos',\n MM: '%d mìosan',\n y: 'bliadhna',\n yy: '%d bliadhna',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(d|na|mh)/,\n ordinal: function (number) {\n var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Galician [gl]\n//! author : Juan G. Hurtado : https://github.com/juanghurtado\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var gl = moment.defineLocale('gl', {\n months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split(\n '_'\n ),\n monthsShort:\n 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'),\n weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'),\n weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY H:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm',\n },\n calendar: {\n sameDay: function () {\n return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextDay: function () {\n return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT';\n },\n nextWeek: function () {\n return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT';\n },\n lastDay: function () {\n return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT';\n },\n lastWeek: function () {\n return (\n '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'\n );\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (str) {\n if (str.indexOf('un') === 0) {\n return 'n' + str;\n }\n return 'en ' + str;\n },\n past: 'hai %s',\n s: 'uns segundos',\n ss: '%d segundos',\n m: 'un minuto',\n mm: '%d minutos',\n h: 'unha hora',\n hh: '%d horas',\n d: 'un día',\n dd: '%d días',\n M: 'un mes',\n MM: '%d meses',\n y: 'un ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return gl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Devanagari script [gom-deva]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'],\n ss: [number + ' सॅकंडांनी', number + ' सॅकंड'],\n m: ['एका मिणटान', 'एक मिनूट'],\n mm: [number + ' मिणटांनी', number + ' मिणटां'],\n h: ['एका वरान', 'एक वर'],\n hh: [number + ' वरांनी', number + ' वरां'],\n d: ['एका दिसान', 'एक दीस'],\n dd: [number + ' दिसांनी', number + ' दीस'],\n M: ['एका म्हयन्यान', 'एक म्हयनो'],\n MM: [number + ' म्हयन्यानी', number + ' म्हयने'],\n y: ['एका वर्सान', 'एक वर्स'],\n yy: [number + ' वर्सांनी', number + ' वर्सां'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomDeva = moment.defineLocale('gom-deva', {\n months: {\n standalone:\n 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'),\n weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'),\n weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [वाजतां]',\n LTS: 'A h:mm:ss [वाजतां]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [वाजतां]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]',\n llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]',\n },\n calendar: {\n sameDay: '[आयज] LT',\n nextDay: '[फाल्यां] LT',\n nextWeek: '[फुडलो] dddd[,] LT',\n lastDay: '[काल] LT',\n lastWeek: '[फाटलो] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s आदीं',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(वेर)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'वेर' only applies to day of the month\n case 'D':\n return number + 'वेर';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /राती|सकाळीं|दनपारां|सांजे/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राती') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सकाळीं') {\n return hour;\n } else if (meridiem === 'दनपारां') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'सांजे') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'राती';\n } else if (hour < 12) {\n return 'सकाळीं';\n } else if (hour < 16) {\n return 'दनपारां';\n } else if (hour < 20) {\n return 'सांजे';\n } else {\n return 'राती';\n }\n },\n });\n\n return gomDeva;\n\n})));\n","//! moment.js locale configuration\n//! locale : Konkani Latin script [gom-latn]\n//! author : The Discoverer : https://github.com/WikiDiscoverer\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['thoddea sekondamni', 'thodde sekond'],\n ss: [number + ' sekondamni', number + ' sekond'],\n m: ['eka mintan', 'ek minut'],\n mm: [number + ' mintamni', number + ' mintam'],\n h: ['eka voran', 'ek vor'],\n hh: [number + ' voramni', number + ' voram'],\n d: ['eka disan', 'ek dis'],\n dd: [number + ' disamni', number + ' dis'],\n M: ['eka mhoinean', 'ek mhoino'],\n MM: [number + ' mhoineamni', number + ' mhoine'],\n y: ['eka vorsan', 'ek voros'],\n yy: [number + ' vorsamni', number + ' vorsam'],\n };\n return isFuture ? format[key][0] : format[key][1];\n }\n\n var gomLatn = moment.defineLocale('gom-latn', {\n months: {\n standalone:\n 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split(\n '_'\n ),\n format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split(\n '_'\n ),\n isFormat: /MMMM(\\s)+D[oD]?/,\n },\n monthsShort:\n 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),\n monthsParseExact: true,\n weekdays: \"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var\".split('_'),\n weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),\n weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'A h:mm [vazta]',\n LTS: 'A h:mm:ss [vazta]',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY A h:mm [vazta]',\n LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]',\n llll: 'ddd, D MMM YYYY, A h:mm [vazta]',\n },\n calendar: {\n sameDay: '[Aiz] LT',\n nextDay: '[Faleam] LT',\n nextWeek: '[Fuddlo] dddd[,] LT',\n lastDay: '[Kal] LT',\n lastWeek: '[Fattlo] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s',\n past: '%s adim',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(er)/,\n ordinal: function (number, period) {\n switch (period) {\n // the ordinal 'er' only applies to day of the month\n case 'D':\n return number + 'er';\n default:\n case 'M':\n case 'Q':\n case 'DDD':\n case 'd':\n case 'w':\n case 'W':\n return number;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week\n doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4)\n },\n meridiemParse: /rati|sokallim|donparam|sanje/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'rati') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'sokallim') {\n return hour;\n } else if (meridiem === 'donparam') {\n return hour > 12 ? hour : hour + 12;\n } else if (meridiem === 'sanje') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'rati';\n } else if (hour < 12) {\n return 'sokallim';\n } else if (hour < 16) {\n return 'donparam';\n } else if (hour < 20) {\n return 'sanje';\n } else {\n return 'rati';\n }\n },\n });\n\n return gomLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Gujarati [gu]\n//! author : Kaushik Thanki : https://github.com/Kaushik1987\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '૧',\n 2: '૨',\n 3: '૩',\n 4: '૪',\n 5: '૫',\n 6: '૬',\n 7: '૭',\n 8: '૮',\n 9: '૯',\n 0: '૦',\n },\n numberMap = {\n '૧': '1',\n '૨': '2',\n '૩': '3',\n '૪': '4',\n '૫': '5',\n '૬': '6',\n '૭': '7',\n '૮': '8',\n '૯': '9',\n '૦': '0',\n };\n\n var gu = moment.defineLocale('gu', {\n months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split(\n '_'\n ),\n monthsShort:\n 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split(\n '_'\n ),\n weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'),\n weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm વાગ્યે',\n LTS: 'A h:mm:ss વાગ્યે',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm વાગ્યે',\n LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે',\n },\n calendar: {\n sameDay: '[આજ] LT',\n nextDay: '[કાલે] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ગઇકાલે] LT',\n lastWeek: '[પાછલા] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s મા',\n past: '%s પહેલા',\n s: 'અમુક પળો',\n ss: '%d સેકંડ',\n m: 'એક મિનિટ',\n mm: '%d મિનિટ',\n h: 'એક કલાક',\n hh: '%d કલાક',\n d: 'એક દિવસ',\n dd: '%d દિવસ',\n M: 'એક મહિનો',\n MM: '%d મહિનો',\n y: 'એક વર્ષ',\n yy: '%d વર્ષ',\n },\n preparse: function (string) {\n return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Gujarati notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati.\n meridiemParse: /રાત|બપોર|સવાર|સાંજ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'રાત') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'સવાર') {\n return hour;\n } else if (meridiem === 'બપોર') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'સાંજ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'રાત';\n } else if (hour < 10) {\n return 'સવાર';\n } else if (hour < 17) {\n return 'બપોર';\n } else if (hour < 20) {\n return 'સાંજ';\n } else {\n return 'રાત';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return gu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hebrew [he]\n//! author : Tomer Cohen : https://github.com/tomer\n//! author : Moshe Simantov : https://github.com/DevelopmentIL\n//! author : Tal Ater : https://github.com/TalAter\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var he = moment.defineLocale('he', {\n months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split(\n '_'\n ),\n monthsShort:\n 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split('_'),\n weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'),\n weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'),\n weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [ב]MMMM YYYY',\n LLL: 'D [ב]MMMM YYYY HH:mm',\n LLLL: 'dddd, D [ב]MMMM YYYY HH:mm',\n l: 'D/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[היום ב־]LT',\n nextDay: '[מחר ב־]LT',\n nextWeek: 'dddd [בשעה] LT',\n lastDay: '[אתמול ב־]LT',\n lastWeek: '[ביום] dddd [האחרון בשעה] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'בעוד %s',\n past: 'לפני %s',\n s: 'מספר שניות',\n ss: '%d שניות',\n m: 'דקה',\n mm: '%d דקות',\n h: 'שעה',\n hh: function (number) {\n if (number === 2) {\n return 'שעתיים';\n }\n return number + ' שעות';\n },\n d: 'יום',\n dd: function (number) {\n if (number === 2) {\n return 'יומיים';\n }\n return number + ' ימים';\n },\n M: 'חודש',\n MM: function (number) {\n if (number === 2) {\n return 'חודשיים';\n }\n return number + ' חודשים';\n },\n y: 'שנה',\n yy: function (number) {\n if (number === 2) {\n return 'שנתיים';\n } else if (number % 10 === 0 && number !== 10) {\n return number + ' שנה';\n }\n return number + ' שנים';\n },\n },\n meridiemParse:\n /אחה\"צ|לפנה\"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,\n isPM: function (input) {\n return /^(אחה\"צ|אחרי הצהריים|בערב)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 5) {\n return 'לפנות בוקר';\n } else if (hour < 10) {\n return 'בבוקר';\n } else if (hour < 12) {\n return isLower ? 'לפנה\"צ' : 'לפני הצהריים';\n } else if (hour < 18) {\n return isLower ? 'אחה\"צ' : 'אחרי הצהריים';\n } else {\n return 'בערב';\n }\n },\n });\n\n return he;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hindi [hi]\n//! author : Mayank Singhal : https://github.com/mayanksinghal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n },\n monthsParse = [\n /^जन/i,\n /^फ़र|फर/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सितं|सित/i,\n /^अक्टू/i,\n /^नव|नवं/i,\n /^दिसं|दिस/i,\n ],\n shortMonthsParse = [\n /^जन/i,\n /^फ़र/i,\n /^मार्च/i,\n /^अप्रै/i,\n /^मई/i,\n /^जून/i,\n /^जुल/i,\n /^अग/i,\n /^सित/i,\n /^अक्टू/i,\n /^नव/i,\n /^दिस/i,\n ];\n\n var hi = moment.defineLocale('hi', {\n months: {\n format: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split(\n '_'\n ),\n standalone:\n 'जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर'.split(\n '_'\n ),\n },\n monthsShort:\n 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split('_'),\n weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm बजे',\n LTS: 'A h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, A h:mm बजे',\n },\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: shortMonthsParse,\n\n monthsRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsShortRegex:\n /^(जनवरी|जन\\.?|फ़रवरी|फरवरी|फ़र\\.?|मार्च?|अप्रैल|अप्रै\\.?|मई?|जून?|जुलाई|जुल\\.?|अगस्त|अग\\.?|सितम्बर|सितंबर|सित\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर|नव\\.?|दिसम्बर|दिसंबर|दिस\\.?)/i,\n\n monthsStrictRegex:\n /^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\\.?|अक्टूबर|अक्टू\\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,\n\n monthsShortStrictRegex:\n /^(जन\\.?|फ़र\\.?|मार्च?|अप्रै\\.?|मई?|जून?|जुल\\.?|अग\\.?|सित\\.?|अक्टू\\.?|नव\\.?|दिस\\.?)/i,\n\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[कल] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[कल] LT',\n lastWeek: '[पिछले] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s में',\n past: '%s पहले',\n s: 'कुछ ही क्षण',\n ss: '%d सेकंड',\n m: 'एक मिनट',\n mm: '%d मिनट',\n h: 'एक घंटा',\n hh: '%d घंटे',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महीने',\n MM: '%d महीने',\n y: 'एक वर्ष',\n yy: '%d वर्ष',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Hindi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.\n meridiemParse: /रात|सुबह|दोपहर|शाम/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'रात') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'सुबह') {\n return hour;\n } else if (meridiem === 'दोपहर') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'शाम') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'रात';\n } else if (hour < 10) {\n return 'सुबह';\n } else if (hour < 17) {\n return 'दोपहर';\n } else if (hour < 20) {\n return 'शाम';\n } else {\n return 'रात';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return hi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Croatian [hr]\n//! author : Bojan Marković : https://github.com/bmarkovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n if (number === 1) {\n result += 'sekunda';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sekunde';\n } else {\n result += 'sekundi';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'jedna minuta' : 'jedne minute';\n case 'mm':\n if (number === 1) {\n result += 'minuta';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'minute';\n } else {\n result += 'minuta';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'jedan sat' : 'jednog sata';\n case 'hh':\n if (number === 1) {\n result += 'sat';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'sata';\n } else {\n result += 'sati';\n }\n return result;\n case 'dd':\n if (number === 1) {\n result += 'dan';\n } else {\n result += 'dana';\n }\n return result;\n case 'MM':\n if (number === 1) {\n result += 'mjesec';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'mjeseca';\n } else {\n result += 'mjeseci';\n }\n return result;\n case 'yy':\n if (number === 1) {\n result += 'godina';\n } else if (number === 2 || number === 3 || number === 4) {\n result += 'godine';\n } else {\n result += 'godina';\n }\n return result;\n }\n }\n\n var hr = moment.defineLocale('hr', {\n months: {\n format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split(\n '_'\n ),\n standalone:\n 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split(\n '_'\n ),\n },\n monthsShort:\n 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'Do MMMM YYYY',\n LLL: 'Do MMMM YYYY H:mm',\n LLLL: 'dddd, Do MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[jučer u] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prošlu] [nedjelju] [u] LT';\n case 3:\n return '[prošlu] [srijedu] [u] LT';\n case 6:\n return '[prošle] [subote] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prošli] dddd [u] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'par sekundi',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: 'dan',\n dd: translate,\n M: 'mjesec',\n MM: translate,\n y: 'godinu',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Hungarian [hu]\n//! author : Adam Brunner : https://github.com/adambrunner\n//! author : Peter Viszt : https://github.com/passatgt\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var weekEndings =\n 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');\n function translate(number, withoutSuffix, key, isFuture) {\n var num = number;\n switch (key) {\n case 's':\n return isFuture || withoutSuffix\n ? 'néhány másodperc'\n : 'néhány másodperce';\n case 'ss':\n return num + (isFuture || withoutSuffix)\n ? ' másodperc'\n : ' másodperce';\n case 'm':\n return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'mm':\n return num + (isFuture || withoutSuffix ? ' perc' : ' perce');\n case 'h':\n return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'hh':\n return num + (isFuture || withoutSuffix ? ' óra' : ' órája');\n case 'd':\n return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'dd':\n return num + (isFuture || withoutSuffix ? ' nap' : ' napja');\n case 'M':\n return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'MM':\n return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');\n case 'y':\n return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');\n case 'yy':\n return num + (isFuture || withoutSuffix ? ' év' : ' éve');\n }\n return '';\n }\n function week(isFuture) {\n return (\n (isFuture ? '' : '[múlt] ') +\n '[' +\n weekEndings[this.day()] +\n '] LT[-kor]'\n );\n }\n\n var hu = moment.defineLocale('hu', {\n months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'),\n weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'),\n weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY. MMMM D.',\n LLL: 'YYYY. MMMM D. H:mm',\n LLLL: 'YYYY. MMMM D., dddd H:mm',\n },\n meridiemParse: /de|du/i,\n isPM: function (input) {\n return input.charAt(1).toLowerCase() === 'u';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower === true ? 'de' : 'DE';\n } else {\n return isLower === true ? 'du' : 'DU';\n }\n },\n calendar: {\n sameDay: '[ma] LT[-kor]',\n nextDay: '[holnap] LT[-kor]',\n nextWeek: function () {\n return week.call(this, true);\n },\n lastDay: '[tegnap] LT[-kor]',\n lastWeek: function () {\n return week.call(this, false);\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s múlva',\n past: '%s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return hu;\n\n})));\n","//! moment.js locale configuration\n//! locale : Armenian [hy-am]\n//! author : Armendarabyan : https://github.com/armendarabyan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var hyAm = moment.defineLocale('hy-am', {\n months: {\n format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split(\n '_'\n ),\n standalone:\n 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split(\n '_'\n ),\n },\n monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),\n weekdays:\n 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split(\n '_'\n ),\n weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY թ.',\n LLL: 'D MMMM YYYY թ., HH:mm',\n LLLL: 'dddd, D MMMM YYYY թ., HH:mm',\n },\n calendar: {\n sameDay: '[այսօր] LT',\n nextDay: '[վաղը] LT',\n lastDay: '[երեկ] LT',\n nextWeek: function () {\n return 'dddd [օրը ժամը] LT';\n },\n lastWeek: function () {\n return '[անցած] dddd [օրը ժամը] LT';\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s հետո',\n past: '%s առաջ',\n s: 'մի քանի վայրկյան',\n ss: '%d վայրկյան',\n m: 'րոպե',\n mm: '%d րոպե',\n h: 'ժամ',\n hh: '%d ժամ',\n d: 'օր',\n dd: '%d օր',\n M: 'ամիս',\n MM: '%d ամիս',\n y: 'տարի',\n yy: '%d տարի',\n },\n meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,\n isPM: function (input) {\n return /^(ցերեկվա|երեկոյան)$/.test(input);\n },\n meridiem: function (hour) {\n if (hour < 4) {\n return 'գիշերվա';\n } else if (hour < 12) {\n return 'առավոտվա';\n } else if (hour < 17) {\n return 'ցերեկվա';\n } else {\n return 'երեկոյան';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}|\\d{1,2}-(ին|րդ)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'DDD':\n case 'w':\n case 'W':\n case 'DDDo':\n if (number === 1) {\n return number + '-ին';\n }\n return number + '-րդ';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return hyAm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Indonesian [id]\n//! author : Mohammad Satrio Utomo : https://github.com/tyok\n//! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var id = moment.defineLocale('id', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'),\n weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|siang|sore|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'siang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sore' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'siang';\n } else if (hours < 19) {\n return 'sore';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Besok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kemarin pukul] LT',\n lastWeek: 'dddd [lalu pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lalu',\n s: 'beberapa detik',\n ss: '%d detik',\n m: 'semenit',\n mm: '%d menit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return id;\n\n})));\n","//! moment.js locale configuration\n//! locale : Icelandic [is]\n//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(n) {\n if (n % 100 === 11) {\n return true;\n } else if (n % 10 === 1) {\n return false;\n }\n return true;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nokkrar sekúndur'\n : 'nokkrum sekúndum';\n case 'ss':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum')\n );\n }\n return result + 'sekúnda';\n case 'm':\n return withoutSuffix ? 'mínúta' : 'mínútu';\n case 'mm':\n if (plural(number)) {\n return (\n result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum')\n );\n } else if (withoutSuffix) {\n return result + 'mínúta';\n }\n return result + 'mínútu';\n case 'hh':\n if (plural(number)) {\n return (\n result +\n (withoutSuffix || isFuture\n ? 'klukkustundir'\n : 'klukkustundum')\n );\n }\n return result + 'klukkustund';\n case 'd':\n if (withoutSuffix) {\n return 'dagur';\n }\n return isFuture ? 'dag' : 'degi';\n case 'dd':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'dagar';\n }\n return result + (isFuture ? 'daga' : 'dögum');\n } else if (withoutSuffix) {\n return result + 'dagur';\n }\n return result + (isFuture ? 'dag' : 'degi');\n case 'M':\n if (withoutSuffix) {\n return 'mánuður';\n }\n return isFuture ? 'mánuð' : 'mánuði';\n case 'MM':\n if (plural(number)) {\n if (withoutSuffix) {\n return result + 'mánuðir';\n }\n return result + (isFuture ? 'mánuði' : 'mánuðum');\n } else if (withoutSuffix) {\n return result + 'mánuður';\n }\n return result + (isFuture ? 'mánuð' : 'mánuði');\n case 'y':\n return withoutSuffix || isFuture ? 'ár' : 'ári';\n case 'yy':\n if (plural(number)) {\n return result + (withoutSuffix || isFuture ? 'ár' : 'árum');\n }\n return result + (withoutSuffix || isFuture ? 'ár' : 'ári');\n }\n }\n\n var is = moment.defineLocale('is', {\n months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'),\n weekdays:\n 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split(\n '_'\n ),\n weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'),\n weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm',\n },\n calendar: {\n sameDay: '[í dag kl.] LT',\n nextDay: '[á morgun kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[í gær kl.] LT',\n lastWeek: '[síðasta] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'eftir %s',\n past: 'fyrir %s síðan',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: 'klukkustund',\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return is;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian (Switzerland) [it-ch]\n//! author : xfh : https://github.com/xfh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var itCh = moment.defineLocale('it-ch', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Oggi alle] LT',\n nextDay: '[Domani alle] LT',\n nextWeek: 'dddd [alle] LT',\n lastDay: '[Ieri alle] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[la scorsa] dddd [alle] LT';\n default:\n return '[lo scorso] dddd [alle] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s;\n },\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return itCh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Italian [it]\n//! author : Lorenzo : https://github.com/aliem\n//! author: Mattia Larentis: https://github.com/nostalgiaz\n//! author: Marco : https://github.com/Manfre98\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var it = moment.defineLocale('it', {\n months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split(\n '_'\n ),\n monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'),\n weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split(\n '_'\n ),\n weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'),\n weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: function () {\n return (\n '[Oggi a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextDay: function () {\n return (\n '[Domani a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n nextWeek: function () {\n return (\n 'dddd [a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastDay: function () {\n return (\n '[Ieri a' +\n (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : \"ll'\") +\n ']LT'\n );\n },\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return (\n '[La scorsa] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n default:\n return (\n '[Lo scorso] dddd [a' +\n (this.hours() > 1\n ? 'lle '\n : this.hours() === 0\n ? ' '\n : \"ll'\") +\n ']LT'\n );\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'tra %s',\n past: '%s fa',\n s: 'alcuni secondi',\n ss: '%d secondi',\n m: 'un minuto',\n mm: '%d minuti',\n h: \"un'ora\",\n hh: '%d ore',\n d: 'un giorno',\n dd: '%d giorni',\n w: 'una settimana',\n ww: '%d settimane',\n M: 'un mese',\n MM: '%d mesi',\n y: 'un anno',\n yy: '%d anni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return it;\n\n})));\n","//! moment.js locale configuration\n//! locale : Japanese [ja]\n//! author : LI Long : https://github.com/baryon\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ja = moment.defineLocale('ja', {\n eras: [\n {\n since: '2019-05-01',\n offset: 1,\n name: '令和',\n narrow: '㋿',\n abbr: 'R',\n },\n {\n since: '1989-01-08',\n until: '2019-04-30',\n offset: 1,\n name: '平成',\n narrow: '㍻',\n abbr: 'H',\n },\n {\n since: '1926-12-25',\n until: '1989-01-07',\n offset: 1,\n name: '昭和',\n narrow: '㍼',\n abbr: 'S',\n },\n {\n since: '1912-07-30',\n until: '1926-12-24',\n offset: 1,\n name: '大正',\n narrow: '㍽',\n abbr: 'T',\n },\n {\n since: '1873-01-01',\n until: '1912-07-29',\n offset: 6,\n name: '明治',\n narrow: '㍾',\n abbr: 'M',\n },\n {\n since: '0001-01-01',\n until: '1873-12-31',\n offset: 1,\n name: '西暦',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: '紀元前',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n eraYearOrdinalRegex: /(元|\\d+)年/,\n eraYearOrdinalParse: function (input, match) {\n return match[1] === '元' ? 1 : parseInt(match[1] || input, 10);\n },\n months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'),\n weekdaysShort: '日_月_火_水_木_金_土'.split('_'),\n weekdaysMin: '日_月_火_水_木_金_土'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日 dddd HH:mm',\n l: 'YYYY/MM/DD',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日(ddd) HH:mm',\n },\n meridiemParse: /午前|午後/i,\n isPM: function (input) {\n return input === '午後';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return '午前';\n } else {\n return '午後';\n }\n },\n calendar: {\n sameDay: '[今日] LT',\n nextDay: '[明日] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[来週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n lastDay: '[昨日] LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[先週]dddd LT';\n } else {\n return 'dddd LT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}日/,\n ordinal: function (number, period) {\n switch (period) {\n case 'y':\n return number === 1 ? '元年' : number + '年';\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '数秒',\n ss: '%d秒',\n m: '1分',\n mm: '%d分',\n h: '1時間',\n hh: '%d時間',\n d: '1日',\n dd: '%d日',\n M: '1ヶ月',\n MM: '%dヶ月',\n y: '1年',\n yy: '%d年',\n },\n });\n\n return ja;\n\n})));\n","//! moment.js locale configuration\n//! locale : Javanese [jv]\n//! author : Rony Lantip : https://github.com/lantip\n//! reference: http://jv.wikipedia.org/wiki/Basa_Jawa\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var jv = moment.defineLocale('jv', {\n months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'),\n weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'),\n weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'),\n weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /enjing|siyang|sonten|ndalu/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'enjing') {\n return hour;\n } else if (meridiem === 'siyang') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'sonten' || meridiem === 'ndalu') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'enjing';\n } else if (hours < 15) {\n return 'siyang';\n } else if (hours < 19) {\n return 'sonten';\n } else {\n return 'ndalu';\n }\n },\n calendar: {\n sameDay: '[Dinten puniko pukul] LT',\n nextDay: '[Mbenjang pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kala wingi pukul] LT',\n lastWeek: 'dddd [kepengker pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'wonten ing %s',\n past: '%s ingkang kepengker',\n s: 'sawetawis detik',\n ss: '%d detik',\n m: 'setunggal menit',\n mm: '%d menit',\n h: 'setunggal jam',\n hh: '%d jam',\n d: 'sedinten',\n dd: '%d dinten',\n M: 'sewulan',\n MM: '%d wulan',\n y: 'setaun',\n yy: '%d taun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return jv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Georgian [ka]\n//! author : Irakli Janiashvili : https://github.com/IrakliJani\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ka = moment.defineLocale('ka', {\n months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split(\n '_'\n ),\n monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'),\n weekdays: {\n standalone:\n 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split(\n '_'\n ),\n format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split(\n '_'\n ),\n isFormat: /(წინა|შემდეგ)/,\n },\n weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'),\n weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[დღეს] LT[-ზე]',\n nextDay: '[ხვალ] LT[-ზე]',\n lastDay: '[გუშინ] LT[-ზე]',\n nextWeek: '[შემდეგ] dddd LT[-ზე]',\n lastWeek: '[წინა] dddd LT-ზე',\n sameElse: 'L',\n },\n relativeTime: {\n future: function (s) {\n return s.replace(\n /(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,\n function ($0, $1, $2) {\n return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში';\n }\n );\n },\n past: function (s) {\n if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) {\n return s.replace(/(ი|ე)$/, 'ის წინ');\n }\n if (/წელი/.test(s)) {\n return s.replace(/წელი$/, 'წლის წინ');\n }\n return s;\n },\n s: 'რამდენიმე წამი',\n ss: '%d წამი',\n m: 'წუთი',\n mm: '%d წუთი',\n h: 'საათი',\n hh: '%d საათი',\n d: 'დღე',\n dd: '%d დღე',\n M: 'თვე',\n MM: '%d თვე',\n y: 'წელი',\n yy: '%d წელი',\n },\n dayOfMonthOrdinalParse: /0|1-ლი|მე-\\d{1,2}|\\d{1,2}-ე/,\n ordinal: function (number) {\n if (number === 0) {\n return number;\n }\n if (number === 1) {\n return number + '-ლი';\n }\n if (\n number < 20 ||\n (number <= 100 && number % 20 === 0) ||\n number % 100 === 0\n ) {\n return 'მე-' + number;\n }\n return number + '-ე';\n },\n week: {\n dow: 1,\n doy: 7,\n },\n });\n\n return ka;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kazakh [kk]\n//! authors : Nurlan Rakhimzhanov : https://github.com/nurlan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ші',\n 1: '-ші',\n 2: '-ші',\n 3: '-ші',\n 4: '-ші',\n 5: '-ші',\n 6: '-шы',\n 7: '-ші',\n 8: '-ші',\n 9: '-шы',\n 10: '-шы',\n 20: '-шы',\n 30: '-шы',\n 40: '-шы',\n 50: '-ші',\n 60: '-шы',\n 70: '-ші',\n 80: '-ші',\n 90: '-шы',\n 100: '-ші',\n };\n\n var kk = moment.defineLocale('kk', {\n months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split(\n '_'\n ),\n monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'),\n weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split(\n '_'\n ),\n weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'),\n weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгін сағат] LT',\n nextDay: '[Ертең сағат] LT',\n nextWeek: 'dddd [сағат] LT',\n lastDay: '[Кеше сағат] LT',\n lastWeek: '[Өткен аптаның] dddd [сағат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ішінде',\n past: '%s бұрын',\n s: 'бірнеше секунд',\n ss: '%d секунд',\n m: 'бір минут',\n mm: '%d минут',\n h: 'бір сағат',\n hh: '%d сағат',\n d: 'бір күн',\n dd: '%d күн',\n M: 'бір ай',\n MM: '%d ай',\n y: 'бір жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ші|шы)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return kk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Cambodian [km]\n//! author : Kruy Vanna : https://github.com/kruyvanna\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '១',\n 2: '២',\n 3: '៣',\n 4: '៤',\n 5: '៥',\n 6: '៦',\n 7: '៧',\n 8: '៨',\n 9: '៩',\n 0: '០',\n },\n numberMap = {\n '១': '1',\n '២': '2',\n '៣': '3',\n '៤': '4',\n '៥': '5',\n '៦': '6',\n '៧': '7',\n '៨': '8',\n '៩': '9',\n '០': '0',\n };\n\n var km = moment.defineLocale('km', {\n months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n monthsShort:\n 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(\n '_'\n ),\n weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),\n weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ព្រឹក|ល្ងាច/,\n isPM: function (input) {\n return input === 'ល្ងាច';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ព្រឹក';\n } else {\n return 'ល្ងាច';\n }\n },\n calendar: {\n sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',\n nextDay: '[ស្អែក ម៉ោង] LT',\n nextWeek: 'dddd [ម៉ោង] LT',\n lastDay: '[ម្សិលមិញ ម៉ោង] LT',\n lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sទៀត',\n past: '%sមុន',\n s: 'ប៉ុន្មានវិនាទី',\n ss: '%d វិនាទី',\n m: 'មួយនាទី',\n mm: '%d នាទី',\n h: 'មួយម៉ោង',\n hh: '%d ម៉ោង',\n d: 'មួយថ្ងៃ',\n dd: '%d ថ្ងៃ',\n M: 'មួយខែ',\n MM: '%d ខែ',\n y: 'មួយឆ្នាំ',\n yy: '%d ឆ្នាំ',\n },\n dayOfMonthOrdinalParse: /ទី\\d{1,2}/,\n ordinal: 'ទី%d',\n preparse: function (string) {\n return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return km;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kannada [kn]\n//! author : Rajeev Naik : https://github.com/rajeevnaikte\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '೧',\n 2: '೨',\n 3: '೩',\n 4: '೪',\n 5: '೫',\n 6: '೬',\n 7: '೭',\n 8: '೮',\n 9: '೯',\n 0: '೦',\n },\n numberMap = {\n '೧': '1',\n '೨': '2',\n '೩': '3',\n '೪': '4',\n '೫': '5',\n '೬': '6',\n '೭': '7',\n '೮': '8',\n '೯': '9',\n '೦': '0',\n };\n\n var kn = moment.defineLocale('kn', {\n months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split(\n '_'\n ),\n monthsShort:\n 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split(\n '_'\n ),\n weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'),\n weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[ಇಂದು] LT',\n nextDay: '[ನಾಳೆ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ನಿನ್ನೆ] LT',\n lastWeek: '[ಕೊನೆಯ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ನಂತರ',\n past: '%s ಹಿಂದೆ',\n s: 'ಕೆಲವು ಕ್ಷಣಗಳು',\n ss: '%d ಸೆಕೆಂಡುಗಳು',\n m: 'ಒಂದು ನಿಮಿಷ',\n mm: '%d ನಿಮಿಷ',\n h: 'ಒಂದು ಗಂಟೆ',\n hh: '%d ಗಂಟೆ',\n d: 'ಒಂದು ದಿನ',\n dd: '%d ದಿನ',\n M: 'ಒಂದು ತಿಂಗಳು',\n MM: '%d ತಿಂಗಳು',\n y: 'ಒಂದು ವರ್ಷ',\n yy: '%d ವರ್ಷ',\n },\n preparse: function (string) {\n return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ರಾತ್ರಿ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') {\n return hour;\n } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ಸಂಜೆ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ರಾತ್ರಿ';\n } else if (hour < 10) {\n return 'ಬೆಳಿಗ್ಗೆ';\n } else if (hour < 17) {\n return 'ಮಧ್ಯಾಹ್ನ';\n } else if (hour < 20) {\n return 'ಸಂಜೆ';\n } else {\n return 'ರಾತ್ರಿ';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ನೇ)/,\n ordinal: function (number) {\n return number + 'ನೇ';\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return kn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Korean [ko]\n//! author : Kyungwook, Park : https://github.com/kyungw00k\n//! author : Jeeeyul Lee \n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ko = moment.defineLocale('ko', {\n months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'),\n monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split(\n '_'\n ),\n weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'),\n weekdaysShort: '일_월_화_수_목_금_토'.split('_'),\n weekdaysMin: '일_월_화_수_목_금_토'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'YYYY.MM.DD.',\n LL: 'YYYY년 MMMM D일',\n LLL: 'YYYY년 MMMM D일 A h:mm',\n LLLL: 'YYYY년 MMMM D일 dddd A h:mm',\n l: 'YYYY.MM.DD.',\n ll: 'YYYY년 MMMM D일',\n lll: 'YYYY년 MMMM D일 A h:mm',\n llll: 'YYYY년 MMMM D일 dddd A h:mm',\n },\n calendar: {\n sameDay: '오늘 LT',\n nextDay: '내일 LT',\n nextWeek: 'dddd LT',\n lastDay: '어제 LT',\n lastWeek: '지난주 dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s 후',\n past: '%s 전',\n s: '몇 초',\n ss: '%d초',\n m: '1분',\n mm: '%d분',\n h: '한 시간',\n hh: '%d시간',\n d: '하루',\n dd: '%d일',\n M: '한 달',\n MM: '%d달',\n y: '일 년',\n yy: '%d년',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(일|월|주)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '일';\n case 'M':\n return number + '월';\n case 'w':\n case 'W':\n return number + '주';\n default:\n return number;\n }\n },\n meridiemParse: /오전|오후/,\n isPM: function (token) {\n return token === '오후';\n },\n meridiem: function (hour, minute, isUpper) {\n return hour < 12 ? '오전' : '오후';\n },\n });\n\n return ko;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kurdish [ku]\n//! author : Shahram Mebashar : https://github.com/ShahramMebashar\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '١',\n 2: '٢',\n 3: '٣',\n 4: '٤',\n 5: '٥',\n 6: '٦',\n 7: '٧',\n 8: '٨',\n 9: '٩',\n 0: '٠',\n },\n numberMap = {\n '١': '1',\n '٢': '2',\n '٣': '3',\n '٤': '4',\n '٥': '5',\n '٦': '6',\n '٧': '7',\n '٨': '8',\n '٩': '9',\n '٠': '0',\n },\n months = [\n 'کانونی دووەم',\n 'شوبات',\n 'ئازار',\n 'نیسان',\n 'ئایار',\n 'حوزەیران',\n 'تەمموز',\n 'ئاب',\n 'ئەیلوول',\n 'تشرینی یەكەم',\n 'تشرینی دووەم',\n 'كانونی یەکەم',\n ];\n\n var ku = moment.defineLocale('ku', {\n months: months,\n monthsShort: months,\n weekdays:\n 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split(\n '_'\n ),\n weekdaysShort:\n 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split('_'),\n weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n meridiemParse: /ئێواره‌|به‌یانی/,\n isPM: function (input) {\n return /ئێواره‌/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'به‌یانی';\n } else {\n return 'ئێواره‌';\n }\n },\n calendar: {\n sameDay: '[ئه‌مرۆ كاتژمێر] LT',\n nextDay: '[به‌یانی كاتژمێر] LT',\n nextWeek: 'dddd [كاتژمێر] LT',\n lastDay: '[دوێنێ كاتژمێر] LT',\n lastWeek: 'dddd [كاتژمێر] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'له‌ %s',\n past: '%s',\n s: 'چه‌ند چركه‌یه‌ك',\n ss: 'چركه‌ %d',\n m: 'یه‌ك خوله‌ك',\n mm: '%d خوله‌ك',\n h: 'یه‌ك كاتژمێر',\n hh: '%d كاتژمێر',\n d: 'یه‌ك ڕۆژ',\n dd: '%d ڕۆژ',\n M: 'یه‌ك مانگ',\n MM: '%d مانگ',\n y: 'یه‌ك ساڵ',\n yy: '%d ساڵ',\n },\n preparse: function (string) {\n return string\n .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) {\n return numberMap[match];\n })\n .replace(/،/g, ',');\n },\n postformat: function (string) {\n return string\n .replace(/\\d/g, function (match) {\n return symbolMap[match];\n })\n .replace(/,/g, '،');\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return ku;\n\n})));\n","//! moment.js locale configuration\n//! locale : Kyrgyz [ky]\n//! author : Chyngyz Arystan uulu : https://github.com/chyngyz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-чү',\n 1: '-чи',\n 2: '-чи',\n 3: '-чү',\n 4: '-чү',\n 5: '-чи',\n 6: '-чы',\n 7: '-чи',\n 8: '-чи',\n 9: '-чу',\n 10: '-чу',\n 20: '-чы',\n 30: '-чу',\n 40: '-чы',\n 50: '-чү',\n 60: '-чы',\n 70: '-чи',\n 80: '-чи',\n 90: '-чу',\n 100: '-чү',\n };\n\n var ky = moment.defineLocale('ky', {\n months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split(\n '_'\n ),\n weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split(\n '_'\n ),\n weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'),\n weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Бүгүн саат] LT',\n nextDay: '[Эртең саат] LT',\n nextWeek: 'dddd [саат] LT',\n lastDay: '[Кечээ саат] LT',\n lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ичинде',\n past: '%s мурун',\n s: 'бирнече секунд',\n ss: '%d секунд',\n m: 'бир мүнөт',\n mm: '%d мүнөт',\n h: 'бир саат',\n hh: '%d саат',\n d: 'бир күн',\n dd: '%d күн',\n M: 'бир ай',\n MM: '%d ай',\n y: 'бир жыл',\n yy: '%d жыл',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(чи|чы|чү|чу)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ky;\n\n})));\n","//! moment.js locale configuration\n//! locale : Luxembourgish [lb]\n//! author : mweimerskirch : https://github.com/mweimerskirch\n//! author : David Raison : https://github.com/kwisatz\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n m: ['eng Minutt', 'enger Minutt'],\n h: ['eng Stonn', 'enger Stonn'],\n d: ['een Dag', 'engem Dag'],\n M: ['ee Mount', 'engem Mount'],\n y: ['ee Joer', 'engem Joer'],\n };\n return withoutSuffix ? format[key][0] : format[key][1];\n }\n function processFutureTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'a ' + string;\n }\n return 'an ' + string;\n }\n function processPastTime(string) {\n var number = string.substr(0, string.indexOf(' '));\n if (eifelerRegelAppliesToNumber(number)) {\n return 'viru ' + string;\n }\n return 'virun ' + string;\n }\n /**\n * Returns true if the word before the given number loses the '-n' ending.\n * e.g. 'an 10 Deeg' but 'a 5 Deeg'\n *\n * @param number {integer}\n * @returns {boolean}\n */\n function eifelerRegelAppliesToNumber(number) {\n number = parseInt(number, 10);\n if (isNaN(number)) {\n return false;\n }\n if (number < 0) {\n // Negative Number --> always true\n return true;\n } else if (number < 10) {\n // Only 1 digit\n if (4 <= number && number <= 7) {\n return true;\n }\n return false;\n } else if (number < 100) {\n // 2 digits\n var lastDigit = number % 10,\n firstDigit = number / 10;\n if (lastDigit === 0) {\n return eifelerRegelAppliesToNumber(firstDigit);\n }\n return eifelerRegelAppliesToNumber(lastDigit);\n } else if (number < 10000) {\n // 3 or 4 digits --> recursively check first digit\n while (number >= 10) {\n number = number / 10;\n }\n return eifelerRegelAppliesToNumber(number);\n } else {\n // Anything larger than 4 digits: recursively check first n-3 digits\n number = number / 1000;\n return eifelerRegelAppliesToNumber(number);\n }\n }\n\n var lb = moment.defineLocale('lb', {\n months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split(\n '_'\n ),\n monthsShort:\n 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split(\n '_'\n ),\n weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'),\n weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm [Auer]',\n LTS: 'H:mm:ss [Auer]',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm [Auer]',\n LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]',\n },\n calendar: {\n sameDay: '[Haut um] LT',\n sameElse: 'L',\n nextDay: '[Muer um] LT',\n nextWeek: 'dddd [um] LT',\n lastDay: '[Gëschter um] LT',\n lastWeek: function () {\n // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule\n switch (this.day()) {\n case 2:\n case 4:\n return '[Leschten] dddd [um] LT';\n default:\n return '[Leschte] dddd [um] LT';\n }\n },\n },\n relativeTime: {\n future: processFutureTime,\n past: processPastTime,\n s: 'e puer Sekonnen',\n ss: '%d Sekonnen',\n m: processRelativeTime,\n mm: '%d Minutten',\n h: processRelativeTime,\n hh: '%d Stonnen',\n d: processRelativeTime,\n dd: '%d Deeg',\n M: processRelativeTime,\n MM: '%d Méint',\n y: processRelativeTime,\n yy: '%d Joer',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lao [lo]\n//! author : Ryan Hart : https://github.com/ryanhart2\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var lo = moment.defineLocale('lo', {\n months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n monthsShort:\n 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split(\n '_'\n ),\n weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'),\n weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'ວັນdddd D MMMM YYYY HH:mm',\n },\n meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/,\n isPM: function (input) {\n return input === 'ຕອນແລງ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ຕອນເຊົ້າ';\n } else {\n return 'ຕອນແລງ';\n }\n },\n calendar: {\n sameDay: '[ມື້ນີ້ເວລາ] LT',\n nextDay: '[ມື້ອື່ນເວລາ] LT',\n nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT',\n lastDay: '[ມື້ວານນີ້ເວລາ] LT',\n lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ອີກ %s',\n past: '%sຜ່ານມາ',\n s: 'ບໍ່ເທົ່າໃດວິນາທີ',\n ss: '%d ວິນາທີ',\n m: '1 ນາທີ',\n mm: '%d ນາທີ',\n h: '1 ຊົ່ວໂມງ',\n hh: '%d ຊົ່ວໂມງ',\n d: '1 ມື້',\n dd: '%d ມື້',\n M: '1 ເດືອນ',\n MM: '%d ເດືອນ',\n y: '1 ປີ',\n yy: '%d ປີ',\n },\n dayOfMonthOrdinalParse: /(ທີ່)\\d{1,2}/,\n ordinal: function (number) {\n return 'ທີ່' + number;\n },\n });\n\n return lo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Lithuanian [lt]\n//! author : Mindaugas Mozūras : https://github.com/mmozuras\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundė_sekundžių_sekundes',\n m: 'minutė_minutės_minutę',\n mm: 'minutės_minučių_minutes',\n h: 'valanda_valandos_valandą',\n hh: 'valandos_valandų_valandas',\n d: 'diena_dienos_dieną',\n dd: 'dienos_dienų_dienas',\n M: 'mėnuo_mėnesio_mėnesį',\n MM: 'mėnesiai_mėnesių_mėnesius',\n y: 'metai_metų_metus',\n yy: 'metai_metų_metus',\n };\n function translateSeconds(number, withoutSuffix, key, isFuture) {\n if (withoutSuffix) {\n return 'kelios sekundės';\n } else {\n return isFuture ? 'kelių sekundžių' : 'kelias sekundes';\n }\n }\n function translateSingular(number, withoutSuffix, key, isFuture) {\n return withoutSuffix\n ? forms(key)[0]\n : isFuture\n ? forms(key)[1]\n : forms(key)[2];\n }\n function special(number) {\n return number % 10 === 0 || (number > 10 && number < 20);\n }\n function forms(key) {\n return units[key].split('_');\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n if (number === 1) {\n return (\n result + translateSingular(number, withoutSuffix, key[0], isFuture)\n );\n } else if (withoutSuffix) {\n return result + (special(number) ? forms(key)[1] : forms(key)[0]);\n } else {\n if (isFuture) {\n return result + forms(key)[1];\n } else {\n return result + (special(number) ? forms(key)[1] : forms(key)[2]);\n }\n }\n }\n var lt = moment.defineLocale('lt', {\n months: {\n format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split(\n '_'\n ),\n standalone:\n 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split(\n '_'\n ),\n isFormat: /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?|MMMM?(\\[[^\\[\\]]*\\]|\\s)+D[oD]?/,\n },\n monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'),\n weekdays: {\n format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split(\n '_'\n ),\n standalone:\n 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split(\n '_'\n ),\n isFormat: /dddd HH:mm/,\n },\n weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'),\n weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY [m.] MMMM D [d.]',\n LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]',\n l: 'YYYY-MM-DD',\n ll: 'YYYY [m.] MMMM D [d.]',\n lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]',\n llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]',\n },\n calendar: {\n sameDay: '[Šiandien] LT',\n nextDay: '[Rytoj] LT',\n nextWeek: 'dddd LT',\n lastDay: '[Vakar] LT',\n lastWeek: '[Praėjusį] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'po %s',\n past: 'prieš %s',\n s: translateSeconds,\n ss: translate,\n m: translateSingular,\n mm: translate,\n h: translateSingular,\n hh: translate,\n d: translateSingular,\n dd: translate,\n M: translateSingular,\n MM: translate,\n y: translateSingular,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-oji/,\n ordinal: function (number) {\n return number + '-oji';\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Latvian [lv]\n//! author : Kristaps Karlsons : https://github.com/skakri\n//! author : Jānis Elmeris : https://github.com/JanisE\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var units = {\n ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'),\n m: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'),\n h: 'stundas_stundām_stunda_stundas'.split('_'),\n hh: 'stundas_stundām_stunda_stundas'.split('_'),\n d: 'dienas_dienām_diena_dienas'.split('_'),\n dd: 'dienas_dienām_diena_dienas'.split('_'),\n M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),\n y: 'gada_gadiem_gads_gadi'.split('_'),\n yy: 'gada_gadiem_gads_gadi'.split('_'),\n };\n /**\n * @param withoutSuffix boolean true = a length of time; false = before/after a period of time.\n */\n function format(forms, number, withoutSuffix) {\n if (withoutSuffix) {\n // E.g. \"21 minūte\", \"3 minūtes\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];\n } else {\n // E.g. \"21 minūtes\" as in \"pēc 21 minūtes\".\n // E.g. \"3 minūtēm\" as in \"pēc 3 minūtēm\".\n return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];\n }\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n return number + ' ' + format(units[key], number, withoutSuffix);\n }\n function relativeTimeWithSingular(number, withoutSuffix, key) {\n return format(units[key], number, withoutSuffix);\n }\n function relativeSeconds(number, withoutSuffix) {\n return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';\n }\n\n var lv = moment.defineLocale('lv', {\n months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),\n weekdays:\n 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split(\n '_'\n ),\n weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY.',\n LL: 'YYYY. [gada] D. MMMM',\n LLL: 'YYYY. [gada] D. MMMM, HH:mm',\n LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm',\n },\n calendar: {\n sameDay: '[Šodien pulksten] LT',\n nextDay: '[Rīt pulksten] LT',\n nextWeek: 'dddd [pulksten] LT',\n lastDay: '[Vakar pulksten] LT',\n lastWeek: '[Pagājušā] dddd [pulksten] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'pēc %s',\n past: 'pirms %s',\n s: relativeSeconds,\n ss: relativeTimeWithPlural,\n m: relativeTimeWithSingular,\n mm: relativeTimeWithPlural,\n h: relativeTimeWithSingular,\n hh: relativeTimeWithPlural,\n d: relativeTimeWithSingular,\n dd: relativeTimeWithPlural,\n M: relativeTimeWithSingular,\n MM: relativeTimeWithPlural,\n y: relativeTimeWithSingular,\n yy: relativeTimeWithPlural,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return lv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Montenegrin [me]\n//! author : Miodrag Nikač : https://github.com/miodragnikac\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekund', 'sekunda', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n dd: ['dan', 'dana', 'dana'],\n MM: ['mjesec', 'mjeseca', 'mjeseci'],\n yy: ['godina', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n return number === 1\n ? wordKey[0]\n : number >= 2 && number <= 4\n ? wordKey[1]\n : wordKey[2];\n },\n translate: function (number, withoutSuffix, key) {\n var wordKey = translator.words[key];\n if (key.length === 1) {\n return withoutSuffix ? wordKey[0] : wordKey[1];\n } else {\n return (\n number +\n ' ' +\n translator.correctGrammaticalCase(number, wordKey)\n );\n }\n },\n };\n\n var me = moment.defineLocale('me', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sjutra u] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedjelju] [u] LT';\n case 3:\n return '[u] [srijedu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedjelje] [u] LT',\n '[prošlog] [ponedjeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srijede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'prije %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: 'dan',\n dd: translator.translate,\n M: 'mjesec',\n MM: translator.translate,\n y: 'godinu',\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return me;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maori [mi]\n//! author : John Corrigan : https://github.com/johnideal\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mi = moment.defineLocale('mi', {\n months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split(\n '_'\n ),\n monthsShort:\n 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split(\n '_'\n ),\n monthsRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,3}/i,\n monthsShortStrictRegex: /(?:['a-z\\u0101\\u014D\\u016B]+\\-?){1,2}/i,\n weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'),\n weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [i] HH:mm',\n LLLL: 'dddd, D MMMM YYYY [i] HH:mm',\n },\n calendar: {\n sameDay: '[i teie mahana, i] LT',\n nextDay: '[apopo i] LT',\n nextWeek: 'dddd [i] LT',\n lastDay: '[inanahi i] LT',\n lastWeek: 'dddd [whakamutunga i] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'i roto i %s',\n past: '%s i mua',\n s: 'te hēkona ruarua',\n ss: '%d hēkona',\n m: 'he meneti',\n mm: '%d meneti',\n h: 'te haora',\n hh: '%d haora',\n d: 'he ra',\n dd: '%d ra',\n M: 'he marama',\n MM: '%d marama',\n y: 'he tau',\n yy: '%d tau',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Macedonian [mk]\n//! author : Borislav Mickov : https://github.com/B0k0\n//! author : Sashko Todorov : https://github.com/bkyceh\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mk = moment.defineLocale('mk', {\n months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split(\n '_'\n ),\n monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'),\n weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split(\n '_'\n ),\n weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'),\n weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[Денес во] LT',\n nextDay: '[Утре во] LT',\n nextWeek: '[Во] dddd [во] LT',\n lastDay: '[Вчера во] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 6:\n return '[Изминатата] dddd [во] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[Изминатиот] dddd [во] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пред %s',\n s: 'неколку секунди',\n ss: '%d секунди',\n m: 'една минута',\n mm: '%d минути',\n h: 'еден час',\n hh: '%d часа',\n d: 'еден ден',\n dd: '%d дена',\n M: 'еден месец',\n MM: '%d месеци',\n y: 'една година',\n yy: '%d години',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ев|ен|ти|ви|ри|ми)/,\n ordinal: function (number) {\n var lastDigit = number % 10,\n last2Digits = number % 100;\n if (number === 0) {\n return number + '-ев';\n } else if (last2Digits === 0) {\n return number + '-ен';\n } else if (last2Digits > 10 && last2Digits < 20) {\n return number + '-ти';\n } else if (lastDigit === 1) {\n return number + '-ви';\n } else if (lastDigit === 2) {\n return number + '-ри';\n } else if (lastDigit === 7 || lastDigit === 8) {\n return number + '-ми';\n } else {\n return number + '-ти';\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return mk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malayalam [ml]\n//! author : Floyd Pink : https://github.com/floydpink\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ml = moment.defineLocale('ml', {\n months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split(\n '_'\n ),\n monthsShort:\n 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split(\n '_'\n ),\n weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'),\n weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm -നു',\n LTS: 'A h:mm:ss -നു',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm -നു',\n LLLL: 'dddd, D MMMM YYYY, A h:mm -നു',\n },\n calendar: {\n sameDay: '[ഇന്ന്] LT',\n nextDay: '[നാളെ] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[ഇന്നലെ] LT',\n lastWeek: '[കഴിഞ്ഞ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s കഴിഞ്ഞ്',\n past: '%s മുൻപ്',\n s: 'അൽപ നിമിഷങ്ങൾ',\n ss: '%d സെക്കൻഡ്',\n m: 'ഒരു മിനിറ്റ്',\n mm: '%d മിനിറ്റ്',\n h: 'ഒരു മണിക്കൂർ',\n hh: '%d മണിക്കൂർ',\n d: 'ഒരു ദിവസം',\n dd: '%d ദിവസം',\n M: 'ഒരു മാസം',\n MM: '%d മാസം',\n y: 'ഒരു വർഷം',\n yy: '%d വർഷം',\n },\n meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n (meridiem === 'രാത്രി' && hour >= 4) ||\n meridiem === 'ഉച്ച കഴിഞ്ഞ്' ||\n meridiem === 'വൈകുന്നേരം'\n ) {\n return hour + 12;\n } else {\n return hour;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'രാത്രി';\n } else if (hour < 12) {\n return 'രാവിലെ';\n } else if (hour < 17) {\n return 'ഉച്ച കഴിഞ്ഞ്';\n } else if (hour < 20) {\n return 'വൈകുന്നേരം';\n } else {\n return 'രാത്രി';\n }\n },\n });\n\n return ml;\n\n})));\n","//! moment.js locale configuration\n//! locale : Mongolian [mn]\n//! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function translate(number, withoutSuffix, key, isFuture) {\n switch (key) {\n case 's':\n return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын';\n case 'ss':\n return number + (withoutSuffix ? ' секунд' : ' секундын');\n case 'm':\n case 'mm':\n return number + (withoutSuffix ? ' минут' : ' минутын');\n case 'h':\n case 'hh':\n return number + (withoutSuffix ? ' цаг' : ' цагийн');\n case 'd':\n case 'dd':\n return number + (withoutSuffix ? ' өдөр' : ' өдрийн');\n case 'M':\n case 'MM':\n return number + (withoutSuffix ? ' сар' : ' сарын');\n case 'y':\n case 'yy':\n return number + (withoutSuffix ? ' жил' : ' жилийн');\n default:\n return number;\n }\n }\n\n var mn = moment.defineLocale('mn', {\n months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split(\n '_'\n ),\n monthsShort:\n '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'),\n weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'),\n weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY оны MMMMын D',\n LLL: 'YYYY оны MMMMын D HH:mm',\n LLLL: 'dddd, YYYY оны MMMMын D HH:mm',\n },\n meridiemParse: /ҮӨ|ҮХ/i,\n isPM: function (input) {\n return input === 'ҮХ';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ҮӨ';\n } else {\n return 'ҮХ';\n }\n },\n calendar: {\n sameDay: '[Өнөөдөр] LT',\n nextDay: '[Маргааш] LT',\n nextWeek: '[Ирэх] dddd LT',\n lastDay: '[Өчигдөр] LT',\n lastWeek: '[Өнгөрсөн] dddd LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s дараа',\n past: '%s өмнө',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2} өдөр/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + ' өдөр';\n default:\n return number;\n }\n },\n });\n\n return mn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Marathi [mr]\n//! author : Harshad Kale : https://github.com/kalehv\n//! author : Vivek Athalye : https://github.com/vnathalye\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n function relativeTimeMr(number, withoutSuffix, string, isFuture) {\n var output = '';\n if (withoutSuffix) {\n switch (string) {\n case 's':\n output = 'काही सेकंद';\n break;\n case 'ss':\n output = '%d सेकंद';\n break;\n case 'm':\n output = 'एक मिनिट';\n break;\n case 'mm':\n output = '%d मिनिटे';\n break;\n case 'h':\n output = 'एक तास';\n break;\n case 'hh':\n output = '%d तास';\n break;\n case 'd':\n output = 'एक दिवस';\n break;\n case 'dd':\n output = '%d दिवस';\n break;\n case 'M':\n output = 'एक महिना';\n break;\n case 'MM':\n output = '%d महिने';\n break;\n case 'y':\n output = 'एक वर्ष';\n break;\n case 'yy':\n output = '%d वर्षे';\n break;\n }\n } else {\n switch (string) {\n case 's':\n output = 'काही सेकंदां';\n break;\n case 'ss':\n output = '%d सेकंदां';\n break;\n case 'm':\n output = 'एका मिनिटा';\n break;\n case 'mm':\n output = '%d मिनिटां';\n break;\n case 'h':\n output = 'एका तासा';\n break;\n case 'hh':\n output = '%d तासां';\n break;\n case 'd':\n output = 'एका दिवसा';\n break;\n case 'dd':\n output = '%d दिवसां';\n break;\n case 'M':\n output = 'एका महिन्या';\n break;\n case 'MM':\n output = '%d महिन्यां';\n break;\n case 'y':\n output = 'एका वर्षा';\n break;\n case 'yy':\n output = '%d वर्षां';\n break;\n }\n }\n return output.replace(/%d/i, number);\n }\n\n var mr = moment.defineLocale('mr', {\n months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split(\n '_'\n ),\n monthsShort:\n 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'),\n weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'),\n weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'),\n longDateFormat: {\n LT: 'A h:mm वाजता',\n LTS: 'A h:mm:ss वाजता',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm वाजता',\n LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता',\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[उद्या] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[काल] LT',\n lastWeek: '[मागील] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमध्ये',\n past: '%sपूर्वी',\n s: relativeTimeMr,\n ss: relativeTimeMr,\n m: relativeTimeMr,\n mm: relativeTimeMr,\n h: relativeTimeMr,\n hh: relativeTimeMr,\n d: relativeTimeMr,\n dd: relativeTimeMr,\n M: relativeTimeMr,\n MM: relativeTimeMr,\n y: relativeTimeMr,\n yy: relativeTimeMr,\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'पहाटे' || meridiem === 'सकाळी') {\n return hour;\n } else if (\n meridiem === 'दुपारी' ||\n meridiem === 'सायंकाळी' ||\n meridiem === 'रात्री'\n ) {\n return hour >= 12 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour >= 0 && hour < 6) {\n return 'पहाटे';\n } else if (hour < 12) {\n return 'सकाळी';\n } else if (hour < 17) {\n return 'दुपारी';\n } else if (hour < 20) {\n return 'सायंकाळी';\n } else {\n return 'रात्री';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return mr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms-my]\n//! note : DEPRECATED, the correct one is [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var msMy = moment.defineLocale('ms-my', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return msMy;\n\n})));\n","//! moment.js locale configuration\n//! locale : Malay [ms]\n//! author : Weldan Jamili : https://github.com/weldan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ms = moment.defineLocale('ms', {\n months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'),\n weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'),\n weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'),\n weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [pukul] HH.mm',\n LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm',\n },\n meridiemParse: /pagi|tengahari|petang|malam/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'pagi') {\n return hour;\n } else if (meridiem === 'tengahari') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'petang' || meridiem === 'malam') {\n return hour + 12;\n }\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'pagi';\n } else if (hours < 15) {\n return 'tengahari';\n } else if (hours < 19) {\n return 'petang';\n } else {\n return 'malam';\n }\n },\n calendar: {\n sameDay: '[Hari ini pukul] LT',\n nextDay: '[Esok pukul] LT',\n nextWeek: 'dddd [pukul] LT',\n lastDay: '[Kelmarin pukul] LT',\n lastWeek: 'dddd [lepas pukul] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dalam %s',\n past: '%s yang lepas',\n s: 'beberapa saat',\n ss: '%d saat',\n m: 'seminit',\n mm: '%d minit',\n h: 'sejam',\n hh: '%d jam',\n d: 'sehari',\n dd: '%d hari',\n M: 'sebulan',\n MM: '%d bulan',\n y: 'setahun',\n yy: '%d tahun',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ms;\n\n})));\n","//! moment.js locale configuration\n//! locale : Maltese (Malta) [mt]\n//! author : Alessandro Maruccia : https://github.com/alesma\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var mt = moment.defineLocale('mt', {\n months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'),\n weekdays:\n 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split(\n '_'\n ),\n weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'),\n weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Illum fil-]LT',\n nextDay: '[Għada fil-]LT',\n nextWeek: 'dddd [fil-]LT',\n lastDay: '[Il-bieraħ fil-]LT',\n lastWeek: 'dddd [li għadda] [fil-]LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'f’ %s',\n past: '%s ilu',\n s: 'ftit sekondi',\n ss: '%d sekondi',\n m: 'minuta',\n mm: '%d minuti',\n h: 'siegħa',\n hh: '%d siegħat',\n d: 'ġurnata',\n dd: '%d ġranet',\n M: 'xahar',\n MM: '%d xhur',\n y: 'sena',\n yy: '%d sni',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return mt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Burmese [my]\n//! author : Squar team, mysquar.com\n//! author : David Rossellat : https://github.com/gholadr\n//! author : Tin Aung Lin : https://github.com/thanyawzinmin\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '၁',\n 2: '၂',\n 3: '၃',\n 4: '၄',\n 5: '၅',\n 6: '၆',\n 7: '၇',\n 8: '၈',\n 9: '၉',\n 0: '၀',\n },\n numberMap = {\n '၁': '1',\n '၂': '2',\n '၃': '3',\n '၄': '4',\n '၅': '5',\n '၆': '6',\n '၇': '7',\n '၈': '8',\n '၉': '9',\n '၀': '0',\n };\n\n var my = moment.defineLocale('my', {\n months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split(\n '_'\n ),\n monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'),\n weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split(\n '_'\n ),\n weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'),\n\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ယနေ.] LT [မှာ]',\n nextDay: '[မနက်ဖြန်] LT [မှာ]',\n nextWeek: 'dddd LT [မှာ]',\n lastDay: '[မနေ.က] LT [မှာ]',\n lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'လာမည့် %s မှာ',\n past: 'လွန်ခဲ့သော %s က',\n s: 'စက္ကန်.အနည်းငယ်',\n ss: '%d စက္ကန့်',\n m: 'တစ်မိနစ်',\n mm: '%d မိနစ်',\n h: 'တစ်နာရီ',\n hh: '%d နာရီ',\n d: 'တစ်ရက်',\n dd: '%d ရက်',\n M: 'တစ်လ',\n MM: '%d လ',\n y: 'တစ်နှစ်',\n yy: '%d နှစ်',\n },\n preparse: function (string) {\n return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return my;\n\n})));\n","//! moment.js locale configuration\n//! locale : Norwegian Bokmål [nb]\n//! authors : Espen Hovlandsdal : https://github.com/rexxars\n//! Sigurd Gartmann : https://github.com/sigurdga\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nb = moment.defineLocale('nb', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'),\n weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'),\n weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[i dag kl.] LT',\n nextDay: '[i morgen kl.] LT',\n nextWeek: 'dddd [kl.] LT',\n lastDay: '[i går kl.] LT',\n lastWeek: '[forrige] dddd [kl.] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s siden',\n s: 'noen sekunder',\n ss: '%d sekunder',\n m: 'ett minutt',\n mm: '%d minutter',\n h: 'en time',\n hh: '%d timer',\n d: 'en dag',\n dd: '%d dager',\n w: 'en uke',\n ww: '%d uker',\n M: 'en måned',\n MM: '%d måneder',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nb;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nepalese [ne]\n//! author : suvash : https://github.com/suvash\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '१',\n 2: '२',\n 3: '३',\n 4: '४',\n 5: '५',\n 6: '६',\n 7: '७',\n 8: '८',\n 9: '९',\n 0: '०',\n },\n numberMap = {\n '१': '1',\n '२': '2',\n '३': '3',\n '४': '4',\n '५': '5',\n '६': '6',\n '७': '7',\n '८': '8',\n '९': '9',\n '०': '0',\n };\n\n var ne = moment.defineLocale('ne', {\n months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split(\n '_'\n ),\n monthsShort:\n 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split(\n '_'\n ),\n weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'),\n weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'Aको h:mm बजे',\n LTS: 'Aको h:mm:ss बजे',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, Aको h:mm बजे',\n LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे',\n },\n preparse: function (string) {\n return string.replace(/[१२३४५६७८९०]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n meridiemParse: /राति|बिहान|दिउँसो|साँझ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'राति') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'बिहान') {\n return hour;\n } else if (meridiem === 'दिउँसो') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'साँझ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 3) {\n return 'राति';\n } else if (hour < 12) {\n return 'बिहान';\n } else if (hour < 16) {\n return 'दिउँसो';\n } else if (hour < 20) {\n return 'साँझ';\n } else {\n return 'राति';\n }\n },\n calendar: {\n sameDay: '[आज] LT',\n nextDay: '[भोलि] LT',\n nextWeek: '[आउँदो] dddd[,] LT',\n lastDay: '[हिजो] LT',\n lastWeek: '[गएको] dddd[,] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sमा',\n past: '%s अगाडि',\n s: 'केही क्षण',\n ss: '%d सेकेण्ड',\n m: 'एक मिनेट',\n mm: '%d मिनेट',\n h: 'एक घण्टा',\n hh: '%d घण्टा',\n d: 'एक दिन',\n dd: '%d दिन',\n M: 'एक महिना',\n MM: '%d महिना',\n y: 'एक बर्ष',\n yy: '%d बर्ष',\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ne;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch (Belgium) [nl-be]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^maart|mrt.?$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nlBe = moment.defineLocale('nl-be', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nlBe;\n\n})));\n","//! moment.js locale configuration\n//! locale : Dutch [nl]\n//! author : Joris Röling : https://github.com/jorisroling\n//! author : Jacob Middag : https://github.com/middagj\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsShortWithDots =\n 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split('_'),\n monthsShortWithoutDots =\n 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n monthsParse = [\n /^jan/i,\n /^feb/i,\n /^maart|mrt.?$/i,\n /^apr/i,\n /^mei$/i,\n /^jun[i.]?$/i,\n /^jul[i.]?$/i,\n /^aug/i,\n /^sep/i,\n /^okt/i,\n /^nov/i,\n /^dec/i,\n ],\n monthsRegex =\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\\.?|feb\\.?|mrt\\.?|apr\\.?|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i;\n\n var nl = moment.defineLocale('nl', {\n months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: function (m, format) {\n if (!m) {\n return monthsShortWithDots;\n } else if (/-MMM-/.test(format)) {\n return monthsShortWithoutDots[m.month()];\n } else {\n return monthsShortWithDots[m.month()];\n }\n },\n\n monthsRegex: monthsRegex,\n monthsShortRegex: monthsRegex,\n monthsStrictRegex:\n /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,\n monthsShortStrictRegex:\n /^(jan\\.?|feb\\.?|mrt\\.?|apr\\.?|mei|ju[nl]\\.?|aug\\.?|sep\\.?|okt\\.?|nov\\.?|dec\\.?)/i,\n\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n weekdays:\n 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split('_'),\n weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'),\n weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD-MM-YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[vandaag om] LT',\n nextDay: '[morgen om] LT',\n nextWeek: 'dddd [om] LT',\n lastDay: '[gisteren om] LT',\n lastWeek: '[afgelopen] dddd [om] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'over %s',\n past: '%s geleden',\n s: 'een paar seconden',\n ss: '%d seconden',\n m: 'één minuut',\n mm: '%d minuten',\n h: 'één uur',\n hh: '%d uur',\n d: 'één dag',\n dd: '%d dagen',\n w: 'één week',\n ww: '%d weken',\n M: 'één maand',\n MM: '%d maanden',\n y: 'één jaar',\n yy: '%d jaar',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(ste|de)/,\n ordinal: function (number) {\n return (\n number +\n (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de')\n );\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Nynorsk [nn]\n//! authors : https://github.com/mechuwind\n//! Stephen Ramthun : https://github.com/stephenramthun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var nn = moment.defineLocale('nn', {\n months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split('_'),\n monthsParseExact: true,\n weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'),\n weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'),\n weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY [kl.] H:mm',\n LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm',\n },\n calendar: {\n sameDay: '[I dag klokka] LT',\n nextDay: '[I morgon klokka] LT',\n nextWeek: 'dddd [klokka] LT',\n lastDay: '[I går klokka] LT',\n lastWeek: '[Føregåande] dddd [klokka] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: '%s sidan',\n s: 'nokre sekund',\n ss: '%d sekund',\n m: 'eit minutt',\n mm: '%d minutt',\n h: 'ein time',\n hh: '%d timar',\n d: 'ein dag',\n dd: '%d dagar',\n w: 'ei veke',\n ww: '%d veker',\n M: 'ein månad',\n MM: '%d månader',\n y: 'eit år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return nn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Occitan, lengadocian dialecte [oc-lnc]\n//! author : Quentin PAGÈS : https://github.com/Quenty31\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ocLnc = moment.defineLocale('oc-lnc', {\n months: {\n standalone:\n 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split(\n '_'\n ),\n format: \"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre\".split(\n '_'\n ),\n isFormat: /D[oD]?(\\s)+MMMM/,\n },\n monthsShort:\n 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split(\n '_'\n ),\n weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'),\n weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [de] YYYY',\n ll: 'D MMM YYYY',\n LLL: 'D MMMM [de] YYYY [a] H:mm',\n lll: 'D MMM YYYY, H:mm',\n LLLL: 'dddd D MMMM [de] YYYY [a] H:mm',\n llll: 'ddd D MMM YYYY, H:mm',\n },\n calendar: {\n sameDay: '[uèi a] LT',\n nextDay: '[deman a] LT',\n nextWeek: 'dddd [a] LT',\n lastDay: '[ièr a] LT',\n lastWeek: 'dddd [passat a] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: \"d'aquí %s\",\n past: 'fa %s',\n s: 'unas segondas',\n ss: '%d segondas',\n m: 'una minuta',\n mm: '%d minutas',\n h: 'una ora',\n hh: '%d oras',\n d: 'un jorn',\n dd: '%d jorns',\n M: 'un mes',\n MM: '%d meses',\n y: 'un an',\n yy: '%d ans',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(r|n|t|è|a)/,\n ordinal: function (number, period) {\n var output =\n number === 1\n ? 'r'\n : number === 2\n ? 'n'\n : number === 3\n ? 'r'\n : number === 4\n ? 't'\n : 'è';\n if (period === 'w' || period === 'W') {\n output = 'a';\n }\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4,\n },\n });\n\n return ocLnc;\n\n})));\n","//! moment.js locale configuration\n//! locale : Punjabi (India) [pa-in]\n//! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '੧',\n 2: '੨',\n 3: '੩',\n 4: '੪',\n 5: '੫',\n 6: '੬',\n 7: '੭',\n 8: '੮',\n 9: '੯',\n 0: '੦',\n },\n numberMap = {\n '੧': '1',\n '੨': '2',\n '੩': '3',\n '੪': '4',\n '੫': '5',\n '੬': '6',\n '੭': '7',\n '੮': '8',\n '੯': '9',\n '੦': '0',\n };\n\n var paIn = moment.defineLocale('pa-in', {\n // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi.\n months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n monthsShort:\n 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split(\n '_'\n ),\n weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split(\n '_'\n ),\n weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm ਵਜੇ',\n LTS: 'A h:mm:ss ਵਜੇ',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm ਵਜੇ',\n LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ',\n },\n calendar: {\n sameDay: '[ਅਜ] LT',\n nextDay: '[ਕਲ] LT',\n nextWeek: '[ਅਗਲਾ] dddd, LT',\n lastDay: '[ਕਲ] LT',\n lastWeek: '[ਪਿਛਲੇ] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s ਵਿੱਚ',\n past: '%s ਪਿਛਲੇ',\n s: 'ਕੁਝ ਸਕਿੰਟ',\n ss: '%d ਸਕਿੰਟ',\n m: 'ਇਕ ਮਿੰਟ',\n mm: '%d ਮਿੰਟ',\n h: 'ਇੱਕ ਘੰਟਾ',\n hh: '%d ਘੰਟੇ',\n d: 'ਇੱਕ ਦਿਨ',\n dd: '%d ਦਿਨ',\n M: 'ਇੱਕ ਮਹੀਨਾ',\n MM: '%d ਮਹੀਨੇ',\n y: 'ਇੱਕ ਸਾਲ',\n yy: '%d ਸਾਲ',\n },\n preparse: function (string) {\n return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // Punjabi notation for meridiems are quite fuzzy in practice. While there exists\n // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.\n meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ਰਾਤ') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ਸਵੇਰ') {\n return hour;\n } else if (meridiem === 'ਦੁਪਹਿਰ') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'ਸ਼ਾਮ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ਰਾਤ';\n } else if (hour < 10) {\n return 'ਸਵੇਰ';\n } else if (hour < 17) {\n return 'ਦੁਪਹਿਰ';\n } else if (hour < 20) {\n return 'ਸ਼ਾਮ';\n } else {\n return 'ਰਾਤ';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return paIn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Polish [pl]\n//! author : Rafal Hirsz : https://github.com/evoL\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var monthsNominative =\n 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split(\n '_'\n ),\n monthsSubjective =\n 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split(\n '_'\n ),\n monthsParse = [\n /^sty/i,\n /^lut/i,\n /^mar/i,\n /^kwi/i,\n /^maj/i,\n /^cze/i,\n /^lip/i,\n /^sie/i,\n /^wrz/i,\n /^paź/i,\n /^lis/i,\n /^gru/i,\n ];\n function plural(n) {\n return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1;\n }\n function translate(number, withoutSuffix, key) {\n var result = number + ' ';\n switch (key) {\n case 'ss':\n return result + (plural(number) ? 'sekundy' : 'sekund');\n case 'm':\n return withoutSuffix ? 'minuta' : 'minutę';\n case 'mm':\n return result + (plural(number) ? 'minuty' : 'minut');\n case 'h':\n return withoutSuffix ? 'godzina' : 'godzinę';\n case 'hh':\n return result + (plural(number) ? 'godziny' : 'godzin');\n case 'ww':\n return result + (plural(number) ? 'tygodnie' : 'tygodni');\n case 'MM':\n return result + (plural(number) ? 'miesiące' : 'miesięcy');\n case 'yy':\n return result + (plural(number) ? 'lata' : 'lat');\n }\n }\n\n var pl = moment.defineLocale('pl', {\n months: function (momentToFormat, format) {\n if (!momentToFormat) {\n return monthsNominative;\n } else if (/D MMMM/.test(format)) {\n return monthsSubjective[momentToFormat.month()];\n } else {\n return monthsNominative[momentToFormat.month()];\n }\n },\n monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n weekdays:\n 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split('_'),\n weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'),\n weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Dziś o] LT',\n nextDay: '[Jutro o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W niedzielę o] LT';\n\n case 2:\n return '[We wtorek o] LT';\n\n case 3:\n return '[W środę o] LT';\n\n case 6:\n return '[W sobotę o] LT';\n\n default:\n return '[W] dddd [o] LT';\n }\n },\n lastDay: '[Wczoraj o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[W zeszłą niedzielę o] LT';\n case 3:\n return '[W zeszłą środę o] LT';\n case 6:\n return '[W zeszłą sobotę o] LT';\n default:\n return '[W zeszły] dddd [o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: '%s temu',\n s: 'kilka sekund',\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: '1 dzień',\n dd: '%d dni',\n w: 'tydzień',\n ww: translate,\n M: 'miesiąc',\n MM: translate,\n y: 'rok',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese (Brazil) [pt-br]\n//! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ptBr = moment.defineLocale('pt-br', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split(\n '_'\n ),\n weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'),\n weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY [às] HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'poucos segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n invalidDate: 'Data inválida',\n });\n\n return ptBr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Portuguese [pt]\n//! author : Jefferson : https://github.com/jalex79\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var pt = moment.defineLocale('pt', {\n months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split(\n '_'\n ),\n monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'),\n weekdays:\n 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split(\n '_'\n ),\n weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'),\n weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D [de] MMMM [de] YYYY',\n LLL: 'D [de] MMMM [de] YYYY HH:mm',\n LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hoje às] LT',\n nextDay: '[Amanhã às] LT',\n nextWeek: 'dddd [às] LT',\n lastDay: '[Ontem às] LT',\n lastWeek: function () {\n return this.day() === 0 || this.day() === 6\n ? '[Último] dddd [às] LT' // Saturday + Sunday\n : '[Última] dddd [às] LT'; // Monday - Friday\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'em %s',\n past: 'há %s',\n s: 'segundos',\n ss: '%d segundos',\n m: 'um minuto',\n mm: '%d minutos',\n h: 'uma hora',\n hh: '%d horas',\n d: 'um dia',\n dd: '%d dias',\n w: 'uma semana',\n ww: '%d semanas',\n M: 'um mês',\n MM: '%d meses',\n y: 'um ano',\n yy: '%d anos',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}º/,\n ordinal: '%dº',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return pt;\n\n})));\n","//! moment.js locale configuration\n//! locale : Romanian [ro]\n//! author : Vlad Gurdiga : https://github.com/gurdiga\n//! author : Valentin Agachi : https://github.com/avaly\n//! author : Emanuel Cepoi : https://github.com/cepem\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: 'secunde',\n mm: 'minute',\n hh: 'ore',\n dd: 'zile',\n ww: 'săptămâni',\n MM: 'luni',\n yy: 'ani',\n },\n separator = ' ';\n if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {\n separator = ' de ';\n }\n return number + separator + format[key];\n }\n\n var ro = moment.defineLocale('ro', {\n months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(\n '_'\n ),\n monthsShort:\n 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),\n weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),\n weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY H:mm',\n LLLL: 'dddd, D MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[azi la] LT',\n nextDay: '[mâine la] LT',\n nextWeek: 'dddd [la] LT',\n lastDay: '[ieri la] LT',\n lastWeek: '[fosta] dddd [la] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'peste %s',\n past: '%s în urmă',\n s: 'câteva secunde',\n ss: relativeTimeWithPlural,\n m: 'un minut',\n mm: relativeTimeWithPlural,\n h: 'o oră',\n hh: relativeTimeWithPlural,\n d: 'o zi',\n dd: relativeTimeWithPlural,\n w: 'o săptămână',\n ww: relativeTimeWithPlural,\n M: 'o lună',\n MM: relativeTimeWithPlural,\n y: 'un an',\n yy: relativeTimeWithPlural,\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return ro;\n\n})));\n","//! moment.js locale configuration\n//! locale : Russian [ru]\n//! author : Viktorminator : https://github.com/Viktorminator\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Коренберг Марк : https://github.com/socketpair\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд',\n mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',\n hh: 'час_часа_часов',\n dd: 'день_дня_дней',\n ww: 'неделя_недели_недель',\n MM: 'месяц_месяца_месяцев',\n yy: 'год_года_лет',\n };\n if (key === 'm') {\n return withoutSuffix ? 'минута' : 'минуту';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n var monthsParse = [\n /^янв/i,\n /^фев/i,\n /^мар/i,\n /^апр/i,\n /^ма[йя]/i,\n /^июн/i,\n /^июл/i,\n /^авг/i,\n /^сен/i,\n /^окт/i,\n /^ноя/i,\n /^дек/i,\n ];\n\n // http://new.gramota.ru/spravka/rules/139-prop : § 103\n // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637\n // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753\n var ru = moment.defineLocale('ru', {\n months: {\n format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split(\n '_'\n ),\n standalone:\n 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split(\n '_'\n ),\n },\n monthsShort: {\n // по CLDR именно \"июл.\" и \"июн.\", но какой смысл менять букву на точку?\n format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n standalone:\n 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split(\n '_'\n ),\n },\n weekdays: {\n standalone:\n 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split(\n '_'\n ),\n format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split(\n '_'\n ),\n isFormat: /\\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/,\n },\n weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),\n monthsParse: monthsParse,\n longMonthsParse: monthsParse,\n shortMonthsParse: monthsParse,\n\n // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки\n monthsRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // копия предыдущего\n monthsShortRegex:\n /^(январ[ья]|янв\\.?|феврал[ья]|февр?\\.?|марта?|мар\\.?|апрел[ья]|апр\\.?|ма[йя]|июн[ья]|июн\\.?|июл[ья]|июл\\.?|августа?|авг\\.?|сентябр[ья]|сент?\\.?|октябр[ья]|окт\\.?|ноябр[ья]|нояб?\\.?|декабр[ья]|дек\\.?)/i,\n\n // полные названия с падежами\n monthsStrictRegex:\n /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,\n\n // Выражение, которое соответствует только сокращённым формам\n monthsShortStrictRegex:\n /^(янв\\.|февр?\\.|мар[т.]|апр\\.|ма[яй]|июн[ья.]|июл[ья.]|авг\\.|сент?\\.|окт\\.|нояб?\\.|дек\\.)/i,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY г.',\n LLL: 'D MMMM YYYY г., H:mm',\n LLLL: 'dddd, D MMMM YYYY г., H:mm',\n },\n calendar: {\n sameDay: '[Сегодня, в] LT',\n nextDay: '[Завтра, в] LT',\n lastDay: '[Вчера, в] LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В следующее] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В следующий] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В следующую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n lastWeek: function (now) {\n if (now.week() !== this.week()) {\n switch (this.day()) {\n case 0:\n return '[В прошлое] dddd, [в] LT';\n case 1:\n case 2:\n case 4:\n return '[В прошлый] dddd, [в] LT';\n case 3:\n case 5:\n case 6:\n return '[В прошлую] dddd, [в] LT';\n }\n } else {\n if (this.day() === 2) {\n return '[Во] dddd, [в] LT';\n } else {\n return '[В] dddd, [в] LT';\n }\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'через %s',\n past: '%s назад',\n s: 'несколько секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'час',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n w: 'неделя',\n ww: relativeTimeWithPlural,\n M: 'месяц',\n MM: relativeTimeWithPlural,\n y: 'год',\n yy: relativeTimeWithPlural,\n },\n meridiemParse: /ночи|утра|дня|вечера/i,\n isPM: function (input) {\n return /^(дня|вечера)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночи';\n } else if (hour < 12) {\n return 'утра';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечера';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го|я)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n return number + '-й';\n case 'D':\n return number + '-го';\n case 'w':\n case 'W':\n return number + '-я';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ru;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sindhi [sd]\n//! author : Narain Sagar : https://github.com/narainsagar\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوري',\n 'فيبروري',\n 'مارچ',\n 'اپريل',\n 'مئي',\n 'جون',\n 'جولاءِ',\n 'آگسٽ',\n 'سيپٽمبر',\n 'آڪٽوبر',\n 'نومبر',\n 'ڊسمبر',\n ],\n days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر'];\n\n var sd = moment.defineLocale('sd', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[اڄ] LT',\n nextDay: '[سڀاڻي] LT',\n nextWeek: 'dddd [اڳين هفتي تي] LT',\n lastDay: '[ڪالهه] LT',\n lastWeek: '[گزريل هفتي] dddd [تي] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s پوء',\n past: '%s اڳ',\n s: 'چند سيڪنڊ',\n ss: '%d سيڪنڊ',\n m: 'هڪ منٽ',\n mm: '%d منٽ',\n h: 'هڪ ڪلاڪ',\n hh: '%d ڪلاڪ',\n d: 'هڪ ڏينهن',\n dd: '%d ڏينهن',\n M: 'هڪ مهينو',\n MM: '%d مهينا',\n y: 'هڪ سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sd;\n\n})));\n","//! moment.js locale configuration\n//! locale : Northern Sami [se]\n//! authors : Bård Rolstad Henriksen : https://github.com/karamell\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var se = moment.defineLocale('se', {\n months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split(\n '_'\n ),\n monthsShort:\n 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split('_'),\n weekdays:\n 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split(\n '_'\n ),\n weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'),\n weekdaysMin: 's_v_m_g_d_b_L'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'MMMM D. [b.] YYYY',\n LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm',\n LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm',\n },\n calendar: {\n sameDay: '[otne ti] LT',\n nextDay: '[ihttin ti] LT',\n nextWeek: 'dddd [ti] LT',\n lastDay: '[ikte ti] LT',\n lastWeek: '[ovddit] dddd [ti] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s geažes',\n past: 'maŋit %s',\n s: 'moadde sekunddat',\n ss: '%d sekunddat',\n m: 'okta minuhta',\n mm: '%d minuhtat',\n h: 'okta diimmu',\n hh: '%d diimmut',\n d: 'okta beaivi',\n dd: '%d beaivvit',\n M: 'okta mánnu',\n MM: '%d mánut',\n y: 'okta jahki',\n yy: '%d jagit',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return se;\n\n})));\n","//! moment.js locale configuration\n//! locale : Sinhalese [si]\n//! author : Sampath Sitinamaluwa : https://github.com/sampathsris\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n /*jshint -W100*/\n var si = moment.defineLocale('si', {\n months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split(\n '_'\n ),\n monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split(\n '_'\n ),\n weekdays:\n 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split(\n '_'\n ),\n weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'),\n weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'a h:mm',\n LTS: 'a h:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY MMMM D',\n LLL: 'YYYY MMMM D, a h:mm',\n LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss',\n },\n calendar: {\n sameDay: '[අද] LT[ට]',\n nextDay: '[හෙට] LT[ට]',\n nextWeek: 'dddd LT[ට]',\n lastDay: '[ඊයේ] LT[ට]',\n lastWeek: '[පසුගිය] dddd LT[ට]',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%sකින්',\n past: '%sකට පෙර',\n s: 'තත්පර කිහිපය',\n ss: 'තත්පර %d',\n m: 'මිනිත්තුව',\n mm: 'මිනිත්තු %d',\n h: 'පැය',\n hh: 'පැය %d',\n d: 'දිනය',\n dd: 'දින %d',\n M: 'මාසය',\n MM: 'මාස %d',\n y: 'වසර',\n yy: 'වසර %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2} වැනි/,\n ordinal: function (number) {\n return number + ' වැනි';\n },\n meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,\n isPM: function (input) {\n return input === 'ප.ව.' || input === 'පස් වරු';\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'ප.ව.' : 'පස් වරු';\n } else {\n return isLower ? 'පෙ.ව.' : 'පෙර වරු';\n }\n },\n });\n\n return si;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovak [sk]\n//! author : Martin Minka : https://github.com/k2s\n//! based on work of petrbela : https://github.com/petrbela\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months =\n 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split(\n '_'\n ),\n monthsShort = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_');\n function plural(n) {\n return n > 1 && n < 5;\n }\n function translate(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's': // a few seconds / in a few seconds / a few seconds ago\n return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami';\n case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'sekundy' : 'sekúnd');\n } else {\n return result + 'sekundami';\n }\n case 'm': // a minute / in a minute / a minute ago\n return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou';\n case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'minúty' : 'minút');\n } else {\n return result + 'minútami';\n }\n case 'h': // an hour / in an hour / an hour ago\n return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou';\n case 'hh': // 9 hours / in 9 hours / 9 hours ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'hodiny' : 'hodín');\n } else {\n return result + 'hodinami';\n }\n case 'd': // a day / in a day / a day ago\n return withoutSuffix || isFuture ? 'deň' : 'dňom';\n case 'dd': // 9 days / in 9 days / 9 days ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'dni' : 'dní');\n } else {\n return result + 'dňami';\n }\n case 'M': // a month / in a month / a month ago\n return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom';\n case 'MM': // 9 months / in 9 months / 9 months ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'mesiace' : 'mesiacov');\n } else {\n return result + 'mesiacmi';\n }\n case 'y': // a year / in a year / a year ago\n return withoutSuffix || isFuture ? 'rok' : 'rokom';\n case 'yy': // 9 years / in 9 years / 9 years ago\n if (withoutSuffix || isFuture) {\n return result + (plural(number) ? 'roky' : 'rokov');\n } else {\n return result + 'rokmi';\n }\n }\n }\n\n var sk = moment.defineLocale('sk', {\n months: months,\n monthsShort: monthsShort,\n weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'),\n weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'),\n weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'),\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[dnes o] LT',\n nextDay: '[zajtra o] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v nedeľu o] LT';\n case 1:\n case 2:\n return '[v] dddd [o] LT';\n case 3:\n return '[v stredu o] LT';\n case 4:\n return '[vo štvrtok o] LT';\n case 5:\n return '[v piatok o] LT';\n case 6:\n return '[v sobotu o] LT';\n }\n },\n lastDay: '[včera o] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[minulú nedeľu o] LT';\n case 1:\n case 2:\n return '[minulý] dddd [o] LT';\n case 3:\n return '[minulú stredu o] LT';\n case 4:\n case 5:\n return '[minulý] dddd [o] LT';\n case 6:\n return '[minulú sobotu o] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pred %s',\n s: translate,\n ss: translate,\n m: translate,\n mm: translate,\n h: translate,\n hh: translate,\n d: translate,\n dd: translate,\n M: translate,\n MM: translate,\n y: translate,\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Slovenian [sl]\n//! author : Robert Sedovšek : https://github.com/sedovsek\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var result = number + ' ';\n switch (key) {\n case 's':\n return withoutSuffix || isFuture\n ? 'nekaj sekund'\n : 'nekaj sekundami';\n case 'ss':\n if (number === 1) {\n result += withoutSuffix ? 'sekundo' : 'sekundi';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah';\n } else {\n result += 'sekund';\n }\n return result;\n case 'm':\n return withoutSuffix ? 'ena minuta' : 'eno minuto';\n case 'mm':\n if (number === 1) {\n result += withoutSuffix ? 'minuta' : 'minuto';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'minuti' : 'minutama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'minute' : 'minutami';\n } else {\n result += withoutSuffix || isFuture ? 'minut' : 'minutami';\n }\n return result;\n case 'h':\n return withoutSuffix ? 'ena ura' : 'eno uro';\n case 'hh':\n if (number === 1) {\n result += withoutSuffix ? 'ura' : 'uro';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'uri' : 'urama';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'ure' : 'urami';\n } else {\n result += withoutSuffix || isFuture ? 'ur' : 'urami';\n }\n return result;\n case 'd':\n return withoutSuffix || isFuture ? 'en dan' : 'enim dnem';\n case 'dd':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'dan' : 'dnem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevoma';\n } else {\n result += withoutSuffix || isFuture ? 'dni' : 'dnevi';\n }\n return result;\n case 'M':\n return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem';\n case 'MM':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'mesec' : 'mesecem';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'meseca' : 'mesecema';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'mesece' : 'meseci';\n } else {\n result += withoutSuffix || isFuture ? 'mesecev' : 'meseci';\n }\n return result;\n case 'y':\n return withoutSuffix || isFuture ? 'eno leto' : 'enim letom';\n case 'yy':\n if (number === 1) {\n result += withoutSuffix || isFuture ? 'leto' : 'letom';\n } else if (number === 2) {\n result += withoutSuffix || isFuture ? 'leti' : 'letoma';\n } else if (number < 5) {\n result += withoutSuffix || isFuture ? 'leta' : 'leti';\n } else {\n result += withoutSuffix || isFuture ? 'let' : 'leti';\n }\n return result;\n }\n }\n\n var sl = moment.defineLocale('sl', {\n months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'),\n weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'),\n weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD. MM. YYYY',\n LL: 'D. MMMM YYYY',\n LLL: 'D. MMMM YYYY H:mm',\n LLLL: 'dddd, D. MMMM YYYY H:mm',\n },\n calendar: {\n sameDay: '[danes ob] LT',\n nextDay: '[jutri ob] LT',\n\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[v] [nedeljo] [ob] LT';\n case 3:\n return '[v] [sredo] [ob] LT';\n case 6:\n return '[v] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[v] dddd [ob] LT';\n }\n },\n lastDay: '[včeraj ob] LT',\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n return '[prejšnjo] [nedeljo] [ob] LT';\n case 3:\n return '[prejšnjo] [sredo] [ob] LT';\n case 6:\n return '[prejšnjo] [soboto] [ob] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[prejšnji] dddd [ob] LT';\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'čez %s',\n past: 'pred %s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Albanian [sq]\n//! author : Flakërim Ismani : https://github.com/flakerimi\n//! author : Menelion Elensúle : https://github.com/Oire\n//! author : Oerd Cukalla : https://github.com/oerd\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sq = moment.defineLocale('sq', {\n months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split(\n '_'\n ),\n monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'),\n weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split(\n '_'\n ),\n weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'),\n weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /PD|MD/,\n isPM: function (input) {\n return input.charAt(0) === 'M';\n },\n meridiem: function (hours, minutes, isLower) {\n return hours < 12 ? 'PD' : 'MD';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Sot në] LT',\n nextDay: '[Nesër në] LT',\n nextWeek: 'dddd [në] LT',\n lastDay: '[Dje në] LT',\n lastWeek: 'dddd [e kaluar në] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'në %s',\n past: '%s më parë',\n s: 'disa sekonda',\n ss: '%d sekonda',\n m: 'një minutë',\n mm: '%d minuta',\n h: 'një orë',\n hh: '%d orë',\n d: 'një ditë',\n dd: '%d ditë',\n M: 'një muaj',\n MM: '%d muaj',\n y: 'një vit',\n yy: '%d vite',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sq;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian Cyrillic [sr-cyrl]\n//! author : Milan Janačković : https://github.com/milan-j\n//! author : Stefan Crnjaković : https://github.com/crnjakovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['секунда', 'секунде', 'секунди'],\n m: ['један минут', 'једног минута'],\n mm: ['минут', 'минута', 'минута'],\n h: ['један сат', 'једног сата'],\n hh: ['сат', 'сата', 'сати'],\n d: ['један дан', 'једног дана'],\n dd: ['дан', 'дана', 'дана'],\n M: ['један месец', 'једног месеца'],\n MM: ['месец', 'месеца', 'месеци'],\n y: ['једну годину', 'једне године'],\n yy: ['годину', 'године', 'година'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'једна година';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'годину') {\n return number + ' година';\n }\n\n return number + ' ' + word;\n },\n };\n\n var srCyrl = moment.defineLocale('sr-cyrl', {\n months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split(\n '_'\n ),\n monthsShort:\n 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split('_'),\n monthsParseExact: true,\n weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'),\n weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'),\n weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[данас у] LT',\n nextDay: '[сутра у] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[у] [недељу] [у] LT';\n case 3:\n return '[у] [среду] [у] LT';\n case 6:\n return '[у] [суботу] [у] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[у] dddd [у] LT';\n }\n },\n lastDay: '[јуче у] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[прошле] [недеље] [у] LT',\n '[прошлог] [понедељка] [у] LT',\n '[прошлог] [уторка] [у] LT',\n '[прошле] [среде] [у] LT',\n '[прошлог] [четвртка] [у] LT',\n '[прошлог] [петка] [у] LT',\n '[прошле] [суботе] [у] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: 'пре %s',\n s: 'неколико секунди',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return srCyrl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Serbian [sr]\n//! author : Milan Janačković : https://github.com/milan-j\n//! author : Stefan Crnjaković : https://github.com/crnjakovic\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var translator = {\n words: {\n //Different grammatical cases\n ss: ['sekunda', 'sekunde', 'sekundi'],\n m: ['jedan minut', 'jednog minuta'],\n mm: ['minut', 'minuta', 'minuta'],\n h: ['jedan sat', 'jednog sata'],\n hh: ['sat', 'sata', 'sati'],\n d: ['jedan dan', 'jednog dana'],\n dd: ['dan', 'dana', 'dana'],\n M: ['jedan mesec', 'jednog meseca'],\n MM: ['mesec', 'meseca', 'meseci'],\n y: ['jednu godinu', 'jedne godine'],\n yy: ['godinu', 'godine', 'godina'],\n },\n correctGrammaticalCase: function (number, wordKey) {\n if (\n number % 10 >= 1 &&\n number % 10 <= 4 &&\n (number % 100 < 10 || number % 100 >= 20)\n ) {\n return number % 10 === 1 ? wordKey[0] : wordKey[1];\n }\n return wordKey[2];\n },\n translate: function (number, withoutSuffix, key, isFuture) {\n var wordKey = translator.words[key],\n word;\n\n if (key.length === 1) {\n // Nominativ\n if (key === 'y' && withoutSuffix) return 'jedna godina';\n return isFuture || withoutSuffix ? wordKey[0] : wordKey[1];\n }\n\n word = translator.correctGrammaticalCase(number, wordKey);\n // Nominativ\n if (key === 'yy' && withoutSuffix && word === 'godinu') {\n return number + ' godina';\n }\n\n return number + ' ' + word;\n },\n };\n\n var sr = moment.defineLocale('sr', {\n months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split(\n '_'\n ),\n monthsShort:\n 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split('_'),\n monthsParseExact: true,\n weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split(\n '_'\n ),\n weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'),\n weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'D. M. YYYY.',\n LL: 'D. MMMM YYYY.',\n LLL: 'D. MMMM YYYY. H:mm',\n LLLL: 'dddd, D. MMMM YYYY. H:mm',\n },\n calendar: {\n sameDay: '[danas u] LT',\n nextDay: '[sutra u] LT',\n nextWeek: function () {\n switch (this.day()) {\n case 0:\n return '[u] [nedelju] [u] LT';\n case 3:\n return '[u] [sredu] [u] LT';\n case 6:\n return '[u] [subotu] [u] LT';\n case 1:\n case 2:\n case 4:\n case 5:\n return '[u] dddd [u] LT';\n }\n },\n lastDay: '[juče u] LT',\n lastWeek: function () {\n var lastWeekDays = [\n '[prošle] [nedelje] [u] LT',\n '[prošlog] [ponedeljka] [u] LT',\n '[prošlog] [utorka] [u] LT',\n '[prošle] [srede] [u] LT',\n '[prošlog] [četvrtka] [u] LT',\n '[prošlog] [petka] [u] LT',\n '[prošle] [subote] [u] LT',\n ];\n return lastWeekDays[this.day()];\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'za %s',\n past: 'pre %s',\n s: 'nekoliko sekundi',\n ss: translator.translate,\n m: translator.translate,\n mm: translator.translate,\n h: translator.translate,\n hh: translator.translate,\n d: translator.translate,\n dd: translator.translate,\n M: translator.translate,\n MM: translator.translate,\n y: translator.translate,\n yy: translator.translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sr;\n\n})));\n","//! moment.js locale configuration\n//! locale : siSwati [ss]\n//! author : Nicolai Davies : https://github.com/nicolaidavies\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ss = moment.defineLocale('ss', {\n months: \"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni\".split(\n '_'\n ),\n monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'),\n weekdays:\n 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split(\n '_'\n ),\n weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'),\n weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Namuhla nga] LT',\n nextDay: '[Kusasa nga] LT',\n nextWeek: 'dddd [nga] LT',\n lastDay: '[Itolo nga] LT',\n lastWeek: 'dddd [leliphelile] [nga] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'nga %s',\n past: 'wenteka nga %s',\n s: 'emizuzwana lomcane',\n ss: '%d mzuzwana',\n m: 'umzuzu',\n mm: '%d emizuzu',\n h: 'lihora',\n hh: '%d emahora',\n d: 'lilanga',\n dd: '%d emalanga',\n M: 'inyanga',\n MM: '%d tinyanga',\n y: 'umnyaka',\n yy: '%d iminyaka',\n },\n meridiemParse: /ekuseni|emini|entsambama|ebusuku/,\n meridiem: function (hours, minutes, isLower) {\n if (hours < 11) {\n return 'ekuseni';\n } else if (hours < 15) {\n return 'emini';\n } else if (hours < 19) {\n return 'entsambama';\n } else {\n return 'ebusuku';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'ekuseni') {\n return hour;\n } else if (meridiem === 'emini') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') {\n if (hour === 0) {\n return 0;\n }\n return hour + 12;\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: '%d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ss;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swedish [sv]\n//! author : Jens Alm : https://github.com/ulmus\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sv = moment.defineLocale('sv', {\n months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split(\n '_'\n ),\n monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'),\n weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'),\n weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'),\n weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY [kl.] HH:mm',\n LLLL: 'dddd D MMMM YYYY [kl.] HH:mm',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Idag] LT',\n nextDay: '[Imorgon] LT',\n lastDay: '[Igår] LT',\n nextWeek: '[På] dddd LT',\n lastWeek: '[I] dddd[s] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'om %s',\n past: 'för %s sedan',\n s: 'några sekunder',\n ss: '%d sekunder',\n m: 'en minut',\n mm: '%d minuter',\n h: 'en timme',\n hh: '%d timmar',\n d: 'en dag',\n dd: '%d dagar',\n M: 'en månad',\n MM: '%d månader',\n y: 'ett år',\n yy: '%d år',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(\\:e|\\:a)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? ':e'\n : b === 1\n ? ':a'\n : b === 2\n ? ':a'\n : b === 3\n ? ':e'\n : ':e';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return sv;\n\n})));\n","//! moment.js locale configuration\n//! locale : Swahili [sw]\n//! author : Fahad Kassim : https://github.com/fadsel\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var sw = moment.defineLocale('sw', {\n months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split(\n '_'\n ),\n monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'),\n weekdays:\n 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split(\n '_'\n ),\n weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'),\n weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'hh:mm A',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[leo saa] LT',\n nextDay: '[kesho saa] LT',\n nextWeek: '[wiki ijayo] dddd [saat] LT',\n lastDay: '[jana] LT',\n lastWeek: '[wiki iliyopita] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s baadaye',\n past: 'tokea %s',\n s: 'hivi punde',\n ss: 'sekunde %d',\n m: 'dakika moja',\n mm: 'dakika %d',\n h: 'saa limoja',\n hh: 'masaa %d',\n d: 'siku moja',\n dd: 'siku %d',\n M: 'mwezi mmoja',\n MM: 'miezi %d',\n y: 'mwaka mmoja',\n yy: 'miaka %d',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return sw;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tamil [ta]\n//! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var symbolMap = {\n 1: '௧',\n 2: '௨',\n 3: '௩',\n 4: '௪',\n 5: '௫',\n 6: '௬',\n 7: '௭',\n 8: '௮',\n 9: '௯',\n 0: '௦',\n },\n numberMap = {\n '௧': '1',\n '௨': '2',\n '௩': '3',\n '௪': '4',\n '௫': '5',\n '௬': '6',\n '௭': '7',\n '௮': '8',\n '௯': '9',\n '௦': '0',\n };\n\n var ta = moment.defineLocale('ta', {\n months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n monthsShort:\n 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split(\n '_'\n ),\n weekdays:\n 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split(\n '_'\n ),\n weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split(\n '_'\n ),\n weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, HH:mm',\n LLLL: 'dddd, D MMMM YYYY, HH:mm',\n },\n calendar: {\n sameDay: '[இன்று] LT',\n nextDay: '[நாளை] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[நேற்று] LT',\n lastWeek: '[கடந்த வாரம்] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s இல்',\n past: '%s முன்',\n s: 'ஒரு சில விநாடிகள்',\n ss: '%d விநாடிகள்',\n m: 'ஒரு நிமிடம்',\n mm: '%d நிமிடங்கள்',\n h: 'ஒரு மணி நேரம்',\n hh: '%d மணி நேரம்',\n d: 'ஒரு நாள்',\n dd: '%d நாட்கள்',\n M: 'ஒரு மாதம்',\n MM: '%d மாதங்கள்',\n y: 'ஒரு வருடம்',\n yy: '%d ஆண்டுகள்',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}வது/,\n ordinal: function (number) {\n return number + 'வது';\n },\n preparse: function (string) {\n return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {\n return numberMap[match];\n });\n },\n postformat: function (string) {\n return string.replace(/\\d/g, function (match) {\n return symbolMap[match];\n });\n },\n // refer http://ta.wikipedia.org/s/1er1\n meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,\n meridiem: function (hour, minute, isLower) {\n if (hour < 2) {\n return ' யாமம்';\n } else if (hour < 6) {\n return ' வைகறை'; // வைகறை\n } else if (hour < 10) {\n return ' காலை'; // காலை\n } else if (hour < 14) {\n return ' நண்பகல்'; // நண்பகல்\n } else if (hour < 18) {\n return ' எற்பாடு'; // எற்பாடு\n } else if (hour < 22) {\n return ' மாலை'; // மாலை\n } else {\n return ' யாமம்';\n }\n },\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'யாமம்') {\n return hour < 2 ? hour : hour + 12;\n } else if (meridiem === 'வைகறை' || meridiem === 'காலை') {\n return hour;\n } else if (meridiem === 'நண்பகல்') {\n return hour >= 10 ? hour : hour + 12;\n } else {\n return hour + 12;\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return ta;\n\n})));\n","//! moment.js locale configuration\n//! locale : Telugu [te]\n//! author : Krishna Chaitanya Thota : https://github.com/kcthota\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var te = moment.defineLocale('te', {\n months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split(\n '_'\n ),\n monthsShort:\n 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split(\n '_'\n ),\n weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'),\n weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'),\n longDateFormat: {\n LT: 'A h:mm',\n LTS: 'A h:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY, A h:mm',\n LLLL: 'dddd, D MMMM YYYY, A h:mm',\n },\n calendar: {\n sameDay: '[నేడు] LT',\n nextDay: '[రేపు] LT',\n nextWeek: 'dddd, LT',\n lastDay: '[నిన్న] LT',\n lastWeek: '[గత] dddd, LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s లో',\n past: '%s క్రితం',\n s: 'కొన్ని క్షణాలు',\n ss: '%d సెకన్లు',\n m: 'ఒక నిమిషం',\n mm: '%d నిమిషాలు',\n h: 'ఒక గంట',\n hh: '%d గంటలు',\n d: 'ఒక రోజు',\n dd: '%d రోజులు',\n M: 'ఒక నెల',\n MM: '%d నెలలు',\n y: 'ఒక సంవత్సరం',\n yy: '%d సంవత్సరాలు',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}వ/,\n ordinal: '%dవ',\n meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'రాత్రి') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'ఉదయం') {\n return hour;\n } else if (meridiem === 'మధ్యాహ్నం') {\n return hour >= 10 ? hour : hour + 12;\n } else if (meridiem === 'సాయంత్రం') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'రాత్రి';\n } else if (hour < 10) {\n return 'ఉదయం';\n } else if (hour < 17) {\n return 'మధ్యాహ్నం';\n } else if (hour < 20) {\n return 'సాయంత్రం';\n } else {\n return 'రాత్రి';\n }\n },\n week: {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n },\n });\n\n return te;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tetun Dili (East Timor) [tet]\n//! author : Joshua Brooks : https://github.com/joshbrooks\n//! author : Onorio De J. Afonso : https://github.com/marobo\n//! author : Sonia Simoes : https://github.com/soniasimoes\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tet = moment.defineLocale('tet', {\n months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'),\n weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'),\n weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'),\n weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Ohin iha] LT',\n nextDay: '[Aban iha] LT',\n nextWeek: 'dddd [iha] LT',\n lastDay: '[Horiseik iha] LT',\n lastWeek: 'dddd [semana kotuk] [iha] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'iha %s',\n past: '%s liuba',\n s: 'segundu balun',\n ss: 'segundu %d',\n m: 'minutu ida',\n mm: 'minutu %d',\n h: 'oras ida',\n hh: 'oras %d',\n d: 'loron ida',\n dd: 'loron %d',\n M: 'fulan ida',\n MM: 'fulan %d',\n y: 'tinan ida',\n yy: 'tinan %d',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(st|nd|rd|th)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tet;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tajik [tg]\n//! author : Orif N. Jr. : https://github.com/orif-jr\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 0: '-ум',\n 1: '-ум',\n 2: '-юм',\n 3: '-юм',\n 4: '-ум',\n 5: '-ум',\n 6: '-ум',\n 7: '-ум',\n 8: '-ум',\n 9: '-ум',\n 10: '-ум',\n 12: '-ум',\n 13: '-ум',\n 20: '-ум',\n 30: '-юм',\n 40: '-ум',\n 50: '-ум',\n 60: '-ум',\n 70: '-ум',\n 80: '-ум',\n 90: '-ум',\n 100: '-ум',\n };\n\n var tg = moment.defineLocale('tg', {\n months: {\n format: 'январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри'.split(\n '_'\n ),\n standalone:\n 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n },\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split(\n '_'\n ),\n weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'),\n weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Имрӯз соати] LT',\n nextDay: '[Фардо соати] LT',\n lastDay: '[Дирӯз соати] LT',\n nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT',\n lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'баъди %s',\n past: '%s пеш',\n s: 'якчанд сония',\n m: 'як дақиқа',\n mm: '%d дақиқа',\n h: 'як соат',\n hh: '%d соат',\n d: 'як рӯз',\n dd: '%d рӯз',\n M: 'як моҳ',\n MM: '%d моҳ',\n y: 'як сол',\n yy: '%d сол',\n },\n meridiemParse: /шаб|субҳ|рӯз|бегоҳ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === 'шаб') {\n return hour < 4 ? hour : hour + 12;\n } else if (meridiem === 'субҳ') {\n return hour;\n } else if (meridiem === 'рӯз') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === 'бегоҳ') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'шаб';\n } else if (hour < 11) {\n return 'субҳ';\n } else if (hour < 16) {\n return 'рӯз';\n } else if (hour < 19) {\n return 'бегоҳ';\n } else {\n return 'шаб';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(ум|юм)/,\n ordinal: function (number) {\n var a = number % 10,\n b = number >= 100 ? 100 : null;\n return number + (suffixes[number] || suffixes[a] || suffixes[b]);\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1th is the first week of the year.\n },\n });\n\n return tg;\n\n})));\n","//! moment.js locale configuration\n//! locale : Thai [th]\n//! author : Kridsada Thanabulpong : https://github.com/sirn\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var th = moment.defineLocale('th', {\n months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split(\n '_'\n ),\n monthsShort:\n 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'),\n weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference\n weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'H:mm',\n LTS: 'H:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY เวลา H:mm',\n LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm',\n },\n meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/,\n isPM: function (input) {\n return input === 'หลังเที่ยง';\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'ก่อนเที่ยง';\n } else {\n return 'หลังเที่ยง';\n }\n },\n calendar: {\n sameDay: '[วันนี้ เวลา] LT',\n nextDay: '[พรุ่งนี้ เวลา] LT',\n nextWeek: 'dddd[หน้า เวลา] LT',\n lastDay: '[เมื่อวานนี้ เวลา] LT',\n lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'อีก %s',\n past: '%sที่แล้ว',\n s: 'ไม่กี่วินาที',\n ss: '%d วินาที',\n m: '1 นาที',\n mm: '%d นาที',\n h: '1 ชั่วโมง',\n hh: '%d ชั่วโมง',\n d: '1 วัน',\n dd: '%d วัน',\n w: '1 สัปดาห์',\n ww: '%d สัปดาห์',\n M: '1 เดือน',\n MM: '%d เดือน',\n y: '1 ปี',\n yy: '%d ปี',\n },\n });\n\n return th;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkmen [tk]\n//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inji\",\n 5: \"'inji\",\n 8: \"'inji\",\n 70: \"'inji\",\n 80: \"'inji\",\n 2: \"'nji\",\n 7: \"'nji\",\n 20: \"'nji\",\n 50: \"'nji\",\n 3: \"'ünji\",\n 4: \"'ünji\",\n 100: \"'ünji\",\n 6: \"'njy\",\n 9: \"'unjy\",\n 10: \"'unjy\",\n 30: \"'unjy\",\n 60: \"'ynjy\",\n 90: \"'ynjy\",\n };\n\n var tk = moment.defineLocale('tk', {\n months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),\n weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(\n '_'\n ),\n weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),\n weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün sagat] LT',\n nextDay: '[ertir sagat] LT',\n nextWeek: '[indiki] dddd [sagat] LT',\n lastDay: '[düýn] LT',\n lastWeek: '[geçen] dddd [sagat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s soň',\n past: '%s öň',\n s: 'birnäçe sekunt',\n m: 'bir minut',\n mm: '%d minut',\n h: 'bir sagat',\n hh: '%d sagat',\n d: 'bir gün',\n dd: '%d gün',\n M: 'bir aý',\n MM: '%d aý',\n y: 'bir ýyl',\n yy: '%d ýyl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'unjy\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Tagalog (Philippines) [tl-ph]\n//! author : Dan Hagman : https://github.com/hagmandan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tlPh = moment.defineLocale('tl-ph', {\n months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split(\n '_'\n ),\n monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'),\n weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split(\n '_'\n ),\n weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'),\n weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'MM/D/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY HH:mm',\n LLLL: 'dddd, MMMM DD, YYYY HH:mm',\n },\n calendar: {\n sameDay: 'LT [ngayong araw]',\n nextDay: '[Bukas ng] LT',\n nextWeek: 'LT [sa susunod na] dddd',\n lastDay: 'LT [kahapon]',\n lastWeek: 'LT [noong nakaraang] dddd',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'sa loob ng %s',\n past: '%s ang nakalipas',\n s: 'ilang segundo',\n ss: '%d segundo',\n m: 'isang minuto',\n mm: '%d minuto',\n h: 'isang oras',\n hh: '%d oras',\n d: 'isang araw',\n dd: '%d araw',\n M: 'isang buwan',\n MM: '%d buwan',\n y: 'isang taon',\n yy: '%d taon',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlPh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Klingon [tlh]\n//! author : Dominika Kruk : https://github.com/amaranthrose\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');\n\n function translateFuture(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'leS'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'waQ'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'nem'\n : time + ' pIq';\n return time;\n }\n\n function translatePast(output) {\n var time = output;\n time =\n output.indexOf('jaj') !== -1\n ? time.slice(0, -3) + 'Hu’'\n : output.indexOf('jar') !== -1\n ? time.slice(0, -3) + 'wen'\n : output.indexOf('DIS') !== -1\n ? time.slice(0, -3) + 'ben'\n : time + ' ret';\n return time;\n }\n\n function translate(number, withoutSuffix, string, isFuture) {\n var numberNoun = numberAsNoun(number);\n switch (string) {\n case 'ss':\n return numberNoun + ' lup';\n case 'mm':\n return numberNoun + ' tup';\n case 'hh':\n return numberNoun + ' rep';\n case 'dd':\n return numberNoun + ' jaj';\n case 'MM':\n return numberNoun + ' jar';\n case 'yy':\n return numberNoun + ' DIS';\n }\n }\n\n function numberAsNoun(number) {\n var hundred = Math.floor((number % 1000) / 100),\n ten = Math.floor((number % 100) / 10),\n one = number % 10,\n word = '';\n if (hundred > 0) {\n word += numbersNouns[hundred] + 'vatlh';\n }\n if (ten > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH';\n }\n if (one > 0) {\n word += (word !== '' ? ' ' : '') + numbersNouns[one];\n }\n return word === '' ? 'pagh' : word;\n }\n\n var tlh = moment.defineLocale('tlh', {\n months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split(\n '_'\n ),\n monthsShort:\n 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split(\n '_'\n ),\n weekdaysShort:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n weekdaysMin:\n 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[DaHjaj] LT',\n nextDay: '[wa’leS] LT',\n nextWeek: 'LLL',\n lastDay: '[wa’Hu’] LT',\n lastWeek: 'LLL',\n sameElse: 'L',\n },\n relativeTime: {\n future: translateFuture,\n past: translatePast,\n s: 'puS lup',\n ss: translate,\n m: 'wa’ tup',\n mm: translate,\n h: 'wa’ rep',\n hh: translate,\n d: 'wa’ jaj',\n dd: translate,\n M: 'wa’ jar',\n MM: translate,\n y: 'wa’ DIS',\n yy: translate,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return tlh;\n\n})));\n","//! moment.js locale configuration\n//! locale : Turkish [tr]\n//! authors : Erhan Gundogan : https://github.com/erhangundogan,\n//! Burak Yiğit Kaya: https://github.com/BYK\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var suffixes = {\n 1: \"'inci\",\n 5: \"'inci\",\n 8: \"'inci\",\n 70: \"'inci\",\n 80: \"'inci\",\n 2: \"'nci\",\n 7: \"'nci\",\n 20: \"'nci\",\n 50: \"'nci\",\n 3: \"'üncü\",\n 4: \"'üncü\",\n 100: \"'üncü\",\n 6: \"'ncı\",\n 9: \"'uncu\",\n 10: \"'uncu\",\n 30: \"'uncu\",\n 60: \"'ıncı\",\n 90: \"'ıncı\",\n };\n\n var tr = moment.defineLocale('tr', {\n months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split(\n '_'\n ),\n monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),\n weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split(\n '_'\n ),\n weekdaysShort: 'Paz_Pzt_Sal_Çar_Per_Cum_Cmt'.split('_'),\n weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'öö' : 'ÖÖ';\n } else {\n return isLower ? 'ös' : 'ÖS';\n }\n },\n meridiemParse: /öö|ÖÖ|ös|ÖS/,\n isPM: function (input) {\n return input === 'ös' || input === 'ÖS';\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[bugün saat] LT',\n nextDay: '[yarın saat] LT',\n nextWeek: '[gelecek] dddd [saat] LT',\n lastDay: '[dün] LT',\n lastWeek: '[geçen] dddd [saat] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s sonra',\n past: '%s önce',\n s: 'birkaç saniye',\n ss: '%d saniye',\n m: 'bir dakika',\n mm: '%d dakika',\n h: 'bir saat',\n hh: '%d saat',\n d: 'bir gün',\n dd: '%d gün',\n w: 'bir hafta',\n ww: '%d hafta',\n M: 'bir ay',\n MM: '%d ay',\n y: 'bir yıl',\n yy: '%d yıl',\n },\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'Do':\n case 'DD':\n return number;\n default:\n if (number === 0) {\n // special case for zero\n return number + \"'ıncı\";\n }\n var a = number % 10,\n b = (number % 100) - a,\n c = number >= 100 ? 100 : null;\n return number + (suffixes[a] || suffixes[b] || suffixes[c]);\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return tr;\n\n})));\n","//! moment.js locale configuration\n//! locale : Talossan [tzl]\n//! author : Robin van der Vliet : https://github.com/robin0van0der0v\n//! author : Iustì Canun\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals.\n // This is currently too difficult (maybe even impossible) to add.\n var tzl = moment.defineLocale('tzl', {\n months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split(\n '_'\n ),\n monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'),\n weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'),\n weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'),\n weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'),\n longDateFormat: {\n LT: 'HH.mm',\n LTS: 'HH.mm.ss',\n L: 'DD.MM.YYYY',\n LL: 'D. MMMM [dallas] YYYY',\n LLL: 'D. MMMM [dallas] YYYY HH.mm',\n LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm',\n },\n meridiemParse: /d\\'o|d\\'a/i,\n isPM: function (input) {\n return \"d'o\" === input.toLowerCase();\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? \"d'o\" : \"D'O\";\n } else {\n return isLower ? \"d'a\" : \"D'A\";\n }\n },\n calendar: {\n sameDay: '[oxhi à] LT',\n nextDay: '[demà à] LT',\n nextWeek: 'dddd [à] LT',\n lastDay: '[ieiri à] LT',\n lastWeek: '[sür el] dddd [lasteu à] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'osprei %s',\n past: 'ja%s',\n s: processRelativeTime,\n ss: processRelativeTime,\n m: processRelativeTime,\n mm: processRelativeTime,\n h: processRelativeTime,\n hh: processRelativeTime,\n d: processRelativeTime,\n dd: processRelativeTime,\n M: processRelativeTime,\n MM: processRelativeTime,\n y: processRelativeTime,\n yy: processRelativeTime,\n },\n dayOfMonthOrdinalParse: /\\d{1,2}\\./,\n ordinal: '%d.',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n function processRelativeTime(number, withoutSuffix, key, isFuture) {\n var format = {\n s: ['viensas secunds', \"'iensas secunds\"],\n ss: [number + ' secunds', '' + number + ' secunds'],\n m: [\"'n míut\", \"'iens míut\"],\n mm: [number + ' míuts', '' + number + ' míuts'],\n h: [\"'n þora\", \"'iensa þora\"],\n hh: [number + ' þoras', '' + number + ' þoras'],\n d: [\"'n ziua\", \"'iensa ziua\"],\n dd: [number + ' ziuas', '' + number + ' ziuas'],\n M: [\"'n mes\", \"'iens mes\"],\n MM: [number + ' mesen', '' + number + ' mesen'],\n y: [\"'n ar\", \"'iens ar\"],\n yy: [number + ' ars', '' + number + ' ars'],\n };\n return isFuture\n ? format[key][0]\n : withoutSuffix\n ? format[key][0]\n : format[key][1];\n }\n\n return tzl;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight Latin [tzm-latn]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzmLatn = moment.defineLocale('tzm-latn', {\n months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n monthsShort:\n 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split(\n '_'\n ),\n weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[asdkh g] LT',\n nextDay: '[aska g] LT',\n nextWeek: 'dddd [g] LT',\n lastDay: '[assant g] LT',\n lastWeek: 'dddd [g] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'dadkh s yan %s',\n past: 'yan %s',\n s: 'imik',\n ss: '%d imik',\n m: 'minuḍ',\n mm: '%d minuḍ',\n h: 'saɛa',\n hh: '%d tassaɛin',\n d: 'ass',\n dd: '%d ossan',\n M: 'ayowr',\n MM: '%d iyyirn',\n y: 'asgas',\n yy: '%d isgasn',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzmLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Central Atlas Tamazight [tzm]\n//! author : Abdel Said : https://github.com/abdelsaid\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var tzm = moment.defineLocale('tzm', {\n months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n monthsShort:\n 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split(\n '_'\n ),\n weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[ⴰⵙⴷⵅ ⴴ] LT',\n nextDay: '[ⴰⵙⴽⴰ ⴴ] LT',\n nextWeek: 'dddd [ⴴ] LT',\n lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',\n lastWeek: 'dddd [ⴴ] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s',\n past: 'ⵢⴰⵏ %s',\n s: 'ⵉⵎⵉⴽ',\n ss: '%d ⵉⵎⵉⴽ',\n m: 'ⵎⵉⵏⵓⴺ',\n mm: '%d ⵎⵉⵏⵓⴺ',\n h: 'ⵙⴰⵄⴰ',\n hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ',\n d: 'ⴰⵙⵙ',\n dd: '%d oⵙⵙⴰⵏ',\n M: 'ⴰⵢoⵓⵔ',\n MM: '%d ⵉⵢⵢⵉⵔⵏ',\n y: 'ⴰⵙⴳⴰⵙ',\n yy: '%d ⵉⵙⴳⴰⵙⵏ',\n },\n week: {\n dow: 6, // Saturday is the first day of the week.\n doy: 12, // The week that contains Jan 12th is the first week of the year.\n },\n });\n\n return tzm;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uyghur (China) [ug-cn]\n//! author: boyaq : https://github.com/boyaq\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var ugCn = moment.defineLocale('ug-cn', {\n months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n monthsShort:\n 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split(\n '_'\n ),\n weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split(\n '_'\n ),\n weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY-MM-DD',\n LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى',\n LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm',\n },\n meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (\n meridiem === 'يېرىم كېچە' ||\n meridiem === 'سەھەر' ||\n meridiem === 'چۈشتىن بۇرۇن'\n ) {\n return hour;\n } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') {\n return hour + 12;\n } else {\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return 'يېرىم كېچە';\n } else if (hm < 900) {\n return 'سەھەر';\n } else if (hm < 1130) {\n return 'چۈشتىن بۇرۇن';\n } else if (hm < 1230) {\n return 'چۈش';\n } else if (hm < 1800) {\n return 'چۈشتىن كېيىن';\n } else {\n return 'كەچ';\n }\n },\n calendar: {\n sameDay: '[بۈگۈن سائەت] LT',\n nextDay: '[ئەتە سائەت] LT',\n nextWeek: '[كېلەركى] dddd [سائەت] LT',\n lastDay: '[تۆنۈگۈن] LT',\n lastWeek: '[ئالدىنقى] dddd [سائەت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s كېيىن',\n past: '%s بۇرۇن',\n s: 'نەچچە سېكونت',\n ss: '%d سېكونت',\n m: 'بىر مىنۇت',\n mm: '%d مىنۇت',\n h: 'بىر سائەت',\n hh: '%d سائەت',\n d: 'بىر كۈن',\n dd: '%d كۈن',\n M: 'بىر ئاي',\n MM: '%d ئاي',\n y: 'بىر يىل',\n yy: '%d يىل',\n },\n\n dayOfMonthOrdinalParse: /\\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '-كۈنى';\n case 'w':\n case 'W':\n return number + '-ھەپتە';\n default:\n return number;\n }\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 1st is the first week of the year.\n },\n });\n\n return ugCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Ukrainian [uk]\n//! author : zemlanin : https://github.com/zemlanin\n//! Author : Menelion Elensúle : https://github.com/Oire\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n function plural(word, num) {\n var forms = word.split('_');\n return num % 10 === 1 && num % 100 !== 11\n ? forms[0]\n : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)\n ? forms[1]\n : forms[2];\n }\n function relativeTimeWithPlural(number, withoutSuffix, key) {\n var format = {\n ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд',\n mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин',\n hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин',\n dd: 'день_дні_днів',\n MM: 'місяць_місяці_місяців',\n yy: 'рік_роки_років',\n };\n if (key === 'm') {\n return withoutSuffix ? 'хвилина' : 'хвилину';\n } else if (key === 'h') {\n return withoutSuffix ? 'година' : 'годину';\n } else {\n return number + ' ' + plural(format[key], +number);\n }\n }\n function weekdaysCaseReplace(m, format) {\n var weekdays = {\n nominative:\n 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split(\n '_'\n ),\n accusative:\n 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split(\n '_'\n ),\n genitive:\n 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split(\n '_'\n ),\n },\n nounCase;\n\n if (m === true) {\n return weekdays['nominative']\n .slice(1, 7)\n .concat(weekdays['nominative'].slice(0, 1));\n }\n if (!m) {\n return weekdays['nominative'];\n }\n\n nounCase = /(\\[[ВвУу]\\]) ?dddd/.test(format)\n ? 'accusative'\n : /\\[?(?:минулої|наступної)? ?\\] ?dddd/.test(format)\n ? 'genitive'\n : 'nominative';\n return weekdays[nounCase][m.day()];\n }\n function processHoursFunction(str) {\n return function () {\n return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';\n };\n }\n\n var uk = moment.defineLocale('uk', {\n months: {\n format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split(\n '_'\n ),\n standalone:\n 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split(\n '_'\n ),\n },\n monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split(\n '_'\n ),\n weekdays: weekdaysCaseReplace,\n weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD.MM.YYYY',\n LL: 'D MMMM YYYY р.',\n LLL: 'D MMMM YYYY р., HH:mm',\n LLLL: 'dddd, D MMMM YYYY р., HH:mm',\n },\n calendar: {\n sameDay: processHoursFunction('[Сьогодні '),\n nextDay: processHoursFunction('[Завтра '),\n lastDay: processHoursFunction('[Вчора '),\n nextWeek: processHoursFunction('[У] dddd ['),\n lastWeek: function () {\n switch (this.day()) {\n case 0:\n case 3:\n case 5:\n case 6:\n return processHoursFunction('[Минулої] dddd [').call(this);\n case 1:\n case 2:\n case 4:\n return processHoursFunction('[Минулого] dddd [').call(this);\n }\n },\n sameElse: 'L',\n },\n relativeTime: {\n future: 'за %s',\n past: '%s тому',\n s: 'декілька секунд',\n ss: relativeTimeWithPlural,\n m: relativeTimeWithPlural,\n mm: relativeTimeWithPlural,\n h: 'годину',\n hh: relativeTimeWithPlural,\n d: 'день',\n dd: relativeTimeWithPlural,\n M: 'місяць',\n MM: relativeTimeWithPlural,\n y: 'рік',\n yy: relativeTimeWithPlural,\n },\n // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason\n meridiemParse: /ночі|ранку|дня|вечора/,\n isPM: function (input) {\n return /^(дня|вечора)$/.test(input);\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 4) {\n return 'ночі';\n } else if (hour < 12) {\n return 'ранку';\n } else if (hour < 17) {\n return 'дня';\n } else {\n return 'вечора';\n }\n },\n dayOfMonthOrdinalParse: /\\d{1,2}-(й|го)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'M':\n case 'd':\n case 'DDD':\n case 'w':\n case 'W':\n return number + '-й';\n case 'D':\n return number + '-го';\n default:\n return number;\n }\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Urdu [ur]\n//! author : Sawood Alam : https://github.com/ibnesayeed\n//! author : Zack : https://github.com/ZackVision\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var months = [\n 'جنوری',\n 'فروری',\n 'مارچ',\n 'اپریل',\n 'مئی',\n 'جون',\n 'جولائی',\n 'اگست',\n 'ستمبر',\n 'اکتوبر',\n 'نومبر',\n 'دسمبر',\n ],\n days = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ'];\n\n var ur = moment.defineLocale('ur', {\n months: months,\n monthsShort: months,\n weekdays: days,\n weekdaysShort: days,\n weekdaysMin: days,\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd، D MMMM YYYY HH:mm',\n },\n meridiemParse: /صبح|شام/,\n isPM: function (input) {\n return 'شام' === input;\n },\n meridiem: function (hour, minute, isLower) {\n if (hour < 12) {\n return 'صبح';\n }\n return 'شام';\n },\n calendar: {\n sameDay: '[آج بوقت] LT',\n nextDay: '[کل بوقت] LT',\n nextWeek: 'dddd [بوقت] LT',\n lastDay: '[گذشتہ روز بوقت] LT',\n lastWeek: '[گذشتہ] dddd [بوقت] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s بعد',\n past: '%s قبل',\n s: 'چند سیکنڈ',\n ss: '%d سیکنڈ',\n m: 'ایک منٹ',\n mm: '%d منٹ',\n h: 'ایک گھنٹہ',\n hh: '%d گھنٹے',\n d: 'ایک دن',\n dd: '%d دن',\n M: 'ایک ماہ',\n MM: '%d ماہ',\n y: 'ایک سال',\n yy: '%d سال',\n },\n preparse: function (string) {\n return string.replace(/،/g, ',');\n },\n postformat: function (string) {\n return string.replace(/,/g, '،');\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return ur;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek Latin [uz-latn]\n//! author : Rasulbek Mirzayev : github.com/Rasulbeeek\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uzLatn = moment.defineLocale('uz-latn', {\n months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split(\n '_'\n ),\n monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'),\n weekdays:\n 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split(\n '_'\n ),\n weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'),\n weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Bugun soat] LT [da]',\n nextDay: '[Ertaga] LT [da]',\n nextWeek: 'dddd [kuni soat] LT [da]',\n lastDay: '[Kecha soat] LT [da]',\n lastWeek: \"[O'tgan] dddd [kuni soat] LT [da]\",\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Yaqin %s ichida',\n past: 'Bir necha %s oldin',\n s: 'soniya',\n ss: '%d soniya',\n m: 'bir daqiqa',\n mm: '%d daqiqa',\n h: 'bir soat',\n hh: '%d soat',\n d: 'bir kun',\n dd: '%d kun',\n M: 'bir oy',\n MM: '%d oy',\n y: 'bir yil',\n yy: '%d yil',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 7th is the first week of the year.\n },\n });\n\n return uzLatn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Uzbek [uz]\n//! author : Sardor Muminov : https://github.com/muminoff\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var uz = moment.defineLocale('uz', {\n months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split(\n '_'\n ),\n monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'),\n weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'),\n weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'),\n weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'D MMMM YYYY, dddd HH:mm',\n },\n calendar: {\n sameDay: '[Бугун соат] LT [да]',\n nextDay: '[Эртага] LT [да]',\n nextWeek: 'dddd [куни соат] LT [да]',\n lastDay: '[Кеча соат] LT [да]',\n lastWeek: '[Утган] dddd [куни соат] LT [да]',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'Якин %s ичида',\n past: 'Бир неча %s олдин',\n s: 'фурсат',\n ss: '%d фурсат',\n m: 'бир дакика',\n mm: '%d дакика',\n h: 'бир соат',\n hh: '%d соат',\n d: 'бир кун',\n dd: '%d кун',\n M: 'бир ой',\n MM: '%d ой',\n y: 'бир йил',\n yy: '%d йил',\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 7, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return uz;\n\n})));\n","//! moment.js locale configuration\n//! locale : Vietnamese [vi]\n//! author : Bang Nguyen : https://github.com/bangnk\n//! author : Chien Kira : https://github.com/chienkira\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var vi = moment.defineLocale('vi', {\n months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split(\n '_'\n ),\n monthsShort:\n 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split(\n '_'\n ),\n weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'),\n weekdaysParseExact: true,\n meridiemParse: /sa|ch/i,\n isPM: function (input) {\n return /^ch$/i.test(input);\n },\n meridiem: function (hours, minutes, isLower) {\n if (hours < 12) {\n return isLower ? 'sa' : 'SA';\n } else {\n return isLower ? 'ch' : 'CH';\n }\n },\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM [năm] YYYY',\n LLL: 'D MMMM [năm] YYYY HH:mm',\n LLLL: 'dddd, D MMMM [năm] YYYY HH:mm',\n l: 'DD/M/YYYY',\n ll: 'D MMM YYYY',\n lll: 'D MMM YYYY HH:mm',\n llll: 'ddd, D MMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[Hôm nay lúc] LT',\n nextDay: '[Ngày mai lúc] LT',\n nextWeek: 'dddd [tuần tới lúc] LT',\n lastDay: '[Hôm qua lúc] LT',\n lastWeek: 'dddd [tuần trước lúc] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: '%s tới',\n past: '%s trước',\n s: 'vài giây',\n ss: '%d giây',\n m: 'một phút',\n mm: '%d phút',\n h: 'một giờ',\n hh: '%d giờ',\n d: 'một ngày',\n dd: '%d ngày',\n w: 'một tuần',\n ww: '%d tuần',\n M: 'một tháng',\n MM: '%d tháng',\n y: 'một năm',\n yy: '%d năm',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}/,\n ordinal: function (number) {\n return number;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return vi;\n\n})));\n","//! moment.js locale configuration\n//! locale : Pseudo [x-pseudo]\n//! author : Andrew Hood : https://github.com/andrewhood125\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var xPseudo = moment.defineLocale('x-pseudo', {\n months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split(\n '_'\n ),\n monthsShort:\n 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split(\n '_'\n ),\n monthsParseExact: true,\n weekdays:\n 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split(\n '_'\n ),\n weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'),\n weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'),\n weekdaysParseExact: true,\n longDateFormat: {\n LT: 'HH:mm',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY HH:mm',\n LLLL: 'dddd, D MMMM YYYY HH:mm',\n },\n calendar: {\n sameDay: '[T~ódá~ý át] LT',\n nextDay: '[T~ómó~rró~w át] LT',\n nextWeek: 'dddd [át] LT',\n lastDay: '[Ý~ést~érdá~ý át] LT',\n lastWeek: '[L~ást] dddd [át] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'í~ñ %s',\n past: '%s á~gó',\n s: 'á ~féw ~sécó~ñds',\n ss: '%d s~écóñ~ds',\n m: 'á ~míñ~úté',\n mm: '%d m~íñú~tés',\n h: 'á~ñ hó~úr',\n hh: '%d h~óúrs',\n d: 'á ~dáý',\n dd: '%d d~áýs',\n M: 'á ~móñ~th',\n MM: '%d m~óñt~hs',\n y: 'á ~ýéár',\n yy: '%d ý~éárs',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n ~~((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return xPseudo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Yoruba Nigeria [yo]\n//! author : Atolagbe Abisoye : https://github.com/andela-batolagbe\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var yo = moment.defineLocale('yo', {\n months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split(\n '_'\n ),\n monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'),\n weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'),\n weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'),\n weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'),\n longDateFormat: {\n LT: 'h:mm A',\n LTS: 'h:mm:ss A',\n L: 'DD/MM/YYYY',\n LL: 'D MMMM YYYY',\n LLL: 'D MMMM YYYY h:mm A',\n LLLL: 'dddd, D MMMM YYYY h:mm A',\n },\n calendar: {\n sameDay: '[Ònì ni] LT',\n nextDay: '[Ọ̀la ni] LT',\n nextWeek: \"dddd [Ọsẹ̀ tón'bọ] [ni] LT\",\n lastDay: '[Àna ni] LT',\n lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT',\n sameElse: 'L',\n },\n relativeTime: {\n future: 'ní %s',\n past: '%s kọjá',\n s: 'ìsẹjú aayá die',\n ss: 'aayá %d',\n m: 'ìsẹjú kan',\n mm: 'ìsẹjú %d',\n h: 'wákati kan',\n hh: 'wákati %d',\n d: 'ọjọ́ kan',\n dd: 'ọjọ́ %d',\n M: 'osù kan',\n MM: 'osù %d',\n y: 'ọdún kan',\n yy: 'ọdún %d',\n },\n dayOfMonthOrdinalParse: /ọjọ́\\s\\d{1,2}/,\n ordinal: 'ọjọ́ %d',\n week: {\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return yo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (China) [zh-cn]\n//! author : suupic : https://github.com/suupic\n//! author : Zeno Zeng : https://github.com/zenozeng\n//! author : uu109 : https://github.com/uu109\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhCn = moment.defineLocale('zh-cn', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日Ah点mm分',\n LLLL: 'YYYY年M月D日ddddAh点mm分',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n } else {\n // '中午'\n return hour >= 11 ? hour : hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: function (now) {\n if (now.week() !== this.week()) {\n return '[下]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n lastDay: '[昨天]LT',\n lastWeek: function (now) {\n if (this.week() !== now.week()) {\n return '[上]dddLT';\n } else {\n return '[本]dddLT';\n }\n },\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|周)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '周';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s后',\n past: '%s前',\n s: '几秒',\n ss: '%d 秒',\n m: '1 分钟',\n mm: '%d 分钟',\n h: '1 小时',\n hh: '%d 小时',\n d: '1 天',\n dd: '%d 天',\n w: '1 周',\n ww: '%d 周',\n M: '1 个月',\n MM: '%d 个月',\n y: '1 年',\n yy: '%d 年',\n },\n week: {\n // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效\n dow: 1, // Monday is the first day of the week.\n doy: 4, // The week that contains Jan 4th is the first week of the year.\n },\n });\n\n return zhCn;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Hong Kong) [zh-hk]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Konstantin : https://github.com/skfd\n//! author : Anthony : https://github.com/anthonylau\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhHk = moment.defineLocale('zh-hk', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1200) {\n return '上午';\n } else if (hm === 1200) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天]LT',\n nextDay: '[明天]LT',\n nextWeek: '[下]ddddLT',\n lastDay: '[昨天]LT',\n lastWeek: '[上]ddddLT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhHk;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Macau) [zh-mo]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n//! author : Tan Yuanhong : https://github.com/le0tan\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhMo = moment.defineLocale('zh-mo', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'DD/MM/YYYY',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'D/M/YYYY',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s內',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhMo;\n\n})));\n","//! moment.js locale configuration\n//! locale : Chinese (Taiwan) [zh-tw]\n//! author : Ben : https://github.com/ben-lin\n//! author : Chris Lam : https://github.com/hehachris\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n && typeof require === 'function' ? factory(require('../moment')) :\n typeof define === 'function' && define.amd ? define(['../moment'], factory) :\n factory(global.moment)\n}(this, (function (moment) { 'use strict';\n\n //! moment.js locale configuration\n\n var zhTw = moment.defineLocale('zh-tw', {\n months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(\n '_'\n ),\n monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(\n '_'\n ),\n weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),\n weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'),\n weekdaysMin: '日_一_二_三_四_五_六'.split('_'),\n longDateFormat: {\n LT: 'HH:mm',\n LTS: 'HH:mm:ss',\n L: 'YYYY/MM/DD',\n LL: 'YYYY年M月D日',\n LLL: 'YYYY年M月D日 HH:mm',\n LLLL: 'YYYY年M月D日dddd HH:mm',\n l: 'YYYY/M/D',\n ll: 'YYYY年M月D日',\n lll: 'YYYY年M月D日 HH:mm',\n llll: 'YYYY年M月D日dddd HH:mm',\n },\n meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,\n meridiemHour: function (hour, meridiem) {\n if (hour === 12) {\n hour = 0;\n }\n if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {\n return hour;\n } else if (meridiem === '中午') {\n return hour >= 11 ? hour : hour + 12;\n } else if (meridiem === '下午' || meridiem === '晚上') {\n return hour + 12;\n }\n },\n meridiem: function (hour, minute, isLower) {\n var hm = hour * 100 + minute;\n if (hm < 600) {\n return '凌晨';\n } else if (hm < 900) {\n return '早上';\n } else if (hm < 1130) {\n return '上午';\n } else if (hm < 1230) {\n return '中午';\n } else if (hm < 1800) {\n return '下午';\n } else {\n return '晚上';\n }\n },\n calendar: {\n sameDay: '[今天] LT',\n nextDay: '[明天] LT',\n nextWeek: '[下]dddd LT',\n lastDay: '[昨天] LT',\n lastWeek: '[上]dddd LT',\n sameElse: 'L',\n },\n dayOfMonthOrdinalParse: /\\d{1,2}(日|月|週)/,\n ordinal: function (number, period) {\n switch (period) {\n case 'd':\n case 'D':\n case 'DDD':\n return number + '日';\n case 'M':\n return number + '月';\n case 'w':\n case 'W':\n return number + '週';\n default:\n return number;\n }\n },\n relativeTime: {\n future: '%s後',\n past: '%s前',\n s: '幾秒',\n ss: '%d 秒',\n m: '1 分鐘',\n mm: '%d 分鐘',\n h: '1 小時',\n hh: '%d 小時',\n d: '1 天',\n dd: '%d 天',\n M: '1 個月',\n MM: '%d 個月',\n y: '1 年',\n yy: '%d 年',\n },\n });\n\n return zhTw;\n\n})));\n","//! moment.js\n//! version : 2.29.4\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n;(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n global.moment = factory()\n}(this, (function () { 'use strict';\n\n var hookCallback;\n\n function hooks() {\n return hookCallback.apply(null, arguments);\n }\n\n // This is done to register the method called with moment()\n // without creating circular dependencies.\n function setHookCallback(callback) {\n hookCallback = callback;\n }\n\n function isArray(input) {\n return (\n input instanceof Array ||\n Object.prototype.toString.call(input) === '[object Array]'\n );\n }\n\n function isObject(input) {\n // IE8 will treat undefined and null as object if it wasn't for\n // input != null\n return (\n input != null &&\n Object.prototype.toString.call(input) === '[object Object]'\n );\n }\n\n function hasOwnProp(a, b) {\n return Object.prototype.hasOwnProperty.call(a, b);\n }\n\n function isObjectEmpty(obj) {\n if (Object.getOwnPropertyNames) {\n return Object.getOwnPropertyNames(obj).length === 0;\n } else {\n var k;\n for (k in obj) {\n if (hasOwnProp(obj, k)) {\n return false;\n }\n }\n return true;\n }\n }\n\n function isUndefined(input) {\n return input === void 0;\n }\n\n function isNumber(input) {\n return (\n typeof input === 'number' ||\n Object.prototype.toString.call(input) === '[object Number]'\n );\n }\n\n function isDate(input) {\n return (\n input instanceof Date ||\n Object.prototype.toString.call(input) === '[object Date]'\n );\n }\n\n function map(arr, fn) {\n var res = [],\n i,\n arrLen = arr.length;\n for (i = 0; i < arrLen; ++i) {\n res.push(fn(arr[i], i));\n }\n return res;\n }\n\n function extend(a, b) {\n for (var i in b) {\n if (hasOwnProp(b, i)) {\n a[i] = b[i];\n }\n }\n\n if (hasOwnProp(b, 'toString')) {\n a.toString = b.toString;\n }\n\n if (hasOwnProp(b, 'valueOf')) {\n a.valueOf = b.valueOf;\n }\n\n return a;\n }\n\n function createUTC(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, true).utc();\n }\n\n function defaultParsingFlags() {\n // We need to deep clone this object.\n return {\n empty: false,\n unusedTokens: [],\n unusedInput: [],\n overflow: -2,\n charsLeftOver: 0,\n nullInput: false,\n invalidEra: null,\n invalidMonth: null,\n invalidFormat: false,\n userInvalidated: false,\n iso: false,\n parsedDateParts: [],\n era: null,\n meridiem: null,\n rfc2822: false,\n weekdayMismatch: false,\n };\n }\n\n function getParsingFlags(m) {\n if (m._pf == null) {\n m._pf = defaultParsingFlags();\n }\n return m._pf;\n }\n\n var some;\n if (Array.prototype.some) {\n some = Array.prototype.some;\n } else {\n some = function (fun) {\n var t = Object(this),\n len = t.length >>> 0,\n i;\n\n for (i = 0; i < len; i++) {\n if (i in t && fun.call(this, t[i], i, t)) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n function isValid(m) {\n if (m._isValid == null) {\n var flags = getParsingFlags(m),\n parsedParts = some.call(flags.parsedDateParts, function (i) {\n return i != null;\n }),\n isNowValid =\n !isNaN(m._d.getTime()) &&\n flags.overflow < 0 &&\n !flags.empty &&\n !flags.invalidEra &&\n !flags.invalidMonth &&\n !flags.invalidWeekday &&\n !flags.weekdayMismatch &&\n !flags.nullInput &&\n !flags.invalidFormat &&\n !flags.userInvalidated &&\n (!flags.meridiem || (flags.meridiem && parsedParts));\n\n if (m._strict) {\n isNowValid =\n isNowValid &&\n flags.charsLeftOver === 0 &&\n flags.unusedTokens.length === 0 &&\n flags.bigHour === undefined;\n }\n\n if (Object.isFrozen == null || !Object.isFrozen(m)) {\n m._isValid = isNowValid;\n } else {\n return isNowValid;\n }\n }\n return m._isValid;\n }\n\n function createInvalid(flags) {\n var m = createUTC(NaN);\n if (flags != null) {\n extend(getParsingFlags(m), flags);\n } else {\n getParsingFlags(m).userInvalidated = true;\n }\n\n return m;\n }\n\n // Plugins that add properties should also add the key here (null value),\n // so we can properly clone ourselves.\n var momentProperties = (hooks.momentProperties = []),\n updateInProgress = false;\n\n function copyConfig(to, from) {\n var i,\n prop,\n val,\n momentPropertiesLen = momentProperties.length;\n\n if (!isUndefined(from._isAMomentObject)) {\n to._isAMomentObject = from._isAMomentObject;\n }\n if (!isUndefined(from._i)) {\n to._i = from._i;\n }\n if (!isUndefined(from._f)) {\n to._f = from._f;\n }\n if (!isUndefined(from._l)) {\n to._l = from._l;\n }\n if (!isUndefined(from._strict)) {\n to._strict = from._strict;\n }\n if (!isUndefined(from._tzm)) {\n to._tzm = from._tzm;\n }\n if (!isUndefined(from._isUTC)) {\n to._isUTC = from._isUTC;\n }\n if (!isUndefined(from._offset)) {\n to._offset = from._offset;\n }\n if (!isUndefined(from._pf)) {\n to._pf = getParsingFlags(from);\n }\n if (!isUndefined(from._locale)) {\n to._locale = from._locale;\n }\n\n if (momentPropertiesLen > 0) {\n for (i = 0; i < momentPropertiesLen; i++) {\n prop = momentProperties[i];\n val = from[prop];\n if (!isUndefined(val)) {\n to[prop] = val;\n }\n }\n }\n\n return to;\n }\n\n // Moment prototype object\n function Moment(config) {\n copyConfig(this, config);\n this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n if (!this.isValid()) {\n this._d = new Date(NaN);\n }\n // Prevent infinite loop in case updateOffset creates new moment\n // objects.\n if (updateInProgress === false) {\n updateInProgress = true;\n hooks.updateOffset(this);\n updateInProgress = false;\n }\n }\n\n function isMoment(obj) {\n return (\n obj instanceof Moment || (obj != null && obj._isAMomentObject != null)\n );\n }\n\n function warn(msg) {\n if (\n hooks.suppressDeprecationWarnings === false &&\n typeof console !== 'undefined' &&\n console.warn\n ) {\n console.warn('Deprecation warning: ' + msg);\n }\n }\n\n function deprecate(msg, fn) {\n var firstTime = true;\n\n return extend(function () {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(null, msg);\n }\n if (firstTime) {\n var args = [],\n arg,\n i,\n key,\n argLen = arguments.length;\n for (i = 0; i < argLen; i++) {\n arg = '';\n if (typeof arguments[i] === 'object') {\n arg += '\\n[' + i + '] ';\n for (key in arguments[0]) {\n if (hasOwnProp(arguments[0], key)) {\n arg += key + ': ' + arguments[0][key] + ', ';\n }\n }\n arg = arg.slice(0, -2); // Remove trailing comma and space\n } else {\n arg = arguments[i];\n }\n args.push(arg);\n }\n warn(\n msg +\n '\\nArguments: ' +\n Array.prototype.slice.call(args).join('') +\n '\\n' +\n new Error().stack\n );\n firstTime = false;\n }\n return fn.apply(this, arguments);\n }, fn);\n }\n\n var deprecations = {};\n\n function deprecateSimple(name, msg) {\n if (hooks.deprecationHandler != null) {\n hooks.deprecationHandler(name, msg);\n }\n if (!deprecations[name]) {\n warn(msg);\n deprecations[name] = true;\n }\n }\n\n hooks.suppressDeprecationWarnings = false;\n hooks.deprecationHandler = null;\n\n function isFunction(input) {\n return (\n (typeof Function !== 'undefined' && input instanceof Function) ||\n Object.prototype.toString.call(input) === '[object Function]'\n );\n }\n\n function set(config) {\n var prop, i;\n for (i in config) {\n if (hasOwnProp(config, i)) {\n prop = config[i];\n if (isFunction(prop)) {\n this[i] = prop;\n } else {\n this['_' + i] = prop;\n }\n }\n }\n this._config = config;\n // Lenient ordinal parsing accepts just a number in addition to\n // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n this._dayOfMonthOrdinalParseLenient = new RegExp(\n (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +\n '|' +\n /\\d{1,2}/.source\n );\n }\n\n function mergeConfigs(parentConfig, childConfig) {\n var res = extend({}, parentConfig),\n prop;\n for (prop in childConfig) {\n if (hasOwnProp(childConfig, prop)) {\n if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {\n res[prop] = {};\n extend(res[prop], parentConfig[prop]);\n extend(res[prop], childConfig[prop]);\n } else if (childConfig[prop] != null) {\n res[prop] = childConfig[prop];\n } else {\n delete res[prop];\n }\n }\n }\n for (prop in parentConfig) {\n if (\n hasOwnProp(parentConfig, prop) &&\n !hasOwnProp(childConfig, prop) &&\n isObject(parentConfig[prop])\n ) {\n // make sure changes to properties don't modify parent config\n res[prop] = extend({}, res[prop]);\n }\n }\n return res;\n }\n\n function Locale(config) {\n if (config != null) {\n this.set(config);\n }\n }\n\n var keys;\n\n if (Object.keys) {\n keys = Object.keys;\n } else {\n keys = function (obj) {\n var i,\n res = [];\n for (i in obj) {\n if (hasOwnProp(obj, i)) {\n res.push(i);\n }\n }\n return res;\n };\n }\n\n var defaultCalendar = {\n sameDay: '[Today at] LT',\n nextDay: '[Tomorrow at] LT',\n nextWeek: 'dddd [at] LT',\n lastDay: '[Yesterday at] LT',\n lastWeek: '[Last] dddd [at] LT',\n sameElse: 'L',\n };\n\n function calendar(key, mom, now) {\n var output = this._calendar[key] || this._calendar['sameElse'];\n return isFunction(output) ? output.call(mom, now) : output;\n }\n\n function zeroFill(number, targetLength, forceSign) {\n var absNumber = '' + Math.abs(number),\n zerosToFill = targetLength - absNumber.length,\n sign = number >= 0;\n return (\n (sign ? (forceSign ? '+' : '') : '-') +\n Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +\n absNumber\n );\n }\n\n var formattingTokens =\n /(\\[[^\\[]*\\])|(\\\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,\n localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g,\n formatFunctions = {},\n formatTokenFunctions = {};\n\n // token: 'M'\n // padded: ['MM', 2]\n // ordinal: 'Mo'\n // callback: function () { this.month() + 1 }\n function addFormatToken(token, padded, ordinal, callback) {\n var func = callback;\n if (typeof callback === 'string') {\n func = function () {\n return this[callback]();\n };\n }\n if (token) {\n formatTokenFunctions[token] = func;\n }\n if (padded) {\n formatTokenFunctions[padded[0]] = function () {\n return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n };\n }\n if (ordinal) {\n formatTokenFunctions[ordinal] = function () {\n return this.localeData().ordinal(\n func.apply(this, arguments),\n token\n );\n };\n }\n }\n\n function removeFormattingTokens(input) {\n if (input.match(/\\[[\\s\\S]/)) {\n return input.replace(/^\\[|\\]$/g, '');\n }\n return input.replace(/\\\\/g, '');\n }\n\n function makeFormatFunction(format) {\n var array = format.match(formattingTokens),\n i,\n length;\n\n for (i = 0, length = array.length; i < length; i++) {\n if (formatTokenFunctions[array[i]]) {\n array[i] = formatTokenFunctions[array[i]];\n } else {\n array[i] = removeFormattingTokens(array[i]);\n }\n }\n\n return function (mom) {\n var output = '',\n i;\n for (i = 0; i < length; i++) {\n output += isFunction(array[i])\n ? array[i].call(mom, format)\n : array[i];\n }\n return output;\n };\n }\n\n // format date using native date object\n function formatMoment(m, format) {\n if (!m.isValid()) {\n return m.localeData().invalidDate();\n }\n\n format = expandFormat(format, m.localeData());\n formatFunctions[format] =\n formatFunctions[format] || makeFormatFunction(format);\n\n return formatFunctions[format](m);\n }\n\n function expandFormat(format, locale) {\n var i = 5;\n\n function replaceLongDateFormatTokens(input) {\n return locale.longDateFormat(input) || input;\n }\n\n localFormattingTokens.lastIndex = 0;\n while (i >= 0 && localFormattingTokens.test(format)) {\n format = format.replace(\n localFormattingTokens,\n replaceLongDateFormatTokens\n );\n localFormattingTokens.lastIndex = 0;\n i -= 1;\n }\n\n return format;\n }\n\n var defaultLongDateFormat = {\n LTS: 'h:mm:ss A',\n LT: 'h:mm A',\n L: 'MM/DD/YYYY',\n LL: 'MMMM D, YYYY',\n LLL: 'MMMM D, YYYY h:mm A',\n LLLL: 'dddd, MMMM D, YYYY h:mm A',\n };\n\n function longDateFormat(key) {\n var format = this._longDateFormat[key],\n formatUpper = this._longDateFormat[key.toUpperCase()];\n\n if (format || !formatUpper) {\n return format;\n }\n\n this._longDateFormat[key] = formatUpper\n .match(formattingTokens)\n .map(function (tok) {\n if (\n tok === 'MMMM' ||\n tok === 'MM' ||\n tok === 'DD' ||\n tok === 'dddd'\n ) {\n return tok.slice(1);\n }\n return tok;\n })\n .join('');\n\n return this._longDateFormat[key];\n }\n\n var defaultInvalidDate = 'Invalid date';\n\n function invalidDate() {\n return this._invalidDate;\n }\n\n var defaultOrdinal = '%d',\n defaultDayOfMonthOrdinalParse = /\\d{1,2}/;\n\n function ordinal(number) {\n return this._ordinal.replace('%d', number);\n }\n\n var defaultRelativeTime = {\n future: 'in %s',\n past: '%s ago',\n s: 'a few seconds',\n ss: '%d seconds',\n m: 'a minute',\n mm: '%d minutes',\n h: 'an hour',\n hh: '%d hours',\n d: 'a day',\n dd: '%d days',\n w: 'a week',\n ww: '%d weeks',\n M: 'a month',\n MM: '%d months',\n y: 'a year',\n yy: '%d years',\n };\n\n function relativeTime(number, withoutSuffix, string, isFuture) {\n var output = this._relativeTime[string];\n return isFunction(output)\n ? output(number, withoutSuffix, string, isFuture)\n : output.replace(/%d/i, number);\n }\n\n function pastFuture(diff, output) {\n var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n return isFunction(format) ? format(output) : format.replace(/%s/i, output);\n }\n\n var aliases = {};\n\n function addUnitAlias(unit, shorthand) {\n var lowerCase = unit.toLowerCase();\n aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n }\n\n function normalizeUnits(units) {\n return typeof units === 'string'\n ? aliases[units] || aliases[units.toLowerCase()]\n : undefined;\n }\n\n function normalizeObjectUnits(inputObject) {\n var normalizedInput = {},\n normalizedProp,\n prop;\n\n for (prop in inputObject) {\n if (hasOwnProp(inputObject, prop)) {\n normalizedProp = normalizeUnits(prop);\n if (normalizedProp) {\n normalizedInput[normalizedProp] = inputObject[prop];\n }\n }\n }\n\n return normalizedInput;\n }\n\n var priorities = {};\n\n function addUnitPriority(unit, priority) {\n priorities[unit] = priority;\n }\n\n function getPrioritizedUnits(unitsObj) {\n var units = [],\n u;\n for (u in unitsObj) {\n if (hasOwnProp(unitsObj, u)) {\n units.push({ unit: u, priority: priorities[u] });\n }\n }\n units.sort(function (a, b) {\n return a.priority - b.priority;\n });\n return units;\n }\n\n function isLeapYear(year) {\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n }\n\n function absFloor(number) {\n if (number < 0) {\n // -0 -> 0\n return Math.ceil(number) || 0;\n } else {\n return Math.floor(number);\n }\n }\n\n function toInt(argumentForCoercion) {\n var coercedNumber = +argumentForCoercion,\n value = 0;\n\n if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n value = absFloor(coercedNumber);\n }\n\n return value;\n }\n\n function makeGetSet(unit, keepTime) {\n return function (value) {\n if (value != null) {\n set$1(this, unit, value);\n hooks.updateOffset(this, keepTime);\n return this;\n } else {\n return get(this, unit);\n }\n };\n }\n\n function get(mom, unit) {\n return mom.isValid()\n ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()\n : NaN;\n }\n\n function set$1(mom, unit, value) {\n if (mom.isValid() && !isNaN(value)) {\n if (\n unit === 'FullYear' &&\n isLeapYear(mom.year()) &&\n mom.month() === 1 &&\n mom.date() === 29\n ) {\n value = toInt(value);\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](\n value,\n mom.month(),\n daysInMonth(value, mom.month())\n );\n } else {\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n }\n }\n }\n\n // MOMENTS\n\n function stringGet(units) {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units]();\n }\n return this;\n }\n\n function stringSet(units, value) {\n if (typeof units === 'object') {\n units = normalizeObjectUnits(units);\n var prioritized = getPrioritizedUnits(units),\n i,\n prioritizedLen = prioritized.length;\n for (i = 0; i < prioritizedLen; i++) {\n this[prioritized[i].unit](units[prioritized[i].unit]);\n }\n } else {\n units = normalizeUnits(units);\n if (isFunction(this[units])) {\n return this[units](value);\n }\n }\n return this;\n }\n\n var match1 = /\\d/, // 0 - 9\n match2 = /\\d\\d/, // 00 - 99\n match3 = /\\d{3}/, // 000 - 999\n match4 = /\\d{4}/, // 0000 - 9999\n match6 = /[+-]?\\d{6}/, // -999999 - 999999\n match1to2 = /\\d\\d?/, // 0 - 99\n match3to4 = /\\d\\d\\d\\d?/, // 999 - 9999\n match5to6 = /\\d\\d\\d\\d\\d\\d?/, // 99999 - 999999\n match1to3 = /\\d{1,3}/, // 0 - 999\n match1to4 = /\\d{1,4}/, // 0 - 9999\n match1to6 = /[+-]?\\d{1,6}/, // -999999 - 999999\n matchUnsigned = /\\d+/, // 0 - inf\n matchSigned = /[+-]?\\d+/, // -inf - inf\n matchOffset = /Z|[+-]\\d\\d:?\\d\\d/gi, // +00:00 -00:00 +0000 -0000 or Z\n matchShortOffset = /Z|[+-]\\d\\d(?::?\\d\\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z\n matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/, // 123456789 123456789.123\n // any word (or two) characters or numbers including two/three word month in arabic.\n // includes scottish gaelic two word and hyphenated months\n matchWord =\n /[0-9]{0,256}['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFF07\\uFF10-\\uFFEF]{1,256}|[\\u0600-\\u06FF\\/]{1,256}(\\s*?[\\u0600-\\u06FF]{1,256}){1,2}/i,\n regexes;\n\n regexes = {};\n\n function addRegexToken(token, regex, strictRegex) {\n regexes[token] = isFunction(regex)\n ? regex\n : function (isStrict, localeData) {\n return isStrict && strictRegex ? strictRegex : regex;\n };\n }\n\n function getParseRegexForToken(token, config) {\n if (!hasOwnProp(regexes, token)) {\n return new RegExp(unescapeFormat(token));\n }\n\n return regexes[token](config._strict, config._locale);\n }\n\n // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n function unescapeFormat(s) {\n return regexEscape(\n s\n .replace('\\\\', '')\n .replace(\n /\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g,\n function (matched, p1, p2, p3, p4) {\n return p1 || p2 || p3 || p4;\n }\n )\n );\n }\n\n function regexEscape(s) {\n return s.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n var tokens = {};\n\n function addParseToken(token, callback) {\n var i,\n func = callback,\n tokenLen;\n if (typeof token === 'string') {\n token = [token];\n }\n if (isNumber(callback)) {\n func = function (input, array) {\n array[callback] = toInt(input);\n };\n }\n tokenLen = token.length;\n for (i = 0; i < tokenLen; i++) {\n tokens[token[i]] = func;\n }\n }\n\n function addWeekParseToken(token, callback) {\n addParseToken(token, function (input, array, config, token) {\n config._w = config._w || {};\n callback(input, config._w, config, token);\n });\n }\n\n function addTimeToArrayFromToken(token, input, config) {\n if (input != null && hasOwnProp(tokens, token)) {\n tokens[token](input, config._a, config, token);\n }\n }\n\n var YEAR = 0,\n MONTH = 1,\n DATE = 2,\n HOUR = 3,\n MINUTE = 4,\n SECOND = 5,\n MILLISECOND = 6,\n WEEK = 7,\n WEEKDAY = 8;\n\n function mod(n, x) {\n return ((n % x) + x) % x;\n }\n\n var indexOf;\n\n if (Array.prototype.indexOf) {\n indexOf = Array.prototype.indexOf;\n } else {\n indexOf = function (o) {\n // I know\n var i;\n for (i = 0; i < this.length; ++i) {\n if (this[i] === o) {\n return i;\n }\n }\n return -1;\n };\n }\n\n function daysInMonth(year, month) {\n if (isNaN(year) || isNaN(month)) {\n return NaN;\n }\n var modMonth = mod(month, 12);\n year += (month - modMonth) / 12;\n return modMonth === 1\n ? isLeapYear(year)\n ? 29\n : 28\n : 31 - ((modMonth % 7) % 2);\n }\n\n // FORMATTING\n\n addFormatToken('M', ['MM', 2], 'Mo', function () {\n return this.month() + 1;\n });\n\n addFormatToken('MMM', 0, 0, function (format) {\n return this.localeData().monthsShort(this, format);\n });\n\n addFormatToken('MMMM', 0, 0, function (format) {\n return this.localeData().months(this, format);\n });\n\n // ALIASES\n\n addUnitAlias('month', 'M');\n\n // PRIORITY\n\n addUnitPriority('month', 8);\n\n // PARSING\n\n addRegexToken('M', match1to2);\n addRegexToken('MM', match1to2, match2);\n addRegexToken('MMM', function (isStrict, locale) {\n return locale.monthsShortRegex(isStrict);\n });\n addRegexToken('MMMM', function (isStrict, locale) {\n return locale.monthsRegex(isStrict);\n });\n\n addParseToken(['M', 'MM'], function (input, array) {\n array[MONTH] = toInt(input) - 1;\n });\n\n addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n var month = config._locale.monthsParse(input, token, config._strict);\n // if we didn't find a month name, mark the date as invalid.\n if (month != null) {\n array[MONTH] = month;\n } else {\n getParsingFlags(config).invalidMonth = input;\n }\n });\n\n // LOCALES\n\n var defaultLocaleMonths =\n 'January_February_March_April_May_June_July_August_September_October_November_December'.split(\n '_'\n ),\n defaultLocaleMonthsShort =\n 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),\n MONTHS_IN_FORMAT = /D[oD]?(\\[[^\\[\\]]*\\]|\\s)+MMMM?/,\n defaultMonthsShortRegex = matchWord,\n defaultMonthsRegex = matchWord;\n\n function localeMonths(m, format) {\n if (!m) {\n return isArray(this._months)\n ? this._months\n : this._months['standalone'];\n }\n return isArray(this._months)\n ? this._months[m.month()]\n : this._months[\n (this._months.isFormat || MONTHS_IN_FORMAT).test(format)\n ? 'format'\n : 'standalone'\n ][m.month()];\n }\n\n function localeMonthsShort(m, format) {\n if (!m) {\n return isArray(this._monthsShort)\n ? this._monthsShort\n : this._monthsShort['standalone'];\n }\n return isArray(this._monthsShort)\n ? this._monthsShort[m.month()]\n : this._monthsShort[\n MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'\n ][m.month()];\n }\n\n function handleStrictParse(monthName, format, strict) {\n var i,\n ii,\n mom,\n llc = monthName.toLocaleLowerCase();\n if (!this._monthsParse) {\n // this is not used\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n for (i = 0; i < 12; ++i) {\n mom = createUTC([2000, i]);\n this._shortMonthsParse[i] = this.monthsShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'MMM') {\n ii = indexOf.call(this._shortMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._longMonthsParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._longMonthsParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortMonthsParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeMonthsParse(monthName, format, strict) {\n var i, mom, regex;\n\n if (this._monthsParseExact) {\n return handleStrictParse.call(this, monthName, format, strict);\n }\n\n if (!this._monthsParse) {\n this._monthsParse = [];\n this._longMonthsParse = [];\n this._shortMonthsParse = [];\n }\n\n // TODO: add sorting\n // Sorting makes sure if one month (or abbr) is a prefix of another\n // see sorting in computeMonthsParse\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n if (strict && !this._longMonthsParse[i]) {\n this._longMonthsParse[i] = new RegExp(\n '^' + this.months(mom, '').replace('.', '') + '$',\n 'i'\n );\n this._shortMonthsParse[i] = new RegExp(\n '^' + this.monthsShort(mom, '').replace('.', '') + '$',\n 'i'\n );\n }\n if (!strict && !this._monthsParse[i]) {\n regex =\n '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'MMMM' &&\n this._longMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'MMM' &&\n this._shortMonthsParse[i].test(monthName)\n ) {\n return i;\n } else if (!strict && this._monthsParse[i].test(monthName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function setMonth(mom, value) {\n var dayOfMonth;\n\n if (!mom.isValid()) {\n // No op\n return mom;\n }\n\n if (typeof value === 'string') {\n if (/^\\d+$/.test(value)) {\n value = toInt(value);\n } else {\n value = mom.localeData().monthsParse(value);\n // TODO: Another silent failure?\n if (!isNumber(value)) {\n return mom;\n }\n }\n }\n\n dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n return mom;\n }\n\n function getSetMonth(value) {\n if (value != null) {\n setMonth(this, value);\n hooks.updateOffset(this, true);\n return this;\n } else {\n return get(this, 'Month');\n }\n }\n\n function getDaysInMonth() {\n return daysInMonth(this.year(), this.month());\n }\n\n function monthsShortRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsShortStrictRegex;\n } else {\n return this._monthsShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsShortRegex')) {\n this._monthsShortRegex = defaultMonthsShortRegex;\n }\n return this._monthsShortStrictRegex && isStrict\n ? this._monthsShortStrictRegex\n : this._monthsShortRegex;\n }\n }\n\n function monthsRegex(isStrict) {\n if (this._monthsParseExact) {\n if (!hasOwnProp(this, '_monthsRegex')) {\n computeMonthsParse.call(this);\n }\n if (isStrict) {\n return this._monthsStrictRegex;\n } else {\n return this._monthsRegex;\n }\n } else {\n if (!hasOwnProp(this, '_monthsRegex')) {\n this._monthsRegex = defaultMonthsRegex;\n }\n return this._monthsStrictRegex && isStrict\n ? this._monthsStrictRegex\n : this._monthsRegex;\n }\n }\n\n function computeMonthsParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom;\n for (i = 0; i < 12; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, i]);\n shortPieces.push(this.monthsShort(mom, ''));\n longPieces.push(this.months(mom, ''));\n mixedPieces.push(this.months(mom, ''));\n mixedPieces.push(this.monthsShort(mom, ''));\n }\n // Sorting makes sure if one month (or abbr) is a prefix of another it\n // will match the longer piece.\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n for (i = 0; i < 12; i++) {\n shortPieces[i] = regexEscape(shortPieces[i]);\n longPieces[i] = regexEscape(longPieces[i]);\n }\n for (i = 0; i < 24; i++) {\n mixedPieces[i] = regexEscape(mixedPieces[i]);\n }\n\n this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._monthsShortRegex = this._monthsRegex;\n this._monthsStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._monthsShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken('Y', 0, 0, function () {\n var y = this.year();\n return y <= 9999 ? zeroFill(y, 4) : '+' + y;\n });\n\n addFormatToken(0, ['YY', 2], 0, function () {\n return this.year() % 100;\n });\n\n addFormatToken(0, ['YYYY', 4], 0, 'year');\n addFormatToken(0, ['YYYYY', 5], 0, 'year');\n addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n // ALIASES\n\n addUnitAlias('year', 'y');\n\n // PRIORITIES\n\n addUnitPriority('year', 1);\n\n // PARSING\n\n addRegexToken('Y', matchSigned);\n addRegexToken('YY', match1to2, match2);\n addRegexToken('YYYY', match1to4, match4);\n addRegexToken('YYYYY', match1to6, match6);\n addRegexToken('YYYYYY', match1to6, match6);\n\n addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n addParseToken('YYYY', function (input, array) {\n array[YEAR] =\n input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);\n });\n addParseToken('YY', function (input, array) {\n array[YEAR] = hooks.parseTwoDigitYear(input);\n });\n addParseToken('Y', function (input, array) {\n array[YEAR] = parseInt(input, 10);\n });\n\n // HELPERS\n\n function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n }\n\n // HOOKS\n\n hooks.parseTwoDigitYear = function (input) {\n return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n };\n\n // MOMENTS\n\n var getSetYear = makeGetSet('FullYear', true);\n\n function getIsLeapYear() {\n return isLeapYear(this.year());\n }\n\n function createDate(y, m, d, h, M, s, ms) {\n // can't just apply() to create a date:\n // https://stackoverflow.com/q/181348\n var date;\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n date = new Date(y + 400, m, d, h, M, s, ms);\n if (isFinite(date.getFullYear())) {\n date.setFullYear(y);\n }\n } else {\n date = new Date(y, m, d, h, M, s, ms);\n }\n\n return date;\n }\n\n function createUTCDate(y) {\n var date, args;\n // the Date.UTC function remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n args = Array.prototype.slice.call(arguments);\n // preserve leap years using a full 400 year cycle, then reset\n args[0] = y + 400;\n date = new Date(Date.UTC.apply(null, args));\n if (isFinite(date.getUTCFullYear())) {\n date.setUTCFullYear(y);\n }\n } else {\n date = new Date(Date.UTC.apply(null, arguments));\n }\n\n return date;\n }\n\n // start-of-first-week - start-of-year\n function firstWeekOffset(year, dow, doy) {\n var // first-week day -- which january is always in the first week (4 for iso, 1 for other)\n fwd = 7 + dow - doy,\n // first-week day local weekday -- which local weekday is fwd\n fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;\n\n return -fwdlw + fwd - 1;\n }\n\n // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n function dayOfYearFromWeeks(year, week, weekday, dow, doy) {\n var localWeekday = (7 + weekday - dow) % 7,\n weekOffset = firstWeekOffset(year, dow, doy),\n dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,\n resYear,\n resDayOfYear;\n\n if (dayOfYear <= 0) {\n resYear = year - 1;\n resDayOfYear = daysInYear(resYear) + dayOfYear;\n } else if (dayOfYear > daysInYear(year)) {\n resYear = year + 1;\n resDayOfYear = dayOfYear - daysInYear(year);\n } else {\n resYear = year;\n resDayOfYear = dayOfYear;\n }\n\n return {\n year: resYear,\n dayOfYear: resDayOfYear,\n };\n }\n\n function weekOfYear(mom, dow, doy) {\n var weekOffset = firstWeekOffset(mom.year(), dow, doy),\n week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,\n resWeek,\n resYear;\n\n if (week < 1) {\n resYear = mom.year() - 1;\n resWeek = week + weeksInYear(resYear, dow, doy);\n } else if (week > weeksInYear(mom.year(), dow, doy)) {\n resWeek = week - weeksInYear(mom.year(), dow, doy);\n resYear = mom.year() + 1;\n } else {\n resYear = mom.year();\n resWeek = week;\n }\n\n return {\n week: resWeek,\n year: resYear,\n };\n }\n\n function weeksInYear(year, dow, doy) {\n var weekOffset = firstWeekOffset(year, dow, doy),\n weekOffsetNext = firstWeekOffset(year + 1, dow, doy);\n return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;\n }\n\n // FORMATTING\n\n addFormatToken('w', ['ww', 2], 'wo', 'week');\n addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n // ALIASES\n\n addUnitAlias('week', 'w');\n addUnitAlias('isoWeek', 'W');\n\n // PRIORITIES\n\n addUnitPriority('week', 5);\n addUnitPriority('isoWeek', 5);\n\n // PARSING\n\n addRegexToken('w', match1to2);\n addRegexToken('ww', match1to2, match2);\n addRegexToken('W', match1to2);\n addRegexToken('WW', match1to2, match2);\n\n addWeekParseToken(\n ['w', 'ww', 'W', 'WW'],\n function (input, week, config, token) {\n week[token.substr(0, 1)] = toInt(input);\n }\n );\n\n // HELPERS\n\n // LOCALES\n\n function localeWeek(mom) {\n return weekOfYear(mom, this._week.dow, this._week.doy).week;\n }\n\n var defaultLocaleWeek = {\n dow: 0, // Sunday is the first day of the week.\n doy: 6, // The week that contains Jan 6th is the first week of the year.\n };\n\n function localeFirstDayOfWeek() {\n return this._week.dow;\n }\n\n function localeFirstDayOfYear() {\n return this._week.doy;\n }\n\n // MOMENTS\n\n function getSetWeek(input) {\n var week = this.localeData().week(this);\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n function getSetISOWeek(input) {\n var week = weekOfYear(this, 1, 4).week;\n return input == null ? week : this.add((input - week) * 7, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('d', 0, 'do', 'day');\n\n addFormatToken('dd', 0, 0, function (format) {\n return this.localeData().weekdaysMin(this, format);\n });\n\n addFormatToken('ddd', 0, 0, function (format) {\n return this.localeData().weekdaysShort(this, format);\n });\n\n addFormatToken('dddd', 0, 0, function (format) {\n return this.localeData().weekdays(this, format);\n });\n\n addFormatToken('e', 0, 0, 'weekday');\n addFormatToken('E', 0, 0, 'isoWeekday');\n\n // ALIASES\n\n addUnitAlias('day', 'd');\n addUnitAlias('weekday', 'e');\n addUnitAlias('isoWeekday', 'E');\n\n // PRIORITY\n addUnitPriority('day', 11);\n addUnitPriority('weekday', 11);\n addUnitPriority('isoWeekday', 11);\n\n // PARSING\n\n addRegexToken('d', match1to2);\n addRegexToken('e', match1to2);\n addRegexToken('E', match1to2);\n addRegexToken('dd', function (isStrict, locale) {\n return locale.weekdaysMinRegex(isStrict);\n });\n addRegexToken('ddd', function (isStrict, locale) {\n return locale.weekdaysShortRegex(isStrict);\n });\n addRegexToken('dddd', function (isStrict, locale) {\n return locale.weekdaysRegex(isStrict);\n });\n\n addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {\n var weekday = config._locale.weekdaysParse(input, token, config._strict);\n // if we didn't get a weekday name, mark the date as invalid\n if (weekday != null) {\n week.d = weekday;\n } else {\n getParsingFlags(config).invalidWeekday = input;\n }\n });\n\n addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n week[token] = toInt(input);\n });\n\n // HELPERS\n\n function parseWeekday(input, locale) {\n if (typeof input !== 'string') {\n return input;\n }\n\n if (!isNaN(input)) {\n return parseInt(input, 10);\n }\n\n input = locale.weekdaysParse(input);\n if (typeof input === 'number') {\n return input;\n }\n\n return null;\n }\n\n function parseIsoWeekday(input, locale) {\n if (typeof input === 'string') {\n return locale.weekdaysParse(input) % 7 || 7;\n }\n return isNaN(input) ? null : input;\n }\n\n // LOCALES\n function shiftWeekdays(ws, n) {\n return ws.slice(n, 7).concat(ws.slice(0, n));\n }\n\n var defaultLocaleWeekdays =\n 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),\n defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),\n defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),\n defaultWeekdaysRegex = matchWord,\n defaultWeekdaysShortRegex = matchWord,\n defaultWeekdaysMinRegex = matchWord;\n\n function localeWeekdays(m, format) {\n var weekdays = isArray(this._weekdays)\n ? this._weekdays\n : this._weekdays[\n m && m !== true && this._weekdays.isFormat.test(format)\n ? 'format'\n : 'standalone'\n ];\n return m === true\n ? shiftWeekdays(weekdays, this._week.dow)\n : m\n ? weekdays[m.day()]\n : weekdays;\n }\n\n function localeWeekdaysShort(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysShort, this._week.dow)\n : m\n ? this._weekdaysShort[m.day()]\n : this._weekdaysShort;\n }\n\n function localeWeekdaysMin(m) {\n return m === true\n ? shiftWeekdays(this._weekdaysMin, this._week.dow)\n : m\n ? this._weekdaysMin[m.day()]\n : this._weekdaysMin;\n }\n\n function handleStrictParse$1(weekdayName, format, strict) {\n var i,\n ii,\n mom,\n llc = weekdayName.toLocaleLowerCase();\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._minWeekdaysParse = [];\n\n for (i = 0; i < 7; ++i) {\n mom = createUTC([2000, 1]).day(i);\n this._minWeekdaysParse[i] = this.weekdaysMin(\n mom,\n ''\n ).toLocaleLowerCase();\n this._shortWeekdaysParse[i] = this.weekdaysShort(\n mom,\n ''\n ).toLocaleLowerCase();\n this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();\n }\n }\n\n if (strict) {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n } else {\n if (format === 'dddd') {\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else if (format === 'ddd') {\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._minWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n } else {\n ii = indexOf.call(this._minWeekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._weekdaysParse, llc);\n if (ii !== -1) {\n return ii;\n }\n ii = indexOf.call(this._shortWeekdaysParse, llc);\n return ii !== -1 ? ii : null;\n }\n }\n }\n\n function localeWeekdaysParse(weekdayName, format, strict) {\n var i, mom, regex;\n\n if (this._weekdaysParseExact) {\n return handleStrictParse$1.call(this, weekdayName, format, strict);\n }\n\n if (!this._weekdaysParse) {\n this._weekdaysParse = [];\n this._minWeekdaysParse = [];\n this._shortWeekdaysParse = [];\n this._fullWeekdaysParse = [];\n }\n\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n\n mom = createUTC([2000, 1]).day(i);\n if (strict && !this._fullWeekdaysParse[i]) {\n this._fullWeekdaysParse[i] = new RegExp(\n '^' + this.weekdays(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._shortWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysShort(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n this._minWeekdaysParse[i] = new RegExp(\n '^' + this.weekdaysMin(mom, '').replace('.', '\\\\.?') + '$',\n 'i'\n );\n }\n if (!this._weekdaysParse[i]) {\n regex =\n '^' +\n this.weekdays(mom, '') +\n '|^' +\n this.weekdaysShort(mom, '') +\n '|^' +\n this.weekdaysMin(mom, '');\n this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n }\n // test the regex\n if (\n strict &&\n format === 'dddd' &&\n this._fullWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'ddd' &&\n this._shortWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (\n strict &&\n format === 'dd' &&\n this._minWeekdaysParse[i].test(weekdayName)\n ) {\n return i;\n } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {\n return i;\n }\n }\n }\n\n // MOMENTS\n\n function getSetDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n if (input != null) {\n input = parseWeekday(input, this.localeData());\n return this.add(input - day, 'd');\n } else {\n return day;\n }\n }\n\n function getSetLocaleDayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n return input == null ? weekday : this.add(input - weekday, 'd');\n }\n\n function getSetISODayOfWeek(input) {\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n\n // behaves the same as moment#day except\n // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n // as a setter, sunday should belong to the previous week.\n\n if (input != null) {\n var weekday = parseIsoWeekday(input, this.localeData());\n return this.day(this.day() % 7 ? weekday : weekday - 7);\n } else {\n return this.day() || 7;\n }\n }\n\n function weekdaysRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysStrictRegex;\n } else {\n return this._weekdaysRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n this._weekdaysRegex = defaultWeekdaysRegex;\n }\n return this._weekdaysStrictRegex && isStrict\n ? this._weekdaysStrictRegex\n : this._weekdaysRegex;\n }\n }\n\n function weekdaysShortRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysShortStrictRegex;\n } else {\n return this._weekdaysShortRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysShortRegex')) {\n this._weekdaysShortRegex = defaultWeekdaysShortRegex;\n }\n return this._weekdaysShortStrictRegex && isStrict\n ? this._weekdaysShortStrictRegex\n : this._weekdaysShortRegex;\n }\n }\n\n function weekdaysMinRegex(isStrict) {\n if (this._weekdaysParseExact) {\n if (!hasOwnProp(this, '_weekdaysRegex')) {\n computeWeekdaysParse.call(this);\n }\n if (isStrict) {\n return this._weekdaysMinStrictRegex;\n } else {\n return this._weekdaysMinRegex;\n }\n } else {\n if (!hasOwnProp(this, '_weekdaysMinRegex')) {\n this._weekdaysMinRegex = defaultWeekdaysMinRegex;\n }\n return this._weekdaysMinStrictRegex && isStrict\n ? this._weekdaysMinStrictRegex\n : this._weekdaysMinRegex;\n }\n }\n\n function computeWeekdaysParse() {\n function cmpLenRev(a, b) {\n return b.length - a.length;\n }\n\n var minPieces = [],\n shortPieces = [],\n longPieces = [],\n mixedPieces = [],\n i,\n mom,\n minp,\n shortp,\n longp;\n for (i = 0; i < 7; i++) {\n // make the regex if we don't have it already\n mom = createUTC([2000, 1]).day(i);\n minp = regexEscape(this.weekdaysMin(mom, ''));\n shortp = regexEscape(this.weekdaysShort(mom, ''));\n longp = regexEscape(this.weekdays(mom, ''));\n minPieces.push(minp);\n shortPieces.push(shortp);\n longPieces.push(longp);\n mixedPieces.push(minp);\n mixedPieces.push(shortp);\n mixedPieces.push(longp);\n }\n // Sorting makes sure if one weekday (or abbr) is a prefix of another it\n // will match the longer piece.\n minPieces.sort(cmpLenRev);\n shortPieces.sort(cmpLenRev);\n longPieces.sort(cmpLenRev);\n mixedPieces.sort(cmpLenRev);\n\n this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._weekdaysShortRegex = this._weekdaysRegex;\n this._weekdaysMinRegex = this._weekdaysRegex;\n\n this._weekdaysStrictRegex = new RegExp(\n '^(' + longPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysShortStrictRegex = new RegExp(\n '^(' + shortPieces.join('|') + ')',\n 'i'\n );\n this._weekdaysMinStrictRegex = new RegExp(\n '^(' + minPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n function hFormat() {\n return this.hours() % 12 || 12;\n }\n\n function kFormat() {\n return this.hours() || 24;\n }\n\n addFormatToken('H', ['HH', 2], 0, 'hour');\n addFormatToken('h', ['hh', 2], 0, hFormat);\n addFormatToken('k', ['kk', 2], 0, kFormat);\n\n addFormatToken('hmm', 0, 0, function () {\n return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('hmmss', 0, 0, function () {\n return (\n '' +\n hFormat.apply(this) +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n addFormatToken('Hmm', 0, 0, function () {\n return '' + this.hours() + zeroFill(this.minutes(), 2);\n });\n\n addFormatToken('Hmmss', 0, 0, function () {\n return (\n '' +\n this.hours() +\n zeroFill(this.minutes(), 2) +\n zeroFill(this.seconds(), 2)\n );\n });\n\n function meridiem(token, lowercase) {\n addFormatToken(token, 0, 0, function () {\n return this.localeData().meridiem(\n this.hours(),\n this.minutes(),\n lowercase\n );\n });\n }\n\n meridiem('a', true);\n meridiem('A', false);\n\n // ALIASES\n\n addUnitAlias('hour', 'h');\n\n // PRIORITY\n addUnitPriority('hour', 13);\n\n // PARSING\n\n function matchMeridiem(isStrict, locale) {\n return locale._meridiemParse;\n }\n\n addRegexToken('a', matchMeridiem);\n addRegexToken('A', matchMeridiem);\n addRegexToken('H', match1to2);\n addRegexToken('h', match1to2);\n addRegexToken('k', match1to2);\n addRegexToken('HH', match1to2, match2);\n addRegexToken('hh', match1to2, match2);\n addRegexToken('kk', match1to2, match2);\n\n addRegexToken('hmm', match3to4);\n addRegexToken('hmmss', match5to6);\n addRegexToken('Hmm', match3to4);\n addRegexToken('Hmmss', match5to6);\n\n addParseToken(['H', 'HH'], HOUR);\n addParseToken(['k', 'kk'], function (input, array, config) {\n var kInput = toInt(input);\n array[HOUR] = kInput === 24 ? 0 : kInput;\n });\n addParseToken(['a', 'A'], function (input, array, config) {\n config._isPm = config._locale.isPM(input);\n config._meridiem = input;\n });\n addParseToken(['h', 'hh'], function (input, array, config) {\n array[HOUR] = toInt(input);\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n getParsingFlags(config).bigHour = true;\n });\n addParseToken('Hmm', function (input, array, config) {\n var pos = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos));\n array[MINUTE] = toInt(input.substr(pos));\n });\n addParseToken('Hmmss', function (input, array, config) {\n var pos1 = input.length - 4,\n pos2 = input.length - 2;\n array[HOUR] = toInt(input.substr(0, pos1));\n array[MINUTE] = toInt(input.substr(pos1, 2));\n array[SECOND] = toInt(input.substr(pos2));\n });\n\n // LOCALES\n\n function localeIsPM(input) {\n // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n // Using charAt should be more compatible.\n return (input + '').toLowerCase().charAt(0) === 'p';\n }\n\n var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i,\n // Setting the hour should keep the time, because the user explicitly\n // specified which hour they want. So trying to maintain the same hour (in\n // a new timezone) makes sense. Adding/subtracting hours does not follow\n // this rule.\n getSetHour = makeGetSet('Hours', true);\n\n function localeMeridiem(hours, minutes, isLower) {\n if (hours > 11) {\n return isLower ? 'pm' : 'PM';\n } else {\n return isLower ? 'am' : 'AM';\n }\n }\n\n var baseConfig = {\n calendar: defaultCalendar,\n longDateFormat: defaultLongDateFormat,\n invalidDate: defaultInvalidDate,\n ordinal: defaultOrdinal,\n dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,\n relativeTime: defaultRelativeTime,\n\n months: defaultLocaleMonths,\n monthsShort: defaultLocaleMonthsShort,\n\n week: defaultLocaleWeek,\n\n weekdays: defaultLocaleWeekdays,\n weekdaysMin: defaultLocaleWeekdaysMin,\n weekdaysShort: defaultLocaleWeekdaysShort,\n\n meridiemParse: defaultLocaleMeridiemParse,\n };\n\n // internal storage for locale config files\n var locales = {},\n localeFamilies = {},\n globalLocale;\n\n function commonPrefix(arr1, arr2) {\n var i,\n minl = Math.min(arr1.length, arr2.length);\n for (i = 0; i < minl; i += 1) {\n if (arr1[i] !== arr2[i]) {\n return i;\n }\n }\n return minl;\n }\n\n function normalizeLocale(key) {\n return key ? key.toLowerCase().replace('_', '-') : key;\n }\n\n // pick the locale from the array\n // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n function chooseLocale(names) {\n var i = 0,\n j,\n next,\n locale,\n split;\n\n while (i < names.length) {\n split = normalizeLocale(names[i]).split('-');\n j = split.length;\n next = normalizeLocale(names[i + 1]);\n next = next ? next.split('-') : null;\n while (j > 0) {\n locale = loadLocale(split.slice(0, j).join('-'));\n if (locale) {\n return locale;\n }\n if (\n next &&\n next.length >= j &&\n commonPrefix(split, next) >= j - 1\n ) {\n //the next array item is better than a shallower substring of this one\n break;\n }\n j--;\n }\n i++;\n }\n return globalLocale;\n }\n\n function isLocaleNameSane(name) {\n // Prevent names that look like filesystem paths, i.e contain '/' or '\\'\n return name.match('^[^/\\\\\\\\]*$') != null;\n }\n\n function loadLocale(name) {\n var oldLocale = null,\n aliasedRequire;\n // TODO: Find a better way to register and load all the locales in Node\n if (\n locales[name] === undefined &&\n typeof module !== 'undefined' &&\n module &&\n module.exports &&\n isLocaleNameSane(name)\n ) {\n try {\n oldLocale = globalLocale._abbr;\n aliasedRequire = require;\n aliasedRequire('./locale/' + name);\n getSetGlobalLocale(oldLocale);\n } catch (e) {\n // mark as not found to avoid repeating expensive file require call causing high CPU\n // when trying to find en-US, en_US, en-us for every format call\n locales[name] = null; // null means not found\n }\n }\n return locales[name];\n }\n\n // This function will load locale and then set the global locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n function getSetGlobalLocale(key, values) {\n var data;\n if (key) {\n if (isUndefined(values)) {\n data = getLocale(key);\n } else {\n data = defineLocale(key, values);\n }\n\n if (data) {\n // moment.duration._locale = moment._locale = data;\n globalLocale = data;\n } else {\n if (typeof console !== 'undefined' && console.warn) {\n //warn user if arguments are passed but the locale could not be set\n console.warn(\n 'Locale ' + key + ' not found. Did you forget to load it?'\n );\n }\n }\n }\n\n return globalLocale._abbr;\n }\n\n function defineLocale(name, config) {\n if (config !== null) {\n var locale,\n parentConfig = baseConfig;\n config.abbr = name;\n if (locales[name] != null) {\n deprecateSimple(\n 'defineLocaleOverride',\n 'use moment.updateLocale(localeName, config) to change ' +\n 'an existing locale. moment.defineLocale(localeName, ' +\n 'config) should only be used for creating a new locale ' +\n 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'\n );\n parentConfig = locales[name]._config;\n } else if (config.parentLocale != null) {\n if (locales[config.parentLocale] != null) {\n parentConfig = locales[config.parentLocale]._config;\n } else {\n locale = loadLocale(config.parentLocale);\n if (locale != null) {\n parentConfig = locale._config;\n } else {\n if (!localeFamilies[config.parentLocale]) {\n localeFamilies[config.parentLocale] = [];\n }\n localeFamilies[config.parentLocale].push({\n name: name,\n config: config,\n });\n return null;\n }\n }\n }\n locales[name] = new Locale(mergeConfigs(parentConfig, config));\n\n if (localeFamilies[name]) {\n localeFamilies[name].forEach(function (x) {\n defineLocale(x.name, x.config);\n });\n }\n\n // backwards compat for now: also set the locale\n // make sure we set the locale AFTER all child locales have been\n // created, so we won't end up with the child locale set.\n getSetGlobalLocale(name);\n\n return locales[name];\n } else {\n // useful for testing\n delete locales[name];\n return null;\n }\n }\n\n function updateLocale(name, config) {\n if (config != null) {\n var locale,\n tmpLocale,\n parentConfig = baseConfig;\n\n if (locales[name] != null && locales[name].parentLocale != null) {\n // Update existing child locale in-place to avoid memory-leaks\n locales[name].set(mergeConfigs(locales[name]._config, config));\n } else {\n // MERGE\n tmpLocale = loadLocale(name);\n if (tmpLocale != null) {\n parentConfig = tmpLocale._config;\n }\n config = mergeConfigs(parentConfig, config);\n if (tmpLocale == null) {\n // updateLocale is called for creating a new locale\n // Set abbr so it will have a name (getters return\n // undefined otherwise).\n config.abbr = name;\n }\n locale = new Locale(config);\n locale.parentLocale = locales[name];\n locales[name] = locale;\n }\n\n // backwards compat for now: also set the locale\n getSetGlobalLocale(name);\n } else {\n // pass null for config to unupdate, useful for tests\n if (locales[name] != null) {\n if (locales[name].parentLocale != null) {\n locales[name] = locales[name].parentLocale;\n if (name === getSetGlobalLocale()) {\n getSetGlobalLocale(name);\n }\n } else if (locales[name] != null) {\n delete locales[name];\n }\n }\n }\n return locales[name];\n }\n\n // returns locale data\n function getLocale(key) {\n var locale;\n\n if (key && key._locale && key._locale._abbr) {\n key = key._locale._abbr;\n }\n\n if (!key) {\n return globalLocale;\n }\n\n if (!isArray(key)) {\n //short-circuit everything else\n locale = loadLocale(key);\n if (locale) {\n return locale;\n }\n key = [key];\n }\n\n return chooseLocale(key);\n }\n\n function listLocales() {\n return keys(locales);\n }\n\n function checkOverflow(m) {\n var overflow,\n a = m._a;\n\n if (a && getParsingFlags(m).overflow === -2) {\n overflow =\n a[MONTH] < 0 || a[MONTH] > 11\n ? MONTH\n : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])\n ? DATE\n : a[HOUR] < 0 ||\n a[HOUR] > 24 ||\n (a[HOUR] === 24 &&\n (a[MINUTE] !== 0 ||\n a[SECOND] !== 0 ||\n a[MILLISECOND] !== 0))\n ? HOUR\n : a[MINUTE] < 0 || a[MINUTE] > 59\n ? MINUTE\n : a[SECOND] < 0 || a[SECOND] > 59\n ? SECOND\n : a[MILLISECOND] < 0 || a[MILLISECOND] > 999\n ? MILLISECOND\n : -1;\n\n if (\n getParsingFlags(m)._overflowDayOfYear &&\n (overflow < YEAR || overflow > DATE)\n ) {\n overflow = DATE;\n }\n if (getParsingFlags(m)._overflowWeeks && overflow === -1) {\n overflow = WEEK;\n }\n if (getParsingFlags(m)._overflowWeekday && overflow === -1) {\n overflow = WEEKDAY;\n }\n\n getParsingFlags(m).overflow = overflow;\n }\n\n return m;\n }\n\n // iso 8601 regex\n // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)\n var extendedIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})-(?:\\d\\d-\\d\\d|W\\d\\d-\\d|W\\d\\d|\\d\\d\\d|\\d\\d))(?:(T| )(\\d\\d(?::\\d\\d(?::\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n basicIsoRegex =\n /^\\s*((?:[+-]\\d{6}|\\d{4})(?:\\d\\d\\d\\d|W\\d\\d\\d|W\\d\\d|\\d\\d\\d|\\d\\d|))(?:(T| )(\\d\\d(?:\\d\\d(?:\\d\\d(?:[.,]\\d+)?)?)?)([+-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/,\n tzRegex = /Z|[+-]\\d\\d(?::?\\d\\d)?/,\n isoDates = [\n ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d\\d-\\d\\d/],\n ['YYYY-MM-DD', /\\d{4}-\\d\\d-\\d\\d/],\n ['GGGG-[W]WW-E', /\\d{4}-W\\d\\d-\\d/],\n ['GGGG-[W]WW', /\\d{4}-W\\d\\d/, false],\n ['YYYY-DDD', /\\d{4}-\\d{3}/],\n ['YYYY-MM', /\\d{4}-\\d\\d/, false],\n ['YYYYYYMMDD', /[+-]\\d{10}/],\n ['YYYYMMDD', /\\d{8}/],\n ['GGGG[W]WWE', /\\d{4}W\\d{3}/],\n ['GGGG[W]WW', /\\d{4}W\\d{2}/, false],\n ['YYYYDDD', /\\d{7}/],\n ['YYYYMM', /\\d{6}/, false],\n ['YYYY', /\\d{4}/, false],\n ],\n // iso time formats and regexes\n isoTimes = [\n ['HH:mm:ss.SSSS', /\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n ['HH:mm:ss,SSSS', /\\d\\d:\\d\\d:\\d\\d,\\d+/],\n ['HH:mm:ss', /\\d\\d:\\d\\d:\\d\\d/],\n ['HH:mm', /\\d\\d:\\d\\d/],\n ['HHmmss.SSSS', /\\d\\d\\d\\d\\d\\d\\.\\d+/],\n ['HHmmss,SSSS', /\\d\\d\\d\\d\\d\\d,\\d+/],\n ['HHmmss', /\\d\\d\\d\\d\\d\\d/],\n ['HHmm', /\\d\\d\\d\\d/],\n ['HH', /\\d\\d/],\n ],\n aspNetJsonRegex = /^\\/?Date\\((-?\\d+)/i,\n // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3\n rfc2822 =\n /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\\s)?(\\d{1,2})\\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s(\\d{2,4})\\s(\\d\\d):(\\d\\d)(?::(\\d\\d))?\\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\\d{4}))$/,\n obsOffsets = {\n UT: 0,\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n };\n\n // date from iso format\n function configFromISO(config) {\n var i,\n l,\n string = config._i,\n match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),\n allowTime,\n dateFormat,\n timeFormat,\n tzFormat,\n isoDatesLen = isoDates.length,\n isoTimesLen = isoTimes.length;\n\n if (match) {\n getParsingFlags(config).iso = true;\n for (i = 0, l = isoDatesLen; i < l; i++) {\n if (isoDates[i][1].exec(match[1])) {\n dateFormat = isoDates[i][0];\n allowTime = isoDates[i][2] !== false;\n break;\n }\n }\n if (dateFormat == null) {\n config._isValid = false;\n return;\n }\n if (match[3]) {\n for (i = 0, l = isoTimesLen; i < l; i++) {\n if (isoTimes[i][1].exec(match[3])) {\n // match[2] should be 'T' or space\n timeFormat = (match[2] || ' ') + isoTimes[i][0];\n break;\n }\n }\n if (timeFormat == null) {\n config._isValid = false;\n return;\n }\n }\n if (!allowTime && timeFormat != null) {\n config._isValid = false;\n return;\n }\n if (match[4]) {\n if (tzRegex.exec(match[4])) {\n tzFormat = 'Z';\n } else {\n config._isValid = false;\n return;\n }\n }\n config._f = dateFormat + (timeFormat || '') + (tzFormat || '');\n configFromStringAndFormat(config);\n } else {\n config._isValid = false;\n }\n }\n\n function extractFromRFC2822Strings(\n yearStr,\n monthStr,\n dayStr,\n hourStr,\n minuteStr,\n secondStr\n ) {\n var result = [\n untruncateYear(yearStr),\n defaultLocaleMonthsShort.indexOf(monthStr),\n parseInt(dayStr, 10),\n parseInt(hourStr, 10),\n parseInt(minuteStr, 10),\n ];\n\n if (secondStr) {\n result.push(parseInt(secondStr, 10));\n }\n\n return result;\n }\n\n function untruncateYear(yearStr) {\n var year = parseInt(yearStr, 10);\n if (year <= 49) {\n return 2000 + year;\n } else if (year <= 999) {\n return 1900 + year;\n }\n return year;\n }\n\n function preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, ' ')\n .replace(/(\\s\\s+)/g, ' ')\n .replace(/^\\s\\s*/, '')\n .replace(/\\s\\s*$/, '');\n }\n\n function checkWeekday(weekdayStr, parsedInput, config) {\n if (weekdayStr) {\n // TODO: Replace the vanilla JS Date object with an independent day-of-week check.\n var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),\n weekdayActual = new Date(\n parsedInput[0],\n parsedInput[1],\n parsedInput[2]\n ).getDay();\n if (weekdayProvided !== weekdayActual) {\n getParsingFlags(config).weekdayMismatch = true;\n config._isValid = false;\n return false;\n }\n }\n return true;\n }\n\n function calculateOffset(obsOffset, militaryOffset, numOffset) {\n if (obsOffset) {\n return obsOffsets[obsOffset];\n } else if (militaryOffset) {\n // the only allowed military tz is Z\n return 0;\n } else {\n var hm = parseInt(numOffset, 10),\n m = hm % 100,\n h = (hm - m) / 100;\n return h * 60 + m;\n }\n }\n\n // date and time from ref 2822 format\n function configFromRFC2822(config) {\n var match = rfc2822.exec(preprocessRFC2822(config._i)),\n parsedArray;\n if (match) {\n parsedArray = extractFromRFC2822Strings(\n match[4],\n match[3],\n match[2],\n match[5],\n match[6],\n match[7]\n );\n if (!checkWeekday(match[1], parsedArray, config)) {\n return;\n }\n\n config._a = parsedArray;\n config._tzm = calculateOffset(match[8], match[9], match[10]);\n\n config._d = createUTCDate.apply(null, config._a);\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n\n getParsingFlags(config).rfc2822 = true;\n } else {\n config._isValid = false;\n }\n }\n\n // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict\n function configFromString(config) {\n var matched = aspNetJsonRegex.exec(config._i);\n if (matched !== null) {\n config._d = new Date(+matched[1]);\n return;\n }\n\n configFromISO(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n configFromRFC2822(config);\n if (config._isValid === false) {\n delete config._isValid;\n } else {\n return;\n }\n\n if (config._strict) {\n config._isValid = false;\n } else {\n // Final attempt, use Input Fallback\n hooks.createFromInputFallback(config);\n }\n }\n\n hooks.createFromInputFallback = deprecate(\n 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +\n 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +\n 'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',\n function (config) {\n config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n }\n );\n\n // Pick the first defined of two or three arguments.\n function defaults(a, b, c) {\n if (a != null) {\n return a;\n }\n if (b != null) {\n return b;\n }\n return c;\n }\n\n function currentDateArray(config) {\n // hooks is actually the exported moment object\n var nowValue = new Date(hooks.now());\n if (config._useUTC) {\n return [\n nowValue.getUTCFullYear(),\n nowValue.getUTCMonth(),\n nowValue.getUTCDate(),\n ];\n }\n return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];\n }\n\n // convert an array to a date.\n // the array should mirror the parameters below\n // note: all values past the year are optional and will default to the lowest possible value.\n // [year, month, day , hour, minute, second, millisecond]\n function configFromArray(config) {\n var i,\n date,\n input = [],\n currentDate,\n expectedWeekday,\n yearToUse;\n\n if (config._d) {\n return;\n }\n\n currentDate = currentDateArray(config);\n\n //compute day of the year from weeks and weekdays\n if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n dayOfYearFromWeekInfo(config);\n }\n\n //if the day of the year is set, figure out what it is\n if (config._dayOfYear != null) {\n yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n if (\n config._dayOfYear > daysInYear(yearToUse) ||\n config._dayOfYear === 0\n ) {\n getParsingFlags(config)._overflowDayOfYear = true;\n }\n\n date = createUTCDate(yearToUse, 0, config._dayOfYear);\n config._a[MONTH] = date.getUTCMonth();\n config._a[DATE] = date.getUTCDate();\n }\n\n // Default to current date.\n // * if no year, month, day of month are given, default to today\n // * if day of month is given, default month and year\n // * if month is given, default only year\n // * if year is given, don't default anything\n for (i = 0; i < 3 && config._a[i] == null; ++i) {\n config._a[i] = input[i] = currentDate[i];\n }\n\n // Zero out whatever was not defaulted, including time\n for (; i < 7; i++) {\n config._a[i] = input[i] =\n config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];\n }\n\n // Check for 24:00:00.000\n if (\n config._a[HOUR] === 24 &&\n config._a[MINUTE] === 0 &&\n config._a[SECOND] === 0 &&\n config._a[MILLISECOND] === 0\n ) {\n config._nextDay = true;\n config._a[HOUR] = 0;\n }\n\n config._d = (config._useUTC ? createUTCDate : createDate).apply(\n null,\n input\n );\n expectedWeekday = config._useUTC\n ? config._d.getUTCDay()\n : config._d.getDay();\n\n // Apply timezone offset from input. The actual utcOffset can be changed\n // with parseZone.\n if (config._tzm != null) {\n config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n }\n\n if (config._nextDay) {\n config._a[HOUR] = 24;\n }\n\n // check for mismatching day of week\n if (\n config._w &&\n typeof config._w.d !== 'undefined' &&\n config._w.d !== expectedWeekday\n ) {\n getParsingFlags(config).weekdayMismatch = true;\n }\n }\n\n function dayOfYearFromWeekInfo(config) {\n var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;\n\n w = config._w;\n if (w.GG != null || w.W != null || w.E != null) {\n dow = 1;\n doy = 4;\n\n // TODO: We need to take the current isoWeekYear, but that depends on\n // how we interpret now (local, utc, fixed offset). So create\n // a now version of current config (take local/utc/offset flags, and\n // create now).\n weekYear = defaults(\n w.GG,\n config._a[YEAR],\n weekOfYear(createLocal(), 1, 4).year\n );\n week = defaults(w.W, 1);\n weekday = defaults(w.E, 1);\n if (weekday < 1 || weekday > 7) {\n weekdayOverflow = true;\n }\n } else {\n dow = config._locale._week.dow;\n doy = config._locale._week.doy;\n\n curWeek = weekOfYear(createLocal(), dow, doy);\n\n weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);\n\n // Default to current week.\n week = defaults(w.w, curWeek.week);\n\n if (w.d != null) {\n // weekday -- low day numbers are considered next week\n weekday = w.d;\n if (weekday < 0 || weekday > 6) {\n weekdayOverflow = true;\n }\n } else if (w.e != null) {\n // local weekday -- counting starts from beginning of week\n weekday = w.e + dow;\n if (w.e < 0 || w.e > 6) {\n weekdayOverflow = true;\n }\n } else {\n // default to beginning of week\n weekday = dow;\n }\n }\n if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {\n getParsingFlags(config)._overflowWeeks = true;\n } else if (weekdayOverflow != null) {\n getParsingFlags(config)._overflowWeekday = true;\n } else {\n temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);\n config._a[YEAR] = temp.year;\n config._dayOfYear = temp.dayOfYear;\n }\n }\n\n // constant that refers to the ISO standard\n hooks.ISO_8601 = function () {};\n\n // constant that refers to the RFC 2822 form\n hooks.RFC_2822 = function () {};\n\n // date from string and format string\n function configFromStringAndFormat(config) {\n // TODO: Move this to another part of the creation flow to prevent circular deps\n if (config._f === hooks.ISO_8601) {\n configFromISO(config);\n return;\n }\n if (config._f === hooks.RFC_2822) {\n configFromRFC2822(config);\n return;\n }\n config._a = [];\n getParsingFlags(config).empty = true;\n\n // This array is used to make a Date, either with `new Date` or `Date.UTC`\n var string = '' + config._i,\n i,\n parsedInput,\n tokens,\n token,\n skipped,\n stringLength = string.length,\n totalParsedInputLength = 0,\n era,\n tokenLen;\n\n tokens =\n expandFormat(config._f, config._locale).match(formattingTokens) || [];\n tokenLen = tokens.length;\n for (i = 0; i < tokenLen; i++) {\n token = tokens[i];\n parsedInput = (string.match(getParseRegexForToken(token, config)) ||\n [])[0];\n if (parsedInput) {\n skipped = string.substr(0, string.indexOf(parsedInput));\n if (skipped.length > 0) {\n getParsingFlags(config).unusedInput.push(skipped);\n }\n string = string.slice(\n string.indexOf(parsedInput) + parsedInput.length\n );\n totalParsedInputLength += parsedInput.length;\n }\n // don't parse if it's not a known token\n if (formatTokenFunctions[token]) {\n if (parsedInput) {\n getParsingFlags(config).empty = false;\n } else {\n getParsingFlags(config).unusedTokens.push(token);\n }\n addTimeToArrayFromToken(token, parsedInput, config);\n } else if (config._strict && !parsedInput) {\n getParsingFlags(config).unusedTokens.push(token);\n }\n }\n\n // add remaining unparsed input length to the string\n getParsingFlags(config).charsLeftOver =\n stringLength - totalParsedInputLength;\n if (string.length > 0) {\n getParsingFlags(config).unusedInput.push(string);\n }\n\n // clear _12h flag if hour is <= 12\n if (\n config._a[HOUR] <= 12 &&\n getParsingFlags(config).bigHour === true &&\n config._a[HOUR] > 0\n ) {\n getParsingFlags(config).bigHour = undefined;\n }\n\n getParsingFlags(config).parsedDateParts = config._a.slice(0);\n getParsingFlags(config).meridiem = config._meridiem;\n // handle meridiem\n config._a[HOUR] = meridiemFixWrap(\n config._locale,\n config._a[HOUR],\n config._meridiem\n );\n\n // handle era\n era = getParsingFlags(config).era;\n if (era !== null) {\n config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);\n }\n\n configFromArray(config);\n checkOverflow(config);\n }\n\n function meridiemFixWrap(locale, hour, meridiem) {\n var isPm;\n\n if (meridiem == null) {\n // nothing to do\n return hour;\n }\n if (locale.meridiemHour != null) {\n return locale.meridiemHour(hour, meridiem);\n } else if (locale.isPM != null) {\n // Fallback\n isPm = locale.isPM(meridiem);\n if (isPm && hour < 12) {\n hour += 12;\n }\n if (!isPm && hour === 12) {\n hour = 0;\n }\n return hour;\n } else {\n // this is not supposed to happen\n return hour;\n }\n }\n\n // date from string and array of format strings\n function configFromStringAndArray(config) {\n var tempConfig,\n bestMoment,\n scoreToBeat,\n i,\n currentScore,\n validFormatFound,\n bestFormatIsValid = false,\n configfLen = config._f.length;\n\n if (configfLen === 0) {\n getParsingFlags(config).invalidFormat = true;\n config._d = new Date(NaN);\n return;\n }\n\n for (i = 0; i < configfLen; i++) {\n currentScore = 0;\n validFormatFound = false;\n tempConfig = copyConfig({}, config);\n if (config._useUTC != null) {\n tempConfig._useUTC = config._useUTC;\n }\n tempConfig._f = config._f[i];\n configFromStringAndFormat(tempConfig);\n\n if (isValid(tempConfig)) {\n validFormatFound = true;\n }\n\n // if there is any input that was not parsed add a penalty for that format\n currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n //or tokens\n currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n getParsingFlags(tempConfig).score = currentScore;\n\n if (!bestFormatIsValid) {\n if (\n scoreToBeat == null ||\n currentScore < scoreToBeat ||\n validFormatFound\n ) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n if (validFormatFound) {\n bestFormatIsValid = true;\n }\n }\n } else {\n if (currentScore < scoreToBeat) {\n scoreToBeat = currentScore;\n bestMoment = tempConfig;\n }\n }\n }\n\n extend(config, bestMoment || tempConfig);\n }\n\n function configFromObject(config) {\n if (config._d) {\n return;\n }\n\n var i = normalizeObjectUnits(config._i),\n dayOrDate = i.day === undefined ? i.date : i.day;\n config._a = map(\n [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],\n function (obj) {\n return obj && parseInt(obj, 10);\n }\n );\n\n configFromArray(config);\n }\n\n function createFromConfig(config) {\n var res = new Moment(checkOverflow(prepareConfig(config)));\n if (res._nextDay) {\n // Adding is smart enough around DST\n res.add(1, 'd');\n res._nextDay = undefined;\n }\n\n return res;\n }\n\n function prepareConfig(config) {\n var input = config._i,\n format = config._f;\n\n config._locale = config._locale || getLocale(config._l);\n\n if (input === null || (format === undefined && input === '')) {\n return createInvalid({ nullInput: true });\n }\n\n if (typeof input === 'string') {\n config._i = input = config._locale.preparse(input);\n }\n\n if (isMoment(input)) {\n return new Moment(checkOverflow(input));\n } else if (isDate(input)) {\n config._d = input;\n } else if (isArray(format)) {\n configFromStringAndArray(config);\n } else if (format) {\n configFromStringAndFormat(config);\n } else {\n configFromInput(config);\n }\n\n if (!isValid(config)) {\n config._d = null;\n }\n\n return config;\n }\n\n function configFromInput(config) {\n var input = config._i;\n if (isUndefined(input)) {\n config._d = new Date(hooks.now());\n } else if (isDate(input)) {\n config._d = new Date(input.valueOf());\n } else if (typeof input === 'string') {\n configFromString(config);\n } else if (isArray(input)) {\n config._a = map(input.slice(0), function (obj) {\n return parseInt(obj, 10);\n });\n configFromArray(config);\n } else if (isObject(input)) {\n configFromObject(config);\n } else if (isNumber(input)) {\n // from milliseconds\n config._d = new Date(input);\n } else {\n hooks.createFromInputFallback(config);\n }\n }\n\n function createLocalOrUTC(input, format, locale, strict, isUTC) {\n var c = {};\n\n if (format === true || format === false) {\n strict = format;\n format = undefined;\n }\n\n if (locale === true || locale === false) {\n strict = locale;\n locale = undefined;\n }\n\n if (\n (isObject(input) && isObjectEmpty(input)) ||\n (isArray(input) && input.length === 0)\n ) {\n input = undefined;\n }\n // object construction must be done this way.\n // https://github.com/moment/moment/issues/1423\n c._isAMomentObject = true;\n c._useUTC = c._isUTC = isUTC;\n c._l = locale;\n c._i = input;\n c._f = format;\n c._strict = strict;\n\n return createFromConfig(c);\n }\n\n function createLocal(input, format, locale, strict) {\n return createLocalOrUTC(input, format, locale, strict, false);\n }\n\n var prototypeMin = deprecate(\n 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other < this ? this : other;\n } else {\n return createInvalid();\n }\n }\n ),\n prototypeMax = deprecate(\n 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',\n function () {\n var other = createLocal.apply(null, arguments);\n if (this.isValid() && other.isValid()) {\n return other > this ? this : other;\n } else {\n return createInvalid();\n }\n }\n );\n\n // Pick a moment m from moments so that m[fn](other) is true for all\n // other. This relies on the function fn to be transitive.\n //\n // moments should either be an array of moment objects or an array, whose\n // first element is an array of moment objects.\n function pickBy(fn, moments) {\n var res, i;\n if (moments.length === 1 && isArray(moments[0])) {\n moments = moments[0];\n }\n if (!moments.length) {\n return createLocal();\n }\n res = moments[0];\n for (i = 1; i < moments.length; ++i) {\n if (!moments[i].isValid() || moments[i][fn](res)) {\n res = moments[i];\n }\n }\n return res;\n }\n\n // TODO: Use [].sort instead?\n function min() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isBefore', args);\n }\n\n function max() {\n var args = [].slice.call(arguments, 0);\n\n return pickBy('isAfter', args);\n }\n\n var now = function () {\n return Date.now ? Date.now() : +new Date();\n };\n\n var ordering = [\n 'year',\n 'quarter',\n 'month',\n 'week',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'millisecond',\n ];\n\n function isDurationValid(m) {\n var key,\n unitHasDecimal = false,\n i,\n orderLen = ordering.length;\n for (key in m) {\n if (\n hasOwnProp(m, key) &&\n !(\n indexOf.call(ordering, key) !== -1 &&\n (m[key] == null || !isNaN(m[key]))\n )\n ) {\n return false;\n }\n }\n\n for (i = 0; i < orderLen; ++i) {\n if (m[ordering[i]]) {\n if (unitHasDecimal) {\n return false; // only allow non-integers for smallest unit\n }\n if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {\n unitHasDecimal = true;\n }\n }\n }\n\n return true;\n }\n\n function isValid$1() {\n return this._isValid;\n }\n\n function createInvalid$1() {\n return createDuration(NaN);\n }\n\n function Duration(duration) {\n var normalizedInput = normalizeObjectUnits(duration),\n years = normalizedInput.year || 0,\n quarters = normalizedInput.quarter || 0,\n months = normalizedInput.month || 0,\n weeks = normalizedInput.week || normalizedInput.isoWeek || 0,\n days = normalizedInput.day || 0,\n hours = normalizedInput.hour || 0,\n minutes = normalizedInput.minute || 0,\n seconds = normalizedInput.second || 0,\n milliseconds = normalizedInput.millisecond || 0;\n\n this._isValid = isDurationValid(normalizedInput);\n\n // representation for dateAddRemove\n this._milliseconds =\n +milliseconds +\n seconds * 1e3 + // 1000\n minutes * 6e4 + // 1000 * 60\n hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978\n // Because of dateAddRemove treats 24 hours as different from a\n // day when working around DST, we need to store them separately\n this._days = +days + weeks * 7;\n // It is impossible to translate months into days without knowing\n // which months you are are talking about, so we have to store\n // it separately.\n this._months = +months + quarters * 3 + years * 12;\n\n this._data = {};\n\n this._locale = getLocale();\n\n this._bubble();\n }\n\n function isDuration(obj) {\n return obj instanceof Duration;\n }\n\n function absRound(number) {\n if (number < 0) {\n return Math.round(-1 * number) * -1;\n } else {\n return Math.round(number);\n }\n }\n\n // compare two arrays, return the number of differences\n function compareArrays(array1, array2, dontConvert) {\n var len = Math.min(array1.length, array2.length),\n lengthDiff = Math.abs(array1.length - array2.length),\n diffs = 0,\n i;\n for (i = 0; i < len; i++) {\n if (\n (dontConvert && array1[i] !== array2[i]) ||\n (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))\n ) {\n diffs++;\n }\n }\n return diffs + lengthDiff;\n }\n\n // FORMATTING\n\n function offset(token, separator) {\n addFormatToken(token, 0, 0, function () {\n var offset = this.utcOffset(),\n sign = '+';\n if (offset < 0) {\n offset = -offset;\n sign = '-';\n }\n return (\n sign +\n zeroFill(~~(offset / 60), 2) +\n separator +\n zeroFill(~~offset % 60, 2)\n );\n });\n }\n\n offset('Z', ':');\n offset('ZZ', '');\n\n // PARSING\n\n addRegexToken('Z', matchShortOffset);\n addRegexToken('ZZ', matchShortOffset);\n addParseToken(['Z', 'ZZ'], function (input, array, config) {\n config._useUTC = true;\n config._tzm = offsetFromString(matchShortOffset, input);\n });\n\n // HELPERS\n\n // timezone chunker\n // '+10:00' > ['10', '00']\n // '-1530' > ['-15', '30']\n var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n function offsetFromString(matcher, string) {\n var matches = (string || '').match(matcher),\n chunk,\n parts,\n minutes;\n\n if (matches === null) {\n return null;\n }\n\n chunk = matches[matches.length - 1] || [];\n parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;\n }\n\n // Return a moment from input, that is local/utc/zone equivalent to model.\n function cloneWithOffset(input, model) {\n var res, diff;\n if (model._isUTC) {\n res = model.clone();\n diff =\n (isMoment(input) || isDate(input)\n ? input.valueOf()\n : createLocal(input).valueOf()) - res.valueOf();\n // Use low-level api, because this fn is low-level api.\n res._d.setTime(res._d.valueOf() + diff);\n hooks.updateOffset(res, false);\n return res;\n } else {\n return createLocal(input).local();\n }\n }\n\n function getDateOffset(m) {\n // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n // https://github.com/moment/moment/pull/1871\n return -Math.round(m._d.getTimezoneOffset());\n }\n\n // HOOKS\n\n // This function will be called whenever a moment is mutated.\n // It is intended to keep the offset in sync with the timezone.\n hooks.updateOffset = function () {};\n\n // MOMENTS\n\n // keepLocalTime = true means only change the timezone, without\n // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n // +0200, so we adjust the time as needed, to be valid.\n //\n // Keeping the time actually adds/subtracts (one hour)\n // from the actual represented time. That is why we call updateOffset\n // a second time. In case it wants us to change the offset again\n // _changeInProgress == true case, then we have to adjust, because\n // there is no such time in the given timezone.\n function getSetOffset(input, keepLocalTime, keepMinutes) {\n var offset = this._offset || 0,\n localAdjust;\n if (!this.isValid()) {\n return input != null ? this : NaN;\n }\n if (input != null) {\n if (typeof input === 'string') {\n input = offsetFromString(matchShortOffset, input);\n if (input === null) {\n return this;\n }\n } else if (Math.abs(input) < 16 && !keepMinutes) {\n input = input * 60;\n }\n if (!this._isUTC && keepLocalTime) {\n localAdjust = getDateOffset(this);\n }\n this._offset = input;\n this._isUTC = true;\n if (localAdjust != null) {\n this.add(localAdjust, 'm');\n }\n if (offset !== input) {\n if (!keepLocalTime || this._changeInProgress) {\n addSubtract(\n this,\n createDuration(input - offset, 'm'),\n 1,\n false\n );\n } else if (!this._changeInProgress) {\n this._changeInProgress = true;\n hooks.updateOffset(this, true);\n this._changeInProgress = null;\n }\n }\n return this;\n } else {\n return this._isUTC ? offset : getDateOffset(this);\n }\n }\n\n function getSetZone(input, keepLocalTime) {\n if (input != null) {\n if (typeof input !== 'string') {\n input = -input;\n }\n\n this.utcOffset(input, keepLocalTime);\n\n return this;\n } else {\n return -this.utcOffset();\n }\n }\n\n function setOffsetToUTC(keepLocalTime) {\n return this.utcOffset(0, keepLocalTime);\n }\n\n function setOffsetToLocal(keepLocalTime) {\n if (this._isUTC) {\n this.utcOffset(0, keepLocalTime);\n this._isUTC = false;\n\n if (keepLocalTime) {\n this.subtract(getDateOffset(this), 'm');\n }\n }\n return this;\n }\n\n function setOffsetToParsedOffset() {\n if (this._tzm != null) {\n this.utcOffset(this._tzm, false, true);\n } else if (typeof this._i === 'string') {\n var tZone = offsetFromString(matchOffset, this._i);\n if (tZone != null) {\n this.utcOffset(tZone);\n } else {\n this.utcOffset(0, true);\n }\n }\n return this;\n }\n\n function hasAlignedHourOffset(input) {\n if (!this.isValid()) {\n return false;\n }\n input = input ? createLocal(input).utcOffset() : 0;\n\n return (this.utcOffset() - input) % 60 === 0;\n }\n\n function isDaylightSavingTime() {\n return (\n this.utcOffset() > this.clone().month(0).utcOffset() ||\n this.utcOffset() > this.clone().month(5).utcOffset()\n );\n }\n\n function isDaylightSavingTimeShifted() {\n if (!isUndefined(this._isDSTShifted)) {\n return this._isDSTShifted;\n }\n\n var c = {},\n other;\n\n copyConfig(c, this);\n c = prepareConfig(c);\n\n if (c._a) {\n other = c._isUTC ? createUTC(c._a) : createLocal(c._a);\n this._isDSTShifted =\n this.isValid() && compareArrays(c._a, other.toArray()) > 0;\n } else {\n this._isDSTShifted = false;\n }\n\n return this._isDSTShifted;\n }\n\n function isLocal() {\n return this.isValid() ? !this._isUTC : false;\n }\n\n function isUtcOffset() {\n return this.isValid() ? this._isUTC : false;\n }\n\n function isUtc() {\n return this.isValid() ? this._isUTC && this._offset === 0 : false;\n }\n\n // ASP.NET json date format regex\n var aspNetRegex = /^(-|\\+)?(?:(\\d*)[. ])?(\\d+):(\\d+)(?::(\\d+)(\\.\\d*)?)?$/,\n // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n // and further modified to allow for strings containing both week and day\n isoRegex =\n /^(-|\\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;\n\n function createDuration(input, key) {\n var duration = input,\n // matching against regexp is expensive, do it on demand\n match = null,\n sign,\n ret,\n diffRes;\n\n if (isDuration(input)) {\n duration = {\n ms: input._milliseconds,\n d: input._days,\n M: input._months,\n };\n } else if (isNumber(input) || !isNaN(+input)) {\n duration = {};\n if (key) {\n duration[key] = +input;\n } else {\n duration.milliseconds = +input;\n }\n } else if ((match = aspNetRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: 0,\n d: toInt(match[DATE]) * sign,\n h: toInt(match[HOUR]) * sign,\n m: toInt(match[MINUTE]) * sign,\n s: toInt(match[SECOND]) * sign,\n ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match\n };\n } else if ((match = isoRegex.exec(input))) {\n sign = match[1] === '-' ? -1 : 1;\n duration = {\n y: parseIso(match[2], sign),\n M: parseIso(match[3], sign),\n w: parseIso(match[4], sign),\n d: parseIso(match[5], sign),\n h: parseIso(match[6], sign),\n m: parseIso(match[7], sign),\n s: parseIso(match[8], sign),\n };\n } else if (duration == null) {\n // checks for null or undefined\n duration = {};\n } else if (\n typeof duration === 'object' &&\n ('from' in duration || 'to' in duration)\n ) {\n diffRes = momentsDifference(\n createLocal(duration.from),\n createLocal(duration.to)\n );\n\n duration = {};\n duration.ms = diffRes.milliseconds;\n duration.M = diffRes.months;\n }\n\n ret = new Duration(duration);\n\n if (isDuration(input) && hasOwnProp(input, '_locale')) {\n ret._locale = input._locale;\n }\n\n if (isDuration(input) && hasOwnProp(input, '_isValid')) {\n ret._isValid = input._isValid;\n }\n\n return ret;\n }\n\n createDuration.fn = Duration.prototype;\n createDuration.invalid = createInvalid$1;\n\n function parseIso(inp, sign) {\n // We'd normally use ~~inp for this, but unfortunately it also\n // converts floats to ints.\n // inp may be undefined, so careful calling replace on it.\n var res = inp && parseFloat(inp.replace(',', '.'));\n // apply sign while we're at it\n return (isNaN(res) ? 0 : res) * sign;\n }\n\n function positiveMomentsDifference(base, other) {\n var res = {};\n\n res.months =\n other.month() - base.month() + (other.year() - base.year()) * 12;\n if (base.clone().add(res.months, 'M').isAfter(other)) {\n --res.months;\n }\n\n res.milliseconds = +other - +base.clone().add(res.months, 'M');\n\n return res;\n }\n\n function momentsDifference(base, other) {\n var res;\n if (!(base.isValid() && other.isValid())) {\n return { milliseconds: 0, months: 0 };\n }\n\n other = cloneWithOffset(other, base);\n if (base.isBefore(other)) {\n res = positiveMomentsDifference(base, other);\n } else {\n res = positiveMomentsDifference(other, base);\n res.milliseconds = -res.milliseconds;\n res.months = -res.months;\n }\n\n return res;\n }\n\n // TODO: remove 'name' arg after deprecation is removed\n function createAdder(direction, name) {\n return function (val, period) {\n var dur, tmp;\n //invert the arguments, but complain about it\n if (period !== null && !isNaN(+period)) {\n deprecateSimple(\n name,\n 'moment().' +\n name +\n '(period, number) is deprecated. Please use moment().' +\n name +\n '(number, period). ' +\n 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'\n );\n tmp = val;\n val = period;\n period = tmp;\n }\n\n dur = createDuration(val, period);\n addSubtract(this, dur, direction);\n return this;\n };\n }\n\n function addSubtract(mom, duration, isAdding, updateOffset) {\n var milliseconds = duration._milliseconds,\n days = absRound(duration._days),\n months = absRound(duration._months);\n\n if (!mom.isValid()) {\n // No op\n return;\n }\n\n updateOffset = updateOffset == null ? true : updateOffset;\n\n if (months) {\n setMonth(mom, get(mom, 'Month') + months * isAdding);\n }\n if (days) {\n set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);\n }\n if (milliseconds) {\n mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);\n }\n if (updateOffset) {\n hooks.updateOffset(mom, days || months);\n }\n }\n\n var add = createAdder(1, 'add'),\n subtract = createAdder(-1, 'subtract');\n\n function isString(input) {\n return typeof input === 'string' || input instanceof String;\n }\n\n // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined\n function isMomentInput(input) {\n return (\n isMoment(input) ||\n isDate(input) ||\n isString(input) ||\n isNumber(input) ||\n isNumberOrStringArray(input) ||\n isMomentInputObject(input) ||\n input === null ||\n input === undefined\n );\n }\n\n function isMomentInputObject(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'years',\n 'year',\n 'y',\n 'months',\n 'month',\n 'M',\n 'days',\n 'day',\n 'd',\n 'dates',\n 'date',\n 'D',\n 'hours',\n 'hour',\n 'h',\n 'minutes',\n 'minute',\n 'm',\n 'seconds',\n 'second',\n 's',\n 'milliseconds',\n 'millisecond',\n 'ms',\n ],\n i,\n property,\n propertyLen = properties.length;\n\n for (i = 0; i < propertyLen; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function isNumberOrStringArray(input) {\n var arrayTest = isArray(input),\n dataTypeTest = false;\n if (arrayTest) {\n dataTypeTest =\n input.filter(function (item) {\n return !isNumber(item) && isString(input);\n }).length === 0;\n }\n return arrayTest && dataTypeTest;\n }\n\n function isCalendarSpec(input) {\n var objectTest = isObject(input) && !isObjectEmpty(input),\n propertyTest = false,\n properties = [\n 'sameDay',\n 'nextDay',\n 'lastDay',\n 'nextWeek',\n 'lastWeek',\n 'sameElse',\n ],\n i,\n property;\n\n for (i = 0; i < properties.length; i += 1) {\n property = properties[i];\n propertyTest = propertyTest || hasOwnProp(input, property);\n }\n\n return objectTest && propertyTest;\n }\n\n function getCalendarFormat(myMoment, now) {\n var diff = myMoment.diff(now, 'days', true);\n return diff < -6\n ? 'sameElse'\n : diff < -1\n ? 'lastWeek'\n : diff < 0\n ? 'lastDay'\n : diff < 1\n ? 'sameDay'\n : diff < 2\n ? 'nextDay'\n : diff < 7\n ? 'nextWeek'\n : 'sameElse';\n }\n\n function calendar$1(time, formats) {\n // Support for single parameter, formats only overload to the calendar function\n if (arguments.length === 1) {\n if (!arguments[0]) {\n time = undefined;\n formats = undefined;\n } else if (isMomentInput(arguments[0])) {\n time = arguments[0];\n formats = undefined;\n } else if (isCalendarSpec(arguments[0])) {\n formats = arguments[0];\n time = undefined;\n }\n }\n // We want to compare the start of today, vs this.\n // Getting start-of-today depends on whether we're local/utc/offset or not.\n var now = time || createLocal(),\n sod = cloneWithOffset(now, this).startOf('day'),\n format = hooks.calendarFormat(this, sod) || 'sameElse',\n output =\n formats &&\n (isFunction(formats[format])\n ? formats[format].call(this, now)\n : formats[format]);\n\n return this.format(\n output || this.localeData().calendar(format, this, createLocal(now))\n );\n }\n\n function clone() {\n return new Moment(this);\n }\n\n function isAfter(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() > localInput.valueOf();\n } else {\n return localInput.valueOf() < this.clone().startOf(units).valueOf();\n }\n }\n\n function isBefore(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input);\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() < localInput.valueOf();\n } else {\n return this.clone().endOf(units).valueOf() < localInput.valueOf();\n }\n }\n\n function isBetween(from, to, units, inclusivity) {\n var localFrom = isMoment(from) ? from : createLocal(from),\n localTo = isMoment(to) ? to : createLocal(to);\n if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {\n return false;\n }\n inclusivity = inclusivity || '()';\n return (\n (inclusivity[0] === '('\n ? this.isAfter(localFrom, units)\n : !this.isBefore(localFrom, units)) &&\n (inclusivity[1] === ')'\n ? this.isBefore(localTo, units)\n : !this.isAfter(localTo, units))\n );\n }\n\n function isSame(input, units) {\n var localInput = isMoment(input) ? input : createLocal(input),\n inputMs;\n if (!(this.isValid() && localInput.isValid())) {\n return false;\n }\n units = normalizeUnits(units) || 'millisecond';\n if (units === 'millisecond') {\n return this.valueOf() === localInput.valueOf();\n } else {\n inputMs = localInput.valueOf();\n return (\n this.clone().startOf(units).valueOf() <= inputMs &&\n inputMs <= this.clone().endOf(units).valueOf()\n );\n }\n }\n\n function isSameOrAfter(input, units) {\n return this.isSame(input, units) || this.isAfter(input, units);\n }\n\n function isSameOrBefore(input, units) {\n return this.isSame(input, units) || this.isBefore(input, units);\n }\n\n function diff(input, units, asFloat) {\n var that, zoneDelta, output;\n\n if (!this.isValid()) {\n return NaN;\n }\n\n that = cloneWithOffset(input, this);\n\n if (!that.isValid()) {\n return NaN;\n }\n\n zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;\n\n units = normalizeUnits(units);\n\n switch (units) {\n case 'year':\n output = monthDiff(this, that) / 12;\n break;\n case 'month':\n output = monthDiff(this, that);\n break;\n case 'quarter':\n output = monthDiff(this, that) / 3;\n break;\n case 'second':\n output = (this - that) / 1e3;\n break; // 1000\n case 'minute':\n output = (this - that) / 6e4;\n break; // 1000 * 60\n case 'hour':\n output = (this - that) / 36e5;\n break; // 1000 * 60 * 60\n case 'day':\n output = (this - that - zoneDelta) / 864e5;\n break; // 1000 * 60 * 60 * 24, negate dst\n case 'week':\n output = (this - that - zoneDelta) / 6048e5;\n break; // 1000 * 60 * 60 * 24 * 7, negate dst\n default:\n output = this - that;\n }\n\n return asFloat ? output : absFloor(output);\n }\n\n function monthDiff(a, b) {\n if (a.date() < b.date()) {\n // end-of-month calculations work correct when the start month has more\n // days than the end month.\n return -monthDiff(b, a);\n }\n // difference in months\n var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),\n // b is in (anchor - 1 month, anchor + 1 month)\n anchor = a.clone().add(wholeMonthDiff, 'months'),\n anchor2,\n adjust;\n\n if (b - anchor < 0) {\n anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor - anchor2);\n } else {\n anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n // linear across the month\n adjust = (b - anchor) / (anchor2 - anchor);\n }\n\n //check for negative zero, return zero if negative zero\n return -(wholeMonthDiff + adjust) || 0;\n }\n\n hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';\n\n function toString() {\n return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n }\n\n function toISOString(keepOffset) {\n if (!this.isValid()) {\n return null;\n }\n var utc = keepOffset !== true,\n m = utc ? this.clone().utc() : this;\n if (m.year() < 0 || m.year() > 9999) {\n return formatMoment(\n m,\n utc\n ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'\n : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n if (isFunction(Date.prototype.toISOString)) {\n // native implementation is ~50x faster, use it when we can\n if (utc) {\n return this.toDate().toISOString();\n } else {\n return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)\n .toISOString()\n .replace('Z', formatMoment(m, 'Z'));\n }\n }\n return formatMoment(\n m,\n utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'\n );\n }\n\n /**\n * Return a human readable representation of a moment that can\n * also be evaluated to get a new moment which is the same\n *\n * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects\n */\n function inspect() {\n if (!this.isValid()) {\n return 'moment.invalid(/* ' + this._i + ' */)';\n }\n var func = 'moment',\n zone = '',\n prefix,\n year,\n datetime,\n suffix;\n if (!this.isLocal()) {\n func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';\n zone = 'Z';\n }\n prefix = '[' + func + '(\"]';\n year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';\n datetime = '-MM-DD[T]HH:mm:ss.SSS';\n suffix = zone + '[\")]';\n\n return this.format(prefix + year + datetime + suffix);\n }\n\n function format(inputString) {\n if (!inputString) {\n inputString = this.isUtc()\n ? hooks.defaultFormatUtc\n : hooks.defaultFormat;\n }\n var output = formatMoment(this, inputString);\n return this.localeData().postformat(output);\n }\n\n function from(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ to: this, from: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function fromNow(withoutSuffix) {\n return this.from(createLocal(), withoutSuffix);\n }\n\n function to(time, withoutSuffix) {\n if (\n this.isValid() &&\n ((isMoment(time) && time.isValid()) || createLocal(time).isValid())\n ) {\n return createDuration({ from: this, to: time })\n .locale(this.locale())\n .humanize(!withoutSuffix);\n } else {\n return this.localeData().invalidDate();\n }\n }\n\n function toNow(withoutSuffix) {\n return this.to(createLocal(), withoutSuffix);\n }\n\n // If passed a locale key, it will set the locale for this\n // instance. Otherwise, it will return the locale configuration\n // variables for this instance.\n function locale(key) {\n var newLocaleData;\n\n if (key === undefined) {\n return this._locale._abbr;\n } else {\n newLocaleData = getLocale(key);\n if (newLocaleData != null) {\n this._locale = newLocaleData;\n }\n return this;\n }\n }\n\n var lang = deprecate(\n 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n function (key) {\n if (key === undefined) {\n return this.localeData();\n } else {\n return this.locale(key);\n }\n }\n );\n\n function localeData() {\n return this._locale;\n }\n\n var MS_PER_SECOND = 1000,\n MS_PER_MINUTE = 60 * MS_PER_SECOND,\n MS_PER_HOUR = 60 * MS_PER_MINUTE,\n MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;\n\n // actual modulo - handles negative numbers (for dates before 1970):\n function mod$1(dividend, divisor) {\n return ((dividend % divisor) + divisor) % divisor;\n }\n\n function localStartOfDate(y, m, d) {\n // the date constructor remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return new Date(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return new Date(y, m, d).valueOf();\n }\n }\n\n function utcStartOfDate(y, m, d) {\n // Date.UTC remaps years 0-99 to 1900-1999\n if (y < 100 && y >= 0) {\n // preserve leap years using a full 400 year cycle, then reset\n return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;\n } else {\n return Date.UTC(y, m, d);\n }\n }\n\n function startOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year(), 0, 1);\n break;\n case 'quarter':\n time = startOfDate(\n this.year(),\n this.month() - (this.month() % 3),\n 1\n );\n break;\n case 'month':\n time = startOfDate(this.year(), this.month(), 1);\n break;\n case 'week':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday()\n );\n break;\n case 'isoWeek':\n time = startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1)\n );\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date());\n break;\n case 'hour':\n time = this._d.valueOf();\n time -= mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n );\n break;\n case 'minute':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_MINUTE);\n break;\n case 'second':\n time = this._d.valueOf();\n time -= mod$1(time, MS_PER_SECOND);\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function endOf(units) {\n var time, startOfDate;\n units = normalizeUnits(units);\n if (units === undefined || units === 'millisecond' || !this.isValid()) {\n return this;\n }\n\n startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;\n\n switch (units) {\n case 'year':\n time = startOfDate(this.year() + 1, 0, 1) - 1;\n break;\n case 'quarter':\n time =\n startOfDate(\n this.year(),\n this.month() - (this.month() % 3) + 3,\n 1\n ) - 1;\n break;\n case 'month':\n time = startOfDate(this.year(), this.month() + 1, 1) - 1;\n break;\n case 'week':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - this.weekday() + 7\n ) - 1;\n break;\n case 'isoWeek':\n time =\n startOfDate(\n this.year(),\n this.month(),\n this.date() - (this.isoWeekday() - 1) + 7\n ) - 1;\n break;\n case 'day':\n case 'date':\n time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;\n break;\n case 'hour':\n time = this._d.valueOf();\n time +=\n MS_PER_HOUR -\n mod$1(\n time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),\n MS_PER_HOUR\n ) -\n 1;\n break;\n case 'minute':\n time = this._d.valueOf();\n time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;\n break;\n case 'second':\n time = this._d.valueOf();\n time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;\n break;\n }\n\n this._d.setTime(time);\n hooks.updateOffset(this, true);\n return this;\n }\n\n function valueOf() {\n return this._d.valueOf() - (this._offset || 0) * 60000;\n }\n\n function unix() {\n return Math.floor(this.valueOf() / 1000);\n }\n\n function toDate() {\n return new Date(this.valueOf());\n }\n\n function toArray() {\n var m = this;\n return [\n m.year(),\n m.month(),\n m.date(),\n m.hour(),\n m.minute(),\n m.second(),\n m.millisecond(),\n ];\n }\n\n function toObject() {\n var m = this;\n return {\n years: m.year(),\n months: m.month(),\n date: m.date(),\n hours: m.hours(),\n minutes: m.minutes(),\n seconds: m.seconds(),\n milliseconds: m.milliseconds(),\n };\n }\n\n function toJSON() {\n // new Date(NaN).toJSON() === null\n return this.isValid() ? this.toISOString() : null;\n }\n\n function isValid$2() {\n return isValid(this);\n }\n\n function parsingFlags() {\n return extend({}, getParsingFlags(this));\n }\n\n function invalidAt() {\n return getParsingFlags(this).overflow;\n }\n\n function creationData() {\n return {\n input: this._i,\n format: this._f,\n locale: this._locale,\n isUTC: this._isUTC,\n strict: this._strict,\n };\n }\n\n addFormatToken('N', 0, 0, 'eraAbbr');\n addFormatToken('NN', 0, 0, 'eraAbbr');\n addFormatToken('NNN', 0, 0, 'eraAbbr');\n addFormatToken('NNNN', 0, 0, 'eraName');\n addFormatToken('NNNNN', 0, 0, 'eraNarrow');\n\n addFormatToken('y', ['y', 1], 'yo', 'eraYear');\n addFormatToken('y', ['yy', 2], 0, 'eraYear');\n addFormatToken('y', ['yyy', 3], 0, 'eraYear');\n addFormatToken('y', ['yyyy', 4], 0, 'eraYear');\n\n addRegexToken('N', matchEraAbbr);\n addRegexToken('NN', matchEraAbbr);\n addRegexToken('NNN', matchEraAbbr);\n addRegexToken('NNNN', matchEraName);\n addRegexToken('NNNNN', matchEraNarrow);\n\n addParseToken(\n ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],\n function (input, array, config, token) {\n var era = config._locale.erasParse(input, token, config._strict);\n if (era) {\n getParsingFlags(config).era = era;\n } else {\n getParsingFlags(config).invalidEra = input;\n }\n }\n );\n\n addRegexToken('y', matchUnsigned);\n addRegexToken('yy', matchUnsigned);\n addRegexToken('yyy', matchUnsigned);\n addRegexToken('yyyy', matchUnsigned);\n addRegexToken('yo', matchEraYearOrdinal);\n\n addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);\n addParseToken(['yo'], function (input, array, config, token) {\n var match;\n if (config._locale._eraYearOrdinalRegex) {\n match = input.match(config._locale._eraYearOrdinalRegex);\n }\n\n if (config._locale.eraYearOrdinalParse) {\n array[YEAR] = config._locale.eraYearOrdinalParse(input, match);\n } else {\n array[YEAR] = parseInt(input, 10);\n }\n });\n\n function localeEras(m, format) {\n var i,\n l,\n date,\n eras = this._eras || getLocale('en')._eras;\n for (i = 0, l = eras.length; i < l; ++i) {\n switch (typeof eras[i].since) {\n case 'string':\n // truncate time\n date = hooks(eras[i].since).startOf('day');\n eras[i].since = date.valueOf();\n break;\n }\n\n switch (typeof eras[i].until) {\n case 'undefined':\n eras[i].until = +Infinity;\n break;\n case 'string':\n // truncate time\n date = hooks(eras[i].until).startOf('day').valueOf();\n eras[i].until = date.valueOf();\n break;\n }\n }\n return eras;\n }\n\n function localeErasParse(eraName, format, strict) {\n var i,\n l,\n eras = this.eras(),\n name,\n abbr,\n narrow;\n eraName = eraName.toUpperCase();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n name = eras[i].name.toUpperCase();\n abbr = eras[i].abbr.toUpperCase();\n narrow = eras[i].narrow.toUpperCase();\n\n if (strict) {\n switch (format) {\n case 'N':\n case 'NN':\n case 'NNN':\n if (abbr === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNN':\n if (name === eraName) {\n return eras[i];\n }\n break;\n\n case 'NNNNN':\n if (narrow === eraName) {\n return eras[i];\n }\n break;\n }\n } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {\n return eras[i];\n }\n }\n }\n\n function localeErasConvertYear(era, year) {\n var dir = era.since <= era.until ? +1 : -1;\n if (year === undefined) {\n return hooks(era.since).year();\n } else {\n return hooks(era.since).year() + (year - era.offset) * dir;\n }\n }\n\n function getEraName() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].name;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].name;\n }\n }\n\n return '';\n }\n\n function getEraNarrow() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].narrow;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].narrow;\n }\n }\n\n return '';\n }\n\n function getEraAbbr() {\n var i,\n l,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (eras[i].since <= val && val <= eras[i].until) {\n return eras[i].abbr;\n }\n if (eras[i].until <= val && val <= eras[i].since) {\n return eras[i].abbr;\n }\n }\n\n return '';\n }\n\n function getEraYear() {\n var i,\n l,\n dir,\n val,\n eras = this.localeData().eras();\n for (i = 0, l = eras.length; i < l; ++i) {\n dir = eras[i].since <= eras[i].until ? +1 : -1;\n\n // truncate time\n val = this.clone().startOf('day').valueOf();\n\n if (\n (eras[i].since <= val && val <= eras[i].until) ||\n (eras[i].until <= val && val <= eras[i].since)\n ) {\n return (\n (this.year() - hooks(eras[i].since).year()) * dir +\n eras[i].offset\n );\n }\n }\n\n return this.year();\n }\n\n function erasNameRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNameRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNameRegex : this._erasRegex;\n }\n\n function erasAbbrRegex(isStrict) {\n if (!hasOwnProp(this, '_erasAbbrRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasAbbrRegex : this._erasRegex;\n }\n\n function erasNarrowRegex(isStrict) {\n if (!hasOwnProp(this, '_erasNarrowRegex')) {\n computeErasParse.call(this);\n }\n return isStrict ? this._erasNarrowRegex : this._erasRegex;\n }\n\n function matchEraAbbr(isStrict, locale) {\n return locale.erasAbbrRegex(isStrict);\n }\n\n function matchEraName(isStrict, locale) {\n return locale.erasNameRegex(isStrict);\n }\n\n function matchEraNarrow(isStrict, locale) {\n return locale.erasNarrowRegex(isStrict);\n }\n\n function matchEraYearOrdinal(isStrict, locale) {\n return locale._eraYearOrdinalRegex || matchUnsigned;\n }\n\n function computeErasParse() {\n var abbrPieces = [],\n namePieces = [],\n narrowPieces = [],\n mixedPieces = [],\n i,\n l,\n eras = this.eras();\n\n for (i = 0, l = eras.length; i < l; ++i) {\n namePieces.push(regexEscape(eras[i].name));\n abbrPieces.push(regexEscape(eras[i].abbr));\n narrowPieces.push(regexEscape(eras[i].narrow));\n\n mixedPieces.push(regexEscape(eras[i].name));\n mixedPieces.push(regexEscape(eras[i].abbr));\n mixedPieces.push(regexEscape(eras[i].narrow));\n }\n\n this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');\n this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');\n this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');\n this._erasNarrowRegex = new RegExp(\n '^(' + narrowPieces.join('|') + ')',\n 'i'\n );\n }\n\n // FORMATTING\n\n addFormatToken(0, ['gg', 2], 0, function () {\n return this.weekYear() % 100;\n });\n\n addFormatToken(0, ['GG', 2], 0, function () {\n return this.isoWeekYear() % 100;\n });\n\n function addWeekYearFormatToken(token, getter) {\n addFormatToken(0, [token, token.length], 0, getter);\n }\n\n addWeekYearFormatToken('gggg', 'weekYear');\n addWeekYearFormatToken('ggggg', 'weekYear');\n addWeekYearFormatToken('GGGG', 'isoWeekYear');\n addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n // ALIASES\n\n addUnitAlias('weekYear', 'gg');\n addUnitAlias('isoWeekYear', 'GG');\n\n // PRIORITY\n\n addUnitPriority('weekYear', 1);\n addUnitPriority('isoWeekYear', 1);\n\n // PARSING\n\n addRegexToken('G', matchSigned);\n addRegexToken('g', matchSigned);\n addRegexToken('GG', match1to2, match2);\n addRegexToken('gg', match1to2, match2);\n addRegexToken('GGGG', match1to4, match4);\n addRegexToken('gggg', match1to4, match4);\n addRegexToken('GGGGG', match1to6, match6);\n addRegexToken('ggggg', match1to6, match6);\n\n addWeekParseToken(\n ['gggg', 'ggggg', 'GGGG', 'GGGGG'],\n function (input, week, config, token) {\n week[token.substr(0, 2)] = toInt(input);\n }\n );\n\n addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n week[token] = hooks.parseTwoDigitYear(input);\n });\n\n // MOMENTS\n\n function getSetWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.week(),\n this.weekday(),\n this.localeData()._week.dow,\n this.localeData()._week.doy\n );\n }\n\n function getSetISOWeekYear(input) {\n return getSetWeekYearHelper.call(\n this,\n input,\n this.isoWeek(),\n this.isoWeekday(),\n 1,\n 4\n );\n }\n\n function getISOWeeksInYear() {\n return weeksInYear(this.year(), 1, 4);\n }\n\n function getISOWeeksInISOWeekYear() {\n return weeksInYear(this.isoWeekYear(), 1, 4);\n }\n\n function getWeeksInYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n }\n\n function getWeeksInWeekYear() {\n var weekInfo = this.localeData()._week;\n return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);\n }\n\n function getSetWeekYearHelper(input, week, weekday, dow, doy) {\n var weeksTarget;\n if (input == null) {\n return weekOfYear(this, dow, doy).year;\n } else {\n weeksTarget = weeksInYear(input, dow, doy);\n if (week > weeksTarget) {\n week = weeksTarget;\n }\n return setWeekAll.call(this, input, week, weekday, dow, doy);\n }\n }\n\n function setWeekAll(weekYear, week, weekday, dow, doy) {\n var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),\n date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);\n\n this.year(date.getUTCFullYear());\n this.month(date.getUTCMonth());\n this.date(date.getUTCDate());\n return this;\n }\n\n // FORMATTING\n\n addFormatToken('Q', 0, 'Qo', 'quarter');\n\n // ALIASES\n\n addUnitAlias('quarter', 'Q');\n\n // PRIORITY\n\n addUnitPriority('quarter', 7);\n\n // PARSING\n\n addRegexToken('Q', match1);\n addParseToken('Q', function (input, array) {\n array[MONTH] = (toInt(input) - 1) * 3;\n });\n\n // MOMENTS\n\n function getSetQuarter(input) {\n return input == null\n ? Math.ceil((this.month() + 1) / 3)\n : this.month((input - 1) * 3 + (this.month() % 3));\n }\n\n // FORMATTING\n\n addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n // ALIASES\n\n addUnitAlias('date', 'D');\n\n // PRIORITY\n addUnitPriority('date', 9);\n\n // PARSING\n\n addRegexToken('D', match1to2);\n addRegexToken('DD', match1to2, match2);\n addRegexToken('Do', function (isStrict, locale) {\n // TODO: Remove \"ordinalParse\" fallback in next major release.\n return isStrict\n ? locale._dayOfMonthOrdinalParse || locale._ordinalParse\n : locale._dayOfMonthOrdinalParseLenient;\n });\n\n addParseToken(['D', 'DD'], DATE);\n addParseToken('Do', function (input, array) {\n array[DATE] = toInt(input.match(match1to2)[0]);\n });\n\n // MOMENTS\n\n var getSetDayOfMonth = makeGetSet('Date', true);\n\n // FORMATTING\n\n addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n // ALIASES\n\n addUnitAlias('dayOfYear', 'DDD');\n\n // PRIORITY\n addUnitPriority('dayOfYear', 4);\n\n // PARSING\n\n addRegexToken('DDD', match1to3);\n addRegexToken('DDDD', match3);\n addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n config._dayOfYear = toInt(input);\n });\n\n // HELPERS\n\n // MOMENTS\n\n function getSetDayOfYear(input) {\n var dayOfYear =\n Math.round(\n (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5\n ) + 1;\n return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');\n }\n\n // FORMATTING\n\n addFormatToken('m', ['mm', 2], 0, 'minute');\n\n // ALIASES\n\n addUnitAlias('minute', 'm');\n\n // PRIORITY\n\n addUnitPriority('minute', 14);\n\n // PARSING\n\n addRegexToken('m', match1to2);\n addRegexToken('mm', match1to2, match2);\n addParseToken(['m', 'mm'], MINUTE);\n\n // MOMENTS\n\n var getSetMinute = makeGetSet('Minutes', false);\n\n // FORMATTING\n\n addFormatToken('s', ['ss', 2], 0, 'second');\n\n // ALIASES\n\n addUnitAlias('second', 's');\n\n // PRIORITY\n\n addUnitPriority('second', 15);\n\n // PARSING\n\n addRegexToken('s', match1to2);\n addRegexToken('ss', match1to2, match2);\n addParseToken(['s', 'ss'], SECOND);\n\n // MOMENTS\n\n var getSetSecond = makeGetSet('Seconds', false);\n\n // FORMATTING\n\n addFormatToken('S', 0, 0, function () {\n return ~~(this.millisecond() / 100);\n });\n\n addFormatToken(0, ['SS', 2], 0, function () {\n return ~~(this.millisecond() / 10);\n });\n\n addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n addFormatToken(0, ['SSSS', 4], 0, function () {\n return this.millisecond() * 10;\n });\n addFormatToken(0, ['SSSSS', 5], 0, function () {\n return this.millisecond() * 100;\n });\n addFormatToken(0, ['SSSSSS', 6], 0, function () {\n return this.millisecond() * 1000;\n });\n addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n return this.millisecond() * 10000;\n });\n addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n return this.millisecond() * 100000;\n });\n addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n return this.millisecond() * 1000000;\n });\n\n // ALIASES\n\n addUnitAlias('millisecond', 'ms');\n\n // PRIORITY\n\n addUnitPriority('millisecond', 16);\n\n // PARSING\n\n addRegexToken('S', match1to3, match1);\n addRegexToken('SS', match1to3, match2);\n addRegexToken('SSS', match1to3, match3);\n\n var token, getSetMillisecond;\n for (token = 'SSSS'; token.length <= 9; token += 'S') {\n addRegexToken(token, matchUnsigned);\n }\n\n function parseMs(input, array) {\n array[MILLISECOND] = toInt(('0.' + input) * 1000);\n }\n\n for (token = 'S'; token.length <= 9; token += 'S') {\n addParseToken(token, parseMs);\n }\n\n getSetMillisecond = makeGetSet('Milliseconds', false);\n\n // FORMATTING\n\n addFormatToken('z', 0, 0, 'zoneAbbr');\n addFormatToken('zz', 0, 0, 'zoneName');\n\n // MOMENTS\n\n function getZoneAbbr() {\n return this._isUTC ? 'UTC' : '';\n }\n\n function getZoneName() {\n return this._isUTC ? 'Coordinated Universal Time' : '';\n }\n\n var proto = Moment.prototype;\n\n proto.add = add;\n proto.calendar = calendar$1;\n proto.clone = clone;\n proto.diff = diff;\n proto.endOf = endOf;\n proto.format = format;\n proto.from = from;\n proto.fromNow = fromNow;\n proto.to = to;\n proto.toNow = toNow;\n proto.get = stringGet;\n proto.invalidAt = invalidAt;\n proto.isAfter = isAfter;\n proto.isBefore = isBefore;\n proto.isBetween = isBetween;\n proto.isSame = isSame;\n proto.isSameOrAfter = isSameOrAfter;\n proto.isSameOrBefore = isSameOrBefore;\n proto.isValid = isValid$2;\n proto.lang = lang;\n proto.locale = locale;\n proto.localeData = localeData;\n proto.max = prototypeMax;\n proto.min = prototypeMin;\n proto.parsingFlags = parsingFlags;\n proto.set = stringSet;\n proto.startOf = startOf;\n proto.subtract = subtract;\n proto.toArray = toArray;\n proto.toObject = toObject;\n proto.toDate = toDate;\n proto.toISOString = toISOString;\n proto.inspect = inspect;\n if (typeof Symbol !== 'undefined' && Symbol.for != null) {\n proto[Symbol.for('nodejs.util.inspect.custom')] = function () {\n return 'Moment<' + this.format() + '>';\n };\n }\n proto.toJSON = toJSON;\n proto.toString = toString;\n proto.unix = unix;\n proto.valueOf = valueOf;\n proto.creationData = creationData;\n proto.eraName = getEraName;\n proto.eraNarrow = getEraNarrow;\n proto.eraAbbr = getEraAbbr;\n proto.eraYear = getEraYear;\n proto.year = getSetYear;\n proto.isLeapYear = getIsLeapYear;\n proto.weekYear = getSetWeekYear;\n proto.isoWeekYear = getSetISOWeekYear;\n proto.quarter = proto.quarters = getSetQuarter;\n proto.month = getSetMonth;\n proto.daysInMonth = getDaysInMonth;\n proto.week = proto.weeks = getSetWeek;\n proto.isoWeek = proto.isoWeeks = getSetISOWeek;\n proto.weeksInYear = getWeeksInYear;\n proto.weeksInWeekYear = getWeeksInWeekYear;\n proto.isoWeeksInYear = getISOWeeksInYear;\n proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;\n proto.date = getSetDayOfMonth;\n proto.day = proto.days = getSetDayOfWeek;\n proto.weekday = getSetLocaleDayOfWeek;\n proto.isoWeekday = getSetISODayOfWeek;\n proto.dayOfYear = getSetDayOfYear;\n proto.hour = proto.hours = getSetHour;\n proto.minute = proto.minutes = getSetMinute;\n proto.second = proto.seconds = getSetSecond;\n proto.millisecond = proto.milliseconds = getSetMillisecond;\n proto.utcOffset = getSetOffset;\n proto.utc = setOffsetToUTC;\n proto.local = setOffsetToLocal;\n proto.parseZone = setOffsetToParsedOffset;\n proto.hasAlignedHourOffset = hasAlignedHourOffset;\n proto.isDST = isDaylightSavingTime;\n proto.isLocal = isLocal;\n proto.isUtcOffset = isUtcOffset;\n proto.isUtc = isUtc;\n proto.isUTC = isUtc;\n proto.zoneAbbr = getZoneAbbr;\n proto.zoneName = getZoneName;\n proto.dates = deprecate(\n 'dates accessor is deprecated. Use date instead.',\n getSetDayOfMonth\n );\n proto.months = deprecate(\n 'months accessor is deprecated. Use month instead',\n getSetMonth\n );\n proto.years = deprecate(\n 'years accessor is deprecated. Use year instead',\n getSetYear\n );\n proto.zone = deprecate(\n 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',\n getSetZone\n );\n proto.isDSTShifted = deprecate(\n 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',\n isDaylightSavingTimeShifted\n );\n\n function createUnix(input) {\n return createLocal(input * 1000);\n }\n\n function createInZone() {\n return createLocal.apply(null, arguments).parseZone();\n }\n\n function preParsePostFormat(string) {\n return string;\n }\n\n var proto$1 = Locale.prototype;\n\n proto$1.calendar = calendar;\n proto$1.longDateFormat = longDateFormat;\n proto$1.invalidDate = invalidDate;\n proto$1.ordinal = ordinal;\n proto$1.preparse = preParsePostFormat;\n proto$1.postformat = preParsePostFormat;\n proto$1.relativeTime = relativeTime;\n proto$1.pastFuture = pastFuture;\n proto$1.set = set;\n proto$1.eras = localeEras;\n proto$1.erasParse = localeErasParse;\n proto$1.erasConvertYear = localeErasConvertYear;\n proto$1.erasAbbrRegex = erasAbbrRegex;\n proto$1.erasNameRegex = erasNameRegex;\n proto$1.erasNarrowRegex = erasNarrowRegex;\n\n proto$1.months = localeMonths;\n proto$1.monthsShort = localeMonthsShort;\n proto$1.monthsParse = localeMonthsParse;\n proto$1.monthsRegex = monthsRegex;\n proto$1.monthsShortRegex = monthsShortRegex;\n proto$1.week = localeWeek;\n proto$1.firstDayOfYear = localeFirstDayOfYear;\n proto$1.firstDayOfWeek = localeFirstDayOfWeek;\n\n proto$1.weekdays = localeWeekdays;\n proto$1.weekdaysMin = localeWeekdaysMin;\n proto$1.weekdaysShort = localeWeekdaysShort;\n proto$1.weekdaysParse = localeWeekdaysParse;\n\n proto$1.weekdaysRegex = weekdaysRegex;\n proto$1.weekdaysShortRegex = weekdaysShortRegex;\n proto$1.weekdaysMinRegex = weekdaysMinRegex;\n\n proto$1.isPM = localeIsPM;\n proto$1.meridiem = localeMeridiem;\n\n function get$1(format, index, field, setter) {\n var locale = getLocale(),\n utc = createUTC().set(setter, index);\n return locale[field](utc, format);\n }\n\n function listMonthsImpl(format, index, field) {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n\n if (index != null) {\n return get$1(format, index, field, 'month');\n }\n\n var i,\n out = [];\n for (i = 0; i < 12; i++) {\n out[i] = get$1(format, i, field, 'month');\n }\n return out;\n }\n\n // ()\n // (5)\n // (fmt, 5)\n // (fmt)\n // (true)\n // (true, 5)\n // (true, fmt, 5)\n // (true, fmt)\n function listWeekdaysImpl(localeSorted, format, index, field) {\n if (typeof localeSorted === 'boolean') {\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n } else {\n format = localeSorted;\n index = format;\n localeSorted = false;\n\n if (isNumber(format)) {\n index = format;\n format = undefined;\n }\n\n format = format || '';\n }\n\n var locale = getLocale(),\n shift = localeSorted ? locale._week.dow : 0,\n i,\n out = [];\n\n if (index != null) {\n return get$1(format, (index + shift) % 7, field, 'day');\n }\n\n for (i = 0; i < 7; i++) {\n out[i] = get$1(format, (i + shift) % 7, field, 'day');\n }\n return out;\n }\n\n function listMonths(format, index) {\n return listMonthsImpl(format, index, 'months');\n }\n\n function listMonthsShort(format, index) {\n return listMonthsImpl(format, index, 'monthsShort');\n }\n\n function listWeekdays(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdays');\n }\n\n function listWeekdaysShort(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');\n }\n\n function listWeekdaysMin(localeSorted, format, index) {\n return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');\n }\n\n getSetGlobalLocale('en', {\n eras: [\n {\n since: '0001-01-01',\n until: +Infinity,\n offset: 1,\n name: 'Anno Domini',\n narrow: 'AD',\n abbr: 'AD',\n },\n {\n since: '0000-12-31',\n until: -Infinity,\n offset: 1,\n name: 'Before Christ',\n narrow: 'BC',\n abbr: 'BC',\n },\n ],\n dayOfMonthOrdinalParse: /\\d{1,2}(th|st|nd|rd)/,\n ordinal: function (number) {\n var b = number % 10,\n output =\n toInt((number % 100) / 10) === 1\n ? 'th'\n : b === 1\n ? 'st'\n : b === 2\n ? 'nd'\n : b === 3\n ? 'rd'\n : 'th';\n return number + output;\n },\n });\n\n // Side effect imports\n\n hooks.lang = deprecate(\n 'moment.lang is deprecated. Use moment.locale instead.',\n getSetGlobalLocale\n );\n hooks.langData = deprecate(\n 'moment.langData is deprecated. Use moment.localeData instead.',\n getLocale\n );\n\n var mathAbs = Math.abs;\n\n function abs() {\n var data = this._data;\n\n this._milliseconds = mathAbs(this._milliseconds);\n this._days = mathAbs(this._days);\n this._months = mathAbs(this._months);\n\n data.milliseconds = mathAbs(data.milliseconds);\n data.seconds = mathAbs(data.seconds);\n data.minutes = mathAbs(data.minutes);\n data.hours = mathAbs(data.hours);\n data.months = mathAbs(data.months);\n data.years = mathAbs(data.years);\n\n return this;\n }\n\n function addSubtract$1(duration, input, value, direction) {\n var other = createDuration(input, value);\n\n duration._milliseconds += direction * other._milliseconds;\n duration._days += direction * other._days;\n duration._months += direction * other._months;\n\n return duration._bubble();\n }\n\n // supports only 2.0-style add(1, 's') or add(duration)\n function add$1(input, value) {\n return addSubtract$1(this, input, value, 1);\n }\n\n // supports only 2.0-style subtract(1, 's') or subtract(duration)\n function subtract$1(input, value) {\n return addSubtract$1(this, input, value, -1);\n }\n\n function absCeil(number) {\n if (number < 0) {\n return Math.floor(number);\n } else {\n return Math.ceil(number);\n }\n }\n\n function bubble() {\n var milliseconds = this._milliseconds,\n days = this._days,\n months = this._months,\n data = this._data,\n seconds,\n minutes,\n hours,\n years,\n monthsFromDays;\n\n // if we have a mix of positive and negative values, bubble down first\n // check: https://github.com/moment/moment/issues/2166\n if (\n !(\n (milliseconds >= 0 && days >= 0 && months >= 0) ||\n (milliseconds <= 0 && days <= 0 && months <= 0)\n )\n ) {\n milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n days = 0;\n months = 0;\n }\n\n // The following code bubbles up values, see the tests for\n // examples of what that means.\n data.milliseconds = milliseconds % 1000;\n\n seconds = absFloor(milliseconds / 1000);\n data.seconds = seconds % 60;\n\n minutes = absFloor(seconds / 60);\n data.minutes = minutes % 60;\n\n hours = absFloor(minutes / 60);\n data.hours = hours % 24;\n\n days += absFloor(hours / 24);\n\n // convert days to months\n monthsFromDays = absFloor(daysToMonths(days));\n months += monthsFromDays;\n days -= absCeil(monthsToDays(monthsFromDays));\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n data.days = days;\n data.months = months;\n data.years = years;\n\n return this;\n }\n\n function daysToMonths(days) {\n // 400 years have 146097 days (taking into account leap year rules)\n // 400 years have 12 months === 4800\n return (days * 4800) / 146097;\n }\n\n function monthsToDays(months) {\n // the reverse of daysToMonths\n return (months * 146097) / 4800;\n }\n\n function as(units) {\n if (!this.isValid()) {\n return NaN;\n }\n var days,\n months,\n milliseconds = this._milliseconds;\n\n units = normalizeUnits(units);\n\n if (units === 'month' || units === 'quarter' || units === 'year') {\n days = this._days + milliseconds / 864e5;\n months = this._months + daysToMonths(days);\n switch (units) {\n case 'month':\n return months;\n case 'quarter':\n return months / 3;\n case 'year':\n return months / 12;\n }\n } else {\n // handle milliseconds separately because of floating point math errors (issue #1867)\n days = this._days + Math.round(monthsToDays(this._months));\n switch (units) {\n case 'week':\n return days / 7 + milliseconds / 6048e5;\n case 'day':\n return days + milliseconds / 864e5;\n case 'hour':\n return days * 24 + milliseconds / 36e5;\n case 'minute':\n return days * 1440 + milliseconds / 6e4;\n case 'second':\n return days * 86400 + milliseconds / 1000;\n // Math.floor prevents floating point math errors here\n case 'millisecond':\n return Math.floor(days * 864e5) + milliseconds;\n default:\n throw new Error('Unknown unit ' + units);\n }\n }\n }\n\n // TODO: Use this.as('ms')?\n function valueOf$1() {\n if (!this.isValid()) {\n return NaN;\n }\n return (\n this._milliseconds +\n this._days * 864e5 +\n (this._months % 12) * 2592e6 +\n toInt(this._months / 12) * 31536e6\n );\n }\n\n function makeAs(alias) {\n return function () {\n return this.as(alias);\n };\n }\n\n var asMilliseconds = makeAs('ms'),\n asSeconds = makeAs('s'),\n asMinutes = makeAs('m'),\n asHours = makeAs('h'),\n asDays = makeAs('d'),\n asWeeks = makeAs('w'),\n asMonths = makeAs('M'),\n asQuarters = makeAs('Q'),\n asYears = makeAs('y');\n\n function clone$1() {\n return createDuration(this);\n }\n\n function get$2(units) {\n units = normalizeUnits(units);\n return this.isValid() ? this[units + 's']() : NaN;\n }\n\n function makeGetter(name) {\n return function () {\n return this.isValid() ? this._data[name] : NaN;\n };\n }\n\n var milliseconds = makeGetter('milliseconds'),\n seconds = makeGetter('seconds'),\n minutes = makeGetter('minutes'),\n hours = makeGetter('hours'),\n days = makeGetter('days'),\n months = makeGetter('months'),\n years = makeGetter('years');\n\n function weeks() {\n return absFloor(this.days() / 7);\n }\n\n var round = Math.round,\n thresholds = {\n ss: 44, // a few seconds to seconds\n s: 45, // seconds to minute\n m: 45, // minutes to hour\n h: 22, // hours to day\n d: 26, // days to month/week\n w: null, // weeks to month\n M: 11, // months to year\n };\n\n // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n }\n\n function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {\n var duration = createDuration(posNegDuration).abs(),\n seconds = round(duration.as('s')),\n minutes = round(duration.as('m')),\n hours = round(duration.as('h')),\n days = round(duration.as('d')),\n months = round(duration.as('M')),\n weeks = round(duration.as('w')),\n years = round(duration.as('y')),\n a =\n (seconds <= thresholds.ss && ['s', seconds]) ||\n (seconds < thresholds.s && ['ss', seconds]) ||\n (minutes <= 1 && ['m']) ||\n (minutes < thresholds.m && ['mm', minutes]) ||\n (hours <= 1 && ['h']) ||\n (hours < thresholds.h && ['hh', hours]) ||\n (days <= 1 && ['d']) ||\n (days < thresholds.d && ['dd', days]);\n\n if (thresholds.w != null) {\n a =\n a ||\n (weeks <= 1 && ['w']) ||\n (weeks < thresholds.w && ['ww', weeks]);\n }\n a = a ||\n (months <= 1 && ['M']) ||\n (months < thresholds.M && ['MM', months]) ||\n (years <= 1 && ['y']) || ['yy', years];\n\n a[2] = withoutSuffix;\n a[3] = +posNegDuration > 0;\n a[4] = locale;\n return substituteTimeAgo.apply(null, a);\n }\n\n // This function allows you to set the rounding function for relative time strings\n function getSetRelativeTimeRounding(roundingFunction) {\n if (roundingFunction === undefined) {\n return round;\n }\n if (typeof roundingFunction === 'function') {\n round = roundingFunction;\n return true;\n }\n return false;\n }\n\n // This function allows you to set a threshold for relative time strings\n function getSetRelativeTimeThreshold(threshold, limit) {\n if (thresholds[threshold] === undefined) {\n return false;\n }\n if (limit === undefined) {\n return thresholds[threshold];\n }\n thresholds[threshold] = limit;\n if (threshold === 's') {\n thresholds.ss = limit - 1;\n }\n return true;\n }\n\n function humanize(argWithSuffix, argThresholds) {\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var withSuffix = false,\n th = thresholds,\n locale,\n output;\n\n if (typeof argWithSuffix === 'object') {\n argThresholds = argWithSuffix;\n argWithSuffix = false;\n }\n if (typeof argWithSuffix === 'boolean') {\n withSuffix = argWithSuffix;\n }\n if (typeof argThresholds === 'object') {\n th = Object.assign({}, thresholds, argThresholds);\n if (argThresholds.s != null && argThresholds.ss == null) {\n th.ss = argThresholds.s - 1;\n }\n }\n\n locale = this.localeData();\n output = relativeTime$1(this, !withSuffix, th, locale);\n\n if (withSuffix) {\n output = locale.pastFuture(+this, output);\n }\n\n return locale.postformat(output);\n }\n\n var abs$1 = Math.abs;\n\n function sign(x) {\n return (x > 0) - (x < 0) || +x;\n }\n\n function toISOString$1() {\n // for ISO strings we do not use the normal bubbling rules:\n // * milliseconds bubble up until they become hours\n // * days do not bubble at all\n // * months bubble up until they become years\n // This is because there is no context-free conversion between hours and days\n // (think of clock changes)\n // and also not between days and months (28-31 days per month)\n if (!this.isValid()) {\n return this.localeData().invalidDate();\n }\n\n var seconds = abs$1(this._milliseconds) / 1000,\n days = abs$1(this._days),\n months = abs$1(this._months),\n minutes,\n hours,\n years,\n s,\n total = this.asSeconds(),\n totalSign,\n ymSign,\n daysSign,\n hmsSign;\n\n if (!total) {\n // this is the same as C#'s (Noda) and python (isodate)...\n // but not other JS (goog.date)\n return 'P0D';\n }\n\n // 3600 seconds -> 60 minutes -> 1 hour\n minutes = absFloor(seconds / 60);\n hours = absFloor(minutes / 60);\n seconds %= 60;\n minutes %= 60;\n\n // 12 months -> 1 year\n years = absFloor(months / 12);\n months %= 12;\n\n // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n s = seconds ? seconds.toFixed(3).replace(/\\.?0+$/, '') : '';\n\n totalSign = total < 0 ? '-' : '';\n ymSign = sign(this._months) !== sign(total) ? '-' : '';\n daysSign = sign(this._days) !== sign(total) ? '-' : '';\n hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';\n\n return (\n totalSign +\n 'P' +\n (years ? ymSign + years + 'Y' : '') +\n (months ? ymSign + months + 'M' : '') +\n (days ? daysSign + days + 'D' : '') +\n (hours || minutes || seconds ? 'T' : '') +\n (hours ? hmsSign + hours + 'H' : '') +\n (minutes ? hmsSign + minutes + 'M' : '') +\n (seconds ? hmsSign + s + 'S' : '')\n );\n }\n\n var proto$2 = Duration.prototype;\n\n proto$2.isValid = isValid$1;\n proto$2.abs = abs;\n proto$2.add = add$1;\n proto$2.subtract = subtract$1;\n proto$2.as = as;\n proto$2.asMilliseconds = asMilliseconds;\n proto$2.asSeconds = asSeconds;\n proto$2.asMinutes = asMinutes;\n proto$2.asHours = asHours;\n proto$2.asDays = asDays;\n proto$2.asWeeks = asWeeks;\n proto$2.asMonths = asMonths;\n proto$2.asQuarters = asQuarters;\n proto$2.asYears = asYears;\n proto$2.valueOf = valueOf$1;\n proto$2._bubble = bubble;\n proto$2.clone = clone$1;\n proto$2.get = get$2;\n proto$2.milliseconds = milliseconds;\n proto$2.seconds = seconds;\n proto$2.minutes = minutes;\n proto$2.hours = hours;\n proto$2.days = days;\n proto$2.weeks = weeks;\n proto$2.months = months;\n proto$2.years = years;\n proto$2.humanize = humanize;\n proto$2.toISOString = toISOString$1;\n proto$2.toString = toISOString$1;\n proto$2.toJSON = toISOString$1;\n proto$2.locale = locale;\n proto$2.localeData = localeData;\n\n proto$2.toIsoString = deprecate(\n 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',\n toISOString$1\n );\n proto$2.lang = lang;\n\n // FORMATTING\n\n addFormatToken('X', 0, 0, 'unix');\n addFormatToken('x', 0, 0, 'valueOf');\n\n // PARSING\n\n addRegexToken('x', matchSigned);\n addRegexToken('X', matchTimestamp);\n addParseToken('X', function (input, array, config) {\n config._d = new Date(parseFloat(input) * 1000);\n });\n addParseToken('x', function (input, array, config) {\n config._d = new Date(toInt(input));\n });\n\n //! moment.js\n\n hooks.version = '2.29.4';\n\n setHookCallback(createLocal);\n\n hooks.fn = proto;\n hooks.min = min;\n hooks.max = max;\n hooks.now = now;\n hooks.utc = createUTC;\n hooks.unix = createUnix;\n hooks.months = listMonths;\n hooks.isDate = isDate;\n hooks.locale = getSetGlobalLocale;\n hooks.invalid = createInvalid;\n hooks.duration = createDuration;\n hooks.isMoment = isMoment;\n hooks.weekdays = listWeekdays;\n hooks.parseZone = createInZone;\n hooks.localeData = getLocale;\n hooks.isDuration = isDuration;\n hooks.monthsShort = listMonthsShort;\n hooks.weekdaysMin = listWeekdaysMin;\n hooks.defineLocale = defineLocale;\n hooks.updateLocale = updateLocale;\n hooks.locales = listLocales;\n hooks.weekdaysShort = listWeekdaysShort;\n hooks.normalizeUnits = normalizeUnits;\n hooks.relativeTimeRounding = getSetRelativeTimeRounding;\n hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;\n hooks.calendarFormat = getCalendarFormat;\n hooks.prototype = proto;\n\n // currently HTML5 input type only supports 24-hour formats\n hooks.HTML5_FMT = {\n DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // \n DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // \n DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // \n DATE: 'YYYY-MM-DD', // \n TIME: 'HH:mm', // \n TIME_SECONDS: 'HH:mm:ss', // \n TIME_MS: 'HH:mm:ss.SSS', // \n WEEK: 'GGGG-[W]WW', // \n MONTH: 'YYYY-MM', // \n };\n\n return hooks;\n\n})));\n","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","/* MIT license */\nvar colorNames = require('color-name');\nvar swizzle = require('simple-swizzle');\nvar hasOwnProperty = Object.hasOwnProperty;\n\nvar reverseNames = Object.create(null);\n\n// create a list of reverse color names\nfor (var name in colorNames) {\n\tif (hasOwnProperty.call(colorNames, name)) {\n\t\treverseNames[colorNames[name]] = name;\n\t}\n}\n\nvar cs = module.exports = {\n\tto: {},\n\tget: {}\n};\n\ncs.get = function (string) {\n\tvar prefix = string.substring(0, 3).toLowerCase();\n\tvar val;\n\tvar model;\n\tswitch (prefix) {\n\t\tcase 'hsl':\n\t\t\tval = cs.get.hsl(string);\n\t\t\tmodel = 'hsl';\n\t\t\tbreak;\n\t\tcase 'hwb':\n\t\t\tval = cs.get.hwb(string);\n\t\t\tmodel = 'hwb';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tval = cs.get.rgb(string);\n\t\t\tmodel = 'rgb';\n\t\t\tbreak;\n\t}\n\n\tif (!val) {\n\t\treturn null;\n\t}\n\n\treturn {model: model, value: val};\n};\n\ncs.get.rgb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar abbr = /^#([a-f0-9]{3,4})$/i;\n\tvar hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;\n\tvar rgba = /^rgba?\\(\\s*([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)(?=[\\s,])\\s*(?:,\\s*)?([+-]?\\d+)\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar per = /^rgba?\\(\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*,?\\s*([+-]?[\\d\\.]+)\\%\\s*(?:[,|\\/]\\s*([+-]?[\\d\\.]+)(%?)\\s*)?\\)$/;\n\tvar keyword = /^(\\w+)$/;\n\n\tvar rgb = [0, 0, 0, 1];\n\tvar match;\n\tvar i;\n\tvar hexAlpha;\n\n\tif (match = string.match(hex)) {\n\t\thexAlpha = match[2];\n\t\tmatch = match[1];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\t// https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19\n\t\t\tvar i2 = i * 2;\n\t\t\trgb[i] = parseInt(match.slice(i2, i2 + 2), 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(abbr)) {\n\t\tmatch = match[1];\n\t\thexAlpha = match[3];\n\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i] + match[i], 16);\n\t\t}\n\n\t\tif (hexAlpha) {\n\t\t\trgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255;\n\t\t}\n\t} else if (match = string.match(rgba)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = parseInt(match[i + 1], 0);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(per)) {\n\t\tfor (i = 0; i < 3; i++) {\n\t\t\trgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55);\n\t\t}\n\n\t\tif (match[4]) {\n\t\t\tif (match[5]) {\n\t\t\t\trgb[3] = parseFloat(match[4]) * 0.01;\n\t\t\t} else {\n\t\t\t\trgb[3] = parseFloat(match[4]);\n\t\t\t}\n\t\t}\n\t} else if (match = string.match(keyword)) {\n\t\tif (match[1] === 'transparent') {\n\t\t\treturn [0, 0, 0, 0];\n\t\t}\n\n\t\tif (!hasOwnProperty.call(colorNames, match[1])) {\n\t\t\treturn null;\n\t\t}\n\n\t\trgb = colorNames[match[1]];\n\t\trgb[3] = 1;\n\n\t\treturn rgb;\n\t} else {\n\t\treturn null;\n\t}\n\n\tfor (i = 0; i < 3; i++) {\n\t\trgb[i] = clamp(rgb[i], 0, 255);\n\t}\n\trgb[3] = clamp(rgb[3], 0, 1);\n\n\treturn rgb;\n};\n\ncs.get.hsl = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hsl = /^hsla?\\(\\s*([+-]?(?:\\d{0,3}\\.)?\\d+)(?:deg)?\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*,?\\s*([+-]?[\\d\\.]+)%\\s*(?:[,|\\/]\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hsl);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar s = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar l = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\n\t\treturn [h, s, l, a];\n\t}\n\n\treturn null;\n};\n\ncs.get.hwb = function (string) {\n\tif (!string) {\n\t\treturn null;\n\t}\n\n\tvar hwb = /^hwb\\(\\s*([+-]?\\d{0,3}(?:\\.\\d+)?)(?:deg)?\\s*,\\s*([+-]?[\\d\\.]+)%\\s*,\\s*([+-]?[\\d\\.]+)%\\s*(?:,\\s*([+-]?(?=\\.\\d|\\d)(?:0|[1-9]\\d*)?(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)\\s*)?\\)$/;\n\tvar match = string.match(hwb);\n\n\tif (match) {\n\t\tvar alpha = parseFloat(match[4]);\n\t\tvar h = ((parseFloat(match[1]) % 360) + 360) % 360;\n\t\tvar w = clamp(parseFloat(match[2]), 0, 100);\n\t\tvar b = clamp(parseFloat(match[3]), 0, 100);\n\t\tvar a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1);\n\t\treturn [h, w, b, a];\n\t}\n\n\treturn null;\n};\n\ncs.to.hex = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn (\n\t\t'#' +\n\t\thexDouble(rgba[0]) +\n\t\thexDouble(rgba[1]) +\n\t\thexDouble(rgba[2]) +\n\t\t(rgba[3] < 1\n\t\t\t? (hexDouble(Math.round(rgba[3] * 255)))\n\t\t\t: '')\n\t);\n};\n\ncs.to.rgb = function () {\n\tvar rgba = swizzle(arguments);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ')'\n\t\t: 'rgba(' + Math.round(rgba[0]) + ', ' + Math.round(rgba[1]) + ', ' + Math.round(rgba[2]) + ', ' + rgba[3] + ')';\n};\n\ncs.to.rgb.percent = function () {\n\tvar rgba = swizzle(arguments);\n\n\tvar r = Math.round(rgba[0] / 255 * 100);\n\tvar g = Math.round(rgba[1] / 255 * 100);\n\tvar b = Math.round(rgba[2] / 255 * 100);\n\n\treturn rgba.length < 4 || rgba[3] === 1\n\t\t? 'rgb(' + r + '%, ' + g + '%, ' + b + '%)'\n\t\t: 'rgba(' + r + '%, ' + g + '%, ' + b + '%, ' + rgba[3] + ')';\n};\n\ncs.to.hsl = function () {\n\tvar hsla = swizzle(arguments);\n\treturn hsla.length < 4 || hsla[3] === 1\n\t\t? 'hsl(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%)'\n\t\t: 'hsla(' + hsla[0] + ', ' + hsla[1] + '%, ' + hsla[2] + '%, ' + hsla[3] + ')';\n};\n\n// hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax\n// (hwb have alpha optional & 1 is default value)\ncs.to.hwb = function () {\n\tvar hwba = swizzle(arguments);\n\n\tvar a = '';\n\tif (hwba.length >= 4 && hwba[3] !== 1) {\n\t\ta = ', ' + hwba[3];\n\t}\n\n\treturn 'hwb(' + hwba[0] + ', ' + hwba[1] + '%, ' + hwba[2] + '%' + a + ')';\n};\n\ncs.to.keyword = function (rgb) {\n\treturn reverseNames[rgb.slice(0, 3)];\n};\n\n// helpers\nfunction clamp(num, min, max) {\n\treturn Math.min(Math.max(min, num), max);\n}\n\nfunction hexDouble(num) {\n\tvar str = Math.round(num).toString(16).toUpperCase();\n\treturn (str.length < 2) ? '0' + str : str;\n}\n","/*global window, global*/\nvar util = require(\"util\")\nvar assert = require(\"assert\")\nfunction now() { return new Date().getTime() }\n\nvar slice = Array.prototype.slice\nvar console\nvar times = {}\n\nif (typeof global !== \"undefined\" && global.console) {\n console = global.console\n} else if (typeof window !== \"undefined\" && window.console) {\n console = window.console\n} else {\n console = {}\n}\n\nvar functions = [\n [log, \"log\"],\n [info, \"info\"],\n [warn, \"warn\"],\n [error, \"error\"],\n [time, \"time\"],\n [timeEnd, \"timeEnd\"],\n [trace, \"trace\"],\n [dir, \"dir\"],\n [consoleAssert, \"assert\"]\n]\n\nfor (var i = 0; i < functions.length; i++) {\n var tuple = functions[i]\n var f = tuple[0]\n var name = tuple[1]\n\n if (!console[name]) {\n console[name] = f\n }\n}\n\nmodule.exports = console\n\nfunction log() {}\n\nfunction info() {\n console.log.apply(console, arguments)\n}\n\nfunction warn() {\n console.log.apply(console, arguments)\n}\n\nfunction error() {\n console.warn.apply(console, arguments)\n}\n\nfunction time(label) {\n times[label] = now()\n}\n\nfunction timeEnd(label) {\n var time = times[label]\n if (!time) {\n throw new Error(\"No such label: \" + label)\n }\n\n delete times[label]\n var duration = now() - time\n console.log(label + \": \" + duration + \"ms\")\n}\n\nfunction trace() {\n var err = new Error()\n err.name = \"Trace\"\n err.message = util.format.apply(null, arguments)\n console.error(err.stack)\n}\n\nfunction dir(object) {\n console.log(util.inspect(object) + \"\\n\")\n}\n\nfunction consoleAssert(expression) {\n if (!expression) {\n var arr = slice.call(arguments, 1)\n assert.ok(false, util.format.apply(null, arr))\n }\n}\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".PresetDateRangePicker_panel {\\n padding: 0 22px 11px\\n}\\n.PresetDateRangePicker_button {\\n position: relative;\\n height: 100%;\\n text-align: center;\\n background: 0 0;\\n border: 2px solid #00a699;\\n color: #00a699;\\n padding: 4px 12px;\\n margin-right: 8px;\\n font: inherit;\\n font-weight: 700;\\n line-height: normal;\\n overflow: visible;\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n cursor: pointer\\n}\\n.PresetDateRangePicker_button:active {\\n outline: 0\\n}\\n.PresetDateRangePicker_button__selected {\\n color: #fff;\\n background: #00a699\\n}\\n.SingleDatePickerInput {\\n display: inline-block;\\n background-color: #fff\\n}\\n.SingleDatePickerInput__withBorder {\\n border-radius: 2px;\\n border: 1px solid #dbdbdb\\n}\\n.SingleDatePickerInput__rtl {\\n direction: rtl\\n}\\n.SingleDatePickerInput__disabled {\\n background-color: #f2f2f2\\n}\\n.SingleDatePickerInput__block {\\n display: block\\n}\\n.SingleDatePickerInput__showClearDate {\\n padding-right: 30px\\n}\\n.SingleDatePickerInput_clearDate {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n padding: 10px;\\n margin: 0 10px 0 5px;\\n position: absolute;\\n right: 0;\\n top: 50%;\\n -webkit-transform: translateY(-50%);\\n -ms-transform: translateY(-50%);\\n transform: translateY(-50%)\\n}\\n.SingleDatePickerInput_clearDate__default:focus,\\n.SingleDatePickerInput_clearDate__default:hover {\\n background: #dbdbdb;\\n border-radius: 50%\\n}\\n.SingleDatePickerInput_clearDate__small {\\n padding: 6px\\n}\\n.SingleDatePickerInput_clearDate__hide {\\n visibility: hidden\\n}\\n.SingleDatePickerInput_clearDate_svg {\\n fill: #82888a;\\n height: 12px;\\n width: 15px;\\n vertical-align: middle\\n}\\n.SingleDatePickerInput_clearDate_svg__small {\\n height: 9px\\n}\\n.SingleDatePickerInput_calendarIcon {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n display: inline-block;\\n vertical-align: middle;\\n padding: 10px;\\n margin: 0 5px 0 10px\\n}\\n.SingleDatePickerInput_calendarIcon_svg {\\n fill: #82888a;\\n height: 15px;\\n width: 14px;\\n vertical-align: middle\\n}\\n.SingleDatePicker {\\n position: relative;\\n display: inline-block\\n}\\n.SingleDatePicker__block {\\n display: block\\n}\\n.SingleDatePicker_picker {\\n z-index: 1;\\n background-color: #fff;\\n position: absolute\\n}\\n.SingleDatePicker_picker__rtl {\\n direction: rtl\\n}\\n.SingleDatePicker_picker__directionLeft {\\n left: 0\\n}\\n.SingleDatePicker_picker__directionRight {\\n right: 0\\n}\\n.SingleDatePicker_picker__portal {\\n background-color: rgba(0,0,0,.3);\\n position: fixed;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 100%\\n}\\n.SingleDatePicker_picker__fullScreenPortal {\\n background-color: #fff\\n}\\n.SingleDatePicker_closeButton {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n position: absolute;\\n top: 0;\\n right: 0;\\n padding: 15px;\\n z-index: 2\\n}\\n.SingleDatePicker_closeButton:focus,\\n.SingleDatePicker_closeButton:hover {\\n color: darken(#cacccd,10%);\\n text-decoration: none\\n}\\n.SingleDatePicker_closeButton_svg {\\n height: 15px;\\n width: 15px;\\n fill: #cacccd\\n}\\n.DayPickerKeyboardShortcuts_buttonReset {\\n background: 0 0;\\n border: 0;\\n border-radius: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n padding: 0;\\n cursor: pointer;\\n font-size: 14px\\n}\\n.DayPickerKeyboardShortcuts_buttonReset:active {\\n outline: 0\\n}\\n.DayPickerKeyboardShortcuts_show {\\n width: 33px;\\n height: 26px;\\n position: absolute;\\n z-index: 2\\n}\\n.DayPickerKeyboardShortcuts_show::before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute\\n}\\n.DayPickerKeyboardShortcuts_show__bottomRight {\\n bottom: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__bottomRight::before {\\n border-top: 26px solid transparent;\\n border-right: 33px solid #00a699;\\n bottom: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__bottomRight:hover::before {\\n border-right: 33px solid #008489\\n}\\n.DayPickerKeyboardShortcuts_show__topRight {\\n top: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topRight::before {\\n border-bottom: 26px solid transparent;\\n border-right: 33px solid #00a699;\\n top: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topRight:hover::before {\\n border-right: 33px solid #008489\\n}\\n.DayPickerKeyboardShortcuts_show__topLeft {\\n top: 0;\\n left: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topLeft::before {\\n border-bottom: 26px solid transparent;\\n border-left: 33px solid #00a699;\\n top: 0;\\n left: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topLeft:hover::before {\\n border-left: 33px solid #008489\\n}\\n.DayPickerKeyboardShortcuts_showSpan {\\n color: #fff;\\n position: absolute\\n}\\n.DayPickerKeyboardShortcuts_showSpan__bottomRight {\\n bottom: 0;\\n right: 5px\\n}\\n.DayPickerKeyboardShortcuts_showSpan__topRight {\\n top: 1px;\\n right: 5px\\n}\\n.DayPickerKeyboardShortcuts_showSpan__topLeft {\\n top: 1px;\\n left: 5px\\n}\\n.DayPickerKeyboardShortcuts_panel {\\n overflow: auto;\\n background: #fff;\\n border: 1px solid #dbdbdb;\\n border-radius: 2px;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n right: 0;\\n left: 0;\\n z-index: 2;\\n padding: 22px;\\n margin: 33px;\\n text-align: left\\n}\\n.DayPickerKeyboardShortcuts_title {\\n font-size: 16px;\\n font-weight: 700;\\n margin: 0\\n}\\n.DayPickerKeyboardShortcuts_list {\\n list-style: none;\\n padding: 0;\\n font-size: 14px\\n}\\n.DayPickerKeyboardShortcuts_close {\\n position: absolute;\\n right: 22px;\\n top: 22px;\\n z-index: 2\\n}\\n.DayPickerKeyboardShortcuts_close:active {\\n outline: 0\\n}\\n.DayPickerKeyboardShortcuts_closeSvg {\\n height: 15px;\\n width: 15px;\\n fill: #cacccd\\n}\\n.DayPickerKeyboardShortcuts_closeSvg:focus,\\n.DayPickerKeyboardShortcuts_closeSvg:hover {\\n fill: #82888a\\n}\\n.CalendarDay {\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n cursor: pointer;\\n font-size: 14px;\\n text-align: center\\n}\\n.CalendarDay:active {\\n outline: 0\\n}\\n.CalendarDay__defaultCursor {\\n cursor: default\\n}\\n.CalendarDay__default {\\n border: 1px solid #e4e7e7;\\n color: #484848;\\n background: #fff\\n}\\n.CalendarDay__default:hover {\\n background: #e4e7e7;\\n border: 1px solid #e4e7e7;\\n color: inherit\\n}\\n.CalendarDay__hovered_offset {\\n background: #f4f5f5;\\n border: 1px double #e4e7e7;\\n color: inherit\\n}\\n.CalendarDay__outside {\\n border: 0;\\n background: #fff;\\n color: #484848\\n}\\n.CalendarDay__outside:hover {\\n border: 0\\n}\\n.CalendarDay__blocked_minimum_nights {\\n background: #fff;\\n border: 1px solid #eceeee;\\n color: #cacccd\\n}\\n.CalendarDay__blocked_minimum_nights:active,\\n.CalendarDay__blocked_minimum_nights:hover {\\n background: #fff;\\n color: #cacccd\\n}\\n.CalendarDay__highlighted_calendar {\\n background: #ffe8bc;\\n color: #484848\\n}\\n.CalendarDay__highlighted_calendar:active,\\n.CalendarDay__highlighted_calendar:hover {\\n background: #ffce71;\\n color: #484848\\n}\\n.CalendarDay__selected_span {\\n background: #66e2da;\\n border: 1px double #33dacd;\\n color: #fff\\n}\\n.CalendarDay__selected_span:active,\\n.CalendarDay__selected_span:hover {\\n background: #33dacd;\\n border: 1px double #33dacd;\\n color: #fff\\n}\\n.CalendarDay__selected,\\n.CalendarDay__selected:active,\\n.CalendarDay__selected:hover {\\n background: #00a699;\\n border: 1px double #00a699;\\n color: #fff\\n}\\n.CalendarDay__hovered_span,\\n.CalendarDay__hovered_span:hover {\\n background: #b2f1ec;\\n border: 1px double #80e8e0;\\n color: #007a87\\n}\\n.CalendarDay__hovered_span:active {\\n background: #80e8e0;\\n border: 1px double #80e8e0;\\n color: #007a87\\n}\\n.CalendarDay__blocked_calendar,\\n.CalendarDay__blocked_calendar:active,\\n.CalendarDay__blocked_calendar:hover {\\n background: #cacccd;\\n border: 1px solid #cacccd;\\n color: #82888a\\n}\\n.CalendarDay__blocked_out_of_range,\\n.CalendarDay__blocked_out_of_range:active,\\n.CalendarDay__blocked_out_of_range:hover {\\n background: #fff;\\n border: 1px solid #e4e7e7;\\n color: #cacccd\\n}\\n.CalendarDay__hovered_start_first_possible_end {\\n background: #eceeee;\\n border: 1px double #eceeee\\n}\\n.CalendarDay__hovered_start_blocked_min_nights {\\n background: #eceeee;\\n border: 1px double #e4e7e7\\n}\\n.CalendarMonth {\\n background: #fff;\\n text-align: center;\\n vertical-align: top;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none\\n}\\n.CalendarMonth_table {\\n border-collapse: collapse;\\n border-spacing: 0\\n}\\n.CalendarMonth_verticalSpacing {\\n border-collapse: separate\\n}\\n.CalendarMonth_caption {\\n color: #484848;\\n font-size: 18px;\\n text-align: center;\\n padding-top: 22px;\\n padding-bottom: 37px;\\n caption-side: initial\\n}\\n.CalendarMonth_caption__verticalScrollable {\\n padding-top: 12px;\\n padding-bottom: 7px\\n}\\n.CalendarMonthGrid {\\n background: #fff;\\n text-align: left;\\n z-index: 0\\n}\\n.CalendarMonthGrid__animating {\\n z-index: 1\\n}\\n.CalendarMonthGrid__horizontal {\\n position: absolute;\\n left: 9px\\n}\\n.CalendarMonthGrid__vertical,\\n.CalendarMonthGrid__vertical_scrollable {\\n margin: 0 auto\\n}\\n.CalendarMonthGrid_month__horizontal {\\n display: inline-block;\\n vertical-align: top;\\n min-height: 100%\\n}\\n.CalendarMonthGrid_month__hideForAnimation {\\n position: absolute;\\n z-index: -1;\\n opacity: 0;\\n pointer-events: none\\n}\\n.CalendarMonthGrid_month__hidden {\\n visibility: hidden\\n}\\n.DayPickerNavigation {\\n position: relative;\\n z-index: 2\\n}\\n.DayPickerNavigation__horizontal {\\n height: 0\\n}\\n.DayPickerNavigation__verticalScrollable_prevNav {\\n z-index: 1\\n}\\n.DayPickerNavigation__verticalDefault {\\n position: absolute;\\n width: 100%;\\n height: 52px;\\n bottom: 0;\\n left: 0\\n}\\n.DayPickerNavigation__verticalScrollableDefault {\\n position: relative\\n}\\n.DayPickerNavigation__bottom {\\n height: auto\\n}\\n.DayPickerNavigation__bottomDefault {\\n -webkit-box-pack: justify;\\n -ms-flex-pack: justify;\\n display: -webkit-box;\\n display: -moz-box;\\n display: -ms-flexbox;\\n display: -webkit-flex;\\n display: flex;\\n -webkit-justify-content: space-between;\\n justify-content: space-between\\n}\\n.DayPickerNavigation_button {\\n cursor: pointer;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n border: 0;\\n padding: 0;\\n margin: 0\\n}\\n.DayPickerNavigation_button__default {\\n border: 1px solid #e4e7e7;\\n background-color: #fff;\\n color: #757575\\n}\\n.DayPickerNavigation_button__default:focus,\\n.DayPickerNavigation_button__default:hover {\\n border: 1px solid #c4c4c4\\n}\\n.DayPickerNavigation_button__default:active {\\n background: #f2f2f2\\n}\\n.DayPickerNavigation_button__disabled {\\n cursor: default;\\n border: 1px solid #f2f2f2\\n}\\n.DayPickerNavigation_button__disabled:focus,\\n.DayPickerNavigation_button__disabled:hover {\\n border: 1px solid #f2f2f2\\n}\\n.DayPickerNavigation_button__disabled:active {\\n background: 0 0\\n}\\n.DayPickerNavigation_button__horizontalDefault {\\n position: absolute;\\n top: 18px;\\n line-height: .78;\\n border-radius: 3px;\\n padding: 6px 9px\\n}\\n.DayPickerNavigation_bottomButton__horizontalDefault {\\n position: static;\\n margin: -10px 22px 30px\\n}\\n.DayPickerNavigation_leftButton__horizontalDefault {\\n left: 22px\\n}\\n.DayPickerNavigation_rightButton__horizontalDefault {\\n right: 22px\\n}\\n.DayPickerNavigation_button__verticalDefault {\\n padding: 5px;\\n background: #fff;\\n box-shadow: 0 0 5px 2px rgba(0,0,0,.1);\\n position: relative;\\n display: inline-block;\\n text-align: center;\\n height: 100%;\\n width: 50%\\n}\\n.DayPickerNavigation_nextButton__verticalDefault {\\n border-left: 0\\n}\\n.DayPickerNavigation_nextButton__verticalScrollableDefault,\\n.DayPickerNavigation_prevButton__verticalScrollableDefault {\\n width: 100%\\n}\\n.DayPickerNavigation_svg__horizontal {\\n height: 19px;\\n width: 19px;\\n fill: #82888a;\\n display: block\\n}\\n.DayPickerNavigation_svg__vertical {\\n height: 42px;\\n width: 42px;\\n fill: #484848\\n}\\n.DayPickerNavigation_svg__disabled {\\n fill: #f2f2f2\\n}\\n.DayPicker {\\n background: #fff;\\n position: relative;\\n text-align: left\\n}\\n.DayPicker__horizontal {\\n background: #fff\\n}\\n.DayPicker__verticalScrollable {\\n height: 100%\\n}\\n.DayPicker__hidden {\\n visibility: hidden\\n}\\n.DayPicker__withBorder {\\n box-shadow: 0 2px 6px rgba(0,0,0,.05),0 0 0 1px rgba(0,0,0,.07);\\n border-radius: 3px\\n}\\n.DayPicker_portal__horizontal {\\n box-shadow: none;\\n position: absolute;\\n left: 50%;\\n top: 50%\\n}\\n.DayPicker_portal__vertical {\\n position: initial\\n}\\n.DayPicker_focusRegion {\\n outline: 0\\n}\\n.DayPicker_calendarInfo__horizontal,\\n.DayPicker_wrapper__horizontal {\\n display: inline-block;\\n vertical-align: top\\n}\\n.DayPicker_weekHeaders {\\n position: relative\\n}\\n.DayPicker_weekHeaders__horizontal {\\n margin-left: 9px\\n}\\n.DayPicker_weekHeader {\\n color: #757575;\\n position: absolute;\\n top: 62px;\\n z-index: 2;\\n text-align: left\\n}\\n.DayPicker_weekHeader__vertical {\\n left: 50%\\n}\\n.DayPicker_weekHeader__verticalScrollable {\\n top: 0;\\n display: table-row;\\n border-bottom: 1px solid #dbdbdb;\\n background: #fff;\\n margin-left: 0;\\n left: 0;\\n width: 100%;\\n text-align: center\\n}\\n.DayPicker_weekHeader_ul {\\n list-style: none;\\n margin: 1px 0;\\n padding-left: 0;\\n padding-right: 0;\\n font-size: 14px\\n}\\n.DayPicker_weekHeader_li {\\n display: inline-block;\\n text-align: center\\n}\\n.DayPicker_transitionContainer {\\n position: relative;\\n overflow: hidden;\\n border-radius: 3px\\n}\\n.DayPicker_transitionContainer__horizontal {\\n -webkit-transition: height .2s ease-in-out;\\n -moz-transition: height .2s ease-in-out;\\n transition: height .2s ease-in-out\\n}\\n.DayPicker_transitionContainer__vertical {\\n width: 100%\\n}\\n.DayPicker_transitionContainer__verticalScrollable {\\n padding-top: 20px;\\n height: 100%;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n right: 0;\\n left: 0;\\n overflow-y: scroll\\n}\\n.DateInput {\\n margin: 0;\\n padding: 0;\\n background: #fff;\\n position: relative;\\n display: inline-block;\\n width: 130px;\\n vertical-align: middle\\n}\\n.DateInput__small {\\n width: 97px\\n}\\n.DateInput__block {\\n width: 100%\\n}\\n.DateInput__disabled {\\n background: #f2f2f2;\\n color: #dbdbdb\\n}\\n.DateInput_input {\\n font-weight: 200;\\n font-size: 19px;\\n line-height: 24px;\\n color: #484848;\\n background-color: #fff;\\n width: 100%;\\n padding: 11px 11px 9px;\\n border: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: 2px solid transparent;\\n border-left: 0;\\n border-radius: 0\\n}\\n.DateInput_input__small {\\n font-size: 15px;\\n line-height: 18px;\\n letter-spacing: .2px;\\n padding: 7px 7px 5px\\n}\\n.DateInput_input__regular {\\n font-weight: auto\\n}\\n.DateInput_input__readOnly {\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none\\n}\\n.DateInput_input__focused {\\n outline: 0;\\n background: #fff;\\n border: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: 2px solid #008489;\\n border-left: 0\\n}\\n.DateInput_input__disabled {\\n background: #f2f2f2;\\n font-style: italic\\n}\\n.DateInput_screenReaderMessage {\\n border: 0;\\n clip: rect(0,0,0,0);\\n height: 1px;\\n margin: -1px;\\n overflow: hidden;\\n padding: 0;\\n position: absolute;\\n width: 1px\\n}\\n.DateInput_fang {\\n position: absolute;\\n width: 20px;\\n height: 10px;\\n left: 22px;\\n z-index: 2\\n}\\n.DateInput_fangShape {\\n fill: #fff\\n}\\n.DateInput_fangStroke {\\n stroke: #dbdbdb;\\n fill: transparent\\n}\\n.DateRangePickerInput {\\n background-color: #fff;\\n display: inline-block\\n}\\n.DateRangePickerInput__disabled {\\n background: #f2f2f2\\n}\\n.DateRangePickerInput__withBorder {\\n border-radius: 2px;\\n border: 1px solid #dbdbdb\\n}\\n.DateRangePickerInput__rtl {\\n direction: rtl\\n}\\n.DateRangePickerInput__block {\\n display: block\\n}\\n.DateRangePickerInput__showClearDates {\\n padding-right: 30px\\n}\\n.DateRangePickerInput_arrow {\\n display: inline-block;\\n vertical-align: middle;\\n color: #484848\\n}\\n.DateRangePickerInput_arrow_svg {\\n vertical-align: middle;\\n fill: #484848;\\n height: 24px;\\n width: 24px\\n}\\n.DateRangePickerInput_clearDates {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n padding: 10px;\\n margin: 0 10px 0 5px;\\n position: absolute;\\n right: 0;\\n top: 50%;\\n -webkit-transform: translateY(-50%);\\n -ms-transform: translateY(-50%);\\n transform: translateY(-50%)\\n}\\n.DateRangePickerInput_clearDates__small {\\n padding: 6px\\n}\\n.DateRangePickerInput_clearDates_default:focus,\\n.DateRangePickerInput_clearDates_default:hover {\\n background: #dbdbdb;\\n border-radius: 50%\\n}\\n.DateRangePickerInput_clearDates__hide {\\n visibility: hidden\\n}\\n.DateRangePickerInput_clearDates_svg {\\n fill: #82888a;\\n height: 12px;\\n width: 15px;\\n vertical-align: middle\\n}\\n.DateRangePickerInput_clearDates_svg__small {\\n height: 9px\\n}\\n.DateRangePickerInput_calendarIcon {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n display: inline-block;\\n vertical-align: middle;\\n padding: 10px;\\n margin: 0 5px 0 10px\\n}\\n.DateRangePickerInput_calendarIcon_svg {\\n fill: #82888a;\\n height: 15px;\\n width: 14px;\\n vertical-align: middle\\n}\\n.DateRangePicker {\\n position: relative;\\n display: inline-block\\n}\\n.DateRangePicker__block {\\n display: block\\n}\\n.DateRangePicker_picker {\\n z-index: 1;\\n background-color: #fff;\\n position: absolute\\n}\\n.DateRangePicker_picker__rtl {\\n direction: rtl\\n}\\n.DateRangePicker_picker__directionLeft {\\n left: 0\\n}\\n.DateRangePicker_picker__directionRight {\\n right: 0\\n}\\n.DateRangePicker_picker__portal {\\n background-color: rgba(0,0,0,.3);\\n position: fixed;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 100%\\n}\\n.DateRangePicker_picker__fullScreenPortal {\\n background-color: #fff\\n}\\n.DateRangePicker_closeButton {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n position: absolute;\\n top: 0;\\n right: 0;\\n padding: 15px;\\n z-index: 2\\n}\\n.DateRangePicker_closeButton:focus,\\n.DateRangePicker_closeButton:hover {\\n color: darken(#cacccd,10%);\\n text-decoration: none\\n}\\n.DateRangePicker_closeButton_svg {\\n height: 15px;\\n width: 15px;\\n fill: #cacccd\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./node_modules/react-dates/lib/css/_datepicker.css\"],\"names\":[],\"mappings\":\"AAAA;EACE;AACF;AACA;EACE,kBAAkB;EAClB,YAAY;EACZ,kBAAkB;EAClB,eAAe;EACf,yBAAyB;EACzB,cAAc;EACd,iBAAiB;EACjB,iBAAiB;EACjB,aAAa;EACb,gBAAgB;EAChB,mBAAmB;EACnB,iBAAiB;EACjB,2BAA2B;EAC3B,sBAAsB;EACtB;AACF;AACA;EACE;AACF;AACA;EACE,WAAW;EACX;AACF;AACA;EACE,qBAAqB;EACrB;AACF;AACA;EACE,kBAAkB;EAClB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,eAAe;EACf,SAAS;EACT,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,oBAAoB;EACpB,kBAAkB;EAClB,QAAQ;EACR,QAAQ;EACR,mCAAmC;EACnC,+BAA+B;EAC/B;AACF;AACA;;EAEE,mBAAmB;EACnB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,aAAa;EACb,YAAY;EACZ,WAAW;EACX;AACF;AACA;EACE;AACF;AACA;EACE,eAAe;EACf,SAAS;EACT,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,qBAAqB;EACrB,sBAAsB;EACtB,aAAa;EACb;AACF;AACA;EACE,aAAa;EACb,YAAY;EACZ,WAAW;EACX;AACF;AACA;EACE,kBAAkB;EAClB;AACF;AACA;EACE;AACF;AACA;EACE,UAAU;EACV,sBAAsB;EACtB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,gCAAgC;EAChC,eAAe;EACf,MAAM;EACN,OAAO;EACP,YAAY;EACZ;AACF;AACA;EACE;AACF;AACA;EACE,eAAe;EACf,SAAS;EACT,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,MAAM;EACN,QAAQ;EACR,aAAa;EACb;AACF;AACA;;EAEE,0BAA0B;EAC1B;AACF;AACA;EACE,YAAY;EACZ,WAAW;EACX;AACF;AACA;EACE,eAAe;EACf,SAAS;EACT,gBAAgB;EAChB,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,UAAU;EACV,eAAe;EACf;AACF;AACA;EACE;AACF;AACA;EACE,WAAW;EACX,YAAY;EACZ,kBAAkB;EAClB;AACF;AACA;EACE,WAAW;EACX,cAAc;EACd;AACF;AACA;EACE,SAAS;EACT;AACF;AACA;EACE,kCAAkC;EAClC,gCAAgC;EAChC,SAAS;EACT;AACF;AACA;EACE;AACF;AACA;EACE,MAAM;EACN;AACF;AACA;EACE,qCAAqC;EACrC,gCAAgC;EAChC,MAAM;EACN;AACF;AACA;EACE;AACF;AACA;EACE,MAAM;EACN;AACF;AACA;EACE,qCAAqC;EACrC,+BAA+B;EAC/B,MAAM;EACN;AACF;AACA;EACE;AACF;AACA;EACE,WAAW;EACX;AACF;AACA;EACE,SAAS;EACT;AACF;AACA;EACE,QAAQ;EACR;AACF;AACA;EACE,QAAQ;EACR;AACF;AACA;EACE,cAAc;EACd,gBAAgB;EAChB,yBAAyB;EACzB,kBAAkB;EAClB,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,QAAQ;EACR,OAAO;EACP,UAAU;EACV,aAAa;EACb,YAAY;EACZ;AACF;AACA;EACE,eAAe;EACf,gBAAgB;EAChB;AACF;AACA;EACE,gBAAgB;EAChB,UAAU;EACV;AACF;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,SAAS;EACT;AACF;AACA;EACE;AACF;AACA;EACE,YAAY;EACZ,WAAW;EACX;AACF;AACA;;EAEE;AACF;AACA;EACE,2BAA2B;EAC3B,sBAAsB;EACtB,eAAe;EACf,eAAe;EACf;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,yBAAyB;EACzB,cAAc;EACd;AACF;AACA;EACE,mBAAmB;EACnB,yBAAyB;EACzB;AACF;AACA;EACE,mBAAmB;EACnB,0BAA0B;EAC1B;AACF;AACA;EACE,SAAS;EACT,gBAAgB;EAChB;AACF;AACA;EACE;AACF;AACA;EACE,gBAAgB;EAChB,yBAAyB;EACzB;AACF;AACA;;EAEE,gBAAgB;EAChB;AACF;AACA;EACE,mBAAmB;EACnB;AACF;AACA;;EAEE,mBAAmB;EACnB;AACF;AACA;EACE,mBAAmB;EACnB,0BAA0B;EAC1B;AACF;AACA;;EAEE,mBAAmB;EACnB,0BAA0B;EAC1B;AACF;AACA;;;EAGE,mBAAmB;EACnB,0BAA0B;EAC1B;AACF;AACA;;EAEE,mBAAmB;EACnB,0BAA0B;EAC1B;AACF;AACA;EACE,mBAAmB;EACnB,0BAA0B;EAC1B;AACF;AACA;;;EAGE,mBAAmB;EACnB,yBAAyB;EACzB;AACF;AACA;;;EAGE,gBAAgB;EAChB,yBAAyB;EACzB;AACF;AACA;EACE,mBAAmB;EACnB;AACF;AACA;EACE,mBAAmB;EACnB;AACF;AACA;EACE,gBAAgB;EAChB,kBAAkB;EAClB,mBAAmB;EACnB,yBAAyB;EACzB,sBAAsB;EACtB,qBAAqB;EACrB;AACF;AACA;EACE,yBAAyB;EACzB;AACF;AACA;EACE;AACF;AACA;EACE,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,iBAAiB;EACjB,oBAAoB;EACpB;AACF;AACA;EACE,iBAAiB;EACjB;AACF;AACA;EACE,gBAAgB;EAChB,gBAAgB;EAChB;AACF;AACA;EACE;AACF;AACA;EACE,kBAAkB;EAClB;AACF;AACA;;EAEE;AACF;AACA;EACE,qBAAqB;EACrB,mBAAmB;EACnB;AACF;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,UAAU;EACV;AACF;AACA;EACE;AACF;AACA;EACE,kBAAkB;EAClB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,SAAS;EACT;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,yBAAyB;EACzB,sBAAsB;EACtB,oBAAoB;EACpB,iBAAiB;EACjB,oBAAoB;EACpB,qBAAqB;EACrB,aAAa;EACb,sCAAsC;EACtC;AACF;AACA;EACE,eAAe;EACf,yBAAyB;EACzB,sBAAsB;EACtB,qBAAqB;EACrB,iBAAiB;EACjB,SAAS;EACT,UAAU;EACV;AACF;AACA;EACE,yBAAyB;EACzB,sBAAsB;EACtB;AACF;AACA;;EAEE;AACF;AACA;EACE;AACF;AACA;EACE,eAAe;EACf;AACF;AACA;;EAEE;AACF;AACA;EACE;AACF;AACA;EACE,kBAAkB;EAClB,SAAS;EACT,gBAAgB;EAChB,kBAAkB;EAClB;AACF;AACA;EACE,gBAAgB;EAChB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,YAAY;EACZ,gBAAgB;EAChB,sCAAsC;EACtC,kBAAkB;EAClB,qBAAqB;EACrB,kBAAkB;EAClB,YAAY;EACZ;AACF;AACA;EACE;AACF;AACA;;EAEE;AACF;AACA;EACE,YAAY;EACZ,WAAW;EACX,aAAa;EACb;AACF;AACA;EACE,YAAY;EACZ,WAAW;EACX;AACF;AACA;EACE;AACF;AACA;EACE,gBAAgB;EAChB,kBAAkB;EAClB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,+DAA+D;EAC/D;AACF;AACA;EACE,gBAAgB;EAChB,kBAAkB;EAClB,SAAS;EACT;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;;EAEE,qBAAqB;EACrB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,cAAc;EACd,kBAAkB;EAClB,SAAS;EACT,UAAU;EACV;AACF;AACA;EACE;AACF;AACA;EACE,MAAM;EACN,kBAAkB;EAClB,gCAAgC;EAChC,gBAAgB;EAChB,cAAc;EACd,OAAO;EACP,WAAW;EACX;AACF;AACA;EACE,gBAAgB;EAChB,aAAa;EACb,eAAe;EACf,gBAAgB;EAChB;AACF;AACA;EACE,qBAAqB;EACrB;AACF;AACA;EACE,kBAAkB;EAClB,gBAAgB;EAChB;AACF;AACA;EACE,0CAA0C;EAC1C,uCAAuC;EACvC;AACF;AACA;EACE;AACF;AACA;EACE,iBAAiB;EACjB,YAAY;EACZ,kBAAkB;EAClB,MAAM;EACN,SAAS;EACT,QAAQ;EACR,OAAO;EACP;AACF;AACA;EACE,SAAS;EACT,UAAU;EACV,gBAAgB;EAChB,kBAAkB;EAClB,qBAAqB;EACrB,YAAY;EACZ;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,mBAAmB;EACnB;AACF;AACA;EACE,gBAAgB;EAChB,eAAe;EACf,iBAAiB;EACjB,cAAc;EACd,sBAAsB;EACtB,WAAW;EACX,sBAAsB;EACtB,SAAS;EACT,aAAa;EACb,eAAe;EACf,oCAAoC;EACpC,cAAc;EACd;AACF;AACA;EACE,eAAe;EACf,iBAAiB;EACjB,oBAAoB;EACpB;AACF;AACA;EACE;AACF;AACA;EACE,yBAAyB;EACzB,sBAAsB;EACtB,qBAAqB;EACrB;AACF;AACA;EACE,UAAU;EACV,gBAAgB;EAChB,SAAS;EACT,aAAa;EACb,eAAe;EACf,gCAAgC;EAChC;AACF;AACA;EACE,mBAAmB;EACnB;AACF;AACA;EACE,SAAS;EACT,mBAAmB;EACnB,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,UAAU;EACV,kBAAkB;EAClB;AACF;AACA;EACE,kBAAkB;EAClB,WAAW;EACX,YAAY;EACZ,UAAU;EACV;AACF;AACA;EACE;AACF;AACA;EACE,eAAe;EACf;AACF;AACA;EACE,sBAAsB;EACtB;AACF;AACA;EACE;AACF;AACA;EACE,kBAAkB;EAClB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,qBAAqB;EACrB,sBAAsB;EACtB;AACF;AACA;EACE,sBAAsB;EACtB,aAAa;EACb,YAAY;EACZ;AACF;AACA;EACE,eAAe;EACf,SAAS;EACT,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,aAAa;EACb,oBAAoB;EACpB,kBAAkB;EAClB,QAAQ;EACR,QAAQ;EACR,mCAAmC;EACnC,+BAA+B;EAC/B;AACF;AACA;EACE;AACF;AACA;;EAEE,mBAAmB;EACnB;AACF;AACA;EACE;AACF;AACA;EACE,aAAa;EACb,YAAY;EACZ,WAAW;EACX;AACF;AACA;EACE;AACF;AACA;EACE,eAAe;EACf,SAAS;EACT,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,qBAAqB;EACrB,sBAAsB;EACtB,aAAa;EACb;AACF;AACA;EACE,aAAa;EACb,YAAY;EACZ,WAAW;EACX;AACF;AACA;EACE,kBAAkB;EAClB;AACF;AACA;EACE;AACF;AACA;EACE,UAAU;EACV,sBAAsB;EACtB;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE;AACF;AACA;EACE,gCAAgC;EAChC,eAAe;EACf,MAAM;EACN,OAAO;EACP,YAAY;EACZ;AACF;AACA;EACE;AACF;AACA;EACE,eAAe;EACf,SAAS;EACT,cAAc;EACd,aAAa;EACb,mBAAmB;EACnB,iBAAiB;EACjB,eAAe;EACf,kBAAkB;EAClB,MAAM;EACN,QAAQ;EACR,aAAa;EACb;AACF;AACA;;EAEE,0BAA0B;EAC1B;AACF;AACA;EACE,YAAY;EACZ,WAAW;EACX;AACF\",\"sourcesContent\":[\".PresetDateRangePicker_panel {\\n padding: 0 22px 11px\\n}\\n.PresetDateRangePicker_button {\\n position: relative;\\n height: 100%;\\n text-align: center;\\n background: 0 0;\\n border: 2px solid #00a699;\\n color: #00a699;\\n padding: 4px 12px;\\n margin-right: 8px;\\n font: inherit;\\n font-weight: 700;\\n line-height: normal;\\n overflow: visible;\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n cursor: pointer\\n}\\n.PresetDateRangePicker_button:active {\\n outline: 0\\n}\\n.PresetDateRangePicker_button__selected {\\n color: #fff;\\n background: #00a699\\n}\\n.SingleDatePickerInput {\\n display: inline-block;\\n background-color: #fff\\n}\\n.SingleDatePickerInput__withBorder {\\n border-radius: 2px;\\n border: 1px solid #dbdbdb\\n}\\n.SingleDatePickerInput__rtl {\\n direction: rtl\\n}\\n.SingleDatePickerInput__disabled {\\n background-color: #f2f2f2\\n}\\n.SingleDatePickerInput__block {\\n display: block\\n}\\n.SingleDatePickerInput__showClearDate {\\n padding-right: 30px\\n}\\n.SingleDatePickerInput_clearDate {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n padding: 10px;\\n margin: 0 10px 0 5px;\\n position: absolute;\\n right: 0;\\n top: 50%;\\n -webkit-transform: translateY(-50%);\\n -ms-transform: translateY(-50%);\\n transform: translateY(-50%)\\n}\\n.SingleDatePickerInput_clearDate__default:focus,\\n.SingleDatePickerInput_clearDate__default:hover {\\n background: #dbdbdb;\\n border-radius: 50%\\n}\\n.SingleDatePickerInput_clearDate__small {\\n padding: 6px\\n}\\n.SingleDatePickerInput_clearDate__hide {\\n visibility: hidden\\n}\\n.SingleDatePickerInput_clearDate_svg {\\n fill: #82888a;\\n height: 12px;\\n width: 15px;\\n vertical-align: middle\\n}\\n.SingleDatePickerInput_clearDate_svg__small {\\n height: 9px\\n}\\n.SingleDatePickerInput_calendarIcon {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n display: inline-block;\\n vertical-align: middle;\\n padding: 10px;\\n margin: 0 5px 0 10px\\n}\\n.SingleDatePickerInput_calendarIcon_svg {\\n fill: #82888a;\\n height: 15px;\\n width: 14px;\\n vertical-align: middle\\n}\\n.SingleDatePicker {\\n position: relative;\\n display: inline-block\\n}\\n.SingleDatePicker__block {\\n display: block\\n}\\n.SingleDatePicker_picker {\\n z-index: 1;\\n background-color: #fff;\\n position: absolute\\n}\\n.SingleDatePicker_picker__rtl {\\n direction: rtl\\n}\\n.SingleDatePicker_picker__directionLeft {\\n left: 0\\n}\\n.SingleDatePicker_picker__directionRight {\\n right: 0\\n}\\n.SingleDatePicker_picker__portal {\\n background-color: rgba(0,0,0,.3);\\n position: fixed;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 100%\\n}\\n.SingleDatePicker_picker__fullScreenPortal {\\n background-color: #fff\\n}\\n.SingleDatePicker_closeButton {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n position: absolute;\\n top: 0;\\n right: 0;\\n padding: 15px;\\n z-index: 2\\n}\\n.SingleDatePicker_closeButton:focus,\\n.SingleDatePicker_closeButton:hover {\\n color: darken(#cacccd,10%);\\n text-decoration: none\\n}\\n.SingleDatePicker_closeButton_svg {\\n height: 15px;\\n width: 15px;\\n fill: #cacccd\\n}\\n.DayPickerKeyboardShortcuts_buttonReset {\\n background: 0 0;\\n border: 0;\\n border-radius: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n padding: 0;\\n cursor: pointer;\\n font-size: 14px\\n}\\n.DayPickerKeyboardShortcuts_buttonReset:active {\\n outline: 0\\n}\\n.DayPickerKeyboardShortcuts_show {\\n width: 33px;\\n height: 26px;\\n position: absolute;\\n z-index: 2\\n}\\n.DayPickerKeyboardShortcuts_show::before {\\n content: \\\"\\\";\\n display: block;\\n position: absolute\\n}\\n.DayPickerKeyboardShortcuts_show__bottomRight {\\n bottom: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__bottomRight::before {\\n border-top: 26px solid transparent;\\n border-right: 33px solid #00a699;\\n bottom: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__bottomRight:hover::before {\\n border-right: 33px solid #008489\\n}\\n.DayPickerKeyboardShortcuts_show__topRight {\\n top: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topRight::before {\\n border-bottom: 26px solid transparent;\\n border-right: 33px solid #00a699;\\n top: 0;\\n right: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topRight:hover::before {\\n border-right: 33px solid #008489\\n}\\n.DayPickerKeyboardShortcuts_show__topLeft {\\n top: 0;\\n left: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topLeft::before {\\n border-bottom: 26px solid transparent;\\n border-left: 33px solid #00a699;\\n top: 0;\\n left: 0\\n}\\n.DayPickerKeyboardShortcuts_show__topLeft:hover::before {\\n border-left: 33px solid #008489\\n}\\n.DayPickerKeyboardShortcuts_showSpan {\\n color: #fff;\\n position: absolute\\n}\\n.DayPickerKeyboardShortcuts_showSpan__bottomRight {\\n bottom: 0;\\n right: 5px\\n}\\n.DayPickerKeyboardShortcuts_showSpan__topRight {\\n top: 1px;\\n right: 5px\\n}\\n.DayPickerKeyboardShortcuts_showSpan__topLeft {\\n top: 1px;\\n left: 5px\\n}\\n.DayPickerKeyboardShortcuts_panel {\\n overflow: auto;\\n background: #fff;\\n border: 1px solid #dbdbdb;\\n border-radius: 2px;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n right: 0;\\n left: 0;\\n z-index: 2;\\n padding: 22px;\\n margin: 33px;\\n text-align: left\\n}\\n.DayPickerKeyboardShortcuts_title {\\n font-size: 16px;\\n font-weight: 700;\\n margin: 0\\n}\\n.DayPickerKeyboardShortcuts_list {\\n list-style: none;\\n padding: 0;\\n font-size: 14px\\n}\\n.DayPickerKeyboardShortcuts_close {\\n position: absolute;\\n right: 22px;\\n top: 22px;\\n z-index: 2\\n}\\n.DayPickerKeyboardShortcuts_close:active {\\n outline: 0\\n}\\n.DayPickerKeyboardShortcuts_closeSvg {\\n height: 15px;\\n width: 15px;\\n fill: #cacccd\\n}\\n.DayPickerKeyboardShortcuts_closeSvg:focus,\\n.DayPickerKeyboardShortcuts_closeSvg:hover {\\n fill: #82888a\\n}\\n.CalendarDay {\\n -moz-box-sizing: border-box;\\n box-sizing: border-box;\\n cursor: pointer;\\n font-size: 14px;\\n text-align: center\\n}\\n.CalendarDay:active {\\n outline: 0\\n}\\n.CalendarDay__defaultCursor {\\n cursor: default\\n}\\n.CalendarDay__default {\\n border: 1px solid #e4e7e7;\\n color: #484848;\\n background: #fff\\n}\\n.CalendarDay__default:hover {\\n background: #e4e7e7;\\n border: 1px solid #e4e7e7;\\n color: inherit\\n}\\n.CalendarDay__hovered_offset {\\n background: #f4f5f5;\\n border: 1px double #e4e7e7;\\n color: inherit\\n}\\n.CalendarDay__outside {\\n border: 0;\\n background: #fff;\\n color: #484848\\n}\\n.CalendarDay__outside:hover {\\n border: 0\\n}\\n.CalendarDay__blocked_minimum_nights {\\n background: #fff;\\n border: 1px solid #eceeee;\\n color: #cacccd\\n}\\n.CalendarDay__blocked_minimum_nights:active,\\n.CalendarDay__blocked_minimum_nights:hover {\\n background: #fff;\\n color: #cacccd\\n}\\n.CalendarDay__highlighted_calendar {\\n background: #ffe8bc;\\n color: #484848\\n}\\n.CalendarDay__highlighted_calendar:active,\\n.CalendarDay__highlighted_calendar:hover {\\n background: #ffce71;\\n color: #484848\\n}\\n.CalendarDay__selected_span {\\n background: #66e2da;\\n border: 1px double #33dacd;\\n color: #fff\\n}\\n.CalendarDay__selected_span:active,\\n.CalendarDay__selected_span:hover {\\n background: #33dacd;\\n border: 1px double #33dacd;\\n color: #fff\\n}\\n.CalendarDay__selected,\\n.CalendarDay__selected:active,\\n.CalendarDay__selected:hover {\\n background: #00a699;\\n border: 1px double #00a699;\\n color: #fff\\n}\\n.CalendarDay__hovered_span,\\n.CalendarDay__hovered_span:hover {\\n background: #b2f1ec;\\n border: 1px double #80e8e0;\\n color: #007a87\\n}\\n.CalendarDay__hovered_span:active {\\n background: #80e8e0;\\n border: 1px double #80e8e0;\\n color: #007a87\\n}\\n.CalendarDay__blocked_calendar,\\n.CalendarDay__blocked_calendar:active,\\n.CalendarDay__blocked_calendar:hover {\\n background: #cacccd;\\n border: 1px solid #cacccd;\\n color: #82888a\\n}\\n.CalendarDay__blocked_out_of_range,\\n.CalendarDay__blocked_out_of_range:active,\\n.CalendarDay__blocked_out_of_range:hover {\\n background: #fff;\\n border: 1px solid #e4e7e7;\\n color: #cacccd\\n}\\n.CalendarDay__hovered_start_first_possible_end {\\n background: #eceeee;\\n border: 1px double #eceeee\\n}\\n.CalendarDay__hovered_start_blocked_min_nights {\\n background: #eceeee;\\n border: 1px double #e4e7e7\\n}\\n.CalendarMonth {\\n background: #fff;\\n text-align: center;\\n vertical-align: top;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none\\n}\\n.CalendarMonth_table {\\n border-collapse: collapse;\\n border-spacing: 0\\n}\\n.CalendarMonth_verticalSpacing {\\n border-collapse: separate\\n}\\n.CalendarMonth_caption {\\n color: #484848;\\n font-size: 18px;\\n text-align: center;\\n padding-top: 22px;\\n padding-bottom: 37px;\\n caption-side: initial\\n}\\n.CalendarMonth_caption__verticalScrollable {\\n padding-top: 12px;\\n padding-bottom: 7px\\n}\\n.CalendarMonthGrid {\\n background: #fff;\\n text-align: left;\\n z-index: 0\\n}\\n.CalendarMonthGrid__animating {\\n z-index: 1\\n}\\n.CalendarMonthGrid__horizontal {\\n position: absolute;\\n left: 9px\\n}\\n.CalendarMonthGrid__vertical,\\n.CalendarMonthGrid__vertical_scrollable {\\n margin: 0 auto\\n}\\n.CalendarMonthGrid_month__horizontal {\\n display: inline-block;\\n vertical-align: top;\\n min-height: 100%\\n}\\n.CalendarMonthGrid_month__hideForAnimation {\\n position: absolute;\\n z-index: -1;\\n opacity: 0;\\n pointer-events: none\\n}\\n.CalendarMonthGrid_month__hidden {\\n visibility: hidden\\n}\\n.DayPickerNavigation {\\n position: relative;\\n z-index: 2\\n}\\n.DayPickerNavigation__horizontal {\\n height: 0\\n}\\n.DayPickerNavigation__verticalScrollable_prevNav {\\n z-index: 1\\n}\\n.DayPickerNavigation__verticalDefault {\\n position: absolute;\\n width: 100%;\\n height: 52px;\\n bottom: 0;\\n left: 0\\n}\\n.DayPickerNavigation__verticalScrollableDefault {\\n position: relative\\n}\\n.DayPickerNavigation__bottom {\\n height: auto\\n}\\n.DayPickerNavigation__bottomDefault {\\n -webkit-box-pack: justify;\\n -ms-flex-pack: justify;\\n display: -webkit-box;\\n display: -moz-box;\\n display: -ms-flexbox;\\n display: -webkit-flex;\\n display: flex;\\n -webkit-justify-content: space-between;\\n justify-content: space-between\\n}\\n.DayPickerNavigation_button {\\n cursor: pointer;\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none;\\n border: 0;\\n padding: 0;\\n margin: 0\\n}\\n.DayPickerNavigation_button__default {\\n border: 1px solid #e4e7e7;\\n background-color: #fff;\\n color: #757575\\n}\\n.DayPickerNavigation_button__default:focus,\\n.DayPickerNavigation_button__default:hover {\\n border: 1px solid #c4c4c4\\n}\\n.DayPickerNavigation_button__default:active {\\n background: #f2f2f2\\n}\\n.DayPickerNavigation_button__disabled {\\n cursor: default;\\n border: 1px solid #f2f2f2\\n}\\n.DayPickerNavigation_button__disabled:focus,\\n.DayPickerNavigation_button__disabled:hover {\\n border: 1px solid #f2f2f2\\n}\\n.DayPickerNavigation_button__disabled:active {\\n background: 0 0\\n}\\n.DayPickerNavigation_button__horizontalDefault {\\n position: absolute;\\n top: 18px;\\n line-height: .78;\\n border-radius: 3px;\\n padding: 6px 9px\\n}\\n.DayPickerNavigation_bottomButton__horizontalDefault {\\n position: static;\\n margin: -10px 22px 30px\\n}\\n.DayPickerNavigation_leftButton__horizontalDefault {\\n left: 22px\\n}\\n.DayPickerNavigation_rightButton__horizontalDefault {\\n right: 22px\\n}\\n.DayPickerNavigation_button__verticalDefault {\\n padding: 5px;\\n background: #fff;\\n box-shadow: 0 0 5px 2px rgba(0,0,0,.1);\\n position: relative;\\n display: inline-block;\\n text-align: center;\\n height: 100%;\\n width: 50%\\n}\\n.DayPickerNavigation_nextButton__verticalDefault {\\n border-left: 0\\n}\\n.DayPickerNavigation_nextButton__verticalScrollableDefault,\\n.DayPickerNavigation_prevButton__verticalScrollableDefault {\\n width: 100%\\n}\\n.DayPickerNavigation_svg__horizontal {\\n height: 19px;\\n width: 19px;\\n fill: #82888a;\\n display: block\\n}\\n.DayPickerNavigation_svg__vertical {\\n height: 42px;\\n width: 42px;\\n fill: #484848\\n}\\n.DayPickerNavigation_svg__disabled {\\n fill: #f2f2f2\\n}\\n.DayPicker {\\n background: #fff;\\n position: relative;\\n text-align: left\\n}\\n.DayPicker__horizontal {\\n background: #fff\\n}\\n.DayPicker__verticalScrollable {\\n height: 100%\\n}\\n.DayPicker__hidden {\\n visibility: hidden\\n}\\n.DayPicker__withBorder {\\n box-shadow: 0 2px 6px rgba(0,0,0,.05),0 0 0 1px rgba(0,0,0,.07);\\n border-radius: 3px\\n}\\n.DayPicker_portal__horizontal {\\n box-shadow: none;\\n position: absolute;\\n left: 50%;\\n top: 50%\\n}\\n.DayPicker_portal__vertical {\\n position: initial\\n}\\n.DayPicker_focusRegion {\\n outline: 0\\n}\\n.DayPicker_calendarInfo__horizontal,\\n.DayPicker_wrapper__horizontal {\\n display: inline-block;\\n vertical-align: top\\n}\\n.DayPicker_weekHeaders {\\n position: relative\\n}\\n.DayPicker_weekHeaders__horizontal {\\n margin-left: 9px\\n}\\n.DayPicker_weekHeader {\\n color: #757575;\\n position: absolute;\\n top: 62px;\\n z-index: 2;\\n text-align: left\\n}\\n.DayPicker_weekHeader__vertical {\\n left: 50%\\n}\\n.DayPicker_weekHeader__verticalScrollable {\\n top: 0;\\n display: table-row;\\n border-bottom: 1px solid #dbdbdb;\\n background: #fff;\\n margin-left: 0;\\n left: 0;\\n width: 100%;\\n text-align: center\\n}\\n.DayPicker_weekHeader_ul {\\n list-style: none;\\n margin: 1px 0;\\n padding-left: 0;\\n padding-right: 0;\\n font-size: 14px\\n}\\n.DayPicker_weekHeader_li {\\n display: inline-block;\\n text-align: center\\n}\\n.DayPicker_transitionContainer {\\n position: relative;\\n overflow: hidden;\\n border-radius: 3px\\n}\\n.DayPicker_transitionContainer__horizontal {\\n -webkit-transition: height .2s ease-in-out;\\n -moz-transition: height .2s ease-in-out;\\n transition: height .2s ease-in-out\\n}\\n.DayPicker_transitionContainer__vertical {\\n width: 100%\\n}\\n.DayPicker_transitionContainer__verticalScrollable {\\n padding-top: 20px;\\n height: 100%;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n right: 0;\\n left: 0;\\n overflow-y: scroll\\n}\\n.DateInput {\\n margin: 0;\\n padding: 0;\\n background: #fff;\\n position: relative;\\n display: inline-block;\\n width: 130px;\\n vertical-align: middle\\n}\\n.DateInput__small {\\n width: 97px\\n}\\n.DateInput__block {\\n width: 100%\\n}\\n.DateInput__disabled {\\n background: #f2f2f2;\\n color: #dbdbdb\\n}\\n.DateInput_input {\\n font-weight: 200;\\n font-size: 19px;\\n line-height: 24px;\\n color: #484848;\\n background-color: #fff;\\n width: 100%;\\n padding: 11px 11px 9px;\\n border: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: 2px solid transparent;\\n border-left: 0;\\n border-radius: 0\\n}\\n.DateInput_input__small {\\n font-size: 15px;\\n line-height: 18px;\\n letter-spacing: .2px;\\n padding: 7px 7px 5px\\n}\\n.DateInput_input__regular {\\n font-weight: auto\\n}\\n.DateInput_input__readOnly {\\n -webkit-user-select: none;\\n -moz-user-select: none;\\n -ms-user-select: none;\\n user-select: none\\n}\\n.DateInput_input__focused {\\n outline: 0;\\n background: #fff;\\n border: 0;\\n border-top: 0;\\n border-right: 0;\\n border-bottom: 2px solid #008489;\\n border-left: 0\\n}\\n.DateInput_input__disabled {\\n background: #f2f2f2;\\n font-style: italic\\n}\\n.DateInput_screenReaderMessage {\\n border: 0;\\n clip: rect(0,0,0,0);\\n height: 1px;\\n margin: -1px;\\n overflow: hidden;\\n padding: 0;\\n position: absolute;\\n width: 1px\\n}\\n.DateInput_fang {\\n position: absolute;\\n width: 20px;\\n height: 10px;\\n left: 22px;\\n z-index: 2\\n}\\n.DateInput_fangShape {\\n fill: #fff\\n}\\n.DateInput_fangStroke {\\n stroke: #dbdbdb;\\n fill: transparent\\n}\\n.DateRangePickerInput {\\n background-color: #fff;\\n display: inline-block\\n}\\n.DateRangePickerInput__disabled {\\n background: #f2f2f2\\n}\\n.DateRangePickerInput__withBorder {\\n border-radius: 2px;\\n border: 1px solid #dbdbdb\\n}\\n.DateRangePickerInput__rtl {\\n direction: rtl\\n}\\n.DateRangePickerInput__block {\\n display: block\\n}\\n.DateRangePickerInput__showClearDates {\\n padding-right: 30px\\n}\\n.DateRangePickerInput_arrow {\\n display: inline-block;\\n vertical-align: middle;\\n color: #484848\\n}\\n.DateRangePickerInput_arrow_svg {\\n vertical-align: middle;\\n fill: #484848;\\n height: 24px;\\n width: 24px\\n}\\n.DateRangePickerInput_clearDates {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n padding: 10px;\\n margin: 0 10px 0 5px;\\n position: absolute;\\n right: 0;\\n top: 50%;\\n -webkit-transform: translateY(-50%);\\n -ms-transform: translateY(-50%);\\n transform: translateY(-50%)\\n}\\n.DateRangePickerInput_clearDates__small {\\n padding: 6px\\n}\\n.DateRangePickerInput_clearDates_default:focus,\\n.DateRangePickerInput_clearDates_default:hover {\\n background: #dbdbdb;\\n border-radius: 50%\\n}\\n.DateRangePickerInput_clearDates__hide {\\n visibility: hidden\\n}\\n.DateRangePickerInput_clearDates_svg {\\n fill: #82888a;\\n height: 12px;\\n width: 15px;\\n vertical-align: middle\\n}\\n.DateRangePickerInput_clearDates_svg__small {\\n height: 9px\\n}\\n.DateRangePickerInput_calendarIcon {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n display: inline-block;\\n vertical-align: middle;\\n padding: 10px;\\n margin: 0 5px 0 10px\\n}\\n.DateRangePickerInput_calendarIcon_svg {\\n fill: #82888a;\\n height: 15px;\\n width: 14px;\\n vertical-align: middle\\n}\\n.DateRangePicker {\\n position: relative;\\n display: inline-block\\n}\\n.DateRangePicker__block {\\n display: block\\n}\\n.DateRangePicker_picker {\\n z-index: 1;\\n background-color: #fff;\\n position: absolute\\n}\\n.DateRangePicker_picker__rtl {\\n direction: rtl\\n}\\n.DateRangePicker_picker__directionLeft {\\n left: 0\\n}\\n.DateRangePicker_picker__directionRight {\\n right: 0\\n}\\n.DateRangePicker_picker__portal {\\n background-color: rgba(0,0,0,.3);\\n position: fixed;\\n top: 0;\\n left: 0;\\n height: 100%;\\n width: 100%\\n}\\n.DateRangePicker_picker__fullScreenPortal {\\n background-color: #fff\\n}\\n.DateRangePicker_closeButton {\\n background: 0 0;\\n border: 0;\\n color: inherit;\\n font: inherit;\\n line-height: normal;\\n overflow: visible;\\n cursor: pointer;\\n position: absolute;\\n top: 0;\\n right: 0;\\n padding: 15px;\\n z-index: 2\\n}\\n.DateRangePicker_closeButton:focus,\\n.DateRangePicker_closeButton:hover {\\n color: darken(#cacccd,10%);\\n text-decoration: none\\n}\\n.DateRangePicker_closeButton_svg {\\n height: 15px;\\n width: 15px;\\n fill: #cacccd\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"input:invalid {\\n outline: solid red;\\n}\\n\\ninput:valid {\\n outline: none black;\\n}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/css/input.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,kBAAkB;AACtB;;AAEA;IACI,mBAAmB;AACvB\",\"sourcesContent\":[\"input:invalid {\\n outline: solid red;\\n}\\n\\ninput:valid {\\n outline: none black;\\n}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".dash-logout-btn {\\n padding: 1rem;\\n background-color: #119DFF;\\n border: 1px solid #119DFF;\\n color: #ffffff;\\n outline: none;\\n cursor: pointer;\\n text-align: center;\\n}\\n\\n.dash-logout-btn:hover, .dash-logout-btn:focus {\\n background-color: #0d76bf;\\n border: 1px solid #0d76bf;\\n}\\n\\n.dash-logout-frame {\\n display: block;\\n padding: 0;\\n margin: 0;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/css/logout.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,aAAa;IACb,yBAAyB;IACzB,yBAAyB;IACzB,cAAc;IACd,aAAa;IACb,eAAe;IACf,kBAAkB;AACtB;;AAEA;IACI,yBAAyB;IACzB,yBAAyB;AAC7B;;AAEA;IACI,cAAc;IACd,UAAU;IACV,SAAS;AACb\",\"sourcesContent\":[\".dash-logout-btn {\\n padding: 1rem;\\n background-color: #119DFF;\\n border: 1px solid #119DFF;\\n color: #ffffff;\\n outline: none;\\n cursor: pointer;\\n text-align: center;\\n}\\n\\n.dash-logout-btn:hover, .dash-logout-btn:focus {\\n background-color: #0d76bf;\\n border: 1px solid #0d76bf;\\n}\\n\\n.dash-logout-frame {\\n display: block;\\n padding: 0;\\n margin: 0;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".DateInput_input {\\n box-sizing: border-box;\\n}\\n\\n.DayPickerNavigation__verticalDefault {\\n text-align: center;\\n height: initial;\\n padding: 10px 0px;\\n}\\n\\n.DayPickerNavigation_svg__vertical {\\n height: 20px;\\n}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/css/react-dates@20.1.0-fix.css\"],\"names\":[],\"mappings\":\"AAAA;IACI,sBAAsB;AAC1B;;AAEA;IACI,kBAAkB;IAClB,eAAe;IACf,iBAAiB;AACrB;;AAEA;IACI,YAAY;AAChB\",\"sourcesContent\":[\".DateInput_input {\\n box-sizing: border-box;\\n}\\n\\n.DayPickerNavigation__verticalDefault {\\n text-align: center;\\n height: initial;\\n padding: 10px 0px;\\n}\\n\\n.DayPickerNavigation_svg__vertical {\\n height: 20px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".Select,.Select-control{position:relative}.Select-control,.Select-input>input{width:100%;cursor:default;outline:0}.Select-arrow-zone,.Select-clear-zone,.Select-loading-zone{text-align:center;cursor:pointer}.Select,.Select div,.Select input,.Select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.Select.is-disabled>.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none;opacity:.35}.Select-control{background-color:#fff;border-radius:4px;border:1px solid #ccc;color:#333;display:table;border-spacing:0;border-collapse:separate;height:36px;overflow:hidden}.is-searchable.is-focused:not(.is-open)>.Select-control,.is-searchable.is-open>.Select-control{cursor:text}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.Select-control .Select-input:focus{outline:0}.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control .Select-arrow{top:-2px;border-color:transparent transparent #999;border-width:0 5px 5px}.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1)}.Select--single>.Select-control .Select-value,.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value.Select--single>.Select-control .Select-value .Select-value-label,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value .Select-value-label{color:#333}.has-value.Select--single>.Select-control .Select-value a.Select-value-label,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.Select--single>.Select-control .Select-value a.Select-value-label:hover,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:hover{color:#007eff;outline:0;text-decoration:underline}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{background:none;border:0;box-shadow:none;display:inline-block;font-family:inherit;font-size:inherit;margin:0;line-height:14px;padding:8px 0 12px;-webkit-appearance:none}.Select-loading,.Select-loading-zone{width:16px;position:relative;vertical-align:middle}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:0}.Select-loading-zone{display:table-cell}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;-o-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;-o-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;display:table-cell;position:relative;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#D0021B}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{display:table-cell;position:relative;vertical-align:middle;width:25px;padding-right:5px}.Select--multi .Select-multi-value-wrapper,.Select-arrow{display:inline-block}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;height:0;width:0;position:relative}.Select-arrow-zone:hover>.Select-arrow,.is-open .Select-arrow{border-top-color:#666}.Select .Select-aria-only{display:inline-block;height:1px;width:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;float:left}.Select-noresults,.Select-option{box-sizing:border-box;display:block;padding:8px 10px}@-webkit-keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{background-color:#fff;color:#666;cursor:pointer}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-selected{background-color:#f5faff;background-color:rgba(0,126,255,.04);color:#333}.Select-option.is-focused{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{color:#999;cursor:default}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid #c2e0ff;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c2e0ff;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:#d8eafd;background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:#c2e0ff;background-color:rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/css/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C,UAAU,CAAC,2BAA2B,UAAU,CAAC,cAAc,CAAC,kBAAkB,UAAU,CAAC,cAAc,CAAC,6BAA6B,qBAAqB,CAAC,gBAAgB,CAAC,SAAS,CAAC,uCAAuC,eAAe,CAAC,6BAA6B,wBAAwB,CAAC,oCAAoC,CAAC,iBAAiB,CAAC,wBAAwB,CAAC,oCAAoC,CAAC,aAAa,CAAC,oBAAoB,CAAC,cAAc,CAAC,eAAe,CAAC,eAAe,CAAC,cAAc,CAAC,kBAAkB,CAAC,qEAAqE,oBAAoB,CAAC,qBAAqB,CAAC,mCAAmC,8BAA8B,CAAC,2BAA2B,CAAC,cAAc,CAAC,eAAe,CAAC,oCAAoC,aAAa,CAAC,cAAc,CAAC,oBAAoB,CAAC,0CAA0C,yBAAyB,CAAC,kCAAkC,cAAc,CAAC,6BAA6B,CAAC,0BAA0B,CAAC,8BAA8B,CAAC,0CAA0C,CAAC,mBAAmB,CAAC,gFAAgF,wBAAwB,CAAC,oCAAoC,CAAC,aAAa,CAAC,yCAAyC,wBAAwB,CAAC,oCAAoC,CAAC,yCAAyC,wBAAwB,CAAC,wBAAwB,CAAC,UAAU,CAAC,8CAA8C,kBAAkB,CAAC,8BAA8B,CAAC,6JAA6J,wBAAwB,CAAC,iCAAiC,GAAG,uBAAuB,CAAC,CAAC,yCAAyC,GAAG,+BAA+B,CAAC\",\"sourcesContent\":[\".Select,.Select-control{position:relative}.Select-control,.Select-input>input{width:100%;cursor:default;outline:0}.Select-arrow-zone,.Select-clear-zone,.Select-loading-zone{text-align:center;cursor:pointer}.Select,.Select div,.Select input,.Select span{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.Select.is-disabled>.Select-control{background-color:#f9f9f9}.Select.is-disabled>.Select-control:hover{box-shadow:none}.Select.is-disabled .Select-arrow-zone{cursor:default;pointer-events:none;opacity:.35}.Select-control{background-color:#fff;border-radius:4px;border:1px solid #ccc;color:#333;display:table;border-spacing:0;border-collapse:separate;height:36px;overflow:hidden}.is-searchable.is-focused:not(.is-open)>.Select-control,.is-searchable.is-open>.Select-control{cursor:text}.Select-control:hover{box-shadow:0 1px 0 rgba(0,0,0,.06)}.Select-control .Select-input:focus{outline:0}.is-open>.Select-control{border-bottom-right-radius:0;border-bottom-left-radius:0;background:#fff;border-color:#b3b3b3 #ccc #d9d9d9}.is-open>.Select-control .Select-arrow{top:-2px;border-color:transparent transparent #999;border-width:0 5px 5px}.is-focused:not(.is-open)>.Select-control{border-color:#007eff;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 0 3px rgba(0,126,255,.1)}.Select--single>.Select-control .Select-value,.Select-placeholder{bottom:0;color:#aaa;left:0;line-height:34px;padding-left:10px;padding-right:10px;position:absolute;right:0;top:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.has-value.Select--single>.Select-control .Select-value .Select-value-label,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value .Select-value-label{color:#333}.has-value.Select--single>.Select-control .Select-value a.Select-value-label,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label{cursor:pointer;text-decoration:none}.has-value.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.Select--single>.Select-control .Select-value a.Select-value-label:hover,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:focus,.has-value.is-pseudo-focused.Select--single>.Select-control .Select-value a.Select-value-label:hover{color:#007eff;outline:0;text-decoration:underline}.Select-input{height:34px;padding-left:10px;padding-right:10px;vertical-align:middle}.Select-input>input{background:none;border:0;box-shadow:none;display:inline-block;font-family:inherit;font-size:inherit;margin:0;line-height:14px;padding:8px 0 12px;-webkit-appearance:none}.Select-loading,.Select-loading-zone{width:16px;position:relative;vertical-align:middle}.is-focused .Select-input>input{cursor:text}.has-value.is-pseudo-focused .Select-input{opacity:0}.Select-control:not(.is-searchable)>.Select-input{outline:0}.Select-loading-zone{display:table-cell}.Select-loading{-webkit-animation:Select-animation-spin .4s infinite linear;-o-animation:Select-animation-spin .4s infinite linear;animation:Select-animation-spin .4s infinite linear;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #ccc;border-right-color:#333;display:inline-block}.Select-clear-zone{-webkit-animation:Select-animation-fadeIn .2s;-o-animation:Select-animation-fadeIn .2s;animation:Select-animation-fadeIn .2s;color:#999;display:table-cell;position:relative;vertical-align:middle;width:17px}.Select-clear-zone:hover{color:#D0021B}.Select-clear{display:inline-block;font-size:18px;line-height:1}.Select--multi .Select-clear-zone{width:17px}.Select-arrow-zone{display:table-cell;position:relative;vertical-align:middle;width:25px;padding-right:5px}.Select--multi .Select-multi-value-wrapper,.Select-arrow{display:inline-block}.Select-arrow{border-color:#999 transparent transparent;border-style:solid;border-width:5px 5px 2.5px;height:0;width:0;position:relative}.Select-arrow-zone:hover>.Select-arrow,.is-open .Select-arrow{border-top-color:#666}.Select .Select-aria-only{display:inline-block;height:1px;width:1px;margin:-1px;clip:rect(0,0,0,0);overflow:hidden;float:left}.Select-noresults,.Select-option{box-sizing:border-box;display:block;padding:8px 10px}@-webkit-keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}@keyframes Select-animation-fadeIn{from{opacity:0}to{opacity:1}}.Select-menu-outer{border-bottom-right-radius:4px;border-bottom-left-radius:4px;background-color:#fff;border:1px solid #ccc;border-top-color:#e6e6e6;box-shadow:0 1px 0 rgba(0,0,0,.06);box-sizing:border-box;margin-top:-1px;max-height:200px;position:absolute;top:100%;width:100%;z-index:1;-webkit-overflow-scrolling:touch}.Select-menu{max-height:198px;overflow-y:auto}.Select-option{background-color:#fff;color:#666;cursor:pointer}.Select-option:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.Select-option.is-selected{background-color:#f5faff;background-color:rgba(0,126,255,.04);color:#333}.Select-option.is-focused{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);color:#333}.Select-option.is-disabled{color:#ccc;cursor:default}.Select-noresults{color:#999;cursor:default}.Select--multi .Select-input{vertical-align:middle;margin-left:10px;padding:0}.Select--multi.has-value .Select-input{margin-left:5px}.Select--multi .Select-value{background-color:#ebf5ff;background-color:rgba(0,126,255,.08);border-radius:2px;border:1px solid #c2e0ff;border:1px solid rgba(0,126,255,.24);color:#007eff;display:inline-block;font-size:.9em;line-height:1.4;margin-left:5px;margin-top:5px;vertical-align:top}.Select--multi .Select-value-icon,.Select--multi .Select-value-label{display:inline-block;vertical-align:middle}.Select--multi .Select-value-label{border-bottom-right-radius:2px;border-top-right-radius:2px;cursor:default;padding:2px 5px}.Select--multi a.Select-value-label{color:#007eff;cursor:pointer;text-decoration:none}.Select--multi a.Select-value-label:hover{text-decoration:underline}.Select--multi .Select-value-icon{cursor:pointer;border-bottom-left-radius:2px;border-top-left-radius:2px;border-right:1px solid #c2e0ff;border-right:1px solid rgba(0,126,255,.24);padding:1px 5px 3px}.Select--multi .Select-value-icon:focus,.Select--multi .Select-value-icon:hover{background-color:#d8eafd;background-color:rgba(0,113,230,.08);color:#0071e6}.Select--multi .Select-value-icon:active{background-color:#c2e0ff;background-color:rgba(0,126,255,.24)}.Select--multi.is-disabled .Select-value{background-color:#fcfcfc;border:1px solid #e3e3e3;color:#333}.Select--multi.is-disabled .Select-value-icon{cursor:not-allowed;border-right:1px solid #e3e3e3}.Select--multi.is-disabled .Select-value-icon:active,.Select--multi.is-disabled .Select-value-icon:focus,.Select--multi.is-disabled .Select-value-icon:hover{background-color:#fcfcfc}@keyframes Select-animation-spin{to{transform:rotate(1turn)}}@-webkit-keyframes Select-animation-spin{to{-webkit-transform:rotate(1turn)}}\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = []; // return the list of modules as css string\n\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n\n content += cssWithMappingToString(item);\n\n if (needLayer) {\n content += \"}\";\n }\n\n if (item[2]) {\n content += \"}\";\n }\n\n if (item[4]) {\n content += \"}\";\n }\n\n return content;\n }).join(\"\");\n }; // import a list of modules into the list\n\n\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n\n var alreadyImportedModules = {};\n\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n\n list.push(item);\n }\n };\n\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n\n if (!cssMapping) {\n return content;\n }\n\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n var sourceURLs = cssMapping.sources.map(function (source) {\n return \"/*# sourceURL=\".concat(cssMapping.sourceRoot || \"\").concat(source, \" */\");\n });\n return [content].concat(sourceURLs).concat([sourceMapping]).join(\"\\n\");\n }\n\n return [content].join(\"\\n\");\n};","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar origDefineProperty = Object.defineProperty;\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar hasPropertyDescriptors = require('has-property-descriptors')();\n\nvar supportsDescriptors = origDefineProperty && hasPropertyDescriptors;\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object && (!isFunction(predicate) || !predicate())) {\n\t\treturn;\n\t}\n\tif (supportsDescriptors) {\n\t\torigDefineProperty(object, name, {\n\t\t\tconfigurable: true,\n\t\t\tenumerable: false,\n\t\t\tvalue: value,\n\t\t\twritable: true\n\t\t});\n\t} else {\n\t\tobject[name] = value; // eslint-disable-line no-param-reassign\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","/**\n * Code refactored from Mozilla Developer Network:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n */\n\n'use strict';\n\nfunction assign(target, firstSource) {\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert first argument to object');\n }\n\n var to = Object(target);\n for (var i = 1; i < arguments.length; i++) {\n var nextSource = arguments[i];\n if (nextSource === undefined || nextSource === null) {\n continue;\n }\n\n var keysArray = Object.keys(Object(nextSource));\n for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {\n var nextKey = keysArray[nextIndex];\n var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);\n if (desc !== undefined && desc.enumerable) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n return to;\n}\n\nfunction polyfill() {\n if (!Object.assign) {\n Object.defineProperty(Object, 'assign', {\n enumerable: false,\n configurable: true,\n writable: true,\n value: assign\n });\n }\n}\n\nmodule.exports = {\n assign: assign,\n polyfill: polyfill\n};\n","/**\n * inspired by is-number \n * but significantly simplified and sped up by ignoring number and string constructors\n * ie these return false:\n * new Number(1)\n * new String('1')\n */\n\n'use strict';\n\nvar allBlankCharCodes = require('is-string-blank');\n\nmodule.exports = function(n) {\n var type = typeof n;\n if(type === 'string') {\n var original = n;\n n = +n;\n // whitespace strings cast to zero - filter them out\n if(n===0 && allBlankCharCodes(original)) return false;\n }\n else if(type !== 'number') return false;\n\n return n - n < 1;\n};\n","(function(a,b){if(\"function\"==typeof define&&define.amd)define([],b);else if(\"undefined\"!=typeof exports)b();else{b(),a.FileSaver={exports:{}}.exports}})(this,function(){\"use strict\";function b(a,b){return\"undefined\"==typeof b?b={autoBom:!1}:\"object\"!=typeof b&&(console.warn(\"Deprecated: Expected third argument to be a object\"),b={autoBom:!b}),b.autoBom&&/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(a.type)?new Blob([\"\\uFEFF\",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open(\"GET\",a),d.responseType=\"blob\",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error(\"could not download file\")},d.send()}function d(a){var b=new XMLHttpRequest;b.open(\"HEAD\",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent(\"click\"))}catch(c){var b=document.createEvent(\"MouseEvents\");b.initMouseEvent(\"click\",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f=\"object\"==typeof window&&window.window===window?window:\"object\"==typeof self&&self.self===self?self:\"object\"==typeof global&&global.global===global?global:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||(\"object\"!=typeof window||window!==f?function(){}:\"download\"in HTMLAnchorElement.prototype&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement(\"a\");g=g||b.name||\"download\",j.download=g,j.rel=\"noopener\",\"string\"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target=\"_blank\")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:\"msSaveOrOpenBlob\"in navigator?function(f,g,h){if(g=g||f.name||\"download\",\"string\"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement(\"a\");i.href=f,i.target=\"_blank\",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open(\"\",\"_blank\"),g&&(g.document.title=g.document.body.innerText=\"downloading...\"),\"string\"==typeof b)return c(b,d,e);var h=\"application/octet-stream\"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\\/[\\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&\"undefined\"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,\"data:attachment/file;\"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g,\"undefined\"!=typeof module&&(module.exports=g)});\n\n//# sourceMappingURL=FileSaver.min.js.map","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\n\nvar getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\tif ($defineProperty) {\n\t\ttry {\n\t\t\t$defineProperty({}, 'a', { value: 1 });\n\t\t\treturn true;\n\t\t} catch (e) {\n\t\t\t// IE 8 has a broken defineProperty\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn false;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!hasPropertyDescriptors()) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n","'use strict';\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\r\n\r\n/**\r\n * Is this string all whitespace?\r\n * This solution kind of makes my brain hurt, but it's significantly faster\r\n * than !str.trim() or any other solution I could find.\r\n *\r\n * whitespace codes from: http://en.wikipedia.org/wiki/Whitespace_character\r\n * and verified with:\r\n *\r\n * for(var i = 0; i < 65536; i++) {\r\n * var s = String.fromCharCode(i);\r\n * if(+s===0 && !s.trim()) console.log(i, s);\r\n * }\r\n *\r\n * which counts a couple of these as *not* whitespace, but finds nothing else\r\n * that *is* whitespace. Note that charCodeAt stops at 16 bits, but it appears\r\n * that there are no whitespace characters above this, and code points above\r\n * this do not map onto white space characters.\r\n */\r\n\r\nmodule.exports = function(str){\r\n var l = str.length,\r\n a;\r\n for(var i = 0; i < l; i++) {\r\n a = str.charCodeAt(i);\r\n if((a < 9 || a > 13) && (a !== 32) && (a !== 133) && (a !== 160) &&\r\n (a !== 5760) && (a !== 6158) && (a < 8192 || a > 8205) &&\r\n (a !== 8232) && (a !== 8233) && (a !== 8239) && (a !== 8287) &&\r\n (a !== 8288) && (a !== 12288) && (a !== 65279)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\ttoStrTags[typedArray] = descriptor.get;\n\t\t}\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar anyTrue = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!anyTrue) {\n\t\t\ttry {\n\t\t\t\tanyTrue = getter.call(value) === typedArray;\n\t\t\t} catch (e) { /**/ }\n\t\t}\n\t});\n\treturn anyTrue;\n};\n\nmodule.exports = function isTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag || !(Symbol.toStringTag in value)) {\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\treturn $indexOf(typedArrays, tag) > -1;\n\t}\n\tif (!gOPD) { return false; }\n\treturn tryTypedArrays(value);\n};\n","var map = {\n\t\"./af\": 68704,\n\t\"./af.js\": 68704,\n\t\"./ar\": 27156,\n\t\"./ar-dz\": 42642,\n\t\"./ar-dz.js\": 42642,\n\t\"./ar-kw\": 20640,\n\t\"./ar-kw.js\": 20640,\n\t\"./ar-ly\": 82641,\n\t\"./ar-ly.js\": 82641,\n\t\"./ar-ma\": 52750,\n\t\"./ar-ma.js\": 52750,\n\t\"./ar-sa\": 43697,\n\t\"./ar-sa.js\": 43697,\n\t\"./ar-tn\": 60667,\n\t\"./ar-tn.js\": 60667,\n\t\"./ar.js\": 27156,\n\t\"./az\": 33899,\n\t\"./az.js\": 33899,\n\t\"./be\": 55777,\n\t\"./be.js\": 55777,\n\t\"./bg\": 26429,\n\t\"./bg.js\": 26429,\n\t\"./bm\": 18337,\n\t\"./bm.js\": 18337,\n\t\"./bn\": 91379,\n\t\"./bn-bd\": 36843,\n\t\"./bn-bd.js\": 36843,\n\t\"./bn.js\": 91379,\n\t\"./bo\": 71798,\n\t\"./bo.js\": 71798,\n\t\"./br\": 50706,\n\t\"./br.js\": 50706,\n\t\"./bs\": 60158,\n\t\"./bs.js\": 60158,\n\t\"./ca\": 10191,\n\t\"./ca.js\": 10191,\n\t\"./cs\": 41958,\n\t\"./cs.js\": 41958,\n\t\"./cv\": 54139,\n\t\"./cv.js\": 54139,\n\t\"./cy\": 99673,\n\t\"./cy.js\": 99673,\n\t\"./da\": 48845,\n\t\"./da.js\": 48845,\n\t\"./de\": 50940,\n\t\"./de-at\": 1477,\n\t\"./de-at.js\": 1477,\n\t\"./de-ch\": 64025,\n\t\"./de-ch.js\": 64025,\n\t\"./de.js\": 50940,\n\t\"./dv\": 72684,\n\t\"./dv.js\": 72684,\n\t\"./el\": 1672,\n\t\"./el.js\": 1672,\n\t\"./en-au\": 62979,\n\t\"./en-au.js\": 62979,\n\t\"./en-ca\": 67149,\n\t\"./en-ca.js\": 67149,\n\t\"./en-gb\": 35595,\n\t\"./en-gb.js\": 35595,\n\t\"./en-ie\": 62994,\n\t\"./en-ie.js\": 62994,\n\t\"./en-il\": 86866,\n\t\"./en-il.js\": 86866,\n\t\"./en-in\": 82260,\n\t\"./en-in.js\": 82260,\n\t\"./en-nz\": 59993,\n\t\"./en-nz.js\": 59993,\n\t\"./en-sg\": 94434,\n\t\"./en-sg.js\": 94434,\n\t\"./eo\": 40996,\n\t\"./eo.js\": 40996,\n\t\"./es\": 59314,\n\t\"./es-do\": 99749,\n\t\"./es-do.js\": 99749,\n\t\"./es-mx\": 29604,\n\t\"./es-mx.js\": 29604,\n\t\"./es-us\": 57034,\n\t\"./es-us.js\": 57034,\n\t\"./es.js\": 59314,\n\t\"./et\": 75366,\n\t\"./et.js\": 75366,\n\t\"./eu\": 95121,\n\t\"./eu.js\": 95121,\n\t\"./fa\": 55851,\n\t\"./fa.js\": 55851,\n\t\"./fi\": 89785,\n\t\"./fi.js\": 89785,\n\t\"./fil\": 62830,\n\t\"./fil.js\": 62830,\n\t\"./fo\": 74933,\n\t\"./fo.js\": 74933,\n\t\"./fr\": 92051,\n\t\"./fr-ca\": 36979,\n\t\"./fr-ca.js\": 36979,\n\t\"./fr-ch\": 62466,\n\t\"./fr-ch.js\": 62466,\n\t\"./fr.js\": 92051,\n\t\"./fy\": 57389,\n\t\"./fy.js\": 57389,\n\t\"./ga\": 44060,\n\t\"./ga.js\": 44060,\n\t\"./gd\": 44640,\n\t\"./gd.js\": 44640,\n\t\"./gl\": 85090,\n\t\"./gl.js\": 85090,\n\t\"./gom-deva\": 22927,\n\t\"./gom-deva.js\": 22927,\n\t\"./gom-latn\": 73602,\n\t\"./gom-latn.js\": 73602,\n\t\"./gu\": 20486,\n\t\"./gu.js\": 20486,\n\t\"./he\": 19023,\n\t\"./he.js\": 19023,\n\t\"./hi\": 79435,\n\t\"./hi.js\": 79435,\n\t\"./hr\": 96345,\n\t\"./hr.js\": 96345,\n\t\"./hu\": 47492,\n\t\"./hu.js\": 47492,\n\t\"./hy-am\": 24585,\n\t\"./hy-am.js\": 24585,\n\t\"./id\": 96701,\n\t\"./id.js\": 96701,\n\t\"./is\": 65276,\n\t\"./is.js\": 65276,\n\t\"./it\": 23602,\n\t\"./it-ch\": 75062,\n\t\"./it-ch.js\": 75062,\n\t\"./it.js\": 23602,\n\t\"./ja\": 90987,\n\t\"./ja.js\": 90987,\n\t\"./jv\": 35485,\n\t\"./jv.js\": 35485,\n\t\"./ka\": 13048,\n\t\"./ka.js\": 13048,\n\t\"./kk\": 12664,\n\t\"./kk.js\": 12664,\n\t\"./km\": 12681,\n\t\"./km.js\": 12681,\n\t\"./kn\": 45263,\n\t\"./kn.js\": 45263,\n\t\"./ko\": 36023,\n\t\"./ko.js\": 36023,\n\t\"./ku\": 34839,\n\t\"./ku.js\": 34839,\n\t\"./ky\": 77750,\n\t\"./ky.js\": 77750,\n\t\"./lb\": 77223,\n\t\"./lb.js\": 77223,\n\t\"./lo\": 81906,\n\t\"./lo.js\": 81906,\n\t\"./lt\": 64837,\n\t\"./lt.js\": 64837,\n\t\"./lv\": 18656,\n\t\"./lv.js\": 18656,\n\t\"./me\": 48331,\n\t\"./me.js\": 48331,\n\t\"./mi\": 97645,\n\t\"./mi.js\": 97645,\n\t\"./mk\": 2963,\n\t\"./mk.js\": 2963,\n\t\"./ml\": 44744,\n\t\"./ml.js\": 44744,\n\t\"./mn\": 3296,\n\t\"./mn.js\": 3296,\n\t\"./mr\": 62448,\n\t\"./mr.js\": 62448,\n\t\"./ms\": 406,\n\t\"./ms-my\": 23814,\n\t\"./ms-my.js\": 23814,\n\t\"./ms.js\": 406,\n\t\"./mt\": 28957,\n\t\"./mt.js\": 28957,\n\t\"./my\": 18940,\n\t\"./my.js\": 18940,\n\t\"./nb\": 37127,\n\t\"./nb.js\": 37127,\n\t\"./ne\": 43285,\n\t\"./ne.js\": 43285,\n\t\"./nl\": 75835,\n\t\"./nl-be\": 77243,\n\t\"./nl-be.js\": 77243,\n\t\"./nl.js\": 75835,\n\t\"./nn\": 32802,\n\t\"./nn.js\": 32802,\n\t\"./oc-lnc\": 87282,\n\t\"./oc-lnc.js\": 87282,\n\t\"./pa-in\": 53424,\n\t\"./pa-in.js\": 53424,\n\t\"./pl\": 83696,\n\t\"./pl.js\": 83696,\n\t\"./pt\": 61551,\n\t\"./pt-br\": 61657,\n\t\"./pt-br.js\": 61657,\n\t\"./pt.js\": 61551,\n\t\"./ro\": 29199,\n\t\"./ro.js\": 29199,\n\t\"./ru\": 88217,\n\t\"./ru.js\": 88217,\n\t\"./sd\": 14817,\n\t\"./sd.js\": 14817,\n\t\"./se\": 91403,\n\t\"./se.js\": 91403,\n\t\"./si\": 18446,\n\t\"./si.js\": 18446,\n\t\"./sk\": 21098,\n\t\"./sk.js\": 21098,\n\t\"./sl\": 48805,\n\t\"./sl.js\": 48805,\n\t\"./sq\": 47718,\n\t\"./sq.js\": 47718,\n\t\"./sr\": 52003,\n\t\"./sr-cyrl\": 86925,\n\t\"./sr-cyrl.js\": 86925,\n\t\"./sr.js\": 52003,\n\t\"./ss\": 83707,\n\t\"./ss.js\": 83707,\n\t\"./sv\": 80643,\n\t\"./sv.js\": 80643,\n\t\"./sw\": 46250,\n\t\"./sw.js\": 46250,\n\t\"./ta\": 52550,\n\t\"./ta.js\": 52550,\n\t\"./te\": 5558,\n\t\"./te.js\": 5558,\n\t\"./tet\": 63503,\n\t\"./tet.js\": 63503,\n\t\"./tg\": 87711,\n\t\"./tg.js\": 87711,\n\t\"./th\": 95626,\n\t\"./th.js\": 95626,\n\t\"./tk\": 60727,\n\t\"./tk.js\": 60727,\n\t\"./tl-ph\": 97568,\n\t\"./tl-ph.js\": 97568,\n\t\"./tlh\": 71682,\n\t\"./tlh.js\": 71682,\n\t\"./tr\": 53538,\n\t\"./tr.js\": 53538,\n\t\"./tzl\": 83614,\n\t\"./tzl.js\": 83614,\n\t\"./tzm\": 77706,\n\t\"./tzm-latn\": 77828,\n\t\"./tzm-latn.js\": 77828,\n\t\"./tzm.js\": 77706,\n\t\"./ug-cn\": 86550,\n\t\"./ug-cn.js\": 86550,\n\t\"./uk\": 75509,\n\t\"./uk.js\": 75509,\n\t\"./ur\": 912,\n\t\"./ur.js\": 912,\n\t\"./uz\": 23725,\n\t\"./uz-latn\": 67537,\n\t\"./uz-latn.js\": 67537,\n\t\"./uz.js\": 23725,\n\t\"./vi\": 53285,\n\t\"./vi.js\": 53285,\n\t\"./x-pseudo\": 69201,\n\t\"./x-pseudo.js\": 69201,\n\t\"./yo\": 90392,\n\t\"./yo.js\": 90392,\n\t\"./zh-cn\": 98914,\n\t\"./zh-cn.js\": 98914,\n\t\"./zh-hk\": 8229,\n\t\"./zh-hk.js\": 8229,\n\t\"./zh-mo\": 59735,\n\t\"./zh-mo.js\": 59735,\n\t\"./zh-tw\": 55786,\n\t\"./zh-tw.js\": 55786\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 46700;","'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n","'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nvar isArrayish = require('is-arrayish');\n\nvar concat = Array.prototype.concat;\nvar slice = Array.prototype.slice;\n\nvar swizzle = module.exports = function swizzle(args) {\n\tvar results = [];\n\n\tfor (var i = 0, len = args.length; i < len; i++) {\n\t\tvar arg = args[i];\n\n\t\tif (isArrayish(arg)) {\n\t\t\t// http://jsperf.com/javascript-array-concat-vs-push/98\n\t\t\tresults = concat.call(results, slice.call(arg));\n\t\t} else {\n\t\t\tresults.push(arg);\n\t\t}\n\t}\n\n\treturn results;\n};\n\nswizzle.wrap = function (fn) {\n\treturn function () {\n\t\treturn fn(swizzle(arguments));\n\t};\n};\n","module.exports = function isArrayish(obj) {\n\tif (!obj || typeof obj === 'string') {\n\t\treturn false;\n\t}\n\n\treturn obj instanceof Array || Array.isArray(obj) ||\n\t\t(obj.length >= 0 && (obj.splice instanceof Function ||\n\t\t\t(Object.getOwnPropertyDescriptor(obj, (obj.length - 1)) && obj.constructor.name !== 'String')));\n};\n","\"use strict\";\n\nfunction hash(str) {\n var hash = 5381,\n i = str.length;\n\n while(i) {\n hash = (hash * 33) ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return hash >>> 0;\n}\n\nmodule.exports = hash;\n","\"use strict\";\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n/*\nBased on Glamor's sheet\nhttps://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js\n*/\nvar isProd = typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'production';\n\nvar isString = function isString(o) {\n return Object.prototype.toString.call(o) === '[object String]';\n};\n\nvar StyleSheet = /*#__PURE__*/function () {\n function StyleSheet(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$name = _ref.name,\n name = _ref$name === void 0 ? 'stylesheet' : _ref$name,\n _ref$optimizeForSpeed = _ref.optimizeForSpeed,\n optimizeForSpeed = _ref$optimizeForSpeed === void 0 ? isProd : _ref$optimizeForSpeed,\n _ref$isBrowser = _ref.isBrowser,\n isBrowser = _ref$isBrowser === void 0 ? typeof window !== 'undefined' : _ref$isBrowser;\n\n invariant(isString(name), '`name` must be a string');\n this._name = name;\n this._deletedRulePlaceholder = \"#\" + name + \"-deleted-rule____{}\";\n invariant(typeof optimizeForSpeed === 'boolean', '`optimizeForSpeed` must be a boolean');\n this._optimizeForSpeed = optimizeForSpeed;\n this._isBrowser = isBrowser;\n this._serverSheet = undefined;\n this._tags = [];\n this._injected = false;\n this._rulesCount = 0;\n var node = this._isBrowser && document.querySelector('meta[property=\"csp-nonce\"]');\n this._nonce = node ? node.getAttribute('content') : null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {\n invariant(typeof bool === 'boolean', '`setOptimizeForSpeed` accepts a boolean');\n invariant(this._rulesCount === 0, 'optimizeForSpeed cannot be when rules have already been inserted');\n this.flush();\n this._optimizeForSpeed = bool;\n this.inject();\n };\n\n _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {\n return this._optimizeForSpeed;\n };\n\n _proto.inject = function inject() {\n var _this = this;\n\n invariant(!this._injected, 'sheet already injected');\n this._injected = true;\n\n if (this._isBrowser && this._optimizeForSpeed) {\n this._tags[0] = this.makeStyleTag(this._name);\n this._optimizeForSpeed = 'insertRule' in this.getSheet();\n\n if (!this._optimizeForSpeed) {\n if (!isProd) {\n console.warn('StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.');\n }\n\n this.flush();\n this._injected = true;\n }\n\n return;\n }\n\n this._serverSheet = {\n cssRules: [],\n insertRule: function insertRule(rule, index) {\n if (typeof index === 'number') {\n _this._serverSheet.cssRules[index] = {\n cssText: rule\n };\n } else {\n _this._serverSheet.cssRules.push({\n cssText: rule\n });\n }\n\n return index;\n },\n deleteRule: function deleteRule(index) {\n _this._serverSheet.cssRules[index] = null;\n }\n };\n };\n\n _proto.getSheetForTag = function getSheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n }\n };\n\n _proto.getSheet = function getSheet() {\n return this.getSheetForTag(this._tags[this._tags.length - 1]);\n };\n\n _proto.insertRule = function insertRule(rule, index) {\n invariant(isString(rule), '`insertRule` accepts only strings');\n\n if (!this._isBrowser) {\n if (typeof index !== 'number') {\n index = this._serverSheet.cssRules.length;\n }\n\n this._serverSheet.insertRule(rule, index);\n\n return this._rulesCount++;\n }\n\n if (this._optimizeForSpeed) {\n var sheet = this.getSheet();\n\n if (typeof index !== 'number') {\n index = sheet.cssRules.length;\n } // this weirdness for perf, and chrome's weird bug\n // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule\n\n\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n\n return -1;\n }\n } else {\n var insertionPoint = this._tags[index];\n\n this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));\n }\n\n return this._rulesCount++;\n };\n\n _proto.replaceRule = function replaceRule(index, rule) {\n if (this._optimizeForSpeed || !this._isBrowser) {\n var sheet = this._isBrowser ? this.getSheet() : this._serverSheet;\n\n if (!rule.trim()) {\n rule = this._deletedRulePlaceholder;\n }\n\n if (!sheet.cssRules[index]) {\n // @TBD Should we throw an error?\n return index;\n }\n\n sheet.deleteRule(index);\n\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n } // In order to preserve the indices we insert a deleteRulePlaceholder\n\n\n sheet.insertRule(this._deletedRulePlaceholder, index);\n }\n } else {\n var tag = this._tags[index];\n invariant(tag, \"old rule at index `\" + index + \"` not found\");\n tag.textContent = rule;\n }\n\n return index;\n };\n\n _proto.deleteRule = function deleteRule(index) {\n if (!this._isBrowser) {\n this._serverSheet.deleteRule(index);\n\n return;\n }\n\n if (this._optimizeForSpeed) {\n this.replaceRule(index, '');\n } else {\n var tag = this._tags[index];\n invariant(tag, \"rule at index `\" + index + \"` not found\");\n tag.parentNode.removeChild(tag);\n this._tags[index] = null;\n }\n };\n\n _proto.flush = function flush() {\n this._injected = false;\n this._rulesCount = 0;\n\n if (this._isBrowser) {\n this._tags.forEach(function (tag) {\n return tag && tag.parentNode.removeChild(tag);\n });\n\n this._tags = [];\n } else {\n // simpler on server\n this._serverSheet.cssRules = [];\n }\n };\n\n _proto.cssRules = function cssRules() {\n var _this2 = this;\n\n if (!this._isBrowser) {\n return this._serverSheet.cssRules;\n }\n\n return this._tags.reduce(function (rules, tag) {\n if (tag) {\n rules = rules.concat(Array.prototype.map.call(_this2.getSheetForTag(tag).cssRules, function (rule) {\n return rule.cssText === _this2._deletedRulePlaceholder ? null : rule;\n }));\n } else {\n rules.push(null);\n }\n\n return rules;\n }, []);\n };\n\n _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {\n if (cssString) {\n invariant(isString(cssString), 'makeStyleTag acceps only strings as second parameter');\n }\n\n var tag = document.createElement('style');\n if (this._nonce) tag.setAttribute('nonce', this._nonce);\n tag.type = 'text/css';\n tag.setAttribute(\"data-\" + name, '');\n\n if (cssString) {\n tag.appendChild(document.createTextNode(cssString));\n }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n\n if (relativeToTag) {\n head.insertBefore(tag, relativeToTag);\n } else {\n head.appendChild(tag);\n }\n\n return tag;\n };\n\n _createClass(StyleSheet, [{\n key: \"length\",\n get: function get() {\n return this._rulesCount;\n }\n }]);\n\n return StyleSheet;\n}();\n\nexports[\"default\"] = StyleSheet;\n\nfunction invariant(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheet: \" + message + \".\");\n }\n}","\"use strict\";\n\nexports.__esModule = true;\nexports.flush = flush;\nexports[\"default\"] = void 0;\n\nvar _react = require(\"react\");\n\nvar _stylesheetRegistry = _interopRequireDefault(require(\"./stylesheet-registry\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\nvar styleSheetRegistry = new _stylesheetRegistry[\"default\"]();\n\nvar JSXStyle = /*#__PURE__*/function (_Component) {\n _inheritsLoose(JSXStyle, _Component);\n\n function JSXStyle(props) {\n var _this;\n\n _this = _Component.call(this, props) || this;\n _this.prevProps = {};\n return _this;\n }\n\n JSXStyle.dynamic = function dynamic(info) {\n return info.map(function (tagInfo) {\n var baseId = tagInfo[0];\n var props = tagInfo[1];\n return styleSheetRegistry.computeId(baseId, props);\n }).join(' ');\n } // probably faster than PureComponent (shallowEqual)\n ;\n\n var _proto = JSXStyle.prototype;\n\n _proto.shouldComponentUpdate = function shouldComponentUpdate(otherProps) {\n return this.props.id !== otherProps.id || // We do this check because `dynamic` is an array of strings or undefined.\n // These are the computed values for dynamic styles.\n String(this.props.dynamic) !== String(otherProps.dynamic);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n styleSheetRegistry.remove(this.props);\n };\n\n _proto.render = function render() {\n // This is a workaround to make the side effect async safe in the \"render\" phase.\n // See https://github.com/zeit/styled-jsx/pull/484\n if (this.shouldComponentUpdate(this.prevProps)) {\n // Updates\n if (this.prevProps.id) {\n styleSheetRegistry.remove(this.prevProps);\n }\n\n styleSheetRegistry.add(this.props);\n this.prevProps = this.props;\n }\n\n return null;\n };\n\n return JSXStyle;\n}(_react.Component);\n\nexports[\"default\"] = JSXStyle;\n\nfunction flush() {\n var cssRules = styleSheetRegistry.cssRules();\n styleSheetRegistry.flush();\n return cssRules;\n}","\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = void 0;\n\nvar _stringHash = _interopRequireDefault(require(\"string-hash\"));\n\nvar _stylesheet = _interopRequireDefault(require(\"./lib/stylesheet\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar sanitize = function sanitize(rule) {\n return rule.replace(/\\/style/gi, '\\\\/style');\n};\n\nvar StyleSheetRegistry = /*#__PURE__*/function () {\n function StyleSheetRegistry(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$styleSheet = _ref.styleSheet,\n styleSheet = _ref$styleSheet === void 0 ? null : _ref$styleSheet,\n _ref$optimizeForSpeed = _ref.optimizeForSpeed,\n optimizeForSpeed = _ref$optimizeForSpeed === void 0 ? false : _ref$optimizeForSpeed,\n _ref$isBrowser = _ref.isBrowser,\n isBrowser = _ref$isBrowser === void 0 ? typeof window !== 'undefined' : _ref$isBrowser;\n\n this._sheet = styleSheet || new _stylesheet[\"default\"]({\n name: 'styled-jsx',\n optimizeForSpeed: optimizeForSpeed\n });\n\n this._sheet.inject();\n\n if (styleSheet && typeof optimizeForSpeed === 'boolean') {\n this._sheet.setOptimizeForSpeed(optimizeForSpeed);\n\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n\n this._isBrowser = isBrowser;\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n this.computeId = this.createComputeId();\n this.computeSelector = this.createComputeSelector();\n }\n\n var _proto = StyleSheetRegistry.prototype;\n\n _proto.add = function add(props) {\n var _this = this;\n\n if (undefined === this._optimizeForSpeed) {\n this._optimizeForSpeed = Array.isArray(props.children);\n\n this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);\n\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n\n if (this._isBrowser && !this._fromServer) {\n this._fromServer = this.selectFromServer();\n this._instancesCounts = Object.keys(this._fromServer).reduce(function (acc, tagName) {\n acc[tagName] = 0;\n return acc;\n }, {});\n }\n\n var _this$getIdAndRules = this.getIdAndRules(props),\n styleId = _this$getIdAndRules.styleId,\n rules = _this$getIdAndRules.rules; // Deduping: just increase the instances count.\n\n\n if (styleId in this._instancesCounts) {\n this._instancesCounts[styleId] += 1;\n return;\n }\n\n var indices = rules.map(function (rule) {\n return _this._sheet.insertRule(rule);\n }) // Filter out invalid rules\n .filter(function (index) {\n return index !== -1;\n });\n this._indices[styleId] = indices;\n this._instancesCounts[styleId] = 1;\n };\n\n _proto.remove = function remove(props) {\n var _this2 = this;\n\n var _this$getIdAndRules2 = this.getIdAndRules(props),\n styleId = _this$getIdAndRules2.styleId;\n\n invariant(styleId in this._instancesCounts, \"styleId: `\" + styleId + \"` not found\");\n this._instancesCounts[styleId] -= 1;\n\n if (this._instancesCounts[styleId] < 1) {\n var tagFromServer = this._fromServer && this._fromServer[styleId];\n\n if (tagFromServer) {\n tagFromServer.parentNode.removeChild(tagFromServer);\n delete this._fromServer[styleId];\n } else {\n this._indices[styleId].forEach(function (index) {\n return _this2._sheet.deleteRule(index);\n });\n\n delete this._indices[styleId];\n }\n\n delete this._instancesCounts[styleId];\n }\n };\n\n _proto.update = function update(props, nextProps) {\n this.add(nextProps);\n this.remove(props);\n };\n\n _proto.flush = function flush() {\n this._sheet.flush();\n\n this._sheet.inject();\n\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n this.computeId = this.createComputeId();\n this.computeSelector = this.createComputeSelector();\n };\n\n _proto.cssRules = function cssRules() {\n var _this3 = this;\n\n var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function (styleId) {\n return [styleId, _this3._fromServer[styleId]];\n }) : [];\n\n var cssRules = this._sheet.cssRules();\n\n return fromServer.concat(Object.keys(this._indices).map(function (styleId) {\n return [styleId, _this3._indices[styleId].map(function (index) {\n return cssRules[index].cssText;\n }).join(_this3._optimizeForSpeed ? '' : '\\n')];\n }) // filter out empty rules\n .filter(function (rule) {\n return Boolean(rule[1]);\n }));\n }\n /**\n * createComputeId\n *\n * Creates a function to compute and memoize a jsx id from a basedId and optionally props.\n */\n ;\n\n _proto.createComputeId = function createComputeId() {\n var cache = {};\n return function (baseId, props) {\n if (!props) {\n return \"jsx-\" + baseId;\n }\n\n var propsToString = String(props);\n var key = baseId + propsToString; // return `jsx-${hashString(`${baseId}-${propsToString}`)}`\n\n if (!cache[key]) {\n cache[key] = \"jsx-\" + (0, _stringHash[\"default\"])(baseId + \"-\" + propsToString);\n }\n\n return cache[key];\n };\n }\n /**\n * createComputeSelector\n *\n * Creates a function to compute and memoize dynamic selectors.\n */\n ;\n\n _proto.createComputeSelector = function createComputeSelector(selectoPlaceholderRegexp) {\n if (selectoPlaceholderRegexp === void 0) {\n selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;\n }\n\n var cache = {};\n return function (id, css) {\n // Sanitize SSR-ed CSS.\n // Client side code doesn't need to be sanitized since we use\n // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).\n if (!this._isBrowser) {\n css = sanitize(css);\n }\n\n var idcss = id + css;\n\n if (!cache[idcss]) {\n cache[idcss] = css.replace(selectoPlaceholderRegexp, id);\n }\n\n return cache[idcss];\n };\n };\n\n _proto.getIdAndRules = function getIdAndRules(props) {\n var _this4 = this;\n\n var css = props.children,\n dynamic = props.dynamic,\n id = props.id;\n\n if (dynamic) {\n var styleId = this.computeId(id, dynamic);\n return {\n styleId: styleId,\n rules: Array.isArray(css) ? css.map(function (rule) {\n return _this4.computeSelector(styleId, rule);\n }) : [this.computeSelector(styleId, css)]\n };\n }\n\n return {\n styleId: this.computeId(id),\n rules: Array.isArray(css) ? css : [css]\n };\n }\n /**\n * selectFromServer\n *\n * Collects style tags from the document with id __jsx-XXX\n */\n ;\n\n _proto.selectFromServer = function selectFromServer() {\n var elements = Array.prototype.slice.call(document.querySelectorAll('[id^=\"__jsx-\"]'));\n return elements.reduce(function (acc, element) {\n var id = element.id.slice(2);\n acc[id] = element;\n return acc;\n }, {});\n };\n\n return StyleSheetRegistry;\n}();\n\nexports[\"default\"] = StyleSheetRegistry;\n\nfunction invariant(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheetRegistry: \" + message + \".\");\n }\n}","module.exports = require('./dist/style')\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar toStrTags = {};\nvar gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tif (typeof g[typedArray] === 'function') {\n\t\t\tvar arr = new g[typedArray]();\n\t\t\tif (Symbol.toStringTag in arr) {\n\t\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\t\tif (!descriptor) {\n\t\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t\t}\n\t\t\t\ttoStrTags[typedArray] = descriptor.get;\n\t\t\t}\n\t\t}\n\t});\n}\n\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\tvar foundName = false;\n\tforEach(toStrTags, function (getter, typedArray) {\n\t\tif (!foundName) {\n\t\t\ttry {\n\t\t\t\tvar name = getter.call(value);\n\t\t\t\tif (name === typedArray) {\n\t\t\t\t\tfoundName = name;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\t\t}\n\t});\n\treturn foundName;\n};\n\nvar isTypedArray = require('is-typed-array');\n\nmodule.exports = function whichTypedArray(value) {\n\tif (!isTypedArray(value)) { return false; }\n\tif (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }\n\treturn tryTypedArrays(value);\n};\n","module.exports = window[\"PropTypes\"];","module.exports = window[\"React\"];","module.exports = window[\"ReactDOM\"];","'use strict';\n\nvar possibleNames = [\n\t'BigInt64Array',\n\t'BigUint64Array',\n\t'Float32Array',\n\t'Float64Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Int8Array',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray'\n];\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\nmodule.exports = function availableTypedArrays() {\n\tvar out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","export default function _isTransformer(obj) {\n return obj != null && typeof obj['@@transducer/step'] === 'function';\n}","import _isArray from \"./_isArray.js\";\nimport _isTransformer from \"./_isTransformer.js\";\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer created by [transducerCreator] to return a new transformer\n * (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} transducerCreator transducer factory if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\n\nexport default function _dispatchable(methodNames, transducerCreator, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n\n var obj = arguments[arguments.length - 1];\n\n if (!_isArray(obj)) {\n var idx = 0;\n\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1));\n }\n\n idx += 1;\n }\n\n if (_isTransformer(obj)) {\n var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1));\n return transducer(obj);\n }\n }\n\n return fn.apply(this, arguments);\n };\n}","export default {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _curry1 from \"./_curry1.js\";\nimport _isArray from \"./_isArray.js\";\nimport _isString from \"./_isString.js\";\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n * _isArrayLike({nodeType: 1, length: 1}) // => false\n */\n\nvar _isArrayLike =\n/*#__PURE__*/\n_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n\n if (!x) {\n return false;\n }\n\n if (typeof x !== 'object') {\n return false;\n }\n\n if (_isString(x)) {\n return false;\n }\n\n if (x.length === 0) {\n return true;\n }\n\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n\n return false;\n});\n\nexport default _isArrayLike;","var XWrap =\n/*#__PURE__*/\nfunction () {\n function XWrap(fn) {\n this.f = fn;\n }\n\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n\n return XWrap;\n}();\n\nexport default function _xwrap(fn) {\n return new XWrap(fn);\n}","export default function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}","import _arity from \"./internal/_arity.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\n\nvar bind =\n/*#__PURE__*/\n_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\n\nexport default bind;","import _isArrayLike from \"./_isArrayLike.js\";\nimport _xwrap from \"./_xwrap.js\";\nimport bind from \"../bind.js\";\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n idx += 1;\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n step = iter.next();\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nexport default function _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XMap =\n/*#__PURE__*/\nfunction () {\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n\n return XMap;\n}();\n\nvar _xmap =\n/*#__PURE__*/\n_curry2(function _xmap(f, xf) {\n return new XMap(f, xf);\n});\n\nexport default _xmap;","import _arity from \"./_arity.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n\n combined[combinedIdx] = result;\n\n if (!_isPlaceholder(result)) {\n left -= 1;\n }\n\n combinedIdx += 1;\n }\n\n return left <= 0 ? fn.apply(this, combined) : _arity(left, _curryN(length, combined, fn));\n };\n}","import _arity from \"./internal/_arity.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _curryN from \"./internal/_curryN.js\";\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * const sumArgs = (...args) => R.sum(args);\n *\n * const curriedAddFourNumbers = R.curryN(4, sumArgs);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n */\n\nvar curryN =\n/*#__PURE__*/\n_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n\n return _arity(length, _curryN(length, [], fn));\n});\n\nexport default curryN;","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _has from \"./_has.js\";\nvar toString = Object.prototype.toString;\n\nvar _isArguments =\n/*#__PURE__*/\nfunction () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\nimport _isArguments from \"./internal/_isArguments.js\"; // cover IE < 9 keys issues\n\nvar hasEnumBug = !\n/*#__PURE__*/\n{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug\n\nvar hasArgsEnumBug =\n/*#__PURE__*/\nfunction () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n};\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values, R.toPairs\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\n\n\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?\n/*#__PURE__*/\n_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) :\n/*#__PURE__*/\n_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n\n var prop, nIdx;\n var ks = [];\n\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n\n nIdx -= 1;\n }\n }\n\n return ks;\n});\nexport default keys;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _map from \"./internal/_map.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _xmap from \"./internal/_xmap.js\";\nimport curryN from \"./curryN.js\";\nimport keys from \"./keys.js\";\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex, R.pluck, R.project\n * @example\n *\n * const double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\n\nvar map =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n\n case '[object Object]':\n return _reduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys(functor));\n\n default:\n return _map(fn, functor);\n }\n}));\n\nexport default map;","export default function _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n\n return result;\n}","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _curry2 from \"./internal/_curry2.js\";\nimport _isString from \"./internal/_isString.js\";\n/**\n * Returns the nth element of the given list or string. If n is negative the\n * element at index length + n is returned.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> a | Undefined\n * @sig Number -> String -> String\n * @param {Number} offset\n * @param {*} list\n * @return {*}\n * @example\n *\n * const list = ['foo', 'bar', 'baz', 'quux'];\n * R.nth(1, list); //=> 'bar'\n * R.nth(-1, list); //=> 'quux'\n * R.nth(-99, list); //=> undefined\n *\n * R.nth(2, 'abc'); //=> 'c'\n * R.nth(3, 'abc'); //=> ''\n * @symb R.nth(-1, [a, b, c]) = c\n * @symb R.nth(0, [a, b, c]) = a\n * @symb R.nth(1, [a, b, c]) = b\n */\n\nvar nth =\n/*#__PURE__*/\n_curry2(function nth(offset, list) {\n var idx = offset < 0 ? list.length + offset : offset;\n return _isString(list) ? list.charAt(idx) : list[idx];\n});\n\nexport default nth;","import _curry2 from \"./internal/_curry2.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport nth from \"./nth.js\";\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig Idx -> {s: a} -> a | Undefined\n * @param {String|Number} p The property name or array index\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path, R.props, R.pluck, R.project, R.nth\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n * R.prop(0, [100]); //=> 100\n * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\nvar prop =\n/*#__PURE__*/\n_curry2(function prop(p, obj) {\n if (obj == null) {\n return;\n }\n\n return _isInteger(p) ? nth(p, obj) : obj[p];\n});\n\nexport default prop;","import _curry2 from \"./internal/_curry2.js\";\nimport map from \"./map.js\";\nimport prop from \"./prop.js\";\n/**\n * Returns a new list by plucking the same named property off all objects in\n * the list supplied.\n *\n * `pluck` will work on\n * any [functor](https://github.com/fantasyland/fantasy-land#functor) in\n * addition to arrays, as it is equivalent to `R.map(R.prop(k), f)`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => k -> f {k: v} -> f v\n * @param {Number|String} key The key name to pluck off of each object.\n * @param {Array} f The array or functor to consider.\n * @return {Array} The list of values for the given key.\n * @see R.project, R.prop, R.props\n * @example\n *\n * var getAges = R.pluck('age');\n * getAges([{name: 'fred', age: 29}, {name: 'wilma', age: 27}]); //=> [29, 27]\n *\n * R.pluck(0, [[1, 2], [3, 4]]); //=> [1, 3]\n * R.pluck('val', {a: {val: 3}, b: {val: 5}}); //=> {a: 3, b: 5}\n * @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5]\n * @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5]\n */\n\nvar pluck =\n/*#__PURE__*/\n_curry2(function pluck(p, list) {\n return map(prop(p), list);\n});\n\nexport default pluck;","import _curry1 from \"./_curry1.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}","import _concat from \"./_concat.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XAperture =\n/*#__PURE__*/\nfunction () {\n function XAperture(n, xf) {\n this.xf = xf;\n this.pos = 0;\n this.full = false;\n this.acc = new Array(n);\n }\n\n XAperture.prototype['@@transducer/init'] = _xfBase.init;\n\n XAperture.prototype['@@transducer/result'] = function (result) {\n this.acc = null;\n return this.xf['@@transducer/result'](result);\n };\n\n XAperture.prototype['@@transducer/step'] = function (result, input) {\n this.store(input);\n return this.full ? this.xf['@@transducer/step'](result, this.getCopy()) : result;\n };\n\n XAperture.prototype.store = function (input) {\n this.acc[this.pos] = input;\n this.pos += 1;\n\n if (this.pos === this.acc.length) {\n this.pos = 0;\n this.full = true;\n }\n };\n\n XAperture.prototype.getCopy = function () {\n return _concat(Array.prototype.slice.call(this.acc, this.pos), Array.prototype.slice.call(this.acc, 0, this.pos));\n };\n\n return XAperture;\n}();\n\nvar _xaperture =\n/*#__PURE__*/\n_curry2(function _xaperture(n, xf) {\n return new XAperture(n, xf);\n});\n\nexport default _xaperture;","import _concat from \"./internal/_concat.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a new list containing the contents of the given list, followed by\n * the given element.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig a -> [a] -> [a]\n * @param {*} el The element to add to the end of the new list.\n * @param {Array} list The list of elements to add a new item to.\n * list.\n * @return {Array} A new list containing the elements of the old list followed by `el`.\n * @see R.prepend\n * @example\n *\n * R.append('tests', ['write', 'more']); //=> ['write', 'more', 'tests']\n * R.append('tests', []); //=> ['tests']\n * R.append(['tests'], ['write', 'more']); //=> ['write', 'more', ['tests']]\n */\n\nvar append =\n/*#__PURE__*/\n_curry2(function append(el, list) {\n return _concat(list, [el]);\n});\n\nexport default append;","/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nexport default function _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n idx = 0;\n\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n\n idx = 0;\n\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n\n return result;\n}","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\n\nvar isNil =\n/*#__PURE__*/\n_curry1(function isNil(x) {\n return x == null;\n});\n\nexport default isNil;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\nimport _isInteger from \"./internal/_isInteger.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport isNil from \"./isNil.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the nodes required\n * to create the given path, and placing the specific value at the tail end of\n * that path. Note that this copies and flattens prototype properties onto the\n * new object as well. All non-primitive properties are copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> a -> {a} -> {a}\n * @param {Array} path the path to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except along the specified path.\n * @see R.dissocPath\n * @example\n *\n * R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}}\n *\n * // Any missing or non-object keys in path will be overridden\n * R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}}\n */\n\nvar assocPath =\n/*#__PURE__*/\n_curry3(function assocPath(path, val, obj) {\n if (path.length === 0) {\n return val;\n }\n\n var idx = path[0];\n\n if (path.length > 1) {\n var nextObj = !isNil(obj) && _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {};\n val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj);\n }\n\n return _assoc(idx, val, obj);\n});\n\nexport default assocPath;","import _isArray from \"./_isArray.js\";\nimport _isInteger from \"./_isInteger.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @private\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object|Array} obj The object to clone\n * @return {Object|Array} A new object equivalent to the original except for the changed property.\n */\n\nexport default function _assoc(prop, val, obj) {\n if (_isInteger(prop) && _isArray(obj)) {\n var arr = [].concat(obj);\n arr[prop] = val;\n return arr;\n }\n\n var result = {};\n\n for (var p in obj) {\n result[p] = obj[p];\n }\n\n result[prop] = val;\n return result;\n}","import _curry3 from \"./internal/_curry3.js\";\nimport assocPath from \"./assocPath.js\";\n/**\n * Makes a shallow clone of an object, setting or overriding the specified\n * property with the given value. Note that this copies and flattens prototype\n * properties onto the new object as well. All non-primitive properties are\n * copied by reference.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @typedefn Idx = String | Int\n * @sig Idx -> a -> {k: v} -> {k: v}\n * @param {String|Number} prop The property name to set\n * @param {*} val The new value\n * @param {Object} obj The object to clone\n * @return {Object} A new object equivalent to the original except for the changed property.\n * @see R.dissoc, R.pick\n * @example\n *\n * R.assoc('c', 3, {a: 1, b: 2}); //=> {a: 1, b: 2, c: 3}\n */\n\nvar assoc =\n/*#__PURE__*/\n_curry3(function assoc(prop, val, obj) {\n return assocPath([prop], val, obj);\n});\n\nexport default assoc;","import _curry1 from \"./internal/_curry1.js\";\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\n\nvar type =\n/*#__PURE__*/\n_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\n\nexport default type;","import _cloneRegExp from \"./_cloneRegExp.js\";\nimport type from \"../type.js\";\n/**\n * Copies an object.\n *\n * @private\n * @param {*} value The value to be copied\n * @param {Array} refFrom Array containing the source references\n * @param {Array} refTo Array containing the copied source references\n * @param {Boolean} deep Whether or not to perform deep cloning.\n * @return {*} The copied value.\n */\n\nexport default function _clone(value, refFrom, refTo, deep) {\n var copy = function copy(copiedValue) {\n var len = refFrom.length;\n var idx = 0;\n\n while (idx < len) {\n if (value === refFrom[idx]) {\n return refTo[idx];\n }\n\n idx += 1;\n }\n\n refFrom[idx] = value;\n refTo[idx] = copiedValue;\n\n for (var key in value) {\n if (value.hasOwnProperty(key)) {\n copiedValue[key] = deep ? _clone(value[key], refFrom, refTo, true) : value[key];\n }\n }\n\n return copiedValue;\n };\n\n switch (type(value)) {\n case 'Object':\n return copy(Object.create(Object.getPrototypeOf(value)));\n\n case 'Array':\n return copy([]);\n\n case 'Date':\n return new Date(value.valueOf());\n\n case 'RegExp':\n return _cloneRegExp(value);\n\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'BigInt64Array':\n case 'BigUint64Array':\n return value.slice();\n\n default:\n return value;\n }\n}","export default function _cloneRegExp(pattern) {\n return new RegExp(pattern.source, (pattern.global ? 'g' : '') + (pattern.ignoreCase ? 'i' : '') + (pattern.multiline ? 'm' : '') + (pattern.sticky ? 'y' : '') + (pattern.unicode ? 'u' : ''));\n}","import _clone from \"./internal/_clone.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n/**\n * Creates a deep copy of the source that can be used in place of the source\n * object without retaining any references to it.\n * The source object may contain (nested) `Array`s and `Object`s,\n * `Number`s, `String`s, `Boolean`s and `Date`s.\n * `Function`s are assigned by reference rather than copied.\n *\n * Dispatches to a `clone` method if present.\n *\n * Note that if the source object has multiple nodes that share a reference,\n * the returned object will have the same structure, but the references will\n * be pointed to the location within the cloned value.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {*} -> {*}\n * @param {*} value The object or array to clone\n * @return {*} A deeply cloned copy of `val`\n * @example\n *\n * const objects = [{}, {}, {}];\n * const objectsClone = R.clone(objects);\n * objects === objectsClone; //=> false\n * objects[0] === objectsClone[0]; //=> false\n */\n\nvar clone =\n/*#__PURE__*/\n_curry1(function clone(value) {\n return value != null && typeof value.clone === 'function' ? value.clone() : _clone(value, [], [], true);\n});\n\nexport default clone;","export default function _arrayFromIterator(iter) {\n var list = [];\n var next;\n\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n\n return list;\n}","export default function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n}","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","import _arrayFromIterator from \"./_arrayFromIterator.js\";\nimport _includesWith from \"./_includesWith.js\";\nimport _functionName from \"./_functionName.js\";\nimport _has from \"./_has.js\";\nimport _objectIs from \"./_objectIs.js\";\nimport keys from \"../keys.js\";\nimport type from \"../type.js\";\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparison of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n } // if *a* array contains any element that is not included in *b*\n\n\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nexport default function _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n\n break;\n\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n\n break;\n\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n\n break;\n\n case 'Error':\n return a.name === b.name && a.message === b.message;\n\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n\n break;\n }\n\n var idx = stackA.length - 1;\n\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n idx = keysA.length - 1;\n\n while (idx >= 0) {\n var key = keysA[idx];\n\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n\n idx -= 1;\n }\n\n return true;\n}","export default function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _equals from \"./internal/_equals.js\";\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\n\nvar equals =\n/*#__PURE__*/\n_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\n\nexport default equals;","import _indexOf from \"./_indexOf.js\";\nexport default function _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}","import equals from \"../equals.js\";\nexport default function _indexOf(list, a, idx) {\n var inf, item; // Array.prototype.indexOf doesn't exist below IE9\n\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n\n while (idx < list.length) {\n item = list[idx];\n\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n } // non-zero numbers can utilise Set\n\n\n return list.indexOf(a, idx);\n // all these types can utilise Set\n\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n\n }\n } // anything else not covered above, defer to R.equals\n\n\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n\n idx += 1;\n }\n\n return -1;\n}","export default function _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}","/**\n * Polyfill from .\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nexport default _toISOString;","import _curry2 from \"./_curry2.js\";\nimport _xfBase from \"./_xfBase.js\";\n\nvar XFilter =\n/*#__PURE__*/\nfunction () {\n function XFilter(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n\n XFilter.prototype['@@transducer/init'] = _xfBase.init;\n XFilter.prototype['@@transducer/result'] = _xfBase.result;\n\n XFilter.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n };\n\n return XFilter;\n}();\n\nvar _xfilter =\n/*#__PURE__*/\n_curry2(function _xfilter(f, xf) {\n return new XFilter(f, xf);\n});\n\nexport default _xfilter;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _filter from \"./internal/_filter.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _reduce from \"./internal/_reduce.js\";\nimport _xfilter from \"./internal/_xfilter.js\";\nimport keys from \"./keys.js\";\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar filter =\n/*#__PURE__*/\n_curry2(\n/*#__PURE__*/\n_dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filterable) {\n return _isObject(filterable) ? _reduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n\n return acc;\n }, {}, keys(filterable)) : // else\n _filter(pred, filterable);\n}));\n\nexport default filter;","export default function _filter(fn, list) {\n var idx = 0;\n var len = list.length;\n var result = [];\n\n while (idx < len) {\n if (fn(list[idx])) {\n result[result.length] = list[idx];\n }\n\n idx += 1;\n }\n\n return result;\n}","import _complement from \"./internal/_complement.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport filter from \"./filter.js\";\n/**\n * The complement of [`filter`](#filter).\n *\n * Acts as a transducer if a transformer is given in list position. Filterable\n * objects include plain objects or any object that has a filter method such\n * as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array}\n * @see R.filter, R.transduce, R.addIndex\n * @example\n *\n * const isOdd = (n) => n % 2 !== 0;\n *\n * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\n\nvar reject =\n/*#__PURE__*/\n_curry2(function reject(pred, filterable) {\n return filter(_complement(pred), filterable);\n});\n\nexport default reject;","export default function _complement(f) {\n return function () {\n return !f.apply(this, arguments);\n };\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _isArguments from \"./internal/_isArguments.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _isString from \"./internal/_isString.js\";\nimport _isTypedArray from \"./internal/_isTypedArray.js\";\n/**\n * Returns the empty value of its argument's type. Ramda defines the empty\n * value of Array (`[]`), Object (`{}`), String (`''`),\n * TypedArray (`Uint8Array []`, `Float32Array []`, etc), and Arguments. Other\n * types are supported if they define `.empty`,\n * `.prototype.empty` or implement the\n * [FantasyLand Monoid spec](https://github.com/fantasyland/fantasy-land#monoid).\n *\n * Dispatches to the `empty` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Function\n * @sig a -> a\n * @param {*} x\n * @return {*}\n * @example\n *\n * R.empty(Just(42)); //=> Nothing()\n * R.empty([1, 2, 3]); //=> []\n * R.empty('unicorns'); //=> ''\n * R.empty({x: 1, y: 2}); //=> {}\n * R.empty(Uint8Array.from('123')); //=> Uint8Array []\n */\n\nvar empty =\n/*#__PURE__*/\n_curry1(function empty(x) {\n return x != null && typeof x['fantasy-land/empty'] === 'function' ? x['fantasy-land/empty']() : x != null && x.constructor != null && typeof x.constructor['fantasy-land/empty'] === 'function' ? x.constructor['fantasy-land/empty']() : x != null && typeof x.empty === 'function' ? x.empty() : x != null && x.constructor != null && typeof x.constructor.empty === 'function' ? x.constructor.empty() : _isArray(x) ? [] : _isString(x) ? '' : _isObject(x) ? {} : _isArguments(x) ? function () {\n return arguments;\n }() : _isTypedArray(x) ? x.constructor.from('') : void 0 // else\n ;\n});\n\nexport default empty;","/**\n * Tests whether or not an object is a typed array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is a typed array, `false` otherwise.\n * @example\n *\n * _isTypedArray(new Uint8Array([])); //=> true\n * _isTypedArray(new Float32Array([])); //=> true\n * _isTypedArray([]); //=> false\n * _isTypedArray(null); //=> false\n * _isTypedArray({}); //=> false\n */\nexport default function _isTypedArray(val) {\n var type = Object.prototype.toString.call(val);\n return type === '[object Uint8ClampedArray]' || type === '[object Int8Array]' || type === '[object Uint8Array]' || type === '[object Int16Array]' || type === '[object Uint16Array]' || type === '[object Int32Array]' || type === '[object Uint32Array]' || type === '[object Float32Array]' || type === '[object Float64Array]' || type === '[object BigInt64Array]' || type === '[object BigUint64Array]';\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _has from \"./internal/_has.js\";\nimport isNil from \"./isNil.js\";\n/**\n * Returns whether or not a path exists in an object. Only the object's\n * own properties are checked.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig [Idx] -> {a} -> Boolean\n * @param {Array} path The path to use.\n * @param {Object} obj The object to check the path in.\n * @return {Boolean} Whether the path exists.\n * @see R.has\n * @example\n *\n * R.hasPath(['a', 'b'], {a: {b: 2}}); // => true\n * R.hasPath(['a', 'b'], {a: {b: undefined}}); // => true\n * R.hasPath(['a', 'b'], {a: {c: 2}}); // => false\n * R.hasPath(['a', 'b'], {}); // => false\n */\n\nvar hasPath =\n/*#__PURE__*/\n_curry2(function hasPath(_path, obj) {\n if (_path.length === 0 || isNil(obj)) {\n return false;\n }\n\n var val = obj;\n var idx = 0;\n\n while (idx < _path.length) {\n if (!isNil(val) && _has(_path[idx], val)) {\n val = val[_path[idx]];\n idx += 1;\n } else {\n return false;\n }\n }\n\n return true;\n});\n\nexport default hasPath;","import _curry2 from \"./internal/_curry2.js\";\nimport hasPath from \"./hasPath.js\";\n/**\n * Returns whether or not an object has an own property with the specified name\n *\n * @func\n * @memberOf R\n * @since v0.7.0\n * @category Object\n * @sig s -> {s: x} -> Boolean\n * @param {String} prop The name of the property to check for.\n * @param {Object} obj The object to query.\n * @return {Boolean} Whether the property exists.\n * @example\n *\n * const hasName = R.has('name');\n * hasName({name: 'alice'}); //=> true\n * hasName({name: 'bob'}); //=> true\n * hasName({}); //=> false\n *\n * const point = {x: 0, y: 0};\n * const pointHas = R.has(R.__, point);\n * pointHas('x'); //=> true\n * pointHas('y'); //=> true\n * pointHas('z'); //=> false\n */\n\nvar has =\n/*#__PURE__*/\n_curry2(function has(prop, obj) {\n return hasPath([prop], obj);\n});\n\nexport default has;","export default function _identity(x) {\n return x;\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _identity from \"./internal/_identity.js\";\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\n\nvar identity =\n/*#__PURE__*/\n_curry1(_identity);\n\nexport default identity;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Also works with strings.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.includes(3, [1, 2, 3]); //=> true\n * R.includes(4, [1, 2, 3]); //=> false\n * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.includes([42], [[42]]); //=> true\n * R.includes('ba', 'banana'); //=>true\n */\n\nvar includes =\n/*#__PURE__*/\n_curry2(_includes);\n\nexport default includes;","import _has from \"./_has.js\"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n\n while (idx < length) {\n var source = arguments[idx];\n\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n\n idx += 1;\n }\n\n return output;\n}\n\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * See if an object (i.e. `val`) is an instance of the supplied constructor. This\n * function will check up the inheritance chain, if any.\n * If `val` was created using `Object.create`, `R.is(Object, val) === true`.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category Type\n * @sig (* -> {*}) -> a -> Boolean\n * @param {Object} ctor A constructor\n * @param {*} val The value to test\n * @return {Boolean}\n * @example\n *\n * R.is(Object, {}); //=> true\n * R.is(Number, 1); //=> true\n * R.is(Object, 1); //=> false\n * R.is(String, 's'); //=> true\n * R.is(String, new String('')); //=> true\n * R.is(Object, new String('')); //=> true\n * R.is(Object, 's'); //=> false\n * R.is(Number, {}); //=> false\n */\n\nvar is =\n/*#__PURE__*/\n_curry2(function is(Ctor, val) {\n return val instanceof Ctor || val != null && (val.constructor === Ctor || Ctor.name === 'Object' && typeof val === 'object');\n});\n\nexport default is;","import _curry1 from \"./internal/_curry1.js\";\nimport empty from \"./empty.js\";\nimport equals from \"./equals.js\";\n/**\n * Returns `true` if the given value is its type's empty value; `false`\n * otherwise.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Logic\n * @sig a -> Boolean\n * @param {*} x\n * @return {Boolean}\n * @see R.empty\n * @example\n *\n * R.isEmpty([1, 2, 3]); //=> false\n * R.isEmpty([]); //=> true\n * R.isEmpty(''); //=> true\n * R.isEmpty(null); //=> false\n * R.isEmpty({}); //=> true\n * R.isEmpty({length: 0}); //=> false\n * R.isEmpty(Uint8Array.from('')); //=> true\n */\n\nvar isEmpty =\n/*#__PURE__*/\n_curry1(function isEmpty(x) {\n return x != null && equals(x, empty(x));\n});\n\nexport default isEmpty;","import _arity from \"./internal/_arity.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _has from \"./internal/_has.js\";\n/**\n * Creates a new function that, when invoked, caches the result of calling `fn`\n * for a given argument set and returns the result. Subsequent calls to the\n * memoized `fn` with the same argument set will not result in an additional\n * call to `fn`; instead, the cached result for that set of arguments will be\n * returned.\n *\n * Care must be taken when implementing key generation to avoid key collision,\n * or if tracking references, memory leaks and mutating arguments.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Function\n * @sig (*... -> String) -> (*... -> a) -> (*... -> a)\n * @param {Function} fn The function to generate the cache key.\n * @param {Function} fn The function to memoize.\n * @return {Function} Memoized version of `fn`.\n * @example\n *\n * let count = 0;\n * const factorial = R.memoizeWith(Number, n => {\n * count += 1;\n * return R.product(R.range(1, n + 1));\n * });\n * factorial(5); //=> 120\n * factorial(5); //=> 120\n * factorial(5); //=> 120\n * count; //=> 1\n */\n\nvar memoizeWith =\n/*#__PURE__*/\n_curry2(function memoizeWith(mFn, fn) {\n var cache = {};\n return _arity(fn.length, function () {\n var key = mFn.apply(this, arguments);\n\n if (!_has(key, cache)) {\n cache[key] = fn.apply(this, arguments);\n }\n\n return cache[key];\n });\n});\n\nexport default memoizeWith;","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\n/**\n * Creates a new object with the own properties of the two provided objects. If\n * a key exists in both objects, the provided function is applied to the key\n * and the values associated with the key in each object, with the result being\n * used as the value associated with the key in the returned object.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepWithKey, R.merge, R.mergeWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeWithKey(concatValues,\n * { a: true, thing: 'foo', values: [10, 20] },\n * { b: true, thing: 'bar', values: [15, 35] });\n * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] }\n * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 }\n */\n\nvar mergeWithKey =\n/*#__PURE__*/\n_curry3(function mergeWithKey(fn, l, r) {\n var result = {};\n var k;\n\n for (k in l) {\n if (_has(k, l)) {\n result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k];\n }\n }\n\n for (k in r) {\n if (_has(k, r) && !_has(k, result)) {\n result[k] = r[k];\n }\n }\n\n return result;\n});\n\nexport default mergeWithKey;","import _curry3 from \"./internal/_curry3.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport mergeWithKey from \"./mergeWithKey.js\";\n/**\n * Creates a new object with the own properties of the two provided objects.\n * If a key exists in both objects:\n * - and both associated values are also objects then the values will be\n * recursively merged.\n * - otherwise the provided function is applied to the key and associated values\n * using the resulting value as the new value associated with the key.\n * If a key only exists in one object, the value will be associated with the key\n * of the resulting object.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeWithKey, R.mergeDeepWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeDeepWithKey(concatValues,\n * { a: true, c: { thing: 'foo', values: [10, 20] }},\n * { b: true, c: { thing: 'bar', values: [15, 35] }});\n * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }}\n */\n\nvar mergeDeepWithKey =\n/*#__PURE__*/\n_curry3(function mergeDeepWithKey(fn, lObj, rObj) {\n return mergeWithKey(function (k, lVal, rVal) {\n if (_isObject(lVal) && _isObject(rVal)) {\n return mergeDeepWithKey(fn, lVal, rVal);\n } else {\n return fn(k, lVal, rVal);\n }\n }, lObj, rObj);\n});\n\nexport default mergeDeepWithKey;","import _curry2 from \"./internal/_curry2.js\";\nimport mergeDeepWithKey from \"./mergeDeepWithKey.js\";\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.merge, R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n * { age: 40, contact: { email: 'baa@example.com' }});\n * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }}\n */\n\nvar mergeDeepRight =\n/*#__PURE__*/\n_curry2(function mergeDeepRight(lObj, rObj) {\n return mergeDeepWithKey(function (k, lVal, rVal) {\n return rVal;\n }, lObj, rObj);\n});\n\nexport default mergeDeepRight;","import _objectAssign from \"./internal/_objectAssign.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * const withDefaults = R.mergeRight({x: 0, y: 0});\n * withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeRight(a, b) = {...a, ...b}\n */\n\nvar mergeRight =\n/*#__PURE__*/\n_curry2(function mergeRight(l, r) {\n return _objectAssign({}, l, r);\n});\n\nexport default mergeRight;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\n\nvar omit =\n/*#__PURE__*/\n_curry2(function omit(names, obj) {\n var result = {};\n var index = {};\n var idx = 0;\n var len = names.length;\n\n while (idx < len) {\n index[names[idx]] = 1;\n idx += 1;\n }\n\n for (var prop in obj) {\n if (!index.hasOwnProperty(prop)) {\n result[prop] = obj[prop];\n }\n }\n\n return result;\n});\n\nexport default omit;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object containing only the keys specified. If\n * the key does not exist, the property is ignored.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> {k: v}\n * @param {Array} names an array of String property names to copy onto a new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties from `names` on it.\n * @see R.omit, R.props\n * @example\n *\n * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}\n * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}\n */\n\nvar pick =\n/*#__PURE__*/\n_curry2(function pick(names, obj) {\n var result = {};\n var idx = 0;\n\n while (idx < names.length) {\n if (names[idx] in obj) {\n result[names[idx]] = obj[names[idx]];\n }\n\n idx += 1;\n }\n\n return result;\n});\n\nexport default pick;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object containing only the keys that satisfy\n * the supplied predicate.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Object\n * @sig ((v, k) -> Boolean) -> {k: v} -> {k: v}\n * @param {Function} pred A predicate to determine whether or not a key\n * should be included on the output object.\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties that satisfy `pred`\n * on it.\n * @see R.pick, R.filter\n * @example\n *\n * const isUpperCase = (val, key) => key.toUpperCase() === key;\n * R.pickBy(isUpperCase, {a: 1, b: 2, A: 3, B: 4}); //=> {A: 3, B: 4}\n */\n\nvar pickBy =\n/*#__PURE__*/\n_curry2(function pickBy(test, obj) {\n var result = {};\n\n for (var prop in obj) {\n if (test(obj[prop], prop, obj)) {\n result[prop] = obj[prop];\n }\n }\n\n return result;\n});\n\nexport default pickBy;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n/**\n * Returns a new function much like the supplied one, except that the first two\n * arguments' order is reversed.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig ((a, b, c, ...) -> z) -> (b -> a -> c -> ... -> z)\n * @param {Function} fn The function to invoke with its first two parameters reversed.\n * @return {*} The result of invoking `fn` with its first two parameters' order reversed.\n * @example\n *\n * const mergeThree = (a, b, c) => [].concat(a, b, c);\n *\n * mergeThree(1, 2, 3); //=> [1, 2, 3]\n *\n * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]\n * @symb R.flip(f)(a, b, c) = f(b, a, c)\n */\n\nvar flip =\n/*#__PURE__*/\n_curry1(function flip(fn) {\n return curryN(fn.length, function (a, b) {\n var args = Array.prototype.slice.call(arguments, 0);\n args[0] = b;\n args[1] = a;\n return fn.apply(this, args);\n });\n});\n\nexport default flip;","import _curry1 from \"./internal/_curry1.js\";\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\n\nvar trim = !hasProtoTrim ||\n/*#__PURE__*/\nws.trim() || !\n/*#__PURE__*/\nzeroWidth.trim() ?\n/*#__PURE__*/\n_curry1(function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n}) :\n/*#__PURE__*/\n_curry1(function trim(str) {\n return str.trim();\n});\nexport default trim;","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport flip from \"./flip.js\";\nimport reject from \"./reject.js\";\n/**\n * Returns a new list without values in the first argument.\n * [`R.equals`](#equals) is used to determine equality.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @param {Array} list1 The values to be removed from `list2`.\n * @param {Array} list2 The array to remove values from.\n * @return {Array} The new array without values in `list1`.\n * @see R.transduce, R.difference, R.remove\n * @example\n *\n * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4]\n */\n\nvar without =\n/*#__PURE__*/\n_curry2(function (xs, list) {\n return reject(flip(_includes)(xs), list);\n});\n\nexport default without;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"132\":\"dash_core_components-shared\",\"154\":\"async-slider\",\"196\":\"async-graph\",\"583\":\"async-plotlyjs\",\"673\":\"async-upload\",\"682\":\"async-mathjax\",\"754\":\"async-markdown\",\"790\":\"async-highlight\",\"792\":\"async-dropdown\",\"813\":\"async-datepicker\"}[chunkId] + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","var getCurrentScript = function() {\n var script = document.currentScript;\n if (!script) {\n /* Shim for IE11 and below */\n /* Do not take into account async scripts and inline scripts */\n\n var doc_scripts = document.getElementsByTagName('script');\n var scripts = [];\n\n for (var i = 0; i < doc_scripts.length; i++) {\n scripts.push(doc_scripts[i]);\n }\n\n scripts = scripts.filter(function(s) { return !s.async && !s.text && !s.textContent; });\n script = scripts.slice(-1)[0];\n }\n\n return script;\n};\n\nvar isLocalScript = function(script) {\n return /\\/_dash-component-suites\\//.test(script.src);\n};\n\nObject.defineProperty(__webpack_require__, 'p', {\n get: (function () {\n var script = getCurrentScript();\n\n var url = script.src.split('/').slice(0, -1).join('/') + '/';\n\n return function() {\n return url;\n };\n })()\n});\n\nif (typeof jsonpScriptSrc !== 'undefined') {\n var __jsonpScriptSrc__ = jsonpScriptSrc;\n jsonpScriptSrc = function(chunkId) {\n var script = getCurrentScript();\n var isLocal = isLocalScript(script);\n\n var src = __jsonpScriptSrc__(chunkId);\n\n if(!isLocal) {\n return src;\n }\n\n var srcFragments = src.split('/');\n var fileFragments = srcFragments.slice(-1)[0].split('.');\n\n fileFragments.splice(1, 0, \"v2_8_0m1674572531\");\n srcFragments.splice(-1, 1, fileFragments.join('.'))\n\n return srcFragments.join('/');\n };\n}\n","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t179: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdash_core_components\"] = self[\"webpackChunkdash_core_components\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","import PropTypes from 'prop-types';\nimport {append, includes, without} from 'ramda';\nimport React, {Component} from 'react';\nimport {sanitizeOptions} from '../utils/optionTypes';\n\n/**\n * Checklist is a component that encapsulates several checkboxes.\n * The values and labels of the checklist are specified in the `options`\n * property and the checked items are specified with the `value` property.\n * Each checkbox is rendered as an input with a surrounding label.\n */\nexport default class Checklist extends Component {\n render() {\n const {\n className,\n id,\n inputClassName,\n inputStyle,\n labelClassName,\n labelStyle,\n options,\n setProps,\n style,\n loading_state,\n value,\n inline,\n } = this.props;\n return (\n \n {sanitizeOptions(options).map(option => {\n return (\n \n {\n let newValue;\n if (includes(option.value, value)) {\n newValue = without(\n [option.value],\n value\n );\n } else {\n newValue = append(option.value, value);\n }\n setProps({value: newValue});\n }}\n />\n {option.label}\n \n );\n })}\n
\n );\n }\n}\n\nChecklist.propTypes = {\n /**\n * An array of options\n */\n options: PropTypes.oneOfType([\n /**\n * Array of options where the label and the value are the same thing - [string|number|bool]\n */\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ])\n ),\n /**\n * Simpler `options` representation in dictionary format. The order is not guaranteed.\n * {`value1`: `label1`, `value2`: `label2`, ... }\n * which is equal to\n * [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]\n */\n PropTypes.object,\n /**\n * An array of options {label: [string|number], value: [string|number]},\n * an optional disabled field can be used for each option\n */\n PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The option's label\n */\n label: PropTypes.node.isRequired,\n\n /**\n * The value of the option. This value\n * corresponds to the items specified in the\n * `value` property.\n */\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ]).isRequired,\n\n /**\n * If true, this option is disabled and cannot be selected.\n */\n disabled: PropTypes.bool,\n\n /**\n * The HTML 'title' attribute for the option. Allows for\n * information on hover. For more information on this attribute,\n * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title\n */\n title: PropTypes.string,\n })\n ),\n ]),\n\n /**\n * The currently selected value\n */\n value: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ])\n ),\n\n /**\n * Indicates whether labelStyle should be inline or not\n * True: Automatically set { 'display': 'inline-block' } to labelStyle\n * False: No additional styles are passed into labelStyle.\n */\n inline: PropTypes.bool,\n\n /**\n * The class of the container (div)\n */\n className: PropTypes.string,\n\n /**\n * The style of the container (div)\n */\n style: PropTypes.object,\n\n /**\n * The style of the checkbox element\n */\n inputStyle: PropTypes.object,\n\n /**\n * The class of the checkbox element\n */\n inputClassName: PropTypes.string,\n\n /**\n * The style of the
\n ) : null;\n }\n}\n\nClipboard.defaultProps = {\n content: null,\n target_id: null,\n n_clicks: 0,\n};\n\nClipboard.propTypes = {\n /**\n * The ID used to identify this component.\n */\n id: PropTypes.string,\n\n /**\n * The id of target component containing text to copy to the clipboard.\n * The inner text of the `children` prop will be copied to the clipboard. If none, then the text from the\n * `value` prop will be copied.\n */\n target_id: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),\n\n /**\n * The text to be copied to the clipboard if the `target_id` is None.\n */\n content: PropTypes.string,\n\n /**\n * The number of times copy button was clicked\n */\n n_clicks: PropTypes.number,\n\n /**\n * The text shown as a tooltip when hovering over the copy icon.\n */\n title: PropTypes.string,\n\n /**\n * The icon's styles\n */\n style: PropTypes.object,\n\n /**\n * The class name of the icon element\n */\n className: PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n};\n","import PropTypes from 'prop-types';\nimport {Component} from 'react';\n\n/**\n * ConfirmDialog is used to display the browser's native \"confirm\" modal,\n * with an optional message and two buttons (\"OK\" and \"Cancel\").\n * This ConfirmDialog can be used in conjunction with buttons when the user\n * is performing an action that should require an extra step of verification.\n */\nexport default class ConfirmDialog extends Component {\n componentDidUpdate(prevProps) {\n this._update(!prevProps.displayed && this.props.displayed);\n }\n\n componentDidMount() {\n this._update(this.props.displayed);\n }\n\n _update(shouldTriggerDisplay) {\n const {message, setProps, cancel_n_clicks, submit_n_clicks} =\n this.props;\n\n if (shouldTriggerDisplay) {\n new Promise(resolve => resolve(window.confirm(message))).then(\n result => {\n if (result) {\n setProps({\n submit_n_clicks: submit_n_clicks + 1,\n submit_n_clicks_timestamp: Date.now(),\n displayed: false,\n });\n } else {\n setProps({\n cancel_n_clicks: cancel_n_clicks + 1,\n cancel_n_clicks_timestamp: Date.now(),\n displayed: false,\n });\n }\n }\n );\n }\n }\n\n render() {\n return null;\n }\n}\n\nConfirmDialog.defaultProps = {\n submit_n_clicks: 0,\n submit_n_clicks_timestamp: -1,\n cancel_n_clicks: 0,\n cancel_n_clicks_timestamp: -1,\n};\n\nConfirmDialog.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Message to show in the popup.\n */\n message: PropTypes.string,\n /**\n * Number of times the submit button was clicked\n */\n submit_n_clicks: PropTypes.number,\n /**\n * Last time the submit button was clicked.\n */\n submit_n_clicks_timestamp: PropTypes.number,\n /**\n * Number of times the popup was canceled.\n */\n cancel_n_clicks: PropTypes.number,\n /**\n * Last time the cancel button was clicked.\n */\n cancel_n_clicks_timestamp: PropTypes.number,\n /**\n * Set to true to send the ConfirmDialog.\n */\n displayed: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n};\n","import {clone} from 'ramda';\nimport React from 'react';\nimport PropTypes from 'prop-types';\n\nimport ConfirmDialog from './ConfirmDialog.react';\n\n/**\n * A wrapper component that will display a confirmation dialog\n * when its child component has been clicked on.\n *\n * For example:\n * ```\n * dcc.ConfirmDialogProvider(\n * html.Button('click me', id='btn'),\n * message='Danger - Are you sure you want to continue.'\n * id='confirm')\n * ```\n */\nexport default class ConfirmDialogProvider extends React.Component {\n render() {\n const {displayed, id, setProps, children, loading_state} = this.props;\n\n // Will lose the previous onClick of the child\n const wrapClick = child => {\n const props = clone(child.props);\n props._dashprivate_layout.props.onClick = () => {\n setProps({displayed: true});\n };\n\n return React.cloneElement(child, props);\n };\n\n return (\n \n {Array.isArray(children)\n ? children.map(wrapClick)\n : wrapClick(children)}\n \n
\n );\n }\n}\n\nConfirmDialogProvider.defaultProps = {\n submit_n_clicks: 0,\n submit_n_clicks_timestamp: -1,\n cancel_n_clicks: 0,\n cancel_n_clicks_timestamp: -1,\n};\n\nConfirmDialogProvider.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Message to show in the popup.\n */\n message: PropTypes.string,\n /**\n * Number of times the submit was clicked\n */\n submit_n_clicks: PropTypes.number,\n /**\n * Last time the submit button was clicked.\n */\n submit_n_clicks_timestamp: PropTypes.number,\n /**\n * Number of times the popup was canceled.\n */\n cancel_n_clicks: PropTypes.number,\n /**\n * Last time the cancel button was clicked.\n */\n cancel_n_clicks_timestamp: PropTypes.number,\n /**\n * Is the modal currently displayed.\n */\n displayed: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n /**\n * The children to hijack clicks from and display the popup.\n */\n children: PropTypes.any,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n","import PropTypes from 'prop-types';\nimport {Component} from 'react';\nimport {toByteArray} from 'base64-js';\nimport {saveAs} from 'file-saver';\n\nconst getValue = (src, fallback, key) =>\n key in src ? src[key] : fallback[key];\n\n/**\n * The Download component opens a download dialog when the data property changes.\n */\nexport default class Download extends Component {\n componentDidUpdate(prevProps) {\n const {data} = this.props;\n // If the data hasn't changed, do nothing.\n if (!data || data === prevProps.data) {\n return;\n }\n // Extract options from data if provided, fallback to props.\n const type = getValue(data, this.props, 'type');\n const base64 = getValue(data, this.props, 'base64');\n // Invoke the download using a Blob.\n const content = base64 ? toByteArray(data.content) : data.content;\n const blob = new Blob([content], {type: type});\n saveAs(blob, data.filename);\n }\n\n render() {\n return null;\n }\n}\n\nDownload.propTypes = {\n /**\n * The ID of this component, used to identify dash components in callbacks.\n */\n id: PropTypes.string,\n\n /**\n * On change, a download is invoked.\n */\n data: PropTypes.exact({\n /**\n * Suggested filename in the download dialogue.\n */\n filename: PropTypes.string.isRequired,\n /**\n * File content.\n */\n content: PropTypes.string.isRequired,\n /**\n * Set to true, when data is base64 encoded.\n */\n base64: PropTypes.bool,\n /**\n * Blob type, usually a MIME-type.\n */\n type: PropTypes.string,\n }),\n\n /**\n * Default value for base64, used when not set as part of the data property.\n */\n base64: PropTypes.bool,\n\n /**\n * Default value for type, used when not set as part of the data property.\n */\n type: PropTypes.string,\n\n /**\n * Dash-supplied function for updating props.\n */\n setProps: PropTypes.func,\n};\n\nDownload.defaultProps = {\n type: 'text/plain',\n base64: false,\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./input.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./input.css\";\n export default content && content.locals ? content.locals : undefined;\n","import {isNil, omit} from 'ramda';\nimport React, {PureComponent} from 'react';\nimport PropTypes from 'prop-types';\nimport isNumeric from 'fast-isnumeric';\nimport './css/input.css';\n\n// eslint-disable-next-line no-implicit-coercion\nconst convert = val => (isNumeric(val) ? +val : NaN);\n\nconst isEquivalent = (v1, v2) => v1 === v2 || (isNaN(v1) && isNaN(v2));\n\n/**\n * A basic HTML input control for entering text, numbers, or passwords.\n *\n * Note that checkbox and radio types are supported through\n * the Checklist and RadioItems component. Dates, times, and file uploads\n * are also supported through separate components.\n */\nexport default class Input extends PureComponent {\n constructor(props) {\n super(props);\n\n this.input = React.createRef();\n\n this.onBlur = this.onBlur.bind(this);\n this.onChange = this.onChange.bind(this);\n this.onEvent = this.onEvent.bind(this);\n this.onKeyPress = this.onKeyPress.bind(this);\n this.setInputValue = this.setInputValue.bind(this);\n this.setPropValue = this.setPropValue.bind(this);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n const {value} = this.input.current;\n const valueAsNumber = convert(value);\n this.setInputValue(\n isNil(valueAsNumber) ? value : valueAsNumber,\n nextProps.value\n );\n if (this.props.type !== 'number') {\n this.setState({value: nextProps.value});\n }\n }\n\n componentDidMount() {\n const {value} = this.input.current;\n const valueAsNumber = convert(value);\n this.setInputValue(\n isNil(valueAsNumber) ? value : valueAsNumber,\n this.props.value\n );\n }\n\n UNSAFE_componentWillMount() {\n if (this.props.type !== 'number') {\n this.setState({value: this.props.value});\n }\n }\n\n render() {\n const valprops =\n this.props.type === 'number' ? {} : {value: this.state.value};\n const {loading_state} = this.props;\n return (\n \n );\n }\n\n setInputValue(base, value) {\n const __value = value;\n base = this.input.current.checkValidity() ? convert(base) : NaN;\n value = convert(value);\n\n if (!isEquivalent(base, value)) {\n this.input.current.value = isNumeric(value) ? value : __value;\n }\n }\n\n setPropValue(base, value) {\n base = convert(base);\n value = this.input.current.checkValidity() ? convert(value) : NaN;\n\n if (!isEquivalent(base, value)) {\n this.props.setProps({value});\n }\n }\n\n onEvent() {\n const {value} = this.input.current;\n const valueAsNumber = convert(value);\n if (this.props.type === 'number') {\n this.setPropValue(\n this.props.value,\n isNil(valueAsNumber) ? value : valueAsNumber\n );\n } else {\n this.props.setProps({value});\n }\n }\n\n onBlur() {\n this.props.setProps({\n n_blur: this.props.n_blur + 1,\n n_blur_timestamp: Date.now(),\n });\n this.input.current.checkValidity();\n return this.props.debounce && this.onEvent();\n }\n\n onKeyPress(e) {\n if (e.key === 'Enter') {\n this.props.setProps({\n n_submit: this.props.n_submit + 1,\n n_submit_timestamp: Date.now(),\n });\n this.input.current.checkValidity();\n }\n return this.props.debounce && e.key === 'Enter' && this.onEvent();\n }\n\n onChange() {\n if (!this.props.debounce) {\n this.onEvent();\n } else if (this.props.type !== 'number') {\n this.setState({value: this.input.current.value});\n }\n }\n}\n\nInput.defaultProps = {\n type: 'text',\n n_blur: 0,\n n_blur_timestamp: -1,\n n_submit: 0,\n n_submit_timestamp: -1,\n debounce: false,\n step: 'any',\n persisted_props: ['value'],\n persistence_type: 'local',\n};\n\nInput.propTypes = {\n /**\n * The value of the input\n */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * The type of control to render.\n */\n type: PropTypes.oneOf([\n // Only allowing the input types with wide browser compatibility\n 'text',\n 'number',\n 'password',\n 'email',\n 'range',\n 'search',\n 'tel',\n 'url',\n 'hidden',\n ]),\n\n /**\n * If true, changes to input will be sent back to the Dash server only on enter or when losing focus.\n * If it's false, it will sent the value back on every change.\n */\n debounce: PropTypes.bool,\n\n /**\n * A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. Note: Do not use the placeholder attribute instead of a
\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nGraphSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default GraphSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * Spinner created by Tobias Ahlin, https://github.com/tobiasahlin/SpinKit\n */\nconst DefaultSpinner = ({\n status,\n color,\n fullscreen,\n debug,\n className,\n style,\n}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nDefaultSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default DefaultSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport changeColor from 'color';\n\nconst CubeSpinner = ({status, color, fullscreen, debug, className, style}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n /* eslint-disable no-magic-numbers */\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nCubeSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default CubeSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * Spinner created by Tobias Ahlin, https://github.com/tobiasahlin/SpinKit\n */\nconst CircleSpinner = ({\n status,\n color,\n fullscreen,\n debug,\n className,\n style,\n}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nCircleSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default CircleSpinner;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\n/**\n * Spinner created by Tobias Ahlin, https://github.com/tobiasahlin/SpinKit\n */\nconst DotSpinner = ({status, color, fullscreen, debug, className, style}) => {\n let debugTitle;\n if (debug) {\n debugTitle = (\n

\n Loading {status.component_name}\n 's {status.prop_name}\n

\n );\n }\n let spinnerClass = fullscreen ? 'dash-spinner-container' : '';\n if (className) {\n spinnerClass += ` ${className}`;\n }\n return (\n
\n {debugTitle}\n
\n
\n
\n
\n
\n \n
\n );\n};\n\nDotSpinner.propTypes = {\n status: PropTypes.object,\n color: PropTypes.string,\n className: PropTypes.string,\n fullscreen: PropTypes.bool,\n style: PropTypes.object,\n debug: PropTypes.bool,\n};\n\nexport default DotSpinner;\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport GraphSpinner from '../fragments/Loading/spinners/GraphSpinner.jsx';\nimport DefaultSpinner from '../fragments/Loading/spinners/DefaultSpinner.jsx';\nimport CubeSpinner from '../fragments/Loading/spinners/CubeSpinner.jsx';\nimport CircleSpinner from '../fragments/Loading/spinners/CircleSpinner.jsx';\nimport DotSpinner from '../fragments/Loading/spinners/DotSpinner.jsx';\nimport {mergeRight} from 'ramda';\n\nfunction getSpinner(spinnerType) {\n switch (spinnerType) {\n case 'graph':\n return GraphSpinner;\n case 'cube':\n return CubeSpinner;\n case 'circle':\n return CircleSpinner;\n case 'dot':\n return DotSpinner;\n default:\n return DefaultSpinner;\n }\n}\n\nconst hiddenContainer = {visibility: 'hidden', position: 'relative'};\n\nconst coveringSpinner = {\n visibility: 'visible',\n position: 'absolute',\n top: '0',\n height: '100%',\n width: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n};\n\n/**\n * A Loading component that wraps any other component and displays a spinner until the wrapped component has rendered.\n */\nexport default class Loading extends Component {\n render() {\n const {\n loading_state,\n color,\n className,\n style,\n parent_className,\n parent_style,\n fullscreen,\n debug,\n type: spinnerType,\n } = this.props;\n\n const isLoading = loading_state && loading_state.is_loading;\n const Spinner = isLoading && getSpinner(spinnerType);\n\n return (\n \n {this.props.children}\n
\n {isLoading && (\n \n )}\n
\n
\n );\n }\n}\n\nLoading._dashprivate_isLoadingComponent = true;\n\nLoading.defaultProps = {\n type: 'default',\n color: '#119DFF',\n};\n\nLoading.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * Array that holds components to render\n */\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n\n /**\n * Property that determines which spinner to show\n * one of 'graph', 'cube', 'circle', 'dot', or 'default'.\n */\n type: PropTypes.oneOf(['graph', 'cube', 'circle', 'dot', 'default']),\n\n /**\n * Boolean that makes the spinner display full-screen\n */\n fullscreen: PropTypes.bool,\n\n /**\n * If true, the spinner will display the component_name and prop_name\n * while loading\n */\n debug: PropTypes.bool,\n\n /**\n * Additional CSS class for the spinner root DOM node\n */\n className: PropTypes.string,\n\n /**\n * Additional CSS class for the outermost dcc.Loading parent div DOM node\n */\n parent_className: PropTypes.string,\n\n /**\n * Additional CSS styling for the spinner root DOM node\n */\n style: PropTypes.object,\n\n /**\n * Additional CSS styling for the outermost dcc.Loading parent div DOM node\n */\n parent_style: PropTypes.object,\n\n /**\n * Primary colour used for the loading spinners\n */\n color: PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n","import {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {type} from 'ramda';\n\nimport {History} from '@plotly/dash-component-plugins';\n\n/**\n * Update and track the current window.location object through the window.history state.\n * Use in conjunction with the `dash_core_components.Link` component to make apps with multiple pages.\n */\nexport default class Location extends Component {\n constructor(props) {\n super(props);\n this.updateLocation = this.updateLocation.bind(this);\n this.onLocationChange = this.onLocationChange.bind(this);\n }\n\n updateLocation(props) {\n const {hash, href, pathname, refresh, search, setProps} = props;\n\n // Keep track of props relating to window.location that may need to be updated via setProps\n const propsToSet = {};\n\n /**\n * Check if the field exists in props. If the prop with \"fieldName\" is not defined,\n * then it was not set by the user and needs to be equal to the value in window.location.\n * This only happens on page load (since props will no longer be undefined after componentDidMount).\n *\n * @param {string} fieldName\n * The name of the prop in window.location and in the component's prop\n *\n * @returns {boolean}\n * Returns true if the prop with fieldName is different and the window state needs to be updated\n */\n const checkExistsUpdateWindowLocation = fieldName => {\n const propVal = props[fieldName];\n\n if (\n (type(propVal) === 'Undefined' || propVal === null) &&\n type(window.location[fieldName]) !== 'Undefined'\n ) {\n // propVal is undefined or null, but window.location has this fieldName defined\n propsToSet[fieldName] = window.location[fieldName];\n } else if (propVal !== window.location[fieldName]) {\n // Prop has changed?\n if (refresh) {\n // Refresh the page?\n window.location[fieldName] = propVal;\n } else if (this.props[fieldName] !== propVal) {\n // If this prop has changed, need to setProps\n propsToSet[fieldName] = propVal;\n // This (`${fieldName}`: propVal) needs to be pushed in the window.history\n return true;\n }\n }\n // This (`${fieldName}`: propVal) DOES NOT need to be pushed in the window.history\n return false;\n };\n\n // Check if the prop value needs to be updated (note that this mutates propsToSet)\n const pathnameUpdated = checkExistsUpdateWindowLocation('pathname');\n const hrefUpdated = checkExistsUpdateWindowLocation('href');\n const hashUpdated = checkExistsUpdateWindowLocation('hash');\n const searchUpdated = checkExistsUpdateWindowLocation('search');\n\n // propsToSet has been updated -- batch update to Dash\n if (Object.keys(propsToSet).length > 0) {\n setProps(propsToSet);\n }\n\n // Special case -- overrides everything!\n if (hrefUpdated) {\n window.history.pushState({}, '', href);\n } else if (pathnameUpdated || hashUpdated || searchUpdated) {\n // Otherwise, we can mash everything together\n const searchVal = type(search) !== 'Undefined' ? search : '';\n const hashVal = type(hash) !== 'Undefined' ? hash : '';\n window.history.pushState(\n {},\n '',\n `${pathname}${searchVal}${hashVal}`\n );\n }\n }\n\n onLocationChange() {\n const {setProps} = this.props;\n const propsToChange = {};\n\n if (this.props.pathname !== window.location.pathname) {\n propsToChange.pathname = window.location.pathname;\n }\n if (this.props.href !== window.location.href) {\n propsToChange.href = window.location.href;\n }\n if (this.props.hash !== window.location.hash) {\n propsToChange.hash = window.location.hash;\n }\n if (this.props.search !== window.location.search) {\n propsToChange.search = window.location.search;\n }\n\n setProps(propsToChange);\n\n History.dispatchChangeEvent();\n }\n\n componentDidMount() {\n window.onpopstate = this.onLocationChange;\n\n window.addEventListener(\n '_dashprivate_pushstate',\n this.onLocationChange\n );\n this.updateLocation(this.props);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.updateLocation(nextProps);\n }\n\n render() {\n return null;\n }\n}\n\nLocation.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string.isRequired,\n\n /** pathname in window.location - e.g., \"/my/full/pathname\" */\n pathname: PropTypes.string,\n /** search in window.location - e.g., \"?myargument=1\" */\n search: PropTypes.string,\n /** hash in window.location - e.g., \"#myhash\" */\n hash: PropTypes.string,\n /** href in window.location - e.g., \"/my/full/pathname?myargument=1#myhash\" */\n href: PropTypes.string,\n\n /** Refresh the page when the location is updated? */\n refresh: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n};\n\nLocation.defaultProps = {\n refresh: true,\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./logout.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./logout.css\";\n export default content && content.locals ? content.locals : undefined;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport './css/logout.css';\n\n/**\n * Logout button to submit a form post request to the `logout_url` prop.\n * Usage is intended for dash-deployment-server authentication.\n *\n * DDS usage:\n *\n * `dcc.LogoutButton(logout_url=os.getenv('DASH_LOGOUT_URL'))`\n *\n * Custom usage:\n *\n * - Implement a login mechanism.\n * - Create a flask route with a post method handler.\n * `@app.server.route('/logout', methods=['POST'])`\n * - The logout route should perform what's necessary for the user to logout.\n * - If you store the session in a cookie, clear the cookie:\n * `rep = flask.Response(); rep.set_cookie('session', '', expires=0)`\n *\n * - Create a logout button component and assign it the logout_url\n * `dcc.LogoutButton(logout_url='/logout')`\n *\n * See https://dash.plotly.com/dash-core-components/logout_button\n * for more documentation and examples.\n */\nexport default class LogoutButton extends React.Component {\n render() {\n const {id, logout_url, label, className, style, method, loading_state} =\n this.props;\n\n let url, submitMethod;\n if (!logout_url) {\n url =\n logout_url ||\n 'https://dash.plotly.com/dash-core-components/logout_button';\n submitMethod = 'get';\n } else {\n url = logout_url;\n submitMethod = method;\n }\n\n return (\n \n \n {label}\n \n \n );\n }\n}\n\nLogoutButton.defaultProps = {\n label: 'Logout',\n method: 'post',\n};\n\nLogoutButton.propTypes = {\n /**\n * Id of the button.\n */\n id: PropTypes.string,\n\n /**\n * Text of the button\n */\n label: PropTypes.string,\n /**\n * Url to submit a post logout request.\n */\n logout_url: PropTypes.string,\n /**\n * Style of the button\n */\n style: PropTypes.object,\n /**\n * Http method to submit the logout form.\n */\n method: PropTypes.string,\n /**\n * CSS class for the button.\n */\n className: PropTypes.string,\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-select@1.0.0-rc.3.min.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-select@1.0.0-rc.3.min.css\";\n export default content && content.locals ? content.locals : undefined;\n","import PropTypes from 'prop-types';\nimport React, {Component} from 'react';\nimport './css/react-select@1.0.0-rc.3.min.css';\nimport {sanitizeOptions} from '../utils/optionTypes';\n\n/**\n * RadioItems is a component that encapsulates several radio item inputs.\n * The values and labels of the RadioItems is specified in the `options`\n * property and the seleced item is specified with the `value` property.\n * Each radio item is rendered as an input with a surrounding label.\n */\n\nexport default class RadioItems extends Component {\n render() {\n const {\n id,\n className,\n style,\n inputClassName,\n inputStyle,\n labelClassName,\n labelStyle,\n options,\n setProps,\n loading_state,\n value,\n inline,\n } = this.props;\n\n let ids = {};\n if (id) {\n ids = {id, key: id};\n }\n return (\n \n {sanitizeOptions(options).map(option => (\n \n {\n setProps({value: option.value});\n }}\n />\n {option.label}\n \n ))}\n
\n );\n }\n}\n\nRadioItems.propTypes = {\n /**\n * An array of options, or inline dictionary of options\n */\n options: PropTypes.oneOfType([\n /**\n * Array of options where the label and the value are the same thing - [string|number|bool]\n */\n PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ])\n ),\n /**\n * Simpler `options` representation in dictionary format. The order is not guaranteed.\n * {`value1`: `label1`, `value2`: `label2`, ... }\n * which is equal to\n * [{label: `label1`, value: `value1`}, {label: `label2`, value: `value2`}, ...]\n */\n PropTypes.object,\n /**\n * An array of options {label: [string|number], value: [string|number]},\n * an optional disabled field can be used for each option\n */\n PropTypes.arrayOf(\n PropTypes.exact({\n /**\n * The option's label\n */\n label: PropTypes.node.isRequired,\n\n /**\n * The value of the option. This value\n * corresponds to the items specified in the\n * `value` property.\n */\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ]).isRequired,\n\n /**\n * If true, this option is disabled and cannot be selected.\n */\n disabled: PropTypes.bool,\n\n /**\n * The HTML 'title' attribute for the option. Allows for\n * information on hover. For more information on this attribute,\n * see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/title\n */\n title: PropTypes.string,\n })\n ),\n ]),\n\n /**\n * The currently selected value\n */\n value: PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number,\n PropTypes.bool,\n ]),\n\n /**\n * Indicates whether labelStyle should be inline or not\n * True: Automatically set { 'display': 'inline-block' } to labelStyle\n * False: No additional styles are passed into labelStyle.\n */\n inline: PropTypes.bool,\n\n /**\n * The style of the container (div)\n */\n style: PropTypes.object,\n\n /**\n * The class of the container (div)\n */\n className: PropTypes.string,\n\n /**\n * The style of the radio element\n */\n inputStyle: PropTypes.object,\n\n /**\n * The class of the radio element\n */\n inputClassName: PropTypes.string,\n\n /**\n * The style of the
\n );\n};\n\nEnhancedTab.defaultProps = {\n loading_state: {\n is_loading: false,\n component_name: '',\n prop_name: '',\n },\n};\n\n/**\n * A Dash component that lets you render pages with tabs - the Tabs component's children\n * can be dcc.Tab components, which can hold a label that will be displayed as a tab, and can in turn hold\n * children components that will be that tab's content.\n */\nexport default class Tabs extends Component {\n constructor(props) {\n super(props);\n\n this.selectHandler = this.selectHandler.bind(this);\n this.parseChildrenToArray = this.parseChildrenToArray.bind(this);\n this.valueOrDefault = this.valueOrDefault.bind(this);\n\n if (!has('value', this.props)) {\n this.props.setProps({\n value: this.valueOrDefault(),\n });\n }\n }\n\n valueOrDefault() {\n if (has('value', this.props)) {\n return this.props.value;\n }\n const children = this.parseChildrenToArray();\n if (children && children[0].props.children) {\n return children[0].props.children.props.value || 'tab-1';\n }\n return 'tab-1';\n }\n\n parseChildrenToArray() {\n if (this.props.children && !is(Array, this.props.children)) {\n // if dcc.Tabs.children contains just one single element, it gets passed as an object\n // instead of an array - so we put in in a array ourselves!\n return [this.props.children];\n }\n return this.props.children;\n }\n\n selectHandler(value) {\n this.props.setProps({value: value});\n }\n\n render() {\n let EnhancedTabs;\n let selectedTab;\n\n if (this.props.children) {\n const children = this.parseChildrenToArray();\n\n const amountOfTabs = children.length;\n\n EnhancedTabs = children.map((child, index) => {\n // TODO: handle components that are not dcc.Tab components (throw error)\n // enhance Tab components coming from Dash (as dcc.Tab) with methods needed for handling logic\n let childProps;\n\n if (\n // disabled is a defaultProp (so it's always set)\n // meaning that if it's not set on child.props, the actual\n // props we want are lying a bit deeper - which means they\n // are coming from Dash\n isNil(child.props.disabled) &&\n child.props._dashprivate_layout &&\n child.props._dashprivate_layout.props\n ) {\n // props are coming from Dash\n childProps = child.props._dashprivate_layout.props;\n } else {\n // else props are coming from React (Demo.react.js, or Tabs.test.js)\n childProps = child.props;\n }\n\n if (!childProps.value) {\n childProps = {...childProps, value: `tab-${index + 1}`};\n }\n\n // check if this child/Tab is currently selected\n if (childProps.value === this.valueOrDefault()) {\n selectedTab = child;\n }\n\n return (\n \n );\n });\n }\n\n const selectedTabContent = !isNil(selectedTab) ? selectedTab : '';\n\n const tabContainerClass = this.props.vertical\n ? 'tab-container tab-container--vert'\n : 'tab-container';\n\n const tabContentClass = this.props.vertical\n ? 'tab-content tab-content--vert'\n : 'tab-content';\n\n const tabParentClass = this.props.vertical\n ? 'tab-parent tab-parent--vert'\n : 'tab-parent';\n\n return (\n \n \n {EnhancedTabs}\n
\n \n {selectedTabContent || ''}\n
\n \n
\n );\n }\n}\n\nTabs.defaultProps = {\n mobile_breakpoint: 800,\n colors: {\n border: '#d6d6d6',\n primary: '#1975FA',\n background: '#f9f9f9',\n },\n vertical: false,\n persisted_props: ['value'],\n persistence_type: 'local',\n};\n\nTabs.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The value of the currently selected Tab\n */\n value: PropTypes.string,\n\n /**\n * Appends a class to the Tabs container holding the individual Tab components.\n */\n className: PropTypes.string,\n\n /**\n * Appends a class to the Tab content container holding the children of the Tab that is selected.\n */\n content_className: PropTypes.string,\n\n /**\n * Appends a class to the top-level parent container holding both the Tabs container and the content container.\n */\n parent_className: PropTypes.string,\n\n /**\n * Appends (inline) styles to the Tabs container holding the individual Tab components.\n */\n style: PropTypes.object,\n\n /**\n * Appends (inline) styles to the top-level parent container holding both the Tabs container and the content container.\n */\n parent_style: PropTypes.object,\n\n /**\n * Appends (inline) styles to the tab content container holding the children of the Tab that is selected.\n */\n content_style: PropTypes.object,\n\n /**\n * Renders the tabs vertically (on the side)\n */\n vertical: PropTypes.bool,\n\n /**\n * Breakpoint at which tabs are rendered full width (can be 0 if you don't want full width tabs on mobile)\n */\n mobile_breakpoint: PropTypes.number,\n\n /**\n * Array that holds Tab components\n */\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node,\n ]),\n\n /**\n * Holds the colors used by the Tabs and Tab components. If you set these, you should specify colors for all properties, so:\n * colors: {\n * border: '#d6d6d6',\n * primary: '#1975FA',\n * background: '#f9f9f9'\n * }\n */\n colors: PropTypes.exact({\n border: PropTypes.string,\n primary: PropTypes.string,\n background: PropTypes.string,\n }),\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `value` that the user has\n * changed while using the app will keep that change, as long as\n * the new `value` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `value` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n","import React, {Component} from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * A basic HTML textarea for entering multiline text.\n *\n */\nexport default class Textarea extends Component {\n render() {\n const {setProps, loading_state, value} = this.props;\n\n return (\n {\n setProps({value: e.target.value});\n }}\n onBlur={() => {\n setProps({\n n_blur: this.props.n_blur + 1,\n n_blur_timestamp: Date.now(),\n });\n }}\n onClick={() => {\n setProps({\n n_clicks: this.props.n_clicks + 1,\n n_clicks_timestamp: Date.now(),\n });\n }}\n {...omit(['setProps', 'value'], this.props)}\n />\n );\n }\n}\n\nTextarea.defaultProps = {\n n_blur: 0,\n n_blur_timestamp: -1,\n n_clicks: 0,\n n_clicks_timestamp: -1,\n persisted_props: ['value'],\n persistence_type: 'local',\n};\n\nTextarea.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The value of the textarea\n */\n value: PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n autoFocus: PropTypes.string,\n\n /**\n * Defines the number of columns in a textarea.\n */\n cols: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n disabled: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n form: PropTypes.string,\n\n /**\n * Defines the maximum number of characters allowed in the element.\n */\n maxLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Defines the minimum number of characters allowed in the element.\n */\n minLength: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n name: PropTypes.string,\n\n /**\n * Provides a hint to the user of what can be entered in the field.\n */\n placeholder: PropTypes.string,\n\n /**\n * Indicates whether the element can be edited.\n * readOnly is an HTML boolean attribute - it is enabled by a boolean or\n * 'readOnly'. Alternative capitalizations `readonly` & `READONLY`\n * are also acccepted.\n */\n readOnly: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.oneOf(['readOnly', 'readonly', 'READONLY']),\n ]),\n\n /**\n * Indicates whether this element is required to fill out or not.\n * required is an HTML boolean attribute - it is enabled by a boolean or\n * 'required'. Alternative capitalizations `REQUIRED`\n * are also acccepted.\n */\n required: PropTypes.oneOfType([\n PropTypes.oneOf(['required', 'REQUIRED']),\n PropTypes.bool,\n ]),\n\n /**\n * Defines the number of rows in a text area.\n */\n rows: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Indicates whether the text should be wrapped.\n */\n wrap: PropTypes.string,\n\n /**\n * Defines a keyboard shortcut to activate or add focus to the element.\n */\n accessKey: PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n className: PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n contentEditable: PropTypes.oneOfType([PropTypes.string, PropTypes.bool]),\n\n /**\n * Defines the ID of a
element which will serve as the element's context menu.\n */\n contextMenu: PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n dir: PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n draggable: PropTypes.oneOfType([\n // enumerated property, not a boolean property: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable\n PropTypes.oneOf(['true', 'false']),\n PropTypes.bool,\n ]),\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n hidden: PropTypes.string,\n\n /**\n * Defines the language used in the element.\n */\n lang: PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n spellCheck: PropTypes.oneOfType([\n // enumerated property, not a boolean property: https://www.w3.org/TR/html51/editing.html#spelling-and-grammar-checking\n PropTypes.oneOf(['true', 'false']),\n PropTypes.bool,\n ]),\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n style: PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n tabIndex: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n title: PropTypes.string,\n\n /**\n * Number of times the textarea lost focus.\n */\n n_blur: PropTypes.number,\n /**\n * Last time the textarea lost focus.\n */\n n_blur_timestamp: PropTypes.number,\n\n /**\n * Number of times the textarea has been clicked.\n */\n n_clicks: PropTypes.number,\n /**\n * Last time the textarea was clicked.\n */\n n_clicks_timestamp: PropTypes.number,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Used to allow user interactions in this component to be persisted when\n * the component - or the page - is refreshed. If `persisted` is truthy and\n * hasn't changed from its previous value, a `value` that the user has\n * changed while using the app will keep that change, as long as\n * the new `value` also matches what was given originally.\n * Used in conjunction with `persistence_type`.\n */\n persistence: PropTypes.oneOfType([\n PropTypes.bool,\n PropTypes.string,\n PropTypes.number,\n ]),\n\n /**\n * Properties whose user interactions will persist after refreshing the\n * component or the page. Since only `value` is allowed this prop can\n * normally be ignored.\n */\n persisted_props: PropTypes.arrayOf(PropTypes.oneOf(['value'])),\n\n /**\n * Where persisted user changes will be stored:\n * memory: only kept in memory, reset on page refresh.\n * local: window.localStorage, data is kept after the browser quit.\n * session: window.sessionStorage, data is cleared once the browser quit.\n */\n persistence_type: PropTypes.oneOf(['local', 'session', 'memory']),\n};\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nimport _JSXStyle from 'styled-jsx/style'; // eslint-disable-line no-unused-vars\n\n/**\n * A tooltip with an absolute position.\n */\nconst Tooltip = props => {\n const {bbox, border_color, background_color, id, loading_state} = props;\n const is_loading = loading_state?.is_loading;\n const show = props.show && bbox;\n\n return (\n <>\n
\n \n \n {is_loading ? (\n {props.loading_text}\n ) : (\n props.children\n )}\n \n \n
\n \n \n );\n};\n\nTooltip.defaultProps = {\n show: true,\n targetable: false,\n direction: 'right',\n border_color: '#d6d6d6',\n background_color: 'white',\n className: '',\n zindex: 1,\n loading_text: 'Loading...',\n};\n\nTooltip.propTypes = {\n /**\n * The contents of the tooltip\n */\n children: PropTypes.node,\n\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n id: PropTypes.string,\n\n /**\n * The class of the tooltip\n */\n className: PropTypes.string,\n\n /**\n * The style of the tooltip\n */\n style: PropTypes.object,\n\n /**\n * The bounding box coordinates of the item to label, in px relative to\n * the positioning parent of the Tooltip component.\n */\n bbox: PropTypes.exact({\n x0: PropTypes.number,\n y0: PropTypes.number,\n x1: PropTypes.number,\n y1: PropTypes.number,\n }),\n\n /**\n * Whether to show the tooltip\n */\n show: PropTypes.bool,\n\n /**\n * The side of the `bbox` on which the tooltip should open.\n */\n direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),\n\n /**\n * Color of the tooltip border, as a CSS color string.\n */\n border_color: PropTypes.string,\n\n /**\n * Color of the tooltip background, as a CSS color string.\n */\n background_color: PropTypes.string,\n\n /**\n * The text displayed in the tooltip while loading\n */\n loading_text: PropTypes.string,\n\n /**\n * The `z-index` CSS property to assign to the tooltip. Components with\n * higher values will be displayed on top of components with lower values.\n */\n zindex: PropTypes.number,\n\n /**\n * Whether the tooltip itself can be targeted by pointer events.\n * For tooltips triggered by hover events, typically this should be left\n * `false` to avoid the tooltip interfering with those same events.\n */\n targetable: PropTypes.bool,\n\n /**\n * Dash-assigned callback that gets fired when the value changes.\n */\n setProps: PropTypes.func,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n loading_state: PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n};\n\nexport default Tooltip;\n","\n import API from \"!../../../style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../css-loader/dist/cjs.js!./_datepicker.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../css-loader/dist/cjs.js!./_datepicker.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n \n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-dates@20.1.0-fix.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = function insertAtTop(element) {\n var parent = document.querySelector('head');\n // eslint-disable-next-line no-underscore-dangle\n var lastInsertedElement =\n window._lastElementInsertedByStyleLoader;\n\n if (!lastInsertedElement) {\n parent.insertBefore(element, parent.firstChild);\n } else if (lastInsertedElement.nextSibling) {\n parent.insertBefore(element, lastInsertedElement.nextSibling);\n } else {\n parent.appendChild(element);\n }\n\n // eslint-disable-next-line no-underscore-dangle\n window._lastElementInsertedByStyleLoader = element;\n };\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!./react-dates@20.1.0-fix.css\";\n export default content && content.locals ? content.locals : undefined;\n"],"names":["leafPrototypes","getProto","inProgress","dataWebpackPrefix","e","window","module","exports","n","t","r","o","i","l","call","m","c","d","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","__esModule","create","bind","default","prototype","hasOwnProperty","p","s","u","a","done","Promise","resolve","then","this","arguments","apply","isReady","lazy","setTimeout","regeneratorRuntime","mark","wrap","prev","next","stop","_dashprivate_isLazyComponentReady","f","length","configurable","writable","key","TypeError","dispatchEvent","CustomEvent","addEventListener","removeEventListener","_typeof","obj","iterator","constructor","isDeepEqual","isDeepStrictEqual","_require$codes","codes","ERR_AMBIGUOUS_ARGUMENT","ERR_INVALID_ARG_TYPE","ERR_INVALID_ARG_VALUE","ERR_INVALID_RETURN_VALUE","ERR_MISSING_ARGS","AssertionError","inspect","_require$types","isPromise","isRegExp","objectAssign","assign","objectIs","is","lazyLoadComparison","comparison","Map","warned","assert","ok","NO_EXCEPTION_SENTINEL","innerFail","message","Error","innerOk","fn","argLen","generatedMessage","err","actual","expected","operator","stackStartFn","_len","args","Array","_key","concat","fail","internalMessage","argsLen","undefined","warn","process","emitWarning","console","errArgs","equal","notEqual","deepEqual","notDeepEqual","deepStrictEqual","notDeepStrictEqual","strictEqual","notStrictEqual","Comparison","keys","_this","instance","Constructor","_classCallCheck","forEach","test","compareExceptionKey","b","name","expectedException","msg","push","isPrototypeOf","getActual","checkIsPromise","catch","waitForActual","promiseFn","resultPromise","expectsError","error","details","fnType","expectsNoError","strict","_len6","_key6","throws","_len2","_key2","rejects","_len3","_key3","result","doesNotThrow","_len4","_key4","doesNotReject","_len5","_key5","ifError","newErr","origStack","stack","tmp2","split","shift","tmp1","pos","indexOf","slice","join","_defineProperty","_defineProperties","target","props","descriptor","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","_wrapNativeSuper","Class","_cache","Function","toString","has","set","Wrapper","_construct","_getPrototypeOf","_setPrototypeOf","isNativeReflectConstruct","Reflect","construct","sham","Proxy","Date","Parent","setPrototypeOf","__proto__","getPrototypeOf","endsWith","str","search","this_len","substring","blue","green","red","white","kReadableOperator","strictEqualObject","notStrictEqualObject","notIdentical","copyError","source","inspectValue","val","compact","customInspect","depth","maxArrayLength","Infinity","showHidden","breakLength","showProxy","sorted","getters","_Error","options","limit","stackTraceLimit","String","stderr","isTTY","getColorDepth","other","res","lastPos","end","skipped","actualInspected","actualLines","expectedLines","indicator","inputLength","columns","count","Math","floor","maxCount","log","repeat","pop","maxLines","max","_actualLines","printedLines","skippedMsg","cur","expectedLine","actualLine","divergingLines","createErrDiff","base","_res","knownOperators","code","captureStackTrace","protoProps","subClass","superClass","_inherits","custom","recurseTimes","ctx","ownKeys","getOwnPropertySymbols","filter","sym","getOwnPropertyDescriptor","_objectSpread","util","createErrorType","Base","NodeError","_Base","arg1","arg2","arg3","getMessage","oneOf","thing","isArray","len","map","determiner","start","substr","replace","type","reason","inspected","RangeError","input","_slicedToArray","arr","_arrayWithHoles","_arr","_n","_d","_e","_s","_i","_iterableToArrayLimit","_nonIterableRest","regexFlagsSupported","flags","arrayFromSet","array","arrayFromMap","objectGetOwnPropertySymbols","numberIsNaN","Number","isNaN","uncurryThis","propertyIsEnumerable","objectToString","isAnyArrayBuffer","isArrayBufferView","isDate","isMap","isSet","isNativeError","isBoxedPrimitive","isNumberObject","isStringObject","isBooleanObject","isBigIntObject","isSymbolObject","isFloat32Array","isFloat64Array","isNonIndex","charCodeAt","pow","getOwnNonIndexProperties","compare","x","y","min","innerDeepEqual","val1","val2","memos","buf1","buf2","val1Tag","keys1","keys2","keyCheck","getTime","RegExp","byteLength","Uint8Array","buffer","byteOffset","areSimilarTypedArrays","offset","areSimilarFloatArrays","_keys","_keys2","size","valueOf","Boolean","BigInt","isEqualBoxedPrimitive","getEnumerables","k","iterationType","aKeys","bKeys","symbolKeysA","symbolKeysB","_symbolKeysB","position","val2MemoA","val2MemoB","areEq","objEquiv","delete","setHasEqualElement","memo","setValues","findLooseMatchingPrimitives","prim","setMightHaveLoosePrim","altValue","mapMightHaveLoosePrim","item","curB","mapHasEqualEntry","key1","item1","key2","aValues","Set","add","bValues","_val","setEquiv","aEntries","_aEntries$i","item2","bEntries","_i2","_bEntries$_i","mapEquiv","keysA","RealDatePickerRange","datePickerRange","DatePickerRange","Suspense","fallback","Component","propTypes","start_date","PropTypes","end_date","min_date_allowed","max_date_allowed","disabled_days","minimum_nights","updatemode","start_date_placeholder_text","end_date_placeholder_text","initial_visible_month","clearable","reopen_calendar_on_clear","display_format","month_format","first_day_of_week","show_outside_days","stay_open_on_select","calendar_orientation","number_of_months_shown","with_portal","with_full_screen_portal","day_size","is_RTL","disabled","start_date_id","end_date_id","style","className","id","setProps","loading_state","is_loading","prop_name","component_name","persistence","persisted_props","persistence_type","persistenceTransforms","transformDate","defaultProps","RealDateSingleRange","datePickerSingle","DatePickerSingle","date","placeholder","RealDropdown","dropdown","Dropdown","label","isRequired","title","multi","searchable","search_value","optionHeight","maxHeight","privatePropTypes","_dashprivate_transformConfig","_dashprivate_transformFigure","_dashprivate_onFigureModified","EMPTY_DATA","PlotlyGraph","mathjax","_loadMathjax","state","prependData","extendData","clearState","setState","nextProps","figure","dataKey","data","ControlledPlotlyGraph","RealPlotlyGraph","asyncDecorator","all","Plotly","lazyLoadMathJax","extendedClassName","displayName","responsive","clickData","clickAnnotationData","hoverData","clear_on_unhover","selectedData","relayoutData","restyleData","layout","frames","animate","animation_options","config","staticPlot","plotlyServerURL","editable","editSelection","edits","annotationPosition","annotationTail","annotationText","axisTitleText","colorbarPosition","colorbarTitleText","legendPosition","legendText","shapePosition","titleText","autosizable","queueLength","fillFrame","frameMargins","scrollZoom","doubleClick","doubleClickDelay","showTips","showAxisDragHandles","showAxisRangeEntryBoxes","showLink","sendData","linkText","displayModeBar","showSendToCloud","showEditInChartStudio","modeBarButtonsToRemove","modeBarButtonsToAdd","modeBarButtons","toImageButtonOptions","format","filename","width","height","scale","displaylogo","watermark","plotGlPixelRatio","topojsonURL","mapboxAccessToken","locale","locales","frame","redraw","transition","duration","ease","graphPropTypes","graphDefaultProps","event","params","bubbles","cancelable","detail","evt","document","createEvent","initCustomEvent","Event","Link","updateLocation","hasModifiers","metaKey","shiftKey","altKey","ctrlKey","href","refresh","isNil","preventDefault","location","history","pushState","scrollTo","children","onClick","DashMarkdown","RealDashMarkdown","dangerously_allow_html","link_target","dedent","highlight_config","theme","RealRangeSlider","rangeSlider","RangeSlider","step","marks","drag_value","allowCross","pushable","dots","included","tooltip","always_visible","placement","vertical","verticalHeight","RealSlider","slider","Slider","RealUpload","upload","Upload","contents","last_modified","accept","disable_click","max_size","min_size","multiple","className_active","className_reject","className_disabled","style_active","style_reject","style_disabled","borderStyle","borderColor","backgroundColor","opacity","extract","propValue","moment","startOf","storedValue","MathJax","sanitizeOptions","entries","React","includes","option","colorString","require","convert","skippedModels","hashedModelKeys","model","labels","sort","limiters","Color","object","channels","color","valpha","newArray","zeroArray","splice","alpha","hashedKeys","JSON","stringify","freeze","string","toJSON","places","to","rgb","round","percentString","percent","unitArray","unitObject","g","number","toFixed","roundTo","roundToPlace","getset","maxfn","hue","saturationl","lightness","saturationv","chroma","gray","wblack","cyan","magenta","yellow","black","z","keyword","hex","hexa","rgbArray","alphaHex","toUpperCase","rgbNumber","luminosity","lum","chan","contrast","color2","lum1","lum2","level","contrastRatio","isDark","isLight","negate","lighten","ratio","hsl","darken","saturate","desaturate","whiten","hwb","blacken","grayscale","fade","opaquer","rotate","degrees","mix","mixinColor","weight","color1","w","w1","w2","assertArray","raw","channel","modifier","v","cssKeywords","reverseKeywords","hsv","cmyk","xyz","lab","lch","ansi16","ansi256","hcg","apple","h","delta","rdif","gdif","bdif","diff","diffc","reversed","currentClosestKeyword","currentClosestDistance","distance","t2","t3","t1","smin","lmin","hi","q","sl","vmin","wh","bl","y2","x2","z2","atan2","PI","sqrt","hr","cos","sin","saturation","ansi","mult","rem","match","char","integer","parseInt","mg","pure","conversions","route","fromModel","routes","toModel","wrappedFn","arg0","conversion","wrapRounded","wrapRaw","link","from","wrapConversion","graph","path","parent","unshift","models","buildGraph","queue","current","adjacents","adjacent","node","deriveBFS","defineLocale","months","monthsShort","weekdays","weekdaysShort","weekdaysMin","meridiemParse","isPM","meridiem","hours","minutes","isLower","longDateFormat","LT","LTS","L","LL","LLL","LLLL","calendar","sameDay","nextDay","nextWeek","lastDay","lastWeek","sameElse","relativeTime","future","past","ss","mm","hh","dd","M","MM","yy","dayOfMonthOrdinalParse","ordinal","week","dow","doy","factory","pluralForm","plurals","pluralize","withoutSuffix","isFuture","weekdaysParseExact","hour","minute","postformat","symbolMap","preparse","numberMap","suffixes","relativeTimeWithPlural","num","forms","standalone","isFormat","day","period","ww","lastDigit","last2Digits","meridiemHour","monthsShortRegex","monthsParseExact","relativeTimeWithMutation","text","mutationTable","charAt","softMutation","mutation","lastNumber","monthsParse","monthsRegex","minWeekdaysParse","weekdaysParse","fullWeekdaysParse","shortWeekdaysParse","monthsStrictRegex","monthsShortStrictRegex","longMonthsParse","shortMonthsParse","token","translate","ll","lll","llll","output","plural","exec","processRelativeTime","monthsNominativeEl","monthsGenitiveEl","momentToFormat","_monthsGenitiveEl","month","_monthsNominativeEl","toLowerCase","calendarEl","mom","_calendarEl","monthsShortDot","invalidDate","numbersPast","numbersFuture","verbalNumber","monthsShortWithDots","monthsShortWithoutDots","weekEndings","eras","since","narrow","abbr","until","eraYearOrdinalRegex","eraYearOrdinalParse","now","$0","$1","$2","isUpper","eifelerRegelAppliesToNumber","units","translateSingular","special","relativeTimeWithSingular","translator","words","correctGrammaticalCase","wordKey","relativeTimeMr","monthsNominative","monthsSubjective","separator","days","word","numbersNouns","numberNoun","hundred","ten","one","numberAsNoun","time","hm","processHoursFunction","nominative","accusative","genitive","hookCallback","some","hooks","isObject","hasOwnProp","isObjectEmpty","getOwnPropertyNames","isUndefined","isNumber","arrLen","extend","createUTC","createLocalOrUTC","utc","getParsingFlags","_pf","empty","unusedTokens","unusedInput","overflow","charsLeftOver","nullInput","invalidEra","invalidMonth","invalidFormat","userInvalidated","iso","parsedDateParts","era","rfc2822","weekdayMismatch","isValid","_isValid","parsedParts","isNowValid","invalidWeekday","_strict","bigHour","isFrozen","createInvalid","NaN","fun","momentProperties","updateInProgress","copyConfig","prop","momentPropertiesLen","_isAMomentObject","_f","_l","_tzm","_isUTC","_offset","_locale","Moment","updateOffset","isMoment","suppressDeprecationWarnings","deprecate","firstTime","deprecationHandler","arg","deprecations","deprecateSimple","isFunction","mergeConfigs","parentConfig","childConfig","Locale","zeroFill","targetLength","forceSign","absNumber","abs","zerosToFill","formattingTokens","localFormattingTokens","formatFunctions","formatTokenFunctions","addFormatToken","padded","callback","func","localeData","formatMoment","expandFormat","makeFormatFunction","replaceLongDateFormatTokens","lastIndex","aliases","addUnitAlias","unit","shorthand","lowerCase","normalizeUnits","normalizeObjectUnits","inputObject","normalizedProp","normalizedInput","priorities","addUnitPriority","priority","isLeapYear","year","absFloor","ceil","toInt","argumentForCoercion","coercedNumber","isFinite","makeGetSet","keepTime","set$1","daysInMonth","regexes","match1","match2","match3","match4","match6","match1to2","match3to4","match5to6","match1to3","match1to4","match1to6","matchUnsigned","matchSigned","matchOffset","matchShortOffset","matchWord","addRegexToken","regex","strictRegex","isStrict","getParseRegexForToken","regexEscape","matched","p1","p2","p3","p4","tokens","addParseToken","tokenLen","addWeekParseToken","_w","addTimeToArrayFromToken","_a","modMonth","defaultLocaleMonths","defaultLocaleMonthsShort","MONTHS_IN_FORMAT","defaultMonthsShortRegex","defaultMonthsRegex","handleStrictParse","monthName","ii","llc","toLocaleLowerCase","_monthsParse","_longMonthsParse","_shortMonthsParse","setMonth","dayOfMonth","getSetMonth","computeMonthsParse","cmpLenRev","shortPieces","longPieces","mixedPieces","_monthsRegex","_monthsShortRegex","_monthsStrictRegex","_monthsShortStrictRegex","daysInYear","parseTwoDigitYear","getSetYear","createDate","ms","getFullYear","setFullYear","createUTCDate","UTC","getUTCFullYear","setUTCFullYear","firstWeekOffset","fwd","getUTCDay","dayOfYearFromWeeks","weekday","resYear","resDayOfYear","dayOfYear","weekOfYear","resWeek","weekOffset","weeksInYear","weekOffsetNext","shiftWeekdays","ws","weekdaysMinRegex","weekdaysShortRegex","weekdaysRegex","defaultLocaleWeekdays","defaultLocaleWeekdaysShort","defaultLocaleWeekdaysMin","defaultWeekdaysRegex","defaultWeekdaysShortRegex","defaultWeekdaysMinRegex","handleStrictParse$1","weekdayName","_weekdaysParse","_shortWeekdaysParse","_minWeekdaysParse","computeWeekdaysParse","minp","shortp","longp","minPieces","_weekdaysRegex","_weekdaysShortRegex","_weekdaysMinRegex","_weekdaysStrictRegex","_weekdaysShortStrictRegex","_weekdaysMinStrictRegex","hFormat","lowercase","matchMeridiem","_meridiemParse","seconds","kInput","_isPm","_meridiem","pos1","pos2","getSetHour","globalLocale","baseConfig","localeFamilies","commonPrefix","arr1","arr2","minl","normalizeLocale","loadLocale","oldLocale","isLocaleNameSane","_abbr","aliasedRequire","getSetGlobalLocale","values","getLocale","_config","parentLocale","names","j","chooseLocale","checkOverflow","_overflowDayOfYear","_overflowWeeks","_overflowWeekday","extendedIsoRegex","basicIsoRegex","tzRegex","isoDates","isoTimes","aspNetJsonRegex","obsOffsets","UT","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","configFromISO","allowTime","dateFormat","timeFormat","tzFormat","isoDatesLen","isoTimesLen","configFromStringAndFormat","untruncateYear","yearStr","configFromRFC2822","parsedArray","monthStr","dayStr","hourStr","minuteStr","secondStr","weekdayStr","parsedInput","getDay","checkWeekday","obsOffset","militaryOffset","numOffset","calculateOffset","setUTCMinutes","getUTCMinutes","defaults","configFromArray","currentDate","expectedWeekday","yearToUse","nowValue","_useUTC","getUTCMonth","getUTCDate","getMonth","getDate","currentDateArray","weekYear","temp","weekdayOverflow","curWeek","GG","W","E","createLocal","_week","gg","_dayOfYear","dayOfYearFromWeekInfo","_nextDay","ISO_8601","RFC_2822","stringLength","totalParsedInputLength","isPm","meridiemFixWrap","erasConvertYear","prepareConfig","tempConfig","bestMoment","scoreToBeat","currentScore","validFormatFound","bestFormatIsValid","configfLen","score","configFromStringAndArray","createFromInputFallback","configFromString","dayOrDate","second","millisecond","configFromObject","configFromInput","isUTC","prototypeMin","prototypeMax","pickBy","moments","ordering","Duration","years","quarters","quarter","weeks","isoWeek","milliseconds","unitHasDecimal","orderLen","parseFloat","isDurationValid","_milliseconds","_days","_months","_data","_bubble","isDuration","absRound","utcOffset","sign","offsetFromString","chunkOffset","matcher","parts","matches","cloneWithOffset","clone","setTime","local","getDateOffset","getTimezoneOffset","isUtc","aspNetRegex","isoRegex","createDuration","ret","diffRes","parseIso","isBefore","positiveMomentsDifference","inp","isAfter","createAdder","direction","tmp","addSubtract","isAdding","invalid","subtract","isString","isMomentInput","arrayTest","dataTypeTest","isNumberOrStringArray","property","objectTest","propertyTest","properties","propertyLen","isMomentInputObject","isCalendarSpec","monthDiff","wholeMonthDiff","anchor","newLocaleData","defaultFormat","defaultFormatUtc","lang","MS_PER_SECOND","MS_PER_MINUTE","MS_PER_HOUR","MS_PER_400_YEARS","mod$1","dividend","divisor","localStartOfDate","utcStartOfDate","matchEraAbbr","erasAbbrRegex","computeErasParse","abbrPieces","namePieces","narrowPieces","_erasRegex","_erasNameRegex","_erasAbbrRegex","_erasNarrowRegex","addWeekYearFormatToken","getter","getSetWeekYearHelper","weeksTarget","setWeekAll","dayOfYearData","erasNameRegex","erasNarrowRegex","erasParse","_eraYearOrdinalRegex","isoWeekYear","_dayOfMonthOrdinalParse","_ordinalParse","_dayOfMonthOrdinalParseLenient","getSetDayOfMonth","getSetMinute","getSetMillisecond","getSetSecond","parseMs","proto","preParsePostFormat","formats","sod","calendarFormat","asFloat","that","zoneDelta","endOf","startOfDate","isoWeekday","inputString","humanize","fromNow","toNow","invalidAt","localInput","isBetween","inclusivity","localFrom","localTo","isSame","inputMs","isSameOrAfter","isSameOrBefore","parsingFlags","prioritized","unitsObj","getPrioritizedUnits","prioritizedLen","toArray","toObject","toDate","toISOString","keepOffset","prefix","suffix","zone","isLocal","for","unix","creationData","eraName","eraNarrow","eraAbbr","eraYear","dir","isoWeeks","weekInfo","weeksInWeekYear","isoWeeksInYear","isoWeeksInISOWeekYear","parseWeekday","parseIsoWeekday","keepLocalTime","keepMinutes","localAdjust","_changeInProgress","parseZone","tZone","hasAlignedHourOffset","isDST","isUtcOffset","zoneAbbr","zoneName","dates","isDSTShifted","_isDSTShifted","array1","array2","dontConvert","lengthDiff","diffs","compareArrays","proto$1","get$1","index","field","setter","listMonthsImpl","out","listWeekdaysImpl","localeSorted","_calendar","_longDateFormat","formatUpper","tok","_invalidDate","_ordinal","_relativeTime","pastFuture","_eras","_monthsShort","_monthsParseExact","firstDayOfYear","firstDayOfWeek","_weekdays","_weekdaysMin","_weekdaysShort","_weekdaysParseExact","_fullWeekdaysParse","langData","mathAbs","addSubtract$1","absCeil","daysToMonths","monthsToDays","makeAs","alias","as","asMilliseconds","asSeconds","asMinutes","asHours","asDays","asWeeks","asMonths","asQuarters","asYears","makeGetter","thresholds","substituteTimeAgo","abs$1","toISOString$1","totalSign","ymSign","daysSign","hmsSign","total","proto$2","monthsFromDays","argWithSuffix","argThresholds","withSuffix","th","posNegDuration","relativeTime$1","toIsoString","version","updateLocale","tmpLocale","relativeTimeRounding","roundingFunction","relativeTimeThreshold","threshold","myMoment","HTML5_FMT","DATETIME_LOCAL","DATETIME_LOCAL_SECONDS","DATETIME_LOCAL_MS","DATE","TIME","TIME_SECONDS","TIME_MS","WEEK","MONTH","b64","lens","validLen","getLens","placeHoldersLen","Arr","_byteLength","curByte","revLookup","lookup","GetIntrinsic","callBind","$indexOf","allowMissing","intrinsic","$apply","$call","$reflectApply","$gOPD","$defineProperty","$max","originalFunction","desc","applyBind","colorNames","swizzle","reverseNames","cs","clamp","hexDouble","hexAlpha","i2","rgba","hsla","hwba","times","functions","expression","tuple","___CSS_LOADER_EXPORT___","cssWithMappingToString","list","content","needLayer","modules","media","dedupe","supports","layer","alreadyImportedModules","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","sourceMapping","sourceURLs","sources","sourceRoot","hasSymbols","toStr","origDefineProperty","hasPropertyDescriptors","supportsDescriptors","predicate","defineProperties","predicates","firstSource","nextSource","keysArray","nextIndex","nextKey","polyfill","allBlankCharCodes","original","XMLHttpRequest","open","responseType","onload","response","onerror","send","status","MouseEvent","initMouseEvent","global","navigator","userAgent","saveAs","HTMLAnchorElement","URL","webkitURL","createElement","download","rel","origin","createObjectURL","revokeObjectURL","msSaveOrOpenBlob","autoBom","Blob","body","innerText","HTMLElement","safari","FileReader","onloadend","readAsDataURL","isCallable","forEachArray","receiver","forEachString","forEachObject","thisArg","ERROR_MESSAGE","funcType","bound","binder","boundLength","boundArgs","Empty","implementation","$SyntaxError","SyntaxError","$Function","$TypeError","getEvalledConstructor","expressionSyntax","throwTypeError","ThrowTypeError","calleeThrows","gOPDthrows","needsEval","TypedArray","INTRINSICS","AggregateError","ArrayBuffer","Atomics","DataView","decodeURI","decodeURIComponent","encodeURI","eval","EvalError","Float32Array","Float64Array","FinalizationRegistry","Int8Array","Int16Array","Int32Array","SharedArrayBuffer","Uint8ClampedArray","Uint16Array","Uint32Array","URIError","WeakMap","WeakRef","WeakSet","doEval","gen","LEGACY_ALIASES","hasOwn","$concat","$spliceApply","$replace","$strSlice","$exec","rePropName","reEscapeChar","stringToPath","first","last","quote","subString","getBaseIntrinsic","intrinsicName","intrinsicBaseName","intrinsicRealName","skipFurtherCaching","isOwn","part","hasArrayLengthDefineBug","origSymbol","hasSymbolSham","symObj","syms","ctor","superCtor","super_","TempCtor","hasToStringTag","$toString","callBound","isStandardArguments","isLegacyArguments","callee","supportsStandardArguments","badArrayLike","isCallableMarker","fnToStr","reflectApply","_","constructorRegex","isES6ClassFn","fnStr","tryFunctionObject","isIE68","isDDA","strClass","GeneratorFunction","isFnRegex","generatorFunc","getGeneratorFunc","define","getPolyfill","shim","availableTypedArrays","globalThis","typedArrays","$slice","toStrTags","gOPD","typedArray","superProto","tag","anyTrue","tryTypedArrays","webpackContext","req","webpackContextResolve","__webpack_require__","keysShim","isArgs","isEnumerable","hasDontEnumBug","hasProtoEnumBug","dontEnums","equalsConstructorPrototype","excludedKeys","$applicationCache","$console","$external","$frame","$frameElement","$frames","$innerHeight","$innerWidth","$onmozfullscreenchange","$onmozfullscreenerror","$outerHeight","$outerWidth","$pageXOffset","$pageYOffset","$parent","$scrollLeft","$scrollTop","$scrollX","$scrollY","$self","$webkitIndexedDB","$webkitStorageInfo","$window","hasAutomationEqualityBug","isArguments","theKeys","skipProto","skipConstructor","equalsConstructorPrototypeIfNotBuggy","origKeys","originalKeys","keysWorksWithArguments","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","defaultClearTimeout","runTimeout","clearTimeout","currentQueue","draining","queueIndex","cleanUpNextTick","drainQueue","timeout","run","marker","runClearTimeout","Item","noop","nextTick","browser","env","argv","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","umask","isArrayish","results","hash","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","indexByIdentifier","css","sourceMap","references","updater","addElementStyle","byIndex","api","domAPI","update","newObj","remove","lastIdentifiers","newList","newLastIdentifiers","_index","element","setAttributes","attributes","insert","styleElement","nonce","setAttribute","insertStyleElement","styleTagTransform","parentNode","removeChild","removeStyleElement","styleSheet","cssText","firstChild","appendChild","createTextNode","isProd","StyleSheet","_temp","_ref","_ref$name","_ref$optimizeForSpeed","optimizeForSpeed","_ref$isBrowser","isBrowser","invariant","_name","_deletedRulePlaceholder","_optimizeForSpeed","_isBrowser","_serverSheet","_tags","_injected","_rulesCount","querySelector","_nonce","getAttribute","_proto","setOptimizeForSpeed","bool","flush","inject","isOptimizeForSpeed","makeStyleTag","getSheet","cssRules","insertRule","rule","deleteRule","getSheetForTag","sheet","styleSheets","ownerNode","insertionPoint","replaceRule","trim","textContent","_this2","reduce","rules","cssString","relativeToTag","head","getElementsByTagName","insertBefore","condition","_react","styleSheetRegistry","JSXStyle","_Component","prevProps","dynamic","info","tagInfo","baseId","computeId","shouldComponentUpdate","otherProps","componentWillUnmount","render","_stringHash","_interopRequireDefault","_stylesheet","StyleSheetRegistry","_ref$styleSheet","_sheet","_fromServer","_indices","_instancesCounts","createComputeId","computeSelector","createComputeSelector","selectFromServer","acc","tagName","_this$getIdAndRules","getIdAndRules","styleId","indices","tagFromServer","_this3","fromServer","cache","propsToString","selectoPlaceholderRegexp","idcss","_this4","querySelectorAll","copy","fill","readUInt8","isArgumentsObject","isGeneratorFunction","whichTypedArray","isTypedArray","BigIntSupported","SymbolSupported","ObjectToString","numberValue","stringValue","booleanValue","bigIntValue","symbolValue","checkBoxedPrimitive","prototypeValueOf","isMapToString","isSetToString","isWeakMapToString","isWeakSetToString","isArrayBufferToString","isArrayBuffer","working","isDataViewToString","isDataView","isView","isUint8Array","isUint8ClampedArray","isUint16Array","isUint32Array","isInt8Array","isInt16Array","isInt32Array","isBigInt64Array","isBigUint64Array","isWeakMap","isWeakSet","SharedArrayBufferCopy","isSharedArrayBufferToString","isSharedArrayBuffer","isAsyncFunction","isMapIterator","isSetIterator","isGeneratorObject","isWebAssemblyCompiledModule","method","getOwnPropertyDescriptors","descriptors","formatRegExp","objects","isNull","noDeprecation","throwDeprecation","traceDeprecation","trace","debugs","debugEnvRegex","NODE_DEBUG","debugEnv","opts","seen","stylize","stylizeNoColor","colors","isBoolean","_extend","stylizeWithColor","formatValue","styleType","styles","primitive","simple","formatPrimitive","visibleKeys","idx","arrayToHash","isError","formatError","braces","toUTCString","formatProperty","formatArray","reduceToSingleString","line","ar","re","pad","debuglog","pid","types","isNullOrUndefined","isSymbol","isPrimitive","isBuffer","timestamp","getHours","getMinutes","getSeconds","inherits","kCustomPromisifiedSymbol","callbackifyOnRejected","cb","newReason","promisify","promiseResolve","promiseReject","promise","reject","callbackify","callbackified","maybeCb","rej","foundName","possibleNames","_isPlaceholder","f1","f2","_b","_dispatchable","methodNames","transducerCreator","transducer","xf","XWrap","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","thisObj","_iterableReduce","iter","_methodReduce","methodName","symIterator","_arrayReduce","XMap","_xfBase","received","combined","argsIdx","left","combinedIdx","_isArguments","hasEnumBug","nonEnumerableProps","hasArgsEnumBug","contains","nIdx","ks","checkArgsLength","functor","isInteger","f3","_c","el","set1","set2","len1","len2","assocPath","nextObj","refFrom","refTo","deep","pattern","copiedValue","ignoreCase","multiline","sticky","unicode","_arrayFromIterator","_includesWith","pred","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_equals","aItem","typeA","equals","extendedStackA","extendedStackB","inf","XFilter","filterable","_path","_identity","Ctor","memoizeWith","mFn","mergeDeepWithKey","lObj","rObj","lVal","rVal","xs","__webpack_module_cache__","moduleId","cachedModule","loaded","__webpack_modules__","mode","ns","def","definition","chunkId","promises","url","script","needAttach","scripts","charset","nc","src","onScriptComplete","doneFns","nmd","paths","scriptUrl","importScripts","currentScript","getCurrentScript","doc_scripts","async","jsonpScriptSrc","__jsonpScriptSrc__","srcFragments","fileFragments","installedChunks","installedChunkData","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","chunkLoadingGlobal","Checklist","inputClassName","inputStyle","labelClassName","labelStyle","inline","display","checked","onChange","newValue","without","append","_WINDOW","_DOCUMENT","_PERFORMANCE","measure","MutationObserver","performance","_ref$userAgent","WINDOW","DOCUMENT","PERFORMANCE","IS_DOM","documentElement","DEFAULT_REPLACEMENT_CLASS","oneToTen","oneToTwenty","DUOTONE_CLASSES","GROUP","SWAP_OPACITY","PRIMARY","SECONDARY","initial","FontAwesomeConfig","_ref2","attr","coerce","getAttrConfig","familyPrefix","replacementClass","autoReplaceSvg","autoAddCss","autoA11y","searchPseudoElements","observeMutations","mutateApproach","keepOriginalSource","measurePerformance","showMissingIcons","shims","namespace","doScroll","readyState","listener","asyncTimer","PENDING","SETTLED","FULFILLED","REJECTED","NOOP","isNode","asyncSetTimer","setImmediate","asyncQueue","asyncFlush","asyncCall","invokeCallback","subscriber","owner","settled","_state","handleThenable","resolved","fulfill","publishFulfillment","publishRejection","publish","_then","_handled","notifyRejectionHandled","P","resolver","rejectPromise","invokeResolver","onFulfillment","onRejection","fulfilled","rejected","remaining","race","meaninglessTransform","flipX","flipY","nextUniqueId","random","htmlEscape","joinStyles","styleName","transformIsMeaningful","transform","transformForSvg","containerWidth","iconWidth","outer","innerTranslate","innerScale","innerRotate","inner","ALL_SPACE","fillBlack","abstract","force","makeInlineSvgAbstract","_params$icons","icons","main","mask","iconName","symbol","maskId","titleId","extra","_params$watchable","watchable","found","isUploadedIcon","widthClass","attrClass","classes","role","uploadedIconWidthStyle","explicitMaskId","mainWidth","mainPath","icon","maskWidth","maskPath","trans","maskRect","maskInnerGroupChildrenMixin","maskInnerGroup","maskOuterGroup","clipId","maskTag","maskUnits","maskContentUnits","defs","makeIconMasking","styleString","makeIconStandard","asSymbol","asIcon","subject","initialValue","thisContext","bindInternal4","defineIcons","_params$skipHooks","skipHooks","normalized","addPack","build","reducer","ligatures","ligature","hasRegular","oldName","iconFromMapping","mapping","toHtml","abstractNodes","_abstractNodes$attrib","_abstractNodes$childr","attributeName","joinAttributes","MissingIcon","FILL","ANIMATION_BASE","attributeType","repeatCount","dur","OPACITY_ANIMATE","asFoundIcon","vectorData","class","cx","cy","Library","definitions","additions","_pullDefinitions","_normalized$key","ensureCss","_cssInserted","innerHTML","headChildren","childNodes","beforeChild","child","insertCss","dfp","drc","fp","rc","dPatt","customPropPatt","rPatt","apiObject","abstractCreator","container","html","findIconDefinition","iconLookup","_iconLookup$prefix","library","parse","transformString","rest","parseTransformString","iconDefinition","_params$transform","_params$symbol","_params$mask","_params$maskId","_params$title","_params$titleId","_params$classes","_params$attributes","_params$styles","maybeIconDefinition","enumerableOnly","symbols","_objectSpread2","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","sourceSymbolKeys","_arrayLikeToArray","minLen","_unsupportedIterableToArray","camelize","chr","_excluded$1","styleToObject","pair","startsWith","normalizeIconArgs","objectWithKey","_excluded","FontAwesomeIcon","forwardedRef","iconArgs","maskArgs","_classes","beat","beatFade","bounce","shake","flash","spin","spinPulse","spinReverse","pulse","fixedWidth","inverse","border","listItem","flip","rotation","pull","swapOpacity","classList","renderedIcon","_console","extraProps","ref","convertCurry","mixins","attrs","_extraProps$style","existingStyle","faCheckCircle","faCopy","clipboardAPI","clipboard","wait","Clipboard","copyToClipboard","copySuccess","getTargetText","loading","stringifyId","copied","wild","showCopiedIcon","writeText","target_id","getElementById","n_clicks","copyIcon","copiedIcon","btnIcon","ConfirmDialog","_update","displayed","shouldTriggerDisplay","cancel_n_clicks","submit_n_clicks","confirm","submit_n_clicks_timestamp","cancel_n_clicks_timestamp","ConfirmDialogProvider","wrapClick","_dashprivate_layout","getValue","Download","toByteArray","blob","lastInsertedElement","_lastElementInsertedByStyleLoader","nextSibling","isNumeric","isEquivalent","v1","v2","Input","onBlur","onEvent","onKeyPress","setInputValue","setPropValue","valueAsNumber","valprops","omit","__value","checkValidity","n_blur","n_blur_timestamp","debounce","n_submit","n_submit_timestamp","PureComponent","inputMode","autoComplete","readOnly","required","autoFocus","spellCheck","minLength","maxLength","selectionStart","selectionEnd","selectionDirection","Interval","intervalId","reportInterval","handleTimer","max_intervals","n_intervals","clearTimer","setInterval","interval","clearInterval","resetTimer","GraphSpinner","debugTitle","fullscreen","debug","spinnerClass","DefaultSpinner","CubeSpinner","changeColor","CircleSpinner","DotSpinner","hiddenContainer","visibility","coveringSpinner","top","justifyContent","alignItems","Loading","parent_className","parent_style","spinnerType","isLoading","Spinner","getSpinner","mergeRight","_dashprivate_isLoadingComponent","Location","onLocationChange","pathname","propsToSet","checkExistsUpdateWindowLocation","fieldName","propVal","pathnameUpdated","hrefUpdated","hashUpdated","searchUpdated","searchVal","hashVal","propsToChange","History","onpopstate","LogoutButton","submitMethod","logout_url","action","RadioItems","ids","MemStore","_modified","setModified","WebStore","storage","_storage","getItem","setItem","removeItem","Store","storage_type","_backstore","localStorage","sessionStorage","onStorageChange","oldValue","modified_timestamp","getModified","old","clear_data","Tab","Fragment","disabled_style","disabled_className","selected_className","selected_style","EnhancedTab","selected","selectedClassName","selectHandler","mobile_breakpoint","amountOfTabs","tabStyle","labelDisplay","tabClassName","background","primary","Tabs","parseChildrenToArray","valueOrDefault","EnhancedTabs","selectedTab","childProps","selectedTabContent","tabContainerClass","tabContentClass","tabParentClass","content_style","content_className","Textarea","n_clicks_timestamp","cols","form","rows","accessKey","contentEditable","contextMenu","draggable","hidden","tabIndex","Tooltip","bbox","border_color","background_color","show","y0","x0","x1","y1","targetable","zindex","loading_text"],"sourceRoot":""} \ No newline at end of file diff --git a/dash/dcc/package-info.json b/dash/dcc/package-info.json index 971414394e..38696cfe6f 100644 --- a/dash/dcc/package-info.json +++ b/dash/dcc/package-info.json @@ -1,6 +1,6 @@ { "name": "dash-core-components", - "version": "2.7.1", + "version": "2.8.0", "description": "Core component suite for Dash", "repository": { "type": "git", @@ -49,7 +49,7 @@ "mathjax": "^3.2.2", "moment": "^2.29.4", "node-polyfill-webpack-plugin": "^2.0.1", - "plotly.js-dist-min": "2.16.4", + "plotly.js-dist-min": "2.18.0", "prop-types": "^15.8.1", "ramda": "^0.28.0", "rc-slider": "^9.7.5", diff --git a/dash/dcc/plotly.min.js b/dash/dcc/plotly.min.js index 9cc14d3b0d..889e7e0249 100644 --- a/dash/dcc/plotly.min.js +++ b/dash/dcc/plotly.min.js @@ -1,65 +1,8 @@ /** -* plotly.js v2.16.4 -* Copyright 2012-2022, Plotly, Inc. +* plotly.js v2.18.0 +* Copyright 2012-2023, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=t()}}((function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},{"../src/lib":515}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1127}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":665}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":678}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":688}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":365}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":697}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":716}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":730}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":737}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":743}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":758}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":769}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":493}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":777}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1128}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":787}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":796}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1129}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":809}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":820}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":832}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":838}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":842}],25:[function(t,e,r){"use strict";e.exports=t("../src/traces/icicle")},{"../src/traces/icicle":848}],26:[function(t,e,r){"use strict";e.exports=t("../src/traces/image")},{"../src/traces/image":861}],27:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./image"),t("./pie"),t("./sunburst"),t("./treemap"),t("./icicle"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar"),t("./scattersmith"),t("./aggregate"),t("./filter"),t("./groupby"),t("./sort"),t("./calendars")]),e.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./icicle":25,"./image":26,"./indicator":28,"./isosurface":29,"./mesh3d":30,"./ohlc":31,"./parcats":32,"./parcoords":33,"./pie":34,"./pointcloud":35,"./sankey":36,"./scatter3d":37,"./scattercarpet":38,"./scattergeo":39,"./scattergl":40,"./scattermapbox":41,"./scatterpolar":42,"./scatterpolargl":43,"./scattersmith":44,"./scatterternary":45,"./sort":46,"./splom":47,"./streamtube":48,"./sunburst":49,"./surface":50,"./table":51,"./treemap":52,"./violin":53,"./volume":54,"./waterfall":55}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":869}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":875}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":880}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":885}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":894}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":905}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":916}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":925}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":931}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":969}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":976}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":984}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":998}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1008}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1016}],43:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1024}],44:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattersmith")},{"../src/traces/scattersmith":1031}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1039}],46:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1131}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1049}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1057}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1065}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1074}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1082}],52:[function(t,e,r){"use strict";e.exports=t("../src/traces/treemap")},{"../src/traces/treemap":1093}],53:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1106}],54:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1114}],55:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1122}],56:[function(t,e,r){!function(n,i){"object"==typeof r&&void 0!==e?i(r,t("d3-array"),t("d3-collection"),t("d3-shape"),t("elementary-circuits-directed-graph")):i(n.d3=n.d3||{},n.d3,n.d3,n.d3,null)}(this,(function(t,e,r,n,i){"use strict";function a(t){return t.target.depth}function o(t,e){return t.sourceLinks.length?t.depth:e-1}function s(t){return function(){return t}}i=i&&i.hasOwnProperty("default")?i.default:i;var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function c(t,e){return f(t.source,e.source)||t.index-e.index}function u(t,e){return f(t.target,e.target)||t.index-e.index}function f(t,e){return t.partOfCycle===e.partOfCycle?t.y0-e.y0:"top"===t.circularLinkType||"bottom"===e.circularLinkType?-1:1}function h(t){return t.value}function p(t){return(t.y0+t.y1)/2}function d(t){return p(t.source)}function m(t){return p(t.target)}function g(t){return t.index}function v(t){return t.nodes}function y(t){return t.links}function x(t,e){var r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function b(t,e){return e(t)}function _(t,e,r){var n=0;if(null===r){for(var a=[],o=0;o1||i>1)}function M(t,e,r){return t.sort(E),t.forEach((function(n,i){var a,o,s=0;if(q(n,r)&&A(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}})),t}function S(t,r,i,a){var o=e.min(t.links,(function(t){return t.source.y0}));t.links.forEach((function(t){t.circular&&(t.circularPathData={})})),M(t.links.filter((function(t){return"top"==t.circularLinkType})),r,a),M(t.links.filter((function(t){return"bottom"==t.circularLinkType})),r,a),t.links.forEach((function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+10,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,q(e,a)&&A(e))e.circularPathData.leftSmallArcRadius=10+e.width/2,e.circularPathData.leftLargeArcRadius=10+e.width/2,e.circularPathData.rightSmallArcRadius=10+e.width/2,e.circularPathData.rightLargeArcRadius=10+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter((function(t){return t.source.column==s&&t.circularLinkType==l}));"bottom"==e.circularLinkType?c.sort(C):c.sort(L);var u=0;c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=10+e.width/2+u,e.circularPathData.leftLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),s=e.target.column,c=t.links.filter((function(t){return t.target.column==s&&t.circularLinkType==l})),"bottom"==e.circularLinkType?c.sort(I):c.sort(P),u=0,c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=10+e.width/2+u,e.circularPathData.rightLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(i,e.source.y1,e.target.y1)+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){var e="";e="top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY;return e}(e);else{var f=n.linkHorizontal().source((function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]})).target((function(t){return[t.target.x0,t.y1]}));e.path=f(e)}}))}function E(t,e){return O(t)==O(e)?"bottom"==t.circularLinkType?C(t,e):L(t,e):O(e)-O(t)}function L(t,e){return t.y0-e.y0}function C(t,e){return e.y0-t.y0}function P(t,e){return t.y1-e.y1}function I(t,e){return e.y1-t.y1}function O(t){return t.target.column-t.source.column}function z(t){return t.target.x0-t.source.x1}function D(t,e){var r=T(t),n=z(e)/Math.tan(r);return"up"==H(t)?t.y1+n:t.y1-n}function R(t,e){var r=T(t),n=z(e)/Math.tan(r);return"up"==H(t)?t.y1-n:t.y1+n}function F(t,e,r,n){t.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)t.nodes.forEach((function(o){if(o.column==a){var c,u=s/(l+1),f=Math.pow(1-u,3),h=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),m=f*i.y0+h*i.y0+p*i.y1+d*i.y1,g=m-i.width/2,v=m+i.width/2;g>o.y0&&go.y0&&vo.y1)&&(c=v-o.y0+10,o=N(o,c,e,r),t.nodes.forEach((function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&N(t,c,e,r)})))}}))}}))}function B(t,e){return t.y0>e.y0&&t.y0e.y0&&t.y1e.y1)}function N(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach((function(t){t.y1=t.y1+e})),t.sourceLinks.forEach((function(t){t.y0=t.y0+e}))),t}function j(t,e,r,n){t.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>e&&(i.y=i.y-(i.y+(i.y1-i.y0)-e));var a=t.links.filter((function(t){return b(t.source,r)==b(i,r)})),o=a.length;o>1&&a.sort((function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!V(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=R(e,t);return t.y1-r}if(e.target.column>t.target.column)return R(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(t){t.y0=s+t.width/2,s+=t.width})),a.forEach((function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort((function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!V(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function q(t,e){return b(t.source,e)==b(t.target,e)}function G(t,r,n){var i=t.nodes,a=t.links,o=!1,s=!1;if(a.forEach((function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)})),0==o||0==s){var l=e.min(i,(function(t){return t.y0})),c=(n-r)/(e.max(i,(function(t){return t.y1}))-l);i.forEach((function(t){var e=(t.y1-t.y0)*c;t.y0=(t.y0-l)*c,t.y1=t.y0+e})),a.forEach((function(t){t.y0=(t.y0-l)*c,t.y1=(t.y1-l)*c,t.width=t.width*c}))}}t.sankeyCircular=function(){var t,n,i=0,a=0,b=1,T=1,A=24,M=g,E=o,L=v,C=y,P=32,I=2,O=null;function z(){var t={nodes:L.apply(null,arguments),links:C.apply(null,arguments)};D(t),_(t,M,O),R(t),B(t),w(t,M),N(t,P,M),V(t);for(var e=4,r=0;r0?r+25+10:r,bottom:n=n>0?n+25+10:n,left:a=a>0?a+25+10:a,right:i=i>0?i+25+10:i}}(o),f=function(t,r){var n=e.max(t.nodes,(function(t){return t.column})),o=b-i,s=T-a,l=o/(o+r.right+r.left),c=s/(s+r.top+r.bottom);return i=i*l+r.left,b=0==r.right?b:b*l,a=a*c+r.top,T*=c,t.nodes.forEach((function(t){t.x0=i+t.column*((b-i-A)/n),t.x1=t.x0+A})),c}(o,u);l*=f,o.links.forEach((function(t){t.width=t.value*l})),c.forEach((function(t){var e=t.length;t.forEach((function(t,n){t.depth==c.length-1&&1==e||0==t.depth&&1==e?(t.y0=T/2-t.value*l,t.y1=t.y0+t.value*l):t.partOfCycle?0==k(t,r)?(t.y0=T/2+n,t.y1=t.y0+t.value*l):"top"==t.circularLinkType?(t.y0=a+n,t.y1=t.y0+t.value*l):(t.y0=T-t.value*l-n,t.y1=t.y0+t.value*l):0==u.top||0==u.bottom?(t.y0=(T-a)/e*n,t.y1=t.y0+t.value*l):(t.y0=(T-a)/2-e/2+n,t.y1=t.y0+t.value*l)}))}))}(l),y();for(var u=1,g=s;g>0;--g)v(u*=.99,l),y();function v(t,r){var n=c.length;c.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&k(i,r)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else{var l=e.mean(i.sourceLinks,m),c=e.mean(i.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(i))*t;i.y0+=u,i.y1+=u}}))}))}function y(){c.forEach((function(e){var r,n,i,o=a,s=e.length;for(e.sort(f),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+t;if((n=o-t-T)>0)for(o=r.y0-=n,r.y1-=n,i=s-2;i>=0;--i)(n=(r=e[i]).y1+t-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}function V(t){t.nodes.forEach((function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)})),t.nodes.forEach((function(t){var e=t.y0,r=e,n=t.y1,i=n;t.sourceLinks.forEach((function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)})),t.targetLinks.forEach((function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)}))}))}return z.nodeId=function(t){return arguments.length?(M="function"==typeof t?t:s(t),z):M},z.nodeAlign=function(t){return arguments.length?(E="function"==typeof t?t:s(t),z):E},z.nodeWidth=function(t){return arguments.length?(A=+t,z):A},z.nodePadding=function(e){return arguments.length?(t=+e,z):t},z.nodes=function(t){return arguments.length?(L="function"==typeof t?t:s(t),z):L},z.links=function(t){return arguments.length?(C="function"==typeof t?t:s(t),z):C},z.size=function(t){return arguments.length?(i=a=0,b=+t[0],T=+t[1],z):[b-i,T-a]},z.extent=function(t){return arguments.length?(i=+t[0][0],b=+t[1][0],a=+t[0][1],T=+t[1][1],z):[[i,a],[b,T]]},z.iterations=function(t){return arguments.length?(P=+t,z):P},z.circularLinkGap=function(t){return arguments.length?(I=+t,z):I},z.nodePaddingRatio=function(t){return arguments.length?(n=+t,z):n},z.sortNodes=function(t){return arguments.length?(O=t,z):O},z.update=function(t){return w(t,M),V(t),t.links.forEach((function(t){t.circular&&(t.circularLinkType=t.y0+t.y1a&&(b=a);var o=e.min(i,(function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)}));i.forEach((function(t){t.forEach((function(t,e){t.y1=(t.y0=e)+t.value*o}))})),t.links.forEach((function(t){t.width=t.value*o}))}(),d();for(var a=1,o=A;o>0;--o)l(a*=.99),d(),s(a),d();function s(t){i.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,h)/e.sum(r.targetLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function l(t){i.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,p)/e.sum(r.sourceLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function d(){i.forEach((function(t){var e,r,i,a=n,o=t.length;for(t.sort(c),i=0;i0&&(e.y0+=r,e.y1+=r),a=e.y1+b;if((r=a-b-y)>0)for(a=e.y0-=r,e.y1-=r,i=o-2;i>=0;--i)(r=(e=t[i]).y1+b-a)>0&&(e.y0-=r,e.y1-=r),a=e.y0}))}}function P(t){t.nodes.forEach((function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)})),t.nodes.forEach((function(t){var e=t.y0,r=e;t.sourceLinks.forEach((function(t){t.y0=e+t.width/2,e+=t.width})),t.targetLinks.forEach((function(t){t.y1=r+t.width/2,r+=t.width}))}))}return M.update=function(t){return P(t),t},M.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),M):_},M.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),M):w},M.nodeWidth=function(t){return arguments.length?(x=+t,M):x},M.nodePadding=function(t){return arguments.length?(b=+t,M):b},M.nodes=function(t){return arguments.length?(T="function"==typeof t?t:o(t),M):T},M.links=function(t){return arguments.length?(k="function"==typeof t?t:o(t),M):k},M.size=function(e){return arguments.length?(t=n=0,i=+e[0],y=+e[1],M):[i-t,y-n]},M.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],y=+e[1][1],M):[[t,n],[i,y]]},M.iterations=function(t){return arguments.length?(A=+t,M):A},M},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,i)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=a,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":107,"d3-collection":108,"d3-shape":119}],58:[function(t,e,r){(function(){var t={version:"3.8.0"},r=[].slice,n=function(t){return r.call(t)},i=self.document;function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+"")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+"")},u.setProperty=function(t,e,r){f.call(this,t,e+"",r)}}function h(t,e){return te?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function m(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}t.ascending=h,t.descending=function(t,e){return et?1:e>=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var g=m(h);function v(t){return t.length}t.bisectLeft=g.left,t.bisect=t.bisectRight=g.right,t.bisector=function(t){return m(1===t.length?function(e,r){return h(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t){for(var e=1;t*e%1;)e*=10;return e}function b(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function _(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=x(y(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,f,h=-1,p=a.length,d=i[s++],m=new _;++h=i.length)return e;var n=[],o=a[r++];return e.forEach((function(e,i){n.push({key:e,values:t(i,r)})})),o?n.sort((function(t,e){return o(t.key,e.key)})):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new L;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function V(t){return U(t,Y),t}var H=function(t,e){return e.querySelector(t)},q=function(t,e){return e.querySelectorAll(t)},G=function(t,e){var r=t.matches||t[I(t,"matchesSelector")];return(G=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(H=function(t,e){return Sizzle(t,e)[0]||null},q=Sizzle,G=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var Y=t.selection.prototype=[];function W(t){return"function"==typeof t?t:function(){return H(t,this)}}function Z(t){return"function"==typeof t?t:function(){return q(t,this)}}Y.select=function(t){var e,r,n,i,a=[];t=W(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),J.hasOwnProperty(r)?{space:J[r],local:t}:t}},Y.attr=function(e,r){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(K(r,e[r]));return this}return this.each(K(e,r))},Y.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=tt(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Y.sort=function(t){t=ct.apply(this,arguments);for(var e=-1,r=this.length;++e=e&&(e=i+1);!(o=s[e])&&++e0&&(e=e.slice(0,o));var l=mt.get(e);function c(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?z:function(){var r,n=new RegExp("^__on([^.]+)"+t.requote(e)+"$");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ft,t.selection.enter.prototype=ht,ht.append=Y.append,ht.empty=Y.empty,ht.node=Y.node,ht.call=Y.call,ht.size=Y.size,ht.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s1?Et:t<-1?-Et:Math.asin(t)}function It(t){return((t=Math.exp(t))+1/t)/2}var Ot=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h<1e-12)n=Math.log(c/o)/Ot,r=function(t){return[i+t*u,a+t*f,o*Math.exp(Ot*t*n)]};else{var p=Math.sqrt(h),d=(c*c-o*o+4*h)/(2*o*2*p),m=(c*c-o*o-4*h)/(2*c*2*p),g=Math.log(Math.sqrt(d*d+1)-d),v=Math.log(Math.sqrt(m*m+1)-m);n=(v-g)/Ot,r=function(t){var e,r=t*n,s=It(g),l=o/(2*p)*(s*(e=Ot*r+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+l*u,a+l*f,o*s/It(Ot*r+g)]}}return r.duration=1e3*n,r},t.behavior.zoom=function(){var e,r,n,a,s,l,c,u,f,h={x:0,y:0,k:1},p=[960,500],d=Rt,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=N(w,"zoomstart","zoom","zoomend");function w(t){t.on(v,P).on(Dt+".zoom",O).on("dblclick.zoom",z).on(b,I)}function T(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function k(t){h.k=Math.max(d[0],Math.min(d[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function M(e,n,i,a){e.__chart__={x:h.x,y:h.y,k:h.k},k(Math.pow(2,a)),A(r=n,i),e=t.select(e),m>0&&(e=e.transition().duration(m)),e.call(w.event)}function S(){c&&c.domain(l.range().map((function(t){return(t-h.x)/h.k})).map(l.invert)),f&&f.domain(u.range().map((function(t){return(t-h.y)/h.k})).map(u.invert))}function E(t){g++||t({type:"zoomstart"})}function L(t){S(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function C(t){--g||(t({type:"zoomend"}),r=null)}function P(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,l).on(x,c),a=T(t.mouse(e)),s=bt(e);function l(){n=1,A(t.mouse(e),a),L(r)}function c(){i.on(y,null).on(x,null),s(n),C(r)}Di.call(e),E(r)}function I(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=".zoom-"+t.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],f=t.select(r),p=bt(r);function d(){var n=t.touches(r);return e=h.k,n.forEach((function(t){t.identifier in i&&(i[t.identifier]=T(t))})),n}function m(){var e=t.event.target;t.select(e).on(l,g).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,f=n.length;o1){v=p[0];var x=p[1],b=v[0]-x[0],_=v[1]-x[1];a=b*b+_*_}}function g(){var o,l,c,u,f=t.touches(r);Di.call(r);for(var h=0,p=f.length;h360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new Qt(a(t+120),a(t),a(t-120))}function Ut(e,r,n){return this instanceof Ut?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Ut?new Ut(e.h,e.c,e.l):Zt(e instanceof qt?e.l:(e=ae((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ut(e,r,n)}Nt.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Bt(this.h,this.s,this.l/t)},Nt.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Bt(this.h,this.s,t*this.l)},Nt.rgb=function(){return jt(this.h,this.s,this.l)},t.hcl=Ut;var Vt=Ut.prototype=new Ft;function Ht(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new qt(r,Math.cos(t*=Lt)*e,Math.sin(t)*e)}function qt(t,e,r){return this instanceof qt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof qt?new qt(t.l,t.a,t.b):t instanceof Ut?Ht(t.h,t.c,t.l):ae((t=Qt(t)).r,t.g,t.b):new qt(t,e,r)}Vt.brighter=function(t){return new Ut(this.h,this.c,Math.min(100,this.l+Gt*(arguments.length?t:1)))},Vt.darker=function(t){return new Ut(this.h,this.c,Math.max(0,this.l-Gt*(arguments.length?t:1)))},Vt.rgb=function(){return Ht(this.h,this.c,this.l).rgb()},t.lab=qt;var Gt=18,Yt=qt.prototype=new Ft;function Wt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new Qt(Kt(3.2404542*(i=.95047*Xt(i))-1.5371385*(n=1*Xt(n))-.4985314*(a=1.08883*Xt(a))),Kt(-.969266*i+1.8760108*n+.041556*a),Kt(.0556434*i-.2040259*n+1.0572252*a))}function Zt(t,e,r){return t>0?new Ut(Math.atan2(r,e)*Ct,Math.sqrt(e*e+r*r),t):new Ut(NaN,NaN,t)}function Xt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function Jt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function Kt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function Qt(t,e,r){return this instanceof Qt?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof Qt?new Qt(t.r,t.g,t.b):ne(""+t,Qt,jt):new Qt(t,e,r)}function $t(t){return new Qt(t>>16,t>>8&255,255&t)}function te(t){return $t(t)+""}Yt.brighter=function(t){return new qt(Math.min(100,this.l+Gt*(arguments.length?t:1)),this.a,this.b)},Yt.darker=function(t){return new qt(Math.max(0,this.l-Gt*(arguments.length?t:1)),this.a,this.b)},Yt.rgb=function(){return Wt(this.l,this.a,this.b)},t.rgb=Qt;var ee=Qt.prototype=new Ft;function re(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ne(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(se(i[0]),se(i[1]),se(i[2]))}return(a=le.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function ie(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new Bt(n,i,l)}function ae(t,e,r){var n=Jt((.4124564*(t=oe(t))+.3575761*(e=oe(e))+.1804375*(r=oe(r)))/.95047),i=Jt((.2126729*t+.7151522*e+.072175*r)/1);return qt(116*i-16,500*(n-i),200*(i-Jt((.0193339*t+.119192*e+.9503041*r)/1.08883)))}function oe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function se(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}ee.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return self.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState>3&&f()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+"",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},["get","post"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}})),o.send=function(t,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(t,e,!0),null==r||"accept"in l||(l.accept=r+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on("error",i).on("load",(function(t){i(null,t)})),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,"on"),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}le.forEach((function(t,e){le.set(t,$t(e))})),t.functor=ce,t.xhr=ue(C),t.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=fe(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(me),me=setTimeout(ye,e)),de=0):(de=1,ge(ye))}function xe(){for(var t=Date.now(),e=he;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function be(){for(var t,e=he,r=1/0;e;)e.c?(e.t1&&(e=t[a[o-2]],r=t[a[o-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function ke(t,e){return t[0]-e[0]||t[1]-e[1]}t.timer=function(){ve.apply(this,arguments)},t.timer.flush=function(){xe(),be()},t.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},t.geom={},t.geom.hull=function(t){var e=_e,r=we;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ce(e),a=ce(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[c[n]][2]]);for(n=+f;nkt)s=s.L;else{if(!((i=a-Ve(s,o))>kt)){n>-kt?(e=s.P,r=s):i>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=Fe(t);if(Pe.insert(e,l),e||r){if(e===r)return We(e),r=Fe(e.site),Pe.insert(l,r),l.edge=r.edge=Je(e.site,l.site),Ye(e),void Ye(r);if(r){We(e),We(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,p=t.y-f,d=r.site,m=d.x-u,g=d.y-f,v=2*(h*g-p*m),y=h*h+p*p,x=m*m+g*g,b={x:(g*y-p*x)/v+u,y:(h*x-m*y)/v+f};Qe(r.edge,c,d,b),l.edge=Je(c,t,null,b),r.edge=Je(t,d,null,b),Ye(e),Ye(r)}else l.edge=Je(e.site,l.site)}}function Ue(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function Ve(t,e){var r=t.N;if(r)return Ue(r,e);var n=t.site;return n.y===e?n.x:1/0}function He(t){this.site=t,this.edges=[]}function qe(t,e){return e.angle-t.angle}function Ge(){er(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ye(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(g=a.y-s)-c*u);if(!(f>=-1e-12)){var h=l*l+c*c,p=u*u+g*g,d=(g*h-c*p)/f,m=(l*p-u*h)/f,g=m+s,v=De.pop()||new Ge;v.arc=t,v.site=i,v.x=d+o,v.y=g+Math.sqrt(d*d+m*m),v.cy=g,t.circle=v;for(var y=null,x=Oe._;x;)if(v.y=s)return;if(h>d){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(h>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x0)){if(e/=h,h<0){if(e0){if(e>f)return;e>u&&(u=e)}if(e=i-l,h||!(e<0)){if(e/=h,h<0){if(e>f)return;e>u&&(u=e)}else if(h>0){if(e0)){if(e/=p,p<0){if(e0){if(e>f)return;e>u&&(u=e)}if(e=a-c,p||!(e<0)){if(e/=p,p<0){if(e>f)return;e>u&&(u=e)}else if(p>0){if(e0&&(t.a={x:l+u*h,y:c+u*p}),f<1&&(t.b={x:l+f*h,y:c+f*p}),t}}}}}),l=o.length;l--;)(!Ze(e=o[l],t)||!s(e)||y(e.a.x-e.b.x)kt||y(i-r)>kt)&&(s.splice(o,0,new $e(Ke(a.site,u,y(n-f)kt?{x:f,y:y(e-f)kt?{x:y(r-d)kt?{x:h,y:y(e-h)kt?{x:y(r-p)=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}}))}return o.links=function(t){return ar(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},o.triangles=function(t){var e=[];return ar(s(t)).cells.forEach((function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(qe),u=-1,f=c.length,h=c[f-1].edge,p=h.l===l?h.r:h.l;++ua||f>o||h=_)<<1|e>=b,T=w+4;wa&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:dr(r,n)})),a=vr.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(f=0;fm&&(m=b),_>g&&(g=_),c.push(b),u.push(_)}var w=m-p,T=g-d;function k(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)A(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,A(t,u,l,c,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,f=n>=c,h=f<<1|u;t.leaf=!1,u?i=l:o=l,f?a=c:s=c,k(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,a,o,s)}w>T?g=d+w:m=p+T;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(M,t,+v(t,++f),+x(t,f),p,d,m,g)},visit:function(t){ur(t,M,p,d,m,g)},find:function(t){return fr(M,t[0],t[1],p,d,m,g)}};if(f=-1,null==e){for(;++f=0&&!(n=t.interpolators[i](e,r)););return n}function xr(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function kr(t){return function(e){return 1-t(1-e)}}function Ar(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Mr(t){return t*t}function Sr(t){return t*t*t}function Er(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Lr(t){return 1-Math.cos(t*Et)}function Cr(t){return Math.pow(2,10*(t-1))}function Pr(t){return 1-Math.sqrt(1-t*t)}function Ir(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Or(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function zr(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=Rr(i),s=Dr(i,a),l=Rr(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):"in";return n=_r.get(n)||br,Tr((i=wr.get(i)||C)(n.apply(null,r.call(arguments,1))))},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Ht(n+o*t,i+s*t,a+l*t)+""}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return jt(n+o*t,i+s*t,a+l*t)+""}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return Wt(n+o*t,i+s*t,a+l*t)+""}},t.interpolateRound=Or,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(t){if(null!=t){r.setAttribute("transform",t);var e=r.transform.baseVal.consolidate()}return new zr(e?e.matrix:Fr)})(e)},zr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Fr={a:1,b:0,c:0,d:1,e:0,f:0};function Br(t){return t.length?t.pop()+",":""}function Nr(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:dr(t[0],e[0])},{i:i-2,x:dr(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Br(r)+"rotate(",null,")")-2,x:dr(t,e)})):e&&r.push(Br(r)+"rotate("+e+")")}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(Br(r)+"skewX(",null,")")-2,x:dr(t,e)}):e&&r.push(Br(r)+"skewX("+e+")")}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Br(r)+"scale(",null,",",null,")");n.push({i:i-4,x:dr(t[0],e[0])},{i:i-2,x:dr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Br(r)+"scale("+e+")")}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=ve(s.tick)),s):n},s.start=function(){var t,e,r,n=v.length,l=y.length,u=c[0],d=c[1];for(t=0;t=0;)r.push(i[n])}function $r(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return $r(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(Qr(t,(function(t){t.children&&(t.value=0)})),$r(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=e);return n}function dn(t){return t.reduce(mn,0)}function mn(t,e){return t+e[1]}function gn(t,e){return vn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function vn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function yn(e){return[t.min(e),t.max(e)]}function xn(t,e){return t.value-e.value}function bn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function _n(t,e){t._pack_next=e,e._pack_prev=t}function wn(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Tn(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,f=1/0,h=-1/0;if(e.forEach(kn),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(Mn(r,n,i=e[2]),x(i),bn(r,i),r._pack_prev=i,bn(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=f[0]&&l<=f[1]&&((s=c[t.bisect(h,l,1,d)-1]).y+=m,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=ce(t),a):n},a.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return vn(e,t)}:ce(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort(xn),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,$r(s,(function(t){t.r=+u(t.value)})),$r(s,Tn),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;$r(s,(function(t){t.r+=f})),$r(s,Tn),$r(s,(function(t){t.r-=f}))}return function t(e,r,n,i){var a=e.children;if(e.x=r+=i*e.x,e.y=n+=i*e.y,e.r*=i,a)for(var o=-1,s=a.length;++op.x&&(p=t),t.depth>d.depth&&(d=t)}));var m=r(h,p)/2-h.x,g=n[0]/(p.x+r(p,h)/2+m),v=n[1]/(d.depth||1);Qr(u,(function(t){t.x=(t.x+m)*g,t.y=t.depth*v}))}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=Ln(s),a=En(a),s&&a;)l=En(l),(o=Ln(o)).a=t,(i=s.z+f-a.z-c+r(s._,a._))>0&&(Cn(Pn(s,t,n),t,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!Ln(o)&&(o.t=s,o.m+=f-u),a&&!En(l)&&(l.t=a,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Kr(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=Sn,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;$r(c,(function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(n),e.y=function(e){return 1+t.max(e,(function(t){return t.y}))}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)}));var f=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),h=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=f.x-r(f,h)/2,d=h.x+r(h,f)/2;return $r(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Kr(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=In,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,m))<=h?(c.pop(),h=n):(s.area-=s.pop().area,d(s,m,a,!1),m=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(d(s,m,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?jn:Rn,s=i?Ur:jr;return a=t(e,r,s,n),o=t(r,e,s,yr),l}function l(t){return a(t)}return l.invert=function(t){return o(t)},l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e},l.range=function(t){return arguments.length?(r=t,s()):r},l.rangeRound=function(t){return l.range(t).interpolate(Or)},l.clamp=function(t){return arguments.length?(i=t,s()):i},l.interpolate=function(t){return arguments.length?(n=t,s()):n},l.ticks=function(t){return qn(e,t)},l.tickFormat=function(t,r){return d3_scale_linearTickFormat(e,t,r)},l.nice=function(t){return Vn(e,t),s()},l.copy=function(){return t(e,r,n,i)},s()}([0,1],[0,1],yr,!1)};t.scale.log=function(){return function t(e,r,n,i){function a(t){return(n?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(r)}function o(t){return n?Math.pow(r,t):-Math.pow(r,-t)}function s(t){return e(a(t))}return s.invert=function(t){return o(e.invert(t))},s.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((i=t.map(Number)).map(a)),s):i},s.base=function(t){return arguments.length?(r=+t,e.domain(i.map(a)),s):r},s.nice=function(){var t=Fn(i.map(a),n?Math:Gn);return e.domain(t),i=t.map(o),s},s.ticks=function(){var t=zn(i),e=[],s=t[0],l=t[1],c=Math.floor(a(s)),u=Math.ceil(a(l)),f=r%1?2:r;if(isFinite(u-c)){if(n){for(;c0;h--)e.push(o(c)*h);for(c=0;e[c]l;u--);e=e.slice(c,u)}return e},s.copy=function(){return t(e.copy(),r,n,i)},Un(s,e)}(t.scale.linear().domain([0,1]),10,!0,[1,10])};var Gn={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function Yn(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}t.scale.pow=function(){return function t(e,r,n){var i=Yn(r),a=Yn(1/r);function o(t){return e(i(t))}return o.invert=function(t){return a(e.invert(t))},o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(i)),o):n},o.ticks=function(t){return qn(n,t)},o.tickFormat=function(t,e){return d3_scale_linearTickFormat(n,t,e)},o.nice=function(t){return o.domain(Vn(n,t))},o.exponent=function(t){return arguments.length?(i=Yn(r=t),a=Yn(1/r),e.domain(n.map(i)),o):r},o.copy=function(){return t(e.copy(),r,n)},Un(o,e)}(t.scale.linear(),1,[0,1])},t.scale.sqrt=function(){return t.scale.pow().exponent(.5)},t.scale.ordinal=function(){return function e(r,n){var i,a,o;function s(t){return a[((i.get(t)||("range"===n.t?i.set(t,r.push(t)):NaN))-1)%a.length]}function l(e,n){return t.range(r.length).map((function(t){return e+n*t}))}return s.domain=function(t){if(!arguments.length)return r;r=[],i=new _;for(var e,a=-1,o=t.length;++a0?i[t-1]:r[0],tf?0:1;if(c=St)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,m,g,v,y,x,b,_,w,T,k,A,M=0,S=0,E=[];if((v=(+o.apply(this,arguments)||0)/2)&&(g=n===Qn?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=Pt(g/c*Math.sin(v))),s&&(M=Pt(g/s*Math.sin(v)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var L=Math.abs(f-u-2*S)<=At?0:1;if(S&&ii(y,x,b,_)===p^L){var C=(u+f)/2;y=c*Math.cos(C),x=c*Math.sin(C),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-M),T=s*Math.sin(f-M),k=s*Math.cos(u+M),A=s*Math.sin(u+M);var P=Math.abs(u-f+2*M)<=At?0:1;if(M&&ii(w,T,k,A)===1-p^P){var I=(u+f)/2;w=s*Math.cos(I),T=s*Math.sin(I),k=A=null}}else w=T=0;if(h>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function ai(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,p=e[1]+c,d=(u+h)/2,m=(f+p)/2,g=h-u,v=p-f,y=g*g+v*v,x=r-n,b=u*p-h*f,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-g*_)/y,T=(-b*g-v*_)/y,k=(b*v+g*_)/y,A=(-b*g+v*_)/y,M=w-d,S=T-m,E=k-d,L=A-m;return M*M+S*S>E*E+L*L&&(w=k,T=A),[[w-l,T-c],[w*r/x,T*r/x]]}function oi(){return!0}function si(t){var e=_e,r=we,n=oi,i=ci,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,f=a.length,h=ce(e),p=ce(r);function d(){l.push("M",i(t(c),o))}for(;++u1&&i.push("H",n[0]);return i.join("")},"step-before":fi,"step-after":hi,basis:mi,"basis-open":function(t){if(t.length<4)return ci(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(gi(xi,a)+","+gi(xi,o)),--n;for(;++n9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function ci(t){return t.length>1?t.join("L"):t+"Z"}function ui(t){return t.join("L")+"Z"}function fi(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cAt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return a.radius=function(t){return arguments.length?(r=ce(t),a):r},a.source=function(e){return arguments.length?(t=ce(e),a):t},a.target=function(t){return arguments.length?(e=ce(t),a):e},a.startAngle=function(t){return arguments.length?(n=ce(t),a):n},a.endAngle=function(t){return arguments.length?(i=ce(t),a):i},a},t.svg.diagonal=function(){var t=ki,e=Ai,r=Si;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ce(e),n):t},n.target=function(t){return arguments.length?(e=ce(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=Si,n=e.projection;return e.projection=function(t){return arguments.length?n(Ei(r=t)):r},e},t.svg.symbol=function(){var t=Ci,e=Li;function r(r,n){return(Ii.get(t.call(this,r,n))||Pi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ce(e),r):t},r.size=function(t){return arguments.length?(e=ce(t),r):e},r};var Ii=t.map({circle:Pi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*zi)),r=e*zi;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Oi),r=e*Oi/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Oi),r=e*Oi/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});t.svg.symbolTypes=Ii.keys();var Oi=Math.sqrt(3),zi=Math.tan(30*Lt);Y.transition=function(t){for(var e,r,n=Bi||++Ui,i=qi(t),a=[],o=Ni||{time:Date.now(),ease:Er,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}f||(a=i.time,o=ve((function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h}),0,a),f=u[n]={tween:new _,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}ji.call=Y.call,ji.empty=Y.empty,ji.node=Y.node,ji.size=Y.size,t.transition=function(e,r){return e&&e.transition?Bi?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=ji,ji.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=W(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(t){t.select(".extent").attr("y",l[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var f,g,v=this,y=t.select(t.event.target),x=n.of(v,arguments),b=t.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&&i,T=!/^(e|w)$/.test(_)&&a,k=y.classed("extent"),A=bt(v),M=t.mouse(v),S=t.select(o(v)).on("keydown.brush",C).on("keyup.brush",P);if(t.event.changedTouches?S.on("touchmove.brush",I).on("touchend.brush",z):S.on("mousemove.brush",I).on("mouseup.brush",z),b.interrupt().selectAll("*").interrupt(),k)M[0]=s[0]-M[0],M[1]=l[0]-M[1];else if(_){var E=+/w$/.test(_),L=+/^n/.test(_);g=[s[1-E]-M[0],l[1-L]-M[1]],M[0]=s[E],M[1]=l[L]}else t.event.altKey&&(f=M.slice());function C(){32==t.event.keyCode&&(k||(f=null,M[0]-=s[1],M[1]-=l[1],k=2),F())}function P(){32==t.event.keyCode&&2==k&&(M[0]+=s[1],M[1]+=l[1],k=0,F())}function I(){var e=t.mouse(v),r=!1;g&&(e[0]+=g[0],e[1]+=g[1]),k||(t.event.altKey?(f||(f=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(e[0]>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?d=new(f(e.dtype))(g):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=g));for(var v=0;vr||s>1073741824){for(var h=0;he+n||w>r+n||T=A||a===o)){var s=y[i];void 0===o&&(o=s.length);for(var l=a;l=d&&u<=g&&f>=m&&f<=v&&S.push(c)}var h=x[i],p=h[4*a+0],b=h[4*a+1],M=h[4*a+2],E=h[4*a+3],P=C(h,a+1),I=.5*n,O=i+1;L(e,r,I,O,p,b||M||E||P),L(e,r+I,I,O,b,M||E||P),L(e+I,r,I,O,M,E||P),L(e+I,r+I,I,O,E,P)}}function C(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}return L(0,0,1,0,0,1),S},d;function E(t,e,r,i,a){for(var o=[],s=0;s0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(s=0;s=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=f,r.lengthToRadians=h,r.lengthToDegrees=function(t,e){return p(h(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return f(h(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=r.areaFactors[e];if(!i)throw new Error("invalid original units");var a=r.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!d(t))throw new Error("bbox must only contain numbers")}))},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},{}],63:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function i(t,e,r){if(null!==t)for(var n,a,o,s,l,c,u,f,h=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,v=m?t.features.length:1,y=0;yc||p>u||d>f)return l=i,c=r,u=p,f=d,void(o=0);var m=n.lineString([l,i],t.properties);if(!1===e(m,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=f,r.lengthToRadians=h,r.lengthToDegrees=function(t,e){return p(h(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return f(h(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=r.areaFactors[e];if(!i)throw new Error("invalid original units");var a=r.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!d(t))throw new Error("bbox must only contain numbers")}))},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],69:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function i(t,e,r){if(null!==t)for(var n,a,o,s,l,c,u,f,h=0,p=0,d=t.type,m="FeatureCollection"===d,g="Feature"===d,v=m?t.features.length:1,y=0;yc||p>u||d>f)return l=i,c=r,u=p,f=d,void(o=0);var m=n.lineString([l,i],t.properties);if(!1===e(m,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;si&&(i=t[o]),t[o] - * @license MIT - */function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!x(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&v(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!t&&i&&!r;if((!t&&o.isError(i)&&a&&_(i,r)||s)&&v(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return m(g(t.actual),128)+" "+t.operator+" "+m(g(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=v,h.ok=y,h.equal=function(t,e,r){t!=e&&v(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&v(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){x(t,e,!1)||v(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){x(t,e,!0)||v(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){x(t,e,!1)&&v(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){x(e,r,!0)&&v(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&v(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){w(!0,t,e,r)},h.doesNotThrow=function(t,e,r){w(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n((function t(e,r){e||v(e,!0,r,"==",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var T=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":247,"util/":78}],76:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],77:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],78:[function(t,e,r){(function(e,n){(function(){var i=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),l=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(e);if(0===o.length){if(T(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(w(e))return f(e)}var c,b="",k=!1,A=["{","}"];(p(e)&&(k=!0,A=["[","]"]),T(e))&&(b=" [Function"+(e.name?": "+e.name:"")+"]");return x(e)&&(b=" "+RegExp.prototype.toString.call(e)),_(e)&&(b=" "+Date.prototype.toUTCString.call(e)),w(e)&&(b=" "+f(e)),0!==o.length||k&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=k?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,b,A)):A[0]+b+A[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),E(n,i)||(o="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=m(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function v(t){return"string"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&"[object RegExp]"===k(t)}function b(t){return"object"==typeof t&&null!==t}function _(t){return b(t)&&"[object Date]"===k(t)}function w(t){return b(t)&&("[object Error]"===k(t)||t instanceof Error)}function T(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function A(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&&(a=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=m,r.isNullOrUndefined=function(t){return null==t},r.isNumber=g,r.isString=v,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=T,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t("./support/isBuffer");var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var t=new Date,e=[A(t.getHours()),A(t.getMinutes()),A(t.getSeconds())].join(":");return[t.getDate(),M[t.getMonth()],e].join(" ")}function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){console.log("%s - %s",S(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":77,_process:278,inherits:76}],79:[function(t,e,r){"use strict";r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=c(t),o=n[0],s=n[1],l=new a(function(t,e,r){return 3*(e+r)/4-r}(0,o,s)),u=0,f=s>0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var i,a,o=[],s=e;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],80:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function i(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function a(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function o(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function s(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function l(t,e,r,n,i,a){return"function"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}e.exports={ge:function(t,e,r,i,a){return l(t,e,r,i,a,n)},gt:function(t,e,r,n,a){return l(t,e,r,n,a,i)},lt:function(t,e,r,n,i){return l(t,e,r,n,i,a)},le:function(t,e,r,n,i){return l(t,e,r,n,i,o)},eq:function(t,e,r,n,i){return l(t,e,r,n,i,s)}}},{}],81:[function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],82:[function(t,e,r){"use strict";var n=t("clamp");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,f,h,p,d,m,g=null==e.cutoff?.25:e.cutoff,v=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext("2d"),r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(h=t.canvas,f=t,r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,m=c.length;d0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(void 0===l)return!1;if("function"==typeof l)a(l,this,e);else{var c=l.length,u=g(l,c);for(r=0;r=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],85:[function(t,e,r){(function(e){(function(){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -"use strict";var e=t("base64-js"),n=t("ieee754");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return o(t,e,r)}function o(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(t).length;default:if(i)return n?-1:D(t).length;e=(""+e).toLowerCase(),i=!0}}function h(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return w(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),N(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;ne&&(t+=" ... "),""},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return y(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function C(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function R(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":79,buffer:85,ieee754:230}],86:[function(t,e,r){e.exports=function(t,e,r){return er?r:t:te?e:t}},{}],87:[function(t,e,r){"use strict";var n=t("clamp");function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(o=255&n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:86}],88:[function(t,e,r){"use strict";e.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]}},{}],89:[function(t,e,r){"use strict";var n=t("color-rgba"),i=t("clamp"),a=t("dtype");e.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(a(e))(4),o="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},{clamp:86,"color-rgba":91,dtype:127}],90:[function(t,e,r){(function(r){(function(){"use strict";var n=t("color-name"),i=t("is-plain-obj"),a=t("defined");e.exports=function(t){var e,s,l=[],c=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var f=e[1],h="rgb"===f,p=f.replace(/a$/,"");s=p;u="cmyk"===p?4:"gray"===p?1:3;l=e[2].trim().split(/\s*,\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:"rgb"===p?255*parseFloat(t)/100:parseFloat(t);if("h"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),s=t.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s="rgb",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s="hsl",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",c=4===t.length?t[3]:1);else s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":88,defined:124,"is-plain-obj":236}],91:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:86,"color-parse":90,"color-space/hsl":92}],92:[function(t,e,r){"use strict";var n=t("./rgb");e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{"./rgb":93}],93:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],94:[function(t,e,r){e.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"}},{}],95:[function(t,e,r){e.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],96:[function(t,e,r){e.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],97:[function(t,e,r){e.exports=["normal","italic","oblique"]},{}],98:[function(t,e,r){e.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],99:[function(t,e,r){"use strict";e.exports={parse:t("./parse"),stringify:t("./stringify")}},{"./parse":101,"./stringify":102}],100:[function(t,e,r){"use strict";var n=t("css-font-size-keywords");e.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},{"css-font-size-keywords":95}],101:[function(t,e,r){"use strict";var n=t("unquote"),i=t("css-global-keywords"),a=t("css-system-font-keywords"),o=t("css-font-weight-keywords"),s=t("css-font-style-keywords"),l=t("css-font-stretch-keywords"),c=t("string-split-by"),u=t("./lib/util").isSize;e.exports=h;var f=h.cache={};function h(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(f[t])return f[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=c(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),f[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(u(e)){var d=c(e,"/");if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):"/"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error("Missing required font-family.");return r.family=c(h.join(" "),/\s*,\s*/).map(n),f[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},{"./lib/util":100,"css-font-stretch-keywords":96,"css-font-style-keywords":97,"css-font-weight-keywords":98,"css-global-keywords":103,"css-system-font-keywords":104,"string-split-by":306,unquote:329}],102:[function(t,e,r){"use strict";var n=t("pick-by-alias"),i=t("./lib/util").isSize,a=m(t("css-global-keywords")),o=m(t("css-system-font-keywords")),s=m(t("css-font-weight-keywords")),l=m(t("css-font-style-keywords")),c=m(t("css-font-stretch-keywords")),u={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="1rem",p="serif";function d(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function m(t){for(var e={},r=0;re?1:t>=e?0:NaN}function r(t){var r;return 1===t.length&&(r=t,t=function(t,n){return e(r(t),n)}),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}var n=r(e),i=n.right,a=n.left;function o(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function l(t,e){var r,n,i=t.length,a=0,o=-1,l=0,c=0;if(null==e)for(;++o1)return c/(a-1)}function c(t,e){var r=l(t,e);return r?Math.sqrt(r):r}function u(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?10:a>=y?5:a>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),e=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}}function k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,M),n=new Array(r);++et?1:e>=t?0:NaN},t.deviation=c,t.extent=u,t.histogram=function(){var t=m,e=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;af;)h.pop(),--p;var d,m=new Array(p+1);for(a=0;a<=p;++a)(d=m[a]=[]).x0=a>0?h[a-1]:u,d.x1=a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,t.pairs=function(t,e){null==e&&(e=o);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=l.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,c,f,h=-1,p=n.length,d=l[i++],m=r(),g=a();++hl.length)return r;var i,a=c[n-1];return null!=e&&n>=l.length?i=r.entries():(i=[],r.each((function(e,r){i.push({key:r,values:t(e,n)})}))),null!=a?i.sort((function(t,e){return a(t.key,e.key)})):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})}))},{}],109:[function(t,e,r){!function(t,n){"object"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,l=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),c=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),u=new RegExp("^rgba\\("+[i,i,i,a]+"\\)$"),f=new RegExp("^rgba\\("+[o,o,o,a]+"\\)$"),h=new RegExp("^hsl\\("+[a,o,o]+"\\)$"),p=new RegExp("^hsla\\("+[a,o,o,a]+"\\)$"),d={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function m(){return this.rgb().formatHex()}function g(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?M(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?M(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):"transparent"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return"#"+A(this.r)+A(this.g)+A(this.b)}function k(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function A(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function M(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,r,n)}function S(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new L;if(t instanceof L)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r0&&c<1?0:s,new L(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new L(t,e,r,null==n?1:n)}function L(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function C(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:m,formatHex:m,formatHsl:function(){return S(this).formatHsl()},formatRgb:g,toString:g}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(L,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new L(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new w(C(t>=240?t-240:t+120,i,n),C(t,i,n),C(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var P=Math.PI/180,I=180/Math.PI,O=6/29,z=3*O*O;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof q)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(t):new F(t,e,r,null==n?1:n)}function F(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function B(t){return t>.008856451679035631?Math.pow(t,1/3):t/z+4/29}function N(t){return t>O?t*t*t:z*(t-4/29)}function j(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function V(t){if(t instanceof q)return new q(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new q(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,g=p-s.y-s.vy,v=f*f+g*g;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c1?(h.on(t,r),e):h.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a1?n[0]+n.slice(2):n,+t.slice(r+1)]}function r(t){return(t=e(Math.abs(t)))?t[1]:NaN}var n,i=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(t){if(!(e=i.exec(t)))throw new Error("invalid format: "+t);var e;return new o({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function o(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function s(t,r){var n=e(t,r);if(!n)return t+"";var i=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}a.prototype=o.prototype,o.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var l={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return s(100*t,e)},r:s,s:function(t,r){var i=e(t,r);if(!i)return t+"";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+e(t,Math.max(0,r+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var u,f=Array.prototype.map,h=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function p(t){var e,i,o=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),i=t.thousands+"",function(t,r){for(var n=t.length,a=[],o=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(t.substring(n-=s,n+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(i)}),s=void 0===t.currency?"":t.currency[0]+"",u=void 0===t.currency?"":t.currency[1]+"",p=void 0===t.decimal?".":t.decimal+"",d=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),m=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function y(t){var e=(t=a(t)).fill,r=t.align,i=t.sign,c=t.symbol,f=t.zero,y=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;"n"===w?(x=!0,w="g"):l[w]||(void 0===b&&(b=12),_=!0,w="g"),(f||"0"===e&&"="===r)&&(f=!0,e="0",r="=");var T="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===c?u:/[%p]/.test(w)?m:"",A=l[w],M=/[defgprs%]/.test(w);function S(t){var a,s,l,c=T,u=k;if("c"===w)u=A(t)+u,t="";else{var m=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),m&&0==+t&&"+"!==i&&(m=!1),c=(m?"("===i?i:g:"-"===i||"("===i?"":i)+c,u=("s"===w?h[8+n/3]:"")+u+(m&&"("===i?")":""),M)for(a=-1,s=t.length;++a(l=t.charCodeAt(a))||l>57){u=(46===l?p+t.slice(a+1):t.slice(a))+u,t=t.slice(0,a);break}}x&&!f&&(t=o(t,1/0));var S=c.length+t.length+u.length,E=S>1)+c+t+u+E.slice(S);break;default:t=E+c+t+u}return d(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+""},S}return{format:y,formatPrefix:function(t,e){var n=y(((t=a(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(r(e)/3))),o=Math.pow(10,-i),s=h[8+i/3];return function(t){return n(o*t)+s}}}}function d(e){return u=p(e),t.format=u.format,t.formatPrefix=u.formatPrefix,u}d({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t.FormatSpecifier=o,t.formatDefaultLocale=d,t.formatLocale=p,t.formatSpecifier=a,t.precisionFixed=function(t){return Math.max(0,-r(Math.abs(t)))},t.precisionPrefix=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(e)/3)))-r(Math.abs(t)))},t.precisionRound=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,r(e)-r(t))+1},Object.defineProperty(t,"__esModule",{value:!0})}))},{}],113:[function(t,e,r){!function(n,i){"object"==typeof r&&void 0!==e?i(r,t("d3-geo"),t("d3-array")):i(n.d3=n.d3||{},n.d3,n.d3)}(this,(function(t,e,r){"use strict";var n=Math.abs,i=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,f=Math.min,h=Math.pow,p=Math.round,d=Math.sign||function(t){return t>0?1:t<0?-1:0},m=Math.sin,g=Math.tan,v=1e-6,y=Math.PI,x=y/2,b=y/4,_=Math.SQRT1_2,w=L(2),T=L(y),k=2*y,A=180/y,M=y/180;function S(t){return t>1?x:t<-1?-x:Math.asin(t)}function E(t){return t>1?0:t<-1?y:Math.acos(t)}function L(t){return t>0?Math.sqrt(t):0}function C(t){return(s(t)-s(-t))/2}function P(t){return(s(t)+s(-t))/2}function I(t){var e=g(t/2),r=2*c(o(t/2))/(e*e);function i(t,e){var n=o(t),i=o(e),a=m(e),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*m(t),l*a]}return i.invert=function(e,i){var s,l=L(e*e+i*i),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=o(h),d=m(h),g=d/p,y=-c(n(p));u-=s=(2/g*y-r*g-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(n(s)>v&&--f>0);var x=m(u);return[a(e*x,l*o(u)),S(i*x/l)]},i}function O(t,e){var r=o(e),n=function(t){return t?t/Math.sin(t):1}(E(r*o(t/=2)));return[2*r*m(t)*n,m(e)*n]}function z(t){var e=m(t),r=o(t),i=t>=0?1:-1,s=g(i*t),l=(1+e-r)/2;function c(t,n){var c=o(n),u=o(t/=2);return[(1+c)*m(t),(i*n>-a(u,s)-.001?0:10*-i)+l+m(n)*r-(1+c)*e*u]}return c.invert=function(t,c){var u=0,f=0,h=50;do{var p=o(u),d=m(u),g=o(f),y=m(f),x=1+g,b=x*d-t,_=l+y*r-x*e*p-c,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*g+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;n(E)>2&&(E/=2),u-=S,f-=E}while((n(S)>v||n(E)>v)&&--h>0);return i*f>-a(o(u),s)-.001?[2*u,f]:null},c}function D(t,e){var r=g(e/2),n=L(1-r*r),i=1+n*o(t/=2),a=m(t)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}O.invert=function(t,e){if(!(t*t+4*e*e>y*y+v)){var r=t,i=e,a=25;do{var s,l=m(r),c=m(r/2),u=o(r/2),f=m(i),h=o(i),p=m(2*i),d=f*f,g=h*h,x=c*c,b=1-g*u*u,_=b?E(h*u)*L(s=1/b):s=0,w=2*_*h*c-t,T=_*f-e,k=s*(g*x+_*h*u*d),A=s*(.5*l*p-2*_*f*c),M=.25*s*(p*c-_*f*g*l),S=s*(d*u+_*x*h),C=A*M-S*k;if(!C)break;var P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]}},D.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&n(e)>1)return null;var r=1+t*t+e*e,i=L((r-L(r*r-4*e*e))/2),s=S(i)/3,l=i?function(t){return c(t+L(t*t-1))}(n(e/i))/3:function(t){return c(t+L(t*t+1))}(n(t))/3,u=o(s),f=P(l),h=f*f-u*u;return[2*d(t)*a(C(l)*u,.25-h),2*d(e)*a(f*m(s),.25+h)]};var R=L(8),F=c(1+w);function B(t,e){var r=n(e);return rx){var l=a(s[1],s[0]),c=L(s[0]*s[0]+s[1]*s[1]),u=r*p((l-x)/r)+x,f=a(m(l-=u),2-o(l));l=u+S(y/c*m(f))-f,s[0]=c*o(l),s[1]=c*m(l)}return s}return s.invert=function(t,n){var s=L(t*t+n*n);if(s>x){var l=a(n,t),c=r*p((l-x)/r)+x,u=l>c?-1:1,f=s*o(c-l),h=1/g(u*E((f-y)/L(y*(y-2*f)+s*s)));l=c+2*i((h+u*L(h*h-3))/3),t=s*o(l),n=s*m(l)}return e.geoAzimuthalEquidistantRaw.invert(t,n)},s}function j(t,r){if(arguments.length<2&&(r=t),1===r)return e.geoAzimuthalEqualAreaRaw;if(r===1/0)return U;function n(n,i){var a=e.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=t,a}return n.invert=function(n,i){var a=e.geoAzimuthalEqualAreaRaw.invert(n/t,i);return a[0]*=r,a},n}function U(t,e){return[t*o(e)/o(e/=2),2*m(e)]}function V(t,e,r){var i,a,o,s=100;r=void 0===r?0:+r,e=+e;do{(a=t(r))===(o=t(r+v))&&(o=a+v),r-=i=-1*v*(a-e)/(a-o)}while(s-- >0&&n(i)>v);return s<0?NaN:r}function H(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=c/=2,s-=u/=2;else{l=m;var g=(o>0?-1:1)*r,v=(s>0?-1:1)*r,y=t(o+g,s),x=t(o,s+v),b=(y[0]-h[0])/g,_=(y[1]-h[1])/g,w=(x[0]-h[0])/v,T=(x[1]-h[1])/v,k=T*b-_*w,A=(n(k)<.5?.5:1)/k;if(o+=c=(d*w-p*T)*A,s+=u=(p*_-d*b)*A,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=H(e),e}function G(t,e){var r,i=t*m(e),a=30;do{e-=r=(e+m(e)-i)/(1+o(e))}while(n(r)>v&&--a>0);return e/2}function Y(t,e,r){function n(n,i){return[t*n*o(i=G(r,i)),e*m(i)]}return n.invert=function(n,i){return i=S(i/e),[n/(t*o(i)),S((2*i+m(2*i))/r)]},n}B.invert=function(t,e){if((a=n(e))1e-12&&--u>0);return[t/(o(l)*(R-1/m(l))),d(e)*l]},U.invert=function(t,e){var r=2*S(e/2);return[t*o(r/2)/o(r),r]};var W=Y(w/x,w,y);var Z=2.00276,X=1.11072;function J(t,e){var r=G(y,e);return[Z*t/(1/o(e)+X/o(r)),(e+w*m(r))/Z]}function K(t){var r=0,n=e.geoProjectionMutator(t),i=n(r);return i.parallel=function(t){return arguments.length?n(r=t*M):r*A},i}function Q(t,e){return[t*o(e),e]}function $(t){if(!t)return Q;var e=1/g(t);function r(r,n){var i=e+t-n,a=i?r*o(n)/i:i;return[i*m(a),e-i*o(a)]}return r.invert=function(r,n){var i=L(r*r+(n=e-n)*n),s=e+t-i;return[i/o(s)*a(r,n),s]},r}function tt(t){function e(e,r){var n=x-r,i=n?e*t*m(n)/n:n;return[n*m(i)/t,x-n*o(i)]}return e.invert=function(e,r){var n=e*t,i=x-r,o=L(n*n+i*i),s=a(n,i);return[(o?o/m(o):1)*s/t,x-o]},e}J.invert=function(t,e){var r,i,a=Z*e,s=e<0?-b:b,l=25;do{i=a-w*m(s),s-=r=(m(2*s)+2*s-y*m(i))/(2*o(2*s)+2+y*o(i)*w*o(s))}while(n(r)>v&&--l>0);return i=a-w*m(s),[t*(1/o(i)+X/o(s))/Z,i]},Q.invert=function(t,e){return[t/o(e),e]};var et=Y(1,4/y,y);function rt(t,e,r,i,s,l){var c,u=o(l);if(n(t)>1||n(l)>1)c=E(r*s+e*i*u);else{var f=m(t/2),h=m(l/2);c=2*S(L(f*f+e*i*h*h))}return n(c)>v?[c,a(i*m(l),e*s-r*i*u)]:[0,0]}function nt(t,e,r){return E((t*t+e*e-r*r)/(2*t*e))}function it(t){return t-2*y*l((t+y)/(2*y))}function at(t,e,r){for(var n,i=[[t[0],t[1],m(t[1]),o(t[1])],[e[0],e[1],m(e[1]),o(e[1])],[r[0],r[1],m(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=rt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=nt(i[0].v[0],i[2].v[0],i[1].v[0]),c=nt(i[0].v[0],i[1].v[0],i[2].v[0]),u=y-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*m(l))];return function(t,e){var r,n=m(e),a=o(e),s=new Array(3);for(r=0;r<3;++r){var l=i[r];if(s[r]=rt(e-l[1],l[3],l[2],a,n,t-l[0]),!s[r][0])return l.point;s[r][1]=it(s[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=nt(i[r].v[0],s[r][0],s[p][0]);s[r][1]<0&&(d=-d),r?1==r?(d=c-d,h[0]-=s[r][0]*o(d),h[1]-=s[r][0]*m(d)):(d=u-d,h[0]+=s[r][0]*o(d),h[1]+=s[r][0]*m(d)):(h[0]+=s[r][0]*o(d),h[1]-=s[r][0]*m(d))}return h[0]/=3,h[1]/=3,h}}function ot(t){return t[0]*=M,t[1]*=M,t}function st(t,r,n){var i=e.geoCentroid({type:"MultiPoint",coordinates:[t,r,n]}),a=[-i[0],-i[1]],o=e.geoRotation(a),s=at(ot(o(t)),ot(o(r)),ot(o(n)));s.invert=H(s);var l=e.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(t){return arguments.length?c(o(t)):o.invert(c())},l.clipAngle(90)}function lt(t,e){var r=L(1-m(e));return[2/T*t*r,T*(1-r)]}function ct(t){var e=g(t);function r(t,r){return[t,(t?t/m(t):1)*(m(r)*o(t)-e*o(r))]}return r.invert=e?function(t,r){t&&(r*=m(t)/t);var n=o(t);return[t,2*a(L(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,S(t?e*g(t)/t:e)]},r}lt.invert=function(t,e){var r=(r=e/T-1)*r;return[r>0?t*L(y/r)/2:0,S(1-r)]};var ut=L(3);function ft(t,e){return[ut*t*(2*o(2*e/3)-1)/T,ut*T*m(e/3)]}function ht(t){var e=o(t);function r(t,r){return[t*e,m(r)/e]}return r.invert=function(t,r){return[t/e,S(r*e)]},r}function pt(t){var e=o(t);function r(t,r){return[t*e,(1+e)*g(r/2)]}return r.invert=function(t,r){return[t/e,2*i(r/(1+e))]},r}function dt(t,e){var r=L(8/(3*y));return[r*t*(1-n(e)/y),r*e]}function mt(t,e){var r=L(4-3*m(n(e)));return[2/L(6*y)*t*r,d(e)*L(2*y/3)*(2-r)]}function gt(t,e){var r=L(y*(4+y));return[2/r*t*(1+L(1-4*e*e/(y*y))),4/r*e]}function vt(t,e){var r=(2+x)*m(e);e/=2;for(var i=0,a=1/0;i<10&&n(a)>v;i++){var s=o(e);e-=a=(e+m(e)*(s+2)-r)/(2*s*(1+s))}return[2/L(y*(4+y))*t*(1+o(e)),2*L(y/(4+y))*m(e)]}function yt(t,e){return[t*(1+o(e))/L(2+y),2*e/L(2+y)]}function xt(t,e){for(var r=(1+x)*m(e),i=0,a=1/0;i<10&&n(a)>v;i++)e-=a=(e+m(e)-r)/(1+o(e));return r=L(2+y),[t*(1+o(e))/r,2*e/r]}ft.invert=function(t,e){var r=3*S(e/(ut*T));return[T*t/(ut*(2*o(2*r/3)-1)),r]},dt.invert=function(t,e){var r=L(8/(3*y)),i=e/r;return[t/(r*(1-n(i)/y)),i]},mt.invert=function(t,e){var r=2-n(e)/L(2*y/3);return[t*L(6*y)/(2*r),d(e)*S((4-r*r)/3)]},gt.invert=function(t,e){var r=L(y*(4+y))/2;return[t*r/(1+L(1-e*e*(4+y)/(4*y))),e*r/2]},vt.invert=function(t,e){var r=e*L((4+y)/y)/2,n=S(r),i=o(n);return[t/(2/L(y*(4+y))*(1+i)),S((n+r*(i+2))/(2+x))]},yt.invert=function(t,e){var r=L(2+y),n=e*r/2;return[r*t/(1+o(n)),n]},xt.invert=function(t,e){var r=1+x,n=L(r/2);return[2*t*n/(1+o(e*=n)),S((e+m(e))/r)]};var bt=3+2*w;function _t(t,e){var r=m(t/=2),n=o(t),a=L(o(e)),s=o(e/=2),l=m(e)/(s+w*n*a),u=L(2/(1+l*l)),f=L((w*s+(n+r)*a)/(w*s+(n-r)*a));return[bt*(u*(f-1/f)-2*c(f)),bt*(u*l*(f+1/f)-2*i(l))]}_t.invert=function(t,e){if(!(r=D.invert(t/1.2,1.065*e)))return null;var r,a=r[0],s=r[1],l=20;t/=bt,e/=bt;do{var h=a/2,p=s/2,d=m(h),g=o(h),y=m(p),b=o(p),T=o(s),k=L(T),A=y/(b+w*g*k),M=A*A,S=L(2/(1+M)),E=(w*b+(g+d)*k)/(w*b+(g-d)*k),C=L(E),P=C-1/C,I=C+1/C,O=S*P-2*c(C)-t,z=S*A*I-2*i(A)-e,R=y&&_*k*d*M/y,F=(w*g*b+k)/(2*(b+w*g*k)*(b+w*g*k)*k),B=-.5*A*S*S*S,N=B*R,j=B*F,U=(U=2*b+w*k*(g-d))*U*C,V=(w*g*b*k+T)/U,H=-w*d*y/(k*U),q=P*N-2*V/C+S*(V+V/E),G=P*j-2*H/C+S*(H+H/E),Y=A*I*N-2*R/(1+M)+S*I*R+S*A*(V-V/E),W=A*I*j-2*F/(1+M)+S*I*F+S*A*(H-H/E),Z=G*Y-W*q;if(!Z)break;var X=(z*G-O*W)/Z,J=(O*Y-z*q)/Z;a-=X,s=u(-x,f(x,s-J))}while((n(X)>v||n(J)>v)&&--l>0);return n(n(s)-x)s){var d=L(h),g=a(f,u),b=i*p(g/i),_=g-b,w=t*o(_),T=(t*m(_)-_*m(w))/(x-w),k=Lt(_,T),A=(y-t)/Ct(k,w,y);u=d;var M,S=50;do{u-=M=(t+Ct(k,w,u)*A-d)/(k(u)*A)}while(n(M)>v&&--S>0);f=_*m(u),us){var u=L(c),f=a(l,r),h=i*p(f/i),d=f-h;r=u*o(d),l=u*m(d);for(var g=r-x,v=m(r),b=l/v,_=rv||n(p)>v)&&--x>0);return[d,g]},u}Tt.invert=function(t,e){var r=e/(1+wt);return[t&&t/(wt*L(1-r*r)),2*i(r)]},kt.invert=function(t,e){var r=i(e/T),n=o(r),a=2*r;return[t*T/2/(o(a)*n*n),a]};var It=Pt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);var Ot=Pt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);var zt=Pt(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Dt(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}Dt.invert=function(t,e){var r,i=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(n(r)>v&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(n(r)>v&&--o>0);return[i,a]};var Rt=Pt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ft(t){var e=t(x,0)[0]-t(-x,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*y,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function Bt(t,e){var r=d(t),i=d(e),s=o(e),l=o(t)*s,c=m(t)*s,u=m(i*e);t=n(a(c,u)),e=S(l),n(t-x)>v&&(t%=x);var f=function(t,e){if(e===x)return[0,0];var r,i,a=m(e),s=a*a,l=s*s,c=1+l,u=1+3*l,f=1-l,h=S(1/L(c)),p=f+s*c*h,d=(1-a)/p,g=L(d),b=d*c,_=L(b),w=g*f;if(0===t)return[0,-(w+s*_)];var T,k=o(e),A=1/k,M=2*a*k,E=(-p*k-(-3*s+h*u)*M*(1-a))/(p*p),C=-A*M,P=-A*(s*c*E+d*u*M),I=-2*A*(f*(.5*E/g)-2*s*g*M),O=4*t/y;if(t>.222*y||e.175*y){if(r=(w+s*L(b*(1+l)-w*w))/(1+l),t>y/4)return[r,r];var z=r,D=.5*r;r=.5*(D+z),i=50;do{var R=L(b-r*r),F=r*(I+C*R)+P*S(r/_)-O;if(!F)break;F<0?D=r:z=r,r=.5*(D+z)}while(n(z-D)>v&&--i>0)}else{r=v,i=25;do{var B=r*r,N=L(b-B),j=I+C*N,U=r*j+P*S(r/_)-O,V=j+(P-C*B)/N;r-=T=N?U/V:0}while(n(T)>v&&--i>0)}return[r,-w-s*L(b-r*r)]}(t>y/4?x-t:t,e);return t>y/4&&(u=f[0],f[0]=-f[1],f[1]=-u),f[0]*=r,f[1]*=-i,f}function Nt(t,e){var r,a,l,c,u,f;if(e=1-v)return r=(1-e)/4,l=1/(a=P(t)),[(c=((f=s(2*(f=t)))-1)/(f+1))+r*((u=a*C(t))-t)/(a*a),l-r*c*l*(u-t),l+r*c*l*(u+t),2*i(s(t))-x+r*(u-t)/a];var h=[1,0,0,0,0,0,0,0,0],p=[L(e),0,0,0,0,0,0,0,0],d=0;for(a=L(1-e),u=1;n(p[d]/h[d])>v&&d<8;)r=h[d++],p[d]=(r-a)/2,h[d]=(r+a)/2,a=L(r*a),u*=2;l=u*h[d]*t;do{l=(S(c=p[d]*m(a=l)/h[d])+l)/2}while(--d);return[m(l),c=o(l),c/o(l-a),l]}function jt(t,e){if(!e)return t;if(1===e)return c(g(t/2+b));for(var r=1,a=L(1-e),o=L(e),s=0;n(o)>v;s++){if(t%y){var l=i(a*g(t)/r);l<0&&(l+=y),t+=l+~~(t/y)*y}else t+=t;o=(r+a)/2,a=L(r*a),o=((r=o)-a)/2}return t/(h(2,s)*r)}function Ut(t,e){var r=(w-1)/(w+1),l=L(1-r*r),u=jt(x,l*l),f=c(g(y/4+n(e)/2)),h=s(-1*f)/L(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?x:-x)-a(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*o(-1*t),h*m(-1*t)),v=function(t,e,r){var a=n(t),o=C(n(e));if(a){var s=1/m(a),l=1/(g(a)*g(a)),c=-(l+r*(o*o*s*s)-1+r),u=(-c+L(c*c-4*((r-1)*l)))/2;return[jt(i(1/L(u)),r)*d(t),jt(i(L((u/l-1)/r)),1-r)*d(e)]}return[0,jt(i(o),1-r)*d(e)]}(p[0],p[1],l*l);return[-v[1],(e>=0?1:-1)*(.5*u-v[0])]}function Vt(t){var e=m(t),r=o(t),i=Ht(t);function s(t,a){var s=i(t,a);t=s[0],a=s[1];var l=m(a),c=o(a),u=o(t),f=E(e*l+r*c*u),h=m(f),p=n(h)>v?f/h:1;return[p*r*m(t),(n(t)>x?p:-p)*(e*c-r*l*u)]}return i.invert=Ht(-t),s.invert=function(t,r){var n=L(t*t+r*r),s=-m(n),l=o(n),c=n*l,u=-r*s,f=n*e,h=L(c*c+u*u-f*f),p=a(c*f+u*h,u*f-c*h),d=(n>x?-1:1)*a(t*s,n*o(p)*l+r*m(p)*s);return i.invert(d,p)},s}function Ht(t){var e=m(t),r=o(t);return function(t,n){var i=o(n),s=o(t)*i,l=m(t)*i,c=m(n);return[a(l,s*r-c*e),S(c*r+s*e)]}}Bt.invert=function(t,e){n(t)>1&&(t=2*d(t)-t),n(e)>1&&(e=2*d(e)-e);var r=d(t),i=d(e),s=-r*t,l=-i*e,c=l/s<1,u=function(t,e){var r=0,i=1,a=.5,s=50;for(;;){var l=a*a,c=L(a),u=S(1/L(1+l)),f=1-l+a*(1+l)*u,h=(1-c)/f,p=L(h),d=h*(1+l),m=p*(1-l),g=L(d-t*t),v=e+m+a*g;if(n(i-r)<1e-12||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=S(c),b=o(x),_=1/b,w=2*c*b,T=(-f*b-(-3*a+u*(1+3*l))*w*(1-c))/(f*f);return[y/4*(t*(-2*_*(.5*T/p*(1-l)-2*a*p*w)+-_*w*g)+-_*(a*(1+l)*T+h*(1+3*l)*w)*S(t/L(d))),x]}(c?l:s,c?s:l),f=u[0],h=u[1],p=o(h);return c&&(f=-x-f),[r*(a(m(f)*p,-m(h))+y),i*S(o(f)*p)]},Ut.invert=function(t,e){var r,n,o,l,u,f,h=(w-1)/(w+1),p=L(1-h*h),d=jt(x,p*p),m=(n=-t,o=p*p,(r=.5*d-e)?(l=Nt(r,o),n?(f=(u=Nt(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/f,l[1]*l[2]*u[0]*u[1]/f],[l[1]*u[1]/f,-l[0]*l[2]*u[0]*u[2]/f],[l[2]*u[1]*u[2]/f,-o*l[0]*l[1]*u[0]/f]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=Nt(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),g=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(m[0],m[1]);return[a(g[1],g[0])/-1,2*i(s(-.5*c(h*g[0]*g[0]+h*g[1]*g[1])))-x]};var qt=S(1-1/3)*A,Gt=ht(0);function Yt(t){var e=qt*M,r=lt(y,e)[0]-lt(-y,e)[0],i=Gt(0,e)[1],a=lt(0,e)[1],o=T-a,s=k/t,c=4/k,h=i+o*o*4/k;function p(p,d){var m,g=n(d);if(g>e){var v=f(t-1,u(0,l((p+y)/s)));(m=lt(p+=y*(t-1)/t-v*s,g))[0]=m[0]*k/r-k*(t-1)/(2*t)+v*k/t,m[1]=i+4*(m[1]-a)*o/k,d<0&&(m[1]=-m[1])}else m=Gt(p,d);return m[0]*=c,m[1]/=h,m}return p.invert=function(e,p){e/=c;var d=n(p*=h);if(d>i){var m=f(t-1,u(0,l((e+y)/s)));e=(e+y*(t-1)/t-m*s)*r/k;var g=lt.invert(e,.25*(d-i)*k/o+a);return g[0]-=y*(t-1)/t-m*s,p<0&&(g[1]=-g[1]),g}return Gt.invert(e,p)},p}function Wt(t,e){return[t,1&e?90-v:qt]}function Zt(t,e){return[t,1&e?-90+v:-qt]}function Xt(t){return[t[0]*(1-v),t[1]]}function Jt(t){var e,r=1+t,i=S(m(1/r)),s=2*L(y/(e=y+4*i*r)),l=.5*s*(r+L(t*(2+t))),c=t*t,u=r*r;function f(f,h){var p,d,g=1-m(h);if(g&&g<2){var v,b=x-h,_=25;do{var w=m(b),T=o(b),k=i+a(w,r-T),A=1+u-2*r*T;b-=v=(b-c*i-r*w+A*k-.5*g*e)/(2*r*w*k)}while(n(v)>1e-12&&--_>0);p=s*L(A),d=f*k/y}else p=s*(t+g),d=f*i/y;return[p*m(d),l-p*o(d)]}return f.invert=function(t,n){var o=t*t+(n-=l)*n,f=(1+u-o/(s*s))/(2*r),h=E(f),p=m(h),d=i+a(p,r-f);return[S(t/L(o))*y/d,S(1-2*(h-c*i-r*p+(1+u-2*r*f)*d)/e)]},f}function Kt(t,e){return e>-.7109889596207567?((t=W(t,e))[1]+=.0528035274542,t):Q(t,e)}function Qt(t,e){return n(e)>.7109889596207567?((t=W(t,e))[1]-=e>0?.0528035274542:-.0528035274542,t):Q(t,e)}function $t(t,e,r,n){var i=L(4*y/(2*r+(1+t-e/2)*m(2*r)+(t+e)/2*m(4*r)+e/2*m(6*r))),a=L(n*m(r)*L((1+t*o(2*r)+e*o(4*r))/(1+t+e))),s=r*c(1);function l(r){return L(1+t*o(2*r)+e*o(4*r))}function c(n){var i=n*r;return(2*i+(1+t-e/2)*m(2*i)+(t+e)/2*m(4*i)+e/2*m(6*i))/r}function u(t){return l(t)*m(t)}var f=function(t,e){var n=r*V(c,s*m(e)/r,e/y);isNaN(n)&&(n=r*d(e));var u=i*l(n);return[u*a*t/y*o(n),u/a*m(n)]};return f.invert=function(t,e){var n=V(u,e*a/i);return[t*y/(o(n)*i*a*l(n)),S(r*c(n/r)/s)]},0===r&&(i=L(n/y),(f=function(t,e){return[t*i,m(e)/i]}).invert=function(t,e){return[t/i,S(e*i)]}),f}function te(t,e,r,n,i){void 0===n&&(n=1e-8),void 0===i&&(i=20);var a=t(e),o=t(.5*(e+r)),s=t(r);return function t(e,r,n,i,a,o,s,l,c,u,f){if(f.nanEncountered)return NaN;var h,p,d,m,g,v,y,x,b,_;if(p=e(r+.25*(h=n-r)),d=e(n-.25*h),isNaN(p))f.nanEncountered=!0;else{if(!isNaN(d))return _=((v=(m=h*(i+4*p+a)/12)+(g=h*(a+4*d+o)/12))-s)/15,u>c?(f.maxDepthCount++,v+_):Math.abs(_)t?r=n:e=n,n=e+r>>1}while(n>e);var i=c[n+1]-c[n];return i&&(i=(t-c[n+1])/i),(n+1+i)/s}var p=2*f(1)/y*o/r,g=function(t,e){var r=f(n(m(e))),a=i(r)*t;return r/=p,[a,e>=0?r:-r]};return g.invert=function(t,e){var r;return n(e*=p)<1&&(r=d(e)*S(a(n(e))*o)),[t/i(n(e)),r]},g}function re(t,e){return n(t[0]-e[0])=0;--l)n=(e=t[1][l])[0][0],i=e[0][1],a=e[1][1],o=e[2][0],s=e[2][1],c.push(ne([[o-v,s-v],[o-v,a+v],[n+v,a+v],[n+v,i-v]],30));return{type:"Polygon",coordinates:[r.merge(c)]}}function ae(t,r,n){var i,a;function o(e,n){for(var i=n<0?-1:1,a=r[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(e-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}n?o.invert=n(o):t.invert&&(o.invert=function(e,n){for(var i=a[+(n<0)],s=r[+(n<0)],l=0,c=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):r.map((function(t){return t.map((function(t){return[[t[0][0]*A,t[0][1]*A],[t[1][0]*A,t[1][1]*A],[t[2][0]*A,t[2][1]*A]]}))}))},null!=r&&s.lobes(r),s}Kt.invert=function(t,e){return e>-.7109889596207567?W.invert(t,e-.0528035274542):Q.invert(t,e)},Qt.invert=function(t,e){return n(e)>.7109889596207567?W.invert(t,e+(e>0?.0528035274542:-.0528035274542)):Q.invert(t,e)};var oe=[[[[-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]]]];var se=[[[[-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]]]];var le=[[[[-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]]]];var ce=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];var ue=[[[[-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]]]];var fe=[[[[-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 he(t,e){return[3/k*t*L(y*y/3-e*e),e]}function pe(t){function e(e,r){if(n(n(r)-x)2)return null;var o=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+o+s);return l=h((1+l)/(1-l),1/t),[a(2*e,1-o-s)/t,S((l-1)/(l+1))]},e}he.invert=function(t,e){return[k/3*t/L(y*y/3-e*e),e]};var de=y/w;function me(t,e){return[t*(1+L(o(e)))/2,e/(o(e/2)*o(t/6))]}function ge(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function ve(t,e){return[m(t)/o(e),g(e)*o(t)]}function ye(t){var e=o(t),r=g(b+t/2);function i(i,a){var o=a-t,s=n(o)=0;)h=(f=t[u])[0]+l*(i=h)-c*p,p=f[1]+l*p+c*i;return[h=l*(i=h)-c*p,p=l*p+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var f,h=e,p=t[h],d=p[0],g=p[1],v=0,y=0;--h>=0;)v=d+c*(f=v)-u*y,y=g+c*y+u*f,d=(p=t[h])[0]+c*(f=d)-u*g,g=p[1]+c*g+u*f;var x,b,_=(v=d+c*(f=v)-u*y)*v+(y=g+c*y+u*f)*y;c-=x=((d=c*(f=d)-u*g-r)*v+(g=c*g+u*f-s)*y)/_,u-=b=(g*v-d*y)/_}while(n(x)+n(b)>1e-12&&--l>0);if(l){var w=L(c*c+u*u),T=2*i(.5*w),k=m(T);return[a(c*k,w*o(T)),w?S(u*k/w):0]}},r}me.invert=function(t,e){var r=n(t),i=n(e),a=v,s=x;iv||n(b)>v)&&--a>0);return a&&[r,i]},ve.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?_*L((i-L(i*i-4*r))/r):1/L(n);return[S(t*a),d(e)*E(a)]},xe.invert=function(t,e){return[t,2.5*i(s(.8*e))-.625*y]};var _e=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],we=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Te=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ke=[[.9245,0],[0,0],[.01943,0]],Ae=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Me(t,r){var n=e.geoProjection(be(t)).rotate(r).clipAngle(90),i=e.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(t){return arguments.length?a(i(t)):i.invert(a())},n}var Se=L(6),Ee=L(7);function Le(t,e){var r=S(7*m(e)/(3*Se));return[Se*t*(2*o(2*r/3)-1)/Ee,9*m(r/3)/Ee]}function Ce(t,e){for(var r,i=(1+_)*m(e),a=e,s=0;s<25&&(a-=r=(m(a/2)+m(a)-i)/(.5*o(a/2)+o(a)),!(n(r)1e-12&&--l>0);return[t/(.84719-.13063*(i=s*s)+(o=i*(a=i*i))*o*(.05494*i-.04515-.02326*a+.00331*o)),s]},Oe.invert=function(t,e){for(var r=e/2,i=0,a=1/0;i<10&&n(a)>v;++i){var s=o(e/2);e-=a=(e-g(e/2)-r)/(1-.5/(s*s))}return[2*t/(1+o(e)),e]};var ze=[[[[-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 De(t,e){var r=m(e),i=o(e),a=d(t);if(0===t||n(e)===x)return[0,e];if(0===e)return[t,0];if(n(t)===x)return[t*i,x*r];var s=y/(2*t)-2*t/y,l=2*e/y,c=(1-l*l)/(r-l),u=s*s,f=c*c,h=1+u/f,p=1+f/u,g=(s*r/c-s/2)/h,v=(f*r/u+c/2)/p,b=v*v-(f*r*r/u+c*r-1)/p;return[x*(g+L(g*g+i*i/h)*a),x*(v+L(b<0?0:b)*d(-e*s)*a)]}De.invert=function(t,e){var r=(t/=x)*t,n=r+(e/=x)*e,i=y*y;return[t?(n-1+L((1-n)*(1-n)+4*r))/(2*t)*x:0,V((function(t){return n*(y*m(t)-2*t)*y+4*t*t*(e-m(t))+2*y*t-i*e}),0)]};function Re(t,e){var r=e*e;return[t,e*(1.0148+r*r*(.23185+r*(.02406*r-.14499)))]}function Fe(t,e){if(n(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=Be(n.map(r.project),n.map(e.project));e.transform=r.transform?Ne(r.transform,i):i;for(var a=r.edges,o=0,s=a.length;o1.790857183?e=1.790857183:e<-1.790857183&&(e=-1.790857183);var r,i=e;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(.02406*a-.14499)))-e)/(1.0148+a*a*(5*.23185+a*(.21654*a-1.01493)))}while(n(r)>v);return[t,i]},Fe.invert=function(t,e){if(n(e)v&&--s>0);return l=g(a),[(n(e)n^p>n&&r<(h-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0}))||t.push([e])})),nr=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}};function sr(t){var r=t(x,0)[0]-t(-x,0)[0];function i(e,i){var a=n(e)0?e-y:e+y,i),s=(o[0]-o[1])*_,l=(o[0]+o[1])*_;if(a)return[s,l];var c=r*_,u=s>0^l>0?-1:1;return[u*s-d(l)*c,u*l-d(s)*c]}return t.invert&&(i.invert=function(e,i){var a=(e+i)*_,o=(i-e)*_,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*_,c=a>0^o>0?-1:1,u=-c*e+(o>0?1:-1)*l,f=-c*i+(a>0?1:-1)*l;a=(-u-f)*_,o=(u-f)*_}var h=t.invert(a,o);return s||(h[0]+=a>0?y:-y),h}),e.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function lr(){return sr(Ut).scale(111.48)}function cr(t){var e=m(t);function r(r,n){var a=e?g(r*e/2)/e:r/2;if(!n)return[2*a,-t];var s=2*i(a*m(n)),l=1/g(n);return[m(s)*l,n+(1-o(s))*l-t]}return r.invert=function(r,a){if(n(a+=t)v&&--u>0);var d=r*(f=g(c)),x=g(n(a)0?x:-x)*(h+o*(d-c)/2+o*o*(d-2*h+c)/2)]}function hr(t,e){var r=function(t){function e(e,r){var n=o(r),i=(t-1)/(t-n*o(e));return[i*n*m(e),i*m(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=L(n),o=(t-L(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[a(e*o,i*L(1-o*o)),i?S(r*o/i):0]},e}(t);if(!e)return r;var n=o(e),i=m(e);function s(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},s}ur.forEach((function(t){t[1]*=1.0144})),fr.invert=function(t,e){var r=e/x,i=90*r,a=f(18,n(i/5)),o=u(0,l(a));do{var s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],p=h-s,d=h-2*c+s,m=2*(n(r)-c)/p,g=d/p,v=m*(1-g*m*(1-2*g*m));if(v>=0||1===o){i=(e>=0?5:-5)*(v+a);var y,b=50;do{v=(a=f(18,n(i)/5))-(o=l(a)),s=ur[o][1],c=ur[o+1][1],h=ur[f(19,o+2)][1],i-=(y=(e>=0?x:-x)*(c+v*(h-s)/2+v*v*(h-2*c+s)/2)-e)*A}while(n(y)>1e-12&&--b>0);break}}while(--o>=0);var _=ur[o][0],w=ur[o+1][0],T=ur[f(19,o+2)][0];return[t/(w+v*(T-_)/2+v*v*(T-2*w+_)/2),i*M]};var pr=-179.9999,dr=179.9999,mr=-89.9999;function gr(t){return t.length>0}function vr(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yr(t){var e=t[0],r=t[1],n=!1;return e<=pr?(e=-180,n=!0):e>=dr&&(e=180,n=!0),r<=mr?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[e,r]:t}function xr(t){return t.map(yr)}function br(t,e,r){for(var n=0,i=t.length;n=dr||u<=mr||u>=89.9999){a[o]=yr(l);for(var f=o+1;fpr&&pmr&&d<89.9999)break}if(f===o+1)continue;if(o){var m={index:-1,polygon:e,ring:a.slice(0,o+1)};m.ring[m.ring.length-1]=vr(u),r[r.length-1]=m}else r.pop();if(f>=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=vr(a[0][1]),o=-1,s=a.length}}}}function _r(t){var e,r,n,i,a,o,s=t.length,l={},c={};for(e=0;e0?y-l:l)*A],u=e.geoProjection(t(s)).rotate(c),f=e.geoRotation(c),h=u.center;return delete u.rotate,u.center=function(t){return arguments.length?h(f(t)):f.invert(h())},u.clipAngle(90)}function Mr(t){var r=o(t);function n(t,n){var i=e.geoGnomonicRaw(t,n);return i[0]*=r,i}return n.invert=function(t,n){return e.geoGnomonicRaw.invert(t/r,n)},n}function Sr(t,e){return Ar(Mr,t,e)}function Er(t){if(!(t*=2))return e.geoAzimuthalEquidistantRaw;var r=-t/2,n=-r,i=t*t,s=g(n),l=.5/m(n);function c(e,a){var s=E(o(a)*o(e-r)),l=E(o(a)*o(e-n));return[((s*=s)-(l*=l))/(2*t),(a<0?-1:1)*L(4*i*l-(i-s+l)*(i-s+l))/(2*t)]}return c.invert=function(t,e){var i,c,u=e*e,f=o(L(u+(i=t+r)*i)),h=o(L(u+(i=t+n)*i));return[a(c=f-h,i=(f+h)*s),(e<0?-1:1)*E(L(i*i+c*c)*l)]},c}function Lr(t,e){return Ar(Er,t,e)}function Cr(t,e){if(n(e)v&&--l>0);return[d(t)*(L(a*a+4)+a)*y/4,x*s]};var Rr=4*y+3*L(3),Fr=2*L(2*y*L(3)/Rr),Br=Y(Fr*L(3)/y,Fr,Rr/6);function Nr(t,e){return[t*L(1-3*e*e/(y*y)),e]}function jr(t,e){var r=o(e),n=o(t)*r,i=1-n,s=o(t=a(m(t)*r,-m(e))),l=m(t);return[l*(r=L(1-n*n))-s*i,-s*r-l*i]}function Ur(t,e){var r=O(t,e);return[(r[0]+t/x)/2,(r[1]+e)/2]}Nr.invert=function(t,e){return[t/L(1-3*e*e/(y*y)),e]},jr.invert=function(t,e){var r=(t*t+e*e)/-2,n=L(-r*(2+r)),i=e*r+t*n,o=t*r-e*n,s=L(o*o+i*i);return[a(n*i,s*(1+r)),s?-S(n*o/s):0]},Ur.invert=function(t,e){var r=t,i=e,a=25;do{var s,l=o(i),c=m(i),u=m(2*i),f=c*c,h=l*l,p=m(r),d=o(r/2),g=m(r/2),y=g*g,b=1-h*d*d,_=b?E(l*d)*L(s=1/b):s=0,w=.5*(2*_*l*g+r/x)-t,T=.5*(_*c+i)-e,k=.5*s*(h*y+_*l*d*f)+.5/x,A=s*(p*u/4-_*c*g),M=.125*s*(u*g-_*c*h*p),S=.5*s*(f*d+_*y*l)+.5,C=A*M-S*k,P=(T*A-w*S)/C,I=(w*M-T*k)/C;r-=P,i-=I}while((n(P)>v||n(I)>v)&&--a>0);return[r,i]},t.geoNaturalEarth=e.geoNaturalEarth1,t.geoNaturalEarthRaw=e.geoNaturalEarth1Raw,t.geoAiry=function(){var t=x,r=e.geoProjectionMutator(I),n=r(t);return n.radius=function(e){return arguments.length?r(t=e*M):t*A},n.scale(179.976).clipAngle(147)},t.geoAiryRaw=I,t.geoAitoff=function(){return e.geoProjection(O).scale(152.63)},t.geoAitoffRaw=O,t.geoArmadillo=function(){var t=20*M,r=t>=0?1:-1,n=g(r*t),i=e.geoProjectionMutator(z),s=i(t),l=s.stream;return s.parallel=function(e){return arguments.length?(n=g((r=(t=e*M)>=0?1:-1)*t),i(t)):t*A},s.stream=function(e){var i=s.rotate(),c=l(e),u=(s.rotate([0,0]),l(e)),f=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=-180*r;r*e<180;e+=90*r)u.point(e,90*r);if(t)for(;r*(e-=3*r*f)>=-180;)u.point(e,r*-a(o(e*M/2),n)*A);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},t.geoArmadilloRaw=z,t.geoAugust=function(){return e.geoProjection(D).scale(66.1603)},t.geoAugustRaw=D,t.geoBaker=function(){return e.geoProjection(B).scale(112.314)},t.geoBakerRaw=B,t.geoBerghaus=function(){var t=5,r=e.geoProjectionMutator(N),n=r(t),i=n.stream,s=-o(.01*M),l=m(.01*M);return n.lobes=function(e){return arguments.length?r(t=+e):t},n.stream=function(e){var r=n.rotate(),c=i(e),u=(n.rotate([0,0]),i(e));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var e=0,r=360/t,n=2*y/t,i=90-180/t,c=x;e=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},n.scale(79.4187).parallel(45).clipAngle(179.999)},t.geoHammerRetroazimuthalRaw=Vt,t.geoHealpix=function(){var t=4,n=e.geoProjectionMutator(Yt),i=n(t),a=i.stream;return i.lobes=function(e){return arguments.length?n(t=+e):t},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;e.geoStream((n=180/t,i=[].concat(r.range(-180,180+n/2,n).map(Wt),r.range(180,-180-n/2,-n).map(Zt)),{type:"Polygon",coordinates:[180===n?i.map(Xt):i]}),l)},s},i.scale(239.75)},t.geoHealpixRaw=Yt,t.geoHill=function(){var t=1,r=e.geoProjectionMutator(Jt),n=r(t);return n.ratio=function(e){return arguments.length?r(t=+e):t},n.scale(167.774).center([0,18.67])},t.geoHillRaw=Jt,t.geoHomolosine=function(){return e.geoProjection(Qt).scale(152.63)},t.geoHomolosineRaw=Qt,t.geoHufnagel=function(){var t=1,r=0,n=45*M,i=2,a=e.geoProjectionMutator($t),o=a(t,r,n,i);return o.a=function(e){return arguments.length?a(t=+e,r,n,i):t},o.b=function(e){return arguments.length?a(t,r=+e,n,i):r},o.psiMax=function(e){return arguments.length?a(t,r,n=+e*M,i):n*A},o.ratio=function(e){return arguments.length?a(t,r,n,i=+e):i},o.scale(180.739)},t.geoHufnagelRaw=$t,t.geoHyperelliptical=function(){var t=0,r=2.5,n=1.183136,i=e.geoProjectionMutator(ee),a=i(t,r,n);return a.alpha=function(e){return arguments.length?i(t=+e,r,n):t},a.k=function(e){return arguments.length?i(t,r=+e,n):r},a.gamma=function(e){return arguments.length?i(t,r,n=+e):n},a.scale(152.63)},t.geoHyperellipticalRaw=ee,t.geoInterrupt=ae,t.geoInterruptedBoggs=function(){return ae(J,oe).scale(160.857)},t.geoInterruptedHomolosine=function(){return ae(Qt,se).scale(152.63)},t.geoInterruptedMollweide=function(){return ae(W,le).scale(169.529)},t.geoInterruptedMollweideHemispheres=function(){return ae(W,ce).scale(169.529).rotate([20,0])},t.geoInterruptedSinuMollweide=function(){return ae(Kt,ue,H).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoInterruptedSinusoidal=function(){return ae(Q,fe).scale(152.63).rotate([-20,0])},t.geoKavrayskiy7=function(){return e.geoProjection(he).scale(158.837)},t.geoKavrayskiy7Raw=he,t.geoLagrange=function(){var t=.5,r=e.geoProjectionMutator(pe),n=r(t);return n.spacing=function(e){return arguments.length?r(t=+e):t},n.scale(124.75)},t.geoLagrangeRaw=pe,t.geoLarrivee=function(){return e.geoProjection(me).scale(97.2672)},t.geoLarriveeRaw=me,t.geoLaskowski=function(){return e.geoProjection(ge).scale(139.98)},t.geoLaskowskiRaw=ge,t.geoLittrow=function(){return e.geoProjection(ve).scale(144.049).clipAngle(89.999)},t.geoLittrowRaw=ve,t.geoLoximuthal=function(){return K(ye).parallel(40).scale(158.837)},t.geoLoximuthalRaw=ye,t.geoMiller=function(){return e.geoProjection(xe).scale(108.318)},t.geoMillerRaw=xe,t.geoModifiedStereographic=Me,t.geoModifiedStereographicRaw=be,t.geoModifiedStereographicAlaska=function(){return Me(_e,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},t.geoModifiedStereographicGs48=function(){return Me(we,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},t.geoModifiedStereographicGs50=function(){return Me(Te,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},t.geoModifiedStereographicMiller=function(){return Me(ke,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},t.geoModifiedStereographicLee=function(){return Me(Ae,[165,10]).scale(250).clipAngle(130).center([-165,-10])},t.geoMollweide=function(){return e.geoProjection(W).scale(169.529)},t.geoMollweideRaw=W,t.geoMtFlatPolarParabolic=function(){return e.geoProjection(Le).scale(164.859)},t.geoMtFlatPolarParabolicRaw=Le,t.geoMtFlatPolarQuartic=function(){return e.geoProjection(Ce).scale(188.209)},t.geoMtFlatPolarQuarticRaw=Ce,t.geoMtFlatPolarSinusoidal=function(){return e.geoProjection(Pe).scale(166.518)},t.geoMtFlatPolarSinusoidalRaw=Pe,t.geoNaturalEarth2=function(){return e.geoProjection(Ie).scale(175.295)},t.geoNaturalEarth2Raw=Ie,t.geoNellHammer=function(){return e.geoProjection(Oe).scale(152.63)},t.geoNellHammerRaw=Oe,t.geoInterruptedQuarticAuthalic=function(){return ae(j(1/0),ze).rotate([20,0]).scale(152.63)},t.geoNicolosi=function(){return e.geoProjection(De).scale(127.267)},t.geoNicolosiRaw=De,t.geoPatterson=function(){return e.geoProjection(Re).scale(139.319)},t.geoPattersonRaw=Re,t.geoPolyconic=function(){return e.geoProjection(Fe).scale(103.74)},t.geoPolyconicRaw=Fe,t.geoPolyhedral=Ve,t.geoPolyhedralButterfly=function(t){t=t||function(t){var r=e.geoCentroid({type:"MultiPoint",coordinates:t});return e.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t0?[-r[0],0]:[180-r[0],180])};var r=Ye.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,e){var n=r[t];n&&(n.children||(n.children=[])).push(r[e])})),Ve(r[0],(function(t,e){return r[t<-y/2?e<0?6:4:t<0?e<0?2:0:t2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(o)};break;case"Point":e={type:"Point",coordinates:r(t.coordinates)};break;case"MultiPoint":e={type:t.type,coordinates:n(t.coordinates)};break;case"LineString":e={type:t.type,coordinates:i(t.coordinates)};break;case"MultiLineString":case"Polygon":e={type:t.type,coordinates:a(t.coordinates)};break;case"MultiPolygon":e={type:"MultiPolygon",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:"Feature",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case"Feature":return s(t);case"FeatureCollection":var l={type:"FeatureCollection",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t},t.geoQuincuncial=sr,t.geoRectangularPolyconic=function(){return K(cr).scale(131.215)},t.geoRectangularPolyconicRaw=cr,t.geoRobinson=function(){return e.geoProjection(fr).scale(152.63)},t.geoRobinsonRaw=fr,t.geoSatellite=function(){var t=2,r=0,n=e.geoProjectionMutator(hr),i=n(t,r);return i.distance=function(e){return arguments.length?n(t=+e,r):t},i.tilt=function(e){return arguments.length?n(t,r=e*M):r*A},i.scale(432.147).clipAngle(E(1/t)*A-1e-6)},t.geoSatelliteRaw=hr,t.geoSinuMollweide=function(){return e.geoProjection(Kt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},t.geoSinuMollweideRaw=Kt,t.geoSinusoidal=function(){return e.geoProjection(Q).scale(152.63)},t.geoSinusoidalRaw=Q,t.geoStitch=function(t){if(null==t)return t;switch(t.type){case"Feature":return wr(t);case"FeatureCollection":var e={type:"FeatureCollection",features:t.features.map(wr)};return null!=t.bbox&&(e.bbox=t.bbox),e;default:return Tr(t)}},t.geoTimes=function(){return e.geoProjection(kr).scale(146.153)},t.geoTimesRaw=kr,t.geoTwoPointAzimuthal=Sr,t.geoTwoPointAzimuthalRaw=Mr,t.geoTwoPointAzimuthalUsa=function(){return Sr([-158,21.5],[-77,39]).clipAngle(60).scale(400)},t.geoTwoPointEquidistant=Lr,t.geoTwoPointEquidistantRaw=Er,t.geoTwoPointEquidistantUsa=function(){return Lr([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},t.geoVanDerGrinten=function(){return e.geoProjection(Cr).scale(79.4183)},t.geoVanDerGrintenRaw=Cr,t.geoVanDerGrinten2=function(){return e.geoProjection(Pr).scale(79.4183)},t.geoVanDerGrinten2Raw=Pr,t.geoVanDerGrinten3=function(){return e.geoProjection(Ir).scale(79.4183)},t.geoVanDerGrinten3Raw=Ir,t.geoVanDerGrinten4=function(){return e.geoProjection(Or).scale(127.16)},t.geoVanDerGrinten4Raw=Or,t.geoWagner=Dr,t.geoWagner7=function(){return Dr().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},t.geoWagnerRaw=zr,t.geoWagner4=function(){return e.geoProjection(Br).scale(176.84)},t.geoWagner4Raw=Br,t.geoWagner6=function(){return e.geoProjection(Nr).scale(152.63)},t.geoWagner6Raw=Nr,t.geoWiechel=function(){return e.geoProjection(jr).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},t.geoWiechelRaw=jr,t.geoWinkel3=function(){return e.geoProjection(Ur).scale(158.837)},t.geoWinkel3Raw=Ur,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":107,"d3-geo":114}],114:[function(t,e,r){!function(n,i){"object"==typeof r&&void 0!==e?i(r,t("d3-array")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(t){a(i,t,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(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}var o=1e-6,s=Math.PI,l=s/2,c=s/4,u=2*s,f=180/s,h=s/180,p=Math.abs,d=Math.atan,m=Math.atan2,g=Math.cos,v=Math.ceil,y=Math.exp,x=Math.log,b=Math.pow,_=Math.sin,w=Math.sign||function(t){return t>0?1:t<0?-1:0},T=Math.sqrt,k=Math.tan;function A(t){return t>1?0:t<-1?s:Math.acos(t)}function M(t){return t>1?l:t<-1?-l:Math.asin(t)}function S(t){return(t=_(t/2))*t}function E(){}function L(t,e){t&&P.hasOwnProperty(t.type)&&P[t.type](t,e)}var C={Feature:function(t,e){L(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=g(e=(e*=h)/2+c),o=_(e),s=N*o,l=B*a+s*g(i),u=s*n*_(i);j.add(m(u,l)),F=t,B=a,N=o}function W(t){return[m(t[1],t[0]),M(t[2])]}function Z(t){var e=t[0],r=t[1],n=g(r);return[n*g(e),n*_(e),_(r)]}function X(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function J(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function K(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function $(t){var e=T(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tt,et,rt,nt,it,at,ot,st,lt,ct,ut,ft,ht,pt,dt,mt,gt,vt,yt,xt,bt,_t,wt,Tt,kt,At,Mt=r(),St={point:Et,lineStart:Ct,lineEnd:Pt,polygonStart:function(){St.point=It,St.lineStart=Ot,St.lineEnd=zt,Mt.reset(),V.polygonStart()},polygonEnd:function(){V.polygonEnd(),St.point=Et,St.lineStart=Ct,St.lineEnd=Pt,j<0?(tt=-(rt=180),et=-(nt=90)):Mt>o?nt=90:Mt<-o&&(et=-90),ct[0]=tt,ct[1]=rt},sphere:function(){tt=-(rt=180),et=-(nt=90)}};function Et(t,e){lt.push(ct=[tt=t,rt=t]),ent&&(nt=e)}function Lt(t,e){var r=Z([t*h,e*h]);if(st){var n=J(st,r),i=J([n[1],-n[0],0],n);$(i),i=W(i);var a,o=t-it,s=o>0?1:-1,l=i[0]*f*s,c=p(o)>180;c^(s*itnt&&(nt=a):c^(s*it<(l=(l+360)%360-180)&&lnt&&(nt=e)),c?tDt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t):rt>=tt?(trt&&(rt=t)):t>it?Dt(tt,t)>Dt(tt,rt)&&(rt=t):Dt(t,rt)>Dt(tt,rt)&&(tt=t)}else lt.push(ct=[tt=t,rt=t]);ent&&(nt=e),st=r,it=t}function Ct(){St.point=Lt}function Pt(){ct[0]=tt,ct[1]=rt,St.point=Et,st=null}function It(t,e){if(st){var r=t-it;Mt.add(p(r)>180?r+(r>0?360:-360):r)}else at=t,ot=e;V.point(t,e),Lt(t,e)}function Ot(){V.lineStart()}function zt(){It(at,ot),V.lineEnd(),p(Mt)>o&&(tt=-(rt=180)),ct[0]=tt,ct[1]=rt,st=null}function Dt(t,e){return(e-=t)<0?e+360:e}function Rt(t,e){return t[0]-e[0]}function Ft(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:es?t+Math.round(-t/u)*u:t,e]}function Qt(t,e,r){return(t%=u)?e||r?Jt(te(t),ee(e,r)):te(t):e||r?ee(e,r):Kt}function $t(t){return function(e,r){return[(e+=t)>s?e-u:e<-s?e+u:e,r]}}function te(t){var e=$t(t);return e.invert=$t(-t),e}function ee(t,e){var r=g(t),n=_(t),i=g(e),a=_(e);function o(t,e){var o=g(e),s=g(t)*o,l=_(t)*o,c=_(e),u=c*r+s*n;return[m(l*i-u*a,s*r-c*n),M(u*i+l*a)]}return o.invert=function(t,e){var o=g(e),s=g(t)*o,l=_(t)*o,c=_(e),u=c*i-l*a;return[m(l*i+c*a,s*r+u*n),M(u*r-s*n)]},o}function re(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e}return t=Qt(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=f,e[1]*=f,e},e}function ne(t,e,r,n,i,a){if(r){var o=g(e),s=_(e),l=n*r;null==i?(i=e+n*u,a=e-l/2):(i=ie(o,i),a=ie(o,a),(n>0?ia)&&(i+=n*u));for(var c,f=i;n>0?f>a:f1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function oe(t,e){return p(t[0]-e[0])=0;--a)i.point((f=u[a])[0],f[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function ce(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,z=O*I,D=z>s,R=T*C;if(ue.add(m(R*O*_(z),k*P+R*g(z))),f+=D?I+O*u:I,D^b>=r^E>=r){var F=J(Z(x),Z(S));$(F);var B=J(a,F);$(B);var N=(D^I>=0?-1:1)*M(B[2]);(n>N||n===N&&(F[0]||F[1]))&&(h+=D^I>=0?1:-1)}}return(f<-o||f0){for(h||(a.polygonStart(),h=!0),a.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(de))}return p}}function de(t){return t.length>1}function me(t,e){return((t=t.x)[0]<0?t[1]-l-o:l-t[1])-((e=e.x)[0]<0?e[1]-l-o:l-e[1])}var ge=pe((function(){return!0}),(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,c){var u=a>0?s:-s,f=p(a-r);p(f-s)0?l:-l),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),t.point(a,n),e=0):i!==u&&f>=s&&(p(r-i)o?d((_(e)*(a=g(n))*_(r)-_(n)*(i=g(e))*_(t))/(i*a*s)):(e+n)/2}(r,n,a,c),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(u,n),e=0),t.point(r=a,n=c),i=u},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*l,n.point(-s,i),n.point(0,i),n.point(s,i),n.point(s,0),n.point(s,-i),n.point(0,-i),n.point(-s,-i),n.point(-s,0),n.point(-s,i);else if(p(t[0]-e[0])>o){var a=t[0]0,i=p(e)>o;function a(t,r){return g(t)*g(r)>e}function l(t,r,n){var i=[1,0,0],a=J(Z(t),Z(r)),l=X(a,a),c=a[0],u=l-c*c;if(!u)return!n&&t;var f=e*l/u,h=-e*c/u,d=J(i,a),m=Q(i,f);K(m,Q(a,h));var g=d,v=X(m,g),y=X(g,g),x=v*v-y*(X(m,m)-1);if(!(x<0)){var b=T(x),_=Q(g,(-v-b)/y);if(K(_,m),_=W(_),!n)return _;var w,k=t[0],A=r[0],M=t[1],S=r[1];A0^_[1]<(p(_[0]-k)s^(k<=_[0]&&_[0]<=A)){var C=Q(g,(-v+b)/y);return K(C,m),[_,W(C)]}}}function c(e,r){var i=n?t:s-t,a=0;return e<-i?a|=1:e>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return pe(a,(function(t){var e,r,o,u,f;return{lineStart:function(){u=o=!1,f=1},point:function(h,p){var d,m=[h,p],g=a(h,p),v=n?g?0:c(h,p):g?c(h+(h<0?s:-s),p):0;if(!e&&(u=o=g)&&t.lineStart(),g!==o&&(!(d=l(e,m))||oe(e,d)||oe(m,d))&&(m[2]=1),g!==o)f=0,g?(t.lineStart(),d=l(m,e),t.point(d[0],d[1])):(d=l(e,m),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&n^g){var y;v&r||!(y=l(m,e,!0))||(f=0,n?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&oe(e,m)||t.point(m[0],m[1]),e=m,o=g,r=v},lineEnd:function(){o&&t.lineEnd(),e=null},clean:function(){return f|(u&&o)<<1}}}),(function(e,n,i,a){ne(a,t,r,i,e,n)}),n?[0,-t]:[-s,t-s])}function ye(t,r,n,i){function a(e,a){return t<=e&&e<=n&&r<=a&&a<=i}function s(e,a,o,s){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(a,o))||u(e,a)<0^o>0)do{s.point(0===c||3===c?t:n,c>1?i:r)}while((c=(c+o+4)%4)!==f);else s.point(a[0],a[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-n)0?2:1:p(e[1]-r)0?1:0:i>0?3:2}function c(t,e){return u(t.x,e.x)}function u(t,e){var r=l(t,1),n=l(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(o){var l,u,f,h,p,d,m,g,v,y,x,b=o,_=ae(),w={point:T,lineStart:function(){w.point=k,u&&u.push(f=[]);y=!0,v=!1,m=g=NaN},lineEnd:function(){l&&(k(h,p),d&&v&&_.rejoin(),l.push(_.result()));w.point=T,v&&b.lineEnd()},polygonStart:function(){b=_,l=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var e=0,r=0,n=u.length;ri&&(h-a)*(i-o)>(p-o)*(t-a)&&++e:p<=i&&(h-a)*(i-o)<(p-o)*(t-a)&&--e;return e}(),n=x&&r,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),s(null,null,1,o),o.lineEnd()),a&&le(l,c,r,s,o),o.polygonEnd());b=o,l=u=f=null}};function T(t,e){a(t,e)&&b.point(t,e)}function k(e,o){var s=a(e,o);if(u&&f.push([e,o]),y)h=e,p=o,d=s,y=!1,s&&(b.lineStart(),b.point(e,o));else if(s&&v)b.point(e,o);else{var l=[m=Math.max(-1e9,Math.min(1e9,m)),g=Math.max(-1e9,Math.min(1e9,g))],c=[e=Math.max(-1e9,Math.min(1e9,e)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],c=0,u=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>u)return;o>c&&(c=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>c&&(c=o)}else if(h>0){if(o0&&(t[0]=s+c*f,t[1]=l+c*h),u<1&&(e[0]=s+u*f,e[1]=l+u*h),!0}}}}}(l,c,t,r,n,i)?s&&(b.lineStart(),b.point(e,o),x=!1):(v||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}m=e,g=o,v=s}return w}}var xe,be,_e,we=r(),Te={sphere:E,point:E,lineStart:function(){Te.point=Ae,Te.lineEnd=ke},lineEnd:E,polygonStart:E,polygonEnd:E};function ke(){Te.point=Te.lineEnd=E}function Ae(t,e){xe=t*=h,be=_(e*=h),_e=g(e),Te.point=Me}function Me(t,e){t*=h;var r=_(e*=h),n=g(e),i=p(t-xe),a=g(i),o=n*_(i),s=_e*r-be*n*a,l=be*r+_e*n*a;we.add(m(T(o*o+s*s),l)),xe=t,be=r,_e=n}function Se(t){return we.reset(),z(t,Te),+we}var Ee=[null,null],Le={type:"LineString",coordinates:Ee};function Ce(t,e){return Ee[0]=t,Ee[1]=e,Se(Le)}var Pe={Feature:function(t,e){return Oe(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n0&&(i=Ce(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function Re(t,e){return!!he(t.map(Fe),Be(e))}function Fe(t){return(t=t.map(Be)).pop(),t}function Be(t){return[t[0]*h,t[1]*h]}function Ne(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[t,e]}))}}function je(t,r,n){var i=e.range(t,r-o,n).concat(r);return function(t){return i.map((function(e){return[e,t]}))}}function Ue(){var t,r,n,i,a,s,l,c,u,f,h,d,m=10,g=m,y=90,x=360,b=2.5;function _(){return{type:"MultiLineString",coordinates:w()}}function w(){return e.range(v(i/y)*y,n,y).map(h).concat(e.range(v(c/x)*x,l,x).map(d)).concat(e.range(v(r/m)*m,t,m).filter((function(t){return p(t%y)>o})).map(u)).concat(e.range(v(s/g)*g,a,g).filter((function(t){return p(t%x)>o})).map(f))}return _.lines=function(){return w().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(d(l).slice(1),h(n).reverse().slice(1),d(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],c=+t[0][1],l=+t[1][1],i>n&&(t=i,i=n,n=t),c>l&&(t=c,c=l,l=t),_.precision(b)):[[i,c],[n,l]]},_.extentMinor=function(e){return arguments.length?(r=+e[0][0],t=+e[1][0],s=+e[0][1],a=+e[1][1],r>t&&(e=r,r=t,t=e),s>a&&(e=s,s=a,a=e),_.precision(b)):[[r,s],[t,a]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(y=+t[0],x=+t[1],_):[y,x]},_.stepMinor=function(t){return arguments.length?(m=+t[0],g=+t[1],_):[m,g]},_.precision=function(e){return arguments.length?(b=+e,u=Ne(s,a,90),f=je(r,t,b),h=Ne(c,l,90),d=je(i,n,b),_):b},_.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function Ve(t){return t}var He,qe,Ge,Ye,We=r(),Ze=r(),Xe={point:E,lineStart:E,lineEnd:E,polygonStart:function(){Xe.lineStart=Je,Xe.lineEnd=$e},polygonEnd:function(){Xe.lineStart=Xe.lineEnd=Xe.point=E,We.add(p(Ze)),Ze.reset()},result:function(){var t=We/2;return We.reset(),t}};function Je(){Xe.point=Ke}function Ke(t,e){Xe.point=Qe,He=Ge=t,qe=Ye=e}function Qe(t,e){Ze.add(Ye*t-Ge*e),Ge=t,Ye=e}function $e(){Qe(He,qe)}var tr=1/0,er=tr,rr=-tr,nr=rr,ir={point:function(t,e){trr&&(rr=t);enr&&(nr=e)},lineStart:E,lineEnd:E,polygonStart:E,polygonEnd:E,result:function(){var t=[[tr,er],[rr,nr]];return rr=nr=-(er=tr=1/0),t}};var ar,or,sr,lr,cr=0,ur=0,fr=0,hr=0,pr=0,dr=0,mr=0,gr=0,vr=0,yr={point:xr,lineStart:br,lineEnd:Tr,polygonStart:function(){yr.lineStart=kr,yr.lineEnd=Ar},polygonEnd:function(){yr.point=xr,yr.lineStart=br,yr.lineEnd=Tr},result:function(){var t=vr?[mr/vr,gr/vr]:dr?[hr/dr,pr/dr]:fr?[cr/fr,ur/fr]:[NaN,NaN];return cr=ur=fr=hr=pr=dr=mr=gr=vr=0,t}};function xr(t,e){cr+=t,ur+=e,++fr}function br(){yr.point=_r}function _r(t,e){yr.point=wr,xr(sr=t,lr=e)}function wr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,xr(sr=t,lr=e)}function Tr(){yr.point=xr}function kr(){yr.point=Mr}function Ar(){Sr(ar,or)}function Mr(t,e){yr.point=Sr,xr(ar=sr=t,or=lr=e)}function Sr(t,e){var r=t-sr,n=e-lr,i=T(r*r+n*n);hr+=i*(sr+t)/2,pr+=i*(lr+e)/2,dr+=i,mr+=(i=lr*t-sr*e)*(sr+t),gr+=i*(lr+e),vr+=3*i,xr(sr=t,lr=e)}function Er(t){this._context=t}Er.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,u)}},result:E};var Lr,Cr,Pr,Ir,Or,zr=r(),Dr={point:E,lineStart:function(){Dr.point=Rr},lineEnd:function(){Lr&&Fr(Cr,Pr),Dr.point=E},polygonStart:function(){Lr=!0},polygonEnd:function(){Lr=null},result:function(){var t=+zr;return zr.reset(),t}};function Rr(t,e){Dr.point=Fr,Cr=Ir=t,Pr=Or=e}function Fr(t,e){Ir-=t,Or-=e,zr.add(T(Ir*Ir+Or*Or)),Ir=t,Or=e}function Br(){this._string=[]}function Nr(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function jr(t){return function(e){var r=new Ur;for(var n in t)r[n]=t[n];return r.stream=e,r}}function Ur(){}function Vr(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),z(r,t.stream(ir)),e(ir.result()),null!=n&&t.clipExtent(n),t}function Hr(t,e,r){return Vr(t,(function(r){var n=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+e[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(i-a*(r[1][1]+r[0][1]))/2;t.scale(150*a).translate([o,s])}),r)}function qr(t,e,r){return Hr(t,[[0,0],e],r)}function Gr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];t.scale(150*i).translate([a,o])}),r)}function Yr(t,e,r){return Vr(t,(function(r){var n=+e,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;t.scale(150*i).translate([a,o])}),r)}Br.prototype={_radius:4.5,_circle:Nr(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Nr(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Ur.prototype={constructor:Ur,point:function(t,e){this.stream.point(t,e)},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()}};var Wr=g(30*h);function Zr(t,e){return+e?function(t,e){function r(n,i,a,s,l,c,u,f,h,d,g,v,y,x){var b=u-n,_=f-i,w=b*b+_*_;if(w>4*e&&y--){var k=s+d,A=l+g,S=c+v,E=T(k*k+A*A+S*S),L=M(S/=E),C=p(p(S)-1)e||p((b*z+_*D)/w-.5)>.3||s*d+l*g+c*v2?t[2]%360*h:0,I()):[y*f,x*f,b*f]},C.angle=function(t){return arguments.length?(_=t%360*h,I()):_*f},C.reflectX=function(t){return arguments.length?(w=t?-1:1,I()):w<0},C.reflectY=function(t){return arguments.length?(k=t?-1:1,I()):k<0},C.precision=function(t){return arguments.length?(o=Zr(s,L=t*t),O()):T(L)},C.fitExtent=function(t,e){return Hr(C,t,e)},C.fitSize=function(t,e){return qr(C,t,e)},C.fitWidth=function(t,e){return Gr(C,t,e)},C.fitHeight=function(t,e){return Yr(C,t,e)},function(){return e=t.apply(this,arguments),C.invert=e.invert&&P,I()}}function tn(t){var e=0,r=s/3,n=$r(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*h,r=t[1]*h):[e*f,r*f]},i}function en(t,e){var r=_(t),n=(r+_(e))/2;if(p(n)0?e<-l+o&&(e=-l+o):e>l-o&&(e=l-o);var r=i/b(fn(e),n);return[r*_(n*t),i-r*g(n*t)]}return a.invert=function(t,e){var r=i-e,a=w(n)*T(t*t+r*r),o=m(t,p(r))*w(r);return r*n<0&&(o-=s*w(t)*w(r)),[o/n,2*d(b(i/a,1/n))-l]},a}function pn(t,e){return[t,e]}function dn(t,e){var r=g(t),n=t===e?_(t):(r-g(e))/(e-t),i=r/n+t;if(p(n)o&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},Tn.invert=on(M),kn.invert=on((function(t){return 2*d(t)})),An.invert=function(t,e){return[-e,2*d(y(t))-l]},t.geoAlbers=nn,t.geoAlbersUsa=function(){var t,e,r,n,i,a,s=nn(),l=rn().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=rn().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function f(t){var e=t[0],o=t[1];return a=null,r.point(e,o),a||(n.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,f}return f.invert=function(t){var e=s.scale(),r=s.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?l:i>=.166&&i<.234&&n>=-.214&&n<-.115?c:s).invert(t)},f.stream=function(r){return t&&e===r?t:(n=[s.stream(e=r),l.stream(r),c.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++rDt(n[0],n[1])&&(n[1]=i[1]),Dt(i[0],n[1])>Dt(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,e=0,n=a[r=a.length-1];e<=r;n=i,++e)i=a[e],(s=Dt(n[1],i[0]))>o&&(o=s,tt=i[0],rt=n[1])}return lt=ct=null,tt===1/0||et===1/0?[[NaN,NaN],[NaN,NaN]]:[[tt,et],[rt,nt]]},t.geoCentroid=function(t){ut=ft=ht=pt=dt=mt=gt=vt=yt=xt=bt=0,z(t,Bt);var e=yt,r=xt,n=bt,i=e*e+r*r+n*n;return i<1e-12&&(e=mt,r=gt,n=vt,ft2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=An,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":107}],115:[function(t,e,r){!function(t,n){"object"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e){return t.parent===e.parent?1:2}function r(t,e){return t+e.x}function n(t,e){return Math.max(t,e.y)}function i(t){var e=0,r=t.children,n=r&&r.length;if(n)for(;--n>=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function m(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),g=u*u*m,(p=Math.max(h/g,g/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var Z=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=M;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(L(t)).eachAfter(C(n,.5)).eachBefore(P(1)):i.eachBefore(L(E)).eachAfter(C(M,1)).eachAfter(C(n,i.r/Math.min(e,r))).eachBefore(P(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n="function"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&O(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error("cycle");return a}return r.id=function(e){return arguments.length?(t=A(e),r):t},r.parentId=function(t){return arguments.length?(e=A(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new H(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new H(n[i],i)),r.parent=e;return(o.parent=new H(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),m=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*m}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=M,o=M,s=M,l=M,c=M;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(I),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[m]l-a){var y=(i*v+o*g)/n;t(e,p,g,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*g)/n;t(e,p,g,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=O,t.treemapResquarify=Z,t.treemapSlice=q,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?q:O)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],116:[function(t,e,r){!function(n,i){"object"==typeof r&&void 0!==e?i(r,t("d3-color")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){"use strict";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=i180||r<-180?r-360*Math.round(r/360):r):a(isNaN(t)?e:t)}function l(t){return 1==(t=+t)?c:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):a(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):a(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function i(t,r){var i=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function f(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:y(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:y(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:y(t,r)},{i:s-2,x:y(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,m=l*l+c*c,g=p*p+d*d,v=Math.sqrt(m),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((m+h-g)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(r+b*f)),this._+="A"+a+","+a+",0,0,"+ +(f*p>u*d)+","+(this._x1=t+_*l)+","+(this._y1=r+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+f+","+h),a&&(d<0&&(d=d%r+r),d>n?this._+="A"+a+","+a+",0,1,"+p+","+(t-c)+","+(i-u)+"A"+a+","+a+",0,1,"+p+","+(this._x1=f)+","+(this._y1=h):d>1e-6&&(this._+="A"+a+","+a+",0,"+ +(d>=e)+","+p+","+(this._x1=t+a*Math.cos(s))+","+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],118:[function(t,e,r){!function(t,n){"object"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,p=t._root,d={data:n},m=t._x0,g=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o,i=p,!(p=p[f=u<<1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(m+v)/2))?m=a:v=a,(u=r>=(o=(g+y)/2))?g=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i}function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(d+g)/2))?d=s:g=s,(u=o>=(l=(m+v)/2))?m=l:v=l,e=p,!(p=p[f=u<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function m(t){return t.innerRadius}function g(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,m=e+p,g=r+h,v=n+p,y=(d+g)/2,x=(m+v)/2,b=g-d,_=v-m,w=b*b+_*_,T=i-a,k=d*v-g*m,A=(_<0?-1:1)*c(o(0,T*T*w-k*k)),M=(k*_-b*A)/w,S=(-k*b-_*A)/w,E=(k*_+b*A)/w,L=(-k*b+_*A)/w,C=M-y,P=S-x,I=E-y,O=L-x;return C*C+P*P>I*I+O*O&&(M=E,S=L),{cx:M,cy:S,x01:-h,y01:-p,x11:M*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function A(t){return t[1]}function M(){var t=k,n=A,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}g&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+""||null}function f(){return M().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:"function"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o="function"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function L(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var C=I(T);function P(t){this._curve=t}function I(t){function e(e){return new P(t(e))}return e._curve=t,e}function O(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function z(){return O(M().curve(C))}function D(){var t=S().curve(C),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return O(r())},delete t.lineX0,t.lineEndAngle=function(){return O(n())},delete t.lineX1,t.lineInnerRadius=function(){return O(i())},delete t.lineY0,t.lineOuterRadius=function(){return O(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(I(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=A,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a="function"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function H(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var q={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,Z={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},X=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*X,K=-Math.cos(h/10)*X,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[q,G,Z,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.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:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,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)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function mt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function gt(t,e){this._context=t,this._k=(1-e)/6}gt.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:mt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:mt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new gt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:mt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;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:mt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new gt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function At(t,e){this._context=t,this._alpha=e}At.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Mt=function t(e){function r(t){return e?new At(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.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||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lt(t){this._context=t}function Ct(t){return t<0?-1:1}function Pt(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ct(a)+Ct(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function It(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Ot(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function zt(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function Ht(t){var e=t.map(qt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function qt(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=m,o=g,w=r(0),T=null,k=v,A=y,M=x,S=null;function E(){var r,m,g=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=A.apply(this,arguments)-f,E=n(x-y),L=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!L),g>1e-12&&(S.moveTo(g*a(x),g*l(x)),S.arc(0,0,g,x,y,L));else{var C,P,I=y,O=x,z=y,D=x,R=E,F=E,B=M.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(g*g+v*v)),j=s(n(v-g)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var H=d(N/g*l(B)),q=d(N/v*l(B));(R-=2*H)>1e-12?(z+=H*=L?1:-1,D-=H):(R=0,z=D=(y+x)/2),(F-=2*q)>1e-12?(I+=q*=L?1:-1,O-=q):(F=0,I=O=(y+x)/2)}var G=v*a(I),Y=v*l(I),W=g*a(D),Z=g*l(D);if(j>1e-12){var X,J=v*a(O),K=v*l(O),Q=g*a(z),$=g*l(z);if(E1e-12?V>1e-12?(C=_(Q,$,G,Y,v,V,L),P=_(J,K,W,Z,v,V,L),S.moveTo(C.cx+C.x01,C.cy+C.y01),V1e-12&&R>1e-12?U>1e-12?(C=_(W,Z,J,K,g,-U,L),P=_(G,Y,Q,$,g,-U,L),S.lineTo(C.cx+C.x01,C.cy+C.y01),U0&&(d+=f);for(null!=e?m.sort((function(t,r){return e(g[t],g[r])})):null!=n&&m.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,g[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return g}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=z,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:gt,s:vt,S:H,u:q,U:G,V:Y,w:W,W:Z,x:null,X:null,y:X,Y:J,Z:K,"%":mt},Ct={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:gt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,"%":mt},Pt={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=At.exec(e.slice(r));return n?(t.m=Mt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return zt(t,a,e,r)},d:A,e:A,f:P,H:S,I:S,j:M,L:C,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:O,s:z,S:L,u:g,U:v,V:y,w:m,W:x,x:function(t,e,r){return zt(t,o,e,r)},X:function(t,e,r){return zt(t,l,e,r)},y:_,Y:b,Z:w,"%":I};function It(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),l="Z"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function zt(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Pt[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Lt.x=It(o,Lt),Lt.X=It(l,Lt),Lt.c=It(a,Lt),Ct.x=It(o,Ct),Ct.X=It(l,Ct),Ct.c=It(a,Ct),{format:function(t){var e=It(t+="",Lt);return e.toString=function(){return t},e},parse:function(t){var e=Ot(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=It(t+="",Ct);return e.toString=function(){return t},e},utcParse:function(t){var e=Ot(t+="",!0);return e.toString=function(){return t},e}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function P(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function I(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+"000"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function H(t,e){return f(t.getSeconds(),e,2)}function q(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function Z(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function X(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+f(e/60|0,"0",2)+f(e%60,"0",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+"000"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return"+0000"}function mt(){return"%"}function gt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({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"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");var bt=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-time":121}],121:[function(t,e,r){!function(t,n){"object"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var m=d(0),g=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=m.range,T=g.range,k=v.range,A=y.range,M=x.range,S=b.range,E=_.range,L=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),C=L.range,P=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));P.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var I=P.range,O=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),z=O.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),H=N(3),q=N(4),G=N(5),Y=N(6),W=j.range,Z=U.range,X=V.range,J=H.range,K=q.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=g,t.timeMondays=T,t.timeMonth=L,t.timeMonths=C,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=m,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=M,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=A,t.timeWeek=m,t.timeWeeks=w,t.timeYear=P,t.timeYears=I,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=O,t.utcMinutes=z,t.utcMonday=U,t.utcMondays=Z,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=q,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=X,t.utcWednesday=H,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],122:[function(t,e,r){arguments[4][121][0].apply(r,arguments)},{dup:121}],123:[function(t,e,r){!function(t,n){"object"==typeof r&&void 0!==e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function m(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function g(){s=(o=c.now())+l,n=i=0;try{m()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(g,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(g)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=m,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],124:[function(t,e,r){e.exports=function(){for(var t=0;ts*l){var p=(h-f)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=A(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(M(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(M(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,f,h){if(t){!h&&f&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,f);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(m.i/r),M(t),t=m.next,g=m.next;else if((t=m)===g){h?1===h?o(t=c(a(t),e,r),e,r,n,i,f,2):2===h&&u(t,e,r,n,i,f):o(a(t),e,r,n,i,f,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(g(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(y(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,m=t.nextZ;p&&p.z>=f&&m&&m.z<=h;){if(p!==t.prev&&p!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,m!==t.prev&&m!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;m&&m.z<=h;){if(m!==t.prev&&m!==t.next&&g(i.x,i.y,a.x,a.y,o.x,o.y,m.x,m.y)&&y(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),M(n),M(n.next),n=t=o),n=n.next}while(n!==t);return a(n)}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=k(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&g(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.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!==t);return n}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function A(t,e,r,n){var i=new S(t,e,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 M(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],130:[function(t,e,r){var n=t("strongly-connected-components");e.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,m):w,e?(p.value=w,d(g,m,p)):g[m]=w,++m;v=m}if(void 0===v)for(v=o(t.length),e&&(g=new e(v)),r=0;r0?1:-1}},{}],141:[function(t,e,r){"use strict";var n=t("../math/sign"),i=Math.abs,a=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},{"../math/sign":138}],142:[function(t,e,r){"use strict";var n=t("./to-integer"),i=Math.max;e.exports=function(t){return i(0,n(t))}},{"./to-integer":141}],143:[function(t,e,r){"use strict";var n=t("./valid-callable"),i=t("./valid-value"),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,c){var u,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),u=s(r),h&&u.sort("function"==typeof h?a.call(h,r):void 0),"function"!=typeof t&&(t=u[t]),o.call(t,u,(function(t,n){return l.call(r,t)?o.call(c,f,r[t],t,r,n):e}))}}},{"./valid-callable":160,"./valid-value":162}],144:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?Object.assign:t("./shim")},{"./is-implemented":145,"./shim":146}],145:[function(t,e,r){"use strict";e.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},{}],146:[function(t,e,r){"use strict";var n=t("../keys"),i=t("../valid-value"),a=Math.max;e.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o-1}},{}],166:[function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call("");e.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},{}],167:[function(t,e,r){"use strict";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do{t=i().toString(36).slice(2)}while(n[t]);return t}},{}],168:[function(t,e,r){"use strict";var n,i=t("es5-ext/object/set-prototype-of"),a=t("es5-ext/string/#/contains"),o=t("d"),s=t("es6-symbol"),l=t("./"),c=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?a.call(e,"key+value")?"key+value":a.call(e,"key")?"key":"value":"value",c(this,"__kind__",o("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),c(n.prototype,s.toStringTag,o("c","Array Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es5-ext/string/#/contains":163,"es6-symbol":175}],169:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),i=t("es5-ext/object/valid-callable"),a=t("es5-ext/string/is-string"),o=t("./get"),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(t,e){var r,u,f,h,p,d,m,g,v=arguments[2];if(s(t)||n(t)?r="array":a(t)?r="string":t=o(t),i(e),f=function(){h=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&g<=56319&&(m+=t[++p]),l.call(e,v,m,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{"./get":170,"es5-ext/function/is-arguments":135,"es5-ext/object/valid-callable":160,"es5-ext/string/is-string":166}],170:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),i=t("es5-ext/string/is-string"),a=t("./array"),o=t("./string"),s=t("./valid-iterable"),l=t("es6-symbol").iterator;e.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},{"./array":168,"./string":173,"./valid-iterable":174,"es5-ext/function/is-arguments":135,"es5-ext/string/is-string":166,"es6-symbol":175}],171:[function(t,e,r){"use strict";var n,i=t("es5-ext/array/#/clear"),a=t("es5-ext/object/assign"),o=t("es5-ext/object/valid-callable"),s=t("es5-ext/object/valid-value"),l=t("d"),c=t("d/auto-bind"),u=t("es6-symbol"),f=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):f(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(n.prototype,u.iterator,l((function(){return this})))},{d:106,"d/auto-bind":105,"es5-ext/array/#/clear":131,"es5-ext/object/assign":144,"es5-ext/object/valid-callable":160,"es5-ext/object/valid-value":162,"es6-symbol":175}],172:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),i=t("es5-ext/object/is-value"),a=t("es5-ext/string/is-string"),o=t("es6-symbol").iterator,s=Array.isArray;e.exports=function(t){return!!i(t)&&(!!s(t)||(!!a(t)||(!!n(t)||"function"==typeof t[o])))}},{"es5-ext/function/is-arguments":135,"es5-ext/object/is-value":151,"es5-ext/string/is-string":166,"es6-symbol":175}],173:[function(t,e,r){"use strict";var n,i=t("es5-ext/object/set-prototype-of"),a=t("d"),o=t("es6-symbol"),s=t("./"),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",a("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a("c","String Iterator"))},{"./":171,d:106,"es5-ext/object/set-prototype-of":157,"es6-symbol":175}],174:[function(t,e,r){"use strict";var n=t("./is-iterable");e.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},{"./is-iterable":172}],175:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?t("ext/global-this").Symbol:t("./polyfill")},{"./is-implemented":176,"./polyfill":181,"ext/global-this":188}],176:[function(t,e,r){"use strict";var n=t("ext/global-this"),i={object:!0,symbol:!0};e.exports=function(){var t,e=n.Symbol;if("function"!=typeof e)return!1;t=e("test symbol");try{String(t)}catch(t){return!1}return!!i[typeof e.iterator]&&(!!i[typeof e.toPrimitive]&&!!i[typeof e.toStringTag])}},{"ext/global-this":188}],177:[function(t,e,r){"use strict";e.exports=function(t){return!!t&&("symbol"==typeof t||!!t.constructor&&("Symbol"===t.constructor.name&&"Symbol"===t[t.constructor.toStringTag]))}},{}],178:[function(t,e,r){"use strict";var n=t("d"),i=Object.create,a=Object.defineProperty,o=Object.prototype,s=i(null);e.exports=function(t){for(var e,r,i=0;s[t+(i||"")];)++i;return s[t+=i||""]=!0,a(o,e="@@"+t,n.gs(null,(function(t){r||(r=!0,a(this,e,n(t)),r=!1)}))),e}},{d:106}],179:[function(t,e,r){"use strict";var n=t("d"),i=t("ext/global-this").Symbol;e.exports=function(t){return Object.defineProperties(t,{hasInstance:n("",i&&i.hasInstance||t("hasInstance")),isConcatSpreadable:n("",i&&i.isConcatSpreadable||t("isConcatSpreadable")),iterator:n("",i&&i.iterator||t("iterator")),match:n("",i&&i.match||t("match")),replace:n("",i&&i.replace||t("replace")),search:n("",i&&i.search||t("search")),species:n("",i&&i.species||t("species")),split:n("",i&&i.split||t("split")),toPrimitive:n("",i&&i.toPrimitive||t("toPrimitive")),toStringTag:n("",i&&i.toStringTag||t("toStringTag")),unscopables:n("",i&&i.unscopables||t("unscopables"))})}},{d:106,"ext/global-this":188}],180:[function(t,e,r){"use strict";var n=t("d"),i=t("../../../validate-symbol"),a=Object.create(null);e.exports=function(t){return Object.defineProperties(t,{for:n((function(e){return a[e]?a[e]:a[e]=t(String(e))})),keyFor:n((function(t){var e;for(e in i(t),a)if(a[e]===t)return e}))})}},{"../../../validate-symbol":182,d:106}],181:[function(t,e,r){"use strict";var n,i,a,o=t("d"),s=t("./validate-symbol"),l=t("ext/global-this").Symbol,c=t("./lib/private/generate-name"),u=t("./lib/private/setup/standard-symbols"),f=t("./lib/private/setup/symbol-registry"),h=Object.create,p=Object.defineProperties,d=Object.defineProperty;if("function"==typeof l)try{String(l()),a=!0}catch(t){}else l=null;i=function(t){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(t)},e.exports=n=function t(e){var r;if(this instanceof t)throw new TypeError("Symbol is not a constructor");return a?l(e):(r=h(i.prototype),e=void 0===e?"":String(e),p(r,{__description__:o("",e),__name__:o("",c(e))}))},u(n),f(n),p(i.prototype,{constructor:o(n),toString:o("",(function(){return this.__name__}))}),p(n.prototype,{toString:o((function(){return"Symbol ("+s(this).__description__+")"})),valueOf:o((function(){return s(this)}))}),d(n.prototype,n.toPrimitive,o("",(function(){var t=s(this);return"symbol"==typeof t?t:t.toString()}))),d(n.prototype,n.toStringTag,o("c","Symbol")),d(i.prototype,n.toStringTag,o("c",n.prototype[n.toStringTag])),d(i.prototype,n.toPrimitive,o("c",n.prototype[n.toPrimitive]))},{"./lib/private/generate-name":178,"./lib/private/setup/standard-symbols":179,"./lib/private/setup/symbol-registry":180,"./validate-symbol":182,d:106,"ext/global-this":188}],182:[function(t,e,r){"use strict";var n=t("./is-symbol");e.exports=function(t){if(!n(t))throw new TypeError(t+" is not a symbol");return t}},{"./is-symbol":177}],183:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?WeakMap:t("./polyfill")},{"./is-implemented":184,"./polyfill":186}],184:[function(t,e,r){"use strict";e.exports=function(){var t,e;if("function"!=typeof WeakMap)return!1;try{t=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch(t){return!1}return"[object WeakMap]"===String(t)&&("function"==typeof t.set&&(t.set({},1)===t&&("function"==typeof t.delete&&("function"==typeof t.has&&"one"===t.get(e)))))}},{}],185:[function(t,e,r){"use strict";e.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},{}],186:[function(t,e,r){"use strict";var n,i=t("es5-ext/object/is-value"),a=t("es5-ext/object/set-prototype-of"),o=t("es5-ext/object/valid-object"),s=t("es5-ext/object/valid-value"),l=t("es5-ext/string/random-uniq"),c=t("d"),u=t("es6-iterator/get"),f=t("es6-iterator/for-of"),h=t("es6-symbol").toStringTag,p=t("./is-native-implemented"),d=Array.isArray,m=Object.defineProperty,g=Object.prototype.hasOwnProperty,v=Object.getPrototypeOf;e.exports=n=function(){var t,e=arguments[0];if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");return t=p&&a&&WeakMap!==n?a(new WeakMap,v(this)):this,i(e)&&(d(e)||(e=u(e))),m(t,"__weakMapData__",c("c","$weakMap$"+l())),e?(f(e,(function(e){s(e),t.set(e[0],e[1])})),t):t},p&&(a&&a(n,WeakMap),n.prototype=Object.create(WeakMap.prototype,{constructor:c(n)})),Object.defineProperties(n.prototype,{delete:c((function(t){return!!g.call(o(t),this.__weakMapData__)&&(delete t[this.__weakMapData__],!0)})),get:c((function(t){if(g.call(o(t),this.__weakMapData__))return t[this.__weakMapData__]})),has:c((function(t){return g.call(o(t),this.__weakMapData__)})),set:c((function(t,e){return m(o(t),this.__weakMapData__,c("c",e)),this})),toString:c((function(){return"[object WeakMap]"}))}),m(n.prototype,h,c("c","WeakMap"))},{"./is-native-implemented":185,d:106,"es5-ext/object/is-value":151,"es5-ext/object/set-prototype-of":157,"es5-ext/object/valid-object":161,"es5-ext/object/valid-value":162,"es5-ext/string/random-uniq":167,"es6-iterator/for-of":169,"es6-iterator/get":170,"es6-symbol":175}],187:[function(t,e,r){var n=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},{}],188:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?globalThis:t("./implementation")},{"./implementation":187,"./is-implemented":189}],189:[function(t,e,r){"use strict";e.exports=function(){return"object"==typeof globalThis&&(!!globalThis&&globalThis.Array===Array)}},{}],190:[function(t,e,r){"use strict";var n=t("is-string-blank");e.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0===(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},{"is-string-blank":237}],191:[function(t,e,r){var n=t("dtype");e.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,a,o,s,l=t[0].length,c=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(c+r));var u=e.length-r;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+t.length+") does not match destination length "+u);for(i=0,o=r;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{"css-font/stringify":102}],193:[function(t,e,r){"use strict";function n(t,e){e||(e={}),("string"==typeof t||Array.isArray(t))&&(e.family=t);var r=Array.isArray(e.family)?e.family.join(", "):e.family;if(!r)throw Error("`family` must be defined");var s=e.size||e.fontSize||e.em||48,l=e.weight||e.fontWeight||"",c=(t=[e.style||e.fontStyle||"",l,s].join(" ")+"px "+r,e.origin||"top");if(n.cache[r]&&s<=n.cache[r].em)return i(n.cache[r],c);var u=e.canvas||n.canvas,f=u.getContext("2d"),h={upper:void 0!==e.upper?e.upper:"H",lower:void 0!==e.lower?e.lower:"x",descent:void 0!==e.descent?e.descent:"p",ascent:void 0!==e.ascent?e.ascent:"h",tittle:void 0!==e.tittle?e.tittle:"i",overshoot:void 0!==e.overshoot?e.overshoot:"O"},p=Math.ceil(1.5*s);u.height=p,u.width=.5*p,f.font=t;var d={top:0};f.clearRect(0,0,p,p),f.textBaseline="top",f.fillStyle="black",f.fillText("H",0,0);var m=a(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline="bottom",f.fillText("H",0,p);var g=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-g+m,f.clearRect(0,0,p,p),f.textBaseline="alphabetic",f.fillText("H",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+m;d.baseline=d.alphabetic=v,f.clearRect(0,0,p,p),f.textBaseline="middle",f.fillText("H",0,.5*p);var y=a(f.getImageData(0,0,p,p));d.median=d.middle=p-y-1+m-.5*p,f.clearRect(0,0,p,p),f.textBaseline="hanging",f.fillText("H",0,.5*p);var x=a(f.getImageData(0,0,p,p));d.hanging=p-x-1+m-.5*p,f.clearRect(0,0,p,p),f.textBaseline="ideographic",f.fillText("H",0,p);var b=a(f.getImageData(0,0,p,p));if(d.ideographic=p-b-1+m,h.upper&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.upper,0,0),d.upper=a(f.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),h.lower&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.lower,0,0),d.lower=a(f.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),h.tittle&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.tittle,0,0),d.tittle=a(f.getImageData(0,0,p,p))),h.ascent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.ascent,0,0),d.ascent=a(f.getImageData(0,0,p,p))),h.descent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.descent,0,0),d.descent=o(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.overshoot,0,0);var _=o(f.getImageData(0,0,p,p));d.overshoot=_-v}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement("canvas"),n.cache={}},{}],194:[function(t,e,r){e.exports=function(t,e){if("string"!=typeof t)throw new TypeError("must specify type string");if(e=e||{},"undefined"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(r.width=e.width);"number"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf("webgl")&&a.push("experimental-"+t);for(var o=0;o halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},T.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(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)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(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]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(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=T.baseFontSize+"px sans-serif");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(T.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=T.fonts[i],e.font[r]))){var c=t.family.join(", "),u=[t.style];t.style!=t.variant&&u.push(t.variant),t.variant!=t.weight&&u.push(t.weight),_&&t.weight!=t.stretch&&u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(c,{origin:"top",fontSize:T.baseFontSize,fontStyle:u.join(" ")})},T.fonts[i]=e.font[r]}})),(a||o)&&this.font.forEach((function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),A=0,M=0;A1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,i+="number"==typeof t?t-n.baseline:-n[t],i*=-1}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var q;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text="",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement("canvas"),T.atlasContext=T.atlasCanvas.getContext("2d",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{"bit-twiddle":81,"color-normalize":89,"css-font":99,"detect-kerning":125,"es6-weak-map":183,"flatten-vertex-data":191,"font-atlas":192,"font-measure":193,"gl-util/context":226,"is-plain-obj":236,"object-assign":247,"parse-rect":249,"parse-unit":251,"pick-by-alias":253,regl:284,"to-px":315,"typedarray-pool":328}],226:[function(t,e,r){(function(r){(function(){"use strict";var n=t("pick-by-alias");function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function o(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}e.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},a(t)?t={container:t}:t="string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(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=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":253}],227:[function(t,e,r){e.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*m}},{}],231:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],232:[function(t,e,r){e.exports=!0},{}],233:[function(t,e,r){"use strict";e.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],234:[function(t,e,r){"use strict";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var n=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function a(t){t||(t={});var e=t.ua;if(e||"undefined"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),"string"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf("Macintosh")&&-1!==e.indexOf("Safari")&&(r=!0),r}},{}],235:[function(t,e,r){"use strict";e.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},{}],236:[function(t,e,r){"use strict";var n=Object.prototype.toString;e.exports=function(t){var e;return"[object Object]"===n.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],237:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},{}],238:[function(t,e,r){"use strict";e.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},{}],239:[function(t,e,r){!function(t,n){"object"==typeof r&&void 0!==e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){"use strict";var t,e,r;function n(n,i){if(t)if(e){var a="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function m(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function g(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function y(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?v(t,x):t}var b={};function _(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),""})),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}var M=null;function S(t){if(null==M){var e=t.navigator?t.navigator.userAgent:null;M=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return M}function E(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var L,C,P,I,O=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:O,frame:function(t){var e=z(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return L||(L=self.document.createElement("a")),L.href=t,L.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia("(prefers-reduced-motion: reduce)")),C.matches)}},F={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"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},B={supported:!1,testSupport:function(t){if(N||!I)return;j?U(t):P=t}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((I=self.document.createElement("img")).onload=function(){P&&U(P),P=null,j=!0},I.onerror=function(){N=!0,P=null},I.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var V="01";var H=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function q(t){return 0===t.indexOf("mapbox:")}H.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",V,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},H.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},H.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},H.prototype.normalizeStyleURL=function(t,e){if(!q(t))return t;var r=Z(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeGlyphsURL=function(t,e){if(!q(t))return t;var r=Z(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSourceURL=function(t,e){if(!q(t))return t;var r=Z(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},H.prototype.normalizeSpriteURL=function(t,e,r,n){var i=Z(t);return q(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+e+r,X(i))},H.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!q(t))return t;var r=Z(t),n=R.devicePixelRatio>=2||512===e?"@2x":"",i=B.supported?".webp":"$1";r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+n+i),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_("Unable to write to LocalStorage")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=Z(F.EVENTS_URL);a.params.push("access_token="+(n||F.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:X(a),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=bt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return q(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open("mapbox-tiles"))}function lt(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=A(e.headers.get("Cache-Control")||"");if(!i["no-store"])i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(ct(t.url),r)})).catch((function(t){return _(t.message)}))}))}}function ct(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}function ut(t,e){if(st(),!Q)return e(null);var r=ct(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),r=A(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var ft,ht=1/0;function pt(){return null==ft&&(ft=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),ft}var dt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(dt);var mt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),gt=k()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function vt(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:gt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf("sku=")>0&&Y(r);"json"===t.type&&i.headers.set("Accept","application/json");var l=function(r,n,a){if(!o){if(r&&"SecurityError"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new mt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then((function(t){o||(n&&s&<(i,n,s),a=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(t){o||e(new Error(t.message))}))};return s?ut(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var yt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(gt())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return vt(t,e);if(k()&&self.worker&&self.worker.actor){return self.worker.actor.send("getResource",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(n,t.headers[n]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new mt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},xt=function(t,e){return yt(u(t,{type:"arrayBuffer"}),e)},bt=function(t,e){return yt(u(t,{method:"POST"}),e)};var _t,wt;_t=[],wt=0;var Tt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),wt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return _t.push(r),r}wt++;var n=!1,i=function(){if(!n)for(n=!0,wt--;_t.length&&wt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Et.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Lt={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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"},"*":{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"},"*":{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:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{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},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{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"],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"}},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":{},within:{}}},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},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},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}},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"}}},Ct=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Pt(t){var e=t.key,r=t.value;return r?[new Ct(e,r,"constants have been deprecated as of v8")]:[]}function It(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Xt=[Ft,Bt,Nt,jt,Ut,Gt,Vt,Wt(Ht),Yt];function Jt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Jt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=Xt;r255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf("("),c=i.indexOf(")");if(-1!==l&&c+1===i.length){var u=i.substr(0,l),f=i.substr(l+1,c-(l+1)).split(","),h=1;switch(u){case"rgba":if(4!==f.length)return null;h=o(f.pop());case"rgb":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case"hsla":if(4!==f.length)return null;h=o(f.pop());case"hsl":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),m=o(f[2]),g=m<=.5?m*(d+1):m+d-m*d,v=2*m-g;return[n(255*s(v,g,p+1/3)),n(255*s(v,g,p)),n(255*s(v,g,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,te=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};te.parse=function(t){if(t){if(t instanceof te)return t;if("string"==typeof t){var e=$t(t);if(e)return new te(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},te.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+i+")"},te.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,n=this.a;return 0===n?[0,0,0,0]:[255*t/n,255*e/n,255*r/n,n]},te.black=new te(0,0,0,1),te.white=new te(1,1,1,1),te.transparent=new te(0,0,0,0),te.red=new te(1,0,0,1);var ee=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};ee.prototype.compare=function(t,e){return this.collator.compare(t,e)},ee.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var re=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},ne=function(t){this.sections=t};ne.fromString=function(t){return new ne([new re(t,null,null,null,null)])},ne.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},ne.factory=function(t){return t instanceof ne?t:ne.fromString(t)},ne.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},ne.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function oe(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(t instanceof ne)return!0;if(t instanceof ie)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if("string"!=typeof s||!(s in fe)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=fe[s],n++}else a=Ht;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}r=Wt(a,o)}else r=fe[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var pe=function(t){this.type=Gt,this.sections=t};pe.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=e.parse(o["font-scale"],1,Bt)))return null;var l=null;if(o["text-font"]&&!(l=e.parse(o["text-font"],1,Wt(Nt))))return null;var c=null;if(o["text-color"]&&!(c=e.parse(o["text-color"],1,Ut)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,Ht);if(!f)return null;var h=f.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new pe(n)},pe.prototype.evaluate=function(t){return new ne(this.sections.map((function(e){var r=e.content.evaluate(t);return se(r)===Yt?new re("",r,null,null,null):new re(le(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},pe.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},de.prototype.eachChild=function(t){t(this.input)},de.prototype.outputDefined=function(){return!1},de.prototype.serialize=function(){return["image",this.input.serialize()]};var me={"to-boolean":jt,"to-color":Ut,"to-number":Bt,"to-string":Nt},ge=function(t,e){this.type=t,this.args=e};ge.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=me[r],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":ae(e[0],e[1],e[2],e[3])))return new te(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ue(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2])&&(!(t[1]<=e[1])&&!(t[3]>=e[3])))}function Te(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*8192),Math.round(i*a*8192)]}function ke(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Ae(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&f<0||u<0&&f>0}function Ee(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}_e(e,t)}function ze(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ne(t,e)&&(r=!1)})),r}Re.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(oe(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;ne))throw new ue("Input is not a number.");o=s-1}return 0}Ue.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Ue.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new he(e,[t]):"coerce"===r?new ge(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||"coerce");else a=r(a,o,e.typeAnnotation||"assert")}if(!(a instanceof ce)&&"resolvedImage"!==a.type.kind&&function t(e){if(e instanceof je)return t(e.boundExpression);if(e instanceof xe&&"error"===e.name)return!1;if(e instanceof be)return!1;if(e instanceof Re)return!1;var r=e instanceof ge||e instanceof he,n=!0;if(e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof ce})),!n)return!1;return Fe(e)&&Ne(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(a)){var l=new ye;try{a=new ce(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Ue.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Ue(this.registry,n,e||null,i,this.errors)},Ue.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Dt(n,t))},Ue.prototype.checkSubtype=function(t,e){var r=Jt(t,e);return r&&this.error(r),r};var He=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new He(i,r,n)},He.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[Ve(e,n)].evaluate(t)},He.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ge=Object.freeze({__proto__:null,number:qe,color:function(t,e,r){return new te(qe(t.r,e.r,r),qe(t.g,e.g,r),qe(t.b,e.b,r),qe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return qe(t,e[n],r)}))}}),Ye=6/29,We=3*Ye*Ye,Ze=Math.PI/180,Xe=180/Math.PI;function Je(t){return t>.008856451679035631?Math.pow(t,1/3):t/We+4/29}function Ke(t){return t>Ye?t*t*t:We*(t-4/29)}function Qe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function $e(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function tr(t){var e=$e(t.r),r=$e(t.g),n=$e(t.b),i=Je((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Je((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Je((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function er(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*Ke(e),r=.95047*Ke(r),n=1.08883*Ke(n),new te(Qe(3.2404542*r-1.5371385*e-.4985314*n),Qe(-.969266*r+1.8760108*e+.041556*n),Qe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function rr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var nr={forward:tr,reverse:er,interpolate:function(t,e,r){return{l:qe(t.l,e.l,r),a:qe(t.a,e.a,r),b:qe(t.b,e.b,r),alpha:qe(t.alpha,e.alpha,r)}}},ir={forward:function(t){var e=tr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Xe;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Ze,r=t.c;return er({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:rr(t.h,e.h,r),c:qe(t.c,e.c,r),l:qe(t.l,e.l,r),alpha:qe(t.alpha,e.alpha,r)}}},ar=Object.freeze({__proto__:null,lab:nr,hcl:ir}),or=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,Bt)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Ut:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var m=e.parse(h,d,c);if(!m)return null;c=c||m.type,l.push([f,m])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new or(c,r,n,i,l):e.error("Type "+Zt(c)+" is not interpolatable.")},or.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=Ve(e,n),o=e[a],s=e[a+1],l=or.interpolationFactor(this.interpolation,n,o,s),c=r[a].evaluate(t),u=r[a+1].evaluate(t);return"interpolate"===this.operator?Ge[this.type.kind.toLowerCase()](c,u,l):"interpolate-hcl"===this.operator?ir.reverse(ir.interpolate(ir.forward(c),ir.forward(u),l)):nr.reverse(nr.interpolate(nr.forward(c),nr.forward(u),l))},or.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ue("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ue("Array index must be an integer, but found "+e+" instead.");return r[e]},ur.prototype.eachChild=function(t){t(this.index),t(this.input)},ur.prototype.outputDefined=function(){return!1},ur.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var fr=function(t,e){this.type=jt,this.needle=t,this.haystack=e};fr.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);return r&&n?Kt(r.type,[jt,Nt,Bt,Ft,Ht])?new fr(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(r.type)+" instead"):null},fr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Qt(e,["boolean","string","number","null"]))throw new ue("Expected first argument to be of type boolean, string, number or null, but found "+Zt(se(e))+" instead.");if(!Qt(r,["string","array"]))throw new ue("Expected second argument to be of type array or string, but found "+Zt(se(r))+" instead.");return r.indexOf(e)>=0},fr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var hr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};hr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Ht);if(!r||!n)return null;if(!Kt(r.type,[jt,Nt,Bt,Ft,Ht]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Zt(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new hr(r,n,i):null}return new hr(r,n)},hr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Qt(e,["boolean","string","number","null"]))throw new ue("Expected first argument to be of type boolean, string, number or null, but found "+Zt(se(e))+" instead.");if(!Qt(r,["string","array"]))throw new ue("Expected second argument to be of type array or string, but found "+Zt(se(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},hr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},hr.prototype.outputDefined=function(){return!1},hr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var pr=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};pr.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,se(h)))return null}else r=se(h);if(void 0!==i[String(h)])return c.error("Branch labels must be unique.");i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,Ht);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,n);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new pr(r,n,d,i,a,m):null},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(se(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},pr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},pr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},pr.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Ht),n=e.parse(t[2],2,Bt);if(!r||!n)return null;if(!Kt(r.type,[Wt(Ht),Nt,Ht]))return e.error("Expected first argument to be of type array or string, but found "+Zt(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Bt);return i?new mr(r.type,r,n,i):null}return new mr(r.type,r,n)},mr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Qt(e,["string","array"]))throw new ue("Expected first argument to be of type array or string, but found "+Zt(se(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},mr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},mr.prototype.outputDefined=function(){return!1},mr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var xr=yr("==",(function(t,e,r){return e===r}),vr),br=yr("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!vr(0,e,r,n)})),_r=yr("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Tr=yr("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),kr=yr(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),Ar=function(t,e,r,n,i){this.type=Nt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};Ar.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Bt);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Nt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Nt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,Bt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Bt))?null:new Ar(r,i,a,o,s)},Ar.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Ar.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Mr=function(t){this.type=Bt,this.input=t};Mr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Zt(r.type)+" instead."):new Mr(r):null},Mr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ue("Expected value to be of type string or array, but found "+Zt(se(e))+" instead.")},Mr.prototype.eachChild=function(t){t(this.input)},Mr.prototype.outputDefined=function(){return!1},Mr.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Sr={"==":xr,"!=":br,">":wr,"<":_r,">=":kr,"<=":Tr,array:he,at:ur,boolean:he,case:dr,coalesce:lr,collator:be,format:pe,image:de,in:fr,"index-of":hr,interpolate:or,"interpolate-hcl":or,"interpolate-lab":or,length:Mr,let:cr,literal:ce,match:pr,number:he,"number-format":Ar,object:he,slice:mr,step:He,string:he,"to-boolean":ge,"to-color":ge,"to-number":ge,"to-string":ge,var:je,within:Re};function Er(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=ae(r,n,i,o);if(s)throw new ue(s);return new te(r/255*o,n/255*o,i/255*o,o)}function Lr(t,e){return t in e}function Cr(t,e){var r=e[t];return void 0===r?null:r}function Pr(t){return{type:t}}function Ir(t){return{result:"success",value:t}}function Or(t){return{result:"error",value:t}}function zr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Dr(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Rr(t){return!!t.expression&&t.expression.interpolated}function Fr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Br(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Nr(t){return t}function jr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Ur(t,e,r,n,i){return jr(typeof r===i?n[r]:void 0,t.default,e.default)}function Vr(t,e,r){if("number"!==Fr(r))return jr(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=Ve(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Hr(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==Fr(r))return jr(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var a=Ve(t.stops.map((function(t){return t[0]})),r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],c=Ge[e.type]||Nr;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=ar[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return c(r,n,o)}}:c(s,l,o)}function qr(t,e,r){return"color"===e.type?r=te.parse(r):"formatted"===e.type?r=ne.fromString(r.toString()):"resolvedImage"===e.type?r=ie.fromString(r.toString()):Fr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),jr(r,t.default,e.default)}xe.register(Sr,{error:[{kind:"error"},[Nt],function(t,e){var r=e[0];throw new ue(r.evaluate(t))}],typeof:[Nt,[Ht],function(t,e){return Zt(se(e[0].evaluate(t)))}],"to-rgba":[Wt(Bt,4),[Ut],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ut,[Bt,Bt,Bt],Er],rgba:[Ut,[Bt,Bt,Bt,Bt],Er],has:{type:jt,overloads:[[[Nt],function(t,e){return Lr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Lr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Ht,overloads:[[[Nt],function(t,e){return Cr(e[0].evaluate(t),t.properties())}],[[Nt,Vt],function(t,e){var r=e[0],n=e[1];return Cr(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Ht,[Nt],function(t,e){return Cr(e[0].evaluate(t),t.featureState||{})}],properties:[Vt,[],function(t){return t.properties()}],"geometry-type":[Nt,[],function(t){return t.geometryType()}],id:[Ht,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],"heatmap-density":[Bt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Ht,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Bt,Pr(Bt),function(t,e){for(var r=0,n=0,i=e;n":[jt,[Nt,Ht],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],"filter-id->":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[jt,[Nt,Ht],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],"filter-id-<=":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[jt,[Nt,Ht],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],"filter-id->=":[jt,[Ht],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[jt,[Ht],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[jt,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[jt,[Wt(Nt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[jt,[Wt(Ht)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[jt,[Nt,Wt(Ht)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:jt,overloads:[[[jt,jt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Pr(jt),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in Sr}function Wr(t,e){var r=new Ue(Sr,[],e?function(t){var e={color:Ut,string:Nt,number:Bt,enum:Nt,boolean:jt,formatted:Gt,resolvedImage:Yt};if("array"===t.type)return Wt(e[t.value]||Ht,t.length);return e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Ir(new Gr(n,e)):Or(r.errors)}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Gr.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ue("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Zr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Be(e.expression)};Zr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Zr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Xr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Be(e.expression),this.interpolationType=n};function Jr(t,e){if("error"===(t=Wr(t,e)).result)return t;var r=t.value.expression,n=Fe(r);if(!n&&!zr(e))return Or([new Dt("","data expressions not supported")]);var i=Ne(r,["zoom"]);if(!i&&!Dr(e))return Or([new Dt("","zoom expressions not supported")]);var a=function t(e){var r=null;if(e instanceof cr)r=t(e.result);else if(e instanceof lr)for(var n=0,i=e.args;nn.maximum?[new Ct(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function en(t){var e,r,n,i=t.valueSpec,a=Ot(t.value.type),o={},s="categorical"!==a&&void 0===t.value.property,l=!s,c="array"===Fr(t.value.stops)&&"array"===Fr(t.value.stops[0])&&"object"===Fr(t.value.stops[0][0]),u=Qr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===a)return[new Ct(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;e=e.concat($r({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===Fr(r)&&0===r.length&&e.push(new Ct(t.key,r,"array must have at least one stop"));return e},default:function(t){return kn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===a&&s&&u.push(new Ct(t.key,t.value,'missing required property "property"')),"identity"===a||t.value.stops||u.push(new Ct(t.key,t.value,'missing required property "stops"')),"exponential"===a&&t.valueSpec.expression&&!Rr(t.valueSpec)&&u.push(new Ct(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!zr(t.valueSpec)?u.push(new Ct(t.key,t.value,"property functions not supported")):s&&!Dr(t.valueSpec)&&u.push(new Ct(t.key,t.value,"zoom functions not supported"))),"categorical"!==a&&!c||void 0!==t.value.property||u.push(new Ct(t.key,t.value,'"property" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if("array"!==Fr(a))return[new Ct(s,a,"array expected, "+Fr(a)+" found")];if(2!==a.length)return[new Ct(s,a,"array length 2 expected, length "+a.length+" found")];if(c){if("object"!==Fr(a[0]))return[new Ct(s,a,"object expected, "+Fr(a[0])+" found")];if(void 0===a[0].zoom)return[new Ct(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new Ct(s,a,"object stop key must have value")];if(n&&n>Ot(a[0].zoom))return[new Ct(s,a[0].zoom,"stop zoom values must appear in ascending order")];Ot(a[0].zoom)!==n&&(n=Ot(a[0].zoom),r=void 0,o={}),e=e.concat(Qr({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:tn,value:h}}))}else e=e.concat(h({key:s+"[0]",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Yr(zt(a[1]))?e.concat([new Ct(s+"[1]",a[1],"expressions are not allowed in function stops.")]):e.concat(kn({key:s+"[1]",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Fr(t.value),l=Ot(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new Ct(t.key,c,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Ct(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var u="number expected, "+s+" found";return zr(i)&&void 0===a&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ct(t.key,c,u)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);ee?1:0}function cn(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?un(t[1],t[2],"=="):"!="===r?pn(un(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?un(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(cn))):"all"===r?["all"].concat(t.slice(1).map(cn)):"none"===r?["all"].concat(t.slice(1).map(cn).map(pn)):"in"===r?fn(t[1],t.slice(2)):"!in"===r?pn(fn(t[1],t.slice(2))):"has"===r?hn(t[1]):"!has"===r?pn(hn(t[1])):"within"!==r||t}function un(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function fn(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(ln)]]:["filter-in-small",t,["literal",e]]}}function hn(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function pn(t){return["!",t]}function dn(t){return an(zt(t.value))?rn(It({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==Fr(r))return[new Ct(n,r,"array expected, "+Fr(r)+" found")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new Ct(n,r,"filter array must have at least 1 element")];switch(o=o.concat(nn({key:n+"[0]",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ot(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ot(r[1])&&o.push(new Ct(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new Ct(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=Fr(r[1]))&&o.push(new Ct(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},Dn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Dn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Dn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Dn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[u];c[u]=Bn[l].shallow.indexOf(u)>=0?f:Hn(f,e)}t instanceof Error&&(c.message=t.message)}if(c.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(c.$name=l),c}throw new Error("can't serialize object of type "+typeof t)}function qn(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Un(t)||Vn(t)||ArrayBuffer.isView(t)||t instanceof Rn)return t;if(Array.isArray(t))return t.map(qn);if("object"==typeof t){var e=t.$name||"Object",r=Bn[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:qn(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var Gn=function(){this.first=!0};Gn.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function Wn(t){for(var e=0,r=t;e=65097&&t<=65103)||(!!Yn["CJK Compatibility Ideographs"](t)||(!!Yn["CJK Compatibility"](t)||(!!Yn["CJK Radicals Supplement"](t)||(!!Yn["CJK Strokes"](t)||(!(!Yn["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||(!!Yn["CJK Unified Ideographs Extension A"](t)||(!!Yn["CJK Unified Ideographs"](t)||(!!Yn["Enclosed CJK Letters and Months"](t)||(!!Yn["Hangul Compatibility Jamo"](t)||(!!Yn["Hangul Jamo Extended-A"](t)||(!!Yn["Hangul Jamo Extended-B"](t)||(!!Yn["Hangul Jamo"](t)||(!!Yn["Hangul Syllables"](t)||(!!Yn.Hiragana(t)||(!!Yn["Ideographic Description Characters"](t)||(!!Yn.Kanbun(t)||(!!Yn["Kangxi Radicals"](t)||(!!Yn["Katakana Phonetic Extensions"](t)||(!(!Yn.Katakana(t)||12540===t)||(!(!Yn["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||(!(!Yn["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||(!!Yn["Unified Canadian Aboriginal Syllabics"](t)||(!!Yn["Unified Canadian Aboriginal Syllabics Extended"](t)||(!!Yn["Vertical Forms"](t)||(!!Yn["Yijing Hexagram Symbols"](t)||(!!Yn["Yi Syllables"](t)||!!Yn["Yi Radicals"](t))))))))))))))))))))))))))))))}function Jn(t){return!(Xn(t)||function(t){return!(!Yn["Latin-1 Supplement"](t)||167!==t&&169!==t&&174!==t&&177!==t&&188!==t&&189!==t&&190!==t&&215!==t&&247!==t)||(!(!Yn["General Punctuation"](t)||8214!==t&&8224!==t&&8225!==t&&8240!==t&&8241!==t&&8251!==t&&8252!==t&&8258!==t&&8263!==t&&8264!==t&&8265!==t&&8273!==t)||(!!Yn["Letterlike Symbols"](t)||(!!Yn["Number Forms"](t)||(!(!Yn["Miscellaneous Technical"](t)||!(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215))||(!(!Yn["Control Pictures"](t)||9251===t)||(!!Yn["Optical Character Recognition"](t)||(!!Yn["Enclosed Alphanumerics"](t)||(!!Yn["Geometric Shapes"](t)||(!(!Yn["Miscellaneous Symbols"](t)||t>=9754&&t<=9759)||(!(!Yn["Miscellaneous Symbols and Arrows"](t)||!(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243))||(!!Yn["CJK Symbols and Punctuation"](t)||(!!Yn.Katakana(t)||(!!Yn["Private Use Area"](t)||(!!Yn["CJK Compatibility Forms"](t)||(!!Yn["Small Form Variants"](t)||(!!Yn["Halfwidth and Fullwidth Forms"](t)||(8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)))))))))))))))))}(t))}function Kn(t){return t>=1424&&t<=2303||Yn["Arabic Presentation Forms-A"](t)||Yn["Arabic Presentation Forms-B"](t)}function Qn(t,e){return!(!e&&Kn(t))&&!(t>=2304&&t<=3583||t>=3840&&t<=4255||Yn.Khmer(t))}function $n(t){for(var e=0,r=t;e-1&&(ai=ni),ii&&ii(t)};function li(){ci.fire(new Mt("pluginStateChange",{pluginStatus:ai,pluginURL:oi}))}var ci=new Et,ui=function(){return ai},fi=function(){if(ai!==ti||!oi)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");ai=ei,li(),oi&&xt({url:oi},(function(t){t?si(t):(ai=ri,li())}))},hi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return ai===ri||null!=hi.applyArabicShaping},isLoading:function(){return ai===ei},setState:function(t){ai=t.pluginStatus,oi=t.pluginURL},isParsed:function(){return null!=hi.applyArabicShaping&&null!=hi.processBidirectionalText&&null!=hi.processStyledBidirectionalText},getPluginURL:function(){return oi}},pi=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Gn,this.transition={})};pi.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var di=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Br(t))return new Kr(t,e);if(Yr(t)){var r=Jr(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=te.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};di.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},di.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var mi=function(t){this.property=t,this.value=new di(t,void 0)};mi.prototype.transitioned=function(t,e){return new vi(this.property,this.value,e,u({},t.transition,this.transition),t.now)},mi.prototype.untransitioned=function(){return new vi(this.property,this.value,null,{},0)};var gi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};gi.prototype.getValue=function(t){return x(this._values[t].value.value)},gi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new mi(this._values[t].property)),this._values[t].value=new di(this._values[t].property,null===e?void 0:x(e))},gi.prototype.getTransition=function(t){return x(this._values[t].transition)},gi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new mi(this._values[t].property)),this._values[t].transition=x(e)||void 0},gi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var yi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};yi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new _i(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Ti),Ai=function(t){this.specification=t};Ai.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new pi(Math.floor(e.zoom-1),e)),t.expression.evaluate(new pi(Math.floor(e.zoom),e)),t.expression.evaluate(new pi(Math.floor(e.zoom+1),e)),e)}},Ai.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ai.prototype.interpolate=function(t){return t};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},Mi.prototype.interpolate=function(){return!1};var Si=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new di(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new mi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Nn("DataDrivenProperty",Ti),Nn("DataConstantProperty",wi),Nn("CrossFadedDataDrivenProperty",ki),Nn("CrossFadedProperty",Ai),Nn("ColorRampProperty",Mi);var Ei=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new xi(r.layout)),r.paint)){for(var n in this._transitionablePaint=new gi(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new _i(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".layout."+t;if(this._validate(In,n,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return g(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".paint."+t;if(this._validate(Pn,n,t,e,r))return!1}if(g(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var i=this._transitionablePaint._values[t],a="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t=this.maxzoom)||"none"===this.visibility)},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},e.prototype.serialize=function(){var t={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&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),y(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&On(this,t.call(Ln,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:Lt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof bi&&zr(e.property.specification)&&(("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent))return!0}return!1},e}(Et),Li={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Ci=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Pi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ii(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,Li[i].BYTES_PER_ELEMENT),o=r=Oi(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}})),size:Oi(r,Math.max(n,e)),alignment:e}}function Oi(t,e){return Math.ceil(t/e)*e}Pi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Pi.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Pi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Pi.prototype.clear=function(){this.length=0},Pi.prototype.resize=function(t){this.reserve(t),this.length=t},Pi.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Pi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Pi);zi.prototype.bytesPerElement=4,Nn("StructArrayLayout2i4",zi);var Di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Pi);Di.prototype.bytesPerElement=8,Nn("StructArrayLayout4i8",Di);var Ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Ri.prototype.bytesPerElement=12,Nn("StructArrayLayout2i4i12",Ri);var Fi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Pi);Fi.prototype.bytesPerElement=8,Nn("StructArrayLayout2i4ub8",Fi);var Bi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(Pi);Bi.prototype.bytesPerElement=18,Nn("StructArrayLayout8ui2ub18",Bi);var Ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Pi);Ni.prototype.bytesPerElement=24,Nn("StructArrayLayout4i4ui4i24",Ni);var ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Pi);ji.prototype.bytesPerElement=12,Nn("StructArrayLayout3f12",ji);var Ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Pi);Ui.prototype.bytesPerElement=4,Nn("StructArrayLayout1ul4",Ui);var Vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(Pi);Vi.prototype.bytesPerElement=20,Nn("StructArrayLayout6i1ul2ui20",Vi);var Hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Pi);Hi.prototype.bytesPerElement=12,Nn("StructArrayLayout2i2i2i12",Hi);var qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Pi);qi.prototype.bytesPerElement=16,Nn("StructArrayLayout2f1f2i16",qi);var Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Pi);Gi.prototype.bytesPerElement=12,Nn("StructArrayLayout2ub2f12",Gi);var Yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Pi);Yi.prototype.bytesPerElement=6,Nn("StructArrayLayout3ui6",Yi);var Wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[y+22]=v,t},e}(Pi);Wi.prototype.bytesPerElement=48,Nn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Wi);var Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g,v,y,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g,v,y,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g,v,y,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=c,this.uint16[L+9]=u,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=m,this.uint16[L+15]=g,this.uint16[L+16]=v,this.uint16[L+17]=y,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Pi);Zi.prototype.bytesPerElement=68,Nn("StructArrayLayout8i15ui1ul4f68",Zi);var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Pi);Xi.prototype.bytesPerElement=4,Nn("StructArrayLayout1f4",Xi);var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Pi);Ji.prototype.bytesPerElement=6,Nn("StructArrayLayout3i6",Ji);var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Pi);Ki.prototype.bytesPerElement=8,Nn("StructArrayLayout1ul2ui8",Ki);var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Pi);Qi.prototype.bytesPerElement=4,Nn("StructArrayLayout2ui4",Qi);var $i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Pi);$i.prototype.bytesPerElement=2,Nn("StructArrayLayout1ui2",$i);var ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Pi);ta.prototype.bytesPerElement=8,Nn("StructArrayLayout2f8",ta);var ea=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Pi);ea.prototype.bytesPerElement=16,Nn("StructArrayLayout4f16",ea);var ra=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={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 r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Ci);ra.prototype.size=20;var na=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new ra(this,t)},e}(Vi);Nn("CollisionBoxArray",na);var ia=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={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 r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Ci);ia.prototype.size=48;var aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new ia(this,t)},e}(Wi);Nn("PlacedSymbolArray",aa);var oa=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={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 r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Ci);oa.prototype.size=68;var sa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new oa(this,t)},e}(Zi);Nn("SymbolInstanceArray",sa);var la=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(Xi);Nn("GlyphOffsetArray",la);var ca=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(Ji);Nn("SymbolLineVertexArray",ca);var ua=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Ci);ua.prototype.size=8;var fa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new ua(this,t)},e}(Ki);Nn("FeatureIndexArray",fa);var ha=Ii([{name:"a_pos",components:2,type:"Int16"}],4).members,pa=function(t){void 0===t&&(t=[]),this.segments=t};function da(t,e){return 256*(t=l(Math.floor(t),0,255))+(e=l(Math.floor(e),0,255))}pa.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>pa.MAX_VERTEX_ARRAY_LENGTH&&_("Max vertices per segment is "+pa.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>pa.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},pa.prototype.get=function(){return this.segments},pa.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),va=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ya=ga,xa=ga,ba=va;ya.murmur3=xa,ya.murmur2=ba;var _a=function(){this.ids=[],this.positions=[],this.indexed=!1};_a.prototype.add=function(t,e,r,n){this.ids.push(Ta(t)),this.positions.push(e,r,n)},_a.prototype.getPositions=function(t){for(var e=Ta(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},_a.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;ka(e,o,s),ka(r,3*o,3*s),ka(r,3*o+1,3*s+1),ka(r,3*o+2,3*s+2)}s-nGa.max||o.yGa.max)&&(_("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=l(o.x,Ga.min,Ga.max),o.y=l(o.y,Ga.min,Ga.max))}return r}function Wa(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Za=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new zi,this.indexArray=new Yi,this.segments=new pa,this.programConfigurations=new Ua(ha,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Xa(t,e){for(var r=0;r1){if($a(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function no(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function io(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function ao(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function oo(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function so(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function lo(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Wa(this.layoutVertexArray,c,u,-1,-1),Wa(this.layoutVertexArray,c,u,1,-1),Wa(this.layoutVertexArray,c,u,1,1),Wa(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Nn("CircleBucket",Za,{omit:["layers"]});var co=new Si({"circle-sort-key":new Ti(Lt.layout_circle["circle-sort-key"])}),uo={paint:new Si({"circle-radius":new Ti(Lt.paint_circle["circle-radius"]),"circle-color":new Ti(Lt.paint_circle["circle-color"]),"circle-blur":new Ti(Lt.paint_circle["circle-blur"]),"circle-opacity":new Ti(Lt.paint_circle["circle-opacity"]),"circle-translate":new wi(Lt.paint_circle["circle-translate"]),"circle-translate-anchor":new wi(Lt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new wi(Lt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new wi(Lt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Ti(Lt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Ti(Lt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Ti(Lt.paint_circle["circle-stroke-opacity"])}),layout:co},fo="undefined"!=typeof Float32Array?Float32Array:Array;function ho(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function po(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*m,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*c+_*p+w*v,t[3]=x*o+b*u+_*d+w*y,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*m,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*c+_*p+w*v,t[7]=x*o+b*u+_*d+w*y,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*m,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*c+_*p+w*v,t[11]=x*o+b*u+_*d+w*y,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*m,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var mo=po;var go,vo,yo=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};go=new fo(3),fo!=Float32Array&&(go[0]=0,go[1]=0,go[2]=0),vo=go;function xo(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}!function(){var t=function(){var t=new fo(4);return fo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();var bo=function(t){var e=t[0],r=t[1];return e*e+r*r},_o=(function(){var t=function(){var t=new fo(2);return fo!=Float32Array&&(t[0]=0,t[1]=0),t}()}(),function(t){function e(e){t.call(this,e,uo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Za(t)},e.prototype.queryRadius=function(t){var e=t;return oo("circle-radius",this,e)+oo("circle-stroke-width",this,e)+so(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=lo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),c=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),u="map"===this.paint.get("circle-pitch-alignment"),f=u?l:function(t,e){return t.map((function(t){return wo(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=t.data,s=e.data,l=0;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return jo(h,p,r,n,i,c),p}function Bo(t,e,r,n,i){var a,o;if(i===ls(t,e,r,n)>0)for(a=e;a=e;a-=n)o=as(a,t[a],t[a+1],o);return o&&$o(o,o.next)&&(os(o),o=o.next),o}function No(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!$o(n,n.next)&&0!==Qo(n.prev,n,n.next))n=n.next;else{if(os(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function jo(t,e,r,n,i,a,o){if(t){!o&&a&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=Zo(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,a);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?Vo(t,n,i,a):Uo(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),os(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?jo(t=Ho(No(t),e,r),e,r,n,i,a,2):2===o&&qo(t,e,r,n,i,a):jo(No(t),e,r,n,i,a,1);break}}}function Uo(t){var e=t.prev,r=t,n=t.next;if(Qo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Qo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Vo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Qo(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=Zo(s,l,e,r,n),h=Zo(c,u,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=f&&d&&d.z<=h;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&Qo(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Ho(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!$o(i,a)&&ts(i,n,n.next,a)&&ns(i,a)&&ns(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),os(n),os(n.next),n=t=a),n=n.next}while(n!==t);return No(n)}function qo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Ko(o,s)){var l=is(o,s);return o=No(o,o.next),l=No(l,l.next),jo(o,e,r,n,i,a),void jo(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Go(t,e){return t.x-e.x}function Yo(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&Jo(ar.x||n.x===r.x&&Wo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=is(e,t);No(e,e.next),No(r,r.next)}}function Wo(t,e){return Qo(t.prev,t,e.prev)<0&&Qo(e.next,t,t.next)<0}function Zo(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Xo(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Ko(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&ts(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(ns(t,e)&&ns(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.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!==t);return n}(t,e)&&(Qo(t.prev,t,e.prev)||Qo(t,e.prev,e))||$o(t,e)&&Qo(t.prev,t,t.next)>0&&Qo(e.prev,e,e.next)>0)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function $o(t,e){return t.x===e.x&&t.y===e.y}function ts(t,e,r,n){var i=rs(Qo(t,e,r)),a=rs(Qo(t,e,n)),o=rs(Qo(r,n,t)),s=rs(Qo(r,n,e));return i!==a&&o!==s||(!(0!==i||!es(t,r,e))||(!(0!==a||!es(t,n,e))||(!(0!==o||!es(r,t,n))||!(0!==s||!es(r,e,n)))))}function es(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function rs(t){return t>0?1:t<0?-1:0}function ns(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function is(t,e){var r=new ss(t.i,t.x,t.y),n=new ss(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function as(t,e,r,n){var i=new ss(t,e,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 os(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function ss(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ls(t,e,r,n){for(var i=0,a=e,o=r-n;an;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1),f=Math.max(n,Math.floor(r-s*c/o+u)),h=Math.min(i,Math.floor(r+(o-s)*c/o+u));t(e,r,f,h,a)}var p=e[r],d=n,m=i;for(us(e,n,r),a(e[i],p)>0&&us(e,n,i);d0;)m--}0===a(e[n],p)?us(e,n,m):(m++,us(e,m,i)),m<=r&&(n=m+1),r<=m&&(i=m-1)}}(t,e,r||0,n||t.length-1,i||fs)}function us(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function fs(t,e){return te?1:0}function hs(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Do.default=Ro;var gs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zi,this.indexArray=new Yi,this.indexArray2=new Qi,this.programConfigurations=new Ua(zo,t.layers,t.zoom),this.segments=new pa,this.segments2=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};gs.prototype.populate=function(t,e,r){this.hasPattern=ds("fill",this.layers,e);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ws.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},ws.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=ws.types[this.type];function u(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function Es(t,e,r){if(3===t){var n=new As(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Ms.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new _s(this._pbf,e,this.extent,this._keys,this._values)};var Ls={VectorTile:function(t,e){this.layers=t.readFields(Es,{},e)},VectorTileFeature:_s,VectorTileLayer:As},Cs=Ls.VectorTileFeature.types,Ps=Math.pow(2,13);function Is(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ps)+o,i*Ps*2,a*Ps*2,Math.round(s))}var Os=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ri,this.indexArray=new Yi,this.programConfigurations=new Ua(bs,t.layers,t.zoom),this.segments=new pa,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function zs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}function Ds(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>8192}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>8192}))}Os.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ds("fill-extrusion",this.layers,e);for(var n=0,i=t;n=1){var y=d[g-1];if(!zs(v,y)){f.vertexLength+4>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);m+b>32768&&(m=0),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,m),Is(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,m),m+=b,Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,m),Is(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,m);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>pa.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===Cs[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var A=u.dist(p);if(A>2*f){var M=u.sub(u.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,m,0,0,h),p=M}}var S=p&&d,E=S?r:s?"butt":n;if(S&&"round"===E&&(_i&&(E="bevel"),"bevel"===E&&(_>2&&(E="flipbevel"),_100)y=g.mult(-1);else{var L=_*m.add(g).mag()/m.sub(g).mag();y._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if("bevel"===E||"fakeround"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,I=k?0:C;if(p&&this.addCurrentVertex(u,m,P,I,h),"fakeround"===E)for(var O=Math.round(180*w/Math.PI/20),z=1;z2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,g,0,0,h),u=j}}}}},qs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,c=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,c,a,!0,-n,i),this.distance>Hs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},qs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,c=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&c)<<2,c>>6);var u=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,u),o.primitiveLength++),i?this.e2=u:this.e1=u},qs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Hs-1):this.distance},qs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Nn("LineBucket",qs,{omit:["layers","patternFeatures"]});var Gs=new Si({"line-cap":new wi(Lt.layout_line["line-cap"]),"line-join":new Ti(Lt.layout_line["line-join"]),"line-miter-limit":new wi(Lt.layout_line["line-miter-limit"]),"line-round-limit":new wi(Lt.layout_line["line-round-limit"]),"line-sort-key":new Ti(Lt.layout_line["line-sort-key"])}),Ys={paint:new Si({"line-opacity":new Ti(Lt.paint_line["line-opacity"]),"line-color":new Ti(Lt.paint_line["line-color"]),"line-translate":new wi(Lt.paint_line["line-translate"]),"line-translate-anchor":new wi(Lt.paint_line["line-translate-anchor"]),"line-width":new Ti(Lt.paint_line["line-width"]),"line-gap-width":new Ti(Lt.paint_line["line-gap-width"]),"line-offset":new Ti(Lt.paint_line["line-offset"]),"line-blur":new Ti(Lt.paint_line["line-blur"]),"line-dasharray":new Ai(Lt.paint_line["line-dasharray"]),"line-pattern":new ki(Lt.paint_line["line-pattern"]),"line-gradient":new Mi(Lt.paint_line["line-gradient"])}),layout:Gs},Ws=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new pi(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Ti))(Ys.paint.properties["line-width"].specification);Ws.useIntegerZoom=!0;var Zs=function(t){function e(e){t.call(this,e,Ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Co(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=Ws.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new qs(t)},e.prototype.queryRadius=function(t){var e=t,r=Xs(oo("line-width",this,e),oo("line-gap-width",this,e)),n=oo("line-offset",this,e);return r/2+Math.abs(n)+so(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=lo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*Xs(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),u=this.paint.get("line-offset").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Js=Ii([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Ks=Ii([{name:"a_projected_pos",components:3,type:"Float32"}],4),Qs=(Ii([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Ii([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),$s=(Ii([{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"}]),Ii([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),tl=Ii([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);Ii([{name:"triangle",components:3,type:"Uint16"}]),Ii([{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"}]),Ii([{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Ii([{type:"Float32",name:"offsetX"}]),Ii([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);function el(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),hi.applyArabicShaping&&(t=hi.applyArabicShaping(t)),t}(t.text,e,r)})),t}var rl={"!":"\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 nl=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},il=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*m},al=ol;function ol(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}ol.Varint=0,ol.Fixed64=1,ol.Bytes=2,ol.Fixed32=5;var sl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function ll(t){return t.type===ol.Bytes?t.readVarint()+t.pos:t.pos+1}function cl(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function ul(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function fl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function wl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}ol.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=bl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=wl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*bl(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=bl(this.buf,this.pos)+4294967296*wl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=nl(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=nl(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(i=a[r.pos++],n=(112&i)>>4,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<3,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<10,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<17,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(127&i)<<24,i<128)return cl(t,n,e);if(i=a[r.pos++],n|=(1&i)<<31,i<128)return cl(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&sl?function(t,e,r){return sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){var n="",i=e;for(;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=t[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==ol.Bytes)return t.push(this.readVarint(e));var r=ll(this);for(t=t||[];this.pos127;);else if(e===ol.Bytes)this.pos=this.readVarint()+this.pos;else if(e===ol.Fixed32)this.pos+=4;else{if(e!==ol.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var r,n;t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0));if(t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;if(e.buf[e.pos++]|=r|((t>>>=3)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;if(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),!t)return;e.buf[e.pos++]=127&t}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&ul(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),il(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),il(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&ul(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,ol.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,fl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,hl,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,ml,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,pl,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,gl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,vl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,yl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,xl,e)},writeBytesField:function(t,e){this.writeTag(t,ol.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,ol.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,ol.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,ol.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,ol.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,ol.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,ol.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Tl(t,e,r){1===t&&r.readMessage(kl,e)}function kl(t,e,r){if(3===t){var n=r.readMessage(Al,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,c=n.top,u=n.advance;e.push({id:i,bitmap:new So({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:c,advance:u}})}}function Al(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function Ml(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&N>A&&(A=N)}else{var j=r[S.fontStack],U=j&&j[L];if(U&&U.rect)I=U.rect,P=U.metrics;else{var V=e[S.fontStack],H=V&&V[L];if(!H)continue;P=H.metrics}C=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=z*S.scale+c):(k.push({glyph:L,imageName:O,x:h,y:p+C,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:I}),h+=P.advance*S.scale+c)}if(0!==k.length){var q=h-c;d=Math.max(q,d),Vl(k,0,k.length-1,g,A)}h=0;var G=a*_+A;T.lineOffset=Math.max(A,w),p+=G,m=Math.max(G,m),++v}else p+=a,++v}var Y;var W=p- -17,Z=Ul(o),X=Z.horizontalAlign,J=Z.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c=(e-r)*i,u=0;u=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&zl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Il.prototype.substring=function(t,e){var r=new Il;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Il.prototype.toString=function(){return this.text},Il.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Il.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(Pl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Dl={};function Rl(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function Fl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=f.dist(h)}return!0}function Jl(t){for(var e=0,r=0;rc){var d=(c-l)/p,m=qe(f.x,h.x,d),g=qe(f.y,h.y,d),v=new ql(m,g,h.angleTo(f),u);return v._round(),!o||Xl(t,v,s,o,e)?v:void 0}l+=p}}function tc(t,e,r,n,i,a,o,s,l){var c=Kl(n,a,o),u=Ql(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new ql(_,w,x,m);T._round(),i&&!Xl(e,T,o,i,a)||d.push(T)}}h+=y}l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c));return d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function ec(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new i(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round():h.y>=a&&(h=new i(f.x+(h.x-f.x)*((a-f.y)/(h.y-f.y)),a)._round()),c&&f.equals(c[c.length-1])||(c=[f],o.push(c)),c.push(h)))))}return o}function rc(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},m=h.reduce(d,0),g=p.reduce(d,0),v=l-m,y=c-g,x=0,b=m,_=0,w=g,T=0,k=v,A=0,M=y;if(o.content&&n){var S=o.content;x=nc(h,0,S[0]),_=nc(p,0,S[1]),b=nc(h,S[0],S[2]),w=nc(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,a,l,c){var h=ac(n.stretch-x,b,u,t.left),p=oc(n.fixed-T,k,n.stretch,m),d=ac(a.stretch-_,w,f,t.top),v=oc(a.fixed-A,M,a.stretch,g),y=ac(l.stretch-x,b,u,t.left),S=oc(l.fixed-T,k,l.stretch,m),E=ac(c.stretch-_,w,f,t.top),L=oc(c.fixed-A,M,c.stretch,g),C=new i(h,d),P=new i(y,d),I=new i(y,E),O=new i(h,E),z=new i(p/s,v/s),D=new i(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),O._matMult(N),I._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=a.stretch+a.fixed,H=c.stretch+c.fixed;return{tl:C,tr:P,bl:O,br:I,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:z,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=ic(h,v,m),C=ic(p,y,g),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=o.top*s-l,g=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,m-=x[1]*s,y+=x[2]*s,g+=x[3]*s),u){var b=new i(v,m),_=new i(y,m),w=new i(v,g),T=new i(y,g),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),m=Math.min(b.y,_.y,w.y,T.y),g=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,m,y,g,r,n,a)}this.boxEndIndex=t.length},lc=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=cc),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function cc(t,e){return te?1:0}function uc(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=o-n,h=s-a,p=Math.min(f,h),d=p/2,m=new lc([],fc);if(0===p)return new i(n,a);for(var g=n;gy.d||!y.d)&&(y=b,r&&console.log("found best %d after %d probes",Math.round(1e4*b.d)/1e4,x)),b.max-y.d<=e||(d=b.h/2,m.push(new hc(b.p.x-d,b.p.y-d,d,t)),m.push(new hc(b.p.x+d,b.p.y-d,d,t)),m.push(new hc(b.p.x-d,b.p.y+d,d,t)),m.push(new hc(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+y.d)),y.p}function fc(t,e){return e.max-t.max}function hc(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,ro(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}lc.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},lc.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},lc.prototype.peek=function(){return this.data[0]},lc.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,a=e[i];if(r(n,a)>=0)break;e[t]=a,t=i}e[t]=n},lc.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var pc=Number.POSITIVE_INFINITY;function dc(t,e){return e[1]!==pc?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(t){case"top-right":case"bottom-right":case"right":n=-e;break;case"top-left":case"bottom-left":case"left":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-e;break;case"top":n=e-7}switch(t){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=e;break;case"right":r=-e}return[r,n]}(t,e[0])}function mc(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function gc(t,e,r,n,a,o,s,l,c,u,f,h,p,d,m){var g=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},m),128*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,g,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,m);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new pi(this.zoom),m=0,g=t;m=0;for(var O=0,z=k.sections;O=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l0},Mc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Mc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Mc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Mc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Mc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Nn("SymbolBucket",Mc,{omit:["layers","collisionBoxArray","features","compareText"]}),Mc.MAX_GLYPHS=65535,Mc.addDynamicAttributes=wc;var Sc=new Si({"symbol-placement":new wi(Lt.layout_symbol["symbol-placement"]),"symbol-spacing":new wi(Lt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wi(Lt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Ti(Lt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wi(Lt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wi(Lt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new wi(Lt.layout_symbol["icon-ignore-placement"]),"icon-optional":new wi(Lt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wi(Lt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Ti(Lt.layout_symbol["icon-size"]),"icon-text-fit":new wi(Lt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wi(Lt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Ti(Lt.layout_symbol["icon-image"]),"icon-rotate":new Ti(Lt.layout_symbol["icon-rotate"]),"icon-padding":new wi(Lt.layout_symbol["icon-padding"]),"icon-keep-upright":new wi(Lt.layout_symbol["icon-keep-upright"]),"icon-offset":new Ti(Lt.layout_symbol["icon-offset"]),"icon-anchor":new Ti(Lt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wi(Lt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wi(Lt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wi(Lt.layout_symbol["text-rotation-alignment"]),"text-field":new Ti(Lt.layout_symbol["text-field"]),"text-font":new Ti(Lt.layout_symbol["text-font"]),"text-size":new Ti(Lt.layout_symbol["text-size"]),"text-max-width":new Ti(Lt.layout_symbol["text-max-width"]),"text-line-height":new wi(Lt.layout_symbol["text-line-height"]),"text-letter-spacing":new Ti(Lt.layout_symbol["text-letter-spacing"]),"text-justify":new Ti(Lt.layout_symbol["text-justify"]),"text-radial-offset":new Ti(Lt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wi(Lt.layout_symbol["text-variable-anchor"]),"text-anchor":new Ti(Lt.layout_symbol["text-anchor"]),"text-max-angle":new wi(Lt.layout_symbol["text-max-angle"]),"text-writing-mode":new wi(Lt.layout_symbol["text-writing-mode"]),"text-rotate":new Ti(Lt.layout_symbol["text-rotate"]),"text-padding":new wi(Lt.layout_symbol["text-padding"]),"text-keep-upright":new wi(Lt.layout_symbol["text-keep-upright"]),"text-transform":new Ti(Lt.layout_symbol["text-transform"]),"text-offset":new Ti(Lt.layout_symbol["text-offset"]),"text-allow-overlap":new wi(Lt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new wi(Lt.layout_symbol["text-ignore-placement"]),"text-optional":new wi(Lt.layout_symbol["text-optional"])}),Ec={paint:new Si({"icon-opacity":new Ti(Lt.paint_symbol["icon-opacity"]),"icon-color":new Ti(Lt.paint_symbol["icon-color"]),"icon-halo-color":new Ti(Lt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Ti(Lt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Ti(Lt.paint_symbol["icon-halo-blur"]),"icon-translate":new wi(Lt.paint_symbol["icon-translate"]),"icon-translate-anchor":new wi(Lt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Ti(Lt.paint_symbol["text-opacity"]),"text-color":new Ti(Lt.paint_symbol["text-color"],{runtimeType:Ut,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new Ti(Lt.paint_symbol["text-halo-color"]),"text-halo-width":new Ti(Lt.paint_symbol["text-halo-width"]),"text-halo-blur":new Ti(Lt.paint_symbol["text-halo-blur"]),"text-translate":new wi(Lt.paint_symbol["text-translate"]),"text-translate-anchor":new wi(Lt.paint_symbol["text-translate-anchor"])}),layout:Sc},Lc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ft,this.defaultValue=t};Lc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},Lc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},Lc.prototype.outputDefined=function(){return!1},Lc.prototype.serialize=function(){return null},Nn("FormatSectionOverride",Lc,{omit:["defaultValue"]});var Cc=function(t){function e(e){t.call(this,e,Ec)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a",targetMapId:n,sourceMapId:a.mapId})}}},qc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},qc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},qc.prototype.processTask=function(t,e){var r=this;if(""===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(qn(e.error)):n(null,qn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"",sourceMapId:r.mapId,error:e?Hn(e):null,data:Hn(n,a)},a)}:function(t){i=!0},s=null,l=qn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},qc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Yc=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};Yc.prototype.setNorthEast=function(t){return this._ne=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.setSouthWest=function(t){return this._sw=t instanceof Wc?new Wc(t.lng,t.lat):Wc.convert(t),this},Yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Wc)e=t,r=t;else{if(!(t instanceof Yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(Yc.convert(a))}var o=t;return this.extend(Wc.convert(o))}return this}if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Wc(e.lng,e.lat),this._ne=new Wc(r.lng,r.lat)),this},Yc.prototype.getCenter=function(){return new Wc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Yc.prototype.getSouthWest=function(){return this._sw},Yc.prototype.getNorthEast=function(){return this._ne},Yc.prototype.getNorthWest=function(){return new Wc(this.getWest(),this.getNorth())},Yc.prototype.getSouthEast=function(){return new Wc(this.getEast(),this.getSouth())},Yc.prototype.getWest=function(){return this._sw.lng},Yc.prototype.getSouth=function(){return this._sw.lat},Yc.prototype.getEast=function(){return this._ne.lng},Yc.prototype.getNorth=function(){return this._ne.lat},Yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Yc.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Yc.prototype.contains=function(t){var e=Wc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},Yc.convert=function(t){return!t||t instanceof Yc?t:new Yc(t)};var Wc=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Wc.prototype.wrap=function(){return new Wc(c(this.lng,-180,180),this.lat)},Wc.prototype.toArray=function(){return[this.lng,this.lat]},Wc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Wc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Wc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Yc(new Wc(this.lng-r,this.lat-e),new Wc(this.lng+r,this.lat+e))},Wc.convert=function(t){if(t instanceof Wc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Wc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Wc(Number("lng"in t?t.lng:t.lon),Number(t.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 Zc=2*Math.PI*6371008.8;function Xc(t){return Zc*Math.cos(t*Math.PI/180)}function Jc(t){return(180+t)/360}function Kc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Qc(t,e){return t/Xc(e)}function $c(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var tu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};tu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Wc.convert(t);return new tu(Jc(r.lng),Kc(r.lat),Qc(e,r.lat))},tu.prototype.toLngLat=function(){return new Wc(360*this.x-180,$c(this.y))},tu.prototype.toAltitude=function(){return t=this.z,e=this.y,t*Xc($c(e));var t,e},tu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Zc*(t=$c(this.y),1/Math.cos(t*Math.PI/180));var t};var eu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=iu(0,t,t,e,r)};eu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},eu.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=Gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=Gc(256*(r+1),256*(n+1),i),a[0]+","+a[1]+","+o[0]+","+o[1]),l=function(t,e,r){for(var n,i="",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new nu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new nu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},nu.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?iu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):iu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},nu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},nu.prototype.children=function(t){if(this.overscaledZ>=t)return[new nu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new nu(e,this.wrap,e,r,n),new nu(e,this.wrap,e,r+1,n),new nu(e,this.wrap,e,r,n+1),new nu(e,this.wrap,e,r+1,n+1)]},nu.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},au.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},au.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},au.prototype.getPixels=function(){return new Eo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},au.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},uu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ls.VectorTile(new al(this.rawTileData)).layers,this.sourceLayerCoder=new ou(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},uu.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=sn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=hu(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=hu(t.cameraQueryGeometry),d=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new pi(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),m=0;mn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send("enforceCacheSizeLimit",at),ht=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete("mapbox-tiles");t&&e.catch(t).then((function(){return t()}))},t.clipLine=ec,t.clone=function(t){var e=new fo(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=x,t.clone$2=function(t){var e=new fo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=tl,t.config=F,t.create=function(){var t=new fo(16);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new fo(9);return fo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new fo(4);return fo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=Wr,t.createLayout=Ii,t.createStyleLayer=function(t){return"custom"===t.type?new Dc(t):new Rc[t.type](t)},t.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=qe,t.offscreenCanvasSupported=pt,t.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t},t.parseGlyphPBF=function(t){return new al(t).readFields(Tl,[])},t.pbf=al,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=8192/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,c=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;u.compositeTextSizes=[c["text-size"].possiblyEvaluate(new pi(h),o),c["text-size"].possiblyEvaluate(new pi(p),o)]}if("composite"===t.iconSizeData.kind){var d=t.iconSizeData,m=d.minZoom,g=d.maxZoom;u.compositeIconSizes=[c["icon-size"].possiblyEvaluate(new pi(m),o),c["icon-size"].possiblyEvaluate(new pi(g),o)]}u.layoutTextSize=c["text-size"].possiblyEvaluate(new pi(t.zoom+1),o),u.layoutIconSize=c["icon-size"].possiblyEvaluate(new pi(t.zoom+1),o),u.textMaxSize=c["text-size"].possiblyEvaluate(new pi(18));for(var v=24*l.get("text-line-height"),y="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),b=l.get("text-size"),w=function(){var a=k[T],s=l.get("text-font").evaluate(a,{},o).join(","),c=b.evaluate(a,{},o),f=u.layoutTextSize.evaluate(a,{},o),h=u.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,m=[0,0];if(d){var g=d.toString(),w=24*l.get("text-letter-spacing").evaluate(a,{},o),A=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g,v,y,x,b,w,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),I=0,O=0,z=0,D=0,R=-1,F=-1,B={},N=ya(""),j=0,U=0;void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(M=s.layout.get("text-offset").evaluate(b,{},k).map((function(t){return 24*t})),j=M[0],U=M[1]):(j=24*s.layout.get("text-radial-offset").evaluate(b,{},k),U=pc);if(t.allowVerticalPlacement&&n.vertical){var V=s.layout.get("text-rotate").evaluate(b,{},k)+90,H=n.vertical;L=new sc(l,e,c,u,f,H,h,p,d,V),o&&(C=new sc(l,e,c,u,f,o,g,v,d,V))}if(i){var q=s.layout.get("icon-rotate").evaluate(b,{}),G="none"!==s.layout.get("icon-text-fit"),Y=rc(i,q,T,G),W=o?rc(o,q,T,G):void 0;E=new sc(l,e,c,u,f,i,g,v,!1,q),I=4*Y.length;var Z=t.iconSizeData,X=null;"source"===Z.kind?(X=[128*s.layout.get("icon-size").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===Z.kind&&((X=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||X[1]>32640)&&_(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,Y,X,x,y,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,W&&(O=4*W.length,t.addSymbols(t.icon,W,X,x,y,b,Cl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=ya(K.text);var Q=s.layout.get("text-rotate").evaluate(b,{},k);S=new sc(l,e,c,u,f,K,h,p,d,Q)}var $=1===K.positionedLines.length;if(z+=gc(t,e,K,a,s,d,b,m,P,n.vertical?Cl.horizontal:Cl.horizontalOnly,$?Object.keys(n.horizontal):[J],B,R,w,k),$)break}n.vertical&&(D+=gc(t,e,n.vertical,a,s,d,b,m,P,Cl.vertical,["vertical"],B,F,w,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ct=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ct(S,lt),lt=ct(L,lt),lt=ct(E,lt);var ut=(lt=ct(C,lt))>-1?1:0;ut&&(lt*=A/24);t.glyphOffsetArray.length>=Mc.MAX_GLYPHS&&_("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907");void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey);t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,c,z,D,I,O,ut,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,A,l,x,T,M,d,e,a,c,u,o)};if("line"===S)for(var P=0,I=ec(e.geometry,0,0,8192,8192);P1){var V=$l(U,k,r.vertical||m,n,24,y);V&&C(U,V)}}else if("Polygon"===e.type)for(var H=0,q=hs(e.geometry,0);H=E.maxzoom))if("none"!==E.visibility)o(S,this.zoom,n),(m[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,g,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id})))}}}var L=t.mapObject(g.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send("getGlyphs",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,I.call(l))})):h={};var C=Object.keys(g.iconDependencies);C.length?a.send("getImages",{icons:C,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){f||(f=t,p=e,I.call(l))})):p={};var P=Object.keys(g.patternDependencies);function I(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in m){var l=m[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(g,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send("getImages",{icons:P,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){f||(f=t,d=e,I.call(l))})):d={},I.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status="done",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if("FeatureCollection"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,m=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};m.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!function t(e,r,n,i,a,o){for(;a>i;){if(a-i>600){var s=a-i+1,l=n-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1),h=Math.max(i,Math.floor(n-l*u/s+f)),p=Math.min(a,Math.floor(n+(s-l)*u/s+f));t(e,r,n,h,p,o)}var d=r[2*n+o],m=i,g=a;for(z(e,r,i,n),r[2*a+o]>d&&z(e,r,i,a);md;)g--}r[2*i+o]===d?z(e,r,i,g):(g++,z(e,r,g,a)),g<=n&&(i=g+1),n<=g&&(a=g-1)}}(t,e,o,n,i,a%2),O(t,e,r,n,o-1,a+1),O(t,e,r,o+1,i,a+1)}}function z(t,e,r,n){D(t,r,n),D(e,2*r,2*n),D(e,2*r+1,2*n+1)}function D(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function R(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var F=function(t){return t[0]},B=function(t){return t[1]},N=function(t,e,r,n,i){void 0===e&&(e=F),void 0===r&&(r=B),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=r&&s<=i&&l>=n&&l<=a&&u.push(t[d]);else{var m=Math.floor((p+h)/2);s=e[2*m],l=e[2*m+1],s>=r&&s<=i&&l>=n&&l<=a&&u.push(t[m]);var g=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(m-1),c.push(g)),(0===f?i>=s:a>=l)&&(c.push(m+1),c.push(h),c.push(g))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},N.prototype.within=function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),f=o.pop();if(u-f<=a)for(var h=f;h<=u;h++)R(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var p=Math.floor((f+u)/2),d=e[2*p],m=e[2*p+1];R(d,m,r,n)<=l&&s.push(t[p]);var g=(c+1)%2;(0===c?r-i<=d:n-i<=m)&&(o.push(f),o.push(p-1),o.push(g)),(0===c?r+i>=d:n+i>=m)&&(o.push(p+1),o.push(u),o.push(g))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var j={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},U=function(t){this.options=Z(Object.create(j),t),this.trees=new Array(this.options.maxZoom+1)};function V(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function H(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function q(t){return{type:"Feature",id:t.id,properties:G(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function G(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Z(Z({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Z(t,e){for(var r in e)t[r]=e[r];return t}function X(t){return t.x}function J(t){return t.y}function K(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function Q(t,e,r,n){var i={id:void 0===t?null:t,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)$(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=e.length-3;e[2]=1,function t(e,r,n,i){for(var a,o=i,s=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var m=Math.abs(p-s);mi&&(a-r>3&&t(e,r,a,i),e[a+2]=o,n-a>3&&t(e,a,n,i))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function nt(t,e,r,n){for(var i=0;i1?1:r}function ot(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var m=[];if("Point"===h||"MultiPoint"===h)st(f,m,r,n,i);else if("LineString"===h)lt(f,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===h)ut(f,m,r,n,i,!1);else if("Polygon"===h)ut(f,m,r,n,i,!0);else if("MultiPolygon"===h)for(var g=0;g=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function lt(t,e,r,n,i,a,o){for(var s,l,c=ct(t),u=0===i?ht:pt,f=t.start,h=0;hr&&(l=u(c,p,d,g,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,g,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,g,v,n),b=!0),!a&&b&&(o&&(c.end=f+s*l),e.push(c),c=ct(t)),o&&(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],m=t[_+2],(y=0===i?p:d)>=r&&y<=n&&ft(c,p,d,m),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&ft(c,c[0],c[1],c[2]),c.length&&e.push(c)}function ct(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function ut(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function xt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n0===e)for(n=0,i=t.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new N(s,X,J,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},U.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(Y(r),W(a),Y(i),W(n));u1?this._map(c,!0):null,g=(l<<5)+(e+1)+this.points.length,v=0,y=f;v>5},U.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},U.prototype._map=function(t,e){if(t.numPoints)return e?Z({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?Z({},n):n},_t.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},_t.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var u=1<1&&console.time("creation"),h=this.tiles[f]=yt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var m,g,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;m=g=v=y=null,x=ot(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=ot(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(m=ot(x,u,n-_,n+T,1,h.minY,h.maxY,l),g=ot(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=ot(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=ot(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*r,2*n),s.push(g||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},_t.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t<0||t>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,c=t,u=e,f=r;!l&&c>0;)c--,u=Math.floor(u/2),f=Math.floor(f/2),l=this.tiles[wt(c,u,f)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,u,f),a>1&&console.time("drilling down"),this.splitTile(l.source,c,u,f,t,e,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?gt(this.tiles[s],i):null):null};var kt=function(e){function r(t,r,n,i){e.call(this,t,r,n,Tt),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));f(o,!0);try{e._geoJSONIndex=n.cluster?new U(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),c=0,u=l;c=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=void 0,d=i/r*(n+1);if(l.isDash){var m=n-Math.abs(d);p=Math.sqrt(h*h+m*m)}else p=n-Math.sqrt(h*h+d*d);this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f),p=l.isDash?h:-h;this.data[o+c]=Math.max(0,Math.min(255,p+128))}},T.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o=n&&e.x=i&&e.y0&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",n))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?"reloadTile":"loadTile";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),I=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var n=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,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 t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(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())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,P.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},N.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(t){return n._source.hasTile(t)})))):i=[];var a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(It(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var g=d.children(this._source.maxzoom)[0],v=this.getTile(g);if(v&&v.hasData()){n[g.key]=g;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=m.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(m=this.getTile(_))&&x&&(m=this._addTile(_)),m&&(n[_.key]=_,x=m.wasRequested(),m.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,m=0,g=c;m=0&&v[1].y+g>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:m})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles){this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,"reloading")}this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function Pt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function It(t){return"raster"===t||"image"===t||"video"===t}function Ot(){return new t.window.Worker(Xi.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var zt="mapboxgl_preloaded_worker_pool",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Kt=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ne(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=n.transform.width/n.transform.height,g=!1,v=0;vMath.abs(n.x-r.x)*i)return{useVertical:!0};return(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function oe(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var m,g=r/24,v=e.lineOffsetX*g,y=e.lineOffsetY*g;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ie(g,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=te(w.first.point,s).point,k=te(w.last.point,s).point;if(i&&!n){var A=ae(e.writingMode,T,k,d);if(A)return A}m=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:se(h,L,S,1,a),I=ae(e.writingMode,S,P,d);if(I)return I}var O=le(g*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!O)return{notEnoughRoom:!0};m=[O]}for(var z=0,D=m;z0?1:-1,m=0;i&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var g=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((g+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[g])){var T=new t.Point(u.getx(g),u.gety(g)),k=te(T,f);if(k.signedDistanceFromCamera>0)v=h[g]=k.point;else{var A=g-d;v=se(0===x?o:new t.Point(u.getx(A),u.gety(A)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var M=(_-x)/b,S=v.sub(y),E=S.mult(M)._add(y);E._add(S._unit()._perp()._mult(n*d));var L=m+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:L,path:w}}Kt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Kt.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Kt.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},Kt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Kt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Kt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Kt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[],u={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,c,u,i),n?c.length>0:c},Kt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Kt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Kt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Kt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var m=this.circleCells[i];if(null!==m)for(var g=this.circles,v=0,y=m;vo*o+s*s},Kt.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var c=(o-i)/2,u=Math.abs(e-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var f=l-s,h=u-c;return f*f+h*h<=r*r};var ce=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var I=1;I0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},he.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(m=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:g,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:m},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}},we.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,m=a.collisionGroup,g=s.get("text-optional"),v=s.get("icon-optional"),y=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),_="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),T="viewport-y"===s.get("symbol-z-order"),k=y&&(x||!o.hasIconData()||v),A=x&&(y||!o.hasTextData()||g);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new ge(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,I=null,O=0,z=0,D=0;a.textFeatureIndex?O=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(O=e.featureIndex),a.verticalTextFeatureIndex&&(z=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(g,t,a,s,c,b,_,f,l,m,v,e,o,n,u);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,m.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get("text-padding"),Z=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,m.predicate,Z,W),T=y||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var X=function(t){var e=w&&E?_e(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,m.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(I=X(a.verticalIconBox)).box.length>0:(I=X(a.iconBox)).box.length>0,S=S&&I.offscreen}var J=g||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=v||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&z?i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,z,m.ID):i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,O,m.ID)),M&&I&&i.collisionIndex.insertCollisionBox(I.box,s.get("icon-ignore-placement"),o.bucketInstanceId,D,m.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get("text-ignore-placement"),o.bucketInstanceId,O,m.ID),n)){var Q=o.bucketInstanceId,$=i.collisionCircleArrays[Q];void 0===$&&($=i.collisionCircleArrays[Q]=new ve);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(c).crossTileID=a>=0&&c!==a?0:n.crossTileID)}},we.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(y){var T=Pe(v.text),k=_?Ie:T;d(e.text,s,k);var A=w?Ie:T;d(e.text,l,A);var M=v.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,"left",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=Pe(v.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:Ie;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=v.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var I=C?Ie:L;d(e.icon,a.numVerticalIconVertices,I),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=v.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var O=e.collisionArrays[n];if(O){var z=new t.Point(0,0);if(O.textBox||O.verticalTextBox){var D=!0;if(c){var R=i.variableOffsets[m];R?(z=be(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),u&&z._rotate(f?i.transform.angle:-i.transform.angle)):D=!1}O.textBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||_,z.x,z.y),O.verticalTextBox&&Te(e.textCollisionBox.collisionVertexArray,v.text.placed,!D||w,z.x,z.y)}var F=Boolean(!w&&O.verticalIconBox);O.iconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,F,h?z.x:0,h?z.y:0),O.verticalIconBox&&Te(e.iconCollisionBox.collisionVertexArray,v.icon.placed,!F,h?z.x:0,h?z.y:0)}}},g=0;gt},we.prototype.setStale=function(){this.stale=!0};var ke=Math.pow(2,25),Ae=Math.pow(2,24),Me=Math.pow(2,17),Se=Math.pow(2,16),Ee=Math.pow(2,9),Le=Math.pow(2,8),Ce=Math.pow(2,1);function Pe(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*ke+e*Ae+r*Me+e*Se+r*Ee+e*Le+r*Ce+e}var Ie=0,Oe=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Oe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Oe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var De=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?"@2x":"",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,m=l.stretchX,g=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:m,stretchY:g,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new t.Event("data",{dataType:"style"}))}))},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,n=t;r0)throw new Error("Unimplemented: "+i.map((function(t){return t.command})).join(", ")+".");return n.forEach((function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0)||!this._validate(t.validateStyle.source,"sources."+e,r,null,n)){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Ct(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===e.type){if(je(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.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:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var m=this._order[d];if(r(m))for(var g=i.length-1;g>=0;g--){var v=i[g].feature;if(n[v.layer.id] 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_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),tr=yr("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);}"),er=yr("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,0,1);}"),rr=yr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),nr=yr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),ir=yr("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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;}"),ar=yr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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);}"),or=yr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);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;}"),sr=yr("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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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\n? a_pos\n: 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;}"),lr=yr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;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 exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),cr=yr("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;\n#define PI 3.141592653589793\nvoid 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),ur=yr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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);}"),fr=yr("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 float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute 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_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;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);}"),hr=yr("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;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat 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;}"),pr=yr("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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);}"),dr=yr("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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),mr=yr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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));}"),gr=yr("#define SDF_PX 8.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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);}"),vr=yr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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);}");function yr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nvarying "+r+" "+i+" "+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o="float"===i?"vec2":"vec4",s=a.match(/color/)?"color":o;return n[a]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+r+" "+o+" a_"+a+";\nvarying "+r+" "+i+" "+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = a_"+a+";\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+r+" "+o+" a_"+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = a_"+a+";\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n"}))}}var xr=Object.freeze({__proto__:null,prelude:Ye,background:We,backgroundPattern:Ze,circle:Xe,clippingMask:Je,heatmap:Ke,heatmapTexture:Qe,collisionBox:$e,collisionCircle:tr,debug:er,fill:rr,fillOutline:nr,fillOutlinePattern:ir,fillPattern:ar,fillExtrusion:or,fillExtrusionPattern:sr,hillshadePrepare:lr,hillshade:cr,line:ur,lineGradient:fr,linePattern:hr,lineSDF:pr,raster:dr,symbolIcon:mr,symbolSDF:gr,symbolTextAndIcon:vr}),br=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};br.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}_r.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m){var g,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(g={},g[v.LINES]=2,g[v.TRIANGLES]=3,g[v.LINE_STRIP]=1,g)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new br)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,m),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Tr=function(e,r,n,i){var a=r.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=t.create$1();"viewport"===a.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},kr=function(e,r,n,i,a,o,s){return t.extend(Tr(e,r,n,i),wr(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Ar=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(Ar(e),wr(n,r,i))},Sr=function(t,e){return{u_matrix:t,u_world:e}},Er=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Lr=function(e,r,n,i){var a,o,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=pe(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=pe(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Pr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Or=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:pe(e,1,r),u_intensity:n}};function Dr(e,r){var n=Math.pow(2,r.canonical.z),i=r.canonical.y;return[new t.MercatorCoordinate(0,i/n).toLngLat().lat,new t.MercatorCoordinate(0,(i+1)/n).toLngLat().lat]}var Rr=function(e,r,n){var i=e.transform;return{u_matrix:Ur(e,r,n),u_ratio:1/pe(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Fr=function(e,r,n){return t.extend(Rr(e,r,n),{u_image:0})},Br=function(e,r,n,i){var a=e.transform,o=jr(r,a);return{u_matrix:Ur(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/pe(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Nr=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=jr(r,o),c="round"===n.layout.get("line-cap"),u=s.getDash(i.from,c),f=s.getDash(i.to,c),h=u.width*a.fromScale,p=f.width*a.toScale;return t.extend(Rr(e,r,n),{u_patternscale_a:[l/h,-u.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:f.y,u_mix:a.t})};function jr(t,e){return 1/pe(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Vr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(o=i.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:Hr(i.paint.get("raster-hue-rotate"))};var a,o};function Hr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var qr,Gr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Yr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(Gr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Wr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Yr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Zr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Xr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/pe(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Jr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Kr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram("collisionBox"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,At.disabled,Mt.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,g),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram("collisionCircle"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(m[v.associatedIconIndex]={shiftedAnchor:S,angle:E})}else ue(v.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var un=new t.Color(1,0,0,1),fn=new t.Color(0,1,0,1),hn=new t.Color(0,0,1,1),pn=new t.Color(1,0,1,1),dn=new t.Color(0,1,1,1);function mn(t){var e=t.transform.padding;gn(t,t.transform.height-(e.top||0),3,un),gn(t,e.bottom||0,3,fn),vn(t,e.left||0,3,hn),vn(t,t.transform.width-(e.right||0),3,pn);var r=t.transform.centerPoint;!function(t,e,r,n){yn(t,e-1,r-10,2,20,n),yn(t,e-10,r-1,20,2,n)}(t,r.x,t.transform.height-r.y,dn)}function gn(t,e,r,n){yn(t,0,e+r/2,t.transform.width,r,n)}function vn(t,e,r,n){yn(t,e-r/2,0,r,t.transform.height,n)}function yn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function xn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=At.disabled,c=Mt.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=f&&f.byteLength||0,p=Math.floor(h/1024),d=r.getTile(n).tileSize,m=512/Math.min(d,512)*(n.overscaledZ/e.transform.zoom)*.5,g=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(g+=" => "+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,g+" "+p+"kb"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,m),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var bn={symbol:function(e,r,n,i,a){if("translucent"===e.renderPass){var o=Mt.disabled,s=e.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c="map"===a,u="map"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(At.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Mt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Mt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},_n.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=u[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},_n.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},_n.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new _r(this.context,xr[t],e,Jr[t],this._showOverdrawInspector)),this.cache[r]},_n.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()},_n.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},_n.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},_n.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var wn=function(t,e){this.points=t,this.planes=e};wn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-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((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new wn(a,o)};var Tn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};Tn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var kn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=r,this.right=n};kn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},kn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},kn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},kn.prototype.clone=function(){return new kn(this.top,this.bottom,this.left,this.right)},kn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var An=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new kn,this._posMatrixCache={},this._alignedPosMatrixCache={}},Mn={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}};An.prototype.clone=function(){var t=new An(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Mn.minZoom.get=function(){return this._minZoom},Mn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Mn.maxZoom.get=function(){return this._maxZoom},Mn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Mn.minPitch.get=function(){return this._minPitch},Mn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Mn.maxPitch.get=function(){return this._maxPitch},Mn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Mn.renderWorldCopies.get=function(){return this._renderWorldCopies},Mn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Mn.worldSize.get=function(){return this.tileSize*this.scale},Mn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Mn.size.get=function(){return new t.Point(this.width,this.height)},Mn.bearing.get=function(){return-this.angle/Math.PI*180},Mn.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Mn.pitch.get=function(){return this._pitch/Math.PI*180},Mn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Mn.fov.get=function(){return this._fov/Math.PI*180},Mn.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Mn.zoom.get=function(){return this._zoom},Mn.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Mn.center.get=function(){return this._center},Mn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Mn.padding.get=function(){return this._edgeInsets.toJSON()},Mn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Mn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},An.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},An.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},An.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},An.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},An.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=wn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new Tn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var m=u.pop(),g=m.x,v=m.y,y=m.fullyVisible;if(!y){var x=m.aabb.intersects(s);if(0===x)continue;y=2===x}var b=m.aabb.distanceX(o),_=m.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&m.zoom>=l)f.push({tileID:new t.OverscaledTileID(m.zoom===h?p:m.zoom,m.wrap,m.zoom,g,v),distanceSq:t.sqrLen([o[0]-.5-g,o[1]-.5-v])});else for(var k=0;k<4;k++){var A=(g<<1)+k%2,M=(v<<1)+(k>>1);u.push({aabb:m.aabb.quadrant(k),zoom:m.zoom+1,x:A,y:M,wrap:m.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},An.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Mn.unmodified.get=function(){return this._unmodified},An.prototype.zoomScale=function(t){return Math.pow(2,t)},An.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},An.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},An.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Mn.point.get=function(){return this.project(this.center)},An.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},An.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},An.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},An.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},An.prototype.coordinateLocation=function(t){return t.toLngLat()},An.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,c=n[1]/a,u=r[2]/i,f=n[2]/a,h=u===f?0:(0-u)/(f-u);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,c,h)/this.worldSize)},An.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},An.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},An.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},An.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},An.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},An.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},An.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var f=this.latRange;a=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-g)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},An.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,c=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),u=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,u,c),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),m=Math.sin(this.angle),g=s-Math.round(s)+d*h+m*p,v=l-Math.round(l)+d*p+m*h,y=new Float64Array(f);if(t.translate(y,y,[g>.5?g-1:g,v>.5?v-1:v,0]),this.alignedProjMatrix=y,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},An.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},An.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},An.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Sn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var En={linearity:.3,easing:t.bezier(0,0,.3,1)},Ln=t.extend({deceleration:2500,maxSpeed:1400},En),Cn=t.extend({deceleration:20,maxSpeed:1400},En),Pn=t.extend({deceleration:1e3,maxSpeed:360},En),In=t.extend({deceleration:1e3,maxSpeed:90},En),On=function(t){this._map=t,this.clear()};function zn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},On.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.dblclick=function(t){return this._firePreventable(new Rn(t.type,this._map,t))},Nn.prototype.mouseover=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.mouseout=function(t){this._map.fire(new Rn(t.type,this._map,t))},Nn.prototype.touchstart=function(t){return this._firePreventable(new Fn(t.type,this._map,t))},Nn.prototype.touchmove=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchend=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype.touchcancel=function(t){this._map.fire(new Fn(t.type,this._map,t))},Nn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Nn.prototype.isEnabled=function(){return!0},Nn.prototype.isActive=function(){return!1},Nn.prototype.enable=function(){},Nn.prototype.disable=function(){};var jn=function(t){this._map=t};jn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},jn.prototype.mousemove=function(t){this._map.fire(new Rn(t.type,this._map,t))},jn.prototype.mousedown=function(){this._delayContextMenu=!0},jn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Rn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},jn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Rn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},jn.prototype.isEnabled=function(){return!0},jn.prototype.isActive=function(){return!1},jn.prototype.enable=function(){},jn.prototype.disable=function(){};var Un=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Vn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Hn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var qn=function(t){this.singleTap=new Hn(t),this.numTaps=t.numTaps,this.reset()};qn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},qn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},qn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},qn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Gn=function(){this._zoomIn=new qn({numTouches:1,numTaps:2}),this._zoomOut=new qn({numTouches:2,numTaps:1}),this.reset()};Gn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Gn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Gn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Gn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Gn.prototype.touchcancel=function(){this.reset()},Gn.prototype.enable=function(){this._enabled=!0},Gn.prototype.disable=function(){this._enabled=!1,this.reset()},Gn.prototype.isEnabled=function(){return this._enabled},Gn.prototype.isActive=function(){return this._active};var Yn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Yn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Yn.prototype._correctButton=function(t,e){return!1},Yn.prototype._move=function(t,e){return{}},Yn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Yn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Vn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ni(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid){this._lastPoints=t,this._active=!0;return{pitchDelta:-.5*((n.y+i.y)/2)}}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ni(t)&&ni(e)&&a}},e}(Kn),ai={panStep:100,bearingStep:15,pitchStep:10},oi=function(){var t=ai;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function si(t){return t*(2-t)}oi.prototype.reset=function(){this._active=!1},oi.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:si,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},oi.prototype.enable=function(){this._enabled=!0},oi.prototype.disable=function(){this._enabled=!1,this.reset()},oi.prototype.isEnabled=function(){return this._enabled},oi.prototype.isActive=function(){return this._active};var li=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};li.prototype.setZoomRate=function(t){this._defaultZoomRate=t},li.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},li.prototype.isEnabled=function(){return!!this._enabled},li.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},li.prototype.isZooming=function(){return!!this._zooming},li.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},li.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},li.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}},li.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},li.prototype._start=function(e){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 n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},li.prototype.renderFrame=function(){return this._onScrollFrame()},li.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},li.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},li.prototype.reset=function(){this._active=!1};var ci=function(t,e){this._clickZoom=t,this._tapZoom=e};ci.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},ci.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},ci.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},ci.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var ui=function(){this.reset()};ui.prototype.reset=function(){this._active=!1},ui.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},ui.prototype.enable=function(){this._enabled=!0},ui.prototype.disable=function(){this._enabled=!1,this.reset()},ui.prototype.isEnabled=function(){return this._enabled},ui.prototype.isActive=function(){return this._active};var fi=function(){this._tap=new qn({numTouches:1,numTaps:1}),this.reset()};fi.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},fi.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},fi.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},fi.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},fi.prototype.touchcancel=function(){this.reset()},fi.prototype.enable=function(){this._enabled=!0},fi.prototype.disable=function(){this._enabled=!1,this.reset()},fi.prototype.isEnabled=function(){return this._enabled},fi.prototype.isActive=function(){return this._active};var hi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};hi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},hi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},hi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},hi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var pi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};pi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},pi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},pi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},pi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var di=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};di.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},di.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},di.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},di.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},di.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},di.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var mi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.Event);function vi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var yi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new On(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!1}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[t.window,"blur",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(g,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(m));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),a&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,p="padding"in e?e.padding:a.padding,d=a.zoomScale(u-o),m=t.Point.convert(e.offset),g=a.centerPoint.add(m),v=a.pointLocation(g),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if("minZoom"in e){var A=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),I=function(t){return C(P)/C(P+_*t)},O=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},z=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(z)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*z,d=1/I(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),g=a.centerPoint.add(m));var v=1===e?y:a.unproject(x.add(b.mult(O(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,g),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)180?-360:r<-180?360:0}},r}(t.Evented),bi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};bi.prototype.getDefaultPosition=function(){return"bottom-right"},bi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&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),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},bi.prototype.onRemove=function(){r.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},bi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+"="+e.value+(n=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},bi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var _i=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};_i.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_i.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_i.prototype.getDefaultPosition=function(){return"bottom-left"},_i.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},_i.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t){if(t[e].getSource().mapbox_logo)return!0}return!1}},_i.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var wi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},wi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var i=new An(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new wi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Ti,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Ai))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new yi(this,e);var a="string"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Sn(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new bi({customAttribution:e.customAttribution})),this.addControl(new _i,e.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){r.fire(new t.Event(e.dataType+"dataloading",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),a&&this.fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if("mouseenter"===t||"mouseover"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Rn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"===t||"mouseout"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Rn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Rn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ii.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ii.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ii.prototype.off=function(){var t=this.element;r.removeEventListener(t,"mousedown",this.mousedown),r.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(t,"touchmove",this.touchmove),r.removeEventListener(t,"touchend",this.touchend),r.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Ii.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,"mousemove",this.mousemove),r.removeEventListener(t.window,"mouseup",this.mouseup)},Ii.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,"mousemove",this.mousemove),r.addEventListener(t.window,"mouseup",this.mouseup)},Ii.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ii.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ii.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ii.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ii.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.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")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,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")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){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 r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&ji)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Fi(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Fi({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(e){var r=e.originalEvent&&"resize"===e.originalEvent.type;e.geolocateSource||"ACTIVE_LOCK"!==n._watchState||r||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new t.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return t.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 t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ni--,ji=!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 t.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 t.Event("trackuserlocationstart"))}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")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Ni>1?(e={maximumAge:6e5,timeout:0},ji=!0):(e=this.options.positionOptions,ji=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.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)},n}(t.Evented),Vi={maxWidth:100,unit:"metric"},Hi=function(e){this.options=t.extend({},Vi,e),t.bindAll(["_onMove","setUnit"],this)};function qi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){var l=3.2808*s;if(l>5280)Gi(e,n,l/5280,t._getUIString("ScaleControl.Miles"));else Gi(e,n,l,t._getUIString("ScaleControl.Feet"))}else if(r&&"nautical"===r.unit){Gi(e,n,s/1852,t._getUIString("ScaleControl.NauticalMiles"))}else s>=1e3?Gi(e,n,s/1e3,t._getUIString("ScaleControl.Kilometers")):Gi(e,n,s,t._getUIString("ScaleControl.Meters"))}function Gi(t,e,r,n){var i,a,o,s=(i=r,a=Math.pow(10,(""+Math.floor(i)).length-1),o=(o=i/a)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o),a*o),l=s/r;t.style.width=e*l+"px",t.innerHTML=s+" "+n}Hi.prototype.getDefaultPosition=function(){return"bottom-left"},Hi.prototype._onMove=function(){qi(this._map,this._container,this.options)},Hi.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Hi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Hi.prototype.setUnit=function(t){this.options.unit=t,qi(this._map,this._container,this.options)};var Yi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Yi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Yi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Yi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Yi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Yi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Yi.prototype._isFullscreen=function(){return this._fullscreen},Yi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Yi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.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 Wi={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Zi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,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._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 t.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.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 t.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),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},n.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},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.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))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this,i=this._lngLat||this._trackPointer;if(this._map&&i&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return n._container.classList.add(t)})),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=Oi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var a=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,s=function e(r){if(r){if("number"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(n,n),"top-right":new t.Point(-n,n),bottom:new t.Point(0,-r),"bottom-left":new t.Point(n,-n),"bottom-right":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.convert(r);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var l,c=this._container.offsetWidth,u=this._container.offsetHeight;l=a.y+s.bottom.ythis._map.transform.height-u?["bottom"]:[],a.xthis._map.transform.width-c/2&&l.push("right"),o=0===l.length?"bottom":l.join("-")}var f=a.add(s[o]).round();r.setTransform(this._container,zi[o]+" translate("+f.x+"px,"+f.y+"px)"),Di(this._container,o,"popup")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);var Xi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Ei,NavigationControl:Pi,GeolocateControl:Ui,AttributionControl:bi,ScaleControl:Hi,FullscreenControl:Yi,Popup:Zi,Marker:Fi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(zt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(zt),Rt=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()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return Xi})),r}))},{}],240:[function(t,e,r){"use strict";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],241:[function(t,e,r){"use strict";e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||c!==i||u!==a||l(s))&&(r=0|t,i=c||0,a=u||0,e&&e(r,i,a,o))}function u(t){c(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function m(t){c(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?g():function(){if(!s)return;s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h))}()},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var n=t("mouse-event")},{"mouse-event":243}],242:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},{}],243:[function(t,e,r){"use strict";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<0&&o(l,r))}catch(t){f.call(new p(r),t)}}}function f(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&o(l,e))}function h(t,e,r,n){for(var i=0;i1&&(r*=v=Math.sqrt(v),a*=v);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*g*g-x*m*m)/(y*g*g+x*m*m)));b==1/0&&(b=1);var _=b*r*g/a+(t+f)/2,w=b*-a*m/r+(e+h)/2,T=Math.asin(((e-w)/a).toFixed(9)),k=Math.asin(((h-w)/a).toFixed(9));(T=t<_?n-T:T)<0&&(T=2*n+T),(k=f<_?n-k:k)<0&&(k=2*n+k),u&&T>k&&(T-=2*n),!u&&k>T&&(k-=2*n)}if(Math.abs(k-T)>i){var A=k,M=f,S=h;k=T+i*(u&&k>T?1:-1);var E=s(f=_+r*Math.cos(k),h=w+a*Math.sin(k),r,a,o,0,u,M,S,[k,A,_,w])}var L=Math.tan((k-T)/4),C=4/3*r*L,P=4/3*a*L,I=[2*t-(t+C*Math.sin(T)),2*e-(e-P*Math.cos(T)),f+C*Math.sin(k),h-P*Math.cos(k),f,h];if(p)return I;E&&(I=I.concat(E));for(var O=0;O7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var x=p,b=d;"C"!=e&&"S"!=e||(x+=x-n,b+=b-i),v=["C",x,b,v[1],v[2],v[3],v[4]];break;case"T":"Q"==e||"T"==e?(f=2*p-f,h=2*d-h):(f=p,h=d),v=o(p,d,f,h,v[1],v[2]);break;case"Q":f=v[1],h=v[2],v=o(p,d,v[1],v[2],v[3],v[4]);break;case"L":v=a(p,d,v[1],v[2]);break;case"H":v=a(p,d,v[1],d);break;case"V":v=a(p,d,p,v[1]);break;case"Z":v=a(p,d,l,u)}e=y,p=v[v.length-2],d=v[v.length-1],v.length>4?(n=v[v.length-4],i=v[v.length-3]):(n=p,i=d),r.push(v)}return r}},{}],247:[function(t,e,r){ -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=o(t),c=1;c1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(a,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],249:[function(t,e,r){"use strict";var n=t("pick-by-alias");e.exports=function(t){var e;arguments.length>1&&(t=arguments);"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]);t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{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"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{"pick-by-alias":253}],250:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,(function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),"m"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.lengtha!=p>a&&i<(h-u)*(a-f)/(p-f)+u&&(o=!o)}return o}},{}],255:[function(t,e,r){ -/* - * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc - * @license MIT - * @preserve Project Home: https://github.com/voidqk/polybooljs - */ -var n,i=t("./lib/build-log"),a=t("./lib/epsilon"),o=t("./lib/intersecter"),s=t("./lib/segment-chainer"),l=t("./lib/segment-selector"),c=t("./lib/geojson"),u=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?u=i():!1===t&&(u=!1),!1!==u&&u.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,u);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,u).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,u),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,u),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,u),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,u),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,u),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,u),inverted:t.inverted}},polygonFromGeoJSON:function(t){return c.toPolygon(n,t)},polygonToGeoJSON:function(t){return c.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),e.exports=n},{"./lib/build-log":256,"./lib/epsilon":257,"./lib/geojson":258,"./lib/intersecter":259,"./lib/segment-chainer":261,"./lib/segment-selector":262}],256:[function(t,e,r){e.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},{}],257:[function(t,e,r){e.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],258:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i0}))}function u(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),p=e.pointsSame(s,u);if(h&&p)return n;var d=!h&&e.pointBetween(o,c,u),m=!p&&e.pointBetween(s,c,u);if(h)return m?l(n,s):l(t,u),n;d&&(p||(m?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,u)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var p=c(h),d=p.before?p.before.ev:null,m=p.after?p.after.ev:null;function g(){if(d){var t=u(h,d);if(t)return t}return!!m&&u(h,m)}r&&r.tempStatus(h.seg,!!d&&d.seg,!!m&&m.seg);var v,y=g();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=m?m.seg.myFill.above:i,h.seg.myFill.above=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=m?h.primary===m.primary?m.seg.otherFill.above:m.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};r&&r.status(h.seg,!!d&&d.seg,!!m&&m.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&&r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},a.prototype.read_uint16=function(t){var e=this.input;if(t+2>e.length)throw n("unexpected EOF","EBADDATA");return this.big_endian?256*e[t]+e[t+1]:e[t]+256*e[t+1]},a.prototype.read_uint32=function(t){var e=this.input;if(t+4>e.length)throw n("unexpected EOF","EBADDATA");return this.big_endian?16777216*e[t]+65536*e[t+1]+256*e[t+2]+e[t+3]:e[t]+256*e[t+1]+65536*e[t+2]+16777216*e[t+3]},a.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},a.prototype.exif_format_length=function(t){switch(t){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}},a.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return r=this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return r=this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return r=this.read_uint32(e);case 9:return 0|(r=this.read_uint32(e));case 5:case 10:case 11:case 12:case 7:default:return null}},a.prototype.scan_ifd=function(t,e,r){var a=this.read_uint16(e);e+=2;for(var o=0;othis.input.length)throw n("unexpected EOF","EBADDATA");for(var d=[],m=h,g=0;g0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===r({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:c,entry_offset:e+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);e+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(e)})},e.exports.ExifParser=a,e.exports.get_orientation=function(t){var e=0;try{return new a(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},{}],265:[function(t,e,r){"use strict";var n=t("./common").readUInt16BE,i=t("./common").readUInt32BE;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,c=0;ce.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),"irot"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),m=s.get_orientation(d);m>0&&(h.orientation=m)}return h}}}}}}},{"../common":263,"../exif_utils":264,"../miaf_utils":265}],267:[function(t,e,r){"use strict";var n=t("../common").str2arr,i=t("../common").sliceEq,a=t("../common").readUInt16LE,o=n("BM");e.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},{"../common":263}],268:[function(t,e,r){"use strict";var n=t("../common").str2arr,i=t("../common").sliceEq,a=t("../common").readUInt16LE,o=n("GIF87a"),s=n("GIF89a");e.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},{"../common":263}],269:[function(t,e,r){"use strict";var n=t("../common").readUInt16LE;e.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},{"../common":263}],270:[function(t,e,r){"use strict";var n=t("../common").readUInt16BE,i=t("../common").str2arr,a=t("../common").sliceEq,o=t("../exif_utils"),s=i("Exif\0\0");e.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(c.orientation=i),c}e+=r}}},{"../common":263,"../exif_utils":264}],271:[function(t,e,r){"use strict";var n=t("../common").str2arr,i=t("../common").sliceEq,a=t("../common").readUInt32BE,o=n("\x89PNG\r\n\x1a\n"),s=n("IHDR");e.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},{"../common":263}],272:[function(t,e,r){"use strict";var n=t("../common").str2arr,i=t("../common").sliceEq,a=t("../common").readUInt32BE,o=n("8BPS\0\x01");e.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},{"../common":263}],273:[function(t,e,r){"use strict";function n(t){return"number"==typeof t&&isFinite(t)&&t>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,a=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,o=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,s=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,l=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,c=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function u(t){return c.test(t)?t.match(c)[0]:"px"}e.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||u(t,e+8):"VP8L"===p&&d>=9?r=r||f(t,e+8):"VP8X"===p&&d>=10?r=r||h(t,e+8):"EXIF"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},{"../common":263,"../exif_utils":264}],276:[function(t,e,r){"use strict";e.exports={avif:t("./parse_sync/avif"),bmp:t("./parse_sync/bmp"),gif:t("./parse_sync/gif"),ico:t("./parse_sync/ico"),jpeg:t("./parse_sync/jpeg"),png:t("./parse_sync/png"),psd:t("./parse_sync/psd"),svg:t("./parse_sync/svg"),tiff:t("./parse_sync/tiff"),webp:t("./parse_sync/webp")}},{"./parse_sync/avif":266,"./parse_sync/bmp":267,"./parse_sync/gif":268,"./parse_sync/ico":269,"./parse_sync/jpeg":270,"./parse_sync/png":271,"./parse_sync/psd":272,"./parse_sync/svg":273,"./parse_sync/tiff":274,"./parse_sync/webp":275}],277:[function(t,e,r){"use strict";var n=t("./lib/parsers_sync");e.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map((function(t,c){var u=x[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{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"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},v.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},v.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},v.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>v.precisionThreshold||e.scale[1]*e.viewport.height>v.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=v.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},v.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach((function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=s(t,{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"}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=a({},v.defaults,t)),null!=t.thickness&&(d.thickness=parseFloat(t.thickness)),null!=t.opacity&&(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(d.overlay=!!t.overlay,f=D}));(I=I.slice(0,R)).push(D)}for(var F=function(t){var e=k.slice(2*z,2*I[t]).concat(D?k.slice(2*D):[]),r=(d.hole||[]).map((function(e){return e-D+(I[t]-z)})),n=c(e,r);n=n.map((function(e){return e+z+(e+zt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=h(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),g&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}b.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},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=v.float32(t);return i({data:p,usage:"dynamic"}),a({data:v.fract32(t,p),usage:"dynamic"}),s({data:new Uint8Array(c),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var a=[],s=0,l=Math.min(e.length,r.count);s=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x+s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,n,o,i]}function p(t){if("number"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}e.exports=u,u.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){e.draw(),e.dirty=!0,e.planned=null}))):(this.draw(),this.dirty=!0,o((function(){e.dirty=!1}))),this)},u.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;nk))&&(s.lower||!(T>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function s(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[o(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[o(t.byteLength)>>2].push(t)}var r=a(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function l(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||J(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(i=s)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||J(t)||l(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=et[t.usage]),"primitive"in t&&(n=at[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=u[t.type]),"length"in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&&5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return s}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=f,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){K(s).forEach(o)}}}function m(t){for(var e=Z.allocType(5123,t.length),r=0;r>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15>=i,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return"number"==typeof t?M(a,0|t,"number"==typeof e?0|e:0|t):t?(I(r,t),S(a,t)):M(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,D(i),E(a,3553),O(r,3553),R(),C(a),o.profile&&(i.stats.size=T(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new z(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,D(i),d(o,3553,e,r,a),R(),k(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function f(t,e,r,n,i,a){var s,l=h.texInfo;for(P.call(l),s=0;6>s;++s)m[s]=L();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(m[0],t),S(m[1],e),S(m[2],r),S(m[3],n),S(m[4],i),S(m[5],a);else if(I(l,t),u(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)c(m[s],h),S(m[s],t[s]);else for(s=0;6>s;++s)S(m[s],t)}else for(t=0|t||1,s=0;6>s;++s)M(m[s],t,t);for(c(h,m[0]),h.mipmask=l.genMipmaps?(m[0].width<<1)-1:m[0].mipmask,h.internalformat=m[0].internalformat,f.width=m[0].width,f.height=m[0].height,D(h),s=0;6>s;++s)E(m[s],34069+s);for(O(l,34067),R(),o.profile&&(h.stats.size=T(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=tt[h.internalformat],f.type=et[h.type],f.mag=rt[l.magFilter],f.min=nt[l.minFilter],f.wrapS=it[l.wrapS],f.wrapT=it[l.wrapT],s=0;6>s;++s)C(m[s]);return f}var h=new z(34067);yt[h.id]=h,a.cubeCount++;var m=Array(6);return f(e,r,n,i,s,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=v();return c(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,D(h),d(a,34069+t,r,n,i),R(),k(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,D(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return R(),o.profile&&(h.stats.size=T(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType="textureCube",f._texture=h,o.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;er;++r)if(0!=(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);O(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(c=0;ct;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){K(k).forEach(g)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,K(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function M(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function S(t,e,r,n,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var c=r.maxAttributes,u=Array(c);for(r=0;r=h.byteLength?c.subdata(h):(c.destroy(),r.buffers[s]=null)),r.buffers[s]||(c=r.buffers[s]=i.create(u,34962,!1,!0)),f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1;else i.getBuffer(u)?(f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(u.buffer)?(f.buffer=i.getBuffer(u.buffer),f.size=0|(+u.size||f.buffer.dimension),f.normalized=!!u.normalized||!1,f.type="type"in u?tt[u.type]:f.buffer.dtype,f.offset=0|(u.offset||0),f.stride=0|(u.stride||0),f.divisor=0|(u.divisor||0),f.state=1):"x"in u&&(f.x=+u.x||0,f.y=+u.y||0,f.z=+u.z||0,f.w=+u.w||0,f.state=2)}for(c=0;ct&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);K(c).forEach(e),c={},K(u).forEach(e),u={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,f={},r.shaderCount=0},program:function(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),H(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(u[d.vertId]),delete u[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(c[d.fragId]),delete c[d.fragId],delete f[d.fragId])}})},restore:function(){c={},u={};for(var t=0;t>>e|t<<32-e}function P(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function I(t){return Array.prototype.slice.call(t)}function O(t){return I(t).join("")}function z(t){function e(){var t=[],e=[];return H((function(){t.push.apply(t,I(arguments))}),{def:function(){var r="v"+i++;return e.push(r),0>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,a,o,s,l,c,u,f,h,p,d=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[d>>5]|=128<<24-d%32,e[15+(d+64>>9<<4)]=d,u=0;uf;f++){var m;if(16>f)r[f]=e[f+u];else h=f,p=P(p=C(p=r[f-2],17)^C(p,19)^p>>>10,r[f-7]),m=C(m=r[f-15],7)^C(m,18)^m>>>3,r[h]=P(P(p,m),r[f-16]);h=P(P(P(P(c,h=C(h=o,6)^C(h,11)^C(h,25)),o&s^~o&l),kt[f]),r[f]),p=P(c=C(c=d,2)^C(c,13)^C(c,22),d&n^d&i^n&i),c=l,l=s,s=o,o=P(a,h),a=i,i=n,n=d,d=P(h,p)}t[0]=P(d,t[0]),t[1]=P(n,t[1]),t[2]=P(i,t[2]),t[3]=P(a,t[3]),t[4]=P(o,t[4]),t[5]=P(s,t[5]),t[6]=P(l,t[6]),t[7]=P(c,t[7])}for(e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n="",i=-1;++i=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,o):(r=Function.apply(null,a.concat(r)),n&&(n[e]=r),r.apply(null,o))}}}function D(t){return Array.isArray(t)||J(t)||l(t)}function R(t){return t.sort((function(t,e){return"viewport"===t?-1:"viewport"===e?1:t"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",u,"=",a,".createStream(",34962,",",i,".buffer);","}else{",u,"=",a,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",a,".destroyStream(",u,");","}"),l}))})),o}function M(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[d,m,g,s],");")}p&&"null"!==p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(u+".drawElements("+[d,g,v,m+"<<(("+v+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[d,m,g]+");")}p&&"null"!==p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,f=c.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a),h.elementsActive&&a("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=a.def(),a(i,"=",f,".","elements",";","if(",i,"){",u,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",c.vao,".currentVAO){",i,"=",t.shared.elements+".getElements("+c.vao,".currentVAO.elements);",rt?"":"if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),d=i("primitive"),m=i("offset"),g=function(){var i=h.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,".","count"),i}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");$&&(s=i("instances"),l=t.instancing);var v=p+".type",y=h.elements&&B(h.elements)&&!h.vaoActive;$&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),a(),r("}else if(",s,"<0){"),o(),r("}")):a():o()}function q(t,e,r,n,i){return i=(e=_()).proc("body",i),$&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function Y(t,e,r,n){P(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),O(t,e,r,n.attributes,(function(){return!0}))),U(t,e,r,n.uniforms,(function(){return!0}),!1),V(t,e,e,r)}function W(t,e,r,n){function i(){return!0}t.batchId="a1",P(t,e),O(t,e,r,n.attributes,i),U(t,e,r,n.uniforms,i,!1),V(t,e,e,r)}function Z(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}P(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&S(t,u,r.context),r.needsFramebuffer&&E(t,u,r.framebuffer),C(t,u,r.state,i),r.profile&&i(r.profile)&&I(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,".setVAO(",r.drawVAO.append(t,u),");"):c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):c(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(c(t.shared.vao,".setVAO(null);"),O(t,c,r,n.attributes,a),O(t,u,r,n.attributes,i)),U(t,c,r,n.uniforms,a,!1),U(t,u,r,n.uniforms,i,!0),V(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link((function(e){return q(W,t,r,e,2)})),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function X(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.shader,"."+e,n):i.set(a.shader,"."+e,t.link(n,{stable:!0})))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),R(Object.keys(r.state)).forEach((function(e){var n=r.state[e],o=n.append(t,i);g(o)?o.forEach((function(r,n){isNaN(r)?i.set(t.next[e],"["+n+"]",r):i.set(t.next[e],"["+n+"]",t.link(r,{stable:!0}))})):B(n)?i.set(a.next,"."+e,t.link(o,{stable:!0})):i.set(a.next,"."+e,o)})),I(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.draw,"."+e,n):i.set(a.draw,"."+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o="["+o.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+"]"),i.set(a.uniforms,"["+t.link(e.id(n),{stable:!0})+"]",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new K).forEach((function(t){i.set(a,"."+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(a.vao,".targetVAO",s):i.set(a.vao,".targetVAO",t.link(s,{stable:!0}))}n("vert"),n("frag"),0=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach((function(e){t+=u[e].stats.size})),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(a=e.shape)[0],a=0|a[1]):("radius"in e&&(n=a=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(a=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,a="number"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=bt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height||(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=bt[c.format]*c.width*c.height)),o},o._reglType="renderbuffer",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){K(u).forEach(o)},restore:function(){K(u).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},wt=[];wt[6408]=4,wt[6407]=3;var Tt=[];Tt[5121]=1,Tt[5126]=4,Tt[36193]=2;var kt=[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],At=["x","y","z","w"],Mt="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),St={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Et={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Lt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ct={cw:2304,ccw:2305},Pt=new F(!1,!1,!1,(function(){}));return function(t){function e(){if(0===K.length)T&&T.update(),et=null;else{et=Y.next(e),f();for(var t=K.length-1;0<=t;--t){var r=K[t];r&&r(I,null,0)}g.flush(),T&&T.update()}}function r(){!et&&0=K.length&&n()}}}}function u(){var t=Z.viewport,e=Z.scissor_box;t[0]=t[1]=e[0]=e[1]=0,I.viewportWidth=I.framebufferWidth=I.drawingBufferWidth=t[2]=e[2]=g.drawingBufferWidth,I.viewportHeight=I.framebufferHeight=I.drawingBufferHeight=t[3]=e[3]=g.drawingBufferHeight}function f(){I.tick+=1,I.time=m(),u(),q.procs.poll()}function h(){B.refresh(),u(),q.procs.refresh(),T&&T.update()}function m(){return(W()-M)/1e3}if(!(t=i(t)))return null;var g=t.gl,v=g.getContextAttributes();g.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)rt(H({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:G.define.bind(null,1),context:G.define.bind(null,2),this:G.define.bind(null,3),draw:s({}),buffer:function(t){return z.create(t,34962,!1,!1)},elements:function(t){return D.create(t,!1)},texture:B.create2D,cube:B.createCube,renderbuffer:N.create,framebuffer:j.create,framebufferCube:j.createCube,vao:R.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=Q;break;case"restore":r=$;break;case"destroy":r=tt}return r.push(e),{cancel:function(){for(var t=0;t2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,o,s;if("string"==typeof e&&(i="not ",e.substr(!o||o<0?0:+o,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(n," ").concat(a(e,"type"));else{var l=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(l," ").concat(n," ").concat(a(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},{}],288:[function(t,e,r){(function(r){(function(){"use strict";var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var i=t("./_stream_readable"),a=t("./_stream_writable");t("inherits")(c,i);for(var o=n(a.prototype),s=0;s0)if("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===s.prototype||(e=function(t){return s.from(t)}(e)),n)o.endEmitted?w(t,new _):S(t,o,e,!0);else if(o.ended)w(t,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?S(t,o,e,!1):P(t,o)):S(t,o,e,!1)}else n||(o.reading=!1,P(t,o));return!o.ended&&(o.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function L(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(C,t))}function C(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,R(t)}function P(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function z(t){c("readable nexttick read 0"),t.read(0)}function D(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),R(t),e.flowing&&!e.reading&&t.read(0)}function R(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(N,e,t))}function N(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function j(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):L(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&B(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(t){w(this,new b("_read()"))},A.prototype.pipe=function(t,e){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var o=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:g;function s(e,r){c("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,c("cleanup"),t.removeListener("close",d),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",h),f=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function l(){c("onend"),t.end()}i.endEmitted?r.nextTick(o):n.once("end",o),t.on("unpipe",s);var u=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,R(t))}}(n);t.on("drain",u);var f=!1;function h(e){c("ondata");var r=t.write(e);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==j(i.pipes,t))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function p(e){c("onerror",e),g(),t.removeListener("error",p),0===a(t,"error")&&w(t,e)}function d(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",d),g()}function g(){c("unpipe"),n.unpipe(t)}return n.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",p),t.once("close",d),t.once("finish",m),t.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?L(this):i.reading||r.nextTick(z,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var n=o.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(O,this),n},A.prototype.removeAllListeners=function(t){var e=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(O,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(D,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new m("_write()"))},A.prototype._writev=null,A.prototype.end=function(t,e,n){var i=this._writableState;return"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,n){e.ending=!0,P(t,e),n&&(e.finished?r.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,i,n),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":287,"./_stream_duplex":288,"./internal/streams/destroy":295,"./internal/streams/state":299,"./internal/streams/stream":300,_process:278,buffer:85,inherits:231,"util-deprecate":331}],293:[function(t,e,r){(function(r){(function(){"use strict";var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var a=t("./end-of-stream"),o=Symbol("lastResolve"),s=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(t,e){return{value:t,done:e}}function d(t){var e=t[o];if(null!==e){var r=t[h].read();null!==r&&(t[u]=null,t[o]=null,t[s]=null,e(p(r,!1)))}}function m(t){r.nextTick(d,t)}var g=Object.getPrototypeOf((function(){})),v=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var t=this,e=this[l];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(e,n){r.nextTick((function(){t[l]?n(t[l]):e(p(void 0,!0))}))}));var n,i=this[u];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(p(void 0,!0)):e[f](r,n)}),n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(p(a,!1));n=new Promise(this[f])}return this[u]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[h].destroy(null,(function(t){t?r(t):e(p(void 0,!0))}))}))})),n),g);e.exports=function(t){var e,r=Object.create(v,(i(e={},h,{value:t,writable:!0}),i(e,o,{value:null,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,l,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,f,{value:function(t,e){var n=r[h].read();n?(r[u]=null,r[o]=null,r[s]=null,t(p(n,!1))):(r[o]=t,r[s]=e)},writable:!0}),e));return r[u]=null,a(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[s];return null!==e&&(r[u]=null,r[o]=null,r[s]=null,e(t)),void(r[l]=t)}var n=r[o];null!==n&&(r[u]=null,r[o]=null,r[s]=null,n(p(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this)}).call(this,t("_process"))},{"./end-of-stream":296,_process:278}],294:[function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(c),a||(o.forEach(c),i(n))}))}));return e.reduce(u)}},{"../../../errors":287,"./end-of-stream":296}],299:[function(t,e,r){"use strict";var n=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},{"../../../errors":287}],300:[function(t,e,r){e.exports=t("events").EventEmitter},{events:84}],301:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.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 a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=u,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"\ufffd";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"\ufffd";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"\ufffd"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function u(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return i>0&&(t.lastNeed=i-1),i;if(--n=0)return i>0&&(t.lastNeed=i-2),i;if(--n=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":285}],302:[function(t,e,r){(function(r,n){(function(){var r=t("assert"),i=t("debug")("stream-parser");e.exports=function(t){var e=t&&"function"==typeof t._transform,r=t&&"function"==typeof t._write;if(!e&&!r)throw new Error("must pass a Writable or Transform stream in");i("extending Parser into stream"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l);e?t._transform=u:t._write=c};function a(t){i("initializing parser stream"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,"function"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got "'+t+'"'),this._parserInit||a(this),i("buffering %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){r(!this._parserCallback,'there is already a "callback" set!'),r(t>0,'can only skip > 0 bytes, got "'+t+'"'),this._parserInit||a(this),i("skipping %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){r(!this._parserCallback,'There is already a "callback" set!'),r(t>0,'can only pass through > 0 bytes, got "'+t+'"'),this._parserInit||a(this),i("passing through %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function c(t,e,r){this._parserInit||a(this),i("write(%o bytes)",t.length),"function"==typeof e&&(r=e),h(this,t,null,r)}function u(t,e,r){this._parserInit||a(this),i("transform(%o bytes)",t.length),"function"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,a){if(t._parserBytesLeft-=e.length,i("%o bytes left for stream piece",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return a;var o=t._parserCallback;if(o&&0===t._parserState&&t._parserBuffers.length>1&&(e=n.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),o){var s=[];e&&s.push(e),r&&s.push(r);var l=o.length>s.length;l&&s.push(p(a));var c=o.apply(t,s);if(!l||a===c)return a}}var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);"function"==typeof e;)e=e();return e}}}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:278,assert:75,buffer:85,debug:303}],303:[function(t,e,r){(function(n){(function(){function i(){var t;try{t=r.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(r=e.exports=t("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(t){var e=this.useColors;if(t[0]=(e?"%c":"")+this.namespace+(e?" %c":" ")+t[0]+(e?"%c ":" ")+"+"+r.humanize(this.diff),!e)return;var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(i++,"%c"===t&&(a=i))})),t.splice(a,0,n)},r.save=function(t){try{null==t?r.storage.removeItem("debug"):r.storage.debug=t}catch(t){}},r.load=i,r.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},r.enable(i())}).call(this)}).call(this,t("_process"))},{"./debug":304,_process:278}],304:[function(t,e,r){var n;function i(t){function e(){if(e.enabled){var t=e,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if((t=String(t)).length>100)return;var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(!e)return;var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*o;case"hours":case"hour":case"hrs":case"hr":case"h":return r*a;case"minutes":case"minute":case"mins":case"min":case"m":return r*i;case"seconds":case"second":case"secs":case"sec":case"s":return r*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(t);if("number"===l&&!1===isNaN(t))return e.long?s(r=t,o,"day")||s(r,a,"hour")||s(r,i,"minute")||s(r,n,"second")||r+" ms":function(t){if(t>=o)return Math.round(t/o)+"d";if(t>=a)return Math.round(t/a)+"h";if(t>=i)return Math.round(t/i)+"m";if(t>=n)return Math.round(t/n)+"s";return t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},{}],306:[function(t,e,r){"use strict";var n=t("parenthesis");e.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","\u201c\u201d","\xab\xbb"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[m])}a[e]=d}else{if(n[e]===r[e]){var g=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,g.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(g);var b=new Array(y);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,m=void 0===d?0:d,g=t.sweepFlag,v=void 0===g?0:g,y=[];if(0===u||0===f)return[];var x=Math.sin(p*i/360),b=Math.cos(p*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),m=Math.pow(o,2),g=Math.pow(h,2),v=Math.pow(p,2),y=d*m-d*v-m*g;y<0&&(y=0),y/=d*v+m*g;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,T=(h-x)/a,k=(p-b)/o,A=(-h-x)/a,M=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,A,M);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,m,v,x,b,_,w),A=n(k,4),M=A[0],S=A[1],E=A[2],L=A[3],C=Math.abs(L)/(i/4);Math.abs(1-C)<1e-7&&(C=1);var P=Math.max(Math.ceil(C),1);L/=P;for(var I=0;Ie[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":70,assert:75,"is-svg-path":238,"normalize-svg-path":310,"parse-svg-path":250}],310:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,p=0,d=0,m=t.length;d4?(o=g[g.length-4],s=g[g.length-3]):(o=h,s=p),r.push(g)}return r};var n=t("svg-arc-to-cubic-bezier");function i(t,e,r,n){return["C",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{"svg-arc-to-cubic-bezier":308}],311:[function(t,e,r){"use strict";var n,i=t("svg-path-bounds"),a=t("parse-svg-path"),o=t("draw-svg-path"),s=t("is-svg-path"),l=t("bitmap-sdf"),c=document.createElement("canvas"),u=c.getContext("2d");e.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),m=[r/(d[2]-d[0]),f/(d[3]-d[1])],g=Math.min(m[0]||0,m[1]||0)/2;u.fillStyle="black",u.fillRect(0,0,r,f),u.fillStyle="white",p&&("number"!=typeof p&&(p=1),u.strokeStyle=p>0?"white":"black",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{"bitmap-sdf":82,"draw-svg-path":126,"is-svg-path":238,"parse-svg-path":250,"svg-path-bounds":309}],312:[function(t,e,r){(function(e,n){(function(){var i=t("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},l=0;function c(t,e){this._id=t,this._clearFn=e}r.setTimeout=function(){return new c(a.call(setTimeout,window,arguments),clearTimeout)},r.setInterval=function(){return new c(a.call(setInterval,window,arguments),clearInterval)},r.clearTimeout=r.clearInterval=function(t){t.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},r.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},r.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},r._unrefActive=r.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r.setImmediate="function"==typeof e?e:function(t){var e=l++,n=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i((function(){s[e]&&(n?t.apply(null,n):t.call(null),r.clearImmediate(e))})),e},r.clearImmediate="function"==typeof n?n:function(t){delete s[t]}}).call(this)}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":278,timers:312}],313:[function(t,e,r){!function(t){var r=/^\s+/,n=/\s+$/,i=0,a=t.round,o=t.min,s=t.max,l=t.random;function c(e,l){if(l=l||{},(e=e||"")instanceof c)return e;if(!(this instanceof c))return new c(e,l);var u=function(e){var i={r:0,g:0,b:0},a=1,l=null,c=null,u=null,f=!1,h=!1;"string"==typeof e&&(e=function(t){t=t.replace(r,"").replace(n,"").toLowerCase();var e,i=!1;if(S[t])t=S[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=j.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=j.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=j.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=j.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=j.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=j.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=j.hex8.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),a:R(e[4]),format:i?"name":"hex8"};if(e=j.hex6.exec(t))return{r:I(e[1]),g:I(e[2]),b:I(e[3]),format:i?"name":"hex"};if(e=j.hex4.exec(t))return{r:I(e[1]+""+e[1]),g:I(e[2]+""+e[2]),b:I(e[3]+""+e[3]),a:R(e[4]+""+e[4]),format:i?"name":"hex8"};if(e=j.hex3.exec(t))return{r:I(e[1]+""+e[1]),g:I(e[2]+""+e[2]),b:I(e[3]+""+e[3]),format:i?"name":"hex"};return!1}(e));"object"==typeof e&&(U(e.r)&&U(e.g)&&U(e.b)?(p=e.r,d=e.g,m=e.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(m,255)},f=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):U(e.h)&&U(e.s)&&U(e.v)?(l=z(e.s),c=z(e.v),i=function(e,r,n){e=6*C(e,360),r=C(r,100),n=C(n,100);var i=t.floor(e),a=e-i,o=n*(1-r),s=n*(1-a*r),l=n*(1-(1-a)*r),c=i%6;return{r:255*[n,s,o,o,l,n][c],g:255*[l,n,n,s,o,o][c],b:255*[o,o,l,n,n,s][c]}}(e.h,l,c),f=!0,h="hsv"):U(e.h)&&U(e.s)&&U(e.l)&&(l=z(e.s),u=z(e.l),i=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=C(t,360),e=C(e,100),r=C(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),f=!0,h="hsl"),e.hasOwnProperty("a")&&(a=e.a));var p,d,m;return a=L(a),{ok:f,format:e.format||h,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=C(t,255),e=C(e,255),r=C(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function M(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,i=this.toRgb();return e=i.r/255,r=i.g/255,n=i.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=L(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[O(a(t).toString(16)),O(a(e).toString(16)),O(a(r).toString(16)),O(D(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*C(this._r,255))+"%",g:a(100*C(this._g,255))+"%",b:a(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*C(this._r,255))+"%, "+a(100*C(this._g,255))+"%, "+a(100*C(this._b,255))+"%)":"rgba("+a(100*C(this._r,255))+"%, "+a(100*C(this._g,255))+"%, "+a(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);r="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(M,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:z(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),i=c(e).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(e,r){var n=c(e),i=c(r);return(t.max(n.getLuminance(),i.getLuminance())+.05)/(t.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,i,a=c.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},c.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],r))};var S=c.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"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function P(t){return o(1,s(0,t))}function I(t){return parseInt(t,16)}function O(t){return 1==t.length?"0"+t:""+t}function z(t){return t<=1&&(t=100*t+"%"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return I(t)/255}var F,B,N,j=(B="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",N="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+N),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 U(t){return!!j.CSS_UNIT.exec(t)}void 0!==e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],314:[function(t,e,r){"use strict";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=i(t));for(var r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:"Feature",properties:i,geometry:o}:null==n?{type:"Feature",id:r,properties:i,geometry:o}:{type:"Feature",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function m(t){var e;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(m)};break;case"Point":e={type:"Point",coordinates:d(t.coordinates)};break;case"MultiPoint":e={type:"MultiPoint",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=m(h[c]);return{type:"Topology",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++r":(e.length>100&&(e=e.slice(0,99)+"\u2026"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},{"./safe-to-string":319}],321:[function(t,e,r){"use strict";var n=t("../value/is"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{"../value/is":327}],322:[function(t,e,r){"use strict";var n=t("../lib/resolve-exception"),i=t("./is");e.exports=function(t){return i(t)?t:n(t,"%v is not a plain function",arguments[1])}},{"../lib/resolve-exception":318,"./is":323}],323:[function(t,e,r){"use strict";var n=t("../function/is"),i=/^\s*class[\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{"../function/is":317}],324:[function(t,e,r){"use strict";var n=t("../object/is");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{"../object/is":321}],325:[function(t,e,r){"use strict";var n=t("../value/is"),i=t("../object/is"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===a)return null}try{return""+t}catch(t){return null}}},{"../object/is":321,"../value/is":327}],326:[function(t,e,r){"use strict";var n=t("../lib/resolve-exception"),i=t("./is");e.exports=function(t){return i(t)?t:n(t,"Cannot use %v",arguments[1])}},{"../lib/resolve-exception":318,"./is":327}],327:[function(t,e,r){"use strict";e.exports=function(t){return null!=t}},{}],328:[function(t,e,r){(function(e){(function(){"use strict";var n=t("bit-twiddle"),i=t("dup"),a=t("buffer").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function m(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return d(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return y(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return k(t);case"biguint64":return T(t);case"buffer":return M(t);case"data":case"dataview":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=m,r.mallocUint32=g,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"bit-twiddle":81,buffer:85,dup:128}],329:[function(t,e,r){var n=/[\'\"]/;e.exports=function(t){return t?(n.test(t.charAt(0))&&(t=t.substr(1)),n.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},{}],330:[function(t,e,r){"use strict";e.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(i=a.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),"d");var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if("object"==typeof t)o=t,a=e||{};else{var l;if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(m>>5&15)-1,(31&m)+s);return a.year=g.getFullYear(),a.month=1+g.getMonth(),a.day=g.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if("object"==typeof t)i=t,a=e||{};else{if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var m=d&1<<12-p?30:29;if(l>13;!g||p=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=a},{"../main":347,"object-assign":247}],336:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Ethiopian",jdEpoch:1724220.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},{"../main":347,"object-assign":247}],337:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)||8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},{"../main":347,"object-assign":247}],338:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Islamic",jdEpoch:1948439.5,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(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},{"../main":347,"object-assign":247}],339:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Julian",jdEpoch:1721423.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},{"../main":347,"object-assign":247}],340:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.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(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).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(t){var e=o((t-=this.jdEpoch)+8+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s((t-=this.jdEpoch)+20,20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},{"../main":347,"object-assign":247}],341:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar;var o=n.instance("gregorian");i(a.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},{"../main":347,"object-assign":247}],342:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,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(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+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>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),n.calendars.persian=a,n.calendars.jalali=a},{"../main":347,"object-assign":247}],344:[function(t,e,r){var n=t("../main"),i=t("object-assign"),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":347,"object-assign":247}],345:[function(t,e,r){var n=t("../main"),i=t("object-assign"),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Thai",jdEpoch:1523098.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},{"../main":347,"object-assign":247}],346:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;ar)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[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]},{"../main":347,"object-assign":247}],347:[function(t,e,r){var n=t("object-assign");function i(){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={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return"000000".substring(0,e-(t=""+t).length)+t}function s(){this.shortYearCutoff="+10"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}n(i.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,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(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[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;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.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(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new i;c.cdate=a,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":247}],348:[function(t,e,r){var n=t("object-assign"),i=t("./main");n(i.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"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,f=r.monthNamesShort||this.local.monthNamesShort,h=r.monthNames||this.local.monthNames,p=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;w+n1}),d=function(t,e,r,n){var i=""+e;if(p(t,n))for(;i.length1},x=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"==typeof l){y("m");var t=l.call(b,e.substring(A));return A+=t.length,t}return x("m")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){p=1,d=m;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}return f>-1?this.fromJD(f):this.newDate(h,p,d)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":347,"object-assign":247}],349:[function(t,e,r){"use strict";e.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}]},{}],350:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;t("../../constants/axis_placeable_objects");e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({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:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.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",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.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",a.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:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../constants/axis_placeable_objects":484,"../../plot_api/plot_template":555,"../../plots/cartesian/constants":573,"../../plots/font_attributes":594,"./arrow_paths":349}],351:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},"range"===a&&s(e,r),"range"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],c=t["a"+a+"ref"],u=t["_"+a+"padplus"],f=t["_"+a+"padminus"],h={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,m=p-h,g=3*t.startarrowsize*t.arrowwidth||0,v=g+h,y=g-h;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:m}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),ppadminus:Math.max(f,m,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},{"../../lib":515,"../../plots/cartesian/axes":566,"./draw":356}],352:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("../../plot_api/plot_template").arrayEditor;function o(t,e){var r,n,i,a,o,l,c,u=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,Z=["x","y"],X=0;X1)&&(nt===rt?((pt=it.r2fraction(e["a"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt="domain"===ht;"x"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var mt=e["a"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(mt=1-mt),ft.tail=it._offset+it._length*mt):"paper"===gt?"y"===et?(mt=1-mt,ft.tail=T.t+T.h*mt):ft.tail=T.l+T.w*mt:ft.tail=it._offset+it.r2p(mt),K=tt}else ft.tail=J+mt,K=tt+mt;ft.text=ft.tail+tt;var vt=w["x"===et?"width":"height"];if("paper"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),"pixel"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*q($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e["_"+et+"padplus"]=lt/2+K,e["_"+et+"padminus"]=lt/2-K,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(W)R.remove();else{var bt=0,_t=0;if("left"!==e.align&&(bt=(A-b)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(D-_)*("middle"===e.valign?.5:1)),f)n.select("svg").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?L:null,t);else{var wt=N+_t-m.top,Tt=N+bt-m.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?L:null,t)}V.select("rect").call(u.setRect,N,N,A,D),j.call(u.setRect,F/2,F/2,B-F,H-F),R.call(u.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),O.attr({transform:"rotate("+P+","+C.x.text+","+C.y.text+")"});var kt,At=function(r,n){I.selectAll(".annotation-arrow-g").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,m=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,m,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr("width"),z=+j.attr("height"),D=m-.5*L,F=D+L,B=b-.5*z,N=B+z,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=I.append("g").style({opacity:c.opacity(H)}).classed("annotation-arrow-g",!0),Y=G.append("path").attr("d","M"+h+","+p+"L"+l+","+f).style("stroke-width",V+"px").call(c.stroke,c.rgb(H));if(g(Y,q,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,Z=f;if(e.standoff){var X=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/X,Z+=e.standoff*(p-f)/X}var J,K,Q=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-W)+","+(p-Z),transform:s(W,Z)}).style("stroke-width",V+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S("x",y(v,t,"x",T,e)),S("y",y(x,r,"y",T,e)),e.axref===e.xref&&S("ax",y(v,t,"ax",T,e)),e.ayref===e.yref&&S("ay",y(x,r,"ay",T,e)),G.attr("transform",s(t,r)),O.attr({transform:"rotate("+P+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&At(0,0),z)d.init({element:R.node(),gd:t,prepFn:function(){kt=O.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",y(v,t,"ax",T,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",y(x,r,"ay",T.w,e)):S("ay",e.ay+r),At(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,"x",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,"y",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S("x",i),S("y",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}O.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",Y(n))},doneFn:function(){p(R),i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=e.indexOf("end")>=0,b=d.backoff*g+r.standoff,_=m.backoff*v+r.startstandoff;if("line"===p.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},u={x:+t.attr("x2"),y:+t.attr("y2")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void z();if(b){if(b*b>w*w+T*T)return void z();var k=b*Math.cos(f),A=b*Math.sin(f);u.x+=k,u.y+=A,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void z();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),L="";if(E1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":616,"../annotations/draw":356}],363:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib");e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:t("./attributes")}}},layoutAttributes:t("./attributes"),handleDefaults:t("./defaults"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var a=r.attrRegex,o=Object.keys(t),s=0;s=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||c).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,c))),(i.isDark()?e?i.lighten(e):c:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ct=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ct*c.roundUp(lt/ct,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+I/R.h,rt+K-I/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr("transform",u(Math.round(R.l),Math.round(R.t)));var ut,ft=t.select("."+A.cbtitleunshift).attr("transform",u(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select("."+A.cbaxis),mt=0,gt=0;function vt(n,i){var a={propContainer:it,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:D._dfltTitle.colorbar,containerGroup:t.select("."+A.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+o+",."+o+"-math-group").remove(),m.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&("top"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt-K)+3+.75*pt),"bottom"===j&&(t=P+R.l+R.w*O,e=I+R.t+R.h*(1-rt)-3-.25*pt),"right"===j&&(e=I+R.t+R.h*z+3+.75*pt,t=P+R.l+R.w*rt),vt(it._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select("."+A.cbtitle),f=l.select("text"),h=[-M/2,M/2],d=l.select(".h"+it._id+"title-math-group").node(),m=15.6;if(f.node()&&(m=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),gt=a.width,(mt=a.height)>m&&(h[1]-=(mt-m)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),gt=a.width,mt=a.height),o){if(mt){if(mt+=5,"top"===j)it.domain[1]-=mt/R.h,h[1]*=-1;else{it.domain[0]+=mt/R.h;var v=g.lineCount(f);h[1]+=(1-v)*m}l.attr("transform",u(h[0],h[1])),it.setScale()}}else gt&&("right"===j&&(it.domain[0]+=(gt+pt/2)/R.w),l.attr("transform",u(h[0],h[1])),it.setScale())}t.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",o?u(0,Math.round(R.h*(1-it.domain[1]))):u(Math.round(R.w*it.domain[0]),0)),dt.attr("transform",o?u(0,Math.round(-R.t)):u(Math.round(-R.l),0));var y=t.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Y);y.enter().append("rect").classed(A.cbfill,!0).style("stroke","none"),y.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var s=[0===a?U[0]:(Y[a]+Y[a-1])/2,a===Y.length-1?U[1]:(Y[a]+Y[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=c.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",Q).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max(Z,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var u=H(t).replace("e-","");l.attr("fill",i(u).toHexString())}}));var b=t.select("."+A.cblines).selectAll("path."+A.cbline).data(B.color&&B.width?W:[]);b.enter().append("path").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=Q,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr("d","M"+(o?e+","+r:r+","+e)+(o?"h":"v")+Z).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll("g."+it._id+"tick,path").remove();var _=Q+Z+(M||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:"inside"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if("right"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,"bottom"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf("inside")?it.tickfont.size:0)+("intside"!==it.ticks&&e.ticklen||0)),"top"===j){var l=N.text.split("
").length;i=R.t+R.h*a+10-Z-w*pt*l}vt((o?"h":"v")+it._id+"title",{avoid:{selection:n.select(r).selectAll("g."+it._id+"tick"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?D.width:D.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=Z+M/2;-1===ht.indexOf("inside")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ut=ft.select("text");var c=0,f=o&&"top"===j,m=!o&&"right"===j,g=0;if(ut.node()&&!ut.classed(A.jsPlaceholder)){var y,x=ft.select(".h"+it._id+"title-math-group").node();x&&(o&&at||!o&&!at)?(c=(n=p.bBox(x)).width,y=n.height):(c=(n=p.bBox(ft.node())).right-R.l-(o?Q:nt),y=n.bottom-R.t-(o?nt:Q),o||"top"!==j||(s+=n.height,g=n.height)),m&&(ut.attr("transform",u(c/2+pt/2,0)),c*=2),s=Math.max(s,o?c:y)}var b=2*(o?P:I)+s+S+M/2,w=0;!o&&N.text&&"bottom"===C&&z<=0&&(b+=w=b/2,g+=w),D._hColorbarMoveTitle=w,D._hColorbarMoveCBTitle=g;var F=S+M;t.select("."+A.cbbg).attr("x",(o?Q:nt)-F/2-(o?P:0)).attr("y",(o?nt:Q)-(o?J:I+g-w)).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style("stroke-width",S);var B=m?Math.max(c-10,0):0;if(t.selectAll("."+A.cboutline).attr("x",(o?Q:nt+P)+B).attr("y",(o?nt+I-J:Q)+(f?mt:0)).attr(o?"width":"height",Math.max(Z,2)).attr(o?"height":"width",Math.max(J-(o?2*I+mt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":M}),t.attr("transform",u(R.l-(o?$*b:0),R.t-(o?0:(1-tt)*b-g))),!o&&(S||i(E).getAlpha()&&!i.equals(D.paper_bgcolor,E))){var U=dt.selectAll("text"),V=U[0].length,H=t.select("."+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+O-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var Y={},W=T[L],X=k[L],K=T[C],et=k[C],rt=b-Z;o?("pixels"===h?(Y.y=z,Y.t=J*K,Y.b=J*et):(Y.t=Y.b=0,Y.yt=z+l*K,Y.yb=z-l*et),"pixels"===_?(Y.x=O,Y.l=b*W,Y.r=b*X):(Y.l=rt*W,Y.r=rt*X,Y.xl=O-v*W,Y.xr=O+v*X)):("pixels"===h?(Y.x=O,Y.l=J*W,Y.r=J*X):(Y.l=Y.r=0,Y.xl=O+l*W,Y.xr=O-l*X),"pixels"===_?(Y.y=1-z,Y.t=b*K,Y.b=b*et):(Y.t=rt*K,Y.b=rt*et,Y.yt=z-v*K,Y.yb=z+v*et)),a.autoMargin(r,e._id,Y)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,c=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,o){t.attr("transform",n+u(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/c.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/c.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{"../../constants/alignment":483,"../../lib":515,"../../lib/extend":505,"../../lib/setcursor":536,"../../lib/svg_text_utils":541,"../../plots/cartesian/axes":566,"../../plots/cartesian/axis_defaults":568,"../../plots/cartesian/layout_attributes":579,"../../plots/cartesian/position_defaults":582,"../../plots/plots":628,"../../registry":647,"../color":367,"../colorscale/helpers":378,"../dragelement":386,"../drawing":389,"../titles":476,"./constants":369,"@plotly/d3":58,tinycolor2:313}],372:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":515}],373:[function(t,e,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:t("./attributes"),supplyDefaults:t("./defaults"),draw:t("./draw").draw,hasColorbar:t("./has_colorbar")}},{"./attributes":368,"./defaults":370,"./draw":371,"./has_colorbar":372}],374:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),i=t("../../lib/regex").counter,a=t("../../lib/sort_object_keys"),o=t("./scales.js").scales;a(o);function s(t){return"`"+t+"`"}e.exports=function(t,e){t=t||"";var r,a=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),c="showScaleDflt"in e?e.showScaleDflt:"z"===a,u="string"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||"",h=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:"z",c:"color"}[a]));var p=a+"auto",d=a+"min",m=a+"max",g=a+"mid",v=(s(h+p),s(h+d),s(h+m),{});v[d]=v[m]=void 0;var y={};y[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},x[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":532,"../../lib/sort_object_keys":538,"../colorbar/attributes":368,"./scales.js":382}],375:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./helpers").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,m=f.mid,g=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=g():h&&(p=u._colorAx&&n(p)?Math.min(p,g()):g()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==m&&(d-m>m-p?p=m-(d-m):d-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},{"../../lib":515,"./helpers":378,"fast-isnumeric":190}],376:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./helpers").hasColorscale,a=t("./helpers").extractOpts;e.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],384:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":515}],385:[function(t,e,r){"use strict";r.selectMode=function(t){return"lasso"===t||"select"===t},r.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},r.openMode=function(t){return"drawline"===t||"drawopenpath"===t},r.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},r.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],386:[function(t,e,r){"use strict";var n=t("mouse-event-offset"),i=t("has-hover"),a=t("has-passive-events"),o=t("../../lib").removeElement,s=t("../../plots/cartesian/constants"),l=e.exports={};l.align=t("./align"),l.getCursor=t("./cursor");var c=t("./unhover");function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,m,g=t.gd,v=1,y=g._context.doubleClickDelay,x=t.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!m){var r;try{r=new MouseEvent("click",e)}catch(t){var n=f(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=u},{"../../lib":515,"../../plots/cartesian/constants":573,"./align":383,"./cursor":384,"./unhover":387,"has-hover":228,"has-passive-events":229,"mouse-event-offset":242}],387:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=t("../../lib/throttle"),a=t("../../lib/dom").getGraphDiv,o=t("../fx/constants"),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},{"../../lib/dom":503,"../../lib/events":504,"../../lib/throttle":542,"../fx/constants":401}],388:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},r.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},{}],389:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=i.numberFormat,o=t("fast-isnumeric"),s=t("tinycolor2"),l=t("../../registry"),c=t("../color"),u=t("../colorscale"),f=i.strTranslate,h=t("../../lib/svg_text_utils"),p=t("../../constants/xmlns_namespaces"),d=t("../../constants/alignment").LINE_SPACING,m=t("../../constants/interactions").DESELECTDIM,g=t("../../traces/scatter/subtypes"),v=t("../../traces/scatter/make_bubble_size_func"),y=t("../../components/fx/helpers").appendArrayPointValue,x=e.exports={};function b(t,e,r){var n=e.fillpattern,i=n&&x.getPatternAttr(n.shape,0,"");if(i){var a=x.getPatternAttr(n.bgcolor,0,null),o=x.getPatternAttr(n.fgcolor,0,null),s=n.fgopacity,l=x.getPatternAttr(n.size,0,8),u=x.getPatternAttr(n.solidity,0,.3),f=e.uid;x.pattern(t,"point",r,f,i,l,u,void 0,n.fillmode,a,o,s)}else e.fillcolor&&t.call(c.fill,e.fillcolor)}x.font=function(t,e,r,n){i.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(c.fill,n)},x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},x.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,c=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";c.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(c.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());b(t,((r.data()[0]||[])[0]||{}).trace||{},e)},x.fillGroupStyle=function(t,e){t.style("stroke-width",0).each((function(t){var r=n.select(this);t[0].trace&&b(r,t[0].trace,e)}))};var _=t("./symbol_defs");x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(_).forEach((function(t){var e=_[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,x.symbolBackOffs[r]=e.backoff||0,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(x.symbolNoFill[r]=!0)}));var w=x.symbolNames.length;function T(t,e,r,n){var i=t%100;return x.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var k={x1:1,x2:0,y1:0,y2:0},A={x1:0,x2:0,y1:1,y2:0},M=a("~f"),S={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:k},horizontalreversed:{node:"linearGradient",attrs:k,reversed:!0},vertical:{node:"linearGradient",attrs:A},verticalreversed:{node:"linearGradient",attrs:A,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var u=o.length,f=S[a],h=new Array(u),p=0;p=100;var f=rt(t,r),h=G(t,r);e.attr("d",T(u,l,f,h))}var p,d,m,g=!1;if(t.so)m=s.outlierwidth,d=s.outliercolor,p=o.outliercolor;else{var v=(s||{}).width;m=(t.mlw+1||v+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,d="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(s.color)?c.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(p=c.defaultLine,g=!0),p="mc"in t?t.mcc=n.markerScale(t.mc):o.color||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(c.stroke,p).style({"stroke-width":(m||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:m)+"px");var y=o.gradient,b=t.mgt;b?g=!0:b=y&&y.type,i.isArrayOrTypedArray(b)&&(b=b[0],S[b]||(b=0));var _=o.pattern,w=_&&x.getPatternAttr(_.shape,t.i,"");if(b&&"none"!==b){var k=t.mgc;k?g=!0:k=y.color;var A=r.uid;g&&(A+="-"+t.i),x.gradient(e,a,A,b,[[0,k],[1,p]],"fill")}else if(w){var M=x.getPatternAttr(_.bgcolor,t.i,null),E=x.getPatternAttr(_.fgcolor,t.i,null),L=_.fgopacity,C=x.getPatternAttr(_.size,t.i,8),P=x.getPatternAttr(_.solidity,t.i,.3),I=t.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity),O=r.uid;I&&(O+="-"+t.i),x.pattern(e,"point",a,O,w,C,P,t.mcc,_.fillmode,M,E,L)}else c.fill(e,p);m&&c.stroke(e,d)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,""),e.lineScale=x.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?v(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},c=a.opacity,u=o.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(i.isArrayOrTypedArray(c)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?u:e:p?f:m*e});var d=a.color,g=o.color,v=s.color;(g||v)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?g||e:v||e});var y=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:u||(l?e:c.addOpacity(e,m))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){c.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr("d",T(x.symbolNumber(a),o,rt(n,e),G(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),c=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(c||0===c){if(s){var u=e._module.formatLabels,f=u?u(t,e,l):{},p={};y(p,e,t.i);var d=e._meta||{};c=i.texttemplateString(c,f,l._d3locale,p,t,d)}var m=t.tp||e.textposition,g=C(t,e),v=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,g,v).text(c).call(h.convertToTspans,r).call(L,m,g,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=C(t,e);c.fill(i,a);var u=l.traceIs(e,"bar-like");L(i,o,s,t.mrc2||t.mrc,u)}))}};var P,I;function O(t,e,r){return r&&(t=N(t)),e?D(t[1]):z(t[0])}function z(t){var e=n.round(t,2);return P=e,e}function D(t){var e=n.round(t,2);return I=e,e}function R(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,f=(c*c*a-l*l*s)*n,h=3*c*(l+c),p=3*l*(l+c);return[[z(e[0]+(h&&u/h)),D(e[1]+(h&&f/h))],[z(e[0]-(p&&u/p)),D(e[1]-(p&&f/p))]]}x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=c||b>=f&&b<=c)&&(_<=h&&_>=u||_>=h&&_<=u)&&(t=[b,_])}return t}x.steps=function(t){var e=F[t]||B;return function(t){for(var r="M"+z(t[0][0])+","+D(t[0][1]),n=t.length,i=1;i=1e4&&(x.savedBBoxes={},j=0),r&&(x.savedBBoxes[r]=g),j++,i.extendFlat({},g)},x.setClipUrl=function(t,e,r){t.attr("clip-path",V(e,r))},x.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=f(e,r)).trim(),t[i]("transform",a),a},x.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},x.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var H=/\s*sc.*/;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var q=/translate\([^)]*\)\s*$/;function G(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}x.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.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(q);t=1===e&&1===r?[]:[f(o,s),"scale("+e+","+r+")",f(-o,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},x.getMarkerStandoff=G;var Y,W,Z,X,J,K,Q=Math.atan2,$=Math.cos,tt=Math.sin;function et(t,e){var r=e[0],n=e[1];return[r*$(t)-n*tt(t),r*tt(t)+n*$(t)]}function rt(t,e){var r,n,i=t.ma;void 0===i&&(i=e.marker.angle||0);var a=e.marker.angleref;if("previous"===a||"north"===a){if(e._geo){var s=e._geo.project(t.lonlat);r=s[0],n=s[1]}else{var l=e._xA,c=e._yA;if(!l||!c)return 90;r=l.c2p(t.x),n=c.c2p(t.y)}if(e._geo){var u,f=t.lonlat[0],h=t.lonlat[1],p=e._geo.project([f,h+1e-5]),d=e._geo.project([f+1e-5,h]),m=Q(d[1]-n,d[0]-r),g=Q(p[1]-n,p[0]-r);if("north"===a)u=i/180*Math.PI;else if("previous"===a){var v=f/180*Math.PI,y=h/180*Math.PI,x=Y/180*Math.PI,b=W/180*Math.PI,_=x-v,w=$(b)*tt(_),T=tt(b)*$(y)-$(b)*tt(y)*$(_);u=-Q(w,T)-Math.PI,Y=f,W=h}var k=et(m,[$(u),0]),A=et(g,[tt(u),0]);i=Q(k[1]+A[1],k[0]+A[0])/Math.PI*180,"previous"!==a||K===e.uid&&t.i===J+1||(i=null)}if("previous"===a&&!e._geo)if(K===e.uid&&t.i===J+1&&o(r)&&o(n)){var M=r-Z,S=n-X,E=e.line&&e.line.shape||"",L=E.slice(E.length-1);"h"===L&&(S=0),"v"===L&&(M=0),i+=Q(S,M)/Math.PI*180+90}else i=null}return Z=r,X=n,J=t.i,K=e.uid,i}x.getMarkerAngle=rt},{"../../components/fx/helpers":403,"../../constants/alignment":483,"../../constants/interactions":490,"../../constants/xmlns_namespaces":492,"../../lib":515,"../../lib/svg_text_utils":541,"../../registry":647,"../../traces/scatter/make_bubble_size_func":953,"../../traces/scatter/subtypes":961,"../color":367,"../colorscale":379,"./symbol_defs":390,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:313}],390:[function(t,e,r){"use strict";var n,i,a,o,s=t("parse-svg-path"),l=t("@plotly/d3").round,c=Math.sqrt(2),u=Math.sqrt(3),f=Math.PI,h=Math.cos,p=Math.sin;function d(t){return null===t}function m(t,e,r){if(!(t&&t%360!=0||e))return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=h(t),i=p(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var c=t/180*f,u=0,d=0,m=s(r),g="",v=0;v0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var m=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var g=n.select(this).selectAll("g.errorbar").data(e,f);if(g.exit().remove(),e.length){p.visible||g.selectAll("path.xerror").remove(),d.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var v=g.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(g,r.layerClipId,t),g.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0)));void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0)));return n}(t,l,c);if(!m||t.vis){var a,o=e.select("path.yerror");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(a+="m-"+f+",0h"+2*f),!o.size()?o=e.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr("d",a)}else o.remove();var h=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var g=(p.copy_ystyle?d:p).width;a="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(a+="m0,-"+g+"v"+2*g),!h.size()?h=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr("d",a)}else h.remove()}}))}}))}},{"../../traces/scatter/subtypes":961,"../drawing":389,"@plotly/d3":58,"fast-isnumeric":190}],397:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../color");e.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},{"../color":367,"@plotly/d3":58}],398:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("./layout_attributes").hoverlabel,a=t("../../lib/extend").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":505,"../../plots/font_attributes":594,"./layout_attributes":408}],399:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry");function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V="xval"in e?v.flat(l,e.xval):v.p2c(_,at),H="yval"in e?v.flat(l,e.yval):v.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn("Fx.hover failed",e,t),d.unhoverRaw(t,e)}var ct=1/0;function ut(t,r){for(G=0;Gtt&&(et.splice(0,tt),ct=et[0].distance),y&&0!==B&&0===et.length){$.distance=B,$.index=!1;var f=W._module.hoverPoints($,K,Q,"closest",{hoverLayer:u._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(d.length){var m=d[0];i(m.x0)&&i(m.y0)&&(h=ht(m),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var g=f.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(g.length){var x=g[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;Mt--)Ct(et[Mt]);et=St,gt()}var Pt=t._hoverdata,It=[],Ot=j(t),zt=U(t);for(q=0;q1||et.length>1)||"closest"===P&&it&&et.length>1,Wt=p.combine(u.plot_bgcolor||p.background,u.paper_bgcolor),Zt=I(et,{gd:t,hovermode:P,rotateLabels:Yt,bgColor:Wt,container:u._hoverlayer,outerContainer:u._paper.node(),commonLabelOpts:u.hoverlabel,hoverdistance:u.hoverdistance});v.isUnifiedHover(P)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function m(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var c=0;for(o=0;oe.pmax&&c++;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,c--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}t.each((function(t){var n=t[e],i="x"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(g.push.apply(g,v),p.splice(o+1,1),c=0,s=g.length-1;s>=0;s--)c+=g[s].dp;for(a=c/g.length,s=g.length-1;s>=0;s--)g[s].dp-=a;n=!1}else o++}p.forEach(m)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Zt,Yt?"xa":"ya",u),z(Zt,Yt,u._invScaleX,u._invScaleY));if(s&&s.tagName){var Xt=g.getComponentMethod("annotations","hasClickToShow")(t,It);f(n.select(s),Xt?"pointer":"")}if(!s||a||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Pt))return;Pt&&t.emit("plotly_unhover",{event:e,points:Pt});t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H})}(t,e,r,a,s)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=I(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,c=t.eventData;if(c){var u=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),m=t.trace;if(g.traceIs(m,"gl3d")){var v=i._fullLayout[m.scene]._scene.container,y=v.offsetLeft,x=v.offsetTop;u+=y,f+=y,h+=x,d+=x}c.bbox={x0:u+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(c.bbox)}else c=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:c}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,c=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function I(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,m=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||y.HOVERFONT,k=e.fontSize||y.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),I=P+"Label",z=A[I];if(void 0===z&&"multicategory"===E.type)for(var D=0;Di.width-b?(g=i.width-b,e.attr("d","M"+(b-M)+",0L"+b+","+x+M+"v"+x+(2*S+y.height)+"H-"+b+"V"+x+M+"H"+(b-2*M)+"Z")):e.attr("d","M0,0L"+M+","+x+M+"H"+(S+y.width/2)+"v"+x+(2*S+y.height)+"H-"+(S+y.width/2)+"V"+x+M+"H-"+M+"Z")}else{var _,C,P;"right"===L.side?(_="start",C=1,P="",g=E._offset+E._length):(_="end",C=-1,P="-",g=E._offset),v=L._offset+(A.y0+A.y1)/2,l.attr("text-anchor",_),e.attr("d","M0,0L"+P+M+","+M+"V"+(S+y.height/2)+"h"+P+(2*S+y.width)+"V-"+(S+y.height/2)+"H"+P+M+"V-"+M+"Z");var I,O=y.height/2,D=F-y.top-O,R="clip"+i._uid+"commonlabel"+L._id;if(g=0?st:lt+ft=0?lt:xt+ft=0?at:ot+ht=0?ot:bt+ht=0,"top"!==t.idealAlign&&G||!Y?G?(I+=R/2,t.anchor="start"):t.anchor="middle":(I-=R/2,t.anchor="end");else if(t.pos=I,G=P+D/2+W<=B,Y=P-D/2-W>=0,"left"!==t.idealAlign&&G||!Y)if(G)P+=D/2,t.anchor="start";else{t.anchor="middle";var Z=W/2,X=P+Z-B,J=P-Z;X>0&&(P-=X),J<0&&(P+=-J)}else P-=D/2,t.anchor="end";w.attr("text-anchor",t.anchor),E&&A.attr("text-anchor",t.anchor),e.attr("transform",s(P,I)+(c?l(_):""))})),_t}function O(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var c=r.charAt(0),u="x"===c?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[c+"Label"]===i?l=t[u+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[c+"Label"]!==i&&(h[c+"other"]=h[c+"Val"],h[c+"otherLabel"]=h[c+"Label"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),""}))}return[l,s]}function z(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select("text.nums"),s=t.anchor,l="end"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(M+S),p=f+c*(t.txwidth+S),d=0,m=t.offset,g="middle"===s;g&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(m*=-A,d=t.offset*k),r.select("path").attr("d",g?"M-"+a(t.bx/2+t.tx2width/2)+","+o(m-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(l*M+d)+","+o(M+m)+"v"+o(t.by/2-M)+"h"+a(l*t.bx)+"v-"+o(t.by)+"H"+a(l*M+d)+"V"+o(m-M)+"Z");var v=d+f,y=m+t.ty0-t.by/2+S,x=t.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==s?(i.attr("text-anchor","start"),v=g?-t.bx/2-t.tx2width/2+S:-t.bx-S):"right"===x&&"end"!==s&&(i.attr("text-anchor","end"),v=g?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select("text.name").call(u.positionText,a(p+c*S+d),o(m+t.ty0-t.by/2+S)),r.select("rect").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(m-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function D(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:m.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:m.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=m.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+m.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=m.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+m.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+h,"y"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===p.indexOf("y")&&(t.yLabel=void 0),-1===p.indexOf("z")&&(t.zLabel=void 0),-1===p.indexOf("text")&&(t.text=void 0),-1===p.indexOf("name")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var g,v,y=e.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(g=c.pointerX,v=c.pointerY):(g=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=m.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=g),-1!==w.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T,stroke:k,"stroke-dasharray":h.dashStyle(i.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==i.side?T:-T),cy:v,r:T,fill:k}).classed("spikeline",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,"cursor"===n.spikesnap?(E=c.pointerX,L=c.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,I,O=a.readability(C.color,d)<1.5?p.contrast(d):C.color,z=n.spikemode,D=n.spikethickness,R=n.spikecolor||O,F=m.getPxPosition(t,n);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(P=F,I=L),-1!==z.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,I=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:I,"stroke-width":D,stroke:R,"stroke-dasharray":h.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:I,"stroke-width":D+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?D:-D),r:D,fill:R}).classed("spikeline",!0)}}}function F(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function B(t,e){return u.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function N(t,e,r){var n=e[t+"a"],i=e[t+"Val"],a=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=e.trace[t+"periodalignment"];if(o){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var c=s[t+"End"];void 0===c&&(c=s[t]);var u=c-l;"end"===o?i+=u:"middle"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,c=o.apply3DTransform(r._invTransform)(i,a),u=o.apply3DTransform(r._invTransform)(s,l),f=c[0],h=c[1],p=u[0],d=u[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},{"../../lib":515,"../../lib/events":504,"../../lib/override_cursor":526,"../../lib/svg_text_utils":541,"../../plots/cartesian/axes":566,"../../registry":647,"../color":367,"../dragelement":386,"../drawing":389,"../legend/defaults":419,"../legend/draw":420,"./constants":401,"./helpers":403,"@plotly/d3":58,"fast-isnumeric":190,tinycolor2:313}],405:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("./helpers").isUnifiedHover;e.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},{"../../lib":515,"../color":367,"./helpers":403}],406:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r("clickmode"),r("hovermode")}},{"../../lib":515,"./layout_attributes":408}],407:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=t("../dragelement"),o=t("./helpers"),s=t("./layout_attributes"),l=t("./hover");e.exports={moduleType:"component",name:"fx",constants:t("./constants"),schema:{layout:s},attributes:t("./attributes"),layoutAttributes:s,supplyLayoutGlobalDefaults:t("./layout_global_defaults"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:t("./click")}},{"../../lib":515,"../dragelement":386,"./attributes":398,"./calc":399,"./click":400,"./constants":401,"./defaults":402,"./helpers":403,"./hover":404,"./layout_attributes":408,"./layout_defaults":409,"./layout_global_defaults":410,"@plotly/d3":58}],408:[function(t,e,r){"use strict";var n=t("./constants"),i=t("../../plots/font_attributes"),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,e.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"},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:a,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},{"../../plots/font_attributes":594,"./constants":401}],409:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes"),a=t("./hovermode_defaults"),o=t("./hoverlabel_defaults");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("geo"),c=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===c||s&&l&&2===c)&&(e.dragmode="pan"),o(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},{"../../lib":515,"./hoverlabel_defaults":405,"./hovermode_defaults":406,"./layout_attributes":408}],410:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./hoverlabel_defaults"),a=t("./layout_attributes");e.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},{"../../lib":515,"./hoverlabel_defaults":405,"./layout_attributes":408}],411:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../lib/regex").counter,a=t("../../plots/domain").attributes,o=t("../../plots/cartesian/constants").idRegex,s=t("../../plot_api/plot_template"),l={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:[i("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.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:a({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 c(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function u(t,e,r,n,i,a){var o=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),c=s[0],u=(s[1]-c)/(i-o),f=u*(1-o),h=0;h1){if(!h&&!p&&!d)"independent"===k("pattern")&&(h=!0);g._hasSubplotGrid=h;var x,b,_="top to bottom"===k("roworder"),w=h?.2:.1,T=h?.3:.1;m&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),g._domains={x:u("x",k,w,x,y),y:u("y",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,m=r.rows,g=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(m);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p("uirevision",e.uirevision),!1!==_)){p("bgcolor",e.paper_bgcolor),p("bordercolor"),p("borderwidth");var w,T,k,A=i.coerceFont(p,"font",e.font),M="h"===p("orientation");if(M?(w=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(T=1.1,k="bottom"):(T=-.1,k="top")):(w=1.02,T=1,k="auto"),p("traceorder",x),c.isGrouped(e.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",w),p("xanchor"),p("y",T),p("yanchor",k),p("valign"),i.noneOrAll(f,h,["x","y"]),p("title.text")){p("title.side",M?"left":"top");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,"title.font",S)}}}},{"../../lib":515,"../../plot_api/plot_template":555,"../../plots/attributes":562,"../../plots/layout_attributes":619,"../../registry":647,"./attributes":417,"./helpers":423}],420:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),f=t("../../lib/svg_text_utils"),h=t("./handle_click"),p=t("./constants"),d=t("../../constants/alignment"),m=d.LINE_SPACING,g=d.FROM_TL,v=d.FROM_BR,y=t("./get_legend_data"),x=t("./style"),b=t("./helpers");function _(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return"fraction"===a?e._maxWidth*o:r+(o||i)}function w(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};if(a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l))if(1===n)e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&h(r,t,n)}}function T(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,u=o.traceIs(l,"pie-like"),h=!r._inHover&&e._context.edits.legendText&&!u,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=u?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var m=i.ensureSingle(t,"text","legendtext");m.attr("text-anchor","start").call(c.font,a).text(h?k(n,d):n);var g=r.itemwidth+2*p.itemGap;f.positionText(m,g,0),h?m.call(f.makeEditable,{gd:e,text:n}).call(M,t,e,r).on("edit",(function(n){this.text(k(n,d)).call(M,t,e,r);var a=s.trace._fullInput||{},c={};if(o.hasTransform(a,"groupby")){var u=o.getTransformIndices(a,"groupby"),f=u[u.length-1],h=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");h.set(s.trace._group,n),c=h.constructUpdate()}else c.name=n;return o.call("_guiRestyle",e,c,l.index)})):M(m,t,e,r)}function k(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function A(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,"rect","legendtoggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(u.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(s.on("mousedown",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),w(e,r,t,o,n.event)}})))}function M(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(!r._inHover&&i&&!i.trace.showlegend)return void t.remove();var a=t.select("g[class*=math-group]"),o=a.node();r||(r=e._fullLayout.legend);var s,l=r.borderwidth;s=1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font;var u,h,d=s.size*m;if(o){var g=c.bBox(o);u=g.height,h=g.width,1===n?c.setTranslate(a,l,l+.75*u):c.setTranslate(a,0,.25*u)}else{var v=t.select(1===n?".legendtitletext":".legendtext"),y=f.lineCount(v),x=v.node();if(u=d*y,h=x?c.bBox(x).width:0,1===n)"left"===r.title.side&&(h+=2*p.itemGap),f.positionText(v,l+p.titlePad,l+d);else{var b=2*p.itemGap+r.itemwidth;i.groupTitle&&(b=p.itemGap,h-=r.itemwidth),f.positionText(v,b,-d*((y-1)/2-.3))}}1===n?(r._titleWidth=h,r._titleHeight=u):(i.lineHeight=d,i.height=Math.max(u,16)+3,i.width=h)}(e,r,n,i)}))}function S(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function E(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}e.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h="legend"+f._uid,d=e._inHover;d?(r=e.layer,h+="-hover"):r=f._infolayer;if(!r)return;t._legendMouseDownTime||(t._legendMouseDownTime=0);if(d){if(!e.entries)return;s=y(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&y(t.calcdata,e)}var m=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(".legend").remove(),f._topdefs.select("#"+h).remove(),a.autoMargin(t,"legend");var k=i.ensureSingle(r,"g","legend",(function(t){d||t.attr("pointer-events","all")})),L=i.ensureSingleById(f._topdefs,"clipPath",h,(function(t){t.append("rect")})),C=i.ensureSingle(k,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));C.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var P=i.ensureSingle(k,"g","scrollbox"),I=e.title;if(e._titleWidth=0,e._titleHeight=0,I.text){var O=i.ensureSingle(P,"text","legendtitletext");O.attr("text-anchor","start").call(c.font,I.font).text(I.text),M(O,P,t,e,1)}else P.selectAll(".legendtitletext").remove();var z=i.ensureSingle(k,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),D=P.selectAll("g.groups").data(s);D.enter().append("g").attr("class","groups"),D.exit().remove();var R=D.selectAll("g.traces").data(i.identity);R.enter().append("g").attr("class","traces"),R.exit().remove(),R.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==m.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(T,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(A,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u="fraction"===i.entrywidthmode,f=i.borderwidth,h=2*f,d=p.itemGap,m=i.itemwidth+2*d,g=2*(f+d),v=E(i),y=i.y<0||0===i.y&&"top"===v,x=i.y>1||1===i.y&&"bottom"===v,w=i.tracegroupgap,T={};i._maxHeight=Math.max(y||x?a.height/2:o.h,30);var k=0;i._width=0,i._height=0;var A=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,f+A[0],f+A[1]+i._height+e/2+d),i._height+=e,i._width=Math.max(i._width,t[0].width)})),k=m+i._width,i._width+=d+m+h,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var M=S(i),L=i.x<0||0===i.x&&"right"===M,C=i.x>1||1===i.x&&"left"===M,P=x||y,I=a.width/2;i._maxWidth=Math.max(L?P&&"left"===M?o.l+o.w:I:C?P&&"right"===M?o.r+o.w:I:o.w,2*m);var O=0,z=0;r.each((function(t){var e=_(t,i,m);O=Math.max(O,e),z+=e})),k=null;var D=0;if(l){var R=0,F=0,B=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=_(r,i,m),a=r[0].height;c.setTranslate(this,A[0],A[1]+f+d+a/2+e),e+=a,t=Math.max(t,n),T[r[0].trace.legendgroup]=t}));var r=t+d;F>0&&r+f+F>i._maxWidth?(D=Math.max(D,F),F=0,B+=R+w,R=e):R=Math.max(R,e),c.setTranslate(this,F,B),F+=r})),i._width=Math.max(D,F)+f,i._height=B+R+g}else{var N=r.size(),j=z+h+(N-1)*d=i._maxWidth&&(D=Math.max(D,q),V=0,H+=U,i._height+=U,U=0),c.setTranslate(this,A[0]+f+V,A[1]+f+H+e/2+d),q=V+r+d,V+=n,U=Math.max(U,e)})),j?(i._width=V+h,i._height=U+g):(i._width=Math.max(D,q)+h,i._height+=U+g)}}i._width=Math.ceil(Math.max(i._width+A[0],i._titleWidth+2*(f+p.titlePad))),i._height=Math.ceil(Math.max(i._height+A[1],i._titleHeight+2*(f+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var G=t._context.edits,Y=G.legendText||G.legendPosition;r.each((function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,a=t[0].trace.legendgroup,o=_(t,i,m);l&&""!==a&&(o=T[a]);var f=Y?m:k||o;s||u||(f+=d/2),c.setRect(e,0,-r/2,f,r)}))}(t,D,R,e)},function(){var s,u,m,y,x=f._size,b=e.borderwidth;if(!d){if(function(t){var e=t._fullLayout.legend,r=S(e),n=E(e);return a.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*g[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*g[n]})}(t))return;var _=x.l+x.w*e.x-g[S(e)]*e._width,T=x.t+x.h*(1-e.y)-g[E(e)]*e._effHeight;if(f.margin.autoexpand){var A=_,M=T;_=i.constrain(_,0,f.width-e._width),T=i.constrain(T,0,f.height-e._effHeight),_!==A&&i.log("Constrain legend.x to make legend fit inside graph"),T!==M&&i.log("Constrain legend.y to make legend fit inside graph")}c.setTranslate(k,_,T)}if(z.on(".drag",null),k.on("wheel",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),C.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(P,0,0),L.select("rect").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(P,h,t),c.setRect(z,0,0,0,0),delete e._scrollY}else{var O,D,R,F=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),B=e._effHeight-F-2*p.scrollBarMargin,N=e._height-e._effHeight,j=B/N,U=Math.min(e._scrollY||0,N);C.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),L.select("rect").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+U}),c.setClipUrl(P,h,t),q(U,F,j),k.on("wheel",(function(){q(U=i.constrain(e._scrollY+n.event.deltaY/B*N,0,N),F,j),0!==U&&U!==N&&n.event.preventDefault()}));var V=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;O="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,R=U})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(D="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,q(U=function(t,e,r){var n=(r-e)/j+t;return i.constrain(n,0,N)}(R,O,D),F,j))}));z.call(V);var H=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(O=t.changedTouches[0].clientY,R=U)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(D=t.changedTouches[0].clientY,q(U=function(t,e,r){var n=(e-r)/j+t;return i.constrain(n,0,N)}(R,O,D),F,j))}));P.call(H)}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(P,0,-r),c.setRect(z,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),L.select("rect").attr("y",b+r)}t._context.edits.legendPosition&&(k.classed("cursor-move",!0),l.init({element:k.node(),gd:t,prepFn:function(){var t=c.getTranslate(k);m=t.x,y=t.y},moveFn:function(t,r){var n=m+t,i=y+r;c.setTranslate(k,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),u=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==u&&o.call("_guiRelayout",t,{"legend.x":s,"legend.y":u})},clickFn:function(e,n){var i=r.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom}));i.size()>0&&w(t,k,i,e,n)}}))}],t)}(t,e)}},{"../../constants/alignment":483,"../../lib":515,"../../lib/events":504,"../../lib/svg_text_utils":541,"../../plots/plots":628,"../../registry":647,"../color":367,"../dragelement":386,"../drawing":389,"./constants":418,"./get_legend_data":421,"./handle_click":422,"./helpers":423,"./style":425,"@plotly/d3":58}],421:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),c={},u=[],f=!1,h={},p=0,d=0;function m(t,r){if(""!==t&&i.isGrouped(e))-1===u.indexOf(t)?(u.push(t),f=!0,c[t]=[r]):c[t].push(r);else{var n="~~i"+p;u.push(n),c[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}e.exports=function(t,e,r){var v=e._fullLayout;r||(r=v.legend);var y="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return y?n:Math.min(i,r)};function T(t,a,o){var u=t[0].trace,f=u.marker||{},h=f.line||{},p=o?u.visible&&u.type===o:i.traceIs(u,"bar"),d=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(p?[t]:[]);d.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var p=a.mcc;if(!r._inHover&&"mc"in a){var d=c(f),m=d.mid;void 0===m&&(m=(d.max+d.min)/2),p=s.tryColorscale(f,"")(m)}var v=p||a.mc||f.color,y=f.pattern,x=y&&s.getPatternAttr(y.shape,0,"");if(x){var b=s.getPatternAttr(y.bgcolor,0,null),_=s.getPatternAttr(y.fgcolor,0,null),T=y.fgopacity,k=g(y.size,8,10),A=g(y.solidity,.5,1),M="legend-"+u.uid;i.call(s.pattern,"legend",e,M,x,k,A,p,y.fillmode,b,_,T)}else i.call(l.fill,v);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=w(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var m=a.minExtend(o,{trace:d});f(c,m,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if("middle"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr("transform",o(0,u))}else i.attr("transform",null);i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["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"]],r=!1;break;case"streamtube":o=[["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"]],r=!1;break;case"surface":o=[["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"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,m=h.reversescale;if(p){if(!r){var g=p.length;u=0===o?p[m?g-1:0][1]:1===o?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr("d",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(m,"radial"===r),p,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,"waterfall")}var a=[];e.visible&&r&&(a=t[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 o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,"funnel")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:y?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){k(t,this,"funnelarea")})).each((function(t){k(t,this,"pie")})).each((function(t){var r,i,o=m(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,g=o.anyFill,v=o.anyLine,y=t[0],b=y.trace,_=c(b),T=_.colorscale,k=_.reversescale,A=u.hasMarkers(b)||!g?"M5,0":v?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||p?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e);else{var r="legendfill-"+b.uid;s.gradient(t,e,r,d(k),T,"fill")}})),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(y,{trace:i})]}var L=M.select(".legendlines").selectAll("path").data(f||h?[r]:[]);L.enter().append("path").classed("js-line",!0),L.exit().remove(),L.attr("d",A+(h?"l"+x+",0.0001":"h"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,"stroke")}})})).each((function(t){var r,i,o=m(t),l=o.anyFill,c=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,g=!h&&!c&&!l&&u.hasText(d);function v(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(y&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||g||f){var b={},w={};if(h){b.mc=v("marker.color",x),b.mx=v("marker.symbol",x),b.mo=v("marker.opacity",a.mean,[.2,1]),b.mlc=v("marker.line.color",x),b.mlw=v("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=v("marker.size",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:v("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=v("textposition",x),b.ts=10,b.tc=v("textfont.color",x),b.tf=v("textfont.family",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select("g.legendpoints"),A=k.selectAll("path.scatterpts").data(h?r:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{"../../lib":515,"../../registry":647,"../../traces/pie/helpers":915,"../../traces/pie/style_one":921,"../../traces/scatter/subtypes":961,"../color":367,"../colorscale/helpers":378,"../drawing":389,"./constants":418,"@plotly/d3":58}],426:[function(t,e,r){"use strict";t("./constants");e.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"}}},{"./constants":428}],427:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/plots"),a=t("../../plots/cartesian/axis_ids"),o=t("../../fonts/ploticon"),s=t("../shapes/draw").eraseActiveShape,l=t("../../lib"),c=l._,u=e.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},f=a.list(t,null,!0),h=c._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,m=(1+d)/2,g=(1-d)/2;for(i=0;i1?(I=["toggleHover"],O=["resetViews"]):v?(P=["zoomInGeo","zoomOutGeo"],I=["hoverClosestGeo"],O=["resetGeo"]):g?(I=["hoverClosest3d"],O=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(P=["zoomInMapbox","zoomOutMapbox"],I=["toggleHover"],O=["resetViewMapbox"]):b?I=["hoverClosestGl2d"]:y?I=["hoverClosestPie"]:A?(I=["hoverClosestCartesian","hoverCompareCartesian"],O=["resetViewSankey"]):I=["toggleHover"];m&&(I=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(t){for(var e=0;e0)){var m=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a=n.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t=0;k--){var A=r.append("path").attr(g).style("opacity",k?.1:v).call(o.stroke,x).call(o.fill,y).call(s.dashLine,k?"solid":_,k?4+b:b);if(d(A,t,a),w){var M=l(t.layout,"selections",a);A.style({cursor:"move"});var S={element:A.node(),plotinfo:p,gd:t,editHelpers:M,isActiveSelection:!0},E=n(c,t);i(E,A,S)}else A.style("pointer-events",k?"all":"none");T[k]=A}var L=T[0];T[1].node().addEventListener("click",(function(){return function(t,e){if(!h(t))return;var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void m(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=m,f(t)}}(t,L)}))}(t._fullLayout._selectionLayer)}function d(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function m(t){h(t)&&(t._fullLayout._activeSelectionIndex>=0&&(a(t),delete t._fullLayout._activeSelectionIndex,f(t)))}e.exports={draw:f,drawOne:p,activateLastSelection:function(t){if(!h(t))return;var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=m,f(t)}}},{"../../plot_api/plot_template":555,"../color":367,"../drawing":389,"../shapes/display_outlines":461,"../shapes/draw_newshape/helpers":466,"../shapes/handle_outline":468,"../shapes/helpers":469}],451:[function(t,e,r){"use strict";var n=t("../../drawing/attributes").dash,i=t("../../../lib/extend").extendFlat;e.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:i({},n,{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"}}},{"../../../lib/extend":505,"../../drawing/attributes":388}],452:[function(t,e,r){"use strict";e.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},{}],453:[function(t,e,r){"use strict";var n=t("../../dragelement/helpers").selectMode,i=t("../../shapes/handle_outline").clearOutline,a=t("../../shapes/draw_newshape/helpers"),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;e.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute("d"),c=e.gd,u=c._fullLayout.newselection,f=e.plotinfo,h=f.xaxis,p=f.yaxis,d=e.isActiveSelection,m=e.dragmode,g=(c.layout||{}).selections||[];if(!n(m)&&void 0!==d){var v=c._fullLayout._activeSelectionIndex;if(v-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(v)){Y(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=K(_))){for(o&&o.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=p(r),l=m(r);if(s||l){var c,u,f=o.selectAll(".select-outline-"+n.id);if(f&&i._fullLayout._outlining)s&&(c=T(f,t)),c&&a.call("_guiRelayout",i,{shapes:c}),l&&!U(t)&&(u=k(f,t)),u&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:u}).then((function(){e&&A(i)}))),i._fullLayout._outlining=!1}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function Z(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(Z),c=r.map(Z);for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function Q(t,e,r){var n,i;for(n=0;n-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,pt=et[0].yref;if(nt&&pt){var dt=ct(et);ut([C(t,nt,"x"),C(t,pt,"y")])($,dt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ft(t,$),h._reselect=!1}if(!a&&h._deselect){var mt=h._deselect;(function(t,e,r){for(var n=0;n=0)k._fullLayout._deactivateShape(k);else if(!x){var r=A.clickmode;L.done(At).then((function(){if(L.clear(At),2===t){for(bt.remove(),K=0;K-1&&V(e,k,n.xaxes,n.yaxes,n.subplot,n,bt),"event"===r&&ft(k,void 0);l.click(k,e)})).catch(M.error)}},n.doneFn=function(){kt.remove(),L.done(At).then((function(){L.clear(At),!S&&J&&n.selectionDefs&&(J.subtract=xt,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Z)),(S||x)&&W(n,S),n.doneFnCompleted&&n.doneFnCompleted(Mt),b&&ft(k,at)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:W,selectOnClick:V}},{"../../lib":515,"../../lib/clear_gl_canvases":499,"../../lib/polygon":527,"../../lib/throttle":542,"../../plot_api/subroutines":556,"../../plots/cartesian/axis_ids":570,"../../registry":647,"../color":367,"../dragelement/helpers":385,"../drawing":389,"../fx":407,"../fx/helpers":403,"../shapes/constants":459,"../shapes/display_outlines":461,"../shapes/draw_newshape/helpers":466,"../shapes/draw_newshape/newshapes":467,"../shapes/handle_outline":468,"../shapes/helpers":469,"./constants":448,"./draw":450,"./draw_newselection/newselections":453,"./helpers":454,"point-in-polygon/nested":254,polybooljs:255}],457:[function(t,e,r){"use strict";var n=t("../annotations/attributes"),i=t("../../traces/scatter/attributes").line,a=t("../drawing/attributes").dash,o=t("../../lib/extend").extendFlat,s=t("../../plot_api/plot_template").templatedArray;t("../../constants/axis_placeable_objects");e.exports=s("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:o({},n.xref,{}),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"},yref:o({},n.yref,{}),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"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:o({},i.color,{editType:"arraydraw"}),width:o({},i.width,{editType:"calc+arraydraw"}),dash:o({},a,{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"},editType:"arraydraw"})},{"../../constants/axis_placeable_objects":484,"../../lib/extend":505,"../../plot_api/plot_template":555,"../../traces/scatter/attributes":936,"../annotations/attributes":350,"../drawing/attributes":388}],458:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./constants"),o=t("./helpers");function s(t){return c(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return c(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function c(t,e,r,i,s,l){var c=t/2,u=l;if("pixel"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p<0?Math.abs(p)+c:c,m=h>0?h+c:c;return{ppad:c,ppadplus:u?d:m,ppadminus:u?m:d}}return{ppad:c}}function u(t,e,r,n,i){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lp&&(p=f)));return p>=h?[h,p]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o1&&(2!==t.length||"Z"!==t[1][0])&&(0===E&&(t[0][0]="M"),e[S]=t,T(),k())}}()}}function B(t,r){!function(t,r){if(e.length)for(var n=0;nx?(k=f,E="y0",A=x,L="y1"):(k=x,E="y1",A=f,L="y0");X(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n);"paper"===i||s.autorange||(l+=i);u.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),Z.moveFn="move"===O?J:K,Z.altKey=n.altKey},doneFn:function(){if(y(t))return;p(e),$(s),_(e,t,r),n.call("_guiRelayout",t,l.getUpdateObj())},clickFn:function(){if(y(t))return;$(s)}};function X(r){if(y(t))O=null;else if(R)O="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=Z.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):"move";p(e,l),O=l.split("-")[0]}}function J(n,i){if("path"===r.type){var a=function(t){return t},o=a,l=a;z?B("xanchor",r.xanchor=G(b+n)):(o=function(t){return G(H(t)+n)},N&&"date"===N.type&&(o=m.encodeDate(o))),D?B("yanchor",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&"date"===U.type&&(l=m.encodeDate(l))),B("path",r.path=w(I,o,l))}else z?B("xanchor",r.xanchor=G(b+n)):(B("x0",r.x0=G(c+n)),B("x1",r.x1=G(v+n))),D?B("yanchor",r.yanchor=Y(T+i)):(B("y0",r.y0=Y(f+i)),B("y1",r.y1=Y(x+i)));e.attr("d",g(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;z?B("xanchor",r.xanchor=G(b+n)):(o=function(t){return G(H(t)+n)},N&&"date"===N.type&&(o=m.encodeDate(o))),D?B("yanchor",r.yanchor=Y(T+i)):(l=function(t){return Y(q(t)+i)},U&&"date"===U.type&&(l=m.encodeDate(l))),B("path",r.path=w(I,o,l))}else if(R){if("resize-over-start-point"===O){var u=c+n,h=D?f-i:f+i;B("x0",r.x0=z?u:G(u)),B("y0",r.y0=D?h:Y(h))}else if("resize-over-end-point"===O){var p=v+n,d=D?x-i:x+i;B("x1",r.x1=z?p:G(p)),B("y1",r.y1=D?d:Y(d))}}else{var y=function(t){return-1!==O.indexOf(t)},_=y("n"),j=y("s"),V=y("w"),W=y("e"),Z=_?k+i:k,X=j?A+i:A,J=V?M+n:M,K=W?S+n:S;D&&(_&&(Z=k-i),j&&(X=A-i)),(!D&&X-Z>10||D&&Z-X>10)&&(B(E,r[E]=D?Z:Y(Z)),B(L,r[L]=D?X:Y(X))),K-J>10&&(B(C,r[C]=z?J:G(J)),B(P,r[P]=z?K:G(K)))}e.attr("d",g(t,r)),Q(s,r)}function Q(t,e){(z||D)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=H(z?e.xanchor:i.midRange(r?[e.x0,e.x1]:m.extractPathCoords(e.path,d.paramIsX))),o=q(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:m.extractPathCoords(e.path,d.paramIsY)));if(a=m.roundPositionForSharpStrokeRendering(a,1),o=m.roundPositionForSharpStrokeRendering(o,1),z&&D){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(z){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function $(t){t.selectAll(".visual-cue").remove()}h.init(Z),W.node().onmousemove=X}(t,z,l,e,r,O):!0===l.editable&&z.style("pointer-events",P||c.opacity(S)*M<=.5?"stroke":"all");z.node().addEventListener("click",(function(){return function(t,e){if(!x(t))return;var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,v(t)}}(t,z)}))}}function _(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");u.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){x(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,v(t)))}e.exports={draw:v,drawOne:b,eraseActiveShape:function(t){if(!x(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e0&&lp&&(t="X"),t}));return a>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),u+d}))}(e,s,c);if("pixel"===e.xsizemode){var b=s(e.xanchor);u=b+e.x0,f=b+e.x1}else u=s(e.x0),f=s(e.x1);if("pixel"===e.ysizemode){var _=c(e.yanchor);h=_-e.y0,p=_-e.y1}else h=c(e.y0),p=c(e.y1);if("line"===d)return"M"+u+","+h+"L"+f+","+p;if("rect"===d)return"M"+u+","+h+"H"+f+"V"+p+"H"+u+"Z";var w=(u+f)/2,T=(h+p)/2,k=Math.abs(w-u),A=Math.abs(T-h),M="A"+k+","+A,S=w+k+","+T;return"M"+S+M+" 0 1,1 "+(w+","+(T-A))+M+" 0 0,1 "+S+"Z"}},{"../../lib":515,"../../plots/cartesian/axes":566,"./constants":459}],470:[function(t,e,r){"use strict";var n=t("./draw");e.exports={moduleType:"component",name:"shapes",layoutAttributes:t("./attributes"),supplyLayoutDefaults:t("./defaults"),supplyDrawNewShapeDefaults:t("./draw_newshape/defaults"),includeBasePlot:t("../../plots/cartesian/include_components")("shapes"),calcAutorange:t("./calc_autorange"),draw:n.draw,drawOne:n.drawOne}},{"../../plots/cartesian/include_components":577,"./attributes":457,"./calc_autorange":458,"./defaults":460,"./draw":462,"./draw_newshape/defaults":465}],471:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/pad_attributes"),a=t("../../lib/extend").extendDeepAll,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/animation_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=t("./constants"),u=l("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}});e.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:u,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:a(i({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:s.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:n({})},font:n({}),activebgcolor:{valType:"color",dflt:c.gripBgActiveColor},bgcolor:{valType:"color",dflt:c.railBgColor},bordercolor:{valType:"color",dflt:c.railBorderColor},borderwidth:{valType:"number",min:0,dflt:c.railBorderWidth},ticklen:{valType:"number",min:0,dflt:c.tickLength},tickcolor:{valType:"color",dflt:c.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:c.minorTickLength}}),"arraydraw","from-root")},{"../../lib/extend":505,"../../plot_api/edit_types":548,"../../plot_api/plot_template":555,"../../plots/animation_attributes":560,"../../plots/font_attributes":594,"../../plots/pad_attributes":627,"./constants":472}],472:[function(t,e,r){"use strict";e.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}},{}],473:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/array_container_defaults"),a=t("./attributes"),o=t("./constants").name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:c}),l=0,u=0;u0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",f.railTouchRectClass,(function(n){n.call(A,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function P(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[f.name],n=[],i=0;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(a.enter().append("g").classed(f.containerClassName,!0).style("cursor","ew-resize"),a.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(s)})).remove(),0!==r.length){var l=a.selectAll("g."+f.groupClassName).data(r,v);l.enter().append("g").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr("transform",l(v[0],v[1]))}}}return R.call(F),O&&(E?R.on(".opacity",null):(A=0,M=!0,R.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),R.call(f.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?o.call("_guiRestyle",t,v,e,x):o.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(F)})).on("input",(function(t){this.text(t||" ").call(f.positionText,_.x,_.y)}))),R.classed("js-placeholder",M),T}}},{"../../constants/alignment":483,"../../constants/interactions":490,"../../lib":515,"../../lib/svg_text_utils":541,"../../plots/plots":628,"../../registry":647,"../color":367,"../drawing":389,"@plotly/d3":58,"fast-isnumeric":190}],477:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=l("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}});e.exports=o(l("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:c,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:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":505,"../../plot_api/edit_types":548,"../../plot_api/plot_template":555,"../../plots/font_attributes":594,"../../plots/pad_attributes":627,"../color/attributes":366}],478:[function(t,e,r){"use strict";e.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"}}},{}],479:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/array_container_defaults"),a=t("./attributes"),o=t("./constants").name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":515,"../../plots/array_container_defaults":561,"./attributes":477,"./constants":478}],480:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../plots/plots"),a=t("../color"),o=t("../drawing"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../plot_api/plot_template").arrayEditor,u=t("../../constants/alignment").LINE_SPACING,f=t("./constants"),h=t("./scrollbox");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function m(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?v(t,n,null,null,e):"dropdown"===e.type&&(i.attr(f.menuIndexAttrName,"-1"),g(t,n,i,a,e),s||v(t,n,i,a,e))}function g(t,e,r,n,i){var a=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(M,i,h,p),s.ensureSingle(e,"text",f.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on("click",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),h=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(h.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,g=0,v=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-f.gapButtonHeader+f.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+g+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(M,o,b),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(m(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(m(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u="up"===c||"down"===c,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,p);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;uw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=g+v;E+M>c&&(E=c-M);var L=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=v>T,P=s.barWidth+2*s.barPad,I=s.barLength+2*s.barPad,O=d+m,z=g;O+P>l&&(O=l-P);var D=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),C?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:O,y:z,width:P,height:I}),this._vbarYMin=z+I/2,this._vbarTranslateMax=T-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),k||C?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:g,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var H=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(H),C&&this.vbar.on(".drag",null).call(H)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.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)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":515,"../color":367,"../drawing":389,"@plotly/d3":58}],483:[function(t,e,r){"use strict";e.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"}}},{}],484:[function(t,e,r){"use strict";e.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"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",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},{}],485:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},{}],486:[function(t,e,r){"use strict";e.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"}},{}],487:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],488:[function(t,e,r){"use strict";e.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]}},{}],489:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],490:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],491:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],492:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],493:[function(t,e,r){"use strict";r.version=t("./version").version,t("native-promise-only"),t("../build/plotcss");for(var n=t("./registry"),i=r.register=n.register,a=t("./plot_api"),o=Object.keys(a),s=0;s",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},{}],495:[function(t,e,r){"use strict";r.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},{}],496:[function(t,e,r){"use strict";var n=t("./mod"),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,f,h,p,d,m=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}m?(u=0,f=o,h=s):r=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},{"./mod":522}],497:[function(t,e,r){"use strict";var n=Array.isArray,i=ArrayBuffer,a=DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||u(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!u(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),a=0;a=n&&t<=i?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||"G"!==v&&"g"!==v||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],A=T[3]||"1",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(c){if(2===k.length)return u;var C;k=Number(k);try{var P=g.getComponentMethod("calendars","getCal")(e);if(w){var I="i"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,I),M)}else C=P.newDate(k,Number(A),M)}catch(t){return u}return C?(C.toJD()-m)*f+S*h+E*p+L*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var O=new Date(Date.UTC(2e3,A,M,S,E));return O.setUTCFullYear(k),O.getUTCMonth()!==A||O.getUTCDate()!==M?u:O.getTime()+L*d},n=r.MIN_MS=r.dateTime2ms("-9999"),i=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var T=90*f,k=3*h,A=5*p;function M(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+="."+w(i,a)}return t}r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var a,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+m,E=Math.floor(l(t,f));try{a=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=v("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e=n+f&&t<=i-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var S=/%\d?f/g,E=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function C(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(E,(function(){return L[r("%q")(i)]})),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var P=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if("y"===r)e=a.year;else if("m"===r)e=a.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),P[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+C(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return C(e,t,n,i)};var I=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+m,a=g.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-m)*f+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+I);return c.setUTCMonth(c.getUTCMonth()+e)+n-I},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&g.getComponentMethod("calendars","getCal")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case"MultiPolygon":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++}),50)}))}for(var o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r1||m<0||m>1?null:{x:t+l*m,y:e+f*m}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,f=n-e,h=o-i,p=c-a,d=u*u+f*f,m=h*h+p*p,g=Math.min(l(u,f,d,i-t,a-e),l(u,f,d,o-t,c-e),l(h,p,m,t-i,e-a),l(h,p,m,r-i,n-a));return Math.sqrt(g)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=h,h},r.clearLocationCache=function(){i=null},r.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var p=h(c);p;){if((c+=p+r)>f)return;p=h(c)}for(p=h(f);p;){if(c>(f-=p+r))return;p=h(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f0?p=i:h=i,f++}return a}},{"./mod":522}],511:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("color-normalize"),o=t("../components/colorscale"),s=t("../components/color/attributes").defaultLine,l=t("./array").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,m=t.color,g=l(m),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=g?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},{}],515:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("d3-time-format").utcFormat,a=t("d3-format").format,o=t("fast-isnumeric"),s=t("../constants/numerical"),l=s.FP_SAFE,c=-l,u=s.BADNUM,f=e.exports={};f.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: "'+e+'"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=t("./nested_property"),f.keyedContainer=t("./keyed_container"),f.relativeAttr=t("./relative_attr"),f.isPlainObject=t("./is_plain_object"),f.toLogRange=t("./to_log_range"),f.relinkPrivateKeys=t("./relink_private");var p=t("./array");f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=t("./mod");f.mod=d.mod,f.modHalf=d.modHalf;var m=t("./coerce");f.valObjectMeta=m.valObjectMeta,f.coerce=m.coerce,f.coerce2=m.coerce2,f.coerceFont=m.coerceFont,f.coercePattern=m.coercePattern,f.coerceHoverinfo=m.coerceHoverinfo,f.coerceSelectionMarkerOpacity=m.coerceSelectionMarkerOpacity,f.validate=m.validate;var g=t("./dates");f.dateTime2ms=g.dateTime2ms,f.isDateTime=g.isDateTime,f.ms2DateTime=g.ms2DateTime,f.ms2DateTimeLocal=g.ms2DateTimeLocal,f.cleanDate=g.cleanDate,f.isJSDate=g.isJSDate,f.formatDate=g.formatDate,f.incrementMonth=g.incrementMonth,f.dateTick0=g.dateTick0,f.dfltRange=g.dfltRange,f.findExactDates=g.findExactDates,f.MIN_MS=g.MIN_MS,f.MAX_MS=g.MAX_MS;var v=t("./search");f.findBin=v.findBin,f.sorterAsc=v.sorterAsc,f.sorterDes=v.sorterDes,f.distinctVals=v.distinctVals,f.roundUp=v.roundUp,f.sort=v.sort,f.findIndexOfMin=v.findIndexOfMin,f.sortObjectKeys=t("./sort_object_keys");var y=t("./stats");f.aggNums=y.aggNums,f.len=y.len,f.mean=y.mean,f.median=y.median,f.midRange=y.midRange,f.variance=y.variance,f.stdev=y.stdev,f.interp=y.interp;var x=t("./matrix");f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=t("./angles");f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=t("./anchor_utils");f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=t("./geometry2d");f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=t("./extend");f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=t("./loggers");f.log=k.log,f.warn=k.warn,f.error=k.error;var A=t("./regex");f.counterRegex=A.counter;var M=t("./throttle");f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=t("./dom");function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&(o(t)&&t>=0&&t%1==0)},f.noop=t("./noop"),f.identity=t("./identity"),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},f.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},f.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return z.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:""}))};var D={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return B.apply(D,arguments)};var R={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var c,u,h,p="_xother"===s||"_yother"===s,d="_xother_"===s||"_yother_"===s,m="xother_"===s||"yother_"===s,g="xother"===s||"yother"===s||p||m||d,v=s;if((p||d)&&(v=v.substring(1)),(m||d)&&(v=v.substring(0,v.length-1)),g){if(void 0===(c=e[v]))return""}else for(h=3;h=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,"htx","hovertext");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,"tx","text");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(c=1):c=0,f.strTranslate(i-c*(r+o),a-c*(n+s))+f.strScale(c)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(t,e){t.attr("transform",f.getTextTransform(e)),t.style("display",e.scale?null:"none")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},{"../constants/numerical":491,"./anchor_utils":495,"./angles":496,"./array":497,"./clean_number":498,"./clear_responsive":500,"./coerce":501,"./dates":502,"./dom":503,"./extend":505,"./filter_unique":506,"./filter_visible":507,"./geometry2d":510,"./identity":513,"./increment":514,"./is_plain_object":516,"./keyed_container":517,"./localize":518,"./loggers":519,"./make_trace_groups":520,"./matrix":521,"./mod":522,"./nested_property":523,"./noop":524,"./notifier":525,"./preserve_drawing_buffer":529,"./push_unique":530,"./regex":532,"./relative_attr":533,"./relink_private":534,"./search":535,"./sort_object_keys":538,"./stats":539,"./throttle":542,"./to_log_range":543,"@plotly/d3":58,"d3-format":112,"d3-time-format":120,"fast-isnumeric":190}],516:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},{}],517:[function(t,e,r){"use strict";var n=t("./nested_property"),i=/^\w*$/;e.exports=function(t,e,r,a){var o,s,l;r=r||"name",a=a||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(o=0;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},{"../plot_api/plot_config":553,"./notifier":525}],520:[function(t,e,r){"use strict";var n=t("@plotly/d3");e.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][a]=n.select(this)})),i}},{"@plotly/d3":58}],521:[function(t,e,r){"use strict";var n=t("gl-mat4");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],523:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./array").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,m=r.length,g=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,g)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{"../constants/numerical":491,"./matrix":521}],528:[function(t,e,r){(function(r){(function(){"use strict";var n=t("./show_no_webgl_msg"),i=t("regl");e.exports=function(t,e,a){var o=t._fullLayout,s=!0;return o._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(a);else if(!n.pick||o._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[],cachedCode:a||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:o._glcontainer.node()}),s}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":537,regl:284}],529:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("is-mobile");e.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;"undefined"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]);return t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(" "),o=1;o-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{"fast-isnumeric":190,"is-mobile":234}],530:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&i.log("Long binary search..."),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t){var e,n=t.slice();for(n.sort(r.sorterAsc),e=n.length-1;e>-1&&n[e]===o;e--);for(var i,a=n[e]-n[0]||1,s=a/(e||1)/1e4,l=[],c=0;c<=e;c++){var u=n[c],f=u-i;void 0===i?(l.push(u),i=u):f>s&&(a=Math.min(a,f),l.push(u),i=u)}return{vals:l,minDiff:a}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"./array":497,"fast-isnumeric":190}],540:[function(t,e,r){"use strict";var n=t("color-normalize");e.exports=function(t){return t?n(t):[0,0,0,1]}},{"color-normalize":89}],541:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../lib"),a=i.strTranslate,o=t("../constants/xmlns_namespaces"),s=t("../constants/alignment").LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,m){var M=t.text(),S=!t.attr("data-notex")&&e&&e._context.typesetMath&&"undefined"!=typeof MathJax&&M.match(l),C=n.select(t.node().parentNode);if(!C.empty()){var P=t.attr("class")?t.attr("class").split(" ")[0]:"text";return P+="-math",C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove(),t.style("display",null).attr({"data-unformatted":M,"data-math":"N"}),S?(e&&e._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2!==h&&3!==h)return void i.warn("No MathJax version:",MathJax.version);var p=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(c,"\\lt ").replace(u,"\\gt "))).node();return 2===h?MathJax.Hub.Typeset(a):MathJax.typeset([a])},d=function(){var e=l.select(2===h?".MathJax_SVG":".MathJax"),a=!e.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===h?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,o,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===h?MathJax.Hub.Queue((function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})}),(function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),p,d,(function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})):3===h&&(o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f,"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){p(),d(),"svg"!==a&&(MathJax.config.startup.output=a),MathJax.config=o})))}(S[2],o,(function(n,i,o){C.selectAll("svg."+P).remove(),C.selectAll("g."+P+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return I(),void e();var l=C.append("g").classed(P+"-group",!0).attr({"pointer-events":"none","data-unformatted":M,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var c=o.width,u=o.height;s.attr({class:P,height:u,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=t.node().style.fill||"black",h=s.select("g");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),d=p.width,g=p.height;(d>c||g>u)&&(s.style("overflow","hidden"),d=(p=s.node().getBoundingClientRect()).width,g=p.height);var v=+t.attr("x"),y=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===P[0])l.attr({transform:"rotate("+[-90,v,y]+")"+a(-d/2,x-g/2)});else if("l"===P[0])y=x-g/2;else if("a"===P[0]&&0!==P.indexOf("atitle"))v=0,y=x;else{var b=t.attr("text-anchor");v-=d*("middle"===b?.5:"end"===b?1:0),y=y+x-g/2}s.attr({x:v,y:y}),m&&m.call(t,l),e(l)}))}))):I(),t}function I(){C.empty()||(P=t.attr("class")+"-math",C.select("svg."+P).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(g," ");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var S=e.split(v),C=0;C|>|>)/g;var f=[["$","$"],["\\(","\\)"]];var h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},m=["http:","https:","mailto:","",void 0,":"],g=r.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;r.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var A=/(^|;)\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i="...".length,a=t.split(v),o=[],s="",l=0,c=0;ci?o.push(u.substr(0,d-i)+"..."):o.push(u.substr(0,d));break}s=""}}return o.join("")};var M={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,(function(t,e){return("#"===e.charAt(0)?function(t){if(t>1114111)return;var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):M[e])||t}))}function L(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==m.indexOf(i)&&-1!==m.indexOf(a)?e:""}function C(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}r.convertEntities=E,r.sanitizeHTML=function(t){t=t.replace(g," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(v),o=0;oa.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},r.clear=function(t){if(t)i(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],543:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":190}],544:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":596,"topojson-client":316}],545:[function(t,e,r){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],546:[function(t,e,r){"use strict";e.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"}}},{}],547:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,m=Object.keys(t);for(e=0;e3?(O.x=1.02,O.xanchor="left"):O.x<-2&&(O.x=-.02,O.xanchor="right"),O.y>3?(O.y=1.02,O.yanchor="bottom"):O.y<-2&&(O.y=-.02,O.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=["x","y","z"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn("Unrecognized full array edit value",f,y),!0;e.set(y)}return!m&&(h(g,v),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=u(v,f).get(),P=[],I=-1,O=L.length;for(x=0;xL.length-(A?0:1))a.warn("index out of range",f,_);else if(void 0!==k)T.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(k)?P.push(_):A?("add"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,k),-1===I&&(I=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),m)return!1;if(h(g,v),d!==i){var z;if(-1===I)z=S;else{for(O=Math.max(L.length,O),z=[],x=0;x=I);x++)z.push(_);for(x=I;x=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function I(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),P(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function O(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var a in P(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var m=0;m-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=W(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag,h.reselect),c.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if("axrange"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[p.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)e[a]||r.push(a)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,"redraw")};t.push(y,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,G=/^[xyz]axis[0-9]*\.autorange$/,Y=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function W(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=F(l._preGUI,c),d=Object.keys(e),m=p.list(t),g=o.extendDeepAll({},e),v={};for(j(e),d=Object.keys(e),n=0;n0&&"string"!=typeof O.parts[D];)D--;var B=O.parts[D],N=O.parts[D-1]+"."+B,U=O.parts.slice(0,D).join("."),V=s(t.layout,U).get(),H=s(l,U).get(),W=O.get();if(void 0!==z){M[I]=z,S[I]="reverse"===B?z:R(W);var X=f.getLayoutValObject(l,O.parts);if(X&&X.impliedEdits&&null!==z)for(var J in X.impliedEdits)E(o.relativeAttr(I,J),X.impliedEdits[J]);if(-1!==["width","height"].indexOf(I))if(z){E("autosize",null);var K="height"===I?"width":"height";E(K,l[K])}else l[I]=t._initialAutoSize[I];else if("autosize"===I)E("width",z?null:l.width),E("height",z?null:l.height);else if(N.match(q))P(N),s(l,U+"._inputRange").set(null);else if(N.match(G)){P(N),s(l,U+"._inputRange").set(null);var Q=s(l,U).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else N.match(Y)&&s(l,U+"._inputDomain").set(null);if("type"===B){L=V;var $="linear"===H.type&&"log"===z,tt="log"===H.type&&"linear"===z;if($||tt){if(L&&L.range)if(H.autorange)$&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];$?(et<=0&&rt<=0&&E(U+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+".range[0]",Math.log(et)/Math.LN10),E(U+".range[1]",Math.log(rt)/Math.LN10)):(E(U+".range[0]",Math.pow(10,et)),E(U+".range[1]",Math.pow(10,rt)))}else E(U+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[O.parts[0]]&&"radialaxis"===O.parts[1]&&delete l[O.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,H,z,E),u.getComponentMethod("images","convertCoords")(t,H,z,E)}else E(U+".autorange",!0),E(U+".range",null);s(l,U+"._inputRange").set(null)}else if(B.match(k)){var nt=s(l,I).get(),it=(z||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,nt,it,E),u.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=b.containerArrayMatch(I);if(at){r=at.array,n=at.index;var ot=at.property,st=X||{editType:"calc"};""!==n&&""===ot&&(b.isAddVal(z)?S[I]=null:b.isRemoveVal(z)?S[I]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),T.update(A,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=z,delete e[I]}else"reverse"===B?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):("dragmode"===I&&(!1===z&&!1!==W||!1!==z&&!1===W)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===I&&("lasso"===z||"select"===z)&&"lasso"!==W&&"select"!==W||l._has("gl2d")?A.plot=!0:X?T.update(A,X):A.calc=!0,O.set(z))}}for(r in v){b.applyContainerArrayChanges(t,h(a,r),v[r],A,h)||(A.plot=!0)}for(var ct in C){var ut=(L=p.getFromId(t,ct))&&L._constraintGroup;if(ut)for(var ft in A.calc=!0,ut)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(Z(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:g}}function Z(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function X(t,e,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},e),a),l=s.flags,u=W(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(r._doPlot):(p.push(h.previousPromises),V(t,f,u)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,u.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag,h.reselect),c.add(t,X,[t,s.undoit,u.undoit,s.traces],X,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit("plotly_update",{data:s.eventData,layout:u.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],Q=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function $(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,u){function f(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,_.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&f()};e()}var d,m,g=0;function v(t){return Array.isArray(i)?g>=i.length?t.transitionOpts=i[g]:t.transitionOpts=i[0]:t.transitionOpts=i,g++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:"object",data:v(o.extendFlat({},e))});else if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&kk)&&A.push(m);y=A}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var m=e[n].name,g=(u[m]||d[m]||{}).name,v=e[n].name,y=u[g]||d[g];g&&v&&"number"==typeof v&&y&&A<5&&(A++,o.warn('addFrames: overwriting frame "'+(u[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[m]={name:m},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+t._transitionData._counter++];);if(u[i.name]){for(a=0;a=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],p=[e,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!y(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function y(t){return t===Math.round(t)&&t>=0}function x(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else{var u=t._module;if(u||(u=(n.modules[t.type||a.type.dflt]||{})._module),!u)return!1;if(!(i=(r=u.attributes)&&r[o])){var f=u.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return v(i,e,s)},r.getLayoutValObject=function(t,e){return v(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+"["+a+"]";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+"."+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{"../lib":515,"../plots/attributes":562}],556:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../registry"),a=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),f=t("../components/modebar"),h=t("../plots/cartesian/axes"),p=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),m=d.enforce,g=d.clean,v=t("../plots/cartesian/autorange").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,m,g=t._fullLayout,v=g._size,x=v.p,_=h.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(c.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!g._has("cartesian"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var A=[],M=[],S=[],E=1===l.opacity(g.paper_bgcolor)&&1===l.opacity(g.plot_bgcolor)&&g.paper_bgcolor===g.plot_bgcolor;for(i in g._plots)if((s=g._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var L=s.xaxis.domain,C=s.yaxis.domain,P=s.plotgroup;if(y(L,C,S)){var I=P.node(),O=s.bg=o.ensureSingle(P,"rect","bg");I.insertBefore(O.node(),I.childNodes[0]),M.push(i)}else P.select("rect.bg").remove(),S.push([L,C]),E||(A.push(i),M.push(i))}var z,D,R,F,B,N,j,U,V,H,q,G,Y,W=g._bgLayer.selectAll(".bg").data(A);for(W.enter().append("rect").classed("bg",!0),W.exit().remove(),W.each((function(t){g._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:"unused",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=m(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&g(a)&&t(a,o)}}({data:p,layout:h},""),u.length)return u.map(v)}},{"../lib":515,"../plots/attributes":562,"../plots/plots":628,"./plot_config":553,"./plot_schema":554,"./plot_template":555}],558:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./plot_api"),a=t("../plots/plots"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg"),u=t("../version").version,f={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}};e.exports=function(t,e){var r,h,p,d;function m(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!m("width")&&null!==e.width||!m("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!m("format"))throw new Error("Export format is not "+o.join2(f.format.values,", "," or ")+".");var g={};function v(t,r){return o.coerce(e,g,f,t,r)}var y=v("format"),x=v("width"),b=v("height"),_=v("scale"),w=v("setBackground"),T=v("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if("full-json"===y){var p=a.graphJson(k,!1,"keepdata","object",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),"svg"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement("canvas");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},{"../lib":515,"../plots/plots":628,"../snapshot/helpers":651,"../snapshot/svgtoimg":653,"../snapshot/tosvg":655,"../version":1132,"./plot_api":552,"fast-isnumeric":190}],559:[function(t,e,r){"use strict";var n=t("../lib"),i=t("../plots/plots"),a=t("./plot_schema"),o=t("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;hx.length&&i.push(d("unused",a,v.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d("unused",a,v.concat(M,x[M].length)));var I=x[M].length;for(A=0;A<(P?Math.min(I,k[M].length):I);A++)S=P?k[M][A]:k,E=y[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d("dynamic",a,v.concat(M,A),E,L)):i.push(d("value",a,v.concat(M,A),E))}else i.push(d("array",a,v.concat(M),y[M]));else for(M=0;M1&&p.push(d("object","layout"))),i.supplyDefaults(m);for(var g=m._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return{vals:i};c=f}for(var h=e.calendar,p="start"===l,d="end"===l,m=t[r+"period0"],g=a(m,h)||0,v=[],y=[],x=[],b=i.length,_=0;_A;)k=o(k,-c,h);for(;k<=A;)k=o(k,c,h);T=o(k,-c,h)}else{for(k=g+(w=Math.round((A-g)/u))*u;k>A;)k-=u;for(;k<=A;)k+=u;T=k-u}v[_]=p?T:d?k:(T+k)/2,y[_]=T,x[_]=k}return{vals:v,starts:y,ends:x}}},{"../../constants/numerical":491,"../../lib":515,"fast-isnumeric":190}],564:[function(t,e,r){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],565:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("fast-isnumeric"),a=t("../../lib"),o=t("../../constants/numerical").FP_SAFE,s=t("../../registry"),l=t("../../components/drawing"),c=t("./axis_ids"),u=c.getFromId,f=c.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),c=m(t,e),u=c.min,f=c.max;if(0===u.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=u[0].val,g=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===g){var P=h-1,I=h+1;if(M)if(0===h)i=[0,1];else{var O=(h>0?f:u).reduce((function(t,e){return Math.max(t,l(e))}),0),z=h/(1-Math.min(.5,O/E));i=h>0?[0,z]:[z,0]}else i=S?[Math.max(0,P),Math.max(1,I)]:[P,I]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return v&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=I;n--)P(n);return{min:d,max:m,opts:r}},concatExtremes:m};function m(t,e,r){var n,i,a,o=e._id,s=t._fullData,l=t._fullLayout,c=[],f=[];function h(t,e){for(n=0;n=r&&(c.extrapad||!o)){s=!1;break}i(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=a&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function x(t){return i(t)&&Math.abs(t)=e}},{"../../components/drawing":389,"../../constants/numerical":491,"../../lib":515,"../../registry":647,"./axis_ids":570,"@plotly/d3":58,"fast-isnumeric":190}],566:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("fast-isnumeric"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=s.strTranslate,c=t("../../lib/svg_text_utils"),u=t("../../components/titles"),f=t("../../components/color"),h=t("../../components/drawing"),p=t("./layout_attributes"),d=t("./clean_ticks"),m=t("../../constants/numerical"),g=m.ONEMAXYEAR,v=m.ONEAVGYEAR,y=m.ONEMINYEAR,x=m.ONEMAXQUARTER,b=m.ONEAVGQUARTER,_=m.ONEMINQUARTER,w=m.ONEMAXMONTH,T=m.ONEAVGMONTH,k=m.ONEMINMONTH,A=m.ONEWEEK,M=m.ONEDAY,S=M/2,E=m.ONEHOUR,L=m.ONEMIN,C=m.ONESEC,P=m.MINUS_SIGN,I=m.BADNUM,O={K:"zeroline"},z={K:"gridline",L:"path"},D={K:"minor-gridline",L:"path"},R={K:"tick",L:"path"},F={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},N=t("../../constants/alignment"),j=N.MID_SHIFT,U=N.CAP_SHIFT,V=N.LINE_SPACING,H=N.OPPOSITE_SIDE,q=e.exports={};q.setConvert=t("./set_convert");var G=t("./axis_autotype"),Y=t("./axis_ids"),W=Y.idSort,Z=Y.isLinked;q.id2name=Y.id2name,q.name2id=Y.name2id,q.cleanId=Y.cleanId,q.list=Y.list,q.listIds=Y.listIds,q.getFromId=Y.getFromId,q.getFromTrace=Y.getFromTrace;var X=t("./autorange");q.getAutoRange=X.getAutoRange,q.findExtremes=X.findExtremes;function J(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}q.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},q.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},q.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==q.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=q.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},q.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:q.getFromId(e,r).cleanPos)(t)},q.redrawComponents=function(t,e){e=e||q.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;ur&&f2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},q.saveRangeInitial=function(t,e){for(var r=q.list(t,"",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=q.tickIncrement(t,"M6","reverse")+1.5*M:a.exactMonths>.8?t=q.tickIncrement(t,"M1","reverse")+15.5*M:t-=S;var l=q.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),g=y,0;g<=u;)g=q.tickIncrement(g,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(g,0,a),size:v,_dataSpan:u-c}},q.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=q.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*o+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,q.prepTicks(t,r),a){var c=i(e.dtick),u=i(t.dtick),f=c?e.dtick:+e.dtick.substring(1),h=u?t.dtick:+t.dtick.substring(1);c&&u?tt(f,h)?f===2*A&&h===2*M&&(t.dtick=A):f===2*A&&h===3*M?t.dtick=A:f!==A||(e._input.minor||{}).nticks?et(f/h,2.5)?t.dtick=f/2:t.dtick=f:t.dtick=M:"M"===String(e.dtick).charAt(0)?u?t.dtick="M1":tt(f,h)?f>=12&&2===h&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?tt(f,h)||(t.dtick=et(f/h,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},q.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,a=t.nticks;a||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n="y"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(a*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,q.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=q.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dtick=(O?0:1);z--){var D=!z;z?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var R=z?t:s.extendFlat({},t,t.minor);if(D?q.prepMinorTicks(R,t,e):q.prepTicks(R,e),"array"!==R.tickmode){var F=J(u),B=F[0],N=F[1],j=i(R.dtick),U="log"===a&&!(j||"L"===R.dtick.charAt(0)),V=q.tickFirst(R,e);if(z){if(t._tmin=V,V=N:W<=N;W=q.tickIncrement(W,Z,f,o)){if(z&&H++,R.rangebreaks&&!f){if(W=p)break}if(C.length>d||W===Y)break;Y=W;var X={value:W};z?(U&&W!==(0|W)&&(X.simpleLabel=!0),l>1&&H%l&&(X.skipLabel=!0),C.push(X)):(X.minor=!0,P.push(X))}}else z?(C=[],m=nt(t)):(P=[],L=nt(t))}if(O&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var K=C.map((function(t){return t.value})),Q=[],$=0;$0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=g?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,m=0;m<84;m++){var L=(m+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==I&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>A&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(C,t,t._definedDelta),t.rangebreaks){var at="y"===t._id.charAt(0),ot=1;"auto"===t.tickmode&&(ot=t.tickfont?t.tickfont.size:12);var st=NaN;for(r=C.length-1;r>-1;r--)if(C[r].drop)C.splice(r,1);else{C[r].value=It(C[r].value,t);var lt=t.c2p(C[r].value);(at?st>lt-ot:stp||utp&&(ct.periodX=p),ut10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&a<=10||e>=15*M)t._tickround="d";else if(e>=L&&a<=16||e>=E)t._tickround="M";else if(e>=C&&a<=19||e>=L)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(mt(t.exponentformat)&&!gt(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function pt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}q.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>v)e/=v,n=a(10),t.dtick="M"+12*ft(e,n,it);else if(o>T)e/=T,t.dtick="M"+ft(e,1,at);else if(o>M){if(t.dtick=ft(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:st),!r){var l=q.getTickFormat(t),c="period"===t.ticklabelmode;c&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),c&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=ft(e,E,at):o>L?t.dtick=ft(e,L,ot):o>C?t.dtick=ft(e,C,ot):(n=a(10),t.dtick=ft(e,n,it))}else if("log"===t.type){t.tick0=0;var u=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(u[1]-u[0])<1){var f=1.5*Math.abs((u[1]-u[0])/e);e=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/f,n=a(10),t.dtick="L"+ft(e,n,it)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):Pt(t)?(t.tick0=0,n=1,t.dtick=ft(e,n,ut)):(t.tick0=0,n=a(10),t.dtick=ft(e,n,it));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(h)}},q.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,a);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?ct:lt,f=t+.01*o,h=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},q.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] ")}else t._prevDateHead=l,c+="
"+l;e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);"never"===a&&(a="");n&&"L"!==u&&(o="L3",u="L");if(c||"L"===u)e.text=vt(Math.pow(10,l),t,a,n);else if(i(o)||"D"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;"power"===p||mt(p)&>(f)?(e.text=0===f?1:1===f?"10":"10"+(f>1?"":P)+h+"",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(f>0?"+":P)+h:(e.text=vt(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,m):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r="");e.text=String(r)}(t,o):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):Pt(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=vt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=vt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="\u03c0":e.text=o[0]+"\u03c0":e.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(e.text=P+e.text)}}}}(t,o,r,c,m):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide");e.text=vt(e.x,t,i,n)}(t,o,0,c,m),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),"boundaries"===t.tickson||t.showdividers){var g=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[g(o.x-.5),g(o.x+t.dtick-.5)]}return o},q.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return q.hoverLabelText(t,n,r)+" - "+q.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=q.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":P+o:o};var dt=["f","p","n","\u03bc","m","","k","M","G","T"];function mt(t){return"SI"===t||"B"===t}function gt(t){return t>14||t<-15}function vt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=q.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};ht(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"":"B"===l&&9===c?t+="B":mt(l)&&(t+=dt[c/3+5]));return a?P+t:t}function yt(t,e){if(t){var r=Object.keys(B).reduce((function(t,r){return-1!==e.indexOf(r)&&B[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function xt(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,a=u(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(i)))){r=n;break}break;case"log":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if("x"===d){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var g=r.right-(e._offset+e._length);g>0&&(n.xr=1,n.r=g);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if("l"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[m]="free"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=wt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||"ticks"===e.mirror?i[m]=e._anchorAxis.domain[p[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[m]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}it&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(yt(n,e.automargin),yt(i,e.automargin)),a.autoMargin(t,At(e),n),a.autoMargin(t,Mt(e),i),a.autoMargin(t,St(e),s)})),r.skipTitle||it&&"bottom"===e.side||rt.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty("standoff"))r=e._depth+e.title.standoff+wt(e);else{var s=Ot(e);if("multicategory"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,"outside"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+="x"===a?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,m=q.getPxPosition(t,e);"x"===a?(f=e._offset+e._length/2,p="top"===e.side?m-r:m+r):(p=e._offset+e._length/2,f="right"===e.side?m+r:m-r,c={rotate:"-90",offset:0});if("multicategory"!==e.type){var g=e._selections[e._id+"tick"];if(d={selection:g,side:e.side},g&&g.node()&&g.node().parentNode){var v=h.getTranslate(g.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return u.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,"text-anchor":"middle"}})}(t,e)})),s.syncOrAsync(rt)}}function at(t){var r=p+(t||"tick");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=kt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},q.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},q.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},q.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*U,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&"top"===c&&(f-=h*(1-U));(i||n)&&(u=-u);"bottom"!==c&&"right"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(bt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(bt(e)))}},q.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===o?"M0,"+(e+s*r)+"v"+a*r:"M"+(e+s*r)+",0h"+a*r},q.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",a=function(t){return-1!==n.indexOf(t)},o=a("top"),l=a("left"),c=a("right"),u=a("bottom")||l||o||c,f=a("inside"),h="inside"===n&&"inside"===t.ticks||!f&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,d=0,m=h?t.ticklen:0;if(f?m*=-1:u&&(m=0),h&&(p+=m,r)){var g=s.deg2rad(r);p=m*Math.cos(g)+1,d=m*Math.sin(g)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if("x"===A)b=(_=!f&&"bottom"===k||f&&"top"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=j:x=-90===M&&"bottom"===k?U:90===M&&"top"===k?j:.5,T=j/2*(M/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*b<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==f?-n:0};else if("y"===A){if(b=(_=!f&&"left"===k||f&&"right"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&"left"===k||90===M&&"right"===k?U:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*j},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},q.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,_t);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),zt(e,[R]),o.attr("transform",r.transFn)},q.drawGrid=function(t,e,r){r=r||{};var i=e._id+"grid",a=e.minor&&e.minor.showgrid,o=a?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&q.shouldShowZeroLine(t,e,l))for(var c="array"===e.tickmode,u=0;u=0;v--){var y=v?m:g;if(y){var x=y.selectAll("path."+i).data(v?s:o,_t);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?d:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}zt(e,[z,D])},q.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=q.shouldShowZeroLine(t,e,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return W(t.id,e.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,e.zerolinecolor||f.defaultLine).style("stroke-width",h.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),zt(e,[O])},q.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,u=o.charAt(0),f=r.cls||o+"tick",p=r.vals.filter((function(t){return t.text})),d=r.labelFns,m=r.secondary?0:e.tickangle,g=(e._prevTickAngles||{})[f],v=r.layer.selectAll("g."+f).data(e.showticklabels?p:[],_t),y=[];function x(t,a){t.each((function(t){var o=n.select(this),s=o.select(".text-math-group"),u=d.anchorFn(t,a),f=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?" rotate("+a+","+d.xFn(t)+","+(d.yFn(t)-t.fontSize/2)+")":""),p=c.lineCount(o),m=V*t.fontSize,g=d.heightFn(t,i(a)?+a:0,(p-1)*m);if(g&&(f+=l(0,g)),s.empty()){var v=o.select("text");v.attr({transform:f,"text-anchor":u}),v.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var y=h.bBox(s.node()).width*{end:-.5,start:.5}[u];s.attr("transform",f+l(y,0))}}))}v.enter().append("g").classed(f,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(c.positionText,d.xFn(e),d.yFn(e)).call(h.font,e.font,e.fontSize,e.fontColor).text(e.text).call(c.convertToTspans,t),t._promises[i]?y.push(t._promises.pop().then((function(){x(r,m)}))):x(r,m)})),zt(e,[F]),v.exit().remove(),r.repositionOnUpdate&&v.each((function(t){n.select(this).select("text").call(c.positionText,d.xFn(t),d.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===e._id.charAt(0),l=0,c=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var u=s.simpleMap(e.range,e.r2l);l=e.l2p(u[0])+e._offset,c=e.l2p(u[1])+e._offset}var f=Math.min(l,c),p=Math.max(l,c),d=e.side,m=1/0,g=-1/0;for(var y in v.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>p||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},x(v,g+1?g:m);var b=null;e._selections&&(e._selections[f]=v);var _=[function(){return y.length&&Promise.all(y)}];e.automargin&&a._redrawFromAutoMarginCount&&90===g?(b=90,_.push((function(){x(v,g)}))):_.push((function(){if(x(v,m),p.length&&"x"===u&&!i(m)&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(v.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=kt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),"boundaries"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),c=e.ticklabelposition||"",f=function(t){return-1!==c.indexOf(t)},d=f("top"),g=f("left"),y=f("right"),_=f("bottom")||g||d||y?(e.tickwidth||0)+6:0,w=l<2.5*n||"multicategory"===e.type||"realaxis"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n=2){var s,c,u="";if(2===o.length)for(s=0;s<2;s++)if(c=b(o[s])){u=g;break}var f=i("pattern",u);if(f===g)for(s=0;s<2;s++)(c=b(o[s]))&&(e.bounds[s]=o[s]=c-1);if(f)for(s=0;s<2;s++)switch(c=o[s],f){case g:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=c;break;case v:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[s]=o[s]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{"../../registry":647,"./constants":573}],571:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){if("category"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i="array");var s,l=r("categoryorder",i);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=e.categoryorder="trace"),"trace"===l?e._initialCategories=[]:"array"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rO&&FP&&(P=F);h/=(P-C)/(2*I),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",c(r,n)).attr("d",i+"Z")}function j(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",c(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),V(t,e,i,a)}function V(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function H(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function q(t){I&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),I=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function Y(t,e,r,n,a){for(var o,s,l,c,u=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,m=0;m=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||vt||qt(),gt)o.indexOf("select")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf("event")>-1&&p.click(i,r,e.id);else if(1===t&&vt){var s=m?O:I,c="s"===m||"w"===v?0:1,f=s._name+".range["+c+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,c),d="left",g="middle";if(s.fixedrange)return;m?(g="n"===m?"top":"bottom","right"===s.side&&(d="right")):"e"===v&&(d="right"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(u.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:d,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,f,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St="",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr("d","M0,0Z")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St="xy",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr("d",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St="xy";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),c=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=c*tt,Tt.b=(1-l)*et,Tt.t=(1-c)*et,Lt.attr("d",G(Tt))}else s();else!at||o0){var u;if(nt.isSubplotConstrained||!it&&1===at.length){for(u=0;um[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":515,"fast-isnumeric":190}],583:[function(t,e,r){"use strict";var n=t("./show_dflt");e.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},{"./show_dflt":586}],584:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},{"../../constants/alignment":483}],585:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("d3-time-format").utcFormat,a=t("../../lib"),o=a.numberFormat,s=t("fast-isnumeric"),l=a.cleanNumber,c=a.ms2DateTime,u=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=t("../../constants/numerical"),d=p.FP_SAFE,m=p.BADNUM,g=p.LOG_CLIP,v=p.ONEWEEK,y=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=t("./axis_ids"),T=t("./constants"),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",p=r.charAt(0);function E(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return m}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=u(e,n||t.calendar);if(o===m){if(!s(e))return m;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),c=Math.round(e-l/10);o=u(new Date(c))+l/10}return o}function C(e,r,n){return c(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function I(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return m}function O(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=O(t);return void 0!==e?e:s(t)?+t:void 0}function D(t){return s(t)?+t:O(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):m},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j="y"===p;B=function(e){if(!s(e))return m;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lu)){o=a<(c+u)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l="log"===t.type?E:f,t.l2c="log"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p="log"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c="log"===t.type?function(t){return M(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):"log"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,m,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:f(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=O,t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[w.id2name(c)];s=s.concat(u._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var c=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=c,o[1]+=c}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f="y"===p;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),m=a.simpleMap(e.xr1,i.r2l),g=d[1]-d[0],v=m[1]-m[0];p[0]=(d[0]*(1-r)+r*m[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/g),i.range[0]=i.l2r(d[0]*(1-r)+r*m[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*m[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{"../../components/drawing":389,"../../lib":515,"../../registry":647,"./axes":566,"@plotly/d3":58}],591:[function(t,e,r){"use strict";var n=t("../../registry").traceIs,i=t("./axis_autotype");function a(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=a(t),i=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}e.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(!function(t,e){if("-"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(!c)return;if("histogram"===c.type&&l==={v:"y",h:"x"}[c.orientation||"v"])return void(t.type="linear");var u=l+"calendar",f=c[u],h={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0&&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]]]}}e.exports=function(t){return new M(t)},S.plot=function(t,e,r,n){var i=this;if(n)return i.update(t,e,!0);i._geoCalcData=t,i._fullLayout=e;var a=e[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var c=!1,u=0;u0&&o._module.calcGeoJSON(a,e)}if(!r){if(this.updateProjection(t,e))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(e,n),this.updateDims(e,n),this.updateFx(e,n),d.generalUpdatePerTraceModule(this.graphDiv,this,t,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,u=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,m=p._ax,v=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n="geo"+c.titleCase(n);for(var l=(i[n]||s[n])(),u=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=["center","rotate","parallels","clipExtent"],h=function(t){return t?l:[]},p=0;pu*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance);u&&l.clipAngle(u-w.clipPad);return l}(n),y=[[l.l+l.w*u.x[0],l.t+l.h*(1-u.y[1])],[l.l+l.w*u.x[1],l.t+l.h*(1-u.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=y[1][0]-y[0][0],m._length=y[1][1]-y[0][1],d.range=g(r,d),m.range=g(r,m);var k=(d.range[0]+d.range[1])/2,A=(m.range[0]+m.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}v.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);v.fitExtent(y,C);var P=this.bounds=v.getBounds(C),I=this.fitScale=v.scale(),O=v.translate();if(n.fitbounds){var z=v.getBounds(E(d.range,m.range)),D=Math.min((P[1][0]-P[0][0])/(z[1][0]-z[0][0]),(P[1][1]-P[0][1])/(z[1][1]-z[0][1]));isFinite(D)?v.scale(D*I):c.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(f.scale*I);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(v.translate([O[0]+(R[0]-O[0]),O[1]+(R[1]-O[1])]).clipExtent(P),n._isAlbersUsa){var F=v([x.lon,x.lat]),B=v.translate();v.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return"lonaxis"===t||"lataxis"===t}function l(t){return Boolean(w.lineLayers[t])}function c(t){return Boolean(w.fillLayers[t])}var u=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||c(t)?e["show"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(".layer").data(u,String);p.exit().each((function(t){delete a[t],delete o[t],n.select(this).remove()})),p.enter().append("g").attr("class",(function(t){return"layer "+t})).each((function(t){var e=a[t]=n.select(this);"bg"===t?r.bgRect=e.append("rect").style("pointer-events","all"):s(t)?o[t]=e.append("path").style("fill","none"):"backplot"===t?e.append("g").classed("choroplethlayer",!0):"frontplot"===t?e.append("g").classed("scatterlayer",!0):l(t)?o[t]=e.append("path").style("fill","none").style("stroke-miterlimit",2):c(t)&&(o[t]=e.append("path").style("stroke","none"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];"lonaxis"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):"lataxis"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};m.setConvert(l,r);var c=m.calcTicks(l);e.isScoped||"lonaxis"!==t||c.pop();for(var u=c.length,f=new Array(u),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,u),s.indexOf("event")>-1&&p.click(i,n.event))}))}function f(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",i),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(h.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},m.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},c.extendFlat(this.viewInitial,e)},S.render=function(t){this._hasMarkerAngles&&t?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?u(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},{"../../components/color":367,"../../components/dragelement":386,"../../components/drawing":389,"../../components/fx":407,"../../components/selections":455,"../../lib":515,"../../lib/geo_location_utils":508,"../../lib/topojson_utils":544,"../../registry":647,"../cartesian/autorange":565,"../cartesian/axes":566,"../plots":628,"./constants":596,"./zoom":601,"@plotly/d3":58,"d3-geo":114,"d3-geo-projection":113,"topojson-client":316}],598:[function(t,e,r){"use strict";var n=t("../../plots/get_data").getSubplotCalcData,i=t("../../lib").counterRegex,a=t("./geo"),o="geo",s=i(o),l={};l.geo={valType:"subplotid",dflt:o,editType:"calc"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t("./layout_attributes"),supplyLayoutDefaults:t("./layout_defaults"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var I,O,z,D=(C+P)/2;if(!p){var R=d?f.projRotate:[D,0,0];I=r("projection.rotation.lon",R[0]),r("projection.rotation.lat",R[1]),r("projection.rotation.roll",R[2]),r("showcoastlines",!d&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}(p?(O=-96.6,z=38.7):(O=d?D:I,z=(L[0]+L[1])/2),r("center.lon",O),r("center.lat",z),m&&(r("projection.tilt"),r("projection.distance")),g)&&r("projection.parallels",f.projParallels||[0,60]);r("projection.scale"),r("showland",!!x&&void 0)&&r("landcolor"),r("showlakes",!!x&&void 0)&&r("lakecolor"),r("showrivers",!!x&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==u&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),d||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):v?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},{"../../lib":515,"../get_data":602,"../subplot_defaults":641,"./constants":596,"./layout_attributes":599}],601:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=t("../../registry"),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",h)}function h(t,e){var r=u(0,e);function i(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render(!0);var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,m,g=u(0,e);function v(t){return e.invert(t)}function y(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on("zoom",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return g.scale(e.scale()),void g.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),m=!0,t.render(!0);var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),m&&f(t,e,y)})),g}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var m=180-a-2*p,g=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,g)<=b(r[0],r[1],m,v)?[a,g,r[2]]:[m,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(g(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(g(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n).999&&(m="turntable"):m="turntable")}else m="turntable";r("dragmode",m),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:"gl3d",attributes:l,handleDefaults:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":367,"../../../lib":515,"../../../registry":647,"../../get_data":602,"../../subplot_defaults":641,"./axis_defaults":610,"./layout_attributes":613}],613:[function(t,e,r){"use strict";var n=t("./axis_attributes"),i=t("../../domain").attributes,a=t("../../../lib/extend").extendFlat,o=t("../../../lib").counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({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:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":515,"../../../lib/extend":505,"../../domain":593,"./axis_attributes":609}],614:[function(t,e,r){"use strict";var n=t("../../../lib/str2rgbarray"),i=["xaxis","yaxis","zaxis"];function a(){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]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new a;return e.merge(t),e}},{"../../../lib/str2rgbarray":540}],615:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g," "));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._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),b(e),e.glplot.axes.update(e.axesOptions);for(var c=Object.keys(e.traces),u=null,h=e.glplot.selection,m=0;m")):"isosurface"===t.type||"volume"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push("value: "+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join("
")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*y[0]/y[3])*s,y:(.5-.5*y[1]/y[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:u.name,color:d.castHoverOption(_,w,"bgcolor")||u.color,borderColor:d.castHoverOption(_,w,"bordercolor"),fontFamily:d.castHoverOption(_,w,"font.family"),fontSize:d.castHoverOption(_,w,"font.size"),fontColor:d.castHoverOption(_,w,"font.color"),nameLength:d.castHoverOption(_,w,"namelength"),textAlign:d.castHoverOption(_,w,"align"),hovertemplate:f.castOption(_,w,"hovertemplate"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var k=["xaxis","yaxis","zaxis"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+"calendar"],u=e["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dg[1][a])g[0][a]=-1,g[1][a]=1;else{var L=g[1][a]-g[0][a];g[0][a]-=L/32,g[1][a]+=L/32}if("reversed"===s.autorange){var C=g[0][a];g[0][a]=g[1][a],g[1][a]=C}}else{var P=s.range;g[0][a]=s.r2l(P[0]),g[1][a]=s.r2l(P[1])}g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),v[a]=g[1][a]-g[0][a],this.glplot.setBounds(a,{min:g[0][a]*h[a],max:g[1][a]*h[a]})}var I=c.aspectmode;if("cube"===I)d=[1,1,1];else if("manual"===I){var O=c.aspectratio;d=[O.x,O.y,O.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var z=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];z[a]=Math.pow(D.acc,1/D.count)/h[a]}d="data"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position="absolute",B.left=F.l+R.x[0]*F.w+"px",B.top=F.t+(1-R.y[1])*F.h+"px",B.width=F.w*(R.x[1]-R.x[0])+"px",B.height=F.h*(R.y[1]-R.y[0])+"px"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).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]]),this.glplot.setAspectratio(t.aspectratio),"orthographic"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+".camera")).get(),p[this.id+".camera"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+".aspectratio")).get(),p[this.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+".camera").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+".aspectratio").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if("orbit"===t)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===t){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+".camera.up",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call("_storeDirectGUIEdit",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement("canvas");o.width=r,o.height=i;var s,l=o.getContext("2d",{willReadFrequently:!0}),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case"jpeg":s=o.toDataURL("image/jpeg");break;case"webp":s=o.toDataURL("image/webp");break;default:s=o.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(this._mockAxis,t)},e.exports=_},{"../../../stackgl_modules":1133,"../../components/fx":407,"../../lib":515,"../../lib/show_no_webgl_msg":537,"../../lib/str2rgbarray":540,"../../plots/cartesian/axes":566,"../../registry":647,"./layout/convert":611,"./layout/spikes":614,"./layout/tick_marks":615,"./project":616,"has-passive-events":229,"webgl-context":332}],618:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;aOpenStreetMap contributors',a=['\xa9 Carto',i].join(" "),o=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under
ODbL'].join(" "),s={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,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}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,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}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:o,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:o,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},l=n(s);e.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join("\n"),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("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",l.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),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("\n"),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\')'}}},{"../../lib/sort_object_keys":538}],621:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r=t.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},{"../../lib":515}],622:[function(t,e,r){"use strict";var n=t("mapbox-gl/dist/mapbox-gl-unminified"),i=t("../../lib"),a=i.strTranslate,o=i.strScale,s=t("../../plots/get_data").getSubplotCalcData,l=t("../../constants/xmlns_namespaces"),c=t("@plotly/d3"),u=t("../../components/drawing"),f=t("../../lib/svg_text_utils"),h=t("./mapbox"),p=r.constants=t("./constants");function d(t){return"string"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://"))}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=i.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split("|").join("
");x.text(w).attr("data-unformatted",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr("transform",a(-3,8-b.height)),y.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 T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr("transform",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.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=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&g(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&c.click(n,e.originalEvent)}}},b.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),h(o)||f(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){p(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},b.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},b.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){b.sendDataToCloud(t)}));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})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},b.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=b.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var T=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],k=["year","month","dayMonth","dayMonthYear"];function A(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,b.linkSubplots(h,l,f,n),b.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has("gl2d")),j=!(!l._has||!l._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||N,V=!(!l._has||!l._has("cartesian"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=b.layoutAttributes.width.min,p=b.layoutAttributes.height.min;n1,m=!e.height&&Math.abs(r.height-i)>1;(m||d)&&(d&&(r.width=n),m&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),b.sanitizeMargins(r)},b.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,c=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in c.length||c.push(f),e._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(u.subplotSort);for(a=0;a1&&(r.l/=v,r.r/=v)}if(p){var y=(r.t+r.b)/p;y>1&&(r.t/=y,r.b/=y)}var x=void 0!==r.xl?r.xl:r.x,_=void 0!==r.xr?r.xr:r.x,w=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:x,size:r.l+g},r:{val:_,size:r.r+g},b:{val:T,size:r.b+g},t:{val:w,size:r.t+g}},m[e]=1}else delete d[e],delete m[e];if(!n._replotting)return b.doAutoMargin(t)}},b.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,a=e.margin,l=u.extendFlat({},i),c=a.l,f=a.r,h=a.t,d=a.b,m=e._pushmargin,g=e._pushmarginIds,v=e.minreducedwidth,y=e.minreducedheight;if(!1!==e.margin.autoexpand){for(var x in m)g[x]||delete m[x];for(var _ in m.base={l:{val:0,size:c},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},m){var w=m[_].l||{},T=m[_].b||{},k=w.val,A=w.size,M=T.val,S=T.size;for(var E in m){if(o(A)&&m[E].r){var L=m[E].r.val,P=m[E].r.size;if(L>k){var I=(A*L+(P-r)*k)/(L-k),O=(P*(1-k)+(A-r)*(1-L))/(L-k);I+O>c+f&&(c=I,f=O)}}if(o(S)&&m[E].t){var z=m[E].t.val,D=m[E].t.size;if(z>M){var R=(S*z+(D-n)*M)/(z-M),F=(D*(1-M)+(S-n)*(1-z))/(z-M);R+F>d+h&&(d=R,h=F)}}}}}var B=u.constrain(r-a.l-a.r,2,v),N=u.constrain(n-a.t-a.b,2,y),j=Math.max(0,r-B),U=Math.max(0,n-N);if(j){var V=(c+f)/j;V>1&&(c/=V,f/=V)}if(U){var H=(d+h)/U;H>1&&(d/=H,h/=H)}if(i.l=Math.round(c),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&b.didMarginChange(l,i)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var q=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function l(){return a++,function(){o++,n||o!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=u.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}b.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},b.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&b.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function c(t,e){if("function"==typeof t)return e?"_function_":null;if(u.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!u.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=c(t[a],e)}else e&&(i[a]="_function")})),i}return Array.isArray(t)?t.map((function(t){return c(t,e)})):u.isTypedArray(t)?u.simpleMap(t,u.identity):u.isJSDate(t)?u.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=c(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=c(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=c(l)),a&&(f.config=c(t._context,!0)),"object"===n?f:JSON.stringify(f)},b.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,c,f),i=0;i1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return"M"+h(u(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t=90||s>90&&l>=450?1:u<=0&&h<=0?0:Math.max(u,h);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&h>=0?0:Math.min(u,h);n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f);return[e,r,n,i]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(m=f*T))/n.h/2,g=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(m=h,y=(f-(d=h/T))/n.w/2,g=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=m,this.xDomain2=g,this.yDomain2=v;var k,A=this.xOffset2=n.l+n.w*g[0],M=this.yOffset2=n.t+n.h*(1-v[1]),S=this.radius=d/b,E=this.innerRadius=this.getHole(e)*S,L=this.cx=A-S*x[0],C=this.cy=M+S*x[3],P=this.cxx=L-A,I=this.cyy=C-M,O=i.side;"counterclockwise"===O?(k=O,O="top"):"clockwise"===O&&(k=O,O="bottom"),this.radialAxis=this.mockAxis(t,e,i,{_id:"x",side:O,_trueSide:k,domain:[E/n.w,S/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:"x",domain:g}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var z=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",z).attr("transform",l(P,I)),r.frontplot.attr("transform",l(A,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",z).attr("transform",l(L,C)).call(c.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:"linear"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange="x"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=this.getRadial(e);m(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,"gregorian"),n.r2l(a[1],null,"gregorian")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),m=D(r.getSector(e)[0],360),g=r.radialAxis,v=u90&&m<=270&&(g.tickangle=180);var x=y?function(t){var e=O(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(g.l2p(t.x)+u,0)},b=y?function(t){return I(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(g.r2p(t.x)+u)},_=j(d);if(r.radialTickLayout!==_&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),v){g.setScale();var w=0,T=y?(g.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g),k=y?T:h.clipEnds(g,T),A=h.getTickSigns(g)[2];y&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(A=-A),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),h.drawTicks(n,g,{vals:T,layer:i["radial-axis"],path:h.makeTickPath(g,0,A),transFn:x,crisp:!1}),h.drawGrid(n,g,{vals:k,layer:i["radial-grid"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:T,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(g,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i["radial-axis"],v&&(d.showticklabels||d.ticks),{transform:E}),V(i["radial-grid"],v&&d.showgrid,{transform:y?"":S}),V(i["radial-line"].select("line"),v&&d.showline,{x1:y?-a:u,y1:0,x2:a,y2:0,transform:E}).attr("stroke-width",d.linewidth).call(c.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(e),l=this.id+"title",c=0;if(s.title){var f=u.bBox(this.layers["radial-axis"].node()).height,h=s.title.font.size,p=s.side;c="top"===p?h:"counterclockwise"===p?-(f+.4*h):f+.8*h}var d=void 0!==r?r:this.radialAxisAngle,m=R(d),g=Math.cos(m),v=Math.sin(m),y=a+i/2*g+c*v,b=o-i/2*v+c*g;this.layers["radial-axis-title"]=x.draw(n,l,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:z(n,"Click to enter radial axis title"),attributes:{x:y,y:b,"text-anchor":"middle"},transform:{rotate:-d}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),m=r.angularAxis,g=r.isSmith;g||(r.fillViewInitialKey("angularaxis.rotation",d.rotation),m.setGeometry(),m.setScale());var v=g?function(t){var e=O(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return m.t2g(t.x)};"linear"===m.type&&"radians"===m.thetaunit&&(m.tick0=F(m.tick0),m.dtick=F(m.dtick));var y=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=g?function(t){var e=O(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return y(v(t))},b=g?function(t){var e=O(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=v(t);return y(e)+s(-F(e))},_=g?function(t){return P(r,t.x,0,1/0)}:function(t){var e=v(t),r=Math.cos(e),n=Math.sin(e);return"M"+[f+u*r,p-u*n]+"L"+[f+a*r,p-a*n]},w=h.makeLabelFns(m,0).labelStandoff,T={xFn:function(t){var e=v(t);return Math.cos(e)*w},yFn:function(t){var e=v(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=v(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=v(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i["angular-axis"].selectAll("."+m._id+"tick").remove(),r.angularTickLayout=k);var A,S=g?[1/0].concat(m.tickvals||[]).map((function(t){return h.tickText(m,t,!0,!1)})):h.calcTicks(m);if(g&&(S[0].text="\u221e",S[0].fontSize*=1.75),"linear"===e.gridshape?(A=S.map(v),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,"category"===m.type&&(S=S.filter((function(t){return o.isAngleInsideSector(v(t),r.sectorInRad)}))),m.visible){var E="inside"===m.ticks?-1:1,L=(m.linewidth||1)/2;h.drawTicks(n,m,{vals:S,layer:i["angular-axis"],path:"M"+E*L+",0h"+E*m.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,m,{vals:S,layer:i["angular-grid"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:S,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i["angular-line"].select("path"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr("stroke-width",d.linewidth).call(c.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,c=s.isSmith,u=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,m=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,I=E.clampTiny,O=E.findXYatLength,z=E.findEnclosingVertexAngles,D=S.cornerHalfWidth,R=S.cornerLen/2,F=g.makeDragger(f,"path","maindrag",!1===t.dragmode?"none":"crosshair");n.select(F).attr("d",s.pathSubplot()).attr("transform",l(T,k)),F.onmousemove=function(t){y.hover(u,t,s.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){u._dragging||v.unhover(u,t)};var B,N,j,U,V,H,q,G,Y,W={element:F,gd:u,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function Z(t,e){return Math.sqrt(t*t+e*e)}function X(t,e){return Z(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function Q(t,e){if(0===t)return s.pathSector(2*D);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,m)),o=a-D,l=a+D;return"M"+K(o,n)+"A"+[o,o]+" 0,0,0 "+K(o,i)+"L"+K(l,i)+"A"+[l,l]+" 0,0,1 "+K(l,n)+"Z"}function $(t,e,r){if(0===t)return s.pathSector(2*D);var n,i,a=K(t,e),o=K(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=O(D,u,l,c);n=O(R,f,h[0][0],h[0][1]),i=O(R,f,h[1][0],h[1][1])}else{var p,d;c?(p=R,d=D):(p=D,d=R),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function tt(t,e){return e=Math.max(Math.min(e,m),x),tp?(t-1&&1===t&&_(e,u,[s.xaxis],[s.yaxis],s.id,W),r.indexOf("event")>-1&&y.click(u,e,s.id)}W.prepFn=function(t,n,a){var l=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var p=u._fullLayout._invTransform;e=u._fullLayout._invScaleX,r=u._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var v=E.findPolygonOffset(m,L[0],L[1],C);B+=A+v[0],N+=M+v[1]}switch(l){case"zoom":W.clickFn=st,c||(W.moveFn=C?it:rt,W.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=u._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=g.makeZoombox(h,q,T,k,V)).attr("fill-rule","evenodd"),Y=g.makeCorners(h,T,k),w(u)}());break;case"select":case"lasso":b(t,n,a,W,l)}},v.init(W)},N.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,m=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(m.visible){var b,_,T,M=R(i.radialAxisAngle),E=m._rl,L=E[0],C=E[1],P=E[r],I=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T="radialdrag"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T="radialdrag-inner");var O,z,D,B=g.makeRectDragger(u,T,"crosshair",-x,-x,y,y),N={element:B,gd:c};!1===t.dragmode&&(N.dragmode=!1),V(n.select(B),m.visible&&h0==(r?D>L:Dn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o0?1:0}function i(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function a(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function o(t,e){return e*t.radius}e.exports={smith:i,reactanceArc:function(t,e,r,n){var s=a(t,i([r,e])),l=s[0],c=s[1],u=a(t,i([n,e])),f=u[0],h=u[1];if(0===e)return["M"+l+","+c,"L"+f+","+h].join(" ");var p=o(t,1/Math.abs(e));return["M"+l+","+c,"A"+p+","+p+" 0 0,"+(e<0?1:0)+" "+f+","+h].join(" ")},resistanceArc:function(t,e,r,s){var l=o(t,1/(e+1)),c=a(t,i([e,r])),u=c[0],f=c[1],h=a(t,i([e,s])),p=h[0],d=h[1];if(n(r)!==n(s)){var m=a(t,i([e,0]));return["M"+u+","+f,"A"+l+","+l+" 0 0,"+(00){for(var n=[],i=0;i=u&&(h.min=0,d.min=0,g.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function m(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o("uirevision",n.uirevision),e.type="linear";var p=o("color"),d=p!==i.color.dflt?p:r.font.color,m=e._name.charAt(0).toUpperCase(),g="Component "+m,v=o("title.text",g);e._hovertitle=v===g?v:m,a.coerceFont(o,"title.font",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o("min"),u(t,e,o,"linear"),l(t,e,o,"linear"),s(t,e,o,"linear"),c(t,e,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:d}),o("tickangle"),o("tickformat")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o("hoverformat"),o("layer")}e.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":367,"../../lib":515,"../../plot_api/plot_template":555,"../cartesian/line_grid_defaults":581,"../cartesian/prefix_suffix_defaults":583,"../cartesian/tick_label_defaults":587,"../cartesian/tick_mark_defaults":588,"../cartesian/tick_value_defaults":589,"../subplot_defaults":641,"./layout_attributes":644}],646:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("tinycolor2"),a=t("../../registry"),o=t("../../lib"),s=o.strTranslate,l=o._,c=t("../../components/color"),u=t("../../components/drawing"),f=t("../cartesian/set_convert"),h=t("../../lib/extend").extendFlat,p=t("../plots"),d=t("../cartesian/axes"),m=t("../../components/dragelement"),g=t("../../components/fx"),v=t("../../components/dragelement/helpers"),y=v.freeMode,x=v.rectMode,b=t("../../components/titles"),_=t("../../components/selections").prepSelect,w=t("../../components/selections").selectOnClick,T=t("../../components/selections").clearOutline,k=t("../../components/selections").clearSelectionsCache,A=t("../cartesian/constants");function M(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*m-i/2,n=e.t+e.h*(1-g)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:"linear",range:[w+2*k-_,_-w-2*T],domain:[m-o/2,m+o/2],_id:"x"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,_-T-k],domain:[g-l/2,g+l/2],_id:"y"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",C),p.layers.plotbg.select("path").attr("d",C);var P="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",P);var I=s(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",I),p.clipDefRelative.select("path").attr("transform",null);var O=s(r-S._offset,n+a);p.layers.baxis.attr("transform",O),p.layers.bgrid.attr("transform",O);var z=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);p.layers.aaxis.attr("transform",z),p.layers.agrid.attr("transform",z);var D=s(r+i/2,n)+"rotate(-30)"+s(0,-L._offset);p.layers.caxis.attr("transform",D),p.layers.cgrid.attr("transform",D),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(c.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(c.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",L.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(c.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;n["a-title"]=b.draw(e,"a"+r,{propContainer:i,propName:this.id+".aaxis.title",placeholder:l(e,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,"text-anchor":"middle"}}),n["b-title"]=b.draw(e,"b"+r,{propContainer:a,propName:this.id+".baxis.title",placeholder:l(e,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=b.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:l(e,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,"text-anchor":"middle"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll("."+a+"tick").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],m=o.deg2rad(30),g=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b="b"===i?"M0,"+g+"l"+Math.sin(m)*v+","+Math.cos(m)*v:"M"+g+",0l"+Math.cos(m)*v+","+-Math.sin(m)*v,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[i];d.drawTicks(r,t,{vals:"inside"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+"grid"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(.87*L+4.5)+"l2.6,1.5l-"+L/2+","+.87*L+"Z",P="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-2.6,1.5l"+L/2+","+.87*L+"Z",I="m0,1l"+L/2+","+.87*L+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-"+(L/2+2.6)+","+(.87*L+4.5)+"l2.6,1.5l"+L/2+",-"+.87*L+"Z",O=!0;function z(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,M=this,S=M.layers.plotbg.select("path").node(),L=M.graphDiv,D=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+".aaxis.min"]=t.a,e[M.id+".baxis.min"]=t.b,e[M.id+".caxis.min"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;z(L),2===t&&(L.emit("plotly_doubleclick",null),a.call("_guiRelayout",L,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&g.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),m=(l/2+u)*M.w,g=(1-l/2-c)*M.w,y=(m+g)/2,x=g-m,_=(1-l)*M.h,w=_-x/E;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),b=!0),L.emit("plotly_relayouting",R(p))}function V(){z(L),p!==f&&(a.call("_guiRelayout",L,R(p)),O&&L.data&&L._context.showTips&&(o.notifier(l(L,"Double-click to zoom back out"),"long"),O=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var d=s(-t,-e);M.clipDefRelative.select("path").attr("transform",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,M),L.emit("plotly_relayouting",R(p))}function q(){a.call("_guiRelayout",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,u){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var m=M.dragOptions.dragmode=L._fullLayout.dragmode;y(m)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===m?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var u=L._fullLayout._invTransform,m=o.apply3DTransform(u)(r,n);r=m[0],n=m[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),v="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,T=D.append("path").attr("class","zoombox").attr("transform",s(M.x0,M.y0)).style({fill:d>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),k=D.append("path").attr("class","zoombox-corners").attr("transform",s(M.x0,M.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(L)}(0,l,u)):"pan"===m?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearOutline(L)):(x(m)||y(m))&&_(a,l,u,M.dragOptions,m)}},S.onmousemove=function(t){g.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||m.unhover(L,t)},m.init(this.dragOptions)}},{"../../components/color":367,"../../components/dragelement":386,"../../components/dragelement/helpers":385,"../../components/drawing":389,"../../components/fx":407,"../../components/selections":455,"../../components/titles":476,"../../lib":515,"../../lib/extend":505,"../../registry":647,"../cartesian/axes":566,"../cartesian/constants":573,"../cartesian/set_convert":585,"../plots":628,"@plotly/d3":58,tinycolor2:313}],647:[function(t,e,r){"use strict";var n=t("./lib/loggers"),i=t("./lib/noop"),a=t("./lib/push_unique"),o=t("./lib/is_plain_object"),s=t("./lib/dom").addStyleRule,l=t("./lib/extend"),c=t("./plots/attributes"),u=t("./plots/layout_attributes"),f=l.extendFlat,h=l.extendDeepAll;function p(t){var e=t.name,i=t.categories,a=t.meta;if(r.modules[e])n.log("Type "+e+" already registered");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])return void n.log("Plot type "+e+" already registered.");for(var i in v(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:""});for(r=0;r")?"":e.html(t).text()}));return e.remove(),r}(_),_=(_=_.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(_=(_=(_=_.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),_}},{"../components/color":367,"../components/drawing":389,"../constants/xmlns_namespaces":492,"../lib":515,"@plotly/d3":58}],656:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e0?e+=r:u<0&&(e-=r)}return e}function z(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var D=t[f+"a"],R=t[h+"a"];m=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(g,F,t),!1!==t.index&&g[t.index].p!==c){k||(L=function(t){return Math.min(A(t),t.p-y.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+y.bargroupwidth/2)});var B=g[t.index],N=v.base?B.b+B.s:B.s;t[h+"0"]=t[h+"1"]=R.c2p(B[h],!0),t[h+"LabelVal"]=N;var j=y.extents[y.extents.round(B.p)];t[f+"0"]=D.c2p(x?L(B):j[0],!0),t[f+"1"]=D.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+"LabelVal"]=U?B.orig_p:B.p,t.labelLabel=l(D,t[f+"LabelVal"],v[f+"hoverformat"]),t.valueLabel=l(R,t[h+"LabelVal"],v[h+"hoverformat"]),t.baseLabel=l(R,B.b,v[h+"hoverformat"]),t.spikeDistance=(function(t){var e=u,r=t.b,i=O(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+"Spike"]=D.c2p(B.p,!0),o(B,v,t),t.hovertemplate=v.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n,a){var o=u(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,c=s[o.index];return o.color=f(l,c),i.getComponentMethod("errorbars","hoverInfo")(c,l,o),[o]}},hoverOnBars:u,getTraceColor:f}},{"../../components/color":367,"../../components/fx":407,"../../constants/numerical":491,"../../lib":515,"../../plots/cartesian/axes":566,"../../registry":647,"./helpers":663}],665:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc").crossTraceCalc,colorbar:t("../scatter/marker_colorbar"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"bar",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":578,"../scatter/marker_colorbar":954,"./arrays_to_calcdata":656,"./attributes":657,"./calc":658,"./cross_trace_calc":660,"./defaults":661,"./event_data":662,"./hover":664,"./layout_attributes":666,"./layout_defaults":667,"./plot":668,"./select":669,"./style":671}],666:[function(t,e,r){"use strict";e.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"}}},{}],667:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib"),o=t("./layout_attributes");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=s("barmode"),p=0;p0}function S(t){return"auto"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||"end",u="end"===c,f="start"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,m=i.height,g=Math.abs(e-t),v=Math.abs(n-r),y=g>2*_&&v>2*_?_:0;g-=2*y,v-=2*y;var x=S(l);"auto"!==l||d<=g&&m<=v||!(d>g||m>v)||(d>v||m>g)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=A(a.ensureSingle(I,"path"),P,g,v);if(Y.style("vector-effect","non-scaling-stroke").attr("d",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?"M0,0Z":"M"+B+","+j+"V"+U+"H"+N+"V"+j+"Z").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,g,v){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t)}var I=n[0].trace,O="h"===I.orientation,z=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,"texttemplate");if(!s)return"";var l,c,f,h,p="histogram"===o.type,d="waterfall"===o.type,m="funnel"===o.type,g="h"===o.orientation;g?(l="y",c=i,f="x",h=n):(l="x",c=n,f="y",h=i);function v(t){return u(h,h.c2l(t),!0).text}var y=e[r],x={};x.label=y.p,x.labelLabel=x[l+"Label"]=(_=y.p,u(c,c.c2l(_),!0).text);var _;var w=a.castOption(o,y.i,"text");(0===w||w)&&(x.text=w);x.value=y.s,x.valueLabel=x[f+"Label"]=v(y.s);var T={};b(T,o,y.i),(p||void 0===T.x)&&(T.x=g?x.value:x.label);(p||void 0===T.y)&&(T.y=g?x.label:x.value);(p||void 0===T.xLabel)&&(T.xLabel=g?x.valueLabel:x.labelLabel);(p||void 0===T.yLabel)&&(T.yLabel=g?x.labelLabel:x.valueLabel);d&&(x.delta=+y.rawS||y.s,x.deltaLabel=v(x.delta),x.final=y.v,x.finalLabel=v(x.final),x.initial=x.final-x.delta,x.initialLabel=v(x.initial));m&&(x.value=y.s,x.valueLabel=v(x.value),x.percentInitial=y.begR,x.percentInitialLabel=a.formatPercent(y.begR),x.percentPrevious=y.difR,x.percentPreviousLabel=a.formatPercent(y.difR),x.percentTotal=y.sumR,x.percenTotalLabel=a.formatPercent(y.sumR));var k=a.castOption(o,y.i,"customdata");k&&(x.customdata=k);return a.texttemplateString(s,x,t._d3locale,T,x,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split("+"),m=[],g=function(t){return-1!==d.indexOf(t)};g("label")&&m.push((v=t[e].p,u(o?n:r,v,!0).text));var v;g("text")&&(0===(f=a.castOption(i,p.i,"text"))||f)&&m.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;g("initial")&&m.push(c(b)),g("delta")&&m.push(c(y)),g("final")&&m.push(c(x))}if(l){g("value")&&m.push(c(p.s));var _=0;g("percent initial")&&_++,g("percent previous")&&_++,g("percent total")&&_++;var w=_>1;g("percent initial")&&(f=a.formatPercent(p.begR),w&&(f+=" of initial"),m.push(f)),g("percent previous")&&(f=a.formatPercent(p.difR),w&&(f+=" of previous"),m.push(f)),g("percent total")&&(f=a.formatPercent(p.sumR),w&&(f+=" of total"),m.push(f))}return m.join("
")}(e,r,n,i):m.getValue(s.text,r);return m.coerceString(y,o)}(C,n,i,T,M);w=function(t,e){var r=m.getValue(t.textposition,e);return m.coerceEnumerated(x,r)}(I,i);var D="stack"===g.mode||"relative"===g.mode,R=n[i],F=!D||R._outmost;if(!z||"none"===w||(R.isBlank||s===c||f===p)&&("auto"===w||"inside"===w))return void r.select("text").remove();var B=C.font,N=d.getBarColor(n[i],I),j=d.getInsideTextFont(I,i,B,N),U=d.getOutsideTextFont(I,i,B),V=r.datum();O?"log"===T.type&&V.s0<=0&&(s=T.range[0]=G*(X/Y):X>=Y*(Z/G);G>0&&Y>0&&(J||K||Q)?w="inside":(w="outside",H.remove(),H=null)}else w="inside";if(!H){W=a.ensureUniformFontSize(t,"outside"===w?U:j);var $=(H=P(r,z,W)).attr("transform");if(H.attr("transform",""),q=l.bBox(H.node()),G=q.width,Y=q.height,H.attr("transform",$),G<=0||Y<=0)return void H.remove()}var tt,et,rt=I.textangle;"outside"===w?(et="both"===I.constraintext||"outside"===I.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var m=S(c),g=E(i,m),v=(s?g.x:g.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);s?(b=e-M*o,T=M*v):(w=n+M*o,A=-M*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:m}}(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt})):(et="both"===I.constraintext||"inside"===I.constraintext,tt=L(s,c,f,p,q,{isHorizontal:O,constrained:et,angle:rt,anchor:I.insidetextanchor}));tt.fontSize=W.size,h("histogram"===I.type?"bar":I.type,tt,C),R.transform=tt;var nt=A(H,C,g,v);a.setTransormAndDisplay(nt,tt)}(t,e,I,r,p,B,N,j,U,g,v),e.layerClipId&&l.hideOutsideRangePoint(c,I.select("text"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod("errorbars","plot")(t,I,e,g)},toMoveInsideBar:L}},{"../../components/color":367,"../../components/drawing":389,"../../components/fx/helpers":403,"../../lib":515,"../../lib/svg_text_utils":541,"../../plots/cartesian/axes":566,"../../registry":647,"./attributes":657,"./constants":659,"./helpers":663,"./style":671,"./uniform_text":673,"@plotly/d3":58,"fast-isnumeric":190}],669:[function(t,e,r){"use strict";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:m,styleOnSelect:function(t,e,r){var i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each((function(t){var i,s=n.select(this);if(t.selected){i=o.ensureUniformFontSize(r,g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)}))}(t.selectAll("text"),e,r)}(r,i,t):(d(r,i,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{"../../components/color":367,"../../components/drawing":389,"../../lib":515,"../../registry":647,"./attributes":657,"./helpers":663,"./uniform_text":673,"@plotly/d3":58}],672:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults"),o=t("../../lib").coercePattern;e.exports=function(t,e,r,s,l){var c=r("marker.color",s),u=i(t,"marker");u&&a(t,e,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",c,u),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":367,"../../components/colorscale/defaults":377,"../../components/colorscale/helpers":378,"../../lib":515}],673:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib");function a(t){return"_"+t+"Text_minsize"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=oh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return m(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?g+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":407,"../../lib":515,"../../plots/polar/helpers":630,"../bar/hover":664,"../scatterpolar/hover":1015}],678:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("../scatterpolar/format_labels"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":631,"../bar/select":669,"../bar/style":671,"../scatter/marker_colorbar":954,"../scatterpolar/format_labels":1014,"./attributes":674,"./calc":675,"./defaults":676,"./hover":677,"./layout_attributes":679,"./layout_defaults":680,"./plot":681}],679:[function(t,e,r){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],680:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select("g.barlayer");a.makeTraceGroups(p,r,"trace bars").each((function(){var r=n.select(this),s=a.ensureSingle(r,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var m=u.c2g(t.s1),g=(p+d)/2;t.ct=[l.c2p(m*Math.cos(g)),c.c2p(m*Math.sin(g))],e=h(o,s,p,d)}else e="M0,0Z";a.ensureSingle(r,"path").attr("d",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},{"../../components/drawing":389,"../../lib":515,"../../plots/polar/helpers":630,"@plotly/d3":58,"fast-isnumeric":190}],682:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../bar/attributes"),a=t("../../components/color/attributes"),o=t("../../plots/cartesian/axis_format_attributes").axisHoverFormat,s=t("../../plots/template_attributes").hovertemplateAttrs,l=t("../../lib/extend").extendFlat,c=n.marker,u=c.line;e.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:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("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"},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:l({},c.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},c.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},c.angle,{arrayOk:!1,editType:"calc"}),size:l({},c.size,{arrayOk:!1,editType:"calc"}),color:l({},c.color,{arrayOk:!1,editType:"style"}),line:{color:l({},u.color,{arrayOk:!1,dflt:a.defaultLine,editType:"style"}),width:l({},u.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:n.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":366,"../../lib/extend":505,"../../plots/cartesian/axis_format_attributes":569,"../../plots/template_attributes":642,"../bar/attributes":657,"../scatter/attributes":936}],683:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../../plots/cartesian/align_period"),o=t("../../lib"),s=t("../../constants/numerical").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||"x"),A=i.getFromId(t,e.yaxis||"y"),M=[],S="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(y=k,x="x",b=A,_="y",w=!!e.yperiodalignment):(y=A,x="y",b=k,_="x",w=!!e.xperiodalignment);var E,L,C,P,I,O,z=function(t,e,r,i){var s,l=e+"0"in t,c="d"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(t.name)&&"date"===r.type)?t.name:i;for(var f="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V("lowerfence");E.lf=Y!==s&&Y<=E.q1?Y:p(E,C,P);var W=V("upperfence");E.uf=W!==s&&W>=E.q3?W:d(E,C,P);var Z=V("mean");E.mean=Z!==s?Z:P?o.mean(C,P):(E.q1+E.q3)/2;var X=V("sd");E.sd=Z!==s&&X>=0?X:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=m(E),E.uo=g(E);var J=V("notchspan");J=J!==s&&J>0?J:v(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),Q=Math.max(Q,C[P-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[y._id]=i.findExtremes(y,[H,q],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ct))lt?(ut=C.slice(0,P/2),ft=C.slice(P/2+1)):ct&&(ut=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(C,.25),E.q3=o.interp(C,.75);E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=m(E),E.uo=g(E);var ht=v(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,"median:"),min:l(t,"min:"),q1:l(t,"q1:"),q3:l(t,"q3:"),max:l(t,"max:"),mean:"sd"===e.boxmean?l(t,"mean \xb1 \u03c3:"):l(t,"mean:"),lf:l(t,"lower fence:"),uf:l(t,"upper fence:")}},T[S]++,M):[{t:{empty:!0}}]};var c={text:"tx",hovertext:"htx"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function m(t){return 4*t.q1-3*t.q3}function g(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{"../../constants/numerical":491,"../../lib":515,"../../plots/cartesian/align_period":563,"../../plots/cartesian/axes":566,"fast-isnumeric":190}],684:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib"),a=t("../../plots/cartesian/constraints").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],m=0;for(s=0;s1,b=1-f[t+"gap"],_=1-f[t+"groupgap"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;q+G>=0&&((W=V*(q+G))>M?(H=!0,j=Y,B=W):W>R&&(j=Y,B=M)),W<=M&&(B=M);var Z=0;q-G<=0&&((Z=-V*(q-G))>S?(H=!0,U=Y,N=Z):Z>F&&(U=Y,N=S)),Z<=S&&(N=S)}else B=M,N=S;var X=new Array(c.length);for(l=0;l0?(g="v",v=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",v=Math.min(_)):v=0;if(v){e._length=v;var S=r("orientation",g);e._hasPreCompStats?"v"===S&&0===x?(r("x0",0),r("dx",1)):"h"===S&&0===y&&(r("y0",0),r("dy",1)):"v"===S&&0===x?r("x0"):"h"===S&&0===y&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";e._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var u=r(a+"points",l);u?(r("jitter","all"===u?.3:0),r("pointpos","all"===u?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",e.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===u&&(r("marker.line.outliercolor",e.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 e.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s),s("xhoverformat"),s("yhoverformat");var l=e._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(t.marker||{}).color||r),s("line.width"),s("fillcolor",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s("mean"),d=s("sd");p&&p.length&&(h=!0,d&&d.length&&(h="sd"))}s("boxmean",h),s("whiskerwidth"),s("width"),s("quartilemethod");var m=!1;if(l){var g=s("notchspan");g&&g.length&&(m=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(m=!0);s("notched",m)&&s("notchwidth"),f(t,e,s,{prefix:"box"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,m=l.c2p(t.mean,!0),g=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+m+","+i+"V"+a+("sd"===p?"m0,0L"+g+","+d+"L"+m+","+i+"L"+v+","+d+"Z":"")):n.select(this).attr("d","M"+i+","+m+"H"+a+("sd"===p?"m0,0L"+d+","+g+"L"+i+","+m+"L"+d+","+v+"Z":""))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,"trace boxes").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():("h"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{"../../components/drawing":389,"../../lib":515,"@plotly/d3":58}],692:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,I=L>0?Math.ceil:Math.floor,O=L>0?Math.min:Math.max,z=L>0?Math.max:Math.min,D=P(S+C),R=I(E-C),F=[[f=M(S)]];for(a=D;a*L=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],706:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e,r){var a,o,s,l,c,u,f,h,p,d,m,g,v,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var I=b.smoothing?3:1;function O(n){var i,a,o,s,l,c,u,f,p,d,m,g,v=[],y=[],x={};if("b"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(C-2,i))),u=i-c,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(m=t.dxydj([],c,a-1,u,0),v.push(l[0]+m[0]/3),y.push(l[1]+m[1]/3),g=t.dxydj([],c,a-1,u,1),v.push(f[0]-g[0]/3),y.push(f[1]-g[1]/3)),v.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=h,x.x=v,x.y=y,x.smoothing=A.smoothing,x}function z(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,"b"===e)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;ix.length-1||_.push(i(z(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=u;hx.length-1||m<0||m>x.length-1))for(g=x[s],v=x[m],a=0;ax[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(z(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=c[1],h=u;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(O(p),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=u-1;hx[x.length-1]||w.push(i(O(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(O(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":505,"../../plots/cartesian/axes":566}],707:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],721:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../components/drawing"),a=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=c.strRotate,f=c.strTranslate,h=t("../../constants/alignment");function p(t,e,r,s,l,c){var u="const-"+l+"-lines",f=r.selectAll("."+u).data(c);f.enter().append("path").classed(u,!0).style("vector-effect","non-scaling-stroke"),f.each((function(r){var s=r,l=s.x,c=s.y,u=a([],l,t.c2p),f=a([],c,e.c2p),h="M"+o(u,f,s.smoothing);n.select(this).attr("d",h).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",i.dashStyle(s.dash,s.width)).style("fill","none")})),f.exit().remove()}function d(t,e,r,a,o,c,h,p){var d=c.selectAll("text."+p).data(h);d.enter().append("text").classed(p,!0);var m=0,g={};return d.each((function(o,c){var h;if("auto"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(g={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({"text-anchor":d>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr("transform",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),m=Math.max(m,y.width+o.axis.labelpadding)})),d.exit().remove(),g.maxExtent=m,g}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,"trace").each((function(e){var r=n.select(this),i=e[0],h=i.trace,m=h.aaxis,g=h.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",h.opacity),p(l,u,x,m,"a",m._gridlines),p(l,u,x,g,"b",g._gridlines),p(l,u,y,m,"a",m._minorgridlines),p(l,u,y,g,"b",g._minorgridlines),p(l,u,b,m,"a-boundary",m._boundarylines),p(l,u,b,g,"b-boundary",g._boundarylines);var w=d(t,l,u,h,i,_,m._labels,"a-label"),T=d(t,l,u,h,i,_,g._labels,"b-label");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),m=c.aggNums(Math.max,null,r.a),g=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+m),f=g,h=r.ab2xy(u,f,!0),p=r.dxyda_rough(u,f),void 0===o.angle&&c.extendFlat(o,s(r,i,a,h,r.dxydb_rough(u,f)));v(t,e,r,n,h,p,r.aaxis,i,a,o,"a-title"),u=d,f=.5*(g+y),h=r.ab2xy(u,f,!0),p=r.dxydb_rough(u,f),void 0===l.angle&&c.extendFlat(l,s(r,i,a,h,r.dxyda_rough(u,f)));v(t,e,r,n,h,p,r.baxis,i,a,l,"b-title")}(t,_,h,i,l,u,w,T),function(t,e,r,n,i){var s,l,u,f,h=r.select("#"+t._clipPathId);h.size()||(h=r.append("clipPath").classed("carpetclip",!0));var p=c.ensureSingle(h,"path","carpetboundary"),d=e.clipsegments,m=[];for(f=0;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+g)*m*a-_),b.attr("transform",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr("text-anchor","middle").call(i.font,h.title.font)})),b.exit().remove()}},{"../../components/drawing":389,"../../constants/alignment":483,"../../lib":515,"../../lib/svg_text_utils":541,"./makepath":718,"./map_1d_array":719,"./orient_text":720,"@plotly/d3":58}],722:[function(t,e,r){"use strict";var n=t("./constants"),i=t("../../lib/search").findBin,a=t("./compute_control_points"),o=t("./create_spline_evaluator"),s=t("./create_i_derivative_evaluator"),l=t("./create_j_derivative_evaluator");e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[c-1],m=r[0],g=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,m-=b,g+=b,t.isVisible=function(t,e){return t>p&&tm&&ed||eg},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(ne[c-1]|ir[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,m=0,g=0,v=[];ne[c-1]?(f=c-2,h=1,m=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),ir[u-1]?(p=u-2,d=1,g=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),m&&(t.dxydi(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m),g&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=v*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":535,"./compute_control_points":710,"./constants":711,"./create_i_derivative_evaluator":712,"./create_j_derivative_evaluator":713,"./create_spline_evaluator":714}],723:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var i,a,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log("Smoother converged to",k,"after",A,"iterations"),t}},{"../../lib":515}],724:[function(t,e,r){"use strict";var n=t("../../lib").isArray1D;e.exports=function(t,e,r){var i=r("x"),a=i&&i.length,o=r("y"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,a&&!n(i)||s&&!n(o))e._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{"../../lib":515}],725:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../scattergeo/attributes"),a=t("../../components/colorscale/attributes"),o=t("../../plots/attributes"),s=t("../../components/color/attributes").defaultLine,l=t("../../lib/extend").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:i.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":366,"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plots/attributes":562,"../../plots/template_attributes":642,"../scattergeo/attributes":978}],726:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../constants/numerical").BADNUM,a=t("../../components/colorscale/calc"),o=t("../scatter/arrays_to_calcdata"),s=t("../scatter/calc_selection");function l(t){return t&&"string"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f")}(t,f,o),[t]}},{"../../lib":515,"../../plots/cartesian/axes":566,"./attributes":725}],730:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"choropleth",basePlotModule:t("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":598,"../heatmap/colorbar":804,"./attributes":725,"./calc":726,"./defaults":727,"./event_data":728,"./hover":729,"./plot":731,"./select":732,"./style":733}],731:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=t("../../lib/geo_location_utils"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../plots/cartesian/autorange").findExtremes,l=t("./style").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u="geojson-id"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{"../../plots/mapbox/constants":620,"./convert":735}],739:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../mesh3d/attributes"),s=t("../../plots/attributes"),l=t("../../lib/extend").extendFlat,c={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(c,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach((function(t){c[t]=o[t]})),c.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),c.transforms=void 0,e.exports=c},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plots/attributes":562,"../../plots/cartesian/axis_format_attributes":569,"../../plots/template_attributes":642,"../mesh3d/attributes":876}],740:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;co.level||o.starts.length&&a===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r":p>c&&(n.prefixBoundary=!0);break;case"<":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case"][":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],747:[function(t,e,r){"use strict";var n=t("../../components/colorscale"),i=t("./make_color_map"),a=t("./end_plus");e.exports={min:"zmin",max:"zmax",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if("heatmap"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{"../../components/colorscale":379,"./end_plus":755,"./make_color_map":760}],748:[function(t,e,r){"use strict";e.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}}},{}],749:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./label_defaults"),a=t("../../components/color"),o=a.addOpacity,s=a.opacity,l=t("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,a,l,f){var h,p,d,m=e.contours,g=r("contours.operation");(m._operation=c[g],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,m),"="===g?h=m.showlines=!0:(h=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),h)&&(p=r("line.color",d&&s(d)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash"));r("line.smoothing"),i(r,a,p,f)}},{"../../components/color":367,"../../constants/filter_ops":487,"./label_defaults":759,"fast-isnumeric":190}],750:[function(t,e,r){"use strict";var n=t("../../constants/filter_ops"),i=t("fast-isnumeric");function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":487,"fast-isnumeric":190}],751:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=n("contours.start"),a=n("contours.end"),o=!1===i||!1===a,s=r("contours.size");!(o?e.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],752:[function(t,e,r){"use strict";var n=t("../../lib");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),a=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":515,"./constraint_mapping":750,"./end_plus":755}],755:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],756:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./constants");function a(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1;return[n,a]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,m=t.z[0].length,g=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log("Found bad marching index:",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(","),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>m-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===g[0]&&e[1]===g[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,T,k,A,M,S,E,L,C,P,I,O,z=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,a,o,s,l,c,u,f,h=t[0].z,p=h.length,d=h[0].length,m=2===p||2===d;for(r=0;r=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):i.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;f+="L"+n}if(s===t.edgepaths.length){i.log("unclosed perimeter path");break}h=s,(d=-1===p.indexOf(h))&&(h=p[0],f+="Z")}for(h=0;hn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(h<1||p<1)return 1/0;var d=v.EDGECOST*(1/(h-1)+1/(p-1));d+=v.ANGLECOST*c*c;for(var m=s-u,g=l-f,y=s+u,x=l+f,b=0;b2*v.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(h<=v.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){var l=t.selectAll("text").data(e,(function(t){return t.text+","+t.x+","+t.y+","+t.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+i+")"}).call(s.convertToTspans,r)})),o){for(var c="",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{"../../lib":515,"../../plots/cartesian/axes":566}],764:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../components/drawing"),a=t("../heatmap/style"),o=t("./make_color_map");e.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",(function(t){return t[0].trace.opacity})),e.each((function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u="constraint"===a.type,f=!u&&"lines"===a.coloring,h=!u&&"fill"===a.coloring,p=f||h?o(r):null;e.selectAll("g.contourlevel").each((function(t){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)}));var d=a.labelfont;if(e.selectAll("g.contourlabels text").each((function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})})),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(h){var m;e.selectAll("g.contourfill path").style("fill",(function(t){return void 0===m&&(m=t.level),p(t.level+.5*l)})),void 0===m&&(m=c),e.selectAll("g.contourbg path").style("fill",p(m-.5*l))}})),a(t)}},{"../../components/drawing":389,"../heatmap/style":814,"./make_color_map":760,"@plotly/d3":58}],765:[function(t,e,r){"use strict";var n=t("../../components/colorscale/defaults"),i=t("./label_defaults");e.exports=function(t,e,r,a,o){var s,l=r("contours.coloring"),c="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),i(r,a,c,o)}},{"../../components/colorscale/defaults":377,"./label_defaults":759}],766:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),i=t("../contour/attributes"),a=t("../../components/colorscale/attributes"),o=t("../../lib/extend").extendFlat,s=i.contours;e.exports=o({carpet:{valType:"string",editType:"calc"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../contour/attributes":744,"../heatmap/attributes":801}],767:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),i=t("../../lib"),a=t("../heatmap/convert_column_xyz"),o=t("../heatmap/clean_2d_array"),s=t("../heatmap/interp2d"),l=t("../heatmap/find_empties"),c=t("../heatmap/make_bound_array"),u=t("./defaults"),f=t("../carpet/lookup_carpetid"),h=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var m=function(t,e){var r,u,f,h,p,d,m,g=e._carpetTrace,v=g.aaxis,y=g.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,"a","b",["z"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,"_a"):[],h=h?y.makeCalcdata(e,"_b"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,m=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(m),s(m,e._emptypoints);var x=i.maxRowLength(m),b="scaled"===e.xtype?"":r,_=c(e,b,u,f,x,v),w="scaled"===e.ytype?"":h,T=c(e,w,p,d,m.length,y),k={a:_,b:T,z:m};"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:m,containerStr:"",cLetter:"z"});return[k]}(t,e);return h(e,e._z),m}}},{"../../components/colorscale/calc":375,"../../lib":515,"../carpet/lookup_carpetid":717,"../contour/set_contours":763,"../heatmap/clean_2d_array":803,"../heatmap/convert_column_xyz":805,"../heatmap/find_empties":807,"../heatmap/interp2d":810,"../heatmap/make_bound_array":812,"./defaults":768}],768:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/xyz_defaults"),a=t("./attributes"),o=t("../contour/constraint_defaults"),s=t("../contour/contours_defaults"),l=t("../contour/style_defaults");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,a,r,i)}if(u("carpet"),t.a&&t.b){if(!i(t,e,u,c,"a","b"))return void(e.visible=!1);u("text"),"constraint"===u("contours.type")?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,(function(r){return n.coerce2(t,e,a,r)})),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{"../../lib":515,"../contour/constraint_defaults":749,"../contour/contours_defaults":751,"../contour/style_defaults":765,"../heatmap/xyz_defaults":816,"./attributes":766}],769:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../contour/colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":578,"../contour/colorbar":747,"../contour/style":764,"./attributes":766,"./calc":767,"./defaults":768,"./plot":770}],770:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../carpet/map_1d_array"),a=t("../carpet/makepath"),o=t("../../components/drawing"),s=t("../../lib"),l=t("../contour/make_crossings"),c=t("../contour/find_all_paths"),u=t("../contour/plot"),f=t("../contour/constants"),h=t("../contour/convert_to_constraints"),p=t("../contour/empty_pathinfo"),d=t("../contour/close_boundaries"),m=t("../carpet/lookup_carpetid"),g=t("../carpet/axis_aligned_line");function v(t,e,r){var n=t.getPointAtLength(e),i=t.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 y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=m(t,k),M=t.calcdata[A.index][0];if(A.visible&&"legendonly"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P="constraint"===L.type,I=L._operation,O=P?"="===I?"lines":"fill":L.coloring,z=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(C,D,R);var F,B,N,j,U=C;"constraint"===L.type&&(U=h(C,I)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H="M"+V.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,f,h,p=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(h=0;h=0&&(h=L,d=m):Math.abs(f[1]-h[1])=0&&(h=L,d=m):s.log("endpt to newendpt is not vert. or horz.",f,h,L)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+"Z",f=null)}for(u=0;ug&&(n.max=g);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/I),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":d?k:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":m?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:f},c.heatmap.layout.visibility="visible",c}},{"../../components/color":367,"../../components/colorscale":379,"../../constants/numerical":491,"../../lib":515,"../../lib/geojson_utils":509,"fast-isnumeric":190}],774:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/colorscale/defaults"),a=t("./attributes");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(e._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":377,"../../lib":515,"./attributes":771}],775:[function(t,e,r){"use strict";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],776:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../scattermapbox/hover").hoverPoints,a=t("../scattermapbox/hover").getExtraText;e.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=n.tickText(f,f.c2l(u.z),"hover").text}return s.extraText=a(c,u,l[0].t.labels),[s]}}},{"../../plots/cartesian/axes":566,"../scattermapbox/hover":1007}],777:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),formatLabels:t("../scattermapbox/format_labels"),calc:t("./calc"),plot:t("./plot"),hoverPoints:t("./hover"),eventData:t("./event_data"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},{"../../plots/mapbox/constants":620,"./convert":773}],779:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(u,h),[l]}}},{"../../components/color":367,"../../lib":515,"../bar/hover":664}],787:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":578,"../bar/select":669,"./attributes":780,"./calc":781,"./cross_trace_calc":783,"./defaults":784,"./event_data":785,"./hover":786,"./layout_attributes":788,"./layout_defaults":789,"./plot":790,"./style":791}],788:[function(t,e,r){"use strict";e.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"}}},{}],789:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":367,"../../components/drawing":389,"../../constants/interactions":490,"../bar/style":671,"../bar/uniform_text":673,"@plotly/d3":58}],792:[function(t,e,r){"use strict";var n=t("../pie/attributes"),i=t("../../plots/attributes"),a=t("../../plots/domain").attributes,o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../plots/template_attributes").texttemplateAttrs,l=t("../../lib/extend").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:a({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"}}},{"../../lib/extend":505,"../../plots/attributes":562,"../../plots/domain":593,"../../plots/template_attributes":642,"../pie/attributes":910}],793:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="funnelarea",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{"../../plots/plots":628}],794:[function(t,e,r){"use strict";var n=t("../pie/calc");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:"funnelarea"})}}},{"../pie/calc":912}],795:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText,s=t("../pie/defaults").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c("labels"),f=c("values"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),p){e._length=p,c("marker.line.width")&&c("marker.line.color",l.paper_bgcolor),c("marker.colors"),c("scalegroup");var d,m=c("text"),g=c("texttemplate");if(g||(d=c("textinfo",Array.isArray(m)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),g||d&&"none"!==d){var v=c("textposition");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c("title.text")&&(c("title.position"),n.coerceFont(c,"title.font",l.font)),c("aspectratio"),c("baseratio")}else e.visible=!1}},{"../../lib":515,"../../plots/domain":593,"../bar/defaults":661,"../pie/defaults":913,"./attributes":792}],796:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:t("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style"),styleOne:t("../pie/style_one"),meta:{}}},{"../pie/style_one":921,"./attributes":792,"./base_plot":793,"./calc":794,"./defaults":795,"./layout_attributes":797,"./layout_defaults":798,"./plot":799,"./style":800}],797:[function(t,e,r){"use strict";var n=t("../pie/layout_attributes").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":917}],798:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},{"../../lib":515,"./layout_attributes":797}],799:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../components/drawing"),a=t("../../lib"),o=a.strScale,s=a.strTranslate,l=t("../../lib/svg_text_utils"),c=t("../bar/plot").toMoveInsideBar,u=t("../bar/uniform_text"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t("../pie/helpers"),d=t("../pie/plot"),m=d.attachFxHandlers,g=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._context.staticPlot,u=t._fullLayout;h("funnelarea",u),y(e,t),v(e,u._size),a.makeTraceGroups(u._funnelarealayer,e,"trace").each((function(e){var h=n.select(this),d=e[0],v=d.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var m=1/0,g=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var A=p[k+=1][0],M=p[k][1];h.TL=[-A,M],h.TR=[A,M],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),h.each((function(){var h=n.select(this).selectAll("g.slice").data(e);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each((function(o,s){if(o.hidden)n.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=v.index;var h=d.cx,y=d.cy,x=n.select(this),w=x.selectAll("path.surface").data([o]);w.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),x.call(m,t,e);var T="M"+(h+o.TR[0])+","+(y+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+"Z";w.attr("d",T),b(t,o,d);var k=p.castOption(v.textposition,o.pts),A=x.selectAll("g.slicetext").data(o.text&&"none"!==k?[0]:[]);A.enter().append("g").classed("slicetext",!0),A.exit().remove(),A.each((function(){var r=a.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),p=a.ensureUniformFontSize(t,g(v,o,u.font));r.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,p).call(l.convertToTspans,t);var d,m,x,b=i.bBox(r.node()),_=Math.min(o.BL[1],o.BR[1])+y,w=Math.max(o.TL[1],o.TR[1])+y;m=Math.max(o.TL[0],o.BL[0])+h,x=Math.min(o.TR[0],o.BR[0])+h,(d=c(m,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=p.size,f(v.type,d,u),e[s].transform=d,a.setTransormAndDisplay(r,d)}))}}));var y=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);y.enter().append("g").classed("titletext",!0),y.exit().remove(),y.each((function(){var e=a.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),r=v.title.text;v._meta&&(r=a.templateString(r,v._meta)),e.text(r).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,v.title.font).call(l.convertToTspans,t);var c=x(d,u._size);e.attr("transform",s(c.x,c.y)+o(Math.min(1,c.scale))+s(c.tx,c.ty))}))}))}))}},{"../../components/drawing":389,"../../lib":515,"../../lib/svg_text_utils":541,"../bar/plot":668,"../bar/uniform_text":673,"../pie/helpers":915,"../pie/plot":919,"@plotly/d3":58}],800:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../pie/style_one"),a=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(".trace");a(t,e,"funnelarea"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(i,t,e)}))}))}},{"../bar/uniform_text":673,"../pie/style_one":921,"@plotly/d3":58}],801:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../plots/font_attributes"),o=t("../../plots/cartesian/axis_format_attributes").axisHoverFormat,s=t("../../plots/template_attributes").hovertemplateAttrs,l=t("../../plots/template_attributes").texttemplateAttrs,c=t("../../components/colorscale/attributes"),u=t("../../lib/extend").extendFlat;e.exports=u({z:{valType:"data_array",editType:"calc"},x:u({},n.x,{impliedEdits:{xtype:"array"}}),x0:u({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:u({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:u({},n.y,{impliedEdits:{ytype:"array"}}),y0:u({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:u({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:u({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:u({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:u({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:u({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:u({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:u({},n.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:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:a({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:u({},i.showlegend,{dflt:!1})},{transforms:void 0},c("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plots/attributes":562,"../../plots/cartesian/axis_format_attributes":569,"../../plots/font_attributes":594,"../../plots/template_attributes":642,"../scatter/attributes":936}],802:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("../../plots/cartesian/align_period"),s=t("../histogram2d/calc"),l=t("../../components/colorscale/calc"),c=t("./convert_column_xyz"),u=t("./clean_2d_array"),f=t("./interp2d"),h=t("./find_empties"),p=t("./make_bound_array"),d=t("../../constants/numerical").BADNUM;function m(t){for(var e=[],r=t.length,n=0;nD){O("x scale is not linear");break}}if(x.length&&"fast"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){O("y scale is not linear");break}}}var B=i.maxRowLength(T),N="scaled"===e.xtype?"":r,j=p(e,N,g,v,B,M),U="scaled"===e.ytype?"":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(H.orig_x=y),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:"z"}),E&&e.contours&&"heatmap"===e.contours.coloring){var q={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,g,v,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},{"../../components/colorscale/calc":375,"../../constants/numerical":491,"../../lib":515,"../../plots/cartesian/align_period":563,"../../plots/cartesian/axes":566,"../../registry":647,"../histogram2d/calc":835,"./clean_2d_array":803,"./convert_column_xyz":805,"./find_empties":807,"./interp2d":810,"./make_bound_array":812}],803:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||m)[2]+(f[[r+1,i]]||m)[2]+(f[[r,i-1]]||m)[2]+(f[[r,i+1]]||m)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)f[a]=l[a],u.push(l[a])}return u.sort((function(t,e){return e[2]-t[2]}))}},{"../../lib":515}],808:[function(t,e,r){"use strict";var n=t("../../components/fx"),i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("../../components/colorscale").extractOpts;e.exports=function(t,e,r,s,l){l||(l={});var c,u,f,h,p=l.isContour,d=t.cd[0],m=d.trace,g=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=m.zhoverformat,A=y,M=x;if(!1!==t.index){try{f=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index)}if(f<0||f>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*y[0]-y[1]],S=1;Sm&&(v=Math.max(v,Math.abs(t[a][o]-d)/(g-m))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log("interp2d didn't converge quickly",i),t}},{"../../lib":515}],811:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){t("texttemplate");var r=n.extendFlat({},e.font,{color:"auto",size:"auto"});n.coerceFont(t,"textfont",r)}},{"../../lib":515}],812:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib").isArrayOrTypedArray;e.exports=function(t,e,r,a,o,s){var l,c,u,f=[],h=n.traceIs(t,"contour"),p=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(i(e)&&e.length>1&&!p&&"category"!==s.type){var m=e.length;if(!(m<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u0;)_=w.c2p(R[S]),S--;for(_0;)M=T.c2p(F[S]),S--;if(MGt||Gt>T._length))for(E=Ut;EWt||Wt>w._length)){var Zt=u({x:Yt,y:qt},I,t._fullLayout);Zt.x=Yt,Zt.y=qt;var Xt=P.z[S][E];void 0===Xt?(Zt.z="",Zt.zLabel=""):(Zt.z=Xt,Zt.zLabel=s.tickText(Ft,Xt,"hover").text);var Jt=P.text&&P.text[S]&&P.text[S][E];void 0!==Jt&&!1!==Jt||(Jt=""),Zt.text=Jt;var Kt=l.texttemplateString(Dt,Zt,t._fullLayout._d3locale,Zt,I._meta||{});if(Kt){var Qt=Kt.split("
"),$t=Qt.length,te=0;for(L=0;L<$t;L++)te=Math.max(te,Qt[L].length);Ht.push({l:$t,c:te,t:Kt,x:Wt,y:Gt,z:Xt})}}}}var ee=I.textfont,re=ee.family,ne=ee.size,ie=t._fullLayout.font.size;if(!ne||"auto"===ne){var ae=1/0,oe=1/0,se=0,le=0;for(L=0;L0&&(a=!0);for(var l=0;la){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]c?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&&t>o){var l=d(e,a,s),c=d(r,a,s),u=t===i?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(t,e,r,n,a){var s,l,c=-1.1*e,h=-.1*e,p=t-h,d=r[0],m=r[1],g=Math.min(f(d+h,d+p,n,a),f(m+h,m+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(m+c,m+h,n,a));if(g>v&&vo){var y=s===i?1:6,x=s===i?"M12":"M1";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,a);if(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),z.start=r.l2r(j),F||i.nestedProperty(e,v+".start").set(z.start)}var U=b.end,V=r.r2l(O.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);z.end=r.l2r(q),H||i.nestedProperty(e,v+".start").set(z.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[z,d]}e.exports={calc:function(t,e){var r,a,p,d,m=[],g=[],v="h"===e.orientation,y=o.getFromId(t,v?e.yaxis:e.xaxis),x=v?"y":"x",b={x:"y",y:"x"}[x],_=e[x+"calendar"],w=e.cumulative,T=h(t,e,y,x),k=T[0],A=T[1],M="string"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],I=0,O=e.histnorm,z=e.histfunc,D=-1!==O.indexOf("density");w.enabled&&D&&(O=O.replace(/ ?density$/,""),D=!1);var R,F="max"===z||"min"===z?null:0,B=l.count,N=c[O],j=!1,U=function(t){return y.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&"count"!==z&&(R=e[b],j="avg"===z,B=l[z]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if("increasing"===e){for(n=1;n=0;n--)t[n]+=t[n+1];"exclude"===r&&(t.push(0),t.shift())}}(g,w.direction,w.currentbin);var K=Math.min(m.length,g.length),Q=[],$=0,tt=K-1;for(r=0;r=$;r--)if(g[r]){tt=r;break}for(r=$;r<=tt;r++)if(n(m[r])&&n(g[r])){var et={p:m[r],s:g[r],b:0};w.enabled||(et.pts=P[r],Y?et.ph0=et.ph1=P[r].length?A[P[r][0]]:m[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),Q.push(et)}return 1===Q.length&&(Q[0].width1=o.tickIncrement(Q[0].p,k.size,!1,_)-Q[0].p),s(Q,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(Q,e,X),Q},calcAllAutoBins:h}},{"../../lib":515,"../../plots/cartesian/axes":566,"../../registry":647,"../bar/arrays_to_calcdata":656,"./average":822,"./bin_functions":824,"./bin_label_vals":825,"./norm_functions":833,"fast-isnumeric":190}],827:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],828:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axis_ids"),a=t("../../registry").traceIs,o=t("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=t("../../plots/cartesian/constraints").getAxisGroup,c=[{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"}],u=["x","y"];e.exports=function(t,e){var r,f,h,p,d,m,g,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return"v"===t.orientation?"x":"y"}function T(t,r,a){var o=t.uid+"__"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+"calendar"]||"",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn(["Attempted to group the bins of trace",t.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&n.warn(["Attempted to group the bins of trace",t.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+"calendar"]||""}),t["_"+a+"bingroup"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P="string"==typeof w.size,I="string"==typeof A.size,O=[],z=[],D=P?O:w,R=I?z:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf("density"),H="max"===U||"min"===U?null:0,q=a.count,G=o[j],Y=!1,W=[],Z=[],X="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";X&&"count"!==U&&(Y="avg"===U,q=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d-1,flipY:L.tiling.flip.indexOf("y")>-1,orientation:L.tiling.orientation,pad:{inner:L.tiling.pad},maxDepth:L._maxDepth}).descendants(),z=1/0,D=-1/0;O.forEach((function(t){var e=t.depth;e>=L._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),D=Math.max(D,e))})),p=p.data(O,u.getPtId),L._maxVisibleLayers=isFinite(D)?D-z+1:0,p.enter().append("g").classed("slice",!0),T(p,!1,{},[m,g],x),p.order();var R=null;if(w&&M){var F=u.getPtId(M);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:m,y0:0,y1:g}},N=p;return w&&(N=N.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-L.tiling.pad),s._hoverY=y(I?s.y1-L.tiling.pad/2:s.y0+L.tiling.pad/2);var p=n.select(this),d=i.ensureSingle(p,"path","surface",(function(t){t.style("pointer-events",S?"none":"all")}));w?d.transition().attrTween("d",(function(t){var e=k(t,!1,B(),[m,g],{orientation:L.tiling.orientation,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1});return function(t){return x(e(t))}})):d.attr("d",x),p.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),d.call(l,s,L,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h(s,r,L,e,E)||"";var T=i.ensureSingle(p,"g","slicetext"),M=i.ensureSingle(T,"text","",(function(t){t.attr("data-notex",1)})),O=i.ensureUniformFontSize(t,u.determineTextFont(L,s,E.font));M.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":C?"start":"middle").call(a.font,O).call(o.convertToTspans,t),s.textBB=a.bBox(M.node()),s.transform=b(s,{fontSize:O.size}),s.transform.fontSize=O.size,w?M.transition().attrTween("transform",(function(t){var e=A(t,!1,B(),[m,g]);return function(t){return _(e(t))}})):M.attr("transform",_(s))})),R}},{"../../components/drawing":389,"../../lib":515,"../../lib/svg_text_utils":541,"../sunburst/fx":1063,"../sunburst/helpers":1064,"../sunburst/plot":1068,"../treemap/constants":1087,"./partition":851,"./style":853,"@plotly/d3":58}],848:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"icicle",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":954,"./attributes":843,"./base_plot":844,"./calc":845,"./defaults":846,"./layout_attributes":849,"./layout_defaults":850,"./plot":852,"./style":853}],849:[function(t,e,r){"use strict";e.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],850:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("iciclecolorway",e.colorway),r("extendiciclecolors")}},{"../../lib":515,"./layout_attributes":849}],851:[function(t,e,r){"use strict";var n=t("d3-hierarchy"),i=t("../treemap/flip_tree");e.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s="h"===r.orientation,l=r.maxDepth,c=e[0],u=e[1];l&&(c=(t.height+1)*e[0]/Math.min(t.height+1,l),u=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],c]:[e[0],u])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},{"../treemap/flip_tree":1092,"d3-hierarchy":115}],852:[function(t,e,r){"use strict";var n=t("../treemap/draw"),i=t("./draw_descendants");e.exports=function(t,e,r,a){return n(t,e,r,a,{type:"icicle",drawDescendants:i})}},{"../treemap/draw":1089,"./draw_descendants":847}],853:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../components/color"),a=t("../../lib"),o=t("../bar/uniform_text").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,"marker.line.color")||i.defaultLine,c=a.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",c).call(i.fill,n.color).call(i.stroke,l).style("opacity",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(".trace");o(t,e,"icicle"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style("opacity",r.opacity),e.selectAll("path.surface").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{"../../components/color":367,"../../lib":515,"../bar/uniform_text":673,"@plotly/d3":58}],854:[function(t,e,r){"use strict";for(var n=t("../../plots/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../../lib/extend").extendFlat,o=t("./constants").colormodel,s=["rgb","rgba","rgba256","hsl","hsla"],l=[],c=[],u=0;u0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var m=d.split("+");-1!==m.indexOf("all")&&(m=["color"]),-1!==m.indexOf("color")&&(p=!0)}var g,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push("["+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(", ")),4===x&&w.push(", "+b[3]+_[3]),w.push("]"),w=w.join(""),t.extraText=y.toUpperCase()+": "+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?g=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(g=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M="["+u.slice(0,s.colormodel.length).join(", ")+"]";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:g,hovertemplateLabels:{zLabel:M,colorLabel:w,"color[0]Label":b[0]+_[0],"color[1]Label":b[1]+_[1],"color[2]Label":b[2]+_[2],"color[3]Label":b[3]+_[3]}})]}}}},{"../../components/fx":407,"../../lib":515,"./constants":856}],861:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover"),eventData:t("./event_data"),moduleType:"trace",name:"image",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":578,"./attributes":854,"./calc":855,"./defaults":857,"./event_data":858,"./hover":860,"./plot":862,"./style":863}],862:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=i.strTranslate,o=t("../../constants/xmlns_namespaces"),s=t("./constants"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,"im").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=("fast"===c.zsmooth||!1===c.zsmooth&&h)&&!c._hasZ&&c._hasSource&&"linear"===u.type&&"linear"===f.type;c._realImage=p;var d,m,g,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=c.dx,M=c.dy;for(x=0;void 0===d&&x0;)m=u.c2p(_+x*A),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*M),x--;if(mI[0];if(O||z){var D=d+S/2,R=v+E/2;C+="transform:"+a(D+"px",R+"px")+"scale("+(O?-1:1)+","+(z?-1:1)+")"+a(-D+"px",-R+"px")+";"}}L.attr("style",C);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement("canvas");e.width=T,e.height=k;var r=e.getContext("2d",{willReadFrequently:!0});c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute("src",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL("image/png");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL("image/png")}L.attr({"xlink:href":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement("canvas");e.width=S,e.height=E;var r,n=e.getContext("2d",{willReadFrequently:!0}),a=function(t){return i.constrain(Math.round(u.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,m=h.fmt;for(x=0;x0}function T(t){t.each((function(t){y.stroke(n.select(this),t.line.color)})).each((function(t){y.fill(n.select(this),t.color)})).style("stroke-width",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),a={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,v,t,e)}return m(i,a,l,s,n),g(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function M(t,e,r,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(a);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s="_cache"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,m){var g,v=t._fullLayout;w(r)&&m&&(g=m()),o.makeTraceGroups(v._indicatorlayer,e,"trace").each((function(e){var m,E,L,C,P,I=e[0].trace,O=n.select(this),z=I._hasGauge,D=I._isAngular,R=I._isBullet,F=I.domain,B={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=I.align||"center";if(E=j,z){if(D&&(m=N,E=j+U/2,L=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;m=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else m=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var c,u,h,m=r[0].trace,g=i.numbersX,v=i.numbersY,T=m.align||"center",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,"g","numbers"),P=[];m._hasNumber&&P.push("number");m._hasDelta&&(P.push("delta"),"left"===m.delta.position&&P.reverse());var I=C.selectAll("text").data(P);function O(e,r,n,i){if(!e.match("s")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace("s","f").replace(/\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}I.enter().append("text"),I.attr("text-anchor",(function(){return A})).attr("class",(function(t){return t})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),I.exit().remove();var z,D=m.mode+m.align;m._hasDelta&&(z=function(){var e=k(t,{tickformat:m.delta.valueformat},m._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=m.delta.suffix,s=m.delta.prefix,l=function(t){return m.delta.relative?t.relativeDelta:t.delta},c=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+e(t)+o},h=function(t){return t.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(r[0]));var g=C.select("text.delta");function v(){g.text(c(l(r[0]),i)).call(y.fill,h(r[0])).call(p.convertToTspans,t)}return g.call(f.font,m.delta.font).call(y.fill,h({delta:m._deltaLastValue})),w(E)?g.transition().duration(E.duration).ease(E.easing).tween("text",(function(){var t=n.select(this),e=l(r[0]),o=m._deltaLastValue,s=O(m.delta.valueformat,i,o,e),u=a(o,e);return m._deltaLastValue=e,function(e){t.text(c(u(e),s)),t.call(y.fill,h({delta:u(e)}))}})).each("end",(function(){v(),L&&L()})).each("interrupt",(function(){v(),L&&L()})):v(),u=M(c(l(r[0]),i),m.delta.font,A,t),g}(),D+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,D+=m.delta.increasing.symbol+m.delta.decreasing.symbol,h=u);m._hasNumber&&(!function(){var e=k(t,{tickformat:m.number.valueformat},m._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=m.number.suffix,s=m.number.prefix,l=C.select("text.number");function u(){var e="number"==typeof r[0].y?s+i(r[0].y)+o:"-";l.text(e).call(f.font,m.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each("end",(function(){u(),L&&L()})).each("interrupt",(function(){u(),L&&L()})).attrTween("text",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);m._lastValue=r[0].y;var l=O(m.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):u(),c=M(s+i(r[0].y)+o,m.number.font,A,t)}(),D+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,h=c);if(m._hasDelta&&m._hasNumber){var R,F,B=[(c.left+c.right)/2,(c.top+c.bottom)/2],N=[(u.left+u.right)/2,(u.top+u.bottom)/2],j=.75*m.delta.font.size;"left"===m.delta.position&&(R=S(m,"deltaPos",0,-1*(c.width*b[m.align]+u.width*(1-b[m.align])+j),D,Math.min),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:u.left+R,right:c.right,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),"right"===m.delta.position&&(R=S(m,"deltaPos",0,c.width*(1-b[m.align])+u.width*b[m.align]+j,D,Math.max),F=B[1]-N[1],h={width:c.width+u.width+j,height:Math.max(c.height,u.height),left:c.left,right:u.right+R,top:Math.min(c.top,u.top+F),bottom:Math.max(c.bottom,u.bottom+F)}),"bottom"===m.delta.position&&(R=null,F=u.height,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height,bottom:c.bottom+u.height}),"top"===m.delta.position&&(R=null,F=c.top,h={width:Math.max(c.width,u.width),height:c.height+u.height,left:Math.min(c.left,u.left),right:Math.max(c.right,u.right),top:c.bottom-c.height-u.height,bottom:c.bottom}),z.attr({dx:R,dy:F})}(m._hasNumber||m._hasDelta)&&C.attr("transform",(function(){var t=i.numbersScaler(h);D+=t[2];var e,r=S(m,"numbersScale",1,t[0],D,Math.min);m._scaleNumbers||(r=1),e=m._isAngular?v-r*h.bottom:v-r*(h.top+h.bottom)/2,m._numbersTop=r*h.top+e;var n=h[T];"center"===T&&(n=(h.left+h.right)/2);var a=g-r*n;return a=S(m,"numbersTranslate",0,a,D,Math.max),l(a,e)+s(r)}))}(t,O,e,{numbersX:m,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:g}),z&&(C={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},P={range:I.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var Y=O.selectAll("g.angular").data(D?e:[]);Y.exit().remove();var W=O.selectAll("g.angularaxis").data(D?e:[]);W.exit().remove(),D&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,m=a.size,g=a.radius,v=a.innerRadius,y=a.gaugeBg,x=a.gaugeOutline,b=[m.l+m.w/2,m.t+m.h/2+g/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((v+g)/2-t/2*(g-v)).outerRadius((v+g)/2+t/2*(g-v)).startAngle(-E)}function P(t){t.attr("d",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append("g").classed("angular",!0),_.attr("transform",l(b[0],b[1])),A.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),A.selectAll("g.xangularaxistick,path,text").remove(),(o=k(t,p.gauge.axis)).type="linear",o.range=p.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var I=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},O={},z=d.makeLabelFns(o,0).labelStandoff;O.xFn=function(t){var e=I(t);return Math.cos(e)*z},O.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*u)},O.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},O.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var D=function(t){return l(b[0]+g*Math.cos(t),b[1]-g*Math.sin(t))};f=function(t){return D(I(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h="inside"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:"M"+h*R+",0h"+h*o.ticklen,transFn:function(t){var e=I(t);return D(e)+"rotate("+-c(e)+")"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:O})}var F=[y].concat(p.gauge.steps),B=_.selectAll("g.bg-arc").data(F);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll("g.value-arc").data([p.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var U=j.select("path");w(M)?(U.transition().duration(M.duration).ease(M.easing).each("end",(function(){S&&S()})).each("interrupt",(function(){S&&S()})).attrTween("d",(V=N,H=L(r[0].lastY),q=L(r[0].y),function(){var t=i(H,q);return function(e){return V.endAngle(t(e))()}})),p._lastValue=r[0].y):U.attr("d","number"==typeof r[0].y?N.endAngle(L(r[0].y)):"M0,0Z");var V,H,q;U.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Y=_.selectAll("g.threshold-arc").data(F);Y.enter().append("g").classed("threshold-arc",!0).append("path"),Y.select("path").call(P).call(T),Y.exit().remove();var W=_.selectAll("g.gauge-outline").data([x]);W.enter().append("g").classed("gauge-outline",!0).append("path"),W.select("path").call(P).call(T),W.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Y,layer:W,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:g});var Z=O.selectAll("g.bullet").data(R?e:[]);Z.exit().remove();var X=O.selectAll("g.bulletaxis").data(R?e:[]);X.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,c,u=r[0].trace,f=n.gauge,p=n.layer,m=n.gaugeBg,g=n.gaugeOutline,v=n.size,x=u.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform",l(v.l,v.t)),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var A=v.h,M=u.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(u._hasNumber||u._hasDelta?1-h.bulletNumberDomainSize:1);(i=k(t,u.gauge.axis))._id="xbulletaxis",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],c=v.t+v.h,i.visible&&(d.drawTicks(t,i,{vals:"inside"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,c,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,c)}));function L(t){t.attr("width",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr("x",(function(t){return i.c2p(t.range[0])})).attr("y",(function(t){return.5*(1-t.thickness)*A})).attr("height",(function(t){return t.thickness*A}))}var C=[m].concat(u.gauge.steps),P=f.selectAll("g.bg-bullet").data(C);P.enter().append("g").classed("bg-bullet",!0).append("rect"),P.select("rect").call(L).call(T),P.exit().remove();var I=f.selectAll("g.value-bullet").data([u.gauge.bar]);I.enter().append("g").classed("value-bullet",!0).append("rect"),I.select("rect").attr("height",M).attr("y",(A-M)/2).call(T),w(b)?I.select("rect").transition().duration(b.duration).ease(b.easing).each("end",(function(){_&&_()})).each("interrupt",(function(){_&&_()})).attr("width",Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y)))):I.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(u.gauge.axis.range[1],r[0].y))):0);I.exit().remove();var O=r.filter((function(){return u.gauge.threshold.value||0===u.gauge.threshold.value})),z=f.selectAll("g.threshold-bullet").data(O);z.enter().append("g").classed("threshold-bullet",!0).append("line"),z.select("line").attr("x1",i.c2p(u.gauge.threshold.value)).attr("x2",i.c2p(u.gauge.threshold.value)).attr("y1",(1-u.gauge.threshold.thickness)/2*A).attr("y2",(1-(1-u.gauge.threshold.thickness)/2)*A).call(y.stroke,u.gauge.threshold.line.color).style("stroke-width",u.gauge.threshold.line.width),z.exit().remove();var D=f.selectAll("g.gauge-outline").data([g]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(L).call(T),D.exit().remove()}(t,0,e,{gauge:Z,layer:X,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:g});var J=O.selectAll("text.title").data(e);J.exit().remove(),J.enter().append("text").classed("title",!0),J.attr("text-anchor",(function(){return R?x.right:x[I.title.align]})).text(I.title.text).call(f.font,I.title.font).call(p.convertToTspans,t),J.attr("transform",(function(){var t,e=B.l+B.w*b[I.title.align],r=h.titlePadding,n=f.bBox(J.node());if(z){if(D)if(I.gauge.axis.visible)t=f.bBox(W.node()).top-r-n.bottom;else t=B.t+B.h/2-U/2-n.bottom-r;R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)}else t=I._numbersTop-r-n.bottom;return l(e,t)}))}))}},{"../../components/color":367,"../../components/drawing":389,"../../constants/alignment":483,"../../lib":515,"../../lib/svg_text_utils":541,"../../plots/cartesian/axes":566,"../../plots/cartesian/axis_defaults":568,"../../plots/cartesian/layout_attributes":579,"../../plots/cartesian/position_defaults":582,"./constants":867,"@plotly/d3":58,"d3-interpolate":116}],871:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../mesh3d/attributes"),s=t("../../plots/attributes"),l=t("../../lib/extend").extendFlat,c=t("../../plot_api/edit_types").overrideAll;var u=e.exports=c(l({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:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),valuehoverformat:i("value",1),showlegend:l({},s.showlegend,{dflt:!1})},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");u.flatshading.dflt=!0,u.lighting.facenormalsepsilon.dflt=0,u.x.editType=u.y.editType=u.z.editType=u.value.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plot_api/edit_types":548,"../../plots/attributes":562,"../../plots/cartesian/axis_format_attributes":569,"../../plots/template_attributes":642,"../mesh3d/attributes":876}],872:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),i=t("../streamtube/calc").processGrid,a=t("../streamtube/calc").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,m,v);h[p]=x>-1?x:I(d,m,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++g}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return m&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(m)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),g=B(h,f,r,n);i=F(null,[p,d,g],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),g=B(h,u,r,n),v=B(h,c,r,n);m?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,g],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,g,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),g=B(h,c,r,n);m?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,g],[e[l[0]],-1,-1])||i,i=F(t,[c,g,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,g],[-1,-1,-1])||i,s=!0}})),i)}function q(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,"A")&&(f=H(null,[e,r,n,a],c,u)||f),D(t,"B")&&(f=H(null,[r,n,i,l],c,u)||f),D(t,"C")&&(f=H(null,[r,a,o,l],c,u)||f),D(t,"D")&&(f=H(null,[n,a,s,l],c,u)||f),D(t,"E")&&(f=H(null,[r,n,a,l],c,u)||f)),m&&(f=H(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],m=o[2];return p&&(s=O(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=O(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=O(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=O(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=O(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=O(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=O(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=O(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),m&&(s=O(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],m),l=O(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],m),c=O(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],m),u=O(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],m),h()),f}function Z(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&"even"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,c,u)):(d&&"odd"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,c,u))}function X(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-M)?[A,d]:[d,M];$(e,T[0],T[1])}}var L=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];["x","y","z"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),"x"===e?f.push([p.distRatio,0,0]):"y"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,"x"===e?b-1:"y"===e?_-1:w-1);u.length>0&&(r[i]="x"===e?tt(null,u,a,o,f,r[i]):"y"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]="x"===e?X(null,c,a,o,r[i]):"y"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(z(d.fill),r[i]="x"===e?X(null,[0,b-1],a,o,r[i]):"y"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===g&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{"../../../stackgl_modules":1133,"../../components/colorscale":379,"../../lib/gl_format_color":511,"../../lib/str2rgbarray":540,"../../plots/gl3d/zip3":618}],874:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("../../components/colorscale/defaults");function s(t,e,r,n,a){var s=a("isomin"),l=a("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a("x"),u=a("y"),f=a("z"),h=a("value");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach((function(t){a(t+"hoverformat");var e="caps."+t;a(e+".show")&&a(e+".fill");var r="slices."+t;a(r+".show")&&(a(r+".fill"),a(r+".locations"))})),a("spaceframe.show")&&a("spaceframe.fill"),a("surface.show")&&(a("surface.count"),a("surface.fill"),a("surface.pattern")),a("contour.show")&&(a("contour.color"),a("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(t){a(t)})),o(t,e,n,a,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":377,"../../lib":515,"../../registry":647,"./attributes":871}],875:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,calc:t("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:t("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":607,"./attributes":871,"./calc":872,"./convert":873,"./defaults":874}],876:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/cartesian/axis_format_attributes").axisHoverFormat,a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../surface/attributes"),s=t("../../plots/attributes"),l=t("../../lib/extend").extendFlat;e.exports=l({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:a({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plots/attributes":562,"../../plots/cartesian/axis_format_attributes":569,"../../plots/template_attributes":642,"../surface/attributes":1070}],877:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":375}],878:[function(t,e,r){"use strict";var n=t("../../../stackgl_modules").gl_mesh3d,i=t("../../../stackgl_modules").delaunay_triangulate,a=t("../../../stackgl_modules").alpha_shape,o=t("../../../stackgl_modules").convex_hull,s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!g(t.i,f)||!g(t.j,f)||!g(t.k,f))return;n=u(m(t.i),m(t.j),m(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],a=e.length,o=0;ov):g=A>w,v=A;var M=c(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[k,T],y&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),m&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,"open:")+" ",high:i(t,"high:")+" ",low:i(t,"low:")+" ",close:i(t,"close:")+" "}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a"+c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),y.name="",f.push(y),g[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,m=p.dir;function g(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var v=p.hi||l.hoverinfo,y=v.split("+"),x="all"===v,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+c[m]]:[];return _&&s(p,l,w),h.extraText=w.join("
"),h.y0=h.y1=o.c2p(p.yc,!0),[h]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{"../../components/color":367,"../../components/fx":407,"../../constants/delta.js":485,"../../lib":515,"../../plots/cartesian/axes":566}],885:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc").calc,plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover").hoverPoints,selectPoints:t("./select")}},{"../../plots/cartesian":578,"./attributes":881,"./calc":882,"./defaults":883,"./hover":884,"./plot":887,"./select":888,"./style":889}],886:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib");e.exports=function(t,e,r,a){var o=r("x"),s=r("open"),l=r("high"),c=r("low"),u=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{"../../lib":515,"../../registry":647}],887:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,"trace ohlc").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll("path").data(i.identity);u.enter().append("path"),u.exit().remove(),u.attr("d",(function(t){if(t.empty)return"M0,0Z";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return"M"+e+","+o.c2p(t.o,!0)+"H"+n+"M"+n+","+o.c2p(t.h,!0)+"V"+o.c2p(t.l,!0)+"M"+r+","+o.c2p(t.c,!0)+"H"+n}))}}))}},{"../../lib":515,"@plotly/d3":58}],888:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map((function(t){return t.displayindex}))))for(e=0;e0;c&&(o="array");var u=r("categoryorder",o);"array"===u?(r("categoryarray"),r("ticktext")):(delete t.categoryarray,delete t.ticktext),c||"array"!==u||(e.categoryorder="trace")}}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:"dimensions",handleItemDefaults:u}),d=function(t,e,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,h);o(e,f,h),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,"values",d),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var m={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(h,"labelfont",m);var g={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,"tickfont",g)}},{"../../components/colorscale/defaults":377,"../../components/colorscale/helpers":378,"../../lib":515,"../../plots/array_container_defaults":561,"../../plots/domain":593,"../parcoords/merge_length":907,"./attributes":890}],894:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:t("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":890,"./base_plot":891,"./calc":892,"./defaults":893,"./plot":896}],895:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("d3-interpolate").interpolateNumber,a=t("../../plot_api/plot_api"),o=t("../../components/fx"),s=t("../../lib"),l=s.strTranslate,c=t("../../components/drawing"),u=t("tinycolor2"),f=t("../../lib/svg_text_utils");function h(t,e,r,i){var a=e._context.staticPlot,o=t.map(F.bind(0,e,r)),u=i.selectAll("g.parcatslayer").data([null]);u.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var h=u.selectAll("g.trace.parcats").data(o,p),y=h.enter().append("g").attr("class","trace parcats");h.attr("transform",(function(t){return l(t.x,t.y)})),y.append("g").attr("class","paths");var x=h.select("g.paths").selectAll("path.path").data((function(t){return t.paths}),p);x.attr("fill",(function(t){return t.model.color}));var w=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(t){return t.model.color})).attr("fill-opacity",0);_(w),x.attr("d",(function(t){return t.svgD})),w.empty()||x.sort(m),x.exit().remove(),x.on("mouseover",g).on("mouseout",v).on("click",b),y.append("g").attr("class","dimensions");var A=h.select("g.dimensions").selectAll("g.dimension").data((function(t){return t.dimensions}),p);A.enter().append("g").attr("class","dimension"),A.attr("transform",(function(t){return l(t.x,0)})),A.exit().remove();var M=A.selectAll("g.category").data((function(t){return t.categories}),p),S=M.enter().append("g").attr("class","category");M.attr("transform",(function(t){return l(0,t.y)})),S.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})),T(S);var E=M.selectAll("rect.bandrect").data((function(t){return t.bands}),p);E.each((function(){s.raiseToTop(this)})),E.attr("fill",(function(t){return t.color}));var z=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(t){return t.color})).attr("fill-opacity",0);E.attr("fill",(function(t){return t.color})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return t.y})).attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"})),k(z),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none");var D=e._fullLayout.paper_bgcolor;M.select("text.catlabel").attr("text-anchor",(function(t){return d(t)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",f.makeTextShadow(D)).style("fill","rgb(0, 0, 0)").attr("x",(function(t){return d(t)?t.width+5:-5})).attr("y",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){c.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),S.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(t){return t.width/2})).attr("y",-5).text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})).each((function(t){c.font(n.select(this),t.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",L).on("mouseout",C),M.exit().remove(),A.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on("dragstart",P).on("drag",I).on("dragend",O)),h.each((function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),h.exit().remove()}function p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function m(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+m.left,y:_-d.top+m.top,text:E,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=c.left,a="left"):(i=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,v=m/u.parcatsViewModel.model.count,y={countLabel:m,categoryLabel:g,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",y.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var b=x.join("
");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:m,category:g,probability:v}]}}function L(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if("color"===l?(!function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll("rect.bandrect").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(this),S(this,"plotly_hover",n.event)):(!function(t){n.select(t.parentNode).selectAll("rect.bandrect").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),M(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===l?e=E(r,a,this):"color"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),c=n.select(r).datum(),f=c.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,m=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var g=f.model.categoryLabel,v=c.parcatsViewModel.model.count,y=0;c.categoryViewModel.bands.forEach((function(t){t.color===c.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===c.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:g,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf("count")&&A.push(["Count:",k.countLabel].join(" ")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(A.push("P(color \u2229 "+g+"): "+k.probabilityLabel),A.push("P("+g+" | color): "+w.toFixed(3)),A.push("P(color | "+g+"): "+T.toFixed(3)));var M=A.join("
"),S=u.mostReadable(c.color,["black","white"]);return{trace:d,x:o*(i-e.left),y:s*(m-e.top),text:M,color:c.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:g,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,a,this):"dimension"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(E(t,e,this))})),i}(r,a,this)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(_(e.pathSelection),T(e.dimensionSelection.selectAll("g.category")),k(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(m),-1===e.hoverinfoItems.indexOf("skip"))){"color"===t.parcatsViewModel.hoveron?S(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event)}}function P(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map((function(t){return t.displayInd})),e.model.dragY=e.y,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(e){e.yf.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var h=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),D(t.parcatsViewModel)}}function O(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=z(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.forEach((function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map((function(t){return t.displayInd}));if(s=t.initialDragCategoryDisplayInds.some((function(t,e){return t!==l[e]}))){var c=t.model.categories.slice().sort((function(t,e){return t.displayInd-e.displayInd})),u=c.map((function(t){return t.categoryValue})),f=c.map((function(t){return t.categoryLabel}));e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[f],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?S(t.potentialClickBand,"plotly_click",n.event.sourceEvent):M(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd)t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null;t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){R(t.parcatsViewModel,!0),D(t.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+n)+" "+l[s]+","+(e[s]+n)+" "+(t[s]+r[s])+","+(e[s]+n),u+="l-"+r[s]+",0 ";return u+="Z"}function N(t){var e=t.dimensions,r=t.model,n=e.map((function(t){return t.categories.map((function(t){return t.y}))})),i=t.model.dimensions.map((function(t){return t.categories.map((function(t){return t.displayInd}))})),a=t.model.dimensions.map((function(t){return t.displayInd})),o=t.dimensions.map((function(t){return t.model.dimensionInd})),s=e.map((function(t){return t.x})),l=e.map((function(t){return t.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function f(t){var e=t.categoryInds.map((function(t,e){return i[e][t]}));return o.map((function(t){return e[t]}))}c.sort((function(e,r){var n=f(e),i=f(r);return"backward"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var h=new Array(c.length),p=e[0].model.count,d=e[0].categories.map((function(t){return t.height})).reduce((function(t,e){return t+e})),m=0;m0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),m=8*(f-h)/2,g=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(g.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:t},m=m+a+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){h(r,t,n,e)}},{"../../components/drawing":389,"../../components/fx":407,"../../lib":515,"../../lib/svg_text_utils":541,"../../plot_api/plot_api":552,"@plotly/d3":58,"d3-interpolate":116,tinycolor2:313}],896:[function(t,e,r){"use strict";var n=t("./parcats");e.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},{"./parcats":895}],897:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/cartesian/layout_attributes"),a=t("../../plots/font_attributes"),o=t("../../plots/domain").attributes,s=t("../../lib/extend").extendFlat,l=t("../../plot_api/plot_template").templatedArray;e.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.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:s({editType:"calc"},n("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"}}},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plot_api/plot_template":555,"../../plots/cartesian/layout_attributes":579,"../../plots/domain":593,"../../plots/font_attributes":594}],898:[function(t,e,r){"use strict";var n=t("./constants"),i=t("@plotly/d3"),a=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=t("../../lib").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||e=.9*t[1]+.1*t[0]?"n":e<=.9*t[0]+.1*t[1]?"s":"ns"}(d,e);m&&(o.interval=l[a],o.intervalPix=d,o.region=m)}}if(t.ordinal&&!o.region){var g=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a="crosshair";r.clickableOrdinalRange?a="pointer":r.region&&(a=r.region+"-resize"),i.select(document.body).style("cursor",a)}function k(t){t.on("mousemove",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on("mouseleave",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on("dragstart",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on("drag",(function(t){w(this,t)})).on("dragend",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t,e,r){var i=t.selectAll("."+n.cn.axisBrush).data(o,a);i.enter().append("g").classed(n.cn.axisBrush,!0),function(t,e,r){var i=r._context.staticPlot,a=t.selectAll(".background").data(o);a.enter().append("rect").classed("background",!0).call(d).call(m).style("pointer-events",i?"none":"auto").attr("transform",l(0,n.verticalPadding)),a.call(k).attr("height",(function(t){return t.height-n.verticalPadding}));var s=t.selectAll(".highlight-shadow").data(o);s.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",e).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),s.attr("y1",(function(t){return t.height})).call(x);var c=t.selectAll(".highlight").data(o);c.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),c.attr("y1",(function(t){return t.height})).call(x)}(i,e,r)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},{"../../lib":515,"../../lib/gup":512,"./constants":902,"@plotly/d3":58}],899:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:t("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":897,"./base_plot":900,"./calc":901,"./defaults":903}],900:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../plots/get_data").getModuleCalcData,a=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=i(t.calcdata,"parcoords")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},{"../../constants/xmlns_namespaces":492,"../../plots/get_data":602,"./plot":909,"@plotly/d3":58}],901:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,i=t("../../components/colorscale"),a=t("../../lib/gup").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),d.splice(f));var m=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),g=function(t,e,r,o,s){var l=s("line.color",r);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,u);o(e,l,u),Array.isArray(m)&&m.length||(e.visible=!1),h(e,m,"values",g);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",v),n.coerceFont(u,"tickfont",v),n.coerceFont(u,"rangefont",v),u("labelangle"),u("labelside"),u("unselected.line.color"),u("unselected.line.opacity")}},{"../../components/colorscale/defaults":377,"../../components/colorscale/helpers":378,"../../lib":515,"../../plots/array_container_defaults":561,"../../plots/cartesian/axes":566,"../../plots/domain":593,"./attributes":897,"./axisbrush":898,"./constants":902,"./merge_length":907}],904:[function(t,e,r){"use strict";var n=t("../../lib").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!("visible"in t)}},{"../../lib":515}],905:[function(t,e,r){"use strict";var n=t("./base_index");n.plot=t("./plot"),e.exports=n},{"./base_index":899,"./plot":909}],906:[function(t,e,r){"use strict";var n=t("glslify"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n p17_20, p21_24, p25_28, p29_32,\n p33_36, p37_40, p41_44, p45_48,\n p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\nuniform sampler2D maskTexture, palette;\n\nbool isPick = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n return (\n fOutside(p[0], lo[0], hi[0]) ||\n fOutside(p[1], lo[1], hi[1]) ||\n fOutside(p[2], lo[2], hi[2]) ||\n fOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n return (\n vOutside(p[0], lo[0], hi[0]) ||\n vOutside(p[1], lo[1], hi[1]) ||\n vOutside(p[2], lo[2], hi[2]) ||\n vOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n return mOutside(A, loA, hiA) ||\n mOutside(B, loB, hiB) ||\n mOutside(C, loC, hiC) ||\n mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n mat4 pnts[4];\n pnts[0] = A;\n pnts[1] = B;\n pnts[2] = C;\n pnts[3] = D;\n\n for(int i = 0; i < 4; ++i) {\n for(int j = 0; j < 4; ++j) {\n for(int k = 0; k < 4; ++k) {\n if(0 == iMod(\n int(255.0 * texture2D(maskTexture,\n vec2(\n (float(i * 2 + j / 2) + 0.5) / 8.0,\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n ))[3]\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n 2\n )) return true;\n }\n }\n }\n return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n float x = 0.5 * sign(v) + 0.5;\n float y = axisY(x, A, B, C, D);\n float z = 1.0 - abs(v);\n\n z += isContext ? 0.0 : 2.0 * float(\n outsideBoundingBox(A, B, C, D) ||\n outsideRasterMask(A, B, C, D)\n );\n\n return vec4(\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n z,\n 1.0\n );\n}\n\nvoid main() {\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n float v = colors[3];\n\n gl_Position = position(isContext, v, A, B, C, D);\n\n fragColor =\n isContext ? vec4(contextColor) :\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}\n"]),o=t("./constants").maxDimensionCount,s=t("../../lib"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function h(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function m(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var O=1;O=r||l>=i)return;var c=t.lineLayer.readPixel(s,i-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==N&&(u?a.hover(h):a.unhover&&a.unhover(h),N=f)}})),B.style("opacity",(function(t){return t.pick?0:1})),p.style("background","rgba(255, 255, 255, 0)");var j=p.selectAll("."+y.cn.parcoords).data(F,d);j.exit().remove(),j.enter().append("g").classed(y.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),j.attr("transform",(function(t){return c(t.model.translateX,t.model.translateY)}));var U=j.selectAll("."+y.cn.parcoordsControlView).data(m,d);U.enter().append("g").classed(y.cn.parcoordsControlView,!0),U.attr("transform",(function(t){return c(t.model.pad.l,t.model.pad.t)}));var V=U.selectAll("."+y.cn.yAxis).data((function(t){return t.dimensions}),d);V.enter().append("g").classed(y.cn.yAxis,!0),U.each((function(t){O(V,t,T)})),B.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),V.attr("transform",(function(t){return c(t.xScale(t.xIndex),0)})),V.call(n.behavior.drag().origin((function(t){return t})).on("drag",(function(t){var e=t.parent;R.linePickActive(!1),t.x=Math.max(-y.overdrag,Math.min(t.model.width+y.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,V.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),O(V,e,T),V.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr("transform",(function(t){return c(t.xScale(t.xIndex),0)})),n.select(this).attr("transform",c(t.x,0)),V.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,O(V,e,T),n.select(this).attr("transform",(function(t){return c(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),V.exit().remove();var H=V.selectAll("."+y.cn.axisOverlays).data(m,d);H.enter().append("g").classed(y.cn.axisOverlays,!0),H.selectAll("."+y.cn.axis).remove();var q=H.selectAll("."+y.cn.axis).data(m,d);q.enter().append("g").classed(y.cn.axis,!0),q.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return v.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(q.selectAll("text"),t.model.tickFont)})),q.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),q.selectAll("text").style("text-shadow",u.makeTextShadow(A)).style("cursor","default");var G=H.selectAll("."+y.cn.axisHeading).data(m,d);G.enter().append("g").classed(y.cn.axisHeading,!0);var Y=G.selectAll("."+y.cn.axisTitle).data(m,d);Y.enter().append("text").classed(y.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),Y.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),u.convertToTspans(r,t)})).attr("transform",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=y.axisTitleOffset;return(e.dir>0?"":c(0,2*r+t.model.height))+l(e.degrees)+c(-r*e.dx,-r*e.dy)})).attr("text-anchor",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var W=H.selectAll("."+y.cn.axisExtent).data(m,d);W.enter().append("g").classed(y.cn.axisExtent,!0);var Z=W.selectAll("."+y.cn.axisExtentTop).data(m,d);Z.enter().append("g").classed(y.cn.axisExtentTop,!0),Z.attr("transform",c(0,-y.axisExtentOffset));var X=Z.selectAll("."+y.cn.axisExtentTopText).data(m,d);X.enter().append("text").classed(y.cn.axisExtentTopText,!0).call(P),X.text((function(t){return D(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var J=W.selectAll("."+y.cn.axisExtentBottom).data(m,d);J.enter().append("g").classed(y.cn.axisExtentBottom,!0),J.attr("transform",(function(t){return c(0,t.model.height+y.axisExtentOffset)}));var K=J.selectAll("."+y.cn.axisExtentBottomText).data(m,d);K.enter().append("text").classed(y.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(P),K.text((function(t){return D(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(H,A,t)}},{"../../components/colorscale":379,"../../components/drawing":389,"../../lib":515,"../../lib/gup":512,"../../lib/svg_text_utils":541,"../../plots/cartesian/axes":566,"./axisbrush":898,"./constants":902,"./helpers":904,"./lines":906,"@plotly/d3":58,"color-rgba":91}],909:[function(t,e,r){"use strict";var n=t("./parcoords"),i=t("../../lib/prepare_regl"),a=t("./helpers").isVisible,o={};function s(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}(e.exports=function(t,e){var r=t._fullLayout;if(i(t,[],o)){var l={},c={},u={},f={},h=r._size;e.forEach((function(e,r){var n=e[0].trace;u[r]=n.index;var i=f[r]=n._fullInput.index;l[r]=t.data[i].dimensions,c[r]=t.data[i].dimensions.slice()}));n(t,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,i){var a=c[e][n],o=i.map((function(t){return t.slice()})),s="dimensions["+n+"].constraintrange",l=r._tracePreGUI[t._fullData[u[e]]._fullInput.uid];if(void 0===l[s]){var h=a.constraintrange;l[s]=h||null}var p=t._fullData[u[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit("plotly_restyle",[d,[f[e]]])},hover:function(e){t.emit("plotly_hover",e)},unhover:function(e){t.emit("plotly_unhover",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return s(t,e,r)-s(t,e,n)}}(r,c[e].filter(a));l[e].sort(n),c[e].filter((function(t){return!a(t)})).sort((function(t){return c[e].indexOf(t)})).forEach((function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(c[e].indexOf(t),0,t)})),t.emit("plotly_restyle",[{dimensions:[l[e]]},[f[e]]])}})}}).reglPrecompiled=o},{"../../lib/prepare_regl":528,"./helpers":904,"./parcoords":908}],910:[function(t,e,r){"use strict";var n=t("../../plots/attributes"),i=t("../../plots/domain").attributes,a=t("../../plots/font_attributes"),o=t("../../components/color/attributes"),s=t("../../plots/template_attributes").hovertemplateAttrs,l=t("../../plots/template_attributes").texttemplateAttrs,c=t("../../lib/extend").extendFlat,u=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});e.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:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},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:c({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},u,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":366,"../../lib/extend":505,"../../plots/attributes":562,"../../plots/domain":593,"../../plots/font_attributes":594,"../../plots/template_attributes":642}],911:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="pie",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{"../../plots/plots":628}],912:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../../components/color"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),("funnelarea"===e.type?v:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=g),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r="pie");var n=t._fullLayout,i=t.calcdata,a=n[r+"colorway"],s=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=l(a,o));for(var c=0,u=0;u0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c("labels"),c("values")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),f){e._length=f,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var h,p=c("text"),d=c("texttemplate");if(d||(h=c("textinfo",Array.isArray(p)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),d||h&&"none"!==h){var m=c("textposition");s(t,e,n,c,m,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(m)||"auto"===m||"outside"===m)&&c("automargin"),("inside"===m||"auto"===m||Array.isArray(m))&&c("insidetextorientation")}o(e,n,c);var g=c("hole");if(c("title.text")){var v=c("title.position",g?"middle center":"top center");g||"middle center"!==v||(e.title.position="top center"),i.coerceFont(c,"title.font",n.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else e.visible=!1}}},{"../../lib":515,"../../plots/domain":593,"../bar/defaults":661,"./attributes":910,"fast-isnumeric":190}],914:[function(t,e,r){"use strict";var n=t("../../components/fx/helpers").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),"funnelarea"===e.type&&(delete r.v,delete r.i),r}},{"../../components/fx/helpers":403}],915:[function(t,e,r){"use strict";var n=t("../../lib");function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r"),name:f.hovertemplate||-1!==h.indexOf("name")?f.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,t.pts)||t.color,borderColor:g.castOption(_.bordercolor,t.pts),fontFamily:g.castOption(w.family,t.pts),fontSize:g.castOption(w.size,t.pts),fontColor:g.castOption(w.color,t.pts),nameLength:g.castOption(_.namelength,t.pts),textAlign:g.castOption(_.align,t.pts),hovertemplate:g.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,e.emit("plotly_hover",{points:[v(t,f)],event:n.event})}})),t.on("mouseout",(function(t){var r=e._fullLayout,i=e._fullData[c.index],o=n.select(this).datum();c._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[v(o,i)],event:n.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),c._hasHoverLabel=!1)})),t.on("click",(function(t){var r=e._fullLayout,i=e._fullData[c.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=g.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=g.castOption(t._input.textfont.color,e.pts));var i=g.castOption(t.insidetextfont.family,e.pts)||g.castOption(t.textfont.family,e.pts)||r.family,a=g.castOption(t.insidetextfont.size,e.pts)||g.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;g-=2)v(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)v(Math.PI*(g+1),"tan")}if(f||p){for(g=4;g>=-4;g-=2)v(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)v(Math.PI*(g+.5),"rad")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;m.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,m.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,m.push(a));for(var x=0,b=0,_=0;_=1)break}return m[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*m);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*m);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=I(a),-1!==a.title.position.indexOf("top")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf("bottom")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf("center")?f*=2:-1!==a.title.position.indexOf("right")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function P(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function I(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function O(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(a){var x=l.castOption(i,e.i,"texttemplate");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:g.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:g.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,"customdata")}}(e),_=g.getFirstFilled(i.text,e.pts);(y(_)||""===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=""}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._context.staticPlot,a=t._fullLayout,h=a._size;d("pie",a),_(e,t),O(e,h);var m=l.makeTraceGroups(a._pielayer,e,"trace").each((function(e){var d=n.select(this),m=e[0],v=m.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=g.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),d.attr("stroke-linejoin","round"),d.each((function(){var y=n.select(this).selectAll("g.slice").data(e);y.enter().append("g").classed("slice",!0),y.exit().remove();var _=[[[],[]],[[],[]]],T=!1;y.each((function(i,o){if(i.hidden)n.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=v.index,_[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var c=m.cx,u=m.cy,h=n.select(this),d=h.selectAll("path.surface").data([i]);if(d.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),h.call(x,t,e),v.pull){var y=+g.castOption(v.pull,i.pts)||0;y>0&&(c+=y*i.pxmid[0],u+=y*i.pxmid[1])}i.cxFinal=c,i.cyFinal=u;var k=v.hole;if(i.v===m.vTotal){var A="M"+(c+i.px0[0])+","+(u+i.px0[1])+P(i.px0,i.pxmid,!0,1)+P(i.pxmid,i.px0,!0,1)+"Z";k?d.attr("d","M"+(c+k*i.px0[0])+","+(u+k*i.px0[1])+P(i.px0,i.pxmid,!1,k)+P(i.pxmid,i.px0,!1,k)+"Z"+A):d.attr("d",A)}else{var M=P(i.px0,i.px1,!0,1);if(k){var S=1-k;d.attr("d","M"+(c+k*i.px1[0])+","+(u+k*i.px1[1])+P(i.px1,i.px0,!1,k)+"l"+S*i.px0[0]+","+S*i.px0[1]+M+"Z")}else d.attr("d","M"+c+","+u+"l"+i.px0[0]+","+i.px0[1]+M+"Z")}D(t,i,m);var E=g.castOption(v.textposition,i.pts),C=h.selectAll("g.slicetext").data(i.text&&"none"!==E?[0]:[]);C.enter().append("g").classed("slicetext",!0),C.exit().remove(),C.each((function(){var r=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),h=l.ensureUniformFontSize(t,"outside"===E?function(t,e,r){var n=g.castOption(t.outsidetextfont.color,e.pts)||g.castOption(t.textfont.color,e.pts)||r.color,i=g.castOption(t.outsidetextfont.family,e.pts)||g.castOption(t.textfont.family,e.pts)||r.family,a=g.castOption(t.outsidetextfont.size,e.pts)||g.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(v,i,a.font):b(v,i,a.font));r.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,h).call(f.convertToTspans,t);var d,y=s.bBox(r.node());if("outside"===E)d=L(y,i);else if(d=w(y,i,m),"auto"===E&&d.scale<1){var x=l.ensureUniformFontSize(t,v.outsidetextfont);r.call(s.font,x),d=L(y=s.bBox(r.node()),i)}var _=d.textPosAngle,k=void 0===_?i.pxmid:z(m.r,_);if(d.targetX=c+k[0]*d.rCenter+(d.x||0),d.targetY=u+k[1]*d.rCenter+(d.y||0),R(d,y),d.outside){var A=d.targetY;i.yLabelMin=A-y.height/2,i.yLabelMid=A,i.yLabelMax=A+y.height/2,i.labelExtraX=0,i.labelExtraY=0,T=!0}d.fontSize=h.size,p(v.type,d,a),e[o].transform=d,l.setTransormAndDisplay(r,d)}))}function P(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return"a"+n*m.r+","+n*m.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}}));var k=n.select(this).selectAll("g.titletext").data(v.title.text?[0]:[]);if(k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each((function(){var e,r=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),i=v.title.text;v._meta&&(i=l.templateString(i,v._meta)),r.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,v.title.font).call(f.convertToTspans,t),e="middle center"===v.title.position?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}(m):C(m,h),r.attr("transform",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),T&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function m(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,m=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(g.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(m+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?m:v,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,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(a+t.labelExtraX+c):s+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+c}else s+="V"+(t.yLabelMid+t.labelExtraY)+"h"+c;l.ensureSingle(r,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(y,v),T&&v.automargin){var A=s.bBox(d.node()),M=v.domain,S=h.w*(M.x[1]-M.x[0]),E=h.h*(M.y[1]-M.y[0]),P=(.5*S-m.r)/h.w,I=(.5*E-m.r)/h.h;i.autoMargin(t,"pie."+v.uid+".automargin",{xl:M.x[0]-P,xr:M.x[1]+P,yb:M.y[0]-I,yt:M.y[1]+I,l:Math.max(m.cx-m.r-A.left,0),r:Math.max(A.right-(m.cx+m.r),0),b:Math.max(A.bottom-(m.cy+m.r),0),t:Math.max(m.cy-m.r-A.top,0),pad:5})}}))}));setTimeout((function(){m.selectAll("tspan").each((function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:O,attachFxHandlers:x,computeTransform:R}},{"../../components/color":367,"../../components/drawing":389,"../../components/fx":407,"../../lib":515,"../../lib/svg_text_utils":541,"../../plots/plots":628,"../bar/constants":659,"../bar/uniform_text":673,"./event_data":914,"./helpers":915,"@plotly/d3":58}],920:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("./style_one"),a=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(".trace");a(t,e,"pie"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(i,t,e)}))}))}},{"../bar/uniform_text":673,"./style_one":921,"@plotly/d3":58}],921:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("./helpers").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style("stroke-width",s).call(n.fill,e.color).call(n.stroke,o)}},{"../../components/color":367,"./helpers":915}],922:[function(t,e,r){"use strict";var n=t("../scatter/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":936}],923:[function(t,e,r){"use strict";var n=t("../../../stackgl_modules").gl_pointcloud2d,i=t("../../lib/str2rgbarray"),a=t("../../plots/cartesian/autorange").findExtremes,o=t("../scatter/get_trace_color");function s(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var m=i(t.marker.color),g=i(t.marker.border.color),v=t.opacity*t.marker.opacity;m[3]*=v,this.pointcloudOptions.color=m;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,g[3]*=v,this.pointcloudOptions.borderColor=g;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../../stackgl_modules":1133,"../../lib/str2rgbarray":540,"../../plots/cartesian/autorange":565,"../scatter/get_trace_color":946}],924:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio"),e._length=null}},{"../../lib":515,"./attributes":922}],925:[function(t,e,r){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" ");e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("../scatter3d/calc"),plot:t("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:t("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":605,"../scatter3d/calc":965,"./attributes":922,"./convert":923,"./defaults":924}],926:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/attributes"),a=t("../../components/color/attributes"),o=t("../../components/fx/attributes"),s=t("../../plots/domain").attributes,l=t("../../plots/template_attributes").hovertemplateAttrs,c=t("../../components/colorscale/attributes"),u=t("../../plot_api/plot_template").templatedArray,f=t("../../plots/cartesian/axis_format_attributes").descriptionOnlyNumbers,h=t("../../lib/extend").extendFlat,p=t("../../plot_api/edit_types").overrideAll;(e.exports=p({hoverinfo:h({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:f("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),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:a.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:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.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:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:h(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":366,"../../components/colorscale/attributes":374,"../../components/fx/attributes":398,"../../lib/extend":505,"../../plot_api/edit_types":548,"../../plot_api/plot_template":555,"../../plots/attributes":562,"../../plots/cartesian/axis_format_attributes":569,"../../plots/domain":593,"../../plots/font_attributes":594,"../../plots/template_attributes":642}],927:[function(t,e,r){"use strict";var n=t("../../plot_api/edit_types").overrideAll,i=t("../../plots/get_data").getModuleCalcData,a=t("./plot"),o=t("../../components/fx/layout_attributes"),s=t("../../lib/setcursor"),l=t("../../components/dragelement"),c=t("../../components/selections").prepSelect,u=t("../../lib"),f=t("../../registry");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if(o&&"pan"!==i&&"zoom"!==i){s(o,a);var h={_id:"x",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:"y",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C="";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),c.push({pointNumber:e,label:C,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var I=b+_.length,O=o(r.color),z=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:O?r.color[e]:r.color,customdata:z?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(I,M.source,M.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":379,"../../lib":515,"../../lib/gup":512,"strongly-connected-components":307}],929:[function(t,e,r){"use strict";e.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"}}},{}],930:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../components/color"),o=t("tinycolor2"),s=t("../../plots/domain").defaults,l=t("../../components/fx/hoverlabel_defaults"),c=t("../../plot_api/plot_template"),u=t("../../plots/array_container_defaults");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),m=t.node,g=c.newContainer(e,"node");function v(t,e){return n.coerce(m,g,i.node,t,e)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),l(m,g,v,d),v("hovertemplate");var y=h.colorway;v("color",g.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v("customdata");var x=t.link||{},b=c.newContainer(e,"link");function _(t,e){return n.coerce(x,b,i.link,t,e)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",t.hoverinfo),l(x,b,_,d),_("hovertemplate");var w,T=o(h.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(T,b.value.length)),_("customdata"),u(x,b,{name:"colorscales",handleItemDefaults:f}),s(e,h,p),p("orientation"),p("valueformat"),p("valuesuffix"),g.x.length&&g.y.length&&(w="freeform"),p("arrangement",w),n.coerceFont(p,"textfont",n.extendFlat({},h.font)),e._length=null}},{"../../components/color":367,"../../components/fx/hoverlabel_defaults":405,"../../lib":515,"../../plot_api/plot_template":555,"../../plots/array_container_defaults":561,"../../plots/domain":593,"./attributes":926,tinycolor2:313}],931:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),moduleType:"trace",name:"sankey",basePlotModule:t("./base_plot"),selectPoints:t("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":926,"./base_plot":927,"./calc":928,"./defaults":930,"./plot":932,"./select.js":934}],932:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=i.numberFormat,o=t("./render"),s=t("../../components/fx"),l=t("../../components/color"),c=t("./constants").cn,u=i._;function f(t){return""!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function d(t){n.select(t).select("text.name").style("fill","black")}function m(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function v(t,e,r){e&&r&&h(r,e).selectAll("."+c.sankeyLink).filter(m(e)).call(x.bind(0,e,r,!1))}function y(t,e,r){e&&r&&h(r,e).selectAll("."+c.sankeyLink).filter(m(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll("."+c.sankeyLink).filter((function(t){return t.link.label===i})).style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll("."+c.sankeyNode).filter(g(t)).call(v)}function b(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll("."+c.sankeyLink).filter((function(t){return t.link.label===i})).style("fill-opacity",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(c.sankeyNode).filter(g(t)).call(y)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,m=0;m"),color:_(o,"bgcolor")||l.addOpacity(m.color,1),borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:n.event.x"),color:_(o,"bgcolor")||i.tinyColorHue,borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:y,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(y,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit("plotly_unhover",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(y,r,i),s.click(t,{target:!0})}}})}},{"../../components/color":367,"../../components/fx":407,"../../lib":515,"./constants":929,"./render":933,"@plotly/d3":58}],933:[function(t,e,r){"use strict";var n=t("d3-force"),i=t("d3-interpolate").interpolateNumber,a=t("@plotly/d3"),o=t("@plotly/d3-sankey"),s=t("@plotly/d3-sankey-circular"),l=t("./constants"),c=t("tinycolor2"),u=t("../../components/color"),f=t("../../components/drawing"),h=t("../../lib"),p=h.strTranslate,d=h.strRotate,m=t("../../lib/gup"),g=m.keyFun,v=m.repeat,y=m.unwrap,x=t("../../lib/svg_text_utils"),b=t("../../registry"),_=t("../../constants/alignment"),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=y(e),a=i.trace,u=a.domain,f="h"===a.orientation,p=a.node.pad,d=a.node.thickness,m=t.width*(u.x[1]-u.x[0]),g=t.height*(u.y[1]-u.y[0]),v=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[m,g]:[g,m]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(v).links(x);var _,w,T,k=n();for(var A in n.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(v=k.nodes));n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:m,height:g,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,linkArrowLength:a.link.arrowlen,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:f?g:m,dragPerpendicular:f?m:g,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=c(e.color),i=e.source.label+"|"+e.target.label+"__"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:u.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,linkArrowLength:t.linkArrowLength,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){var e=t.linkArrowLength;if(t.link.circular)return function(t,e){var r=t.width/2,n=t.circularPathData;return"top"===t.circularLinkType?"M "+(n.targetX-e)+" "+(n.targetY+r)+" L"+(n.rightInnerExtent-e)+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r-e)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-e)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent-r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 1 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY-n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.leftInnerExtent+" "+(n.sourceY-r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 0 "+(n.leftFullExtent-r)+" "+(n.sourceY-n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"L"+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r-e)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-e)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+(n.rightInnerExtent-e)+" "+(n.targetY-r)+"L"+(n.targetX-e)+" "+(n.targetY-r)+(e>0?"L"+n.targetX+" "+n.targetY:"")+"Z":"M "+(n.targetX-e)+" "+(n.targetY-r)+" L"+(n.rightInnerExtent-e)+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r-e)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-e)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent+r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 0 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY+n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.leftInnerExtent+" "+(n.sourceY+r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 1 "+(n.leftFullExtent-r)+" "+(n.sourceY+n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"L"+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r-e)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-e)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+(n.rightInnerExtent-e)+" "+(n.targetY+r)+"L"+(n.targetX-e)+" "+(n.targetY+r)+(e>0?"L"+n.targetX+" "+n.targetY:"")+"Z"}(t.link,e);var r=Math.abs((t.link.target.x0-t.link.source.x1)/2);e>r&&(e=r);var n=t.link.source.x1,a=t.link.target.x0-e,o=i(n,a),s=o(.5),l=o(.5),c=t.link.y0-t.link.width/2,u=t.link.y0+t.link.width/2,f=t.link.y1-t.link.width/2,h=t.link.y1+t.link.width/2,p="M"+n+","+c,d="C"+s+","+c+" "+l+","+f+" "+a+","+f,m="C"+l+","+h+" "+s+","+u+" "+n+","+u,g=e>0?"L"+(a+e)+","+(f+t.link.width/2):"";return p+d+(g+="L"+a+","+h)+m+"Z"}}function S(t,e){var r=c(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s="node_"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:u.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join("_"),interactionState:t.interactionState,figure:t}}function E(t){t.attr("transform",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr("d",M())}function P(t){t.attr("width",(function(t){return t.node.x1-t.node.x0})).attr("height",(function(t){return t.visibleHeight}))}function I(t){return t.link.width>1||t.linkLineWidth>0}function O(t){return p(t.translateX,t.translateY)+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function z(t,e,r){t.on(".basic",null).on("mouseover.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on("mousemove.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on("mouseout.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)})).on("click.basic",(function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)}))}function D(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),"snap"===a.arrangement)){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=a.event.x,i=a.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on("dragend",(function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[v].gap;)v--;for(x=C[v].s,m=C.length-1;m>v;m--)C[m].s=x;for(;lM[u]&&u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],943:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./period_defaults"),u=t("./stack_defaults"),f=t("./marker_defaults"),h=t("./line_defaults"),p=t("./line_shape_defaults"),d=t("./text_defaults"),m=t("./fillcolor_defaults"),g=t("../../lib").coercePattern;e.exports=function(t,e,r,v){function y(r,i){return n.coerce(t,e,a,r,i)}var x=l(t,e,v,y);if(x||(e.visible=!1),e.visible){c(t,e,v,y),y("xhoverformat"),y("yhoverformat");var b=u(t,e,v,y),_=!b&&x=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&m<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-m);return aW!=(N=z[I][1])>=W&&(R=z[I-1][0],F=z[I][0],N-B&&(D=R+(F-R)*(W-B)/(N-B),H=Math.min(H,D),q=Math.max(q,D)));H=Math.max(H,0),q=Math.min(q,h._length);var Z=s.defaultLine;return s.opacity(f.fillcolor)?Z=f.fillcolor:s.opacity((f.line||{}).color)&&(Z=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:W,y1:W,color:Z,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":367,"../../components/fx":407,"../../lib":515,"../../registry":647,"./get_trace_color":946}],948:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t("./attributes"),supplyDefaults:t("./defaults"),crossTraceDefaults:t("./cross_trace_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./cross_trace_calc"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot"),colorbar:t("./marker_colorbar"),formatLabels:t("./format_labels"),style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":578,"./arrays_to_calcdata":935,"./attributes":936,"./calc":937,"./cross_trace_calc":941,"./cross_trace_defaults":942,"./defaults":943,"./format_labels":945,"./hover":947,"./marker_colorbar":954,"./plot":957,"./select":958,"./style":960,"./subtypes":961}],949:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s,l){l||(l={});var c=(t.marker||{}).color;(s("line.color",r),i(t,"line"))?a(t,e,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r);s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},{"../../components/colorscale/defaults":377,"../../components/colorscale/helpers":378,"../../lib":515}],950:[function(t,e,r){"use strict";var n=t("../../components/drawing"),i=t("../../constants/numerical"),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,c=t("../../lib"),u=c.segmentsIntersect,f=c.constrain,h=t("./constants");e.exports=function(t,e){var r,i,o,p,d,m,g,v,y,x,b,_,w,T,k,A,M,S,E=e.trace||{},L=e.xaxis,C=e.yaxis,P="log"===L.type,I="log"===C.type,O=L._length,z=C._length,D=e.backoff,R=E.marker,F=e.connectGaps,B=e.baseTolerance,N=e.shape,j="linear"===N,U=E.fill&&"none"!==E.fill,V=[],H=h.minTolerance,q=t.length,G=new Array(q),Y=0;function W(r){var n=t[r];if(!n)return!1;var i=e.linearized?L.l2p(n.x):L.c2p(n.x),o=e.linearized?C.l2p(n.y):C.c2p(n.y);if(i===a){if(P&&(i=L.c2p(n.x,!0)),i===a)return!1;I&&o===a&&(i*=Math.abs(L._m*z*(L._m>0?s:l)/(C._m*O*(C._m>0?s:l)))),i*=1e3}if(o===a){if(I&&(o=C.c2p(n.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function Z(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,c=i*o+a*s;if(c>0&&cot||t[1]lt)return[f(t[0],at,ot),f(t[1],st,lt)]}function ft(t,e){return t[0]===e[0]&&(t[0]===at||t[0]===ot)||(t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0)}function ht(t,e,r){return function(n,i){var a=ut(n),o=ut(i),s=[];if(a&&o&&ft(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*c.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);l&&((a&&o?l>0==a[t]>o[t]?a:o:a||o)[t]+=l);return s}}function pt(t){var e=t[0],r=t[1],n=e===G[Y-1][0],i=r===G[Y-1][1];if(!n||!i)if(Y>1){var a=e===G[Y-2][0],o=r===G[Y-2][1];n&&(e===at||e===ot)&&a?o?Y--:G[Y-1]=t:i&&(r===st||r===lt)&&o?a?Y--:G[Y-1]=t:G[Y++]=t}else G[Y++]=t}function dt(t){G[Y-1][0]!==t[0]&&G[Y-1][1]!==t[1]&&pt([$,tt]),pt(t),et=null,$=tt=0}"linear"===N||"spline"===N?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=ct[i],o=u(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&J(o,t)ot?ot:0,Q=e[1]lt?lt:0,K||Q){if(Y)if(et){var n=nt(et,e);n.length>1&&(dt(n[0]),G[Y++]=n[1])}else rt=nt(G[Y-1],e)[0],G[Y++]=rt;else G[Y++]=[K||e[0],Q||e[1]];var i=G[Y-1];K&&Q&&(i[0]!==K||i[1]!==Q)?(et&&($!==K&&tt!==Q?pt($&&tt?(a=et,s=(o=e)[0]-a[0],l=(o[1]-a[1])/s,(a[1]*o[0]-o[1]*a[0])/s>0?[l>0?at:ot,lt]:[l>0?ot:at,st]):[$||K,tt||Q]):$&&tt&&pt([$,tt])),pt([K,Q])):$-K&&tt-Q&&pt([K||$,Q||tt]),et=e,$=K,tt=Q}else et&&dt(nt(et,e)[0]),G[Y++]=e;var a,o,s,l}for(r=0;rX(m,vt))break;o=m,(w=y[0]*v[0]+y[1]*v[1])>b?(b=w,p=m,g=!1):w<_&&(_=w,d=m,g=!0)}if(g?(gt(p),o!==d&>(d)):(d!==i&>(d),o!==p&>(p)),gt(o),r>=t.length||!m)break;gt(m),i=m}}else gt(p)}et&&pt([$||et[0],tt||et[1]]),V.push(G.slice(0,Y))}var yt=N.slice(N.length-1);if(D&&"h"!==yt&&"v"!==yt){for(var xt=!1,bt=-1,_t=[],wt=0;wt=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},{"fast-isnumeric":190}],954:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],955:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;(c=c||{},f&&(r=f),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),c.noAngle||(l("marker.angle"),c.noAngleRef||l("marker.angleref"),c.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient)&&("none"!==l("marker.gradient.type")&&l("marker.gradient.color"))}},{"../../components/color":367,"../../components/colorscale/defaults":377,"../../components/colorscale/helpers":378,"./subtypes":961}],956:[function(t,e,r){"use strict";var n=t("../../lib").dateTick0,i=t("../../constants/numerical").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",a(s,e.ycalendar)),n("yperiodalignment"))}}},{"../../constants/numerical":491,"../../lib":515}],957:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../registry"),a=t("../../lib"),o=a.ensureSingle,s=a.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),f=t("./link_traces"),h=t("../../lib/polygon").tester;function p(t,e,r,f,p,d,m){var g;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(!c.hasMarkers(h))return;var p=h.marker.maxdisplayed;if(0===p)return;var d=i.filter((function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]})),m=Math.ceil(d.length/p),g=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,"g","errorbars"),A=o(T,"g","lines"),M=o(T,"g","points"),S=o(T,"g","text");if(i.getComponentMethod("errorbars","plot")(t,k,r,m),!0===_.visible){var E,L;y(T).style("opacity",_.opacity);var C=_.fill.charAt(_.fill.length-1);"x"!==C&&"y"!==C&&(C=""),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=T;var P,I,O="",z=[],D=_._prevtrace;D&&(O=D._prevRevpath||"",L=D._nextFill,z=D._polygons);var R,F,B,N,j,U,V,H="",q="",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(L&&L.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split("").reverse().join(""))):R=F="spline"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return"M"+t.join("L")},B=function(t){return F(t.reverse())},G=u(f,{xaxis:x,yaxis:b,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:_.fill}),V=_._polygons=new Array(G.length),g=0;g1){var r=n.select(this);if(r.datum(f),t)y(r.style("opacity",0).attr("d",P).call(l.lineGroupStyle)).style("opacity",1);else{var i=y(r);i.attr("d",P),l.singleLineStyle(f,i)}}}}}var W=A.selectAll(".js-line").data(G);y(W.exit()).style("opacity",0).remove(),W.each(Y(!1)),W.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(C?("y"===C?N[1]=U[1]=b.c2p(0,!0):"x"===C&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr("d","M"+U+"L"+N+"L"+H.substr(1)).call(l.singleFillStyle,t)):y(E).attr("d",H+"Z").call(l.singleFillStyle,t))):L&&("tonext"===_.fill.substr(0,6)&&H&&O?("tonext"===_.fill?y(L).attr("d",H+"Z"+O+"Z").call(l.singleFillStyle,t):y(L).attr("d",H+"L"+O.substr(1)+"Z").call(l.singleFillStyle,t),_._polygons=_._polygons.concat(z)):(X(L),_._polygons=null)),_._prevRevpath=q,_._prevPolygons=V):(E?X(E):L&&X(L),_._polygons=_._prevRevpath=_._prevPolygons=null),M.datum(f),S.datum(f),function(e,i,a){var o,u=a[0].trace,f=c.hasMarkers(u),h=c.hasText(u),p=tt(u),d=et,m=et;if(f||h){var g=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?g=w?K:J:_&&!w&&(g=Q),f&&(d=g),h&&(m=g)}var T,k=(o=e.selectAll("path.point").data(d,p)).enter().append("path").classed("point",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),f&&(T=l.makePointStyleFns(u)),o.each((function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,T,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&&i.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):a.remove()})),v?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=i.selectAll("g").data(m,p)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(t){var e=n.select(this),i=y(e.select("text"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()})),o.selectAll("text").call(l.textPointStyle,u,t).each((function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll("tspan.line").each((function(){y(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(M,S,f);var Z=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(M,Z,t),l.setClipUrl(S,Z,t)}function X(t){y(t).attr("d","M0,0Z")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,m=!!a&&a.duration>0,g=f(t,e,r);((u=i.selectAll("g.trace").data(g,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each((function(e){var i=o(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push("_ownFill"),a._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),"path","js-fill")}))}))}(t,u,e),m)?(c&&(h=c()),n.transition().duration(a.duration).ease(a.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){i.selectAll("g.trace").each((function(r,n){p(t,n,e,r,g,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,g,this,a)}));d&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},{"../../components/drawing":389,"../../lib":515,"../../lib/polygon":527,"../../registry":647,"./line_points":950,"./link_traces":952,"./subtypes":961,"@plotly/d3":58}],958:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r0){var h=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function b(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var m=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f("surfacecolor",h||p);for(var d=["x","y","z"],m=0;m<3;++m){var g="projection."+d[m];f(g+".show")&&(f(g+".opacity"),f(g+".scale"))}var v=n.getComponentMethod("errorbars","supplyDefaults");v(t,e,h||p||r,{axis:"z"}),v(t,e,h||p||r,{axis:"y",inherit:"z"}),v(t,e,h||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":515,"../../registry":647,"../scatter/line_defaults":949,"../scatter/marker_defaults":955,"../scatter/subtypes":961,"../scatter/text_defaults":962,"./attributes":964}],969:[function(t,e,r){"use strict";e.exports={plot:t("./convert"),attributes:t("./attributes"),markerSymbols:t("../../constants/gl3d_markers"),supplyDefaults:t("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:t("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":489,"../../plots/gl3d":607,"./attributes":964,"./calc":965,"./convert":967,"./defaults":968}],970:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/template_attributes").texttemplateAttrs,s=t("../../components/colorscale/attributes"),l=t("../../lib/extend").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,backoff:u.backoff,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,angle:c.angle,angleref:c.angleref,standoff:c.standoff,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:"calc"},s("marker.line")),gradient:c.gradient,editType:"calc"},s("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a()}},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plots/attributes":562,"../../plots/template_attributes":642,"../scatter/attributes":936}],971:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../scatter/colorscale_calc"),a=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&"legendonly"!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e._length,p=new Array(h),d=!1;for(c=0;c")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,g.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":515,"../scatter/hover":947}],976:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:t("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":578,"../scatter/marker_colorbar":954,"../scatter/select":958,"../scatter/style":960,"./attributes":970,"./calc":971,"./defaults":972,"./event_data":973,"./format_labels":974,"./hover":975,"./plot":977}],977:[function(t,e,r){"use strict";var n=t("../scatter/plot"),i=t("../../plots/cartesian/axes"),a=t("../../components/drawing");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f=i.getFromId(t,u.xaxis||"x"),h=i.getFromId(t,u.yaxis||"y"),p={xaxis:f,yaxis:h,plot:e.plot};for(s=0;s")}(c,m,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":407,"../../constants/numerical":491,"../../lib":515,"../scatter/get_trace_color":946,"./attributes":978}],984:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style"),styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:t("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":598,"../scatter/marker_colorbar":954,"../scatter/style":960,"./attributes":978,"./calc":979,"./defaults":980,"./event_data":981,"./format_labels":982,"./hover":983,"./plot":985,"./select":986,"./style":987}],985:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=t("../../lib/topojson_utils").getTopojsonFeatures,o=t("../../lib/geojson_utils"),s=t("../../lib/geo_location_utils"),l=t("../../plots/cartesian/autorange").findExtremes,c=t("../../constants/numerical").BADNUM,u=t("../scatter/calc").calcMarkerSize,f=t("../scatter/subtypes"),h=t("./style");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d="geojson-id"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=g,w=2*b,T={},k=l.makeCalcdata(e,"x"),A=y.makeCalcdata(e,"y"),M=s(e,l,"x",k),S=s(e,y,"y",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,C,E,L),z=d(t,x);return f(o,e),_?O.marker&&(I=O.marker.sizeAvg||Math.max(O.marker.size,3)):I=c(e,b),u(t,e,l,y,E,L,I),O.errorX&&v(e,l,O.errorX),O.errorY&&v(e,y,O.errorY),O.fill&&!z.fill2d&&(z.fill2d=!0),O.marker&&!z.scatter2d&&(z.scatter2d=!0),O.line&&!z.line2d&&(z.line2d=!0),!O.errorX&&!O.errorY||z.error2d||(z.error2d=!0),O.text&&!z.glText&&(z.glText=!0),O.marker&&(O.marker.snap=b),z.lineOptions.push(O.line),z.errorXOptions.push(O.errorX),z.errorYOptions.push(O.errorY),z.fillOptions.push(O.fill),z.markerOptions.push(O.marker),z.markerSelectedOptions.push(O.markerSel),z.markerUnselectedOptions.push(O.markerUnsel),z.textOptions.push(O.text),z.textSelectedOptions.push(O.textSel),z.textUnselectedOptions.push(O.textUnsel),z.selectBatch.push([]),z.unselectBatch.push([]),T._scene=z,T.index=z.count,T.x=E,T.y=L,T.positions=C,z.count++,[{x:!1,y:!1,t:T,trace:e}]}},{"../../constants/numerical":491,"../../lib":515,"../../plots/cartesian/align_period":563,"../../plots/cartesian/autorange":565,"../../plots/cartesian/axis_ids":570,"../scatter/calc":937,"../scatter/colorscale_calc":939,"./constants":991,"./convert":992,"./scene_update":1e3,"@plotly/point-cluster":59}],991:[function(t,e,r){"use strict";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,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]}}},{}],992:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("svg-path-sdf"),a=t("color-normalize"),o=t("../../registry"),s=t("../../lib"),l=t("../../components/drawing"),c=t("../../plots/cartesian/axis_ids"),u=t("../../lib/gl_format_color").formatColor,f=t("../scatter/subtypes"),h=t("../scatter/make_bubble_size_func"),p=t("./helpers"),d=t("./constants"),m=t("../../constants/interactions").DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t("../../components/fx/helpers").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,m=e.texttemplate;if(m){p.text=[];var g=i._d3locale,y=Array.isArray(m),x=y?Math.min(m.length,a):a,b=y?function(t){return m[t]}:function(){return m};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,m=g[p],v=g[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[m*y/h,x/h]}}return o}}},{"../../components/drawing":389,"../../components/fx/helpers":403,"../../constants/interactions":490,"../../lib":515,"../../lib/gl_format_color":511,"../../plots/cartesian/axis_ids":570,"../../registry":647,"../scatter/make_bubble_size_func":953,"../scatter/subtypes":961,"./constants":991,"./helpers":996,"color-normalize":89,"fast-isnumeric":190,"svg-path-sdf":311}],993:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./helpers"),o=t("./attributes"),s=t("../scatter/constants"),l=t("../scatter/subtypes"),c=t("../scatter/xy_defaults"),u=t("../scatter/period_defaults"),f=t("../scatter/marker_defaults"),h=t("../scatter/line_defaults"),p=t("../scatter/fillcolor_defaults"),d=t("../scatter/text_defaults");e.exports=function(t,e,r,m){function g(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,m,g);if(x){u(t,e,m,g),g("xhoverformat"),g("yhoverformat");var b=x100},r.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},{"./constants":991}],997:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../scatter/get_trace_color");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.ma=i.isArrayOrTypedArray(d.angle)?d.angle[f]:d.angle,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var m=d&&d.line;m&&(h.mlc=Array.isArray(m.color)?m.color[f]:m.color,h.mlw=i.isArrayOrTypedArray(m.width)?m.width[f]:m.width);var g=d&&d.gradient;g&&"none"!==g.type&&(h.mgt=Array.isArray(g.type)?g.type[f]:g.type,h.mgc=Array.isArray(g.color)?g.color[f]:g.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:A?A[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod("errorbars","hoverInfo")(h,o,M),M}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d,m=t.cd,g=m[0].t,v=m[0].trace,y=t.xa,x=t.ya,b=g.x,_=g.y,w=y.c2p(e),T=x.c2p(r),k=t.distance;if(g.tree){var A=y.p2c(w-k),M=y.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i="x"===n?g.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):g.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=g.ids;var L=k;if("x"===n){var C=!!v.xperiodalignment,P=!!v.yperiodalignment;for(u=0;u=Math.min(I,O)&&w<=Math.max(I,O)?0:1/0}if(f=Math.min(z,D)&&T<=Math.max(z,D)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[u]}}}else for(u=i.length-1;u>-1;u--)l=b[a=i[u]],c=_[a],f=y.c2p(l)-w,h=x.c2p(c)-T,(p=Math.sqrt(f*f+h*h))y.glText.length){var T=_-y.glText.length;for(m=0;mr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),y.line2d.update(y.lineOptions)),y.error2d){var A=(y.errorXOptions||[]).concat(y.errorYOptions||[]);y.error2d.update(A)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=s.repeat(null,_),y.fill2d&&(y.fillOptions=y.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,c=y.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(y.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if("tozerox"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(m=0;m<_;m++){var L=r[m][0],C=L.trace,P=L.t,I=P.index,O=C._length,z=P.x,D=P.y;if(C.selectedpoints||S||E){if(S||(S=!0),C.selectedpoints){var R=y.selectBatch[I]=s.selIndices2selPoints(C),F={};for(g=0;g")}function u(t){return t+"\xb0"}}e.exports={hoverPoints:function(t,e,r){var o=t.cd,u=o[0].trace,f=t.xa,h=t.ya,p=t.subplot,d=[],m=l+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;if(g){var v=p.map.queryRenderedFeatures(null,{layers:[m]});d=v.map((function(t){return t.id}))}var y=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),x=e-y;if(n.getClosest(o,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;if(g&&-1===d.indexOf(t.i+1))return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=p.project([n,a]),l=o.x-f.c2p([x,a]),c=o.y-h.c2p([n,r]),u=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)}),t),!1!==t.index){var b=o[t.index],_=b.lonlat,w=[i.modHalf(_[0],360)+y,_[1]],T=f.c2p(w),k=h.c2p(w),A=b.mrc||1;t.x0=T-A,t.x1=T+A,t.y0=k-A,t.y1=k+A;var M={};M[u.subplot]={_subplot:p};var S=u._module.formatLabels(b,u,M);return t.lonLabel=S.lonLabel,t.latLabel=S.latLabel,t.color=a(u,b),t.extraText=c(u,b,o[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}},getExtraText:c}},{"../../components/fx":407,"../../constants/numerical":491,"../../lib":515,"../../plots/mapbox/constants":620,"../scatter/get_trace_color":946}],1008:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover").hoverPoints,eventData:t("./event_data"),selectPoints:t("./select"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:t("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":622,"../scatter/marker_colorbar":954,"../scattergeo/calc":979,"./attributes":1002,"./defaults":1004,"./event_data":1005,"./format_labels":1006,"./hover":1007,"./plot":1009,"./select":1010}],1009:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./convert"),a=t("../../plots/mapbox/constants").traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(t,e,r,n){this.type="scattermapbox",this.subplot=t,this.uid=e,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol",cluster:"source-"+e+"-circle",clusterCount:"source-"+e+"-circle"},this.layerIds={fill:a+e+"-fill",line:a+e+"-line",circle:a+e+"-circle",symbol:a+e+"-symbol",cluster:a+e+"-cluster",clusterCount:a+e+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(t,e,r){var i={type:"geojson",data:e.geojson};r&&r.enabled&&n.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom}),this.subplot.map.addSource(this.sourceIds[t],i)},l.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},l.addLayer=function(t,e,r){var n={type:e.type,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint};e.filter&&(n.filter=e.filter),this.subplot.addLayer(n,r)},l.update=function(t){var e=t[0].trace,r=this.subplot,n=r.map,a=i(r.gd,t),s=r.belowLookup["trace-"+this.uid],l=!(!e.cluster||!e.cluster.enabled),c=!!this.clusterEnabled,u=this;function f(t){c?function(t){for(var e=o.cluster,r=e.length-1;r>=0;r--){var i=e[r];n.removeLayer(u.layerIds[i])}t||n.removeSource(u.sourceIds.circle)}(t):function(t){for(var e=o.nonCluster,r=e.length-1;r>=0;r--){var i=e[r];n.removeLayer(u.layerIds[i]),t||n.removeSource(u.sourceIds[i])}}(t)}function h(t){l?function(t){t||u.addSource("circle",a.circle,e.cluster);for(var r=o.cluster,n=0;n=0;r--){var n=e[r];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}},e.exports=function(t,e){var r,n,a,l=e[0].trace,c=l.cluster&&l.cluster.enabled,u=!0!==l.visible,f=new s(t,l.uid,c,u),h=i(t.gd,e),p=f.below=t.belowLookup["trace-"+l.uid];if(c)for(f.addSource("circle",h.circle,l.cluster),r=0;r")}}e.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{"../scatter/hover":947}],1016:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":631,"../scatter/marker_colorbar":954,"../scatter/select":958,"../scatter/style":960,"./attributes":1011,"./calc":1012,"./defaults":1013,"./format_labels":1014,"./hover":1015,"./plot":1017}],1017:[function(t,e,r){"use strict";var n=t("../scatter/plot"),i=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,s=e.yaxis,l={xaxis:o,yaxis:s,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},c=e.radialAxis,u=e.angularAxis,f=0;f=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=g,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}},e.exports.reglPrecompiled={}},{"../../lib":515,"../scattergl/constants":991,"../scattergl/convert":992,"../scattergl/plot":999,"../scattergl/scene_update":1e3,"@plotly/point-cluster":59,"fast-isnumeric":190}],1026:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../../plots/template_attributes").texttemplateAttrs,a=t("../../lib/extend").extendFlat,o=t("../scatter/attributes"),s=t("../../plots/attributes"),l=o.line;e.exports={mode:o.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:o.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:a({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},{"../../lib/extend":505,"../../plots/attributes":562,"../../plots/template_attributes":642,"../scatter/attributes":936}],1027:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../constants/numerical").BADNUM,a=t("../scatter/colorscale_calc"),o=t("../scatter/arrays_to_calcdata"),s=t("../scatter/calc_selection"),l=t("../scatter/calc").calcMarkerSize;e.exports=function(t,e){for(var r=t._fullLayout,c=e.subplot,u=r[c].realaxis,f=r[c].imaginaryaxis,h=u.makeCalcdata(e,"real"),p=f.makeCalcdata(e,"imag"),d=e._length,m=new Array(d),g=0;g")}}e.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{"../scatter/hover":947}],1031:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scattersmith",basePlotModule:t("../../plots/smith"),categories:["smith","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/smith":638,"../scatter/marker_colorbar":954,"../scatter/select":958,"../scatter/style":960,"./attributes":1026,"./calc":1027,"./defaults":1028,"./format_labels":1029,"./hover":1030,"./plot":1032}],1032:[function(t,e,r){"use strict";var n=t("../scatter/plot"),i=t("../../constants/numerical").BADNUM,a=t("../../plots/smith/helpers").smith;e.exports=function(t,e,r){for(var o=e.layers.frontplot.select("g.scatterlayer"),s=e.xaxis,l=e.yaxis,c={xaxis:s,yaxis:l,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},u=0;u"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+": "+e)}}},{"../scatter/hover":947}],1039:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:t("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":643,"../scatter/marker_colorbar":954,"../scatter/select":958,"../scatter/style":960,"./attributes":1033,"./calc":1034,"./defaults":1035,"./event_data":1036,"./format_labels":1037,"./hover":1038,"./plot":1040}],1040:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e,r){var i=e.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=e.xaxis,o=e.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},l=e.layers.frontplot.select("g.scatterlayer"),c=0;ch?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||!!p.selectedpoints||C){var I=p._length;if(p.selectedpoints){m.selectBatch=p.selectedpoints;var O=p.selectedpoints,z={};for(l=0;l1&&(u=m[y-1],h=g[y-1],d=v[y-1]),e=0;eu?"-":"+")+"x")).replace("y",(f>h?"-":"+")+"y")).replace("z",(p>d?"-":"+")+"z");var L=function(){y=0,M=[],S=[],E=[]};(!y||y2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,"xaxis"),d(e._v,"yaxis"),d(e._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=d(e._Xs,"xaxis"),g=d(e._Ys,"yaxis"),v=d(e._Zs,"zaxis");if(f.meshgrid=[m,g,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,"xaxis"),d(e._startsY,"yaxis"),d(e._startsZ,"zaxis"));else{for(var y=g[0],x=h(m),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(g.length,x.length),l=function(t){return A(g[t])&&M(t)},f=function(t){return String(g[t])}):(r=Math.min(y.length,x.length),l=function(t){return A(y[t])&&M(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var P=a.randstr(),I=0;I"),name:A||z("name")?y.name:void 0,color:k("hoverlabel.bgcolor")||x.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:P,eventData:l};g&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?"left":"right"),v&&(F.x=E,F.idealAlign=E<0?"left":"right");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(v){var N=t.select("path.surface");h.styleOne(N,i,y,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:l||[f(i,y,h.eventDataKeys)],event:n.event})}})),t.on("mouseout",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select("path.surface");h.styleOne(l,s,a,{hovered:!1})}})),t.on("click",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=g&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(m,u):c.findEntryWithLevel(m,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,"plotly_"+d.type+"click",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call("_storeDirectGUIEdit",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call("animate",r,b,_)}}))}},{"../../components/fx":407,"../../components/fx/helpers":403,"../../lib":515,"../../lib/events":504,"../../registry":647,"../pie/helpers":915,"./helpers":1064,"@plotly/d3":58}],1064:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color"),a=t("../../lib/setcursor"),o=t("../pie/helpers");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,"label").join("/")+"/"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return"0%"===r&&(r=o.formatPiePercent(t,e)),r}},{"../../components/color":367,"../../lib":515,"../../lib/setcursor":536,"../pie/helpers":915}],1065:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot").plot,style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":954,"./attributes":1058,"./base_plot":1059,"./calc":1060,"./defaults":1062,"./layout_attributes":1066,"./layout_defaults":1067,"./plot":1068,"./style":1069}],1066:[function(t,e,r){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1067:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},{"../../lib":515,"./layout_attributes":1066}],1068:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("d3-hierarchy"),a=t("d3-interpolate").interpolate,o=t("../../components/drawing"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../bar/uniform_text"),u=c.recordMinTextSize,f=c.clearMinTextSize,h=t("../pie/plot"),p=t("../pie/helpers").getRotationAngle,d=h.computeTransform,m=h.transformInsideText,g=t("./style").styleOne,v=t("../bar/style").resizeText,y=t("./fx"),x=t("./constants"),b=t("./helpers");function _(t,e,c,f){var h=t._context.staticPlot,v=t._fullLayout,_=!v.uniformtext.mode&&b.hasTransition(f),T=n.select(c).selectAll("g.slice"),k=e[0],A=k.trace,M=k.hierarchy,S=b.findEntryWithLevel(M,A.level),E=b.getMaxDepth(A),L=v._size,C=A.domain,P=L.w*(C.x[1]-C.x[0]),I=L.h*(C.y[1]-C.y[0]),O=.5*Math.min(P,I),z=k.cx=L.l+L.w*(C.x[1]+C.x[0])/2,D=k.cy=L.t+L.h*(1-C.y[0])-I/2;if(!S)return T.remove();var R=null,F={};_&&T.each((function(t){F[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!R&&b.isEntry(t)&&(R=t)}));var B=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(S).descendants(),N=S.height+1,j=0,U=E;k.hasMultipleRoots&&b.isHierarchyRoot(S)&&(B=B.slice(1),N-=1,j=1,U+=1),B=B.filter((function(t){return t.y1<=U}));var V=p(A.rotation);V&&B.forEach((function(t){t.x0+=V,t.x1+=V}));var H=Math.min(N,E),q=function(t){return(t-j)/H*O},G=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},Y=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,z,D)},W=function(t){return z+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},Z=function(t){return D+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(T=T.data(B,b.getPtId)).enter().append("g").classed("slice",!0),_?T.exit().transition().each((function(){var t=n.select(this);t.select("path.surface").transition().attrTween("d",(function(t){var e=function(t){var e,r=b.getPtId(t),n=F[r],i=F[b.getPtId(S)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+V;e=t.rpx1X?2*Math.PI:0)+V;e={x0:i,x1:i}}else e={rpx0:O,rpx1:O},s.extendFlat(e,Q(t));else e={rpx0:0,rpx1:0};else e={x0:V,x1:V};return a(e,n)}(t);return function(t){return Y(e(t))}})):f.attr("d",Y),c.call(y,S,t,e,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(g,i,A);var p=s.ensureSingle(c,"g","slicetext"),w=s.ensureSingle(p,"text","",(function(t){t.attr("data-notex",1)})),T=s.ensureUniformFontSize(t,b.determineTextFont(A,i,v.font));w.text(r.formatSliceLabel(i,S,A,e,v)).classed("slicetext",!0).attr("text-anchor","middle").call(o.font,T).call(l.convertToTspans,t);var M=o.bBox(w.node());i.transform=m(M,i,k),i.transform.targetX=W(i),i.transform.targetY=Z(i);var E=function(t,e){var r=t.transform;return d(r,e),r.fontSize=T.size,u(A.type,r,v),s.getTextTransform(r)};_?w.transition().attrTween("transform",(function(t){var e=function(t){var e,r=F[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},R)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,Q(t));else e.x0=e.x1=V;else e.x0=e.x1=V;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),c=a(e.x0,t.x0),f=a(e.x1,t.x1),h=a(e.transform.scale,n.scale),p=a(e.transform.rotate,n.rotate),d=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,m=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=c(t),i=f(t),a=function(t){return m(Math.pow(t,d))}(t),s={pxmid:G(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return u(A.type,n,v),{transform:{targetX:W(s),targetY:Z(s),scale:h(t),rotate:p(t),rCenter:a}}}}(t);return function(t){return E(e(t),M)}})):w.attr("transform",E(i,M))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,u=!s.uniformtext.mode&&b.hasTransition(r);(f("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),u)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&v(t,s._sunburstlayer.selectAll(".trace"),"sunburst"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&"none"!==o))return"";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var m,g=o.split("+"),v=function(t){return-1!==g.indexOf(t)},y=[];if(v("label")&&u.label&&y.push(u.label),u.hasOwnProperty("v")&&v("value")&&y.push(b.formatValue(u.v,l)),!h){v("current path")&&y.push(b.getPath(t.data));var x=0;v("percent parent")&&x++,v("percent entry")&&x++,v("percent root")&&x++;var _=x>1;if(x){var w,T=function(t){m=b.formatPercent(w,l),_&&(m+=" of "+t),y.push(m)};v("percent parent")&&!h&&(w=d/b.getValue(p),T("parent")),v("percent entry")&&(w=d/b.getValue(e),T("entry")),v("percent root")&&(w=d/b.getValue(f),T("root"))}}return v("text")&&(m=s.castOption(r,u.i,"text"),s.isValidTextValue(m)&&y.push(m)),y.join("
")}var k=s.castOption(r,u.i,"texttemplate");if(!k)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=b.formatValue(u.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),u.hasOwnProperty("color")&&(A.color=u.color);var M=s.castOption(r,u.i,"text");return(s.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=s.castOption(r,u.i,"customdata"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},{"../../components/drawing":389,"../../lib":515,"../../lib/svg_text_utils":541,"../bar/style":671,"../bar/uniform_text":673,"../pie/helpers":915,"../pie/plot":919,"./constants":1061,"./fx":1063,"./helpers":1064,"./style":1069,"@plotly/d3":58,"d3-hierarchy":115,"d3-interpolate":116}],1069:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../components/color"),a=t("../../lib"),o=t("../bar/uniform_text").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,"marker.line.color")||i.defaultLine,c=a.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",c).call(i.fill,n.color).call(i.stroke,l).style("opacity",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");o(t,e,"sunburst"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style("opacity",r.opacity),e.selectAll("path.surface").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{"../../components/color":367,"../../lib":515,"../bar/uniform_text":673,"@plotly/d3":58}],1070:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/attributes"),a=t("../../plots/cartesian/axis_format_attributes").axisHoverFormat,o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../plots/attributes"),l=t("../../lib/extend").extendFlat,c=t("../../plot_api/edit_types").overrideAll;function u(t){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:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var f=e.exports=c(l({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:o(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:u(),y:u(),z:u()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),"calc","nested");f.x.editType=f.y.editType=f.z.editType="calc+clearAxisTypes",f.transforms=void 0},{"../../components/color":367,"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plot_api/edit_types":548,"../../plots/attributes":562,"../../plots/cartesian/axis_format_attributes":569,"../../plots/template_attributes":642}],1071:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):n(t,e,{vals:e.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":375}],1072:[function(t,e,r){"use strict";var n=t("../../../stackgl_modules").gl_surface3d,i=t("../../../stackgl_modules").ndarray,a=t("../../../stackgl_modules").ndarray_linear_interpolate.d2,o=t("../heatmap/interp2d"),s=t("../heatmap/find_empties"),l=t("../../lib").isArrayOrTypedArray,c=t("../../lib/gl_format_color").parseColorScale,u=t("../../lib/str2rgbarray"),f=t("../../components/colorscale").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,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 p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.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=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[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 m(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=g(t),n=g(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]",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"}}},{}],1079:[function(t,e,r){"use strict";var n=t("./constants"),i=t("../../lib/extend").extendFlat,a=t("fast-isnumeric");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||c===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[""],d=l(d));var m=d.concat(p(r).map((function(){return c((d[0]||[""]).length)}))),g=e.domain,v=Math.floor(t._fullLayout._size.w*(g.x[1]-g.x[0])),y=Math.floor(t._fullLayout._size.h*(g.y[1]-g.y[0])),x=e.header.values.length?m[0].map((function(){return e.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return e.cells.height})):[],_=x.reduce(s,0),w=h(b,y-_+n.uplift),T=f(h(x,_),[]),k=f(w,T),A={},M=e._fullInput.columnorder.concat(p(r.map((function(t,e){return e})))),S=m.map((function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:g.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-g.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:L,height:y,columnOrder:M,groupHeight:y,rowBlocks:k,headerRowBlocks:T,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:m}),gdColumns:m.map((function(t){return t[0]})),gdColumnsOriginalOrder:m.map((function(t){return t[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:m.map((function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+"__"+A[t],label:t,specIndex:e,xIndex:M[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=u(t)})),C}},{"../../lib/extend":505,"./constants":1078,"fast-isnumeric":190}],1080:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}}))}},{"../../lib/extend":505}],1081:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../plots/domain").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),n.coerceFont(s,"header.font",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(t,e){return t-e})),o=i.map((function(t){return a.indexOf(t)})),s=o.length;s/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var c,u="string"==typeof(c=i)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?"":T(t.calcdata.cells.prefix,e,r)||"",d=u?"":T(t.calcdata.cells.suffix,e,r)||"",m=u?null:T(t.calcdata.cells.format,e,r)||null,g=p+(m?a(m)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=w(g)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?w(g):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(" "===n.wrapSplitCharacter?g.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===c.length&&(c[0]===i.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),e.each((function(t,e){t.page=c[e],t.scrollY=l})),e.attr("transform",(function(t){var e=D(t.rowBlocks,t.page)-t.scrollY;return u(0,e)})),t&&(C(t,r,e,c,n.prevPages,n,0),C(t,r,e,c,n.prevPages,n,1),x(r,t))}}function L(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter((function(t){return s.key===t.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===u}}function C(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(t,e){return e===o&&n[e]!==i[e]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll("tspan.line").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value="";s.length;)c+(i=(r=s.shift()).width+a)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0})),o.selectAll("tspan.line").remove(),_(o.select("."+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),c=o.key-l.firstRowIndex,f=l.rows[c].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[c].rowHeight&&(l.rows[c].rowHeight=p,t.selectAll("."+n.cn.columnCell).call(z),E(null,t.filter(A),0),x(r,a,!0)),s.attr("transform",(function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return u(O(o,i.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function O(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function z(t){t.attr("transform",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return u(0,r+e)})).selectAll("."+n.cn.cellRect).attr("height",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function D(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.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:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":374,"../../lib/extend":505,"../../plots/domain":593,"../../plots/template_attributes":642,"../pie/attributes":910,"../sunburst/attributes":1058,"./constants":1087}],1085:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="treemap",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{"../../plots/plots":628}],1086:[function(t,e,r){"use strict";var n=t("../sunburst/calc");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc("treemap",t)}},{"../sunburst/calc":1060}],1087:[function(t,e,r){"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1088:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../components/color"),o=t("../../plots/domain").defaults,s=t("../bar/defaults").handleText,l=t("../bar/constants").TEXTPAD,c=t("../../components/colorscale"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h("labels"),d=h("parents");if(p&&p.length&&d&&d.length){var m=h("values");m&&m.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),"squarify"===h("tiling.packing")&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var g=h("text");h("texttemplate"),e.texttemplate||h("textinfo",Array.isArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate");var v=h("pathbar.visible");s(t,e,c,h,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var y=-1!==e.textposition.indexOf("bottom");h("marker.line.width")&&h("marker.line.color",c.paper_bgcolor);var x=h("marker.colors");(e._hasColorscale=u(t,"marker","colors")||(t.marker||{}).coloraxis)?f(t,e,c,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(x||[]).length);var b=2*e.textfont.size;h("marker.pad.t",y?b/4:b),h("marker.pad.l",b/4),h("marker.pad.r",b/4),h("marker.pad.b",y?b:b/4),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h("pathbar.thickness",e.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),o(e,c,h),e._length=null}else e.visible=!1}},{"../../components/color":367,"../../components/colorscale":379,"../../lib":515,"../../plots/domain":593,"../bar/constants":659,"../bar/defaults":661,"./attributes":1084}],1089:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../sunburst/helpers"),a=t("../bar/uniform_text").clearMinTextSize,o=t("../bar/style").resizeText,s=t("./plot_one");e.exports=function(t,e,r,l,c){var u,f,h=c.type,p=c.drawDescendants,d=t._fullLayout,m=d["_"+h+"layer"],g=!r;(a(h,d),(u=m.selectAll("g.trace."+h).data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(h,!0),u.order(),!d.uniformtext.mode&&i.hasTransition(r))?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){m.selectAll("g.trace").each((function(e){s(t,e,this,r,p)}))}))):(u.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,m.selectAll(".trace"),h));g&&u.exit().remove()}},{"../bar/style":671,"../bar/uniform_text":673,"../sunburst/helpers":1064,"./plot_one":1098,"@plotly/d3":58}],1090:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx");e.exports=function(t,e,r,h,p){var d=p.barDifY,m=p.width,g=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M={},S=t._context.staticPlot,E=t._fullLayout,L=e[0],C=L.trace,P=L.hierarchy,I=m/C._entryDepth,O=u.listPath(r.data,"id"),z=s(P.copy(),[m,g],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(z=z.filter((function(t){var e=O.indexOf(t.data.id);return-1!==e&&(t.x0=I*e,t.x1=I*(e+1),t.y0=d,t.y1=d+g,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(z,u.getPtId)).enter().append("g").classed("pathbar",!0),T(h,!0,M,[m,g],x),h.order();var D=h;w&&(D=D.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),D.each((function(s){s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-Math.min(m,g)/2),s._hoverY=y(s.y1-g/2);var h=n.select(this),p=i.ensureSingle(h,"path","surface",(function(t){t.style("pointer-events",S?"none":"all")}));w?p.transition().attrTween("d",(function(t){var e=k(t,!0,M,[m,g]);return function(t){return x(e(t))}})):p.attr("d",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,C,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
").join(" ")||"";var d=i.ensureSingle(h,"g","slicetext"),T=i.ensureSingle(d,"text","",(function(t){t.attr("data-notex",1)})),L=i.ensureUniformFontSize(t,u.determineTextFont(C,s,E.font,{onPathbar:!0}));T.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(a.font,L).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:L.size,onPathbar:!0}),s.transform.fontSize=L.size,w?T.transition().attrTween("transform",(function(t){var e=A(t,!0,M,[m,g]);return function(t){return _(e(t))}})):T.attr("transform",_(s))}))}},{"../../components/drawing":389,"../../lib":515,"../../lib/svg_text_utils":541,"../sunburst/fx":1063,"../sunburst/helpers":1064,"./constants":1087,"./partition":1096,"./style":1099,"@plotly/d3":58}],1091:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../lib"),a=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx"),h=t("../sunburst/plot").formatSliceLabel;e.exports=function(t,e,r,p,d){var m=d.width,g=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,A=d.makeUpdateTextInterpolator,M=d.prevEntry,S=t._context.staticPlot,E=t._fullLayout,L=e[0].trace,C=-1!==L.textposition.indexOf("left"),P=-1!==L.textposition.indexOf("right"),I=-1!==L.textposition.indexOf("bottom"),O=!I&&!L.marker.pad.t||I&&!L.marker.pad.b,z=s(r,[m,g],{packing:L.tiling.packing,squarifyratio:L.tiling.squarifyratio,flipX:L.tiling.flip.indexOf("x")>-1,flipY:L.tiling.flip.indexOf("y")>-1,pad:{inner:L.tiling.pad,top:L.marker.pad.t,left:L.marker.pad.l,right:L.marker.pad.r,bottom:L.marker.pad.b}}).descendants(),D=1/0,R=-1/0;z.forEach((function(t){var e=t.depth;e>=L._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(D=Math.min(D,e),R=Math.max(R,e))})),p=p.data(z,u.getPtId),L._maxVisibleLayers=isFinite(R)?R-D+1:0,p.enter().append("g").classed("slice",!0),T(p,!1,{},[m,g],x),p.order();var F=null;if(w&&M){var B=u.getPtId(M);p.each((function(t){null===F&&u.getPtId(t)===B&&(F={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var N=function(){return F||{x0:0,x1:m,y0:0,y1:g}},j=p;return w&&(j=j.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),j.each((function(s){var p=u.isHeader(s,L);s._x0=v(s.x0),s._x1=v(s.x1),s._y0=y(s.y0),s._y1=y(s.y1),s._hoverX=v(s.x1-L.marker.pad.r),s._hoverY=y(I?s.y1-L.marker.pad.b/2:s.y0+L.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,"path","surface",(function(t){t.style("pointer-events",S?"none":"all")}));w?T.transition().attrTween("d",(function(t){var e=k(t,!1,N(),[m,g]);return function(t){return x(e(t))}})):T.attr("d",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,L,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?O?"":u.getPtLabel(s)||"":h(s,r,L,e,E)||"";var M=i.ensureSingle(d,"g","slicetext"),z=i.ensureSingle(M,"text","",(function(t){t.attr("data-notex",1)})),D=i.ensureUniformFontSize(t,u.determineTextFont(L,s,E.font));z.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":C||p?"start":"middle").call(a.font,D).call(o.convertToTspans,t),s.textBB=a.bBox(z.node()),s.transform=b(s,{fontSize:D.size,isHeader:p}),s.transform.fontSize=D.size,w?z.transition().attrTween("transform",(function(t){var e=A(t,!1,N(),[m,g]);return function(t){return _(e(t))}})):z.attr("transform",_(s))})),F}},{"../../components/drawing":389,"../../lib":515,"../../lib/svg_text_utils":541,"../sunburst/fx":1063,"../sunburst/helpers":1064,"../sunburst/plot":1068,"./constants":1087,"./partition":1096,"./style":1099,"@plotly/d3":58}],1092:[function(t,e,r){"use strict";e.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+O:-(I+O):0,D={x0:P,x1:P,y0:z,y1:z+I},R=function(t,e,r){var n=v.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]},V=function(t,e,r,n){if(e)return B[h(x)]||D;var i=N[v.level]||r;return function(t){return t.data.depth-b.data.depth=(n-=(y?g:g.r)-s)){var x=(r+n)/2;r=x,n=x}var b;f?i<(b=a-(y?g:g.b))&&b"===tt?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):"/"===tt?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):"\\"===tt?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===tt&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(c),$(u),$(s),"M"+K(l.x,l.y)+"L"+K(c.x,c.y)+"L"+K(s.x,s.y)+"L"+K(u.x,u.y)+"L"+K(f.x,f.y)+"L"+K(o.x,o.y)+"Z"},toMoveInsideSlice:et,makeUpdateSliceInterpolator:nt,makeUpdateTextInterpolator:it,handleSlicesExit:at,hasTransition:A,strTransform:ot}):w.remove()}},{"../../lib":515,"../bar/constants":659,"../bar/plot":668,"../bar/uniform_text":673,"../sunburst/helpers":1064,"./constants":1087,"./draw_ancestors":1090,"@plotly/d3":58,"d3-interpolate":116}],1099:[function(t,e,r){"use strict";var n=t("@plotly/d3"),i=t("../../components/color"),a=t("../../lib"),o=t("../sunburst/helpers"),s=t("../bar/uniform_text").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s="rgba(0,0,0,0)",l=0;else if(s=a.castOption(r,f,"marker.line.color")||i.defaultLine,l=a.castOption(r,f,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var m=r.marker.depthfade;if(m){var g,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===m){var y=o.getMaxDepth(r);g=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else g=e.data.depth-r._entryDepth,r._atRootLevel||g++;if(g>0)for(var x=0;x0){var b,_,w,T,k,A=t.xa,M=t.ya;"h"===d.orientation?(k=e,b="y",w=M,_="x",T=A):(k=r,b="x",w=A,_="y",T=M);var S=p[t.index];if(k>=S.span[0]&&k<=S.span[1]){var E=i.extendFlat({},t),L=T.c2p(k,!0),C=s.getKdeValue(S,d,k),P=s.getPositionOnKdePath(S,d,L),I=w._offset,O=w._length;E[b+"0"]=P[0],E[b+"1"]=P[1],E[_+"0"]=E[_+"1"]=L,E[_+"Label"]=_+": "+a.hoverLabelText(T,k,d[_+"hoverformat"])+", "+p[0].t.labels.kde+" "+C.toFixed(3);for(var z=0,D=0;D")),u.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(h,g),[u]}function k(t){return n(m,t,h[d+"hoverformat"])}}},{"../../components/color":367,"../../constants/delta.js":485,"../../plots/cartesian/axes":566,"../bar/hover":664}],1122:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":578,"../bar/select":669,"./attributes":1115,"./calc":1116,"./cross_trace_calc":1118,"./defaults":1119,"./event_data":1120,"./hover":1121,"./layout_attributes":1123,"./layout_defaults":1124,"./plot":1125,"./style":1126}],1123:[function(t,e,r){"use strict";e.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"}}},{}],1124:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(g+=h?"M"+f[0]+","+d[1]+"V"+d[0]:"M"+f[1]+","+d[0]+"H"+f[0]),"between"!==p&&(r.isSum||s path").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".lines").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":367,"../../components/drawing":389,"../../constants/interactions":490,"../bar/style":671,"../bar/uniform_text":673,"@plotly/d3":58}],1127:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),i=t("../lib"),a=t("../plot_api/plot_schema"),o=t("./helpers").pointsAccessorFunction,s=t("../constants/numerical").BADNUM;r.moduleType="transform",r.name="aggregate";var l=r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case"count":return f;case"first":return h;case"last":return p;case"sum":return function(t,e){for(var r=0,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o":return function(t){return h(t)>s};case">=":return function(t){return h(t)>=s};case"[]":return function(t){var e=h(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=h(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=h(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=h(t);return es[1]};case"](":return function(t){var e=h(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=h(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(h(t))};case"}{":return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(g);for(var w=o(e.transforms,r),T=0;T1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(a=0;a0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var i,a,o=[],s=e;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){(function(){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -"use strict";var e=t("base64-js"),n=t("ieee754");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return o(t,e,r)}function o(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(t).length;default:if(i)return n?-1:D(t).length;e=(""+e).toLowerCase(),i=!0}}function h(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return M(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return A(this,e,r);case"base64":return w(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),N(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;ne&&(t+=" ... "),""},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return g(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return y(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function C(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function I(t,e,r,i,a){return e=+e,r>>>=0,a||C(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function R(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:4}],4:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*m}},{}],5:[function(t,e,r){var n,i,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function l(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var c,u=[],f=!1,h=-1;function p(){f&&c&&(f=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!f){var t=l(p);f=!0;for(var e=u.length;e;){for(c=u,u=[];++h1)for(var r=1;r0?c=c.ushln(f):f<0&&(u=u.ushln(-f));return s(c,u)}},{"./div":17,"./is-rat":19,"./lib/is-bn":23,"./lib/num-to-bn":24,"./lib/rationalize":25,"./lib/str-to-bn":26}],19:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":23}],20:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":33}],21:[function(t,e,r){"use strict";var n=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a20)return 52;return r+32}},{"bit-twiddle":32,"double-bits":64}],23:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":33}],24:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("double-bits");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":33,"double-bits":64}],25:[function(t,e,r){"use strict";var n=t("./num-to-bn"),i=t("./bn-sign");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{"./bn-sign":20,"./num-to-bn":24}],26:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":33}],27:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":25}],28:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":20}],29:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":25}],30:[function(t,e,r){"use strict";var n=t("./lib/bn-to-num"),i=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,f=n(l.ushln(u).divRound(r));return c*(s+f*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53;f=n(l.ushln(h).divRound(r));return h<1023?c*f*Math.pow(2,-h):(f*=Math.pow(2,-1023),c*f*Math.pow(2,1023-h))}},{"./lib/bn-to-num":21,"./lib/ctz":22}],31:[function(t,e,r){"use strict";function n(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function i(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function a(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function o(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function s(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function l(t,e,r,n,i,a){return"function"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}e.exports={ge:function(t,e,r,i,a){return l(t,e,r,i,a,n)},gt:function(t,e,r,n,a){return l(t,e,r,n,a,i)},lt:function(t,e,r,n,i){return l(t,e,r,n,i,a)},le:function(t,e,r,n,i){return l(t,e,r,n,i,o)},eq:function(t,e,r,n,i){return l(t,e,r,n,i,s)}}},{}],32:[function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],33:[function(t,e,r){!function(e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof e?e.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:t("buffer").Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=l(t,e,n)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[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],h=[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];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&l,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?u[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,p=0|o[1],d=8191&p,m=p>>>13,g=0|o[2],v=8191&g,y=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],T=8191&w,k=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,P=0|o[7],I=8191&P,O=P>>>13,z=0|o[8],D=8191&z,R=z>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],U=8191&j,V=j>>>13,H=0|s[1],q=8191&H,G=H>>>13,Y=0|s[2],W=8191&Y,Z=Y>>>13,X=0|s[3],J=8191&X,K=X>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ft=8191&ut,ht=ut>>>13,pt=0|s[9],dt=8191&pt,mt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;c=((a=Math.imul(h,V))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(m,U)|0,a=Math.imul(m,V);var vt=(c+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(d,q)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(m,q)|0,a=a+Math.imul(m,G)|0;var yt=(c+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,W)|0))<<13)|0;c=((a=a+Math.imul(h,Z)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,q)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,q)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,Z)|0)+Math.imul(m,W)|0,a=a+Math.imul(m,Z)|0;var xt=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,J)|0))<<13)|0;c=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,q)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,Z)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,Z)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0;var bt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,q)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,Z)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,Z)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,q)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,Z)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,Z)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;c=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(I,U),i=(i=Math.imul(I,V))+Math.imul(O,U)|0,a=Math.imul(O,V),n=n+Math.imul(L,q)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(C,q)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(M,W)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,Z)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0;var Tt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ct)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(I,q)|0,i=(i=i+Math.imul(I,G)|0)+Math.imul(O,q)|0,a=a+Math.imul(O,G)|0,n=n+Math.imul(L,W)|0,i=(i=i+Math.imul(L,Z)|0)+Math.imul(C,W)|0,a=a+Math.imul(C,Z)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(D,q)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,q)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(I,W)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(O,W)|0,a=a+Math.imul(O,Z)|0,n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(m,ft)|0,a=a+Math.imul(m,ht)|0;var At=(c+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,mt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((a=a+Math.imul(h,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,G))+Math.imul(N,q)|0,a=Math.imul(N,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,Z)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,Z)|0,n=n+Math.imul(I,J)|0,i=(i=i+Math.imul(I,K)|0)+Math.imul(O,J)|0,a=a+Math.imul(O,K)|0,n=n+Math.imul(L,$)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(C,$)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var Mt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,mt)|0)+Math.imul(m,dt)|0))<<13)|0;c=((a=a+Math.imul(m,mt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,W),i=(i=Math.imul(B,Z))+Math.imul(N,W)|0,a=Math.imul(N,Z),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,tt)|0)+Math.imul(O,$)|0,a=a+Math.imul(O,tt)|0,n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,mt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((a=a+Math.imul(y,mt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,K))+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(I,rt)|0,i=(i=i+Math.imul(I,nt)|0)+Math.imul(O,rt)|0,a=a+Math.imul(O,nt)|0,n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(k,ft)|0,a=a+Math.imul(k,ht)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,mt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((a=a+Math.imul(_,mt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,$),i=(i=Math.imul(B,tt))+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(I,at)|0,i=(i=i+Math.imul(I,ot)|0)+Math.imul(O,at)|0,a=a+Math.imul(O,ot)|0,n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ct)|0)+Math.imul(C,lt)|0,a=a+Math.imul(C,ct)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Lt=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,mt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((a=a+Math.imul(k,mt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(I,lt)|0,i=(i=i+Math.imul(I,ct)|0)+Math.imul(O,lt)|0,a=a+Math.imul(O,ct)|0,n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(C,ft)|0,a=a+Math.imul(C,ht)|0;var Ct=(c+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,mt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((a=a+Math.imul(S,mt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(I,ft)|0,i=(i=i+Math.imul(I,ht)|0)+Math.imul(O,ft)|0,a=a+Math.imul(O,ht)|0;var Pt=(c+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,mt)|0)+Math.imul(C,dt)|0))<<13)|0;c=((a=a+Math.imul(C,mt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var It=(c+(n=n+Math.imul(I,dt)|0)|0)+((8191&(i=(i=i+Math.imul(I,mt)|0)+Math.imul(O,dt)|0))<<13)|0;c=((a=a+Math.imul(O,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(B,ft),i=(i=Math.imul(B,ht))+Math.imul(N,ft)|0,a=Math.imul(N,ht);var Ot=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,mt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((a=a+Math.imul(R,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863;var zt=(c+(n=Math.imul(B,dt))|0)+((8191&(i=(i=Math.imul(B,mt))+Math.imul(N,dt)|0))<<13)|0;return c=((a=Math.imul(N,mt))+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863,l[0]=gt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=Tt,l[8]=kt,l[9]=At,l[10]=Mt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=Pt,l[16]=It,l[17]=Ot,l[18]=zt,0!==c&&(l[19]=c,r.length++),r};function m(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):r<63?p(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):m(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,m=1;0==(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new T(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var v={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}y.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(x,y),x.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},x.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(v[t])return v[t];var e;if("k256"===t)e=new x;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return v[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var m=p,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,T),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(void 0===e||e,this)},{buffer:2}],34:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(u<=0)){var f,h=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,h,p))>0){if(1===u&&n)a.init(s),f=a.sweepComplete(u,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=l(e,u,d,m))>0&&(a.init(s+c),f=1===u?a.sweepBipartite(u,r,0,s,h,p,0,c,d,m):o(u,r,n,s,h,p,c,d,m),i.free(d),i.free(m))}i.free(h),i.free(p)}return f}}}function u(t,e){n.push([t,e])}function f(t){return n=[],c(t,t,u,!0),n}function h(t,e){return n=[],c(t,e,u,!1),n}},{"./lib/intersect":37,"./lib/sweep":41,"typedarray-pool":308}],36:[function(t,e,r){"use strict";function n(t){return t?function(t,e,r,n,i,a,o,s,l,c,u){return i-n>l-s?function(t,e,r,n,i,a,o,s,l,c,u){for(var f=2*t,h=n,p=f*n;hc-l?n?function(t,e,r,n,i,a,o,s,l,c,u){for(var f=2*t,h=n,p=f*n;h0;){var L=6*(S-=1),C=v[L],P=v[L+1],I=v[L+2],O=v[L+3],z=v[L+4],D=v[L+5],R=2*S,F=y[R],B=y[R+1],N=1&D,j=!!(16&D),U=u,V=w,H=k,q=A;if(N&&(U=k,V=A,H=u,q=w),!(2&D&&(I=p(t,C,P,I,U,V,B),P>=I)||4&D&&(P=d(t,C,P,I,U,V,F))>=I)){var G=I-P,Y=z-O;if(j){if(t*G*(G+Y)<1<<22){if(void 0!==(M=l.scanComplete(t,C,e,P,I,U,V,O,z,H,q)))return M;continue}}else{if(t*Math.min(G,Y)<128){if(void 0!==(M=o(t,C,e,N,P,I,U,V,O,z,H,q)))return M;continue}if(t*G*Y<1<<22){if(void 0!==(M=l.scanBipartite(t,C,e,N,P,I,U,V,O,z,H,q)))return M;continue}}var W=f(t,C,P,I,U,V,F,B);if(P=p0)&&!(p1>=hi)"),h=u("lo===p0"),p=u("lo>>1,f=2*t,h=u,p=o[f*u+e];for(;l=y?(h=v,p=y):g>=b?(h=m,p=g):(h=x,p=b):y>=b?(h=v,p=y):b>=g?(h=m,p=g):(h=x,p=b);for(var _=f*(c-1),w=f*h,T=0;Tr&&i[f+e]>c;--u,f-=o){for(var h=f,p=f+o,d=0;dh;++h,l+=s){if(i[l+f]===o)if(u===h)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"loh;++h,l+=s){if(i[l+f]p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"lo<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,c=l,u=r,f=t+e,h=r;n>h;++h,l+=s){if(i[l+f]<=o)if(u===h)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"hi<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,c=l,u=r,f=t+e,h=r;n>h;++h,l+=s){if(i[l+f]<=o)if(u===h)u+=1,c+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[c],i[c++]=d}var m=a[h];a[h]=a[u],a[u++]=m}}return u},"lop;++p,l+=s){var d=i[l+f],m=i[l+h];if(dg;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=a[p];a[p]=a[u],a[u++]=y}}return u},"lo<=p0&&p0<=hi":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,c=l,u=r,f=e,h=t+e,p=r;n>p;++p,l+=s){var d=i[l+f],m=i[l+h];if(d<=o&&o<=m)if(u===p)u+=1,c+=s;else{for(var g=0;s>g;++g){var v=i[l+g];i[l+g]=i[c],i[c++]=v}var y=a[p];a[p]=a[u],a[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,a,o,s){for(var l=2*t,c=l*r,u=c,f=r,h=e,p=t+e,d=r;n>d;++d,c+=l){var m=i[c+h],g=i[c+p];if(!(m>=o||s>=g))if(f===d)f+=1,u+=l;else{for(var v=0;l>v;++v){var y=i[c+v];i[c+v]=i[u],i[u++]=y}var x=a[d];a[d]=a[f],a[f++]=x}}return f}}},{}],40:[function(t,e,r){"use strict";e.exports=function(t,e){e<=128?n(0,e-1,t):function t(e,r,u){var f=(r-e+1)/6|0,h=e+f,p=r-f,d=e+r>>1,m=d-f,g=d+f,v=h,y=m,x=d,b=g,_=p,w=e+1,T=r-1,k=0;l(v,y,u)&&(k=v,v=y,y=k);l(b,_,u)&&(k=b,b=_,_=k);l(v,x,u)&&(k=v,v=x,x=k);l(y,x,u)&&(k=y,y=x,x=k);l(v,b,u)&&(k=v,v=b,b=k);l(x,b,u)&&(k=x,x=b,b=k);l(y,_,u)&&(k=y,y=_,_=k);l(y,x,u)&&(k=y,y=x,x=k);l(b,_,u)&&(k=b,b=_,_=k);for(var A=u[2*y],M=u[2*y+1],S=u[2*b],E=u[2*b+1],L=2*v,C=2*x,P=2*_,I=2*h,O=2*d,z=2*p,D=0;D<2;++D){var R=u[L+D],F=u[C+D],B=u[P+D];u[I+D]=R,u[O+D]=F,u[z+D]=B}a(m,e,u),a(g,r,u);for(var N=w;N<=T;++N)if(c(N,A,M,u))N!==w&&i(N,w,u),++w;else if(!c(N,S,E,u))for(;;){if(c(T,S,E,u)){c(T,A,M,u)?(o(N,w,T,u),++w,--T):(i(N,T,u),--T);break}if(--Tt;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function c(t,e,r,n){var i=n[t*=2];return i>>1;a(h,M);var S=0,E=0;for(w=0;w=1<<28)p(l,c,E--,L=L-(1<<28)|0);else if(L>=0)p(o,s,S--,L);else if(L<=-(1<<28)){L=-L-(1<<28)|0;for(var C=0;C>>1;a(h,E);var L=0,C=0,P=0;for(k=0;k>1==h[2*k+3]>>1&&(O=2,k+=1),I<0){for(var z=-(I>>1)-1,D=0;D>1)-1;0===O?p(o,s,L--,z):1===O?p(l,c,C--,z):2===O&&p(u,f,P--,z)}}},scanBipartite:function(t,e,r,n,i,l,c,u,f,m,g,v){var y=0,x=2*t,b=e,_=e+t,w=1,T=1;n?T=1<<28:w=1<<28;for(var k=i;k>>1;a(h,E);var L=0;for(k=0;k=1<<28?(P=!n,A-=1<<28):(P=!!n,A-=1),P)d(o,s,L++,A);else{var I=v[A],O=x*A,z=g[O+e+1],D=g[O+e+1+t];t:for(var R=0;R>>1;a(h,w);var T=0;for(y=0;y=1<<28)o[T++]=x-(1<<28);else{var A=p[x-=1],M=m*x,S=f[M+e+1],E=f[M+e+1+t];t:for(var L=0;L=0;--L)if(o[L]===x){for(O=L+1;O0;){for(var p=r.pop(),d=(s=r.pop(),u=-1,f=-1,l=o[s],1);d=0||(e.flip(s,p),i(t,e,r,u,s,f),i(t,e,r,s,f,u),i(t,e,r,f,p,u),i(t,e,r,p,u,f)))}}},{"binary-search-bounds":31,"robust-in-sphere":282}],44:[function(t,e,r){"use strict";var n,i=t("binary-search-bounds");function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d<3;++d){var m=h[3*p+d];m>=0&&0===c[m]&&(f[3*p+d]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i1&&i(r[h[p-2]],r[h[p-1]],a)>0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=f.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function u(t,e){var r;return(r=t.a[0]d[0]&&i.push(new o(d,p,2,l),new o(p,d,1,l))}i.sort(s);for(var m=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new a([m,1],[m,0],-1,[],[],[],[])],v=[],y=(l=0,i.length);l=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;ne[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],T=t[_];if((w[0]-T[0]||w[1]-T[1])<0){var k=b;b=_,_=k}x[0]=b;var A,M=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?e.push([M,E,A]):e.push([M,E]),M=E}i?e.push([M,_,A]):e.push([M,_])}return h}(t,e,h,g,r));return v(e,y,r),!!y||(h.length>0||g.length>0)}},{"./lib/rat-seg-intersect":51,"big-rat":18,"big-rat/cmp":16,"big-rat/to-float":30,"box-intersect":35,nextafter:260,"rat-vec":273,"robust-segment-intersect":287,"union-find":309}],51:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=u(a,f);if(0===o(h))return null;var p=s(t,r),d=u(f,p),m=i(d,h),g=c(a,m);return l(t,g)};var n=t("big-rat/mul"),i=t("big-rat/div"),a=t("big-rat/sub"),o=t("big-rat/sign"),s=t("rat-vec/sub"),l=t("rat-vec/add"),c=t("rat-vec/muls");function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{"big-rat/div":17,"big-rat/mul":27,"big-rat/sign":28,"big-rat/sub":29,"rat-vec/add":272,"rat-vec/muls":274,"rat-vec/sub":275}],52:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],53:[function(t,e,r){"use strict";var n=t("./colorScale"),i=t("lerp");function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}e.exports=function(t){var e,r,l,c,u,f,h,p,d,m;t||(t={});p=(t.nshades||72)-1,h=t.format||"hex",(f=t.colormap)||(f="jet");if("string"==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+" not a supported colorscale");u=n[f]}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);u=f.slice()}if(u.length>p+1)throw new Error(f+" map requires nshades to be at least size "+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map((function(t){return Math.round(t.index*p)})),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var g=u.map((function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=d[0]+(d[1]-d[0])*r),n})),v=[];for(m=0;m0||l(t,e,a)?-1:1:0===s?c>0||l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);return h>0?o>0&&n(t,e,a)>0?1:-1:h<0?o>0||n(t,e,a)>0?1:-1:n(t,e,a)>0||l(t,e,r)?1:-1};var n=t("robust-orientation"),i=t("signum"),a=t("two-sum"),o=t("robust-product"),s=t("robust-sum");function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},{"robust-orientation":284,"robust-product":285,"robust-sum":289,signum:55,"two-sum":307}],55:[function(t,e,r){"use strict";e.exports=function(t){return t<0?-1:t>0?1:0}},{}],56:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],p=t[3],d=e[0],m=e[1],g=e[2],v=e[3];return u+f+h+p-(d+m+g+v)||n(u,f,h,p)-n(d,m,g,v,d)||n(u+f,u+h,u+p,f+h,f+p,h+p)-n(d+m,d+g,d+v,m+g,m+v,g+v)||n(u+f+h,u+f+p,u+h+p,f+h+p)-n(d+m+g,d+m+v,d+g+v,m+g+v);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},{}],60:[function(t,e,r){"use strict";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=t("incremental-convex-hull"),i=t("affine-hull")},{"affine-hull":10,"incremental-convex-hull":233}],62:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;p>=0;--p)a[p]=c*t[p]+u*e[p]+f*r[p]+h*n[p];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],63:[function(t,e,r){"use strict";var n=t("incremental-convex-hull"),i=t("uniq");function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a=2)return!1;t[r]=n}return!0})):_.filter((function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0}));if(1&s)for(u=0;u<_.length;++u){h=(b=_[u])[0];b[0]=b[1],b[1]=h}return _}},{"incremental-convex-hull":233,uniq:310}],64:[function(t,e,r){(function(t){(function(){var r=!1;if("undefined"!=typeof Float64Array){var n=new Float64Array(1),i=new Uint32Array(n.buffer);if(n[0]=1,r=!0,1072693248===i[1]){e.exports=function(t){return n[0]=t,[i[0],i[1]]},e.exports.pack=function(t,e){return i[0]=t,i[1]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[0]},e.exports.hi=function(t){return n[0]=t,i[1]}}else if(1072693248===i[0]){e.exports=function(t){return n[0]=t,[i[1],i[0]]},e.exports.pack=function(t,e){return i[1]=t,i[0]=e,n[0]},e.exports.lo=function(t){return n[0]=t,i[1]},e.exports.hi=function(t){return n[0]=t,i[0]}}else r=!1}if(!r){var a=new t(8);e.exports=function(t){return a.writeDoubleLE(t,0,!0),[a.readUInt32LE(0,!0),a.readUInt32LE(4,!0)]},e.exports.pack=function(t,e){return a.writeUInt32LE(t,0,!0),a.writeUInt32LE(e,4,!0),a.readDoubleLE(0,!0)},e.exports.lo=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(0,!0)},e.exports.hi=function(t){return a.writeDoubleLE(t,0,!0),a.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:3}],65:[function(t,e,r){"use strict";e.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p=r-1)for(var u=s.length-1,f=(e[r-1],0);f=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--f)n.push(a(l[f-1],c[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=a(c[h-1],u[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,f=u>1e-6?1/u:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(a(l[h-1],c[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--f)n.push(a(l[f],c[f],n[o]+u*i[o])),i.push(0),o+=1}}},{"binary-search-bounds":31,"cubic-hermite":62}],69:[function(t,e,r){"use strict";e.exports=function(t){return new s(t||m,null)};function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}var l=s.prototype;function c(t,e){var r;if(e.left&&(r=c(t,e.left)))return r;return(r=t(e.key,e.value))||(e.right?c(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left)if(i=u(t,e,r,n.left))return i;if(i=r(n.key,n.value))return i}if(n.right)return u(t,e,r,n.right)}function f(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=f(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return f(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}Object.defineProperty(l,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(l,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(l,"length",{get:function(){return this.root?this.root._count:0}}),l.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],c=[];i;){var u=r(t,i.key);l.push(i),c.push(u),i=u<=0?i.left:i.right}l.push(new n(0,t,e,null,null,1));for(var f=l.length-2;f>=0;--f){i=l[f];c[f]<=0?l[f]=new n(i._color,i.key,i.value,l[f+1],i.right,i._count+1):l[f]=new n(i._color,i.key,i.value,i.left,l[f+1],i._count+1)}for(f=l.length-1;f>1;--f){var h=l[f-1];i=l[f];if(1===h._color||1===i._color)break;var p=l[f-2];if(p.left===h)if(h.left===i){if(!(d=p.right)||0!==d._color){if(p._color=0,p.left=h.right,h._color=1,h.right=p,l[f-2]=h,l[f-1]=i,o(p),o(h),f>=3)(m=l[f-3]).left===p?m.left=h:m.right=h;break}h._color=1,p.right=a(1,d),p._color=0,f-=1}else{if(!(d=p.right)||0!==d._color){if(h.right=i.left,p._color=0,p.left=i.right,i._color=1,i.left=h,i.right=p,l[f-2]=i,l[f-1]=h,o(p),o(h),o(i),f>=3)(m=l[f-3]).left===p?m.left=i:m.right=i;break}h._color=1,p.right=a(1,d),p._color=0,f-=1}else if(h.right===i){if(!(d=p.left)||0!==d._color){if(p._color=0,p.right=h.left,h._color=1,h.left=p,l[f-2]=h,l[f-1]=i,o(p),o(h),f>=3)(m=l[f-3]).right===p?m.right=h:m.left=h;break}h._color=1,p.left=a(1,d),p._color=0,f-=1}else{var d;if(!(d=p.left)||0!==d._color){var m;if(h.left=i.right,p._color=0,p.right=i.left,i._color=1,i.right=h,i.left=p,l[f-2]=i,l[f-1]=h,o(p),o(h),o(i),f>=3)(m=l[f-3]).right===p?m.right=i:m.left=i;break}h._color=1,p.left=a(1,d),p._color=0,f-=1}}return l[0]._color=1,new s(r,l[0])},l.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return c(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return f(e,r,this._compare,t,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(l,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),l.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},l.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},l.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},l.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},l.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},l.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},l.remove=function(t){var e=this.find(t);return e?e.remove():this},l.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var p=h.prototype;function d(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function m(t,e){return te?1:0}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 h(this.tree,this._stack.slice())},p.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var l=t.length-2;l>=0;--l){(r=t[l]).left===t[l+1]?e[l]=new n(r._color,r.key,r.value,e[l+1],r.right,r._count):e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count)}if((r=e[e.length-1]).left&&r.right){var c=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var u=e[c-1];e.push(new n(r._color,u.key,u.value,r.left,r.right,r._count)),e[c-1].key=r.key,e[c-1].value=r.value;for(l=e.length-2;l>=c;--l)r=e[l],e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count);e[c-1].left=e[c]}if(0===(r=e[e.length-1])._color){var f=e[e.length-2];f.left===r?f.left=null:f.right===r&&(f.right=null),e.pop();for(l=0;l=0;--l){if(e=t[l],0===l)return void(e._color=1);if((r=t[l-1]).left===e){if((n=r.right).right&&0===n.right._color){if(s=(n=r.right=i(n)).right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=1,r._color=1,s._color=1,o(r),o(n),l>1)(c=t[l-2]).left===r?c.left=n:c.right=n;return void(t[l-1]=n)}if(n.left&&0===n.left._color){if(s=(n=r.right=i(n)).left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=1,n._color=1,e._color=1,o(r),o(n),o(s),l>1)(c=t[l-2]).left===r?c.left=s:c.right=s;return void(t[l-1]=s)}if(1===n._color){if(0===r._color)return r._color=1,void(r.right=a(0,n));r.right=a(0,n);continue}n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=0,o(r),o(n),l>1&&((c=t[l-2]).left===r?c.left=n:c.right=n),t[l-1]=n,t[l]=r,l+11)(c=t[l-2]).right===r?c.right=n:c.left=n;return void(t[l-1]=n)}if(n.right&&0===n.right._color){if(s=(n=r.left=i(n)).right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=1,n._color=1,e._color=1,o(r),o(n),o(s),l>1)(c=t[l-2]).right===r?c.right=s:c.left=s;return void(t[l-1]=s)}if(1===n._color){if(0===r._color)return r._color=1,void(r.left=a(0,n));r.left=a(0,n);continue}var c;n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=0,o(r),o(n),l>1&&((c=t[l-2]).right===r?c.right=n:c.left=n),t[l-1]=n,t[l]=r,l+10)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 t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),p.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(p,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),p.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)(i=e[a]).left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},p.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(p,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],70:[function(t,e,r){"use strict";e.exports=function(t,e){var r=new u(t);return r.update(e),r};var n=t("./lib/text.js"),i=t("./lib/lines.js"),a=t("./lib/background.js"),o=t("./lib/cube.js"),s=t("./lib/ticks.js"),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function c(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=u.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),c=e.bind(this,!0,(function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),u=!1,f=!1;if("bounds"in t)for(var h=t.bounds,p=0;p<2;++p)for(var d=0;d<3;++d)h[p][d]!==this.bounds[p][d]&&(f=!0),this.bounds[p][d]=h[p][d];if("ticks"in t){r=t.ticks,u=!0,this.autoTicks=!1;for(p=0;p<3;++p)this.tickSpacing[p]=0}else a("tickSpacing")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(p=0;p<3;++p)r[p].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var m=l("labels");l("labelFont")&&(m=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor"),this._text?this._text&&(m||u)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h];function d(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,c=n[e],u=0;u<3;++u)if(e!==u){var f=a,h=s,p=o,d=l;c&1<0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var m=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||g;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=t._ortho||!1,u=o(r,n,i,a,s),f=u.cubeEdges,h=u.axis,b=n[12],_=n[13],w=n[14],T=n[15],k=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*T)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=f[A],this.lastCubeProps.axis[A]=h[A];var M=p;for(A=0;A<3;++A)d(p[A],A,this.bounds,f,h);e=this.gl;var S,E=m;for(A=0;A<3;++A)this.backgroundEnable[A]?E[A]=h[A]:E[A]=0;this._background.draw(r,n,i,a,E,this.backgroundColor),this._lines.bind(r,n,i,this);for(A=0;A<3;++A){var L=[0,0,0];h[A]>0?L[A]=a[1][A]:L[A]=a[0][A];for(var C=0;C<2;++C){var P=(A+1+C)%3,I=(A+1+(1^C))%3;this.gridEnable[P]&&this._lines.drawGrid(P,I,this.bounds,L,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(C=0;C<2;++C){P=(A+1+C)%3,I=(A+1+(1^C))%3;this.zeroEnable[I]&&Math.min(a[0][I],a[1][I])<=0&&Math.max(a[0][I],a[1][I])>=0&&this._lines.drawZero(P,I,this.bounds,L,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var O=c(v,M[A].primalMinor),z=c(y,M[A].mirrorMinor),D=this.lineTickLength;for(C=0;C<3;++C){var R=k/r[5*C];O[C]*=D[C]*R,z[C]*=D[C]*R}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,O,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);var F,B;function N(t){(B=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0||a>0&&l<0||a<0&&l>0||a<0&&l<0?N(n):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&N(i)}for(A=0;A<3;++A){var U=M[A].primalMinor,V=M[A].mirrorMinor,H=c(x,M[A].primalOffset);for(C=0;C<3;++C)this.lineTickEnable[A]&&(H[C]+=k*U[C]*Math.max(this.lineTickLength[C],0)/r[5*C]);var q=[0,0,0];if(q[A]=1,this.tickEnable[A]){-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,F=1,"auto"===(S=[this.tickAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]),B=[0,0,0],j(A,U,V);for(C=0;C<3;++C)H[C]+=k*U[C]*this.tickPad[C]/r[5*C];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],H,this.tickColor[A],q,B,S)}if(this.labelEnable[A]){F=0,B=[0,0,0],this.labels[A].length>4&&(N(A),F=1),"auto"===(S=[this.labelAlign[A],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]);for(C=0;C<3;++C)H[C]+=k*U[C]*this.labelPad[C]/r[5*C];H[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],H,this.labelColor[A],[0,0,0],B,S)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":71,"./lib/cube.js":72,"./lib/lines.js":73,"./lib/text.js":75,"./lib/ticks.js":76}],71:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d<=1;d+=2){f[c]=d;for(var m=-1;m<=1;m+=2)f[u]=m,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var g=c;c=u,u=g}var v=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,v,x,b)};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":74,"gl-buffer":78,"gl-vao":150}],72:[function(t,e,r){"use strict";e.exports=function(t,e,r,a,p){i(s,e,t),i(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=a[x][2];for(var b=0;b<2;++b){u[1]=a[b][1];for(var _=0;_<2;++_)u[0]=a[_][0],h(l[y],u,s),y+=1}}var w=-1;for(x=0;x<8;++x){for(var T=l[x][3],k=0;k<3;++k)c[x][k]=l[x][k]/T;p&&(c[x][2]*=-1),T<0&&(w<0||c[x][2]E&&(w|=1<E&&(w|=1<c[x][1])&&(R=x);var F=-1;for(x=0;x<3;++x){if((N=R^1<c[B][0]&&(B=N)}var j=m;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^B)]=R&B;var U=7^B;U===w||U===D?(U=7^F,j[n.log2(B^U)]=U&B):j[n.log2(F^U)]=U&F;var V=g,H=w;for(A=0;A<3;++A)V[A]=H&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);r.text=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);r.bg=function(t){return i(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":132,glslify:231}],75:[function(t,e,r){(function(r){(function(){"use strict";e.exports=function(t,e,r,a,s,l){var u=n(t),f=i(t,[{buffer:u,size:3}]),h=o(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,a,s,l),p};var n=t("gl-buffer"),i=t("gl-vao"),a=t("vectorize-text"),o=t("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,f=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var c=l[r];c||(c=l[r]={});var u=c[e];u||(u=c[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,h=u.positions,p=u.cells,d=0,m=p.length;d=0;--v){var y=h[g[v]];o.push(f*y[0],-f*y[1],t)}}for(var c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){f[d]=o.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),h[d]=(o.length/3|0)-f[d],c[d]=o.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),i){for(var f=""+c;f.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?f:f.subarray(0,t.length),e),n.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.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(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.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 i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],79:[function(t,e,r){"use strict";var n=t("gl-vec3");e.exports=function(t,e){var r=t.positions,i=t.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,f=1/0,h=-1/0,p=null,d=null,m=[],g=1/0,v=!1,y=0;yo&&(o=n.length(b)),y){var _=2*n.distance(p,x)/(n.length(d)+n.length(b));_?(g=Math.min(g,_),v=!1):v=!0}v||(p=x,d=b),m.push(b)}var w=[s,c,f],T=[l,u,h];e&&(e[0]=w,e[1]=T),0===o&&(o=1);var k=1/o;isFinite(g)||(g=1),a.vectorScale=g;var A=t.coneSize||.5;t.absoluteConeSize&&(A=t.absoluteConeSize*k),a.coneScale=A;y=0;for(var M=0;y=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(t){this.pickId=t},p.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=u({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],f=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],p=t.vertexIntensity,d=1/0,m=-1/0;if(p)if(t.vertexIntensityBounds)d=+t.vertexIntensityBounds[0],m=+t.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},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()},e.exports=function(t,e,r){var n=r.shaders;1===arguments.length&&(t=(e=t).gl);var s=d(t,n),l=m(t,n),u=o(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));u.generateMipmap(),u.minFilter=t.LINEAR_MIPMAP_LINEAR,u.magFilter=t.LINEAR;var f=i(t),p=i(t),g=i(t),v=i(t),y=i(t),x=a(t,[{buffer:f,type:t.FLOAT,size:4},{buffer:y,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:v,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),b=new h(t,u,s,l,f,p,y,g,v,x,r.traceType||"cone");return b.update(e),b}},{colormap:53,"gl-buffer":78,"gl-mat4/invert":98,"gl-mat4/multiply":100,"gl-shader":132,"gl-texture2d":146,"gl-vao":150,ndarray:259}],81:[function(t,e,r){var n=t("glslify"),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // 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).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // 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).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:231}],82:[function(t,e,r){e.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"}},{}],83:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":82}],84:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho||!1?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]*this.pixelRatio),r.capSize=this.capSize[f]*u,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=u[n],a=0;a0)(m=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,m[0],m[1],m[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,m),o+=2+f(i,m,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":85,"gl-buffer":78,"gl-vao":150}],85:[function(t,e,r){"use strict";var n=t("glslify"),i=t("gl-shader"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":132,glslify:231}],86:[function(t,e,r){"use strict";var n=t("gl-texture2d");e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;au||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var f=1;if("color"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(f>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(f>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+f+" draw buffers")}}var h=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&f>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");h=t.FLOAT}else n.preferFloat&&f>0&&p&&(h=t.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;"stencil"in n&&(g=!!n.stencil);return new d(t,e,r,h,f,m,g,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?d?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var m=i.attributes;return this.positionBuffer.bind(),m.position.pointer(),this.weightBuffer.bind(),m.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),m.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=o;var c,u,f,p,d=t.colorLevels||[0],m=t.colorValues||[0,0,0,1],g=d.length,v=this.bounds;l?(c=v[0]=r[0],u=v[1]=o[0],f=v[2]=r[r.length-1],p=v[3]=o[o.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,u=v[1]=o[0]+(o[1]-o[0])/2,f=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,p=v[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var y=1/(f-c),x=1/(p-u),b=e[0],_=e[1];this.shape=[b,_];var w=(l?(b-1)*(_-1):b*_)*(h.length>>>1);this.numVertices=w;for(var T=a.mallocUint8(4*w),k=a.mallocFloat32(2*w),A=a.mallocUint8(2*w),M=a.mallocUint32(w),S=0,E=l?b-1:b,L=l?_-1:_,C=0;C max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{"gl-shader":132,glslify:231}],91:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=f(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),u=c(new Array(1024),[256,1,4]),p=0;p<1024;++p)u.data[p]=255;var d=a(e,u);d.wrap=e.REPEAT;var m=new v(e,r,o,s,l,d);return m.update(t),m};var n=t("gl-buffer"),i=t("gl-vao"),a=t("gl-texture2d"),o=new Uint8Array(4),s=new Float32Array(o.buffer);var l=t("binary-search-bounds"),c=t("ndarray"),u=t("./lib/shaders"),f=u.createShader,h=u.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function m(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,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=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=v.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,clipBounds:m(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,pickId:this.pickId,clipBounds:m(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,u=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var p=t.color||t.colors||[0,0,0,1],m=t.lineWidth||1,g=!1;t:for(e=1;e0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,g=!0}continue t}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(p[0])?(v=p.length>e-1?p[e-1]:p.length>0?p[p.length-1]:[0,0,0,1],y=p.length>e?p[e]:p.length>0?p[p.length-1]:[0,0,0,1]):v=y=p,3===v.length&&(v=[v[0],v[1],v[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),x=Array.isArray(m)?m.length>e-1?m[e-1]:m.length>0?m[m.length-1]:[0,0,0,1]:m;var T=s;if(s+=d(b,_),g){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],T,x,v[0],v[1],v[2],v[3]);u+=2,g=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],T,x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],_[0],_[1],_[2],T,-x,v[0],v[1],v[2],v[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),a.push(s),o.push(h[h.length-1].slice()),this.bounds=f,this.vertexCount=u,this.points=o,this.arcLength=a,"dashes"in t){var k=t.dashes.slice();for(k.unshift(0),e=1;e1.0001)return null;v+=g[f]}if(Math.abs(v-1)>.001)return null;return[h,s(t,g),g]}},{barycentric:14,"polytope-closest-point/lib/closest_point_2d.js":270}],111:[function(t,e,r){var n=t("glslify"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:u,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},{glslify:231}],112:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),f=t("colormap"),h=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./lib/shaders"),m=t("./lib/closest-point"),g=d.meshShader,v=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,m,g,v,y,x,b,_,T,k,A,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=g,this.edgeUVs=v,this.edgeIds=m,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=T,this.pointSizes=k,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,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=w,this._view=w,this._projection=w,this._resolution=[1,1]}var k=T.prototype;function A(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,g.vertex,g.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}function S(t){var e=n(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}function E(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function L(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function C(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function P(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}k.isOpaque=function(){return!this.hasAlpha},k.isTransparent=function(){return this.hasAlpha},k.pickSlots=1,k.setPickBase=function(t){this.pickId=t},k.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},k.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},k.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;ai[k]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[t],r.uniforms.angle=v[t],a.drawArrays(a.TRIANGLES,i[k],i[A]-i[k]))),y[t]&&T&&(u[1^t]-=M*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,T)),u[1^t]=M*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=M*p*m[t+2],ki[k]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=g[t+2],r.uniforms.angle=v[t+2],a.drawArrays(a.TRIANGLES,i[k],i[A]-i[k]))),y[t+2]&&T&&(u[1^t]+=M*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,T))}),m.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),m.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],f=a[o],m=a[o+2]-f,g=i[o],v=i[o+2]-g;p[o]=2*l/u*m/v,h[o]=2*(s-c)/u*m/v}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),m.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e=0){var m=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(m,e[1],m,e[3],p[d],h[d]):o.drawLine(e[0],m,e[2],m,p[d],h[d])}}for(d=0;d=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,f*(Math.exp(o)-1))}}}),!0)},d.enableMouseListeners(),d};var n=t("right-now"),i=t("3d-view"),a=t("mouse-change"),o=t("mouse-wheel"),s=t("mouse-event-offset"),l=t("has-passive-events")},{"3d-view":7,"has-passive-events":232,"mouse-change":247,"mouse-event-offset":248,"mouse-wheel":250,"right-now":278}],120:[function(t,e,r){var n=t("glslify"),i=t("gl-shader"),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":132,glslify:231}],121:[function(t,e,r){"use strict";var n=t("./camera.js"),i=t("gl-axes3d"),a=t("gl-axes3d/properties"),o=t("gl-spikes3d"),s=t("gl-select-static"),l=t("gl-fbo"),c=t("a-big-triangle"),u=t("mouse-change"),f=t("gl-mat4/perspective"),h=t("gl-mat4/ortho"),p=t("./lib/shader"),d=t("is-mobile")({tablet:!0,featureDetect:!0});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 g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function v(t){return"boolean"!=typeof t||t}e.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;if(!e){if(e=document.createElement("canvas"),t.container)t.container.appendChild(e);else document.body.appendChild(e)}var r=t.gl;r||(t.glOptions&&(d=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d}));if(!r)throw new Error("webgl not supported");var y=t.bounds||[[-10,-10,-10],[10,10,10]],x=new m,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!d}),_=p(r),w=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,T={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:w},k=t.axes||{},A=i(r,k);A.enable=!k.disable;var M=t.spikes||{},S=o(r,M),E=[],L=[],C=[],P=[],I=!0,O=!0,z=new Array(16),D=new Array(16),R={view:null,projection:z,model:D,_ortho:!1},F=(O=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),B=t.cameraObject||n(e,T),N={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:x,camera:B,axes:A,axesPixels:null,spikes:S,bounds:y,objects:E,shape:F,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,O=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},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)}},j=[r.drawingBufferWidth/N.pixelRatio|0,r.drawingBufferHeight/N.pixelRatio|0];function U(){if(!N._stopped&&N.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*N.pixelRatio),a=0|Math.ceil(n*N.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",I=!0}}}N.autoResize&&U();function V(){for(var t=E.length,e=P.length,n=0;n0&&0===C[e-1];)C.pop(),P.pop().dispose()}function H(){if(N.contextLost)return!0;r.isContextLost()&&(N.contextLost=!0,N.mouseListener.enabled=!1,N.selection.object=null,N.oncontextloss&&N.oncontextloss())}window.addEventListener("resize",U),N.update=function(t){N._stopped||(t=t||{},I=!0,O=!0)},N.add=function(t){N._stopped||(t.axes=A,E.push(t),L.push(-1),I=!0,O=!0,V())},N.remove=function(t){if(!N._stopped){var e=E.indexOf(t);e<0||(E.splice(e,1),L.pop(),I=!0,O=!0,V())}},N.dispose=function(){if(!N._stopped&&(N._stopped=!0,window.removeEventListener("resize",U),e.removeEventListener("webglcontextlost",H),N.mouseListener.enabled=!1,!N.contextLost)){A.dispose(),S.dispose();for(var t=0;tx.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:231}],123:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("typedarray-pool"),o=t("./lib/shader");function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),f=new s(t,a,l,c,u);return f.update(e),t.addObject(f),f};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":122,"gl-buffer":78,"gl-shader":132,"typedarray-pool":308}],124:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],p=r[0],d=r[1],m=r[2],g=r[3];(a=c*p+u*d+f*m+h*g)<0&&(a=-a,p=-p,d=-d,m=-m,g=-g);1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*f+l*m,t[3]=s*h+l*g,t}},{}],125:[function(t,e,r){"use strict";e.exports=function(t){return t||0===t?t.toString():""}},{}],126:[function(t,e,r){"use strict";var n=t("vectorize-text");e.exports=function(t,e,r){var a=i[e];a||(a=i[e]={});if(t in a)return a[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,c,u=n(t,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return v(t,f)},r.createOrtho=function(t){return v(t,h)},r.createProject=function(t){return v(t,p)},r.createPickPerspective=function(t){return v(t,d)},r.createPickOrtho=function(t){return v(t,m)},r.createPickProject=function(t){return v(t,g)}},{"gl-shader":132,glslify:231}],128:[function(t,e,r){"use strict";var n=t("is-string-blank"),i=t("gl-buffer"),a=t("gl-vao"),o=t("typedarray-pool"),s=t("gl-mat4/multiply"),l=t("./lib/shaders"),c=t("./lib/glyphs"),u=t("./lib/get-simple-string"),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function m(t){return!0===t||t>1?1:t}function g(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),f=i(e),h=i(e),p=i(e),d=i(e),m=a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),v=new g(e,r,n,o,f,h,p,d,m,s,c,u);return v.update(t),v};var v=g.prototype;v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],T=f.slice(),k=[0,0,0],A=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function L(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,c=r.model||f,u=r.view||f,h=r.projection||f,d=e.axesBounds,m=function(t){for(var e=A,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=u,l.projection=h,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=m,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(a[g]){l.scale=e.projectScale[g],l.opacity=e.projectOpacity[g];for(var v=T,L=0;L<16;++L)v[L]=0;for(L=0;L<4;++L)v[5*L]=1;v[5*g]=0,i[g]<0?v[12+g]=d[0][g]:v[12+g]=d[1][g],s(v,c,v),l.model=v;var C=(g+1)%3,P=(g+2)%3,I=M(x),O=M(b);I[C]=1,O[P]=1;var z=p(0,0,0,S(_,I)),D=p(0,0,0,S(w,O));if(Math.abs(z[1])>Math.abs(D[1])){var R=z;z=D,D=R,R=I,I=O,O=R;var F=C;C=P,P=F}z[0]<0&&(I[C]=-1),D[1]>0&&(O[P]=-1);var B=0,N=0;for(L=0;L<4;++L)B+=Math.pow(c[4*C+L],2),N+=Math.pow(c[4*P+L],2);I[C]/=Math.sqrt(B),O[P]/=Math.sqrt(N),l.axes[0]=I,l.axes[1]=O,l.fragClipBounds[0]=E(k,m[0],g,-1e8),l.fragClipBounds[1]=E(k,m[1],g,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var C=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function P(t,e,r,n,i,a,o){var s=r.gl;if((a===r.projectHasAlpha||o)&&L(e,r,n,i),a===r.hasAlpha||o){t.bind();var l=t.uniforms;l.model=n.model||f,l.view=n.view||f,l.projection=n.projection||f,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=C,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=i,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*i),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function I(t,e,r,i){var a;a=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=m(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=m(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=t.position,l=t.font||"normal",c=t.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else{i=[],a=[];for(n=0;n0){var O=0,z=x,D=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),B=Array.isArray(v)&&Array.isArray(v[0]);t:for(n=0;n<_;++n){y+=1;for(w=s[n],T=0;T<3;++T){if(isNaN(w[T])||!isFinite(w[T]))continue t;f[T]=Math.max(f[T],w[T]),u[T]=Math.min(u[T],w[T])}k=(N=I(h,n,l,this.pixelRatio)).mesh,A=N.lines,M=N.bounds;var N,j=N.visible;if(j)if(Array.isArray(p)){if(3===(U=F?n0?1-M[0][0]:Y<0?1+M[1][0]:1,W*=W>0?1-M[0][1]:W<0?1+M[1][1]:1],X=k.cells||[],J=k.positions||[];for(T=0;T0){var v=r*u;o.drawBox(f-v,h-v,p+v,h+v,a),o.drawBox(f-v,d-v,p+v,d+v,a),o.drawBox(f-v,h-v,f+v,d+v,a),o.drawBox(p-v,h-v,p+v,d+v,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":129,"gl-buffer":78,"gl-shader":132}],131:[function(t,e,r){"use strict";e.exports=function(t,e){var r=e[0],a=e[1],o=n(t,r,a,{}),s=i.mallocUint8(r*a*4);return new l(t,o,s)};var n=t("gl-fbo"),i=t("typedarray-pool"),a=t("ndarray"),o=t("bit-twiddle").nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;ar)for(t=r;te)for(t=e;t=0){for(var T=0|w.type.charAt(w.type.length-1),k=new Array(T),A=0;A=0;)M+=1;_[y]=M}var S=new Array(r.length);function E(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t=0){if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+f+": "+h);s(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+f+": "+h);var d;if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+f+": "+h);l(t,e,p,i,d,a,f)}}}return a};var n=t("./GLError");function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(t,e,r,n){var i=this._gl,a=this._locations[this._index];i.vertexAttribPointer(a,this._dimension,t||i.FLOAT,!!e,r||0,n||0),i.enableVertexAttribArray(a)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var o=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,a){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,a):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,a,s,l){var c=o[a],u=new i(t,e,r,n,a,c);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),c(t,n[r],e),e},get:function(){return u},enumerable:!0})}function l(t,e,r,n,i,a,o){for(var l=new Array(i),c=new Array(i),u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+v);t["uniformMatrix"+g+"fv"](s[u],!1,f);break}throw new i("","Unknown uniform data type for "+name+": "+v)}if((g=v.charCodeAt(v.length-1)-48)<2||g>4)throw new i("","Invalid data type");switch(v.charAt(0)){case"b":case"i":t["uniform"+g+"iv"](s[u],f);break;case"v":t["uniform"+g+"fv"](s[u],f);break;default:throw new i("","Unrecognized data type for vector "+name+": "+v)}}}}}}function c(t,e,n){if("object"==typeof n){var c=u(n);Object.defineProperty(t,e,{get:a(c),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(f=n,function(t,e,r){return t.getUniform(e.program,r[f])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type);var f}function u(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // 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).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:231}],143:[function(t,e,r){"use strict";var n=t("gl-vec3"),i=t("gl-vec4"),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(t,e,r,a){for(var o=0,s=0;s0)for(T=0;T<8;T++){var k=(T+1)%8;c.push(h[T],p[T],p[k],p[k],h[k],h[T]),f.push(y,v,v,v,y,y),d.push(m,g,g,g,m,m);var A=c.length;u.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var M=h;h=p,p=M;var S=y;y=v,v=S;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:f,vertexIntensity:d}}(t,r,a,o)})),f=[],h=[],p=[],d=[];for(s=0;se)return r-1}return r},l=function(t,e,r){return tr?r:t},c=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;nf-1||y>h-1||x>p-1)return n.create();var b,_,w,T,k,A,M=a[0][d],S=a[0][v],E=a[1][m],L=a[1][y],C=a[2][g],P=(o-M)/(S-M),I=(c-E)/(L-E),O=(u-C)/(a[2][x]-C);switch(isFinite(P)||(P=.5),isFinite(I)||(I=.5),isFinite(O)||(O=.5),r.reversedX&&(d=f-1-d,v=f-1-v),r.reversedY&&(m=h-1-m,y=h-1-y),r.reversedZ&&(g=p-1-g,x=p-1-x),r.filled){case 5:k=g,A=x,w=m*p,T=y*p,b=d*p*h,_=v*p*h;break;case 4:k=g,A=x,b=d*p,_=v*p,w=m*p*f,T=y*p*f;break;case 3:w=m,T=y,k=g*h,A=x*h,b=d*h*p,_=v*h*p;break;case 2:w=m,T=y,b=d*h,_=v*h,k=g*h*f,A=x*h*f;break;case 1:b=d,_=v,k=g*f,A=x*f,w=m*f*p,T=y*f*p;break;default:b=d,_=v,w=m*f,T=y*f,k=g*f*h,A=x*f*h}var z=i[b+w+k],D=i[b+w+A],R=i[b+T+k],F=i[b+T+A],B=i[_+w+k],N=i[_+w+A],j=i[_+T+k],U=i[_+T+A],V=n.create(),H=n.create(),q=n.create(),G=n.create();n.lerp(V,z,B,P),n.lerp(H,D,N,P),n.lerp(q,R,j,P),n.lerp(G,F,U,P);var Y=n.create(),W=n.create();n.lerp(Y,V,q,I),n.lerp(W,H,G,I);var Z=n.create();return n.lerp(Z,Y,W,O),Z}(e,t,p)},m=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=d(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,i,0]);var o=d(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,0,i]);var s=d(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},g=[],v=e[0][0],y=e[0][1],x=e[0][2],b=e[1][0],_=e[1][1],w=e[1][2],T=function(t){var e=t[0],r=t[1],n=t[2];return!(eb||r_||nw)},k=10*n.distance(e[0],e[1])/i,A=k*k,M=1,S=0,E=r.length;E>1&&(M=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=t.length,l=0;lS&&(S=F),D.push(F),g.push({points:P,velocities:I,divergences:D});for(var B=0;B<100*i&&P.lengthA&&n.scale(N,N,k/Math.sqrt(j)),n.add(N,N,C),O=d(N),n.squaredDistance(z,N)-A>-1e-4*A){P.push(N),z=N,I.push(O);R=m(N,O),F=n.length(R);isFinite(F)&&F>S&&(S=F),D.push(F)}C=N}}var U=o(g,t.colormap,S,M);return f?U.tubeScale=f:(0===S&&(S=1),U.tubeScale=.5*u*M/S),U};var u=t("./lib/shaders"),f=t("gl-cone3d").createMesh;e.exports.createTubeMesh=function(t,e){return f(t,e,{shaders:u,traceType:"streamtube"})}},{"./lib/shaders":142,"gl-cone3d":79,"gl-vec3":169,"gl-vec4":205}],144:[function(t,e,r){var n=t("gl-shader"),i=t("glslify"),a=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(t){var e=n(t,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":132,glslify:231}],145:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:40,offset:0},{buffer:c,size:3,stride:40,offset:16},{buffer:c,size:3,stride:40,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),m=o(e,1,256,e.RGBA,e.UNSIGNED_BYTE);m.minFilter=e.LINEAR,m.magFilter=e.LINEAR;var g=new M(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,f,h,p,d,[0,0,0]),v={levels:[[],[],[]]};for(var w in t)v[w]=t[w];return v.colormap=v.colormap||"jet",g.update(v),g};var n=t("bit-twiddle"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("typedarray-pool"),l=t("colormap"),c=t("ndarray-ops"),u=t("ndarray-pack"),f=t("ndarray"),h=t("surface-nets"),p=t("gl-mat4/multiply"),d=t("gl-mat4/invert"),m=t("binary-search-bounds"),g=t("ndarray-gradient"),v=t("./lib/shaders"),y=v.createShader,x=v.createContourShader,b=v.createPickShader,_=v.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[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 A(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=k[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();function M(t,e,r,n,i,a,o,l,c,u,h,p,d,m,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new A([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=m,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=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.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 S=M.prototype;S.genColormap=function(t,e){var r=!1,n=u([l({colormap:t,nshades:256,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},S.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},S.isOpaque=function(){return!this.isTransparent()},S.pickSlots=1,S.setPickBase=function(t){this.pickId=t};var E=[0,0,0],L={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function C(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||E,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=L.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var c=L.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return L.showSurface=o,L.showContour=s,L}var P={model:w,view:w,projection:w,inverseModel:w.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},I=w.slice(),O=[1,0,0,0,1,0,0,0,1];function z(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=P;n.model=t.model||w,n.view=t.view||w,n.projection=t.projection||w,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=O,n.vertexColor=this.vertexColor;var s=I;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=C(n,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(f.uniforms.permutation=k[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var f=u?a:1-a,h=0;h<2;++h)for(var p=i+u,d=s+h,g=f*(h?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(p,d)*g;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=m.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},S.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},S.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=R(t.contourWidth,Number)),"showContour"in t&&(this.showContour=R(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=R(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=R(t.contourProject,(function(t){return R(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=R(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=R(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(v=0;v<2;++v)if(c.shape[v]!==a[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(t.ticks){var u=t.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=u[o];if((Array.isArray(p)||p.length)&&(p=f(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var d=f(p.data,a);d.stride[o]=p.stride[0],d.stride[1^o]=0,this.padField(this._field[o],d)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var xt=0;xt<5;++xt)Q.pop();U-=1}continue t}Q.push(nt[0],nt[1],ot[0],ot[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[$]=et,this._contourCounts[$]=rt}var bt=s.mallocFloat(Q.length);for(o=0;oi||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function p(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var d=p.prototype;function m(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new p(t,o,e,r,n,i)}function y(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new p(t,o,r,n,i,a)}function x(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=m(o,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var u,h,d=0;if(2===o.length)d=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])d=t.ALPHA;else if(2===o[2])d=t.LUMINANCE_ALPHA;else if(3===o[2])d=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");d=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)u=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var y=[o[2],o[2]*o[0],1];h=a.malloc(v,r);var x=n(h,o,y,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):f(x,e),u=h.subarray(0,v)}var b=g(t);return t.texImage2D(t.TEXTURE_2D,0,d,o[0],o[1],0,d,c,u),l||a.free(h),new p(t,b,o[0],o[1],d,c)}Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),d.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},d.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=u(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,c,u){var h=u.dtype,p=u.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var d=0,g=0,v=m(p,u.stride.slice());"float32"===h?d=t.FLOAT:"float64"===h?(d=t.FLOAT,v=!1,h="float32"):"uint8"===h?d=t.UNSIGNED_BYTE:(d=t.UNSIGNED_BYTE,v=!1,h="uint8");if(2===p.length)g=t.LUMINANCE,p=[p[0],p[1],1],u=n(u.data,p,[u.stride[0],u.stride[1],1],u.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])g=t.ALPHA;else if(2===p[2])g=t.LUMINANCE_ALPHA;else if(3===p[2])g=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}p[2]}g!==t.LUMINANCE&&g!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(g=s);if(g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=u.size,x=c.indexOf(o)<0;x&&c.push(o);if(d===l&&v)0===u.offset&&u.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,u.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,u.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,u.data.subarray(u.offset,u.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,u.data.subarray(u.offset,u.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);d===t.FLOAT&&l===t.UNSIGNED_BYTE?f(_,u):i.assign(_,u),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:259,"ndarray-ops":254,"typedarray-pool":308}],147:[function(t,e,r){"use strict";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=t("./fromValues"),i=t("./normalize"),a=t("./dot")},{"./dot":162,"./fromValues":168,"./normalize":179}],153:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],154:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],155:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],156:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],157:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],158:[function(t,e,r){e.exports=t("./distance")},{"./distance":159}],159:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],160:[function(t,e,r){e.exports=t("./divide")},{"./divide":161}],161:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],162:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],163:[function(t,e,r){e.exports=1e-6},{}],164:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t("./epsilon")},{"./epsilon":163}],165:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],166:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],167:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],180:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],181:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],182:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],183:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],184:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],185:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],186:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],187:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],188:[function(t,e,r){e.exports=t("./squaredDistance")},{"./squaredDistance":190}],189:[function(t,e,r){e.exports=t("./squaredLength")},{"./squaredLength":191}],190:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],191:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],192:[function(t,e,r){e.exports=t("./subtract")},{"./subtract":193}],193:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],194:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],195:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],196:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t}},{}],197:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],198:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],199:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],200:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],201:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],202:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],203:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],204:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],205:[function(t,e,r){e.exports={create:t("./create"),clone:t("./clone"),fromValues:t("./fromValues"),copy:t("./copy"),set:t("./set"),add:t("./add"),subtract:t("./subtract"),multiply:t("./multiply"),divide:t("./divide"),min:t("./min"),max:t("./max"),scale:t("./scale"),scaleAndAdd:t("./scaleAndAdd"),distance:t("./distance"),squaredDistance:t("./squaredDistance"),length:t("./length"),squaredLength:t("./squaredLength"),negate:t("./negate"),inverse:t("./inverse"),normalize:t("./normalize"),dot:t("./dot"),lerp:t("./lerp"),random:t("./random"),transformMat4:t("./transformMat4"),transformQuat:t("./transformQuat")}},{"./add":197,"./clone":198,"./copy":199,"./create":200,"./distance":201,"./divide":202,"./dot":203,"./fromValues":204,"./inverse":206,"./length":207,"./lerp":208,"./max":209,"./min":210,"./multiply":211,"./negate":212,"./normalize":213,"./random":214,"./scale":215,"./scaleAndAdd":216,"./set":217,"./squaredDistance":218,"./squaredLength":219,"./subtract":220,"./transformMat4":221,"./transformQuat":222}],206:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],207:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],208:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],209:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],210:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],211:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],212:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],213:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],214:[function(t,e,r){var n=t("./normalize"),i=t("./scale");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{"./normalize":213,"./scale":215}],215:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],216:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],217:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],218:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],219:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],220:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],221:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],222:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t[3]=e[3],t}},{}],223:[function(t,e,r){var n=t("glsl-tokenizer"),i=t("atob-lite");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return A(r),v+=r.length,(p=p.slice(r.length)).length}}function I(){return/[^a-fA-F0-9]/.test(e)?(A(p.join("")),h=999,u):(p.push(e),r=e,u+1)}function O(){return"."===e||/[eE]/.test(e)?(p.push(e),h=5,r=e,u+1):"x"===e&&1===p.length&&"0"===p[0]?(h=11,p.push(e),r=e,u+1):/[^\d]/.test(e)?(A(p.join("")),h=999,u):(p.push(e),r=e,u+1)}function z(){return"f"===e&&(p.push(e),r=e,u+=1),/[eE]/.test(e)?(p.push(e),r=e,u+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(A(p.join("")),h=999,u):(p.push(e),r=e,u+1)}function D(){if(/[^\d\w_]/.test(e)){var t=p.join("");return h=k[t]?8:T[t]?7:6,A(p.join("")),h=999,u}return p.push(e),r=e,u+1}};var n=t("./lib/literals"),i=t("./lib/operators"),a=t("./lib/builtins"),o=t("./lib/literals-300es"),s=t("./lib/builtins-300es"),l=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":226,"./lib/builtins-300es":225,"./lib/literals":228,"./lib/literals-300es":227,"./lib/operators":229}],225:[function(t,e,r){var n=t("./builtins");n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),e.exports=n.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"])},{"./builtins":226}],226:[function(t,e,r){e.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"]},{}],227:[function(t,e,r){var n=t("./literals");e.exports=n.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"])},{"./literals":228}],228:[function(t,e,r){e.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"]},{}],229:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],230:[function(t,e,r){var n=t("./index");e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{"./index":224}],231:[function(t,e,r){e.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n0;)for(var s=(t=o.pop()).adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,f=0;f<=r;++f){var h=u[f];i[f]=h<0?e:a[h]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var f=c[u];if(!(f.lastVisited>=r)){var h=a[u];a[u]=t;var p=this.orient();if(a[u]=h,p<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length>0;){var p=(e=f.pop()).vertices,d=e.adjacent,m=p.indexOf(r);if(!(m<0))for(var g=0;g<=n;++g)if(g!==m){var v=d[g];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,v.boundary=!1,c.push(v),f.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=p.slice(),T=d.slice(),k=new a(w,T,!0);u.push(k);var A=_.indexOf(e);if(!(A<0)){_[A]=k,T[m]=v,w[g]=-1,T[g]=e,d[g]=k,k.flip();for(b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,L=0;L<=n;++L){var C=w[L];C<0||L===b||(S[E++]=C)}h.push(new o(S,k,b))}}}}}}h.sort(s);for(g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{"robust-orientation":284,"simplicial-complex":293}],234:[function(t,e,r){"use strict";var n=t("binary-search-bounds");function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new v(null);return new v(g(t))};var a=i.prototype;function o(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function c(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function u(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r>1],a=[],o=[],s=[];for(r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,d),i=n.ge(this.rightPoints,t,m);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},a.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?c(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?c(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,t,d);athis.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return f(this.rightPoints,t,e)}return h(this.leftPoints,e)},a.queryInterval=function(t,e,r){var n;if(tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return ethis.mid?f(this.rightPoints,t,r):h(this.leftPoints,r)};var y=v.prototype;y.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},y.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},y.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},y.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":31}],235:[function(t,e,r){"use strict";e.exports=function(t){for(var e=new Array(t),r=0;r - * @license MIT - */ -e.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],238:[function(t,e,r){"use strict";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var n=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function a(t){t||(t={});var e=t.ua;if(e||"undefined"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),"string"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf("Macintosh")&&-1!==e.indexOf("Safari")&&(r=!0),r}},{}],239:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},{}],240:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],241:[function(t,e,r){var n=t("./normalize"),i=t("gl-mat4/create"),a=t("gl-mat4/clone"),o=t("gl-mat4/determinant"),s=t("gl-mat4/invert"),l=t("gl-mat4/transpose"),c={length:t("gl-vec3/length"),normalize:t("gl-vec3/normalize"),dot:t("gl-vec3/dot"),cross:t("gl-vec3/cross")},u=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function m(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}e.exports=function(t,e,r,i,g,v){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),v||(v=[0,0,0,1]),!n(u,t))return!1;if(a(f,u),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)<1e-8))return!1;var y,x,b,_,w,T,k,A=u[3],M=u[7],S=u[11],E=u[12],L=u[13],C=u[14],P=u[15];if(0!==A||0!==M||0!==S){if(h[0]=A,h[1]=M,h[2]=S,h[3]=P,!s(f,f))return!1;l(f,f),y=g,b=f,_=(x=h)[0],w=x[1],T=x[2],k=x[3],y[0]=b[0]*_+b[4]*w+b[8]*T+b[12]*k,y[1]=b[1]*_+b[5]*w+b[9]*T+b[13]*k,y[2]=b[2]*_+b[6]*w+b[10]*T+b[14]*k,y[3]=b[3]*_+b[7]*w+b[11]*T+b[15]*k}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=E,e[1]=L,e[2]=C,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,u),r[0]=c.length(p[0]),c.normalize(p[0],p[0]),i[0]=c.dot(p[0],p[1]),m(p[1],p[1],p[0],1,-i[0]),r[1]=c.length(p[1]),c.normalize(p[1],p[1]),i[0]/=r[1],i[1]=c.dot(p[0],p[2]),m(p[2],p[2],p[0],1,-i[1]),i[2]=c.dot(p[1],p[2]),m(p[2],p[2],p[1],1,-i[2]),r[2]=c.length(p[2]),c.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],c.cross(d,p[1],p[2]),c.dot(p[0],d)<0)for(var I=0;I<3;I++)r[I]*=-1,p[I][0]*=-1,p[I][1]*=-1,p[I][2]*=-1;return v[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),v[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),v[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),v[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(v[0]=-v[0]),p[0][2]>p[2][0]&&(v[1]=-v[1]),p[1][0]>p[0][1]&&(v[2]=-v[2]),!0}},{"./normalize":242,"gl-mat4/clone":92,"gl-mat4/create":93,"gl-mat4/determinant":94,"gl-mat4/invert":98,"gl-mat4/transpose":109,"gl-vec3/cross":157,"gl-vec3/dot":162,"gl-vec3/length":172,"gl-vec3/normalize":179}],242:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],243:[function(t,e,r){var n=t("gl-vec3/lerp"),i=t("mat4-recompose"),a=t("mat4-decompose"),o=t("gl-mat4/determinant"),s=t("quat-slerp"),l=f(),c=f(),u=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!p)&&(n(u.translate,l.translate,c.translate,f),n(u.skew,l.skew,c.skew,f),n(u.scale,l.scale,c.scale,f),n(u.perspective,l.perspective,c.perspective,f),s(u.quaternion,l.quaternion,c.quaternion,f),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},{"gl-mat4/determinant":94,"gl-vec3/lerp":173,"mat4-decompose":241,"mat4-recompose":244,"quat-slerp":271}],244:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":93,"gl-mat4/fromRotationTranslation":96,"gl-mat4/identity":97,"gl-mat4/multiply":100,"gl-mat4/scale":107,"gl-mat4/translate":108}],245:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),i=t("mat4-interpolate"),a=t("gl-mat4/invert"),o=t("gl-mat4/rotateX"),s=t("gl-mat4/rotateY"),l=t("gl-mat4/rotateZ"),c=t("gl-mat4/lookAt"),u=t("gl-mat4/translate"),f=(t("gl-mat4/scale"),t("gl-vec3/normalize")),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.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]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)h[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&h[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=h[c];else i(o,h,d,(t-e[r])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],f(m,m);var g=this.computedInverse;a(g,o);var v=this.computedEye,y=g[15];v[0]=g[12]/y,v[1]=g[13]/y,v[2]=g[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=v[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,h=(i=0,o.length);i0;--p)r[f++]=s[p];return r};var n=t("robust-orientation")[3]},{"robust-orientation":284}],247:[function(t,e,r){"use strict";e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||c!==i||u!==a||l(s))&&(r=0|t,i=c||0,a=u||0,e&&e(r,i,a,o))}function u(t){c(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function m(t){c(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",m),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?g():function(){if(!s)return;s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",m),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h))}()},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var n=t("mouse-event")},{"mouse-event":249}],248:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},{}],249:[function(t,e,r){"use strict";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var s=t.getters||[],l=new Array(a),c=0;c=0?l[c]=!0:l[c]=!1;return function(t,e,r,a,o,s){var l=[s,o].join(",");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,l)};var i={"false,0,1":function(t,e,r,n,i){return function(a,o,s,l){var c,u=0|a.shape[0],f=0|a.shape[1],h=a.data,p=0|a.offset,d=0|a.stride[0],m=0|a.stride[1],g=p,v=0|-d,y=0,x=0|-m,b=0,_=-d-m|0,w=0,T=0|d,k=m-d*u|0,A=0,M=0,S=0,E=2*u|0,L=n(E),C=n(E),P=0,I=0,O=-1,z=-1,D=0,R=0|-u,F=0|u,B=0,N=-u-1|0,j=u-1|0,U=0,V=0,H=0;for(A=0;A0){if(M=1,L[P++]=r(h[g],o,s,l),g+=T,u>0)for(A=1,c=h[g],I=L[P]=r(c,o,s,l),D=L[P+O],B=L[P+R],U=L[P+N],I===D&&I===B&&I===U||(y=h[g+v],b=h[g+x],w=h[g+_],t(A,M,c,y,b,w,I,D,B,U,o,s,l),V=C[P]=S++),P+=1,g+=T,A=2;A0)for(A=1,c=h[g],I=L[P]=r(c,o,s,l),D=L[P+O],B=L[P+R],U=L[P+N],I===D&&I===B&&I===U||(y=h[g+v],b=h[g+x],w=h[g+_],t(A,M,c,y,b,w,I,D,B,U,o,s,l),V=C[P]=S++,U!==B&&e(C[P+R],V,b,w,B,U,o,s,l)),P+=1,g+=T,A=2;A0){if(A=1,L[P++]=r(h[g],o,s,l),g+=T,f>0)for(M=1,c=h[g],I=L[P]=r(c,o,s,l),B=L[P+R],D=L[P+O],U=L[P+N],I===B&&I===D&&I===U||(y=h[g+v],b=h[g+x],w=h[g+_],t(A,M,c,y,b,w,I,B,D,U,o,s,l),V=C[P]=S++),P+=1,g+=T,M=2;M0)for(M=1,c=h[g],I=L[P]=r(c,o,s,l),B=L[P+R],D=L[P+O],U=L[P+N],I===B&&I===D&&I===U||(y=h[g+v],b=h[g+x],w=h[g+_],t(A,M,c,y,b,w,I,B,D,U,o,s,l),V=C[P]=S++,U!==B&&e(C[P+R],V,w,y,U,B,o,s,l)),P+=1,g+=T,M=2;M2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),t.pick(0,-1,1).lo(1).hi(a[1]-2)),e(t.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),t.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),e(t.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),t.pick(-1,0,0).lo(1).hi(a[0]-2)),e(t.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),t.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),e(t.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(a[0]-1,0,0,0),t.set(a[0]-1,0,1,0),t.set(0,a[1]-1,0,0),t.set(0,a[1]-1,1,0),t.set(a[0]-1,a[1]-1,0,0),t.set(a[0]-1,a[1]-1,1,0),t}}e.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,"string"==typeof r?r:"clamp")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(a=u[e])return a;for(var r=t.length,n=[f,h],i=1;i<=r;++i)n.push(p(i));var a=d.apply(void 0,n);return u[e]=a,a}(r)(t,e)}},{dup:65}],253:[function(t,e,r){"use strict";function n(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|t[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),n=v+x*f+b*h,o=y+x*d+b*m;var _=0,w=0,T=0,k=p,A=f-u*p,M=h-l*f,S=g,E=d-u*g,L=m-l*d;for(T=0;T0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=p+m*u+g*c,o=d+m*h+g*f;var v=0,y=0,x=u,b=c-l*u,_=h,w=f-l*h;for(y=0;y0;){y<64?(c=y,y=0):(c=64,y-=64);for(var x=0|t[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|t[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=g+y*h+x*u+b*f,o=v+y*m+x*p+b*d;var _=0,w=0,T=0,k=h,A=u-c*h,M=f-s*u,S=m,E=p-c*m,L=d-s*p;for(T=0;Tr;){v=0,y=m-o;e:for(g=0;gb)break e;y+=f,v+=h}for(v=m,y=m-o,g=0;g>1,q=H-j,G=H+j,Y=U,W=q,Z=H,X=G,J=V,K=i+1,Q=a-1,$=!0,tt=0,et=0,rt=0,nt=f,it=e(nt),at=e(nt);A=l*Y,M=l*W,N=s;t:for(k=0;k0){g=Y,Y=W,W=g;break t}if(rt<0)break t;N+=p}A=l*X,M=l*J,N=s;t:for(k=0;k0){g=X,X=J,J=g;break t}if(rt<0)break t;N+=p}A=l*Y,M=l*Z,N=s;t:for(k=0;k0){g=Y,Y=Z,Z=g;break t}if(rt<0)break t;N+=p}A=l*W,M=l*Z,N=s;t:for(k=0;k0){g=W,W=Z,Z=g;break t}if(rt<0)break t;N+=p}A=l*Y,M=l*X,N=s;t:for(k=0;k0){g=Y,Y=X,X=g;break t}if(rt<0)break t;N+=p}A=l*Z,M=l*X,N=s;t:for(k=0;k0){g=Z,Z=X,X=g;break t}if(rt<0)break t;N+=p}A=l*W,M=l*J,N=s;t:for(k=0;k0){g=W,W=J,J=g;break t}if(rt<0)break t;N+=p}A=l*W,M=l*Z,N=s;t:for(k=0;k0){g=W,W=Z,Z=g;break t}if(rt<0)break t;N+=p}A=l*X,M=l*J,N=s;t:for(k=0;k0){g=X,X=J,J=g;break t}if(rt<0)break t;N+=p}for(A=l*Y,M=l*W,S=l*Z,E=l*X,L=l*J,C=l*U,P=l*H,I=l*V,B=0,N=s,k=0;k0)){if(rt<0){for(A=l*b,M=l*K,S=l*Q,N=s,k=0;k0)for(;;){_=s+Q*l,B=0;t:for(k=0;k0)){_=s+Q*l,B=0;t:for(k=0;kV){t:for(;;){for(_=s+K*l,B=0,N=s,k=0;k1&&n?s(r,n[0],n[1]):s(r)}(t,e,l);return n(l,c)}},{"typedarray-pool":308}],258:[function(t,e,r){"use strict";var n=t("./lib/compile_sort.js"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(":"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{"./lib/compile_sort.js":257}],259:[function(t,e,r){var n=t("is-buffer"),i="undefined"!=typeof Float64Array;function a(t,e){return t[0]-e[0]}function o(){var t,e=this.stride,r=new Array(e.length);for(t=0;t=0&&(e+=a*(r=0|t),i-=r),new n(this.data,i,a,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"==typeof t&&((a=0|t)<0?(i+=r*(e-1),e=o(-e/a)):e=o(e/a),r*=a),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,a){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),a-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=a*(r-1),r=c(-r/l)):r=c(r/l),a*=l),"number"==typeof e&&((l=0|e)<0?(s+=o*(i-1),i=c(-i/l)):i=c(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,a)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,a,o,s){this.data=t,this.shape=[e,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],f=this.stride[2];return"number"==typeof t&&t>=0&&(i+=c*(a=0|t),o-=a),"number"==typeof e&&e>=0&&(i+=u*(a=0|e),s-=a),"number"==typeof r&&r>=0&&(i+=f*(a=0|r),l-=a),new n(this.data,o,s,l,c,u,f,i)},i.step=function(t,e,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,f=0,h=Math.ceil;return"number"==typeof t&&((f=0|t)<0?(u+=s*(i-1),i=h(-i/f)):i=h(i/f),s*=f),"number"==typeof e&&((f=0|e)<0?(u+=l*(a-1),a=h(-a/f)):a=h(a/f),l*=f),"number"==typeof r&&((f=0|r)<0?(u+=c*(o-1),o=h(-o/f)):o=h(o/f),c*=f),new n(this.data,i,a,o,s,l,c,u)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[t],i[e],i[r],a[t],a[e],a[r],this.offset)},i.pick=function(t,r,n){var i=[],a=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,e[i.length+1])(this.data,i,a,o)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,c){this.data=t,this.shape=[e,r,n,i],this.stride=[a,o,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3];return"number"==typeof t&&t>=0&&(a+=f*(o=0|t),s-=o),"number"==typeof e&&e>=0&&(a+=h*(o=0|e),l-=o),"number"==typeof r&&r>=0&&(a+=p*(o=0|r),c-=o),"number"==typeof i&&i>=0&&(a+=d*(o=0|i),u-=o),new n(this.data,s,l,c,u,f,h,p,d,a)},i.step=function(t,e,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],f=this.stride[2],h=this.stride[3],p=this.offset,d=0,m=Math.ceil;return"number"==typeof t&&((d=0|t)<0?(p+=c*(a-1),a=m(-a/d)):a=m(a/d),c*=d),"number"==typeof e&&((d=0|e)<0?(p+=u*(o-1),o=m(-o/d)):o=m(o/d),u*=d),"number"==typeof r&&((d=0|r)<0?(p+=f*(s-1),s=m(-s/d)):s=m(s/d),f*=d),"number"==typeof i&&((d=0|i)<0?(p+=h*(l-1),l=m(-l/d)):l=m(l/d),h*=d),new n(this.data,a,o,s,l,c,u,f,h,p)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],o[t],o[e],o[r],o[i],this.offset)},i.pick=function(t,r,n,i){var a=[],o=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,e[a.length+1])(this.data,a,o,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,c,u,f){this.data=t,this.shape=[e,r,n,i,a],this.stride=[o,s,l,c,u],this.offset=0|f}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(e,r,n,i,a){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,a){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],f=this.shape[3],h=this.shape[4],p=this.stride[0],d=this.stride[1],m=this.stride[2],g=this.stride[3],v=this.stride[4];return"number"==typeof t&&t>=0&&(o+=p*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(o+=d*(s=0|e),c-=s),"number"==typeof r&&r>=0&&(o+=m*(s=0|r),u-=s),"number"==typeof i&&i>=0&&(o+=g*(s=0|i),f-=s),"number"==typeof a&&a>=0&&(o+=v*(s=0|a),h-=s),new n(this.data,l,c,u,f,h,p,d,m,g,v,o)},i.step=function(t,e,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3],m=this.stride[4],g=this.offset,v=0,y=Math.ceil;return"number"==typeof t&&((v=0|t)<0?(g+=f*(o-1),o=y(-o/v)):o=y(o/v),f*=v),"number"==typeof e&&((v=0|e)<0?(g+=h*(s-1),s=y(-s/v)):s=y(s/v),h*=v),"number"==typeof r&&((v=0|r)<0?(g+=p*(l-1),l=y(-l/v)):l=y(l/v),p*=v),"number"==typeof i&&((v=0|i)<0?(g+=d*(c-1),c=y(-c/v)):c=y(c/v),d*=v),"number"==typeof a&&((v=0|a)<0?(g+=m*(u-1),u=y(-u/v)):u=y(u/v),m*=v),new n(this.data,o,s,l,c,u,f,h,p,d,m,g)},i.transpose=function(t,e,r,i,a){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],o[a],s[t],s[e],s[r],s[i],s[a],this.offset)},i.pick=function(t,r,n,i,a){var o=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,e[o.length+1])(this.data,o,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?"T":String(e),n=s[r];return-1===e?n(t):0===e?n(t,c[t][0]):n(t,c[t],o)}var c={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(t,e,r,a){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===a){a=0;for(s=0;st==t>0?a===-1>>>0?(r+=1,a=0):a+=1:0===a?(a=-1>>>0,r-=1):a-=1;return n.pack(a,r)}},{"double-bits":64}],261:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa){var b=i[c],_=1/Math.sqrt(g*y);for(x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;b[x]+=_*(v[w]*m[T]-v[T]*m[w])}}}for(o=0;oa)for(_=1/Math.sqrt(k),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0;for(c=0;c<3;++c)h[c]*=p;i[o]=h}return i}},{}],262:[function(t,e,r){"use strict";e.exports=function(t,e,r,n,i,a,o,s,l,c){var u=e+a+c;if(f>0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c);f=Math.sqrt(2*h-u+1);e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],263:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up);return i};var n=t("filtered-vector"),i=t("gl-mat4/lookAt"),a=t("gl-mat4/fromQuat"),o=t("gl-mat4/invert"),s=t("./lib/quatFromFrame");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),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 h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,f=0;f<3;++f)c+=r[l+4*f]*i[f];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=l(u-=a*p,f-=o*p,h-=s*p);u/=d,f/=d,h/=d;var m=i[2],g=i[6],v=i[10],y=m*a+g*o+v*s,x=m*u+g*f+v*h,b=l(m-=y*a+x*u,g-=y*o+x*f,v-=y*s+x*h);m/=b,g/=b,v/=b;var _=u*e+a*r,w=f*e+o*r,T=h*e+s*r;this.center.move(t,_,w,T);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+n),this.radius.set(t,Math.log(k))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],f=i[5],h=i[9],p=i[2],d=i[6],m=i[10],g=e*a+r*u,v=e*o+r*f,y=e*s+r*h,x=-(d*y-m*v),b=-(m*g-p*y),_=-(p*v-d*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),T=c(x,b,_,w);T>1e-6?(x/=T,b/=T,_/=T,w/=T):(x=b=_=0,w=1);var k=this.computedRotation,A=k[0],M=k[1],S=k[2],E=k[3],L=A*w+E*x+M*_-S*b,C=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,I=E*w-A*x-M*b-S*_;if(n){x=p,b=d,_=m;var O=Math.sin(n)/l(x,b,_);x*=O,b*=O,_*=O,I=I*(w=Math.cos(e))-(L=L*w+I*x+C*_-P*b)*x-(C=C*w+I*b+P*x-L*_)*b-(P=P*w+I*_+L*b-C*x)*_}var z=c(L,C,P,I);z>1e-6?(L/=z,C/=z,P/=z,I/=z):(L=C=P=0,I=1),this.rotation.set(t,L,C,P,I)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,c-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.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]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":262,"filtered-vector":68,"gl-mat4/fromQuat":95,"gl-mat4/invert":98,"gl-mat4/lookAt":99}],264:[function(t,e,r){ -/*! - * pad-left - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - */ -"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},{"repeat-string":277}],265:[function(t,e,r){e.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},{}],266:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o0){o=a[u][r][0],l=u;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],p=0;p0&&(o=d,s=m,l=f)}return i||o&&c(o,l),s}function f(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=u(l,f,!0);if(n(e[l],e[f],e[h],e[p])<0)break;o.push(t),s=u(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(o=0;o0;){a[0][o].length;var m=f(o,p);h(0,m)?d.push.apply(d,m):(d.length>0&&l.push(d),d=m)}d.length>0&&l.push(d)}return l};var n=t("compare-angle")},{"compare-angle":54}],267:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var c=o.pop();i[c]=!1;var u=r[c];for(s=0;s0}))).length,g=new Array(m),v=new Array(m);for(p=0;p0;){var B=R.pop(),N=E[B];l(N,(function(t,e){return t-e}));var j,U=N.length,V=F[B];if(0===V){var H=d[B];j=[H]}for(p=0;p=0))if(F[q]=1^V,R.push(q),0===V)D(H=d[q])||(H.reverse(),j.push(H))}0===V&&r.push(j)}return r};var n=t("edges-to-adjacency-list"),i=t("planar-dual"),a=t("point-in-big-polygon"),o=t("two-product"),s=t("robust-sum"),l=t("uniq"),c=t("./lib/trim-leaves");function u(t,e){for(var r=new Array(t),n=0;n0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(v.slabs,v.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t("robust-orientation")[3],i=t("slab-decomposition"),a=t("interval-tree-1d"),o=t("binary-search-bounds");function s(){return!0}function l(t){for(var e={},r=0;r=c?(k=1,y=c+2*h+d):y=h*(k=-h/c)+d):(k=0,p>=0?(A=0,y=d):-p>=f?(A=1,y=f+2*p+d):y=p*(A=-p/f)+d);else if(A<0)A=0,h>=0?(k=0,y=d):-h>=c?(k=1,y=c+2*h+d):y=h*(k=-h/c)+d;else{var M=1/T;y=(k*=M)*(c*k+u*(A*=M)+2*h)+A*(u*k+f*A+2*p)+d}else k<0?(b=f+p)>(x=u+h)?(_=b-x)>=(w=c-2*u+f)?(k=1,A=0,y=c+2*h+d):y=(k=_/w)*(c*k+u*(A=1-k)+2*h)+A*(u*k+f*A+2*p)+d:(k=0,b<=0?(A=1,y=f+2*p+d):p>=0?(A=0,y=d):y=p*(A=-p/f)+d):A<0?(b=c+h)>(x=u+p)?(_=b-x)>=(w=c-2*u+f)?(A=1,k=0,y=f+2*p+d):y=(k=1-(A=_/w))*(c*k+u*A+2*h)+A*(u*k+f*A+2*p)+d:(A=0,b<=0?(k=1,y=c+2*h+d):h>=0?(k=0,y=d):y=h*(k=-h/c)+d):(_=f+p-u-h)<=0?(k=0,A=1,y=f+2*p+d):_>=(w=c-2*u+f)?(k=1,A=0,y=c+2*h+d):y=(k=_/w)*(c*k+u*(A=1-k)+2*h)+A*(u*k+f*A+2*p)+d;var S=1-k-A;for(l=0;l0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{"cell-orientation":47,"compare-cell":56,"compare-oriented-cell":57}],277:[function(t,e,r){ -/*! - * repeat-string - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ -"use strict";var n,i="";e.exports=function(t,e){if("string"!=typeof t)throw new TypeError("expected a string");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||void 0===n)n=t,i="";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i=(i+=t).substr(0,r)}},{}],278:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],279:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],p=r[2]-n[2],d=a*c,m=o*l,g=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-m)+f*(g-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(m))*Math.abs(u)+(Math.abs(g)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}function m(t,e,r,n,i,a,o){return function(e,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,c)}for(var u=new Array(arguments.length),f=0;f0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);if(s>0&&l>0||s<0&&l<0)return!1;if(0===a&&0===o&&0===s&&0===l)return function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,c=e[2*l+1];if(c===a)return l;a>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,o=r.length;i=t.length||0!==a(t[g],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return g(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((M+=1)-1))}function T(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],m(e)),A[r]>=0&&w(A[r],m(r))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=t("robust-orientation"),i=t("simplicial-complex")},{"robust-orientation":284,"simplicial-complex":295}],298:[function(t,e,r){"use strict";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),c=n(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var n=t("robust-orientation");function i(t,e){var r,i,a,o;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},{"./lib/order-segments":298,"binary-search-bounds":31,"functional-red-black-tree":69,"robust-orientation":284}],300:[function(t,e,r){"use strict";var n=t("robust-dot-product"),i=t("robust-sum");function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l0||i>0&&u<0){var f=o(s,u,l,i);r.push(f),n.push(f.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{"robust-dot-product":281,"robust-sum":289}],301:[function(t,e,r){!function(){"use strict";var t={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 e(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,m="";for(a=0;a=0),s.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,s.width?parseInt(s.width):0);break;case"e":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case"f":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case"g":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case"t":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(s.type)?m+=i:(!t.number.test(s.type)||f&&!s.sign?h="":(h=f?"+":"-",i=i.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):"",m+=s.align?h+i+l:"0"===c?h+l+i:l+h+i)}return m}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.push("%");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}void 0!==r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],302:[function(t,e,r){"use strict";e.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==p&&15!==p)switch(p){case 0:u.push([t-.5,e-.5]);break;case 1:u.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:u.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:u.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:u.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:u.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:u.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:u.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:u.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:u.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:u.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:u.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:u.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)]);break;case 15:u.push([t-.5,e-.5])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}};var o={}},{"ndarray-extract-contour":251,"zero-crossings":318}],303:[function(t,e,r){(function(r){(function(){"use strict";e.exports=function t(e,r,i){i=i||{};var o=a[e];o||(o=a[e]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o0&&(f+=.02);var p=new Float32Array(u),d=0,m=-.5*f;for(h=0;hMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),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 c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[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 e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),u=0;for(a=0;a<3;++a)r[a]-=e[a]*i/n,u+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(d),v=Math.sin(d),y=Math.cos(m),x=Math.sin(m),b=this.computedCenter,_=g*y,w=v*y,T=x,k=-g*x,A=-v*x,M=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],I=E[9],O=E[2],z=E[6],D=E[10],R=P*D-I*z,F=I*O-C*D,B=C*z-P*O,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];a(i,i,n,d);for(c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=c(u-=a*p,f-=o*p,h-=s*p),m=(u/=d)*e+a*r,g=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,m,g,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),m=Math.max(h,p,d);h===m?(s=s<0?-1:1,l=f=0):d===m?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var g=c(s,l,f);s/=g,l/=g,f/=g}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=c(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,I=E*k+L*A+C*M;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(I,P)}else{var O=e[2],z=e[6],D=e[10],R=O*s+z*l+D*f,F=O*x+z*b+D*_,B=O*k+z*A+D*M;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Y=V[14]/H,W=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*W,G-j*W,Y-U*W)},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,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=c(l,f,h);if(!(p<1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,m=d[0],g=d[1],v=d[2],y=i*m+a*g+o*v,x=c(m-=y*i,g-=y*a,v-=y*o);if(!(x<.01&&(x=c(m=a*h-o*f,g=o*l-i*h,v=i*f-a*l))<1e-6)){m/=x,g/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,m,g,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*g,_=o*m-i*v,w=i*g-a*m,T=c(b,_,w),k=i*l+a*f+o*h,A=m*l+g*f+v*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var I=Math.abs(C+2*Math.PI-E),O=Math.abs(C-E),z=Math.abs(C-2*Math.PI-E);I0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function m(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return d(t);case"uint16":return m(t);case"uint32":return g(t);case"int8":return v(t);case"int16":return y(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return k(t);case"biguint64":return T(t);case"buffer":return M(t);case"data":case"dataview":return A(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=m,r.mallocUint32=g,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=A,r.mallocBuffer=M,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,void 0!==n?n:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"bit-twiddle":32,buffer:3,dup:65}],309:[function(t,e,r){"use strict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",h(function(t,e,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),"?px "),g*=Math.pow(.75,l-s),n=n.replace("?px ",S())),m+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf("+"),u=r.indexOf("+"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),"?px "),g*=Math.pow(.75,h-f),n=n.replace("?px ",S())),m-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf("b|")>-1,d=r.indexOf("b|")>-1;!p&&d&&(n=v?n.replace("italic ","italic bold "):"bold "+n),p&&!d&&(n=n.replace("bold ",""))}if(!0===o.italics){var v=t.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!v&&y&&(n="italic "+n),v&&!y&&(n=n.replace("italic ",""))}e.font=n}for(h=0;h",a="",o=i.length,s=a.length,l="+"===e[0]||"-"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(t,n),a=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this}))},delete___:{value:y((function(n){var i,a,o=v(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0)&&(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,!0)}))}})};d.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof d||x();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==m)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=d)}function m(t){t.permitHostObjects___&&t.permitHostObjects___(m)}function g(t){return!("weakmap:"==t.substr(0,"weakmap:".length)&&"___"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||"undefined"==typeof console||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],314:[function(t,e,r){var n=t("./hidden-store.js");e.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},{"./hidden-store.js":315}],315:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],316:[function(t,e,r){var n=t("./create-store.js");e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},{"./create-store.js":314}],317:[function(t,e,r){"use strict";var n,i=function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],c=s;n|=0;var u=0,f=s;for(u=0;u=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}};e.exports=(n={funcName:{funcName:"zeroCrossings"}.funcName},function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(i.bind(void 0,n)))},{}],318:[function(t,e,r){"use strict";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t("./lib/zc-core")},{"./lib/zc-core":317}]},{},[6])(6)}))}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[27])(27)})); \ No newline at end of file +/*! For license information please see plotly.min.js.LICENSE.txt */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Plotly=e():t.Plotly=e()}(self,(function(){return function(){var t={98847:function(t,e,r){"use strict";var n=r(71828),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg":"overflow:hidden;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":'content:"";position:absolute;background:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;',"Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},98222:function(t,e,r){"use strict";t.exports=r(82887)},27206:function(t,e,r){"use strict";t.exports=r(60822)},59893:function(t,e,r){"use strict";t.exports=r(23381)},5224:function(t,e,r){"use strict";t.exports=r(83832)},59509:function(t,e,r){"use strict";t.exports=r(72201)},75557:function(t,e,r){"use strict";t.exports=r(91815)},40338:function(t,e,r){"use strict";t.exports=r(21462)},35080:function(t,e,r){"use strict";t.exports=r(51319)},61396:function(t,e,r){"use strict";t.exports=r(57516)},40549:function(t,e,r){"use strict";t.exports=r(98128)},49866:function(t,e,r){"use strict";t.exports=r(99442)},36089:function(t,e,r){"use strict";t.exports=r(93740)},19548:function(t,e,r){"use strict";t.exports=r(8729)},35831:function(t,e,r){"use strict";t.exports=r(93814)},61039:function(t,e,r){"use strict";t.exports=r(14382)},97040:function(t,e,r){"use strict";t.exports=r(51759)},77986:function(t,e,r){"use strict";t.exports=r(10421)},24296:function(t,e,r){"use strict";t.exports=r(43102)},58872:function(t,e,r){"use strict";t.exports=r(92165)},29626:function(t,e,r){"use strict";t.exports=r(3325)},65591:function(t,e,r){"use strict";t.exports=r(36071)},69738:function(t,e,r){"use strict";t.exports=r(43905)},92650:function(t,e,r){"use strict";t.exports=r(35902)},35630:function(t,e,r){"use strict";t.exports=r(69816)},73434:function(t,e,r){"use strict";t.exports=r(94507)},27909:function(t,e,r){"use strict";var n=r(19548);n.register([r(27206),r(5224),r(58872),r(65591),r(69738),r(92650),r(49866),r(25743),r(6197),r(97040),r(85461),r(73434),r(54201),r(81299),r(47645),r(35630),r(77986),r(83043),r(93005),r(96881),r(4534),r(50581),r(40549),r(77900),r(47582),r(35080),r(21641),r(17280),r(5861),r(29626),r(10021),r(65317),r(96268),r(61396),r(35831),r(16122),r(46163),r(40344),r(40338),r(48131),r(36089),r(55334),r(75557),r(19440),r(99488),r(59893),r(97393),r(98222),r(61039),r(24296),r(66398),r(59509)]),t.exports=n},46163:function(t,e,r){"use strict";t.exports=r(15154)},96881:function(t,e,r){"use strict";t.exports=r(64943)},50581:function(t,e,r){"use strict";t.exports=r(21164)},55334:function(t,e,r){"use strict";t.exports=r(54186)},65317:function(t,e,r){"use strict";t.exports=r(94873)},10021:function(t,e,r){"use strict";t.exports=r(67618)},54201:function(t,e,r){"use strict";t.exports=r(58810)},5861:function(t,e,r){"use strict";t.exports=r(20593)},16122:function(t,e,r){"use strict";t.exports=r(29396)},83043:function(t,e,r){"use strict";t.exports=r(13551)},48131:function(t,e,r){"use strict";t.exports=r(46858)},47582:function(t,e,r){"use strict";t.exports=r(17988)},21641:function(t,e,r){"use strict";t.exports=r(68868)},96268:function(t,e,r){"use strict";t.exports=r(20467)},19440:function(t,e,r){"use strict";t.exports=r(91271)},99488:function(t,e,r){"use strict";t.exports=r(21461)},97393:function(t,e,r){"use strict";t.exports=r(85956)},25743:function(t,e,r){"use strict";t.exports=r(52979)},66398:function(t,e,r){"use strict";t.exports=r(32275)},17280:function(t,e,r){"use strict";t.exports=r(6419)},77900:function(t,e,r){"use strict";t.exports=r(61510)},81299:function(t,e,r){"use strict";t.exports=r(87619)},93005:function(t,e,r){"use strict";t.exports=r(93601)},40344:function(t,e,r){"use strict";t.exports=r(96595)},47645:function(t,e,r){"use strict";t.exports=r(70954)},6197:function(t,e,r){"use strict";t.exports=r(47462)},4534:function(t,e,r){"use strict";t.exports=r(17659)},85461:function(t,e,r){"use strict";t.exports=r(19990)},82884:function(t){"use strict";t.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}]},50215:function(t,e,r){"use strict";var n=r(82884),i=r(41940),a=r(85555),o=r(44467).templatedArray;r(24695),t.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({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:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.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",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.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",a.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:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(92605).draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},"range"===a&&s(e,r),"range"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],u=t["a"+a+"ref"],c=t["_"+a+"padplus"],f=t["_"+a+"padminus"],h={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,v=p-h,g=3*t.startarrowsize*t.arrowwidth||0,y=g+h,m=g-h;if(u===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:v}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(c,y),ppadminus:Math.max(f,m)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else y=s?y+s:y,m=s?m-s:m,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(c,d,y),ppadminus:Math.max(f,v,m)});t._extremes[n]=r}t.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},44317:function(t,e,r){"use strict";var n=r(71828),i=r(73972),a=r(44467).arrayEditor;function o(t,e){var r,n,i,a,o,l,u,c=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),u=l.on,c=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(u.length||c.length){for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var Y=!1,W=["x","y"],X=0;X1)&&(nt===rt?((pt=it.r2fraction(e["a"+et]))<0||pt>1)&&(Y=!0):Y=!0),J=it._offset+it.r2p(e[et]),Q=.5}else{var dt="domain"===ht;"x"===et?($=e[et],J=dt?it._offset+it._length*$:J=T.l+T.w*$):($=1-e[et],J=dt?it._offset+it._length*$:J=T.t+T.h*$),Q=e.showarrow?.5:$}if(e.showarrow){ft.head=J;var vt=e["a"+et];if(tt=ot*q(.5,e.xanchor)-st*q(.5,e.yanchor),nt===rt){var gt=l.getRefType(nt);"domain"===gt?("y"===et&&(vt=1-vt),ft.tail=it._offset+it._length*vt):"paper"===gt?"y"===et?(vt=1-vt,ft.tail=T.t+T.h*vt):ft.tail=T.l+T.w*vt:ft.tail=it._offset+it.r2p(vt),K=tt}else ft.tail=J+vt,K=tt+vt;ft.text=ft.tail+tt;var yt=w["x"===et?"width":"height"];if("paper"===rt&&(ft.head=o.constrain(ft.head,1,yt-1)),"pixel"===nt){var mt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-yt;mt>0?(ft.tail+=mt,ft.text+=mt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ct,ft.head+=ct}else K=tt=lt*q(Q,ut),ft.text=J+tt;ft.text+=ct,tt+=ct,K+=ct,e["_"+et+"padplus"]=lt/2+K,e["_"+et+"padminus"]=lt/2-K,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(Y)R.remove();else{var bt=0,_t=0;if("left"!==e.align&&(bt=(A-b)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(z-_)*("middle"===e.valign?.5:1)),f)n.select("svg").attr({x:N+bt-1,y:N+_t}).call(c.setClipUrl,U?L:null,t);else{var wt=N+_t-v.top,Tt=N+bt-v.left;G.call(h.positionText,Tt,wt).call(c.setClipUrl,U?L:null,t)}V.select("rect").call(c.setRect,N,N,A,z),j.call(c.setRect,F/2,F/2,B-F,H-F),R.call(c.setTranslate,Math.round(C.x.text-B/2),Math.round(C.y.text-H/2)),I.attr({transform:"rotate("+P+","+C.x.text+","+C.y.text+")"});var kt,At=function(r,n){O.selectAll(".annotation-arrow-g").remove();var l=C.x.head,f=C.y.head,h=C.x.tail+r,p=C.y.tail+n,v=C.x.text+r,b=C.y.text+n,_=o.rotationXYMatrix(P,v,b),w=o.apply2DTransform(_),A=o.apply2DTransform2(_),L=+j.attr("width"),D=+j.attr("height"),z=v-.5*L,F=z+L,B=b-.5*D,N=B+D,U=[[z,B,z,N],[z,N,F,N],[F,N,F,B],[F,B,z,B]].map(A);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,H=e.arrowcolor,q=e.arrowside,G=O.append("g").style({opacity:u.opacity(H)}).classed("annotation-arrow-g",!0),Z=G.append("path").attr("d","M"+h+","+p+"L"+l+","+f).style("stroke-width",V+"px").call(u.stroke,u.rgb(H));if(g(Z,q,e),k.annotationPosition&&Z.node().parentNode&&!a){var Y=l,W=f;if(e.standoff){var X=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));Y+=e.standoff*(h-l)/X,W+=e.standoff*(p-f)/X}var J,K,$=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(p-W),transform:s(Y,W)}).style("stroke-width",V+6+"px").call(u.stroke,"rgba(0,0,0,0)").call(u.fill,"rgba(0,0,0,0)");d.init({element:$.node(),gd:t,prepFn:function(){var t=c.getTranslate(R);J=t.x,K=t.y,y&&y.autorange&&M(y._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(c.setTranslate,i,a),S("x",m(y,t,"x",T,e)),S("y",m(x,r,"y",T,e)),e.axref===e.xref&&S("ax",m(y,t,"ax",T,e)),e.ayref===e.yref&&S("ay",m(x,r,"ay",T,e)),G.attr("transform",s(t,r)),I.attr({transform:"rotate("+P+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};e.showarrow&&At(0,0),D&&d.init({element:R.node(),gd:t,prepFn:function(){kt=I.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",m(y,t,"ax",T,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",m(x,r,"ay",T.w,e)):S("ay",e.ay+r),At(t,r);else{if(a)return;var i,o;if(y)i=m(y,t,"x",T,e);else{var l=e._xsize/T.w,u=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(u+t/T.w,l,0,1,e.xanchor)}if(x)o=m(x,r,"y",T,e);else{var c=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-c/2;o=d.align(f-r/T.h,c,0,1,e.yanchor)}S("x",i),S("y",o),y&&x||(n=d.getCursor(y?.5:i,x?.5:o,e.xanchor,e.yanchor))}I.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",Z(n))},doneFn:function(){p(R),i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}t.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=e.indexOf("end")>=0,b=d.backoff*g+r.standoff,_=v.backoff*y+r.startstandoff;if("line"===p.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},c={x:+t.attr("x2"),y:+t.attr("y2")};var w=o.x-c.x,T=o.y-c.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void D();if(b){if(b*b>w*w+T*T)return void D();var k=b*Math.cos(f),A=b*Math.sin(f);c.x+=k,c.y+=A,t.attr({x2:c.x,y2:c.y})}if(_){if(_*_>w*w+T*T)return void D();var M=_*Math.cos(f),S=_*Math.sin(f);o.x-=M,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),L="";if(E1){u=!0;break}}u?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},2468:function(t,e,r){"use strict";var n=r(73972),i=r(71828);t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:r(26997)}}},layoutAttributes:r(26997),handleDefaults:r(20226),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(r)for(var a=r.attrRegex,o=Object.keys(t),s=0;s=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}o.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},o.rgb=function(t){return o.tinyRGB(n(t))},o.opacity=function(t){return t?n(t).getAlpha():0},o.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},o.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||u).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},o.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(o.combine(t,u))),(i.isDark()?e?i.lighten(e):u:r?i.darken(r):l).toString()},o.stroke=function(t,e){var r=n(e);t.style({stroke:o.tinyRGB(r),"stroke-opacity":r.getAlpha()})},o.fill=function(t,e){var r=n(e);t.style({fill:o.tinyRGB(r),"fill-opacity":r.getAlpha()})},o.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,s=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>c&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var ut=Math.pow(10,Math.floor(Math.log(lt)/Math.LN10));ot*=ut*u.roundUp(lt/ut,[2,5,10]),(Math.abs(q.start)/q.size+1e-6)%1<2e-6&&(it.tick0=0)}it.dtick=ot}it.domain=o?[rt+O/R.h,rt+K-O/R.h]:[rt+P/R.w,rt+K-P/R.w],it.setScale(),t.attr("transform",c(Math.round(R.l),Math.round(R.t)));var ct,ft=t.select("."+A.cbtitleunshift).attr("transform",c(-Math.round(R.l),-Math.round(R.t))),ht=it.ticklabelposition,pt=it.title.font.size,dt=t.select("."+A.cbaxis),vt=0,gt=0;function yt(n,i){var a={propContainer:it,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:z._dfltTitle.colorbar,containerGroup:t.select("."+A.cbtitle)},o="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+o+",."+o+"-math-group").remove(),v.draw(r,n,f(a,i||{}))}return u.syncOrAsync([a.previousPromises,function(){var t,e;(o&&at||!o&&!at)&&("top"===j&&(t=P+R.l+R.w*I,e=O+R.t+R.h*(1-rt-K)+3+.75*pt),"bottom"===j&&(t=P+R.l+R.w*I,e=O+R.t+R.h*(1-rt)-3-.25*pt),"right"===j&&(e=O+R.t+R.h*D+3+.75*pt,t=P+R.l+R.w*rt),yt(it._id+"title",{attributes:{x:t,y:e,"text-anchor":o?"start":"middle"}}))},function(){if(!o&&!at||o&&at){var a,l=t.select("."+A.cbtitle),f=l.select("text"),h=[-M/2,M/2],d=l.select(".h"+it._id+"title-math-group").node(),v=15.6;if(f.node()&&(v=parseInt(f.node().style.fontSize,10)*w),d?(a=p.bBox(d),gt=a.width,(vt=a.height)>v&&(h[1]-=(vt-v)/2)):f.node()&&!f.classed(A.jsPlaceholder)&&(a=p.bBox(f.node()),gt=a.width,vt=a.height),o){if(vt){if(vt+=5,"top"===j)it.domain[1]-=vt/R.h,h[1]*=-1;else{it.domain[0]+=vt/R.h;var y=g.lineCount(f);h[1]+=(1-y)*v}l.attr("transform",c(h[0],h[1])),it.setScale()}}else gt&&("right"===j&&(it.domain[0]+=(gt+pt/2)/R.w),l.attr("transform",c(h[0],h[1])),it.setScale())}t.selectAll("."+A.cbfills+",."+A.cblines).attr("transform",o?c(0,Math.round(R.h*(1-it.domain[1]))):c(Math.round(R.w*it.domain[0]),0)),dt.attr("transform",o?c(0,Math.round(-R.t)):c(Math.round(-R.l),0));var m=t.select("."+A.cbfills).selectAll("rect."+A.cbfill).attr("style","").data(Z);m.enter().append("rect").classed(A.cbfill,!0).style("stroke","none"),m.exit().remove();var x=U.map(it.c2p).map(Math.round).sort((function(t,e){return t-e}));m.each((function(t,a){var s=[0===a?U[0]:(Z[a]+Z[a-1])/2,a===Z.length-1?U[1]:(Z[a]+Z[a+1])/2].map(it.c2p).map(Math.round);o&&(s[1]=u.constrain(s[1]+(s[1]>s[0])?1:-1,x[0],x[1]));var l=n.select(this).attr(o?"x":"y",$).attr(o?"y":"x",n.min(s)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(n.max(s)-n.min(s),2));if(e._fillgradient)p.gradient(l,r,e._id,o?"vertical":"horizontalreversed",e._fillgradient,"fill");else{var c=H(t).replace("e-","");l.attr("fill",i(c).toHexString())}}));var b=t.select("."+A.cblines).selectAll("path."+A.cbline).data(B.color&&B.width?Y:[]);b.enter().append("path").classed(A.cbline,!0),b.exit().remove(),b.each((function(t){var e=$,r=Math.round(it.c2p(t))+B.width/2%1;n.select(this).attr("d","M"+(o?e+","+r:r+","+e)+(o?"h":"v")+W).call(p.lineGroupStyle,B.width,V(t),B.dash)})),dt.selectAll("g."+it._id+"tick,path").remove();var _=$+W+(M||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(it),k=s.getTickSigns(it)[2];return s.drawTicks(r,it,{vals:"inside"===it.ticks?s.clipEnds(it,T):T,layer:dt,path:s.makeTickPath(it,_,k),transFn:s.makeTransTickFn(it)}),s.drawLabels(r,it,{vals:T,layer:dt,transFn:s.makeTransTickLabelFn(it),labelFns:s.makeLabelFns(it,_)})},function(){if(o&&!at||!o&&at){var t,i,a=it.position||0,s=it._offset+it._length/2;if("right"===j)i=s,t=R.l+R.w*a+10+pt*(it.showticklabels?1:.5);else if(t=s,"bottom"===j&&(i=R.t+R.h*a+10+(-1===ht.indexOf("inside")?it.tickfont.size:0)+("intside"!==it.ticks&&e.ticklen||0)),"top"===j){var l=N.text.split("
").length;i=R.t+R.h*a+10-W-w*pt*l}yt((o?"h":"v")+it._id+"title",{avoid:{selection:n.select(r).selectAll("g."+it._id+"tick"),side:j,offsetTop:o?0:R.t,offsetLeft:o?R.l:0,maxShift:o?z.width:z.height},attributes:{x:t,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},a.previousPromises,function(){var n,s=W+M/2;-1===ht.indexOf("inside")&&(n=p.bBox(dt.node()),s+=o?n.width:n.height),ct=ft.select("text");var u=0,f=o&&"top"===j,v=!o&&"right"===j,g=0;if(ct.node()&&!ct.classed(A.jsPlaceholder)){var m,x=ft.select(".h"+it._id+"title-math-group").node();x&&(o&&at||!o&&!at)?(u=(n=p.bBox(x)).width,m=n.height):(u=(n=p.bBox(ft.node())).right-R.l-(o?$:nt),m=n.bottom-R.t-(o?nt:$),o||"top"!==j||(s+=n.height,g=n.height)),v&&(ct.attr("transform",c(u/2+pt/2,0)),u*=2),s=Math.max(s,o?u:m)}var b=2*(o?P:O)+s+S+M/2,w=0;!o&&N.text&&"bottom"===C&&D<=0&&(b+=w=b/2,g+=w),z._hColorbarMoveTitle=w,z._hColorbarMoveCBTitle=g;var F=S+M;t.select("."+A.cbbg).attr("x",(o?$:nt)-F/2-(o?P:0)).attr("y",(o?nt:$)-(o?J:O+g-w)).attr(o?"width":"height",Math.max(b-w,2)).attr(o?"height":"width",Math.max(J+F,2)).call(d.fill,E).call(d.stroke,e.bordercolor).style("stroke-width",S);var B=v?Math.max(u-10,0):0;if(t.selectAll("."+A.cboutline).attr("x",(o?$:nt+P)+B).attr("y",(o?nt+O-J:$)+(f?vt:0)).attr(o?"width":"height",Math.max(W,2)).attr(o?"height":"width",Math.max(J-(o?2*O+vt:2*P+B),2)).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":M}),t.attr("transform",c(R.l-(o?Q*b:0),R.t-(o?0:(1-tt)*b-g))),!o&&(S||i(E).getAlpha()&&!i.equals(z.paper_bgcolor,E))){var U=dt.selectAll("text"),V=U[0].length,H=t.select("."+A.cbbg).node(),q=p.bBox(H),G=p.getTranslate(t);U.each((function(t,e){var r=V-1;if(0===e||e===r){var n,i=p.bBox(this),a=p.getTranslate(this);if(e===r){var o=i.right+a.x;(n=q.right+G.x+nt-S-2+I-o)>0&&(n=0)}else if(0===e){var s=i.left+a.x;(n=q.left+G.x+nt+S+2-s)<0&&(n=0)}n&&(V<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}}))}var Z={},Y=T[L],X=k[L],K=T[C],et=k[C],rt=b-W;o?("pixels"===h?(Z.y=D,Z.t=J*K,Z.b=J*et):(Z.t=Z.b=0,Z.yt=D+l*K,Z.yb=D-l*et),"pixels"===_?(Z.x=I,Z.l=b*Y,Z.r=b*X):(Z.l=rt*Y,Z.r=rt*X,Z.xl=I-y*Y,Z.xr=I+y*X)):("pixels"===h?(Z.x=I,Z.l=J*Y,Z.r=J*X):(Z.l=Z.r=0,Z.xl=I+l*Y,Z.xr=I-l*X),"pixels"===_?(Z.y=1-D,Z.t=b*K,Z.b=b*et):(Z.t=rt*K,Z.b=rt*et,Z.yt=D-y*K,Z.yb=D+y*et)),a.autoMargin(r,e._id,Z)}],r)}(r,e,t);y&&y.then&&(t._promises||[]).push(y),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s="v"===e.orientation,u=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,o){t.attr("transform",n+c(r,o)),i=l.align((s?e._uFrac:e._vFrac)+r/u.w,s?e._thickFrac:e._lenFrac,0,1,e.xanchor),a=l.align((s?e._vFrac:1-e._uFrac)-o/u.h,s?e._lenFrac:e._thickFrac,0,1,e.yanchor);var f=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,f)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},76228:function(t,e,r){"use strict";var n=r(71828);t.exports=function(t){return n.isPlainObject(t.colorbar)}},12311:function(t,e,r){"use strict";t.exports={moduleType:"component",name:"colorbar",attributes:r(63583),supplyDefaults:r(62499),draw:r(98981).draw,hasColorbar:r(76228)}},50693:function(t,e,r){"use strict";var n=r(63583),i=r(30587).counter,a=r(78607),o=r(63282).scales;function s(t){return"`"+t+"`"}a(o),t.exports=function(t,e){t=t||"";var r,a=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),u="showScaleDflt"in e?e.showScaleDflt:"z"===a,c="string"==typeof e.colorscaleDflt?o[e.colorscaleDflt]:null,f=e.editTypeOverride||"",h=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):s(h+(r={z:"z",c:"color"}[a]));var p=a+"auto",d=a+"min",v=a+"max",g=a+"mid",y=(s(h+p),s(h+d),s(h+v),{});y[d]=y[v]=void 0;var m={};m[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:y},x[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[v]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:m},x[g]={valType:"number",dflt:null,editType:"calc",impliedEdits:y},x.colorscale={valType:"colorscale",editType:"calc",dflt:c,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:u,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},78803:function(t,e,r){"use strict";var n=r(92770),i=r(71828),a=r(52075).extractOpts;t.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,u=r.containerStr,c=u?i.nestedProperty(e,u).get():e,f=a(c),h=!1!==f.auto,p=f.min,d=f.max,v=f.mid,g=function(){return i.aggNums(Math.min,null,l)},y=function(){return i.aggNums(Math.max,null,l)};void 0===p?p=g():h&&(p=c._colorAx&&n(p)?Math.min(p,g()):g()),void 0===d?d=y():h&&(d=c._colorAx&&n(d)?Math.max(d,y()):y()),h&&void 0!==v&&(d-v>v-p?p=v-(d-v):d-v=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},33046:function(t,e,r){"use strict";var n=r(71828),i=r(52075).hasColorscale,a=r(52075).extractOpts;t.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,u=new Array(l),c=0;c4/3-s?o:s}},70461:function(t,e,r){"use strict";var n=r(71828),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},64505:function(t,e){"use strict";e.selectMode=function(t){return"lasso"===t||"select"===t},e.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.openMode=function(t){return"drawline"===t||"drawopenpath"===t},e.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},e.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},e.selectingOrDrawing=function(t){return e.freeMode(t)||e.rectMode(t)}},28569:function(t,e,r){"use strict";var n=r(48956),i=r(57035),a=r(38520),o=r(71828).removeElement,s=r(85555),l=t.exports={};l.align=r(92807),l.getCursor=r(70461);var u=r(26041);function c(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=u.wrapped,l.unhoverRaw=u.raw,l.init=function(t){var e,r,n,u,h,p,d,v,g=t.gd,y=1,m=g._context.doubleClickDelay,x=t.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)m&&(y=Math.max(y-1,1)),g._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(y,p),!v){var r;try{r=new MouseEvent("click",e)}catch(t){var n=f(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},l.coverSlip=c},26041:function(t,e,r){"use strict";var n=r(11086),i=r(79990),a=r(24401).getGraphDiv,o=r(26675),s=t.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!t._dragged&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},79952:function(t,e){"use strict";e.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},e.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=i.numberFormat,o=r(92770),s=r(84267),l=r(73972),u=r(7901),c=r(21081),f=i.strTranslate,h=r(63893),p=r(77922),d=r(18783).LINE_SPACING,v=r(37822).DESELECTDIM,g=r(34098),y=r(39984),m=r(23469).appendArrayPointValue,x=t.exports={};function b(t,e,r){var n=e.fillpattern,i=n&&x.getPatternAttr(n.shape,0,"");if(i){var a=x.getPatternAttr(n.bgcolor,0,null),o=x.getPatternAttr(n.fgcolor,0,null),s=n.fgopacity,l=x.getPatternAttr(n.size,0,8),c=x.getPatternAttr(n.solidity,0,.3),f=e.uid;x.pattern(t,"point",r,f,i,l,c,void 0,n.fillmode,a,o,s)}else e.fillcolor&&t.call(u.fill,e.fillcolor)}x.font=function(t,e,r,n){i.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(u.fill,n)},x.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},x.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},x.setRect=function(t,e,r,n,i){t.call(x.setPosition,e,r).call(x.setSize,n,i)},x.translatePoint=function(t,e,r,n){var i=r.c2p(t.x),a=n.c2p(t.y);return!!(o(i)&&o(a)&&e.node())&&("text"===e.node().nodeName?e.attr("x",i).attr("y",a):e.attr("transform",f(i,a)),!0)},x.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);x.translatePoint(t,i,e,r)}))},x.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},x.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,o=a.xcalendar,s=a.ycalendar,u=l.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(u).each((function(t){x.hideOutsideRangePoint(t,n.select(this),r,i,o,s)}))}))}},x.crispRound=function(t,e,r){return e&&o(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},x.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,s=i||a.dash||"";u.stroke(e,n||a.color),x.dashLine(e,s,o)},x.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,s=i||a.dash||"";n.select(this).call(u.stroke,r||a.color).call(x.dashLine,s,o)}))},x.dashLine=function(t,e,r){r=+r||0,e=x.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},x.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},x.singleFillStyle=function(t,e){var r=n.select(t.node());b(t,((r.data()[0]||[])[0]||{}).trace||{},e)},x.fillGroupStyle=function(t,e){t.style("stroke-width",0).each((function(t){var r=n.select(this);t[0].trace&&b(r,t[0].trace,e)}))};var _=r(90998);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(_).forEach((function(t){var e=_[t],r=e.n;x.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),x.symbolNames[r]=t,x.symbolFuncs[r]=e.f,x.symbolBackOffs[r]=e.backoff||0,e.needLine&&(x.symbolNeedLines[r]=!0),e.noDot?x.symbolNoDot[r]=!0:x.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(x.symbolNoFill[r]=!0)}));var w=x.symbolNames.length;function T(t,e,r,n){var i=t%100;return x.symbolFuncs[i](e,r,n)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(t){if(o(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=x.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=w||t>=400?0:Math.floor(Math.max(t,0))};var k={x1:1,x2:0,y1:0,y2:0},A={x1:0,x2:0,y1:1,y2:0},M=a("~f"),S={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:k},horizontalreversed:{node:"linearGradient",attrs:k,reversed:!0},vertical:{node:"linearGradient",attrs:A},verticalreversed:{node:"linearGradient",attrs:A,reversed:!0}};x.gradient=function(t,e,r,a,o,l){for(var c=o.length,f=S[a],h=new Array(c),p=0;p=100;var f=rt(t,r),h=G(t,r);e.attr("d",T(c,l,f,h))}var p,d,v,g=!1;if(t.so)v=s.outlierwidth,d=s.outliercolor,p=o.outliercolor;else{var y=(s||{}).width;v=(t.mlw+1||y+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,d="mlc"in t?t.mlcc=n.lineScale(t.mlc):i.isArrayOrTypedArray(s.color)?u.defaultLine:s.color,i.isArrayOrTypedArray(o.color)&&(p=u.defaultLine,g=!0),p="mc"in t?t.mcc=n.markerScale(t.mc):o.color||"rgba(0,0,0,0)",n.selectedColorFn&&(p=n.selectedColorFn(t))}if(t.om)e.call(u.stroke,p).style({"stroke-width":(v||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:v)+"px");var m=o.gradient,b=t.mgt;b?g=!0:b=m&&m.type,i.isArrayOrTypedArray(b)&&(b=b[0],S[b]||(b=0));var _=o.pattern,w=_&&x.getPatternAttr(_.shape,t.i,"");if(b&&"none"!==b){var k=t.mgc;k?g=!0:k=m.color;var A=r.uid;g&&(A+="-"+t.i),x.gradient(e,a,A,b,[[0,k],[1,p]],"fill")}else if(w){var M=x.getPatternAttr(_.bgcolor,t.i,null),E=x.getPatternAttr(_.fgcolor,t.i,null),L=_.fgopacity,C=x.getPatternAttr(_.size,t.i,8),P=x.getPatternAttr(_.solidity,t.i,.3),O=t.mcc||i.isArrayOrTypedArray(_.shape)||i.isArrayOrTypedArray(_.bgcolor)||i.isArrayOrTypedArray(_.size)||i.isArrayOrTypedArray(_.solidity),I=r.uid;O&&(I+="-"+t.i),x.pattern(e,"point",a,I,w,C,P,t.mcc,_.fillmode,M,E,L)}else u.fill(e,p);v&&u.stroke(e,d)}},x.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=x.tryColorscale(r,""),e.lineScale=x.tryColorscale(r,"line"),l.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?y(t):function(){return(r.size||6)/2}),t.selectedpoints&&i.extendFlat(e,x.makeSelectedPointStyleFns(t)),e},x.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},a=t.marker||{},o=r.marker||{},s=n.marker||{},u=a.opacity,c=o.opacity,f=s.opacity,h=void 0!==c,p=void 0!==f;(i.isArrayOrTypedArray(u)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?a.opacity:t.mo;return t.selected?h?c:e:p?f:v*e});var d=a.color,g=o.color,y=s.color;(g||y)&&(e.selectedColorFn=function(t){var e=t.mcc||d;return t.selected?g||e:y||e});var m=a.size,x=o.size,b=s.size,_=void 0!==x,w=void 0!==b;return l.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||m/2;return t.selected?_?x/2:e:w?b/2:e}),e},x.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||s;return t.selected?l||e:c||(l?e:u.addOpacity(e,v))},e},x.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){u.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);t.attr("d",T(x.symbolNumber(a),o,rt(n,e),G(n,e))),n.mrc2=o})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}function I(t,e,r){return r&&(t=N(t)),e?z(t[1]):D(t[0])}function D(t){var e=n.round(t,2);return E=e,e}function z(t){var e=n.round(t,2);return L=e,e}function R(t,e,r,n){var i=t[0]-e[0],a=t[1]-e[1],o=r[0]-e[0],s=r[1]-e[1],l=Math.pow(i*i+a*a,.25),u=Math.pow(o*o+s*s,.25),c=(u*u*i-l*l*o)*n,f=(u*u*a-l*l*s)*n,h=3*u*(l+u),p=3*l*(l+u);return[[D(e[0]+(h&&c/h)),z(e[1]+(h&&f/h))],[D(e[0]-(p&&c/p)),z(e[1]-(p&&f/p))]]}x.textPointStyle=function(t,e,r){if(t.size()){var a;if(e.selectedpoints){var o=x.makeSelectedTextStyleFns(e);a=o.selectedTextColorFn}var s=e.texttemplate,l=r._fullLayout;t.each((function(t){var o=n.select(this),u=s?i.extractOption(t,e,"txt","texttemplate"):i.extractOption(t,e,"tx","text");if(u||0===u){if(s){var c=e._module.formatLabels,f=c?c(t,e,l):{},p={};m(p,e,t.i);var d=e._meta||{};u=i.texttemplateString(u,f,l._d3locale,p,t,d)}var v=t.tp||e.textposition,g=O(t,e),y=a?a(t):t.tc||e.textfont.color;o.call(x.font,t.tf||e.textfont.family,g,y).text(u).call(h.convertToTspans,r).call(P,v,g,t.mrc)}else o.remove()}))}},x.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=x.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,s=O(t,e);u.fill(i,a);var c=l.traceIs(e,"bar-like");P(i,o,s,t.mrc2||t.mrc,c)}))}},x.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=u||w>=f&&w<=u)&&(T<=h&&T>=c||T>=h&&T<=c)&&(t=[w,T])}return t}x.steps=function(t){var e=F[t]||B;return function(t){for(var r="M"+D(t[0][0])+","+z(t[0][1]),n=t.length,i=1;i=1e4&&(x.savedBBoxes={},j=0),r&&(x.savedBBoxes[r]=g),j++,i.extendFlat({},g)},x.setClipUrl=function(t,e,r){t.attr("clip-path",V(e,r))},x.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},x.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=f(e,r)).trim(),t[i]("transform",a),a},x.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},x.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var H=/\s*sc.*/;x.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(H,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var q=/translate\([^)]*\)\s*$/;function G(t,e){var r;return t&&(r=t.mf),void 0===r&&(r=e.marker&&e.marker.standoff||0),e._geo||e._xA?r:-r}x.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.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(q);t=1===e&&1===r?[]:[f(o,s),"scale("+e+","+r+")",f(-o,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))},x.getMarkerStandoff=G;var Z,Y,W,X,J,K,$=Math.atan2,Q=Math.cos,tt=Math.sin;function et(t,e){var r=e[0],n=e[1];return[r*Q(t)-n*tt(t),r*tt(t)+n*Q(t)]}function rt(t,e){var r,n,i=t.ma;void 0===i&&(i=e.marker.angle||0);var a=e.marker.angleref;if("previous"===a||"north"===a){if(e._geo){var s=e._geo.project(t.lonlat);r=s[0],n=s[1]}else{var l=e._xA,u=e._yA;if(!l||!u)return 90;r=l.c2p(t.x),n=u.c2p(t.y)}if(e._geo){var c,f=t.lonlat[0],h=t.lonlat[1],p=e._geo.project([f,h+1e-5]),d=e._geo.project([f+1e-5,h]),v=$(d[1]-n,d[0]-r),g=$(p[1]-n,p[0]-r);if("north"===a)c=i/180*Math.PI;else if("previous"===a){var y=f/180*Math.PI,m=h/180*Math.PI,x=Z/180*Math.PI,b=Y/180*Math.PI,_=x-y,w=Q(b)*tt(_),T=tt(b)*Q(m)-Q(b)*tt(m)*Q(_);c=-$(w,T)-Math.PI,Z=f,Y=h}var k=et(v,[Q(c),0]),A=et(g,[tt(c),0]);i=$(k[1]+A[1],k[0]+A[0])/Math.PI*180,"previous"!==a||K===e.uid&&t.i===J+1||(i=null)}if("previous"===a&&!e._geo)if(K===e.uid&&t.i===J+1&&o(r)&&o(n)){var M=r-W,S=n-X,E=e.line&&e.line.shape||"",L=E.slice(E.length-1);"h"===L&&(S=0),"v"===L&&(M=0),i+=$(S,M)/Math.PI*180+90}else i=null}return W=r,X=n,J=t.i,K=e.uid,i}x.getMarkerAngle=rt},90998:function(t,e,r){"use strict";var n,i,a,o,s=r(95616),l=r(39898).round,u="M0,0Z",c=Math.sqrt(2),f=Math.sqrt(3),h=Math.PI,p=Math.cos,d=Math.sin;function v(t){return null===t}function g(t,e,r){if(!(t&&t%360!=0||e))return r;if(a===t&&o===e&&n===r)return i;function l(t,r){var n=p(t),i=d(t),a=r[0],o=r[1]+(e||0);return[a*n-o*i,a*i+o*n]}a=t,o=e,n=r;for(var u=t/180*h,c=0,f=0,v=s(r),g="",y=0;y0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var v=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var g=n.select(this).selectAll("g.errorbar").data(e,f);if(g.exit().remove(),e.length){p.visible||g.selectAll("path.xerror").remove(),d.visible||g.selectAll("path.yerror").remove(),g.style("opacity",1);var y=g.enter().append("g").classed("errorbar",!0);c&&y.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(g,r.layerClipId,t),g.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};return void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0))),void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0))),n}(t,l,u);if(!v||t.vis){var a,o=e.select("path.yerror");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(a+="m-"+f+",0h"+2*f),o.size()?c&&(o=o.transition().duration(s.duration).ease(s.easing)):o=e.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),o.attr("d",a)}else o.remove();var h=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var g=(p.copy_ystyle?d:p).width;a="M"+r.xh+","+(r.y-g)+"v"+2*g+"m0,-"+g+"H"+r.xs,r.noXS||(a+="m0,-"+g+"v"+2*g),h.size()?c&&(h=h.transition().duration(s.duration).ease(s.easing)):h=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),h.attr("d",a)}else h.remove()}}))}}))}},62662:function(t,e,r){"use strict";var n=r(39898),i=r(7901);t.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},77914:function(t,e,r){"use strict";var n=r(41940),i=r(528).hoverlabel,a=r(1426).extendFlat;t.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},30732:function(t,e,r){"use strict";var n=r(71828),i=r(73972);function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}t.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s=0&&r.index_[0]._length||ot<0||ot>w[0]._length)return d.unhoverRaw(t,e)}else at="xpx"in e?e.xpx:_[0]._length/2,ot="ypx"in e?e.ypx:w[0]._length/2;if(e.pointerX=at+_[0]._offset,e.pointerY=ot+w[0]._offset,V="xval"in e?y.flat(l,e.xval):y.p2c(_,at),H="yval"in e?y.flat(l,e.yval):y.p2c(w,ot),!i(V[0])||!i(H[0]))return o.warn("Fx.hover failed",e,t),d.unhoverRaw(t,e)}var ut=1/0;function ct(t,r){for(G=0;Gtt&&(et.splice(0,tt),ut=et[0].distance),m&&0!==B&&0===et.length){Q.distance=B,Q.index=!1;var f=Y._module.hoverPoints(Q,K,$,"closest",{hoverLayer:c._hoverlayer});if(f&&(f=f.filter((function(t){return t.spikeDistance<=B}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(d.length){var v=d[0];i(v.x0)&&i(v.y0)&&(h=ht(v),(!nt.vLinePoint||nt.vLinePoint.spikeDistance>h.spikeDistance)&&(nt.vLinePoint=h))}var g=f.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(g.length){var x=g[0];i(x.x0)&&i(x.y0)&&(h=ht(x),(!nt.hLinePoint||nt.hLinePoint.spikeDistance>h.spikeDistance)&&(nt.hLinePoint=h))}}}}}function ft(t,e,r){for(var n,i=null,a=1/0,o=0;o0&&Math.abs(t.distance)Tt-1;kt--)Et(et[kt]);et=At,gt()}var Lt=t._hoverdata,Ct=[],Pt=j(t),Ot=U(t);for(q=0;q1||et.length>1)||"closest"===P&&it&&et.length>1,Gt=p.combine(c.plot_bgcolor||p.background,c.paper_bgcolor),Zt=O(et,{gd:t,hovermode:P,rotateLabels:qt,bgColor:Gt,container:c._hoverlayer,outerContainer:c._paper.node(),commonLabelOpts:c.hoverlabel,hoverdistance:c.hoverdistance});if(y.isUnifiedHover(P)||(function(t,e,r){var n,i,a,o,s,l,u,c=0,f=1,h=t.size(),p=new Array(h),d=0;function v(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var u=0;for(o=0;oe.pmax&&u++;for(o=t.length-1;o>=0&&!(u<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,u--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(u<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,u--)}}}for(t.each((function(t){var n=t[e],i="x"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));!n&&c<=h;){for(c++,n=!0,o=0;o.01&&m.pmin===x.pmin&&m.pmax===x.pmax){for(s=y.length-1;s>=0;s--)y[s].dp+=i;for(g.push.apply(g,y),p.splice(o+1,1),u=0,s=g.length-1;s>=0;s--)u+=g[s].dp;for(a=u/g.length,s=g.length-1;s>=0;s--)g[s].dp-=a;n=!1}else o++}p.forEach(v)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Zt,qt?"xa":"ya",c),D(Zt,qt,c._invScaleX,c._invScaleY)),s&&s.tagName){var Yt=g.getComponentMethod("annotations","hasClickToShow")(t,Ct);f(n.select(s),Yt?"pointer":"")}s&&!a&&function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,Lt)&&(Lt&&t.emit("plotly_unhover",{event:e,points:Lt}),t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:_,yaxes:w,xvals:V,yvals:H}))}(t,e,r,a,s)}))},e.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=e.gd,a=j(i),o=U(i),s=O(t.map((function(t){var r=t._x0||t.x0||t.x||0,n=t._x1||t.x1||t.x||0,s=t._y0||t.y0||t.y||0,l=t._y1||t.y1||t.y||0,u=t.eventData;if(u){var c=Math.min(r,n),f=Math.max(r,n),h=Math.min(s,l),d=Math.max(s,l),v=t.trace;if(g.traceIs(v,"gl3d")){var y=i._fullLayout[v.scene]._scene.container,m=y.offsetLeft,x=y.offsetTop;c+=m,f+=m,h+=x,d+=x}u.bbox={x0:c+o,x1:f+o,y0:h+a,y1:d+a},e.inOut_bbox&&e.inOut_bbox.push(u.bbox)}else u=!1;return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,hovertemplateLabels:t.hovertemplateLabels||!1,eventData:u}})),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||p.background,container:n.select(e.container),outerContainer:e.outerContainer||e.container}),l=0,u=0;return s.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function O(t,e){var r=e.gd,i=r._fullLayout,a=e.hovermode,u=e.rotateLabels,f=e.bgColor,d=e.container,v=e.outerContainer,w=e.commonLabelOpts||{};if(0===t.length)return[[]];var T=e.fontFamily||m.HOVERFONT,k=e.fontSize||m.HOVERFONTSIZE,A=t[0],E=A.xa,L=A.ya,P=a.charAt(0),O=P+"Label",D=A[O];if(void 0===D&&"multicategory"===E.type)for(var z=0;zi.width-b?(g=i.width-b,e.attr("d","M"+(b-M)+",0L"+b+","+x+M+"v"+x+(2*S+m.height)+"H-"+b+"V"+x+M+"H"+(b-2*M)+"Z")):e.attr("d","M0,0L"+M+","+x+M+"H"+(S+m.width/2)+"v"+x+(2*S+m.height)+"H-"+(S+m.width/2)+"V"+x+M+"H-"+M+"Z")}else{var _,C,P;"right"===L.side?(_="start",C=1,P="",g=E._offset+E._length):(_="end",C=-1,P="-",g=E._offset),y=L._offset+(A.y0+A.y1)/2,l.attr("text-anchor",_),e.attr("d","M0,0L"+P+M+","+M+"V"+(S+m.height/2)+"h"+P+(2*S+m.width)+"V-"+(S+m.height/2)+"H"+P+M+"V-"+M+"Z");var O,I=m.height/2,z=F-m.top-I,R="clip"+i._uid+"commonlabel"+L._id;if(g=0?st:lt+ft=0?lt:xt+ft=0?at:ot+ht=0?ot:bt+ht=0,"top"!==t.idealAlign&&G||!Z?G?(O+=R/2,t.anchor="start"):t.anchor="middle":(O-=R/2,t.anchor="end");else if(t.pos=O,G=P+z/2+Y<=B,Z=P-z/2-Y>=0,"left"!==t.idealAlign&&G||!Z)if(G)P+=z/2,t.anchor="start";else{t.anchor="middle";var W=Y/2,X=P+W-B,J=P-W;X>0&&(P-=X),J<0&&(P+=-J)}else P-=z/2,t.anchor="end";w.attr("text-anchor",t.anchor),E&&A.attr("text-anchor",t.anchor),e.attr("transform",s(P,O)+(u?l(_):""))})),_t}function I(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=B(t.name,t.nameLength));var u=r.charAt(0),c="x"===u?"y":"x";void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
"),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
"),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[u+"Label"]===i?l=t[c+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
":"")+t.text),void 0!==t.extraText&&(l+=(l?"
":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var f=t.hovertemplate||!1;if(f){var h=t.hovertemplateLabels||t;t[u+"Label"]!==i&&(h[u+"other"]=h[u+"Val"],h[u+"otherLabel"]=h[u+"Label"]),l=(l=o.hovertemplateString(f,h,n._d3locale,t.eventData[0]||{},t.trace._meta)).replace(P,(function(e,r){return s=B(r,t.nameLength),""}))}return[l,s]}function D(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select("text.nums"),s=t.anchor,l="end"===s?-1:1,u={start:1,end:-1,middle:0}[s],f=u*(M+S),p=f+u*(t.txwidth+S),d=0,v=t.offset,g="middle"===s;g&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(v*=-A,d=t.offset*k),r.select("path").attr("d",g?"M-"+a(t.bx/2+t.tx2width/2)+","+o(v-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(l*M+d)+","+o(M+v)+"v"+o(t.by/2-M)+"h"+a(l*t.bx)+"v-"+o(t.by)+"H"+a(l*M+d)+"V"+o(v-M)+"Z");var y=d+f,m=v+t.ty0-t.by/2+S,x=t.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==s?(i.attr("text-anchor","start"),y=g?-t.bx/2-t.tx2width/2+S:-t.bx-S):"right"===x&&"end"!==s&&(i.attr("text-anchor","end"),y=g?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(c.positionText,a(y),o(m)),t.tx2width&&(r.select("text.name").call(c.positionText,a(p+u*S+d),o(v+t.ty0-t.by/2+S)),r.select("rect").call(h.setRect,a(p+(u-1)*t.tx2width/2+d),o(v-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function z(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var u=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function c(e,r,n){var i=u(r,n);l(i)&&(t[e]=i)}if(c("hoverinfo","hi","hoverinfo"),c("bgcolor","hbg","hoverlabel.bgcolor"),c("borderColor","hbc","hoverlabel.bordercolor"),c("fontFamily","htf","hoverlabel.font.family"),c("fontSize","hts","hoverlabel.font.size"),c("fontColor","htc","hoverlabel.font.color"),c("nameLength","hnl","hoverlabel.namelength"),c("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:v.hoverLabelText(t.xa,t.xLabelVal,n.xhoverformat),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:v.hoverLabelText(t.ya,t.yLabelVal,n.yhoverformat),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=v.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+v.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" ± "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=v.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+v.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" ± "+h,"y"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===p.indexOf("y")&&(t.yLabel=void 0),-1===p.indexOf("z")&&(t.zLabel=void 0),-1===p.indexOf("text")&&(t.text=void 0),-1===p.indexOf("name")&&(t.name=void 0)),t}function R(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,u=r.event,c=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),f||c){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(c){var g,y,m=e.hLinePoint;n=m&&m.xa,"cursor"===(i=m&&m.ya).spikesnap?(g=u.pointerX,y=u.pointerY):(g=n._offset+m.x,y=i._offset+m.y);var x,b,_=a.readability(m.color,d)<1.5?p.contrast(d):m.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,A=v.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=A,b=g),-1!==w.indexOf("across")){var M=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(M=Math.min(M,i.position),S=Math.max(S,i.position)),x=l.l+M*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T,stroke:k,"stroke-dasharray":h.dashStyle(i.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:y,y2:y,"stroke-width":T+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:A+("right"!==i.side?T:-T),cy:y,r:T,fill:k}).classed("spikeline",!0)}if(f){var E,L,C=e.vLinePoint;n=C&&C.xa,i=C&&C.ya,"cursor"===n.spikesnap?(E=u.pointerX,L=u.pointerY):(E=n._offset+C.x,L=i._offset+C.y);var P,O,I=a.readability(C.color,d)<1.5?p.contrast(d):C.color,D=n.spikemode,z=n.spikethickness,R=n.spikecolor||I,F=v.getPxPosition(t,n);if(-1!==D.indexOf("toaxis")||-1!==D.indexOf("across")){if(-1!==D.indexOf("toaxis")&&(P=F,O=L),-1!==D.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),P=l.t+(1-N)*l.h,O=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":z,stroke:R,"stroke-dasharray":h.dashStyle(n.spikedash,z)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:P,y2:O,"stroke-width":z+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==D.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?z:-z),r:z,fill:R}).classed("spikeline",!0)}}}function F(t,e){return!e||e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint}function B(t,e){return c.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}function N(t,e,r){var n=e[t+"a"],i=e[t+"Val"],a=e.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=e.trace[t+"periodalignment"];if(o){var s=e.cd[e.index],l=s[t+"Start"];void 0===l&&(l=s[t]);var u=s[t+"End"];void 0===u&&(u=s[t]);var c=u-l;"end"===o?i+=c:"middle"===o&&(i+=c/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"!==r.boxmode&&"group"!==r.violinmode||(i+=a.t.dPos)),i}function j(t){return t.offsetTop+t.clientTop}function U(t){return t.offsetLeft+t.clientLeft}function V(t,e){var r=t._fullLayout,n=e.getBoundingClientRect(),i=n.x,a=n.y,s=i+n.width,l=a+n.height,u=o.apply3DTransform(r._invTransform)(i,a),c=o.apply3DTransform(r._invTransform)(s,l),f=u[0],h=u[1],p=c[0],d=c[1];return{x:f,y:h,width:p-f,height:d-h,top:Math.min(h,d),left:Math.min(f,p),right:Math.max(f,p),bottom:Math.max(h,d)}}},38048:function(t,e,r){"use strict";var n=r(71828),i=r(7901),a=r(23469).isUnifiedHover;t.exports=function(t,e,r,o){o=o||{};var s=e.legend;function l(t){o.font[t]||(o.font[t]=s?e.legend.font[t]:e.font[t])}e&&a(e.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),s?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},98212:function(t,e,r){"use strict";var n=r(71828),i=r(528);t.exports=function(t,e){function r(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}return r("clickmode"),r("hovermode")}},30211:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(28569),o=r(23469),s=r(528),l=r(88335);t.exports={moduleType:"component",name:"fx",constants:r(26675),schema:{layout:s},attributes:r(77914),layoutAttributes:s,supplyLayoutGlobalDefaults:r(22774),supplyDefaults:r(54268),supplyLayoutDefaults:r(34938),calc:r(30732),getDistanceFunction:o.getDistanceFunction,getClosest:o.getClosest,inbox:o.inbox,quadrature:o.quadrature,appendArrayPointValue:o.appendArrayPointValue,castHoverOption:function(t,e,r){return i.castOption(t,e,"hoverlabel."+r)},castHoverinfo:function(t,e,r){return i.castOption(t,r,"hoverinfo",(function(r){return i.coerceHoverinfo({hoverinfo:r},{_module:t._module},e)}))},hover:l.hover,unhover:a.unhover,loneHover:l.loneHover,loneUnhover:function(t){var e=i.isD3Selection(t)?t:n.select(t);e.selectAll("g.hovertext").remove(),e.selectAll(".spikeline").remove()},click:r(75914)}},528:function(t,e,r){"use strict";var n=r(26675),i=r(41940),a=i({editType:"none"});a.family.dflt=n.HOVERFONT,a.size.dflt=n.HOVERFONTSIZE,t.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"},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:a,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function(t,e,r){"use strict";var n=r(71828),i=r(528),a=r(98212),o=r(38048);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}a(t,e)&&(r("hoverdistance"),r("spikedistance")),"select"===r("dragmode")&&r("selectdirection");var s=e._has("mapbox"),l=e._has("geo"),u=e._basePlotModules.length;"zoom"===e.dragmode&&((s||l)&&1===u||s&&l&&2===u)&&(e.dragmode="pan"),o(t,e,r),n.coerceFont(r,"hoverlabel.grouptitlefont",e.hoverlabel.font)}},22774:function(t,e,r){"use strict";var n=r(71828),i=r(38048),a=r(528);t.exports=function(t,e){i(t,e,(function(r,i){return n.coerce(t,e,a,r,i)}))}},83312:function(t,e,r){"use strict";var n=r(71828),i=r(30587).counter,a=r(27670).Y,o=r(85555).idRegex,s=r(44467),l={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:[i("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[o.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:a({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 u(t,e,r){var n=e[r+"axes"],i=Object.keys((t._splomAxes||{})[r]||{});return Array.isArray(n)?n:i.length?i:void 0}function c(t,e,r,n,i,a){var o=e(t+"gap",r),s=e("domain."+t);e(t+"side",n);for(var l=new Array(i),u=s[0],c=(s[1]-u)/(i-o),f=c*(1-o),h=0;h1){h||p||d||"independent"===k("pattern")&&(h=!0),g._hasSubplotGrid=h;var x,b,_="top to bottom"===k("roworder"),w=h?.2:.1,T=h?.3:.1;v&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),g._domains={x:c("x",k,w,x,m),y:c("y",k,T,b,y,_)}}else delete e.grid}function k(t,e){return n.coerce(r,g,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,c,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,v=r.rows,g=r.columns,y="independent"===r.pattern,m=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(v);var b=1;for(n=0;n1);if(!1===_&&(e.legend=void 0),(!1!==_||f.uirevision)&&(p("uirevision",e.uirevision),!1!==_)){p("bgcolor",e.paper_bgcolor),p("bordercolor"),p("borderwidth");var w,T,k,A=i.coerceFont(p,"font",e.font),M="h"===p("orientation");if(M?(w=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(T=1.1,k="bottom"):(T=-.1,k="top")):(w=1.02,T=1,k="auto"),p("traceorder",x),u.isGrouped(e.legend)&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("x",w),p("xanchor"),p("y",T),p("yanchor",k),p("valign"),i.noneOrAll(f,h,["x","y"]),p("title.text")){p("title.side",M?"left":"top");var S=i.extendFlat({},A,{size:i.bigFont(A.size)});i.coerceFont(p,"title.font",S)}}}},43969:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(74875),o=r(73972),s=r(11086),l=r(28569),u=r(91424),c=r(7901),f=r(63893),h=r(85167),p=r(14928),d=r(18783),v=d.LINE_SPACING,g=d.FROM_TL,y=d.FROM_BR,m=r(82424),x=r(53630),b=r(10130);function _(t,e,r){var n=t[0],i=n.width,a=e.entrywidthmode,o=n.trace.legendwidth||e.entrywidth;return"fraction"===a?e._maxWidth*o:r+(o||i)}function w(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l)&&(1===n?e._clickTimeout=setTimeout((function(){t._fullLayout&&h(r,t,n)}),t._context.doubleClickDelay):2===n&&(e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&h(r,t,n)))}function T(t,e,r){var n,a,s=t.data()[0][0],l=s.trace,c=o.traceIs(l,"pie-like"),h=!r._inHover&&e._context.edits.legendText&&!c,d=r._maxNameLength;s.groupTitle?(n=s.groupTitle.text,a=s.groupTitle.font):(a=r.font,r.entries?n=s.text:(n=c?s.label:l.name,l._meta&&(n=i.templateString(n,l._meta))));var v=i.ensureSingle(t,"text","legendtext");v.attr("text-anchor","start").call(u.font,a).text(h?k(n,d):n);var g=r.itemwidth+2*p.itemGap;f.positionText(v,g,0),h?v.call(f.makeEditable,{gd:e,text:n}).call(M,t,e,r).on("edit",(function(n){this.text(k(n,d)).call(M,t,e,r);var a=s.trace._fullInput||{},u={};if(o.hasTransform(a,"groupby")){var c=o.getTransformIndices(a,"groupby"),f=c[c.length-1],h=i.keyedContainer(a,"transforms["+f+"].styles","target","value.name");h.set(s.trace._group,n),u=h.constructUpdate()}else u.name=n;return o.call("_guiRestyle",e,u,l.index)})):M(v,t,e,r)}function k(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function A(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,"rect","legendtoggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(c.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(s.on("mousedown",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),w(e,r,t,o,n.event)}})))}function M(t,e,r,n,i){n._inHover&&t.attr("data-notex",!0),f.convertToTspans(t,r,(function(){!function(t,e,r,n){var i=t.data()[0][0];if(r._inHover||!i||i.trace.showlegend){var a=t.select("g[class*=math-group]"),o=a.node();r||(r=e._fullLayout.legend);var s,l,c=r.borderwidth,h=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*v;if(o){var d=u.bBox(o);s=d.height,l=d.width,1===n?u.setTranslate(a,c,c+.75*s):u.setTranslate(a,0,.25*s)}else{var g=t.select(1===n?".legendtitletext":".legendtext"),y=f.lineCount(g),m=g.node();if(s=h*y,l=m?u.bBox(m).width:0,1===n)"left"===r.title.side&&(l+=2*p.itemGap),f.positionText(g,c+p.titlePad,c+h);else{var x=2*p.itemGap+r.itemwidth;i.groupTitle&&(x=p.itemGap,l-=r.itemwidth),f.positionText(g,x,-h*((y-1)/2-.3))}}1===n?(r._titleWidth=l,r._titleHeight=s):(i.lineHeight=h,i.height=Math.max(s,16)+3,i.width=l)}else t.remove()}(e,r,n,i)}))}function S(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function E(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}t.exports=function(t,e){return e||(e=t._fullLayout.legend||{}),function(t,e){var r,s,f=t._fullLayout,h="legend"+f._uid,d=e._inHover;if(d?(r=e.layer,h+="-hover"):r=f._infolayer,r){if(t._legendMouseDownTime||(t._legendMouseDownTime=0),d){if(!e.entries)return;s=m(e.entries,e)}else{if(!t.calcdata)return;s=f.showlegend&&m(t.calcdata,e)}var v=f.hiddenlabels||[];if(!(d||f.showlegend&&s.length))return r.selectAll(".legend").remove(),f._topdefs.select("#"+h).remove(),a.autoMargin(t,"legend");var k=i.ensureSingle(r,"g","legend",(function(t){d||t.attr("pointer-events","all")})),L=i.ensureSingleById(f._topdefs,"clipPath",h,(function(t){t.append("rect")})),C=i.ensureSingle(k,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));C.call(c.stroke,e.bordercolor).call(c.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var P=i.ensureSingle(k,"g","scrollbox"),O=e.title;if(e._titleWidth=0,e._titleHeight=0,O.text){var I=i.ensureSingle(P,"text","legendtitletext");I.attr("text-anchor","start").call(u.font,O.font).text(O.text),M(I,P,t,e,1)}else P.selectAll(".legendtitletext").remove();var D=i.ensureSingle(k,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(c.fill,p.scrollBarColor)})),z=P.selectAll("g.groups").data(s);z.enter().append("g").attr("class","groups"),z.exit().remove();var R=z.selectAll("g.traces").data(i.identity);R.enter().append("g").attr("class","traces"),R.exit().remove(),R.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==v.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(T,t,e)})).call(x,t,e).each((function(){d||n.select(this).call(A,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),c="fraction"===i.entrywidthmode,f=i.borderwidth,h=2*f,d=p.itemGap,v=i.itemwidth+2*d,g=2*(f+d),y=E(i),m=i.y<0||0===i.y&&"top"===y,x=i.y>1||1===i.y&&"bottom"===y,w=i.tracegroupgap,T={};i._maxHeight=Math.max(m||x?a.height/2:o.h,30);var k=0;i._width=0,i._height=0;var A=function(t){var e=0,r=0,n=t.title.side;return n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight)),[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;u.setTranslate(this,f+A[0],f+A[1]+i._height+e/2+d),i._height+=e,i._width=Math.max(i._width,t[0].width)})),k=v+i._width,i._width+=d+v+h,i._height+=g,l&&(e.each((function(t,e){u.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var M=S(i),L=i.x<0||0===i.x&&"right"===M,C=i.x>1||1===i.x&&"left"===M,P=x||m,O=a.width/2;i._maxWidth=Math.max(L?P&&"left"===M?o.l+o.w:O:C?P&&"right"===M?o.r+o.w:O:o.w,2*v);var I=0,D=0;r.each((function(t){var e=_(t,i,v);I=Math.max(I,e),D+=e})),k=null;var z=0;if(l){var R=0,F=0,B=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=_(r,i,v),a=r[0].height;u.setTranslate(this,A[0],A[1]+f+d+a/2+e),e+=a,t=Math.max(t,n),T[r[0].trace.legendgroup]=t}));var r=t+d;F>0&&r+f+F>i._maxWidth?(z=Math.max(z,F),F=0,B+=R+w,R=e):R=Math.max(R,e),u.setTranslate(this,F,B),F+=r})),i._width=Math.max(z,F)+f,i._height=B+R+g}else{var N=r.size(),j=D+h+(N-1)*d=i._maxWidth&&(z=Math.max(z,q),V=0,H+=U,i._height+=U,U=0),u.setTranslate(this,A[0]+f+V,A[1]+f+H+e/2+d),q=V+r+d,V+=n,U=Math.max(U,e)})),j?(i._width=V+h,i._height=U+g):(i._width=Math.max(z,q)+h,i._height+=U+g)}}i._width=Math.ceil(Math.max(i._width+A[0],i._titleWidth+2*(f+p.titlePad))),i._height=Math.ceil(Math.max(i._height+A[1],i._titleHeight+2*(f+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var G=t._context.edits,Z=G.legendText||G.legendPosition;r.each((function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,a=t[0].trace.legendgroup,o=_(t,i,v);l&&""!==a&&(o=T[a]);var f=Z?v:k||o;s||c||(f+=d/2),u.setRect(e,0,-r/2,f,r)}))}(t,z,R,e)},function(){var s,c,v,m,x=f._size,b=e.borderwidth;if(!d){var _=function(t){var e=t._fullLayout.legend,r=S(e),n=E(e);return a.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*g[r],r:e._width*y[r],b:e._effHeight*y[n],t:e._effHeight*g[n]})}(t);if(_)return;var T=x.l+x.w*e.x-g[S(e)]*e._width,A=x.t+x.h*(1-e.y)-g[E(e)]*e._effHeight;if(f.margin.autoexpand){var M=T,O=A;T=i.constrain(T,0,f.width-e._width),A=i.constrain(A,0,f.height-e._effHeight),T!==M&&i.log("Constrain legend.x to make legend fit inside graph"),A!==O&&i.log("Constrain legend.y to make legend fit inside graph")}u.setTranslate(k,T,A)}if(D.on(".drag",null),k.on("wheel",null),d||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;d&&(I=e._height),C.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),u.setTranslate(P,0,0),L.select("rect").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),u.setClipUrl(P,h,t),u.setRect(D,0,0,0,0),delete e._scrollY}else{var z,R,F,B=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),N=e._effHeight-B-2*p.scrollBarMargin,j=e._height-e._effHeight,U=N/j,V=Math.min(e._scrollY||0,j);C.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),L.select("rect").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+V}),u.setClipUrl(P,h,t),G(V,B,U),k.on("wheel",(function(){G(V=i.constrain(e._scrollY+n.event.deltaY/N*j,0,j),B,U),0!==V&&V!==j&&n.event.preventDefault()}));var H=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;z="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,F=V})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(R="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,G(V=function(t,e,r){var n=(r-e)/U+t;return i.constrain(n,0,j)}(F,z,R),B,U))}));D.call(H);var q=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(z=t.changedTouches[0].clientY,F=V)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(R=t.changedTouches[0].clientY,G(V=function(t,e,r){var n=(e-r)/U+t;return i.constrain(n,0,j)}(F,z,R),B,U))}));P.call(q)}function G(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,u.setTranslate(P,0,-r),u.setRect(D,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),L.select("rect").attr("y",b+r)}t._context.edits.legendPosition&&(k.classed("cursor-move",!0),l.init({element:k.node(),gd:t,prepFn:function(){var t=u.getTranslate(k);v=t.x,m=t.y},moveFn:function(t,r){var n=v+t,i=m+r;u.setTranslate(k,n,i),s=l.align(n,0,x.l,x.l+x.w,e.xanchor),c=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==s&&void 0!==c&&o.call("_guiRelayout",t,{"legend.x":s,"legend.y":c})},clickFn:function(e,n){var i=r.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom}));i.size()>0&&w(t,k,i,e,n)}}))}],t)}}(t,e)}},82424:function(t,e,r){"use strict";var n=r(73972),i=r(10130);t.exports=function(t,e){var r,a,o=e._inHover,s=i.isGrouped(e),l=i.isReversed(e),u={},c=[],f=!1,h={},p=0,d=0;function v(t,r){if(""!==t&&i.isGrouped(e))-1===c.indexOf(t)?(c.push(t),f=!0,u[t]=[r]):u[t].push(r);else{var n="~~i"+p;c.push(n),u[n]=[r],p++}}for(r=0;rA&&(k=A)}w[r][0]._groupMinRank=k,w[r][0]._preGroupSort=r}var M=function(t,e){return t.trace.legendrank-e.trace.legendrank||t._preSort-e._preSort};for(w.forEach((function(t,e){t[0]._preGroupSort=e})),w.sort((function(t,e){return t[0]._groupMinRank-e[0]._groupMinRank||t[0]._preGroupSort-e[0]._preGroupSort})),r=0;rr?r:t}t.exports=function(t,e,r){var y=e._fullLayout;r||(r=y.legend);var m="constant"===r.itemsizing,x=r.itemwidth,b=(x+2*p.itemGap)/2,_=o(b,0),w=function(t,e,r,n){var i;if(t+1)i=t;else{if(!(e&&e.width>0))return 0;i=e.width}return m?n:Math.min(i,r)};function T(t,a,o){var c=t[0].trace,f=c.marker||{},h=f.line||{},p=o?c.visible&&c.type===o:i.traceIs(c,"bar"),d=n.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(p?[t]:[]);d.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),d.exit().remove(),d.each((function(t){var i=n.select(this),a=t[0],o=w(a.mlw,f.line,5,2);i.style("stroke-width",o+"px");var p=a.mcc;if(!r._inHover&&"mc"in a){var d=u(f),v=d.mid;void 0===v&&(v=(d.max+d.min)/2),p=s.tryColorscale(f,"")(v)}var y=p||a.mc||f.color,m=f.pattern,x=m&&s.getPatternAttr(m.shape,0,"");if(x){var b=s.getPatternAttr(m.bgcolor,0,null),_=s.getPatternAttr(m.fgcolor,0,null),T=m.fgopacity,k=g(m.size,8,10),A=g(m.solidity,.5,1),M="legend-"+c.uid;i.call(s.pattern,"legend",e,M,x,k,A,p,m.fillmode,b,_,T)}else i.call(l.fill,y);o&&l.stroke(i,a.mlc||h.color)}))}function k(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),u.exit().remove(),u.size()){var c=(s.marker||{}).line,p=w(h(c.width,o.pts),c,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=c.color;var v=a.minExtend(o,{trace:d});f(u,v,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,u=t[0].height;if("middle"!==s&&l&&u){var c={top:1,bottom:-1}[s]*(.5*(l-u+3));i.attr("transform",o(0,c))}else i.attr("transform",null);i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["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"]],r=!1;break;case"streamtube":o=[["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"]],r=!1;break;case"surface":o=[["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"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var c=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);c.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),c.exit().remove(),c.each((function(t,o){var c,f=n.select(this),h=u(i),p=h.colorscale,v=h.reversescale;if(p){if(!r){var g=p.length;c=0===o?p[v?g-1:0][1]:1===o?p[v?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=i.vertexcolor||i.facecolor||i.color;c=a.isArrayOrTypedArray(y)?y[o]||y[0]:y}f.attr("d",t[0]),c?f.call(l.fill,c):f.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(v,"radial"===r),p,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,T(t,this,"waterfall")}var a=[];e.visible&&r&&(a=t[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 o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=w(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){T(t,this,"funnel")})).each((function(t){T(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=w(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var u=a.minExtend(r,{marker:{size:m?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,u,e)}}))})).each((function(t){k(t,this,"funnelarea")})).each((function(t){k(t,this,"pie")})).each((function(t){var r,i,o=v(t),l=o.showFill,f=o.showLine,h=o.showGradientLine,p=o.showGradientFill,g=o.anyFill,y=o.anyLine,m=t[0],b=m.trace,_=u(b),T=_.colorscale,k=_.reversescale,A=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",M=n.select(this),S=M.select(".legendfill").selectAll("path").data(l||p?[t]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call((function(t){if(t.size())if(l)s.fillGroupStyle(t,e);else{var r="legendfill-"+b.uid;s.gradient(t,e,r,d(k),T,"fill")}})),f||h){var E=w(void 0,b.line,10,5);i=a.minExtend(b,{line:{width:E}}),r=[a.minExtend(m,{trace:i})]}var L=M.select(".legendlines").selectAll("path").data(f||h?[r]:[]);L.enter().append("path").classed("js-line",!0),L.exit().remove(),L.attr("d",A+(h?"l"+x+",0.0001":"h"+x)).call(f?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+b.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(k),T,"stroke")}})})).each((function(t){var r,i,o=v(t),l=o.anyFill,u=o.anyLine,f=o.showLine,h=o.showMarker,p=t[0],d=p.trace,g=!h&&!u&&!l&&c.hasText(d);function y(t,e,r,n){var i=a.nestedProperty(d,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(m&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(t){return p._distinct&&p.index&&t[p.index]?t[p.index]:t[0]}if(h||g||f){var b={},w={};if(h){b.mc=y("marker.color",x),b.mx=y("marker.symbol",x),b.mo=y("marker.opacity",a.mean,[.2,1]),b.mlc=y("marker.line.color",x),b.mlw=y("marker.line.width",a.mean,[0,5],2),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",a.mean,[2,16],12);b.ms=T,w.marker.size=T}f&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(b.tx="Aa",b.tp=y("textposition",x),b.ts=10,b.tc=y("textfont.color",x),b.tf=y("textfont.family",x)),r=[a.minExtend(p,b)],(i=a.minExtend(d,w)).selectedpoints=null,i.texttemplate=null}var k=n.select(this).select("g.legendpoints"),A=k.selectAll("path.scatterpts").data(h?r:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),A.exit().remove(),A.call(s.pointStyle,i,e),h&&(r[0].mrc=3);var M=k.selectAll("g.pointtext").data(g?r:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),M.exit().remove(),M.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",_).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=w(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},42068:function(t,e,r){"use strict";r(93348),t.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"}}},26023:function(t,e,r){"use strict";var n=r(73972),i=r(74875),a=r(41675),o=r(24255),s=r(34031).eraseActiveShape,l=r(71828),u=l._,c=t.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,u=t._fullLayout,c={},f=a.list(t,null,!0),h=u._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,v=(1+d)/2,g=(1-d)/2;for(i=0;i1?(O=["toggleHover"],I=["resetViews"]):y?(P=["zoomInGeo","zoomOutGeo"],O=["hoverClosestGeo"],I=["resetGeo"]):g?(O=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):w?(P=["zoomInMapbox","zoomOutMapbox"],O=["toggleHover"],I=["resetViewMapbox"]):b?O=["hoverClosestGl2d"]:m?O=["hoverClosestPie"]:A?(O=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):O=["toggleHover"],v&&(O=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(t){for(var e=0;e0)){var v=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a=n.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t=0;k--){var A=r.append("path").attr(g).style("opacity",k?.1:y).call(o.stroke,x).call(o.fill,m).call(s.dashLine,k?"solid":_,k?4+b:b);if(d(A,t,a),w){var M=l(t.layout,"selections",a);A.style({cursor:"move"});var S={element:A.node(),plotinfo:p,gd:t,editHelpers:M,isActiveSelection:!0},E=n(u,t);i(E,A,S)}else A.style("pointer-events",k?"all":"none");T[k]=A}var L=T[0];T[1].node().addEventListener("click",(function(){return function(t,e){if(h(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeSelectionIndex)return void v(t);t._fullLayout._activeSelectionIndex=r,t._fullLayout._deactivateSelection=v,f(t)}}}(t,L)}))}(t._fullLayout._selectionLayer)}function d(t,e,r){var n=r.xref+r.yref;s.setClipUrl(t,"clip"+e._fullLayout._uid+n,e)}function v(t){h(t)&&t._fullLayout._activeSelectionIndex>=0&&(a(t),delete t._fullLayout._activeSelectionIndex,f(t))}t.exports={draw:f,drawOne:p,activateLastSelection:function(t){if(h(t)){var e=t._fullLayout.selections.length-1;t._fullLayout._activeSelectionIndex=e,t._fullLayout._deactivateSelection=v,f(t)}}}},53777:function(t,e,r){"use strict";var n=r(79952).P,i=r(1426).extendFlat;t.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:i({},n,{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"}}},90849:function(t){"use strict";t.exports=function(t,e,r){r("newselection.mode"),r("newselection.line.width")&&(r("newselection.line.color"),r("newselection.line.dash")),r("activeselection.fillcolor"),r("activeselection.opacity")}},35855:function(t,e,r){"use strict";var n=r(64505).selectMode,i=r(51873).clearOutline,a=r(60165),o=a.readPaths,s=a.writePaths,l=a.fixDatesForPaths;t.exports=function(t,e){if(t.length){var r=t[0][0];if(r){var a=r.getAttribute("d"),u=e.gd,c=u._fullLayout.newselection,f=e.plotinfo,h=f.xaxis,p=f.yaxis,d=e.isActiveSelection,v=e.dragmode,g=(u.layout||{}).selections||[];if(!n(v)&&void 0!==d){var y=u._fullLayout._activeSelectionIndex;if(y-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){Z(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((n+=e.selectedpoints.length)>1)return!1}return 1===n}(s)&&(h=K(_))){for(o&&o.remove(),g=0;g=0})(i)&&i._fullLayout._deactivateShape(i),function(t){return t._fullLayout._activeSelectionIndex>=0}(i)&&i._fullLayout._deactivateSelection(i);var o=i._fullLayout._zoomlayer,s=p(r),l=v(r);if(s||l){var u,c,f=o.selectAll(".select-outline-"+n.id);f&&i._fullLayout._outlining&&(s&&(u=T(f,t)),u&&a.call("_guiRelayout",i,{shapes:u}),l&&!U(t)&&(c=k(f,t)),c&&(i._fullLayout._noEmitSelectedAtStart=!0,a.call("_guiRelayout",i,{selections:c}).then((function(){e&&A(i)}))),i._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=t.selectionDefs=[],n.selection.mergedPolygons=t.mergedPolygons=[]}function W(t){return t._id}function X(t,e,r,n){if(!t.calcdata)return[];var i,a,o,s=[],l=e.map(W),u=r.map(W);for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function $(t,e,r){var n,i;for(n=0;n-1&&e;if(!a&&e){var et=ot(t,!0);if(et.length){var nt=et[0].xref,pt=et[0].yref;if(nt&&pt){var dt=ut(et);ct([C(t,nt,"x"),C(t,pt,"y")])(Q,dt)}}t._fullLayout._noEmitSelectedAtStart?t._fullLayout._noEmitSelectedAtStart=!1:tt&&ft(t,Q),h._reselect=!1}if(!a&&h._deselect){var vt=h._deselect;(function(t,e,r){for(var n=0;n=0)k._fullLayout._deactivateShape(k);else if(!x){var r=A.clickmode;L.done(At).then((function(){if(L.clear(At),2===t){for(bt.remove(),K=0;K-1&&V(e,k,n.xaxes,n.yaxes,n.subplot,n,bt),"event"===r&&ft(k,void 0);l.click(k,e)})).catch(M.error)}},n.doneFn=function(){kt.remove(),L.done(At).then((function(){L.clear(At),!S&&J&&n.selectionDefs&&(J.subtract=xt,n.selectionDefs.push(J),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,W)),(S||x)&&Y(n,S),n.doneFnCompleted&&n.doneFnCompleted(Mt),b&&ft(k,at)})).catch(M.error)}},clearOutline:x,clearSelectionsCache:Y,selectOnClick:V}},89827:function(t,e,r){"use strict";var n=r(50215),i=r(82196).line,a=r(79952).P,o=r(1426).extendFlat,s=r(44467).templatedArray;r(24695),t.exports=s("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:o({},n.xref,{}),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"},yref:o({},n.yref,{}),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"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:o({},i.color,{editType:"arraydraw"}),width:o({},i.width,{editType:"calc+arraydraw"}),dash:o({},a,{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"},editType:"arraydraw"})},5627:function(t,e,r){"use strict";var n=r(71828),i=r(89298),a=r(21459),o=r(30477);function s(t){return u(t.line.width,t.xsizemode,t.x0,t.x1,t.path,!1)}function l(t){return u(t.line.width,t.ysizemode,t.y0,t.y1,t.path,!0)}function u(t,e,r,i,s,l){var u=t/2,c=l;if("pixel"===e){var f=s?o.extractPathCoords(s,l?a.paramIsY:a.paramIsX):[r,i],h=n.aggNums(Math.max,null,f),p=n.aggNums(Math.min,null,f),d=p<0?Math.abs(p)+u:u,v=h>0?h+u:u;return{ppad:u,ppadplus:c?d:v,ppadminus:c?v:d}}return{ppad:u}}function c(t,e,r,n,i){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,u,c,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lp&&(p=f)));return p>=h?[h,p]:void 0}}t.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;o1&&(2!==t.length||"Z"!==t[1][0])&&(0===E&&(t[0][0]="M"),e[S]=t,T(),k())}}()}}function B(t,r){!function(t,r){if(e.length)for(var n=0;nx?(k=f,E="y0",A=x,L="y1"):(k=x,E="y1",A=f,L="y0"),X(n),$(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n),"paper"===i||s.autorange||(l+=i),c.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),W.moveFn="move"===I?J:K,W.altKey=n.altKey)},doneFn:function(){m(t)||(p(e),Q(s),_(e,t,r),n.call("_guiRelayout",t,l.getUpdateObj()))},clickFn:function(){m(t)||Q(s)}};function X(r){if(m(t))I=null;else if(R)I="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=W.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):"move";p(e,l),I=l.split("-")[0]}}function J(n,i){if("path"===r.type){var a=function(t){return t},o=a,l=a;D?B("xanchor",r.xanchor=G(b+n)):(o=function(t){return G(H(t)+n)},N&&"date"===N.type&&(o=v.encodeDate(o))),z?B("yanchor",r.yanchor=Z(T+i)):(l=function(t){return Z(q(t)+i)},U&&"date"===U.type&&(l=v.encodeDate(l))),B("path",r.path=w(O,o,l))}else D?B("xanchor",r.xanchor=G(b+n)):(B("x0",r.x0=G(u+n)),B("x1",r.x1=G(y+n))),z?B("yanchor",r.yanchor=Z(T+i)):(B("y0",r.y0=Z(f+i)),B("y1",r.y1=Z(x+i)));e.attr("d",g(t,r)),$(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;D?B("xanchor",r.xanchor=G(b+n)):(o=function(t){return G(H(t)+n)},N&&"date"===N.type&&(o=v.encodeDate(o))),z?B("yanchor",r.yanchor=Z(T+i)):(l=function(t){return Z(q(t)+i)},U&&"date"===U.type&&(l=v.encodeDate(l))),B("path",r.path=w(O,o,l))}else if(R){if("resize-over-start-point"===I){var c=u+n,h=z?f-i:f+i;B("x0",r.x0=D?c:G(c)),B("y0",r.y0=z?h:Z(h))}else if("resize-over-end-point"===I){var p=y+n,d=z?x-i:x+i;B("x1",r.x1=D?p:G(p)),B("y1",r.y1=z?d:Z(d))}}else{var m=function(t){return-1!==I.indexOf(t)},_=m("n"),j=m("s"),V=m("w"),Y=m("e"),W=_?k+i:k,X=j?A+i:A,J=V?M+n:M,K=Y?S+n:S;z&&(_&&(W=k-i),j&&(X=A-i)),(!z&&X-W>10||z&&W-X>10)&&(B(E,r[E]=z?W:Z(W)),B(L,r[L]=z?X:Z(X))),K-J>10&&(B(C,r[C]=D?J:G(J)),B(P,r[P]=D?K:G(K)))}e.attr("d",g(t,r)),$(s,r)}function $(t,e){(D||z)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=H(D?e.xanchor:i.midRange(r?[e.x0,e.x1]:v.extractPathCoords(e.path,d.paramIsX))),o=q(z?e.yanchor:i.midRange(r?[e.y0,e.y1]:v.extractPathCoords(e.path,d.paramIsY)));if(a=v.roundPositionForSharpStrokeRendering(a,1),o=v.roundPositionForSharpStrokeRendering(o,1),D&&z){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(D){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var u="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",u)}}()}function Q(t){t.selectAll(".visual-cue").remove()}h.init(W),Y.node().onmousemove=X}(t,D,l,e,r,I):!0===l.editable&&D.style("pointer-events",P||u.opacity(S)*M<=.5?"stroke":"all");D.node().addEventListener("click",(function(){return function(t,e){if(x(t)){var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,y(t)}}}(t,D)}))}l._input&&!1!==l.visible&&("below"!==l.layer?k(t._fullLayout._shapeUpperLayer):"paper"===l.xref||"paper"===l.yref?k(t._fullLayout._shapeLowerLayer):b._hadPlotinfo?k((b.mainplotinfo||b).shapelayer):k(t._fullLayout._shapeLowerLayer))}function _(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");c.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){x(t)&&t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,y(t))}t.exports={draw:y,drawOne:b,eraseActiveShape:function(t){if(x(t)){l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e0&&lp&&(t="X"),t}));return a>p&&(d=d.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),c+d}))}(r,s,u);if("pixel"===r.xsizemode){var b=s(r.xanchor);c=b+r.x0,f=b+r.x1}else c=s(r.x0),f=s(r.x1);if("pixel"===r.ysizemode){var _=u(r.yanchor);h=_-r.y0,p=_-r.y1}else h=u(r.y0),p=u(r.y1);if("line"===d)return"M"+c+","+h+"L"+f+","+p;if("rect"===d)return"M"+c+","+h+"H"+f+"V"+p+"H"+c+"Z";var w=(c+f)/2,T=(h+p)/2,k=Math.abs(w-c),A=Math.abs(T-h),M="A"+k+","+A,S=w+k+","+T;return"M"+S+M+" 0 1,1 "+w+","+(T-A)+M+" 0 0,1 "+S+"Z"}},89853:function(t,e,r){"use strict";var n=r(34031);t.exports={moduleType:"component",name:"shapes",layoutAttributes:r(89827),supplyLayoutDefaults:r(84726),supplyDrawNewShapeDefaults:r(45547),includeBasePlot:r(76325)("shapes"),calcAutorange:r(5627),draw:n.draw,drawOne:n.drawOne}},75067:function(t,e,r){"use strict";var n=r(41940),i=r(35025),a=r(1426).extendDeepAll,o=r(30962).overrideAll,s=r(85594),l=r(44467).templatedArray,u=r(98292),c=l("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}});t.exports=o(l("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:c,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:a(i({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:s.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:n({})},font:n({}),activebgcolor:{valType:"color",dflt:u.gripBgActiveColor},bgcolor:{valType:"color",dflt:u.railBgColor},bordercolor:{valType:"color",dflt:u.railBorderColor},borderwidth:{valType:"number",min:0,dflt:u.railBorderWidth},ticklen:{valType:"number",min:0,dflt:u.tickLength},tickcolor:{valType:"color",dflt:u.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:u.minorTickLength}}),"arraydraw","from-root")},98292:function(t){"use strict";t.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}},12343:function(t,e,r){"use strict";var n=r(71828),i=r(85501),a=r(75067),o=r(98292).name,s=a.steps;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}for(var s=i(t,e,{name:"steps",handleItemDefaults:u}),l=0,c=0;c0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function L(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function C(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",f.railTouchRectClass,(function(n){n.call(A,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function P(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}t.exports=function(t){var e=t._context.staticPlot,r=t._fullLayout,a=function(t,e){for(var r=t[f.name],n=[],i=0;i0?[0]:[]);function l(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,g(e))}if(s.enter().append("g").classed(f.containerClassName,!0).style("cursor",e?null:"ew-resize"),s.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(l)})).remove(),0!==a.length){var u=s.selectAll("g."+f.groupClassName).data(a,y);u.enter().append("g").classed(f.groupClassName,!0),u.exit().each(l).remove();for(var c=0;c0||h<0){var m={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr("transform",l(m[0],m[1]))}}}return R.call(F),I&&(E?R.on(".opacity",null):(A=0,M=!0,R.text(m).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),R.call(f.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?o.call("_guiRestyle",t,y,e,x):o.call("_guiRelayout",t,y,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(F)})).on("input",(function(t){this.text(t||" ").call(f.positionText,_.x,_.y)}))),R.classed("js-placeholder",M),T}}},7163:function(t,e,r){"use strict";var n=r(41940),i=r(22399),a=r(1426).extendFlat,o=r(30962).overrideAll,s=r(35025),l=r(44467).templatedArray,u=l("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}});t.exports=o(l("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:u,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:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function(t){"use strict";t.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},64897:function(t,e,r){"use strict";var n=r(71828),i=r(85501),a=r(7163),o=r(75909).name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:u}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function u(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}t.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},13689:function(t,e,r){"use strict";var n=r(39898),i=r(74875),a=r(7901),o=r(91424),s=r(71828),l=r(63893),u=r(44467).arrayEditor,c=r(18783).LINE_SPACING,f=r(75909),h=r(25849);function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function v(t,e,r,n,i,a,o,s){e.active=o,u(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?y(t,n,null,null,e):"dropdown"===e.type&&(i.attr(f.menuIndexAttrName,"-1"),g(t,n,i,a,e),s||y(t,n,i,a,e))}function g(t,e,r,n,i){var a=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,u=i.active,c=i.buttons[u]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(m,i,c,t).call(M,i,h,p),s.ensureSingle(e,"text",f.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on("click",(function(){r.call(S,String(d(r,i)?-1:i._index)),y(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function y(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,u="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,c=r.selectAll("g."+u).data(s.filterVisible(l)),h=c.enter().append("g").classed(u,!0),p=c.exit();"dropdown"===o.type?(h.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,g=0,y=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?g=y.headerHeight+f.gapButtonHeader:d=y.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(g=-f.gapButtonHeader+f.gapButton-y.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-y.openWidth);var b={x:y.lx+d+o.pad.l,y:y.ly+g+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};c.each((function(s,l){var u=n.select(this);u.call(m,o,s,t).call(M,o,b),u.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(v(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(v(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),u.on("mouseover",(function(){u.call(w)})),u.on("mouseout",(function(){u.call(T,o),c.call(_,o)}))})),c.call(_,o),x?(k.w=Math.max(y.openWidth,y.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(y.openHeight,y.headerHeight)),k.direction=o.direction,a&&(c.size()?function(t,e,r,n,i,a){var o,s,l,u=i.direction,c="up"===u||"down"===u,h=i._dims,p=i.active;if(c)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,p);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var u=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),c=0;cw,A=s.barLength+2*s.barPad,M=s.barWidth+2*s.barPad,S=d,E=g+y;E+M>u&&(E=u-M);var L=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);L.exit().on(".drag",null).remove(),L.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=L.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:A,height:M}),this._hbarXMin=S+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>T,P=s.barWidth+2*s.barPad,O=s.barLength+2*s.barPad,I=d+v,D=g;I+P>l&&(I=l-P);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),C?(this.vbar=z.attr({rx:s.barRadius,ry:s.barRadius,x:I,y:D,width:P,height:O}),this._vbarYMin=D+O/2,this._vbarTranslateMax=T-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=c-.5,B=C?f+P+.5:f+.5,N=h-.5,j=k?p+M+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(k||C?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),k||C?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:g,width:v,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||C){var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var H=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(H),C&&this.vbar.on(".drag",null).call(H)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.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)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},18783:function(t){"use strict";t.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"}}},24695:function(t){"use strict";t.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"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",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},22372:function(t){"use strict";t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},31562:function(t){"use strict";t.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"}},74808:function(t){"use strict";t.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function(t){"use strict";t.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]}},87381:function(t){"use strict";t.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},37822:function(t){"use strict";t.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function(t){"use strict";t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},77922:function(t,e){"use strict";e.xmlns="http://www.w3.org/2000/xmlns/",e.svg="http://www.w3.org/2000/svg",e.xlink="http://www.w3.org/1999/xlink",e.svgAttrs={xmlns:e.svg,"xmlns:xlink":e.xlink}},8729:function(t,e,r){"use strict";e.version=r(11506).version,r(7417),r(98847);for(var n=r(73972),i=e.register=n.register,a=r(10641),o=Object.keys(a),s=0;s",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},99863:function(t,e){"use strict";e.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},e.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},e.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},e.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},e.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},e.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},26348:function(t,e,r){"use strict";var n=r(64872),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function u(t,e){return a(e-t,s)}function c(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,u){i=i||0,a=a||0;var c,f,h,p,d,v=l([r,n]);function g(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}v?(c=0,f=o,h=s):r=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},73627:function(t,e){"use strict";var r=Array.isArray,n=ArrayBuffer,i=DataView;function a(t){return n.isView(t)&&!(t instanceof i)}function o(t){return r(t)||a(t)}function s(t,e,r){if(o(t)){if(o(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(f(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if(-1===(n.extras||[]).indexOf(t))if("string"==typeof t){for(var i=t.split("+"),a=0;a=n&&t<=i?t:c}if("string"!=typeof t&&"number"!=typeof t)return c;t=String(t);var u=_(r),y=t.charAt(0);!u||"G"!==y&&"g"!==y||(t=t.substr(1),r="");var w=u&&"chinese"===r.substr(0,7),T=t.match(w?x:m);if(!T)return c;var k=T[1],A=T[3]||"1",M=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),L=Number(T[11]||0);if(u){if(2===k.length)return c;var C;k=Number(k);try{var P=g.getComponentMethod("calendars","getCal")(r);if(w){var O="i"===A.charAt(A.length-1);A=parseInt(A,10),C=P.newDate(k,P.toMonthIndex(k,A,O),M)}else C=P.newDate(k,Number(A),M)}catch(t){return c}return C?(C.toJD()-v)*f+S*h+E*p+L*d:c}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),A-=1;var I=new Date(Date.UTC(2e3,A,M,S,E));return I.setUTCFullYear(k),I.getUTCMonth()!==A||I.getUTCDate()!==M?c:I.getTime()+L*d},n=e.MIN_MS=e.dateTime2ms("-9999"),i=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==c};var T=90*f,k=3*h,A=5*p;function M(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+="."+w(i,a)}return t}e.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return c;e||(e=0);var a,o,s,u,m,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+v,E=Math.floor(l(t,f));try{a=g.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=y("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e=n+f&&t<=i-f))return c;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return M(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},e.cleanDate=function(t,r,n){if(t===c)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return s.error("unrecognized date",t),r;return t};var S=/%\d?f/g,E=/%h/g,L={1:"1",2:"1",3:"2",4:"2"};function C(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(t=t.replace(E,(function(){return L[r("%q")(i)]})),_(n))try{t=g.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var P=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if("y"===r)e=a.year;else if("m"===r)e=a.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),P[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+C(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return C(e,t,n,i)};var O=3*f;e.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+v,a=g.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-v)*f+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var u=new Date(t+O);return u.setUTCMonth(u.getUTCMonth()+e)+n-O},e.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,u=_(e)&&g.getComponentMethod("calendars","getCal")(e),c=0;c0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===u(t))e=t;else for(e=new Array(t.length),i=0;ie?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case"MultiPolygon":for(r=0;ri&&(i=u,e=l)}else e=r;return o.default(e).geometry.coordinates}(c),n.fIn=t,n.fOut=c,s.push(c)}else u.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++}),50)}))}for(var o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},e.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},e.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r1||v<0||v>1?null:{x:t+l*v,y:e+f*v}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}e.segmentsIntersect=s,e.segmentDistance=function(t,e,r,n,i,a,o,u){if(s(t,e,r,n,i,a,o,u))return 0;var c=r-t,f=n-e,h=o-i,p=u-a,d=c*c+f*f,v=h*h+p*p,g=Math.min(l(c,f,d,i-t,a-e),l(c,f,d,o-t,u-e),l(h,p,v,t-i,e-a),l(h,p,v,r-i,n-a));return Math.sqrt(g)},e.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),u=t.getPointAtLength(o(r+s/2,e)),c=Math.atan((u.y-l.y)/(u.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+u.x)/6,y:(4*f.y+l.y+u.y)/6,theta:c};return n[r]=h,h},e.clearLocationCache=function(){i=null},e.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,u=0,c=t.getTotalLength(),f=c;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===c&&(i=r);var u=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(u*u+f*f)}for(var p=h(u);p;){if((u+=p+r)>f)return;p=h(u)}for(p=h(f);p;){if(u>(f-=p+r))return;p=h(f)}return{min:u,max:f,len:f-u,total:c,isClosed:0===u&&f===c&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},e.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,u=n.iterationLimit||30,c=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f0?p=i:h=i,f++}return a}},81697:function(t,e,r){"use strict";var n=r(92770),i=r(84267),a=r(25075),o=r(21081),s=r(22399).defaultLine,l=r(73627).isArrayOrTypedArray,u=a(s);function c(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return u;var e=a(t);return e.length?e:u}function h(t){return n(t)?t:1}t.exports={formatColor:function(t,e,r){var n,i,s,p,d,v=t.color,g=l(v),y=l(e),m=o.extractOpts(t),x=[];if(n=void 0!==m.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=g?function(t,e){return void 0===t[e]?u:a(n(t[e]))}:f,s=y?function(t,e){return void 0===t[e]?1:h(t[e])}:h,g||y)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},71828:function(t,e,r){"use strict";var n=r(39898),i=r(84096).g0,a=r(60721).WU,o=r(92770),s=r(50606),l=s.FP_SAFE,u=-l,c=s.BADNUM,f=t.exports={};f.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:"0.f"===t?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var h={};f.warnBadFormat=function(t){var e=String(t);h[e]||(h[e]=1,f.warn('encountered bad format: "'+e+'"'))},f.noFormat=function(t){return String(t)},f.numberFormat=function(t){var e;try{e=a(f.adjustFormat(t))}catch(e){return f.warnBadFormat(t),f.noFormat}return e},f.nestedProperty=r(65487),f.keyedContainer=r(66636),f.relativeAttr=r(6962),f.isPlainObject=r(41965),f.toLogRange=r(58163),f.relinkPrivateKeys=r(51332);var p=r(73627);f.isTypedArray=p.isTypedArray,f.isArrayOrTypedArray=p.isArrayOrTypedArray,f.isArray1D=p.isArray1D,f.ensureArray=p.ensureArray,f.concat=p.concat,f.maxRowLength=p.maxRowLength,f.minRowLength=p.minRowLength;var d=r(64872);f.mod=d.mod,f.modHalf=d.modHalf;var v=r(96554);f.valObjectMeta=v.valObjectMeta,f.coerce=v.coerce,f.coerce2=v.coerce2,f.coerceFont=v.coerceFont,f.coercePattern=v.coercePattern,f.coerceHoverinfo=v.coerceHoverinfo,f.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,f.validate=v.validate;var g=r(41631);f.dateTime2ms=g.dateTime2ms,f.isDateTime=g.isDateTime,f.ms2DateTime=g.ms2DateTime,f.ms2DateTimeLocal=g.ms2DateTimeLocal,f.cleanDate=g.cleanDate,f.isJSDate=g.isJSDate,f.formatDate=g.formatDate,f.incrementMonth=g.incrementMonth,f.dateTick0=g.dateTick0,f.dfltRange=g.dfltRange,f.findExactDates=g.findExactDates,f.MIN_MS=g.MIN_MS,f.MAX_MS=g.MAX_MS;var y=r(65888);f.findBin=y.findBin,f.sorterAsc=y.sorterAsc,f.sorterDes=y.sorterDes,f.distinctVals=y.distinctVals,f.roundUp=y.roundUp,f.sort=y.sort,f.findIndexOfMin=y.findIndexOfMin,f.sortObjectKeys=r(78607);var m=r(80038);f.aggNums=m.aggNums,f.len=m.len,f.mean=m.mean,f.median=m.median,f.midRange=m.midRange,f.variance=m.variance,f.stdev=m.stdev,f.interp=m.interp;var x=r(35657);f.init2dArray=x.init2dArray,f.transposeRagged=x.transposeRagged,f.dot=x.dot,f.translationMatrix=x.translationMatrix,f.rotationMatrix=x.rotationMatrix,f.rotationXYMatrix=x.rotationXYMatrix,f.apply3DTransform=x.apply3DTransform,f.apply2DTransform=x.apply2DTransform,f.apply2DTransform2=x.apply2DTransform2,f.convertCssMatrix=x.convertCssMatrix,f.inverseTransformMatrix=x.inverseTransformMatrix;var b=r(26348);f.deg2rad=b.deg2rad,f.rad2deg=b.rad2deg,f.angleDelta=b.angleDelta,f.angleDist=b.angleDist,f.isFullCircle=b.isFullCircle,f.isAngleInsideSector=b.isAngleInsideSector,f.isPtInsideSector=b.isPtInsideSector,f.pathArc=b.pathArc,f.pathSector=b.pathSector,f.pathAnnulus=b.pathAnnulus;var _=r(99863);f.isLeftAnchor=_.isLeftAnchor,f.isCenterAnchor=_.isCenterAnchor,f.isRightAnchor=_.isRightAnchor,f.isTopAnchor=_.isTopAnchor,f.isMiddleAnchor=_.isMiddleAnchor,f.isBottomAnchor=_.isBottomAnchor;var w=r(87642);f.segmentsIntersect=w.segmentsIntersect,f.segmentDistance=w.segmentDistance,f.getTextLocation=w.getTextLocation,f.clearLocationCache=w.clearLocationCache,f.getVisibleSegment=w.getVisibleSegment,f.findPointOnPath=w.findPointOnPath;var T=r(1426);f.extendFlat=T.extendFlat,f.extendDeep=T.extendDeep,f.extendDeepAll=T.extendDeepAll,f.extendDeepNoArrays=T.extendDeepNoArrays;var k=r(47769);f.log=k.log,f.warn=k.warn,f.error=k.error;var A=r(30587);f.counterRegex=A.counter;var M=r(79990);f.throttle=M.throttle,f.throttleDone=M.done,f.clearThrottle=M.clear;var S=r(24401);function E(t){var e={};for(var r in t)for(var n=t[r],i=0;il||t=e)&&o(t)&&t>=0&&t%1==0},f.noop=r(64213),f.identity=r(23389),f.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},f.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},f.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(f.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},f.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},f.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,u=new Array(l),c=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*u[n];c[r]=a}return c},f.syncOrAsync=function(t,e,r){var n;function i(){return f.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i);return r&&r(e)},f.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},f.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},f.fillArray=function(t,e,r,n){if(n=n||f.identity,f.isArrayOrTypedArray(t))for(var i=0;i1?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},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var D=/^\w*$/;f.templateString=function(t,e){var r={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,n){var i;return D.test(n)?i=e[n]:(r[n]=r[n]||f.nestedProperty(e,n).get,i=r[n]()),f.isValidTextValue(i)?i:""}))};var z={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=function(){return B.apply(z,arguments)};var R={max:10,count:0,name:"texttemplate"};f.texttemplateString=function(){return B.apply(R,arguments)};var F=/^[:|\|]/;function B(t,e,r){var n=this,a=arguments;e||(e={});var o={};return t.replace(f.TEMPLATE_STRING_REGEX,(function(t,s,l){var u,c,h,p="_xother"===s||"_yother"===s,d="_xother_"===s||"_yother_"===s,v="xother_"===s||"yother_"===s,g="xother"===s||"yother"===s||p||v||d,y=s;if((p||d)&&(y=y.substring(1)),(v||d)&&(y=y.substring(0,y.length-1)),g){if(void 0===(u=e[y]))return""}else for(h=3;h=48&&o<=57,u=s>=48&&s<=57;if(l&&(n=10*n+o-48),u&&(i=10*i+s-48),!l||!u){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var N=2e9;f.seedPseudoRandom=function(){N=2e9},f.pseudoRandom=function(){var t=N;return N=(69069*N+1)%4294967296,Math.abs(N-t)<429496729?f.pseudoRandom():N/4294967296},f.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=f.extractOption(t,e,"htx","hovertext");if(f.isValidTextValue(i))return n(i);var a=f.extractOption(t,e,"tx","text");return f.isValidTextValue(a)?n(a):void 0},f.isValidTextValue=function(t){return t||0===t},f.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(u=1):u=0,f.strTranslate(i-u*(r+o),a-u*(n+s))+f.strScale(u)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},f.setTransormAndDisplay=function(t,e){t.attr("transform",f.getTextTransform(e)),t.style("display",e.scale?null:"none")},f.ensureUniformFontSize=function(t,e){var r=f.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},f.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)},f.bigFont=function(t){return Math.round(1.2*t)};var j=f.getFirefoxVersion(),U=null!==j&&j<86;f.getPositionFromD3Event=function(){return U?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}},41965:function(t){"use strict";t.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}},66636:function(t,e,r){"use strict";var n=r(65487),i=/^\w*$/;t.exports=function(t,e,r,a){var o,s,l;r=r||"name",a=a||"value";var u={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var c={};if(s)for(o=0;o2)return u[e]=2|u[e],h.set(t,null);if(f){for(o=e;o1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},77310:function(t,e,r){"use strict";var n=r(39898);t.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][a]=n.select(this)})),i}},35657:function(t,e,r){"use strict";var n=r(79576);e.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},65487:function(t,e,r){"use strict";var n=r(92770),i=r(73627).isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,u=t;for(s=0;s/g),l=0;la||u===i||us||e&&l(t))}:function(t,e){var l=t[0],u=t[1];if(l===i||la||u===i||us)return!1;var c,f,h,p,d,v=r.length,g=r[0][0],y=r[0][1],m=0;for(c=1;cMath.max(f,g)||u>Math.max(h,y)))if(uc||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var u=l+1;u1&&o(t.pop()),{addPt:o,raw:t,filtered:r}}},79749:function(t,e,r){"use strict";var n=r(58617),i=r(98580);t.exports=function(t,e,a){var o=t._fullLayout,s=!0;return o._glcanvas.each((function(n){if(n.regl)n.regl.preloadCachedCode(a);else if(!n.pick||o._has("parcoords")){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.g.devicePixelRatio,extensions:e||[],cachedCode:a||{}})}catch(t){s=!1}n.regl||(s=!1),s&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),s||n({container:o._glcontainer.node()}),s}},45142:function(t,e,r){"use strict";var n=r(92770),i=r(35791);t.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;return"undefined"!=typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(" "),o=1;o-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var u=l.substr(8).split(".")[0];if(n(u)&&(u=+u),u>=13)return!0}}return r}},75138:function(t){"use strict";t.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function f(t,e){return t>=e}e.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-s)-1:Math.floor((t-e.start)/e.size+s);var a,o,h=0,p=e.length,d=0,v=p>1?(e[p-1]-e[0])/(p-1):1;for(o=v>=0?r?l:u:r?f:c,t+=v*s*(r?-1:1)*(v>=0?1:-1);h90&&i.log("Long binary search..."),h-1},e.sorterAsc=function(t,e){return t-e},e.sorterDes=function(t,e){return e-t},e.distinctVals=function(t){var r,n=t.slice();for(n.sort(e.sorterAsc),r=n.length-1;r>-1&&n[r]===o;r--);for(var i,a=n[r]-n[0]||1,s=a/(r||1)/1e4,l=[],u=0;u<=r;u++){var c=n[u],f=c-i;void 0===i?(l.push(c),i=c):f>s&&(a=Math.min(a,f),l.push(c),i=c)}return{vals:l,minDiff:a}},e.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},e.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;ia.length)&&(o=a.length),n(r)||(r=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},78614:function(t,e,r){"use strict";var n=r(25075);t.exports=function(t){return t?n(t):[0,0,0,1]}},63893:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=i.strTranslate,o=r(77922),s=r(18783).LINE_SPACING,l=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;e.convertToTspans=function(t,r,g){var S=t.text(),E=!t.attr("data-notex")&&r&&r._context.typesetMath&&"undefined"!=typeof MathJax&&S.match(l),P=n.select(t.node().parentNode);if(!P.empty()){var O=t.attr("class")?t.attr("class").split(" ")[0]:"text";return O+="-math",P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove(),t.style("display",null).attr({"data-unformatted":S,"data-math":"N"}),E?(r&&r._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l,h=parseInt((MathJax.version||"").split(".")[0]);if(2===h||3===h){var p=function(){var r="math-output-"+i.randstr({},64),a=(l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute","font-size":e.fontSize+"px"}).text(t.replace(u,"\\lt ").replace(c,"\\gt "))).node();return 2===h?MathJax.Hub.Typeset(a):MathJax.typeset([a])},d=function(){var e=l.select(2===h?".MathJax_SVG":".MathJax"),a=!e.empty()&&l.select("svg").node();if(a){var o,s=a.getBoundingClientRect();o=2===h?n.select("body").select("#MathJax_SVG_glyphs"):e.select("defs"),r(e,o,s)}else i.log("There was an error in the tex syntax.",t),r();l.remove()};2===h?MathJax.Hub.Queue((function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:f},displayAlign:"left"})}),(function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),p,d,(function(){if("SVG"!==a)return MathJax.Hub.setRenderer(a)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)})):3===h&&(o=i.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=f,"svg"!==(a=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then((function(){p(),d(),"svg"!==a&&(MathJax.config.startup.output=a),MathJax.config=o})))}else i.warn("No MathJax version:",MathJax.version)}(E[2],o,(function(n,i,o){P.selectAll("svg."+O).remove(),P.selectAll("g."+O+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return I(),void e();var l=P.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":S,"data-math":"Y"});l.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild);var u=o.width,c=o.height;s.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var f=t.node().style.fill||"black",h=s.select("g");h.attr({fill:f,stroke:f});var p=h.node().getBoundingClientRect(),d=p.width,v=p.height;(d>u||v>c)&&(s.style("overflow","hidden"),d=(p=s.node().getBoundingClientRect()).width,v=p.height);var y=+t.attr("x"),m=+t.attr("y"),x=-(r||t.node().getBoundingClientRect().height)/4;if("y"===O[0])l.attr({transform:"rotate("+[-90,y,m]+")"+a(-d/2,x-v/2)});else if("l"===O[0])m=x-v/2;else if("a"===O[0]&&0!==O.indexOf("atitle"))y=0,m=x;else{var b=t.attr("text-anchor");y-=d*("middle"===b?.5:"end"===b?1:0),m=m+x-v/2}s.attr({x:y,y:m}),g&&g.call(t,l),e(l)}))}))):I(),t}function I(){P.empty()||(O=t.attr("class")+"-math",P.select("svg."+O).remove()),t.text("").style("white-space","pre");var r=function(t,e){e=e.replace(y," ");var r,a=!1,l=[],u=-1;function c(){u++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:u*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}b.test(e)?c():(r=t,l=[{node:t}]);for(var E=e.split(m),P=0;P|>|>)/g,f=[["$","$"],["\\(","\\)"]],h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},v="​",g=["http:","https:","mailto:","",void 0,":"],y=e.NEWLINES=/(\r\n?|\n)/g,m=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,b=//i;e.BR_TAG_ALL=//gi;var _=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,w=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,T=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,k=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function A(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&L(n)}var M=/(^|;)\s*color:/;e.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i="...".length,a=t.split(m),o=[],s="",l=0,u=0;ui?o.push(c.substr(0,d-i)+"..."):o.push(c.substr(0,d));break}s=""}}return o.join("")};var S={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},E=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function L(t){return t.replace(E,(function(t,e){return("#"===e.charAt(0)?function(t){if(!(t>1114111)){var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):S[e])||t}))}function C(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(a)?e:""}function P(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",u=t.node().getBoundingClientRect(),c=e.node().getBoundingClientRect();return a="bottom"===l?function(){return u.bottom-n.height}:"middle"===l?function(){return u.top+(u.height-n.height)/2}:function(){return u.top},o="right"===s?function(){return u.right-n.width}:"center"===s?function(){return u.left+(u.width-n.width)/2}:function(){return u.left},function(){n=this.node().getBoundingClientRect();var t=o()-c.left,e=a()-c.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}e.convertEntities=L,e.sanitizeHTML=function(t){t=t.replace(y," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(m),o=0;oa.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},e.done=function(t){var e=r[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},e.clear=function(t){if(t)n(r[t]),delete r[t];else for(var i in r)e.clear(i)}},58163:function(t,e,r){"use strict";var n=r(92770);t.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},90973:function(t,e,r){"use strict";var n=t.exports={},i=r(78776).locationmodeToLayer,a=r(96892).zL;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},37815:function(t){"use strict";t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function(t){"use strict";t.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"}}},14458:function(t,e,r){"use strict";var n=r(73972);t.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},e.cleanLayout=function(t){var r,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,v=Object.keys(t);for(r=0;r3?(I.x=1.02,I.xanchor="left"):I.x<-2&&(I.x=-.02,I.xanchor="right"),I.y>3?(I.y=1.02,I.yanchor="bottom"):I.y<-2&&(I.y=-.02,I.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),u.clean(t),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var r=0;r0)return t.substr(0,e)}e.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=["x","y","z"];e.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn("Full array edits are incompatible with other edits",f);var m=r[""][""];if(u(m))e.set(null);else{if(!Array.isArray(m))return a.warn("Unrecognized full array edit value",f,m),!0;e.set(m)}return!v&&(h(g,y),p(t),!0)}var x,b,_,w,T,k,A,M,S=Object.keys(r).map(Number).sort(o),E=e.get(),L=E||[],C=c(y,f).get(),P=[],O=-1,I=L.length;for(x=0;xL.length-(A?0:1))a.warn("index out of range",f,_);else if(void 0!==k)T.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),u(k)?P.push(_):A?("add"===k&&(k={}),L.splice(_,0,k),C&&C.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,k),-1===O&&(O=_);else for(b=0;b=0;x--)L.splice(P[x],1),C&&C.splice(P[x],1);if(L.length?E||e.set(L):e.set(null),v)return!1;if(h(g,y),d!==i){var D;if(-1===O)D=S;else{for(I=Math.max(L.length,I),D=[],x=0;x=O);x++)D.push(_);for(x=O;x=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function O(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),P(t,e,"currentIndices"),void 0===r||Array.isArray(r)||(r=[r]),void 0!==r&&P(t,r,"newIndices"),void 0!==r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function I(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if(void 0===r)throw new Error("indices must be an integer or array of integers");for(var a in P(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,u,c,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=C(r,t.data.length-1),e)for(var v=0;v-1&&-1===r.indexOf("grouptitlefont")?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function U(t,e,r){t=o.getGraphDiv(t),_.clearPromiseQueue(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Y(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(w.layoutReplot):Object.keys(n).length&&(V(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(w.doLegend),a.layoutstyle&&s.push(w.layoutStyles),a.axrange&&H(s,i.rangesAltered),a.ticks&&s.push(w.doTicksRelayout),a.modebar&&s.push(w.doModeBar),a.camera&&s.push(w.doCamera),a.colorbars&&s.push(w.doColorBars),s.push(M)),s.push(h.rehover,h.redrag,h.reselect),u.add(t,U,[t,i.undoit],U,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function V(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if("axrange"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=p.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var u in l._matchGroup)if(u!==a){var c=n[p.id2name(u)];c.autorange=l.autorange,c.range=l.range.slice(),c._input.range=l.range.slice()}}return!0}function H(t,e){var r=e?function(t){var r=[];for(var n in e){var i=p.getFromId(t,n);if(r.push(n),-1!==(i.ticklabelposition||"").indexOf("inside")&&i._anchorAxis&&r.push(i._anchorAxis._id),i._matchGroup)for(var a in i._matchGroup)e[a]||r.push(a)}return p.draw(t,r,{skipTitle:!0})}:function(t){return p.draw(t,"redraw")};t.push(m,w.doAutoRangeAndConstraints,r,w.drawData,w.finalDraw)}var q=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,G=/^[xyz]axis[0-9]*\.autorange$/,Z=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Y(t,e){var r,n,i,a=t.layout,l=t._fullLayout,u=l._guiEditing,h=F(l._preGUI,u),d=Object.keys(e),v=p.list(t),g=o.extendDeepAll({},e),y={};for(j(e),d=Object.keys(e),n=0;n0&&"string"!=typeof I.parts[z];)z--;var B=I.parts[z],N=I.parts[z-1]+"."+B,U=I.parts.slice(0,z).join("."),V=s(t.layout,U).get(),H=s(l,U).get(),Y=I.get();if(void 0!==D){M[O]=D,S[O]="reverse"===B?D:R(Y);var X=f.getLayoutValObject(l,I.parts);if(X&&X.impliedEdits&&null!==D)for(var J in X.impliedEdits)E(o.relativeAttr(O,J),X.impliedEdits[J]);if(-1!==["width","height"].indexOf(O))if(D){E("autosize",null);var K="height"===O?"width":"height";E(K,l[K])}else l[O]=t._initialAutoSize[O];else if("autosize"===O)E("width",D?null:l.width),E("height",D?null:l.height);else if(N.match(q))P(N),s(l,U+"._inputRange").set(null);else if(N.match(G)){P(N),s(l,U+"._inputRange").set(null);var $=s(l,U).get();$._inputDomain&&($._input.domain=$._inputDomain.slice())}else N.match(Z)&&s(l,U+"._inputDomain").set(null);if("type"===B){L=V;var Q="linear"===H.type&&"log"===D,tt="log"===H.type&&"linear"===D;if(Q||tt){if(L&&L.range)if(H.autorange)Q&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var et=L.range[0],rt=L.range[1];Q?(et<=0&&rt<=0&&E(U+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(U+".range[0]",Math.log(et)/Math.LN10),E(U+".range[1]",Math.log(rt)/Math.LN10)):(E(U+".range[0]",Math.pow(10,et)),E(U+".range[1]",Math.pow(10,rt)))}else E(U+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[I.parts[0]]&&"radialaxis"===I.parts[1]&&delete l[I.parts[0]]._subplot.viewInitial["radialaxis.range"],c.getComponentMethod("annotations","convertCoords")(t,H,D,E),c.getComponentMethod("images","convertCoords")(t,H,D,E)}else E(U+".autorange",!0),E(U+".range",null);s(l,U+"._inputRange").set(null)}else if(B.match(k)){var nt=s(l,O).get(),it=(D||{}).type;it&&"-"!==it||(it="linear"),c.getComponentMethod("annotations","convertCoords")(t,nt,it,E),c.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=b.containerArrayMatch(O);if(at){r=at.array,n=at.index;var ot=at.property,st=X||{editType:"calc"};""!==n&&""===ot&&(b.isAddVal(D)?S[O]=null:b.isRemoveVal(D)?S[O]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),T.update(A,st),y[r]||(y[r]={});var lt=y[r][n];lt||(lt=y[r][n]={}),lt[ot]=D,delete e[O]}else"reverse"===B?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),H.autorange?A.calc=!0:A.plot=!0):("dragmode"===O&&(!1===D&&!1!==Y||!1!==D&&!1===Y)||l._has("scatter-like")&&l._has("regl")&&"dragmode"===O&&("lasso"===D||"select"===D)&&"lasso"!==Y&&"select"!==Y||l._has("gl2d")?A.plot=!0:X?T.update(A,X):A.calc=!0,I.set(D))}}for(r in y)b.applyContainerArrayChanges(t,h(a,r),y[r],A,h)||(A.plot=!0);for(var ut in C){var ct=(L=p.getFromId(t,ut))&&L._constraintGroup;if(ct)for(var ft in A.calc=!0,ct)C[ft]||(p.getFromId(t,ft)._constraintShrinkable=!0)}return(W(t)||e.height||e.width)&&(A.plot=!0),(A.plot||A.calc)&&(A.layoutReplot=!0),{flags:A,rangesAltered:C,undoit:S,redoit:M,eventData:g}}function W(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function X(t,r,n,i){t=o.getGraphDiv(t),_.clearPromiseQueue(t),o.isPlainObject(r)||(r={}),o.isPlainObject(n)||(n={}),Object.keys(r).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=_.coerceTraceIndices(t,i),s=N(t,o.extendFlat({},r),a),l=s.flags,c=Y(t,o.extendFlat({},n)),f=c.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&_.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(w.layoutReplot):l.fullReplot?p.push(e._doPlot):(p.push(h.previousPromises),V(t,f,c)||h.supplyDefaults(t),l.style&&p.push(w.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(w.doColorBars),f.legend&&p.push(w.doLegend),f.layoutstyle&&p.push(w.layoutStyles),f.axrange&&H(p,c.rangesAltered),f.ticks&&p.push(w.doTicksRelayout),f.modebar&&p.push(w.doModeBar),f.camera&&p.push(w.doCamera),p.push(M)),p.push(h.rehover,h.redrag,h.reselect),u.add(t,X,[t,s.undoit,c.undoit,s.traces],X,[t,s.redoit,c.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit("plotly_update",{data:s.eventData,layout:c.eventData}),t}))}function J(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var K=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],$=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function Q(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function et(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function u(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,c){function f(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,_.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()};e()}var p,d,v=0;function g(t){return Array.isArray(i)?v>=i.length?t.transitionOpts=i[v]:t.transitionOpts=i[0]:t.transitionOpts=i,v++,t}var y=[],m=null==e,x=Array.isArray(e);if(m||x||!o.isPlainObject(e)){if(m||-1!==["string","number"].indexOf(typeof e))for(p=0;p0&&TT)&&k.push(d);y=k}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var v=e[n].name,g=(c[v]||d[v]||{}).name,y=e[n].name,m=c[g]||d[g];g&&y&&"number"==typeof y&&m&&A<5&&(A++,o.warn('addFrames: overwriting frame "'+(c[g]||d[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[v]={name:v},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;c[i.name="frame "+t._transitionData._counter++];);if(c[i.name]){for(a=0;a=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,c=h.modifyFrames,f=[t,s],p=[t,a];return u&&u.add(t,l,f,c,p),h.modifyFrames(t,a)},e.addTraces=function t(r,n,i){r=o.getGraphDiv(r);var a,s,l=[],c=e.deleteTraces,f=t,h=[r,l],p=[r,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if(void 0===e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in f(r,o),n.subplotsRegistry)if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[u].type]||{}).attributes)&&r[e[2]],s=3}else{var c=t._module;if(c||(c=(n.modules[t.type||a.type.dflt]||{})._module),!c)return!1;if(!(i=(r=c.attributes)&&r[o])){var f=c.basePlotModule;f&&f.attributes&&(i=f.attributes[o])}i||(i=a[o])}return b(i,e,s)},e.getLayoutValObject=function(t,e){var r=function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var u;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+"["+a+"]";function u(){s={},o&&(s[l]={},s[l].templateitemname=o)}function c(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+"."+t]=e}function f(){var t=s;return u(),t}return u(),{modifyBase:function(t,e){s[t]=e},modifyItem:c,getUpdateObj:f,applyUpdate:function(e,r){e&&c(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},61549:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(74875),o=r(71828),s=r(33306),l=r(7901),u=r(91424),c=r(92998),f=r(64168),h=r(89298),p=r(18783),d=r(99082),v=d.enforce,g=d.clean,y=r(71739).doAutoRange,m="start";function x(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&a[0]e[0])return!0}return!1}function b(t){var r,i,s,c,d,v,g=t._fullLayout,y=g._size,m=y.p,b=h.list(t,"",!0);if(g._paperdiv.style({width:t._context.responsive&&g.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":g.width+"px",height:t._context.responsive&&g.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":g.height+"px"}).selectAll(".main-svg").call(u.setSize,g.width,g.height),t._context.setBackground(t,g.paper_bgcolor),e.drawMainTitle(t),f.manage(t),!g._has("cartesian"))return a.previousPromises(t);function w(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-m-n:e._offset+e._length+m+n:y.t+y.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+m+n:e._offset-m-n:y.l+y.w*(t.position||0)+n%1}for(r=0;rT?c.push({code:"unused",traceType:m,templateCount:w,dataCount:T}):T>w&&c.push({code:"reused",traceType:m,templateCount:w,dataCount:T})}}else c.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=v(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&c.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&g(a)&&t(a,o)}}({data:p,layout:h},""),c.length)return c.map(y)}},403:function(t,e,r){"use strict";var n=r(92770),i=r(72391),a=r(74875),o=r(71828),s=r(25095),l=r(5900),u=r(70942),c=r(11506).version,f={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}};t.exports=function(t,e){var r,h,p,d;function v(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!v("width")&&null!==e.width||!v("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!v("format"))throw new Error("Export format is not "+o.join2(f.format.values,", "," or ")+".");var g={};function y(t,r){return o.coerce(e,g,f,t,r)}var m=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var A=o.extendFlat({},h);x?A.width=x:null===e.width&&n(d.width)&&(A.width=d.width),b?A.height=b:null===e.height&&n(d.height)&&(A.height=d.height);var M=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function L(){return new Promise((function(t,e){var r=l(k,m,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if("full-json"===m){var p=a.graphJson(k,!1,"keepdata","object",!0,!0);return p.version=c,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),"svg"===m)return t(T?r:s.encodeSVG(r));var d=document.createElement("canvas");d.id=o.randstr(),u({format:m,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.newPlot(k,r,A,M).then(S).then(E).then(L).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},84936:function(t,e,r){"use strict";var n=r(71828),i=r(74875),a=r(86281),o=r(72075).dfltConfig,s=n.isPlainObject,l=Array.isArray,u=n.isArrayOrTypedArray;function c(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;hx.length&&i.push(d("unused",a,y.concat(x.length)));var A,M,S,E,L,C=x.length,P=Array.isArray(k);if(P&&(C=Math.min(C,k.length)),2===b.dimensions)for(M=0;Mx[M].length&&i.push(d("unused",a,y.concat(M,x[M].length)));var O=x[M].length;for(A=0;A<(P?Math.min(O,k[M].length):O);A++)S=P?k[M][A]:k,E=m[M][A],L=x[M][A],n.validate(E,S)?L!==E&&L!==+E&&i.push(d("dynamic",a,y.concat(M,A),E,L)):i.push(d("value",a,y.concat(M,A),E))}else i.push(d("array",a,y.concat(M),m[M]));else for(M=0;M1&&p.push(d("object","layout"))),i.supplyDefaults(v);for(var g=v._fullData,y=r.length,m=0;m0&&Math.round(f)===f))return{vals:i};u=f}for(var h=e.calendar,p="start"===l,d="end"===l,v=t[r+"period0"],g=a(v,h)||0,y=[],m=[],x=[],b=i.length,_=0;_A;)k=o(k,-u,h);for(;k<=A;)k=o(k,u,h);T=o(k,-u,h)}else{for(k=g+(w=Math.round((A-g)/c))*c;k>A;)k-=c;for(;k<=A;)k+=c;T=k-c}y[_]=p?T:d?k:(T+k)/2,m[_]=T,x[_]=k}return{vals:y,starts:m,ends:x}}},89502:function(t){"use strict";t.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(71828),o=r(50606).FP_SAFE,s=r(73972),l=r(91424),u=r(41675),c=u.getFromId,f=u.isLinked;function h(t,e){var r,n,i=[],o=t._fullLayout,s=d(o,e,0),l=d(o,e,1),u=v(t,e),c=u.min,f=u.max;if(0===c.length||0===f.length)return a.simpleMap(e.range,e.r2l);var h=c[0].val,g=f[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>L?k/T>C&&(_=x,w=b,C=k/T):k/E>C&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},C=k/E));if(h===g){var P=h-1,O=h+1;if(M)if(0===h)i=[0,1];else{var I=(h>0?f:c).reduce((function(t,e){return Math.max(t,l(e))}),0),D=h/(1-Math.min(.5,I/E));i=h>0?[0,D]:[D,0]}else i=S?[Math.max(0,P),Math.max(1,O)]:[P,O]}else M?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-C*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),C=(w.val-_.val-p(e,x.val,b.val))/(E-s(_)-l(w)),i=[_.val-C*s(_),w.val+C*l(w)];return y&&i.reverse(),a.simpleMap(i,e.l2r||Number)}function p(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a=r&&(u.extrapad||!o)){s=!1;break}i(e,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(t.splice(l,1),l--)}if(s){var c=a&&0===e;t.push({val:e,pad:c?0:r,extrapad:!c&&o})}}function x(t){return i(t)&&Math.abs(t)=e}t.exports={getAutoRange:h,makePadFn:d,doAutoRange:function(t,e,r){if(e.setScale(),e.autorange){e.range=r?r.slice():h(t,e),e._r=e.range.slice(),e._rl=a.simpleMap(e._r,e.r2l);var n=e._input,i={};i[e._attr+".range"]=e.range,i[e._attr+".autorange"]=e.autorange,s.call("_storeDirectGUIEdit",t.layout,t._fullLayout._preGUI,i),n.range=e.range.slice(),n.autorange=e.autorange}var o=e._anchorAxis;if(o&&o.rangeslider){var l=o.rangeslider[e._name];l&&"auto"===l.rangemode&&(l.range=h(t,e)),o._input.rangeslider[e._name]=a.extendFlat({},l)}},findExtremes:function(t,e,r){r||(r={}),t._m||t.setScale();var n,a,s,l,u,c,f,h,p,d=[],v=[],m=e.length,b=r.padded||!1,_=r.tozero&&("linear"===t.type||"-"===t.type),w="log"===t.type,T=!1,k=r.vpadLinearized||!1;function A(t){if(Array.isArray(t))return T=!0,function(e){return Math.max(Number(t[e]||0),0)};var e=Math.max(Number(t||0),0);return function(){return e}}var M=A((t._m>0?r.ppadplus:r.ppadminus)||r.ppad||0),S=A((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(n=0;n0&&(h=a),a>p&&a-o&&(h=a),a>p&&a=O;n--)P(n);return{min:d,max:v,opts:r}},concatExtremes:v}},89298:function(t,e,r){"use strict";var n=r(39898),i=r(92770),a=r(74875),o=r(73972),s=r(71828),l=s.strTranslate,u=r(63893),c=r(92998),f=r(7901),h=r(91424),p=r(13838),d=r(66287),v=r(50606),g=v.ONEMAXYEAR,y=v.ONEAVGYEAR,m=v.ONEMINYEAR,x=v.ONEMAXQUARTER,b=v.ONEAVGQUARTER,_=v.ONEMINQUARTER,w=v.ONEMAXMONTH,T=v.ONEAVGMONTH,k=v.ONEMINMONTH,A=v.ONEWEEK,M=v.ONEDAY,S=M/2,E=v.ONEHOUR,L=v.ONEMIN,C=v.ONESEC,P=v.MINUS_SIGN,O=v.BADNUM,I={K:"zeroline"},D={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},R={K:"tick",L:"path"},F={K:"tick",L:"text"},B={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},N=r(18783),j=N.MID_SHIFT,U=N.CAP_SHIFT,V=N.LINE_SPACING,H=N.OPPOSITE_SIDE,q=t.exports={};q.setConvert=r(21994);var G=r(4322),Z=r(41675),Y=Z.idSort,W=Z.isLinked;q.id2name=Z.id2name,q.name2id=Z.name2id,q.cleanId=Z.cleanId,q.list=Z.list,q.listIds=Z.listIds,q.getFromId=Z.getFromId,q.getFromTrace=Z.getFromTrace;var X=r(71739);function J(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}q.getAutoRange=X.getAutoRange,q.findExtremes=X.findExtremes,q.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],u=n+"ref",c={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),c[u]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,c,u)},q.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},q.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==q.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var u=q.getFromId(e,n);l=r(i,a=u.fraction2r(a)),o=u.cleanPos}t[i]=o(l)},q.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:q.getFromId(e,r).cleanPos)(t)},q.redrawComponents=function(t,e){e=e||q.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),u={},c=0;cr&&f2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},q.saveRangeInitial=function(t,e){for(var r=q.list(t,"",!0),n=!1,i=0;i.3*h||c(n)||c(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=q.tickIncrement(t,"M6","reverse")+1.5*M:a.exactMonths>.8?t=q.tickIncrement(t,"M1","reverse")+15.5*M:t-=S;var l=q.tickIncrement(t,r);if(l<=n)return l}return t}(m,t,y,u,a)),g=m;g<=c;)g=q.tickIncrement(g,y,!1,a);return{start:e.c2r(m,0,a),end:e.c2r(g,0,a),size:y,_dataSpan:c-u}},q.prepMinorTicks=function(t,e,r){if(!e.minor.dtick){delete t.dtick;var n,a=e.dtick&&i(e._tmin);if(a){var o=q.tickIncrement(e._tmin,e.dtick,!0);n=[e._tmin,.99*o+.01*e._tmin]}else{var l=s.simpleMap(e.range,e.r2l);n=[l[0],.8*l[0]+.2*l[1]]}if(t.range=s.simpleMap(n,e.l2r),t._isMinor=!0,q.prepTicks(t,r),a){var u=i(e.dtick),c=i(t.dtick),f=u?e.dtick:+e.dtick.substring(1),h=c?t.dtick:+t.dtick.substring(1);u&&c?tt(f,h)?f===2*A&&h===2*M&&(t.dtick=A):f===2*A&&h===3*M?t.dtick=A:f!==A||(e._input.minor||{}).nticks?et(f/h,2.5)?t.dtick=f/2:t.dtick=f:t.dtick=M:"M"===String(e.dtick).charAt(0)?c?t.dtick="M1":tt(f,h)?f>=12&&2===h&&(t.dtick="M3"):t.dtick=e.dtick:"L"===String(t.dtick).charAt(0)?"L"===String(e.dtick).charAt(0)?tt(f,h)||(t.dtick=et(f/h,2.5)?e.dtick/2:e.dtick):t.dtick="D1":"D2"===t.dtick&&+e.dtick>1&&(t.dtick=1)}t.range=e.range}void 0===e.minor._tick0Init&&(t.tick0=e.tick0)},q.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if("auto"===t.tickmode||!t.dtick){var n,a=t.nticks;a||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?s.bigFont(t.tickfont.size||12):15,a=t._length/n):(n="y"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(a*=2)),t.minor&&"array"!==t.minor.tickmode||"array"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,q.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=q.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dtick=(I?0:1);D--){var z=!D;D?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var R=D?t:s.extendFlat({},t,t.minor);if(z?q.prepMinorTicks(R,t,e):q.prepTicks(R,e),"array"!==R.tickmode)if("sync"!==R.tickmode){var F=J(c),B=F[0],N=F[1],j=i(R.dtick),U="log"===a&&!(j||"L"===R.dtick.charAt(0)),V=q.tickFirst(R,e);if(D){if(t._tmin=V,V=N:Y<=N;Y=q.tickIncrement(Y,W,f,o)){if(D&&H++,R.rangebreaks&&!f){if(Y=p)break}if(C.length>d||Y===Z)break;Z=Y;var X={value:Y};D?(U&&Y!==(0|Y)&&(X.simpleLabel=!0),l>1&&H%l&&(X.skipLabel=!0),C.push(X)):(X.minor=!0,P.push(X))}}else C=[],v=it(t);else D?(C=[],v=at(t)):(P=[],L=at(t))}if(I&&!("inside"===t.minor.ticks&&"outside"===t.ticks||"outside"===t.minor.ticks&&"inside"===t.ticks)){for(var K=C.map((function(t){return t.value})),$=[],Q=0;Q0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,u=t[o].value,c=Math.abs(u-l),f=r||c,h=0;f>=m?h=c>=m&&c<=g?c:y:r===b&&f>=_?h=c>=_&&c<=x?c:b:f>=k?h=c>=k&&c<=w?c:T:r===A&&f>=A?h=A:f>=M?h=M:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=c&&(h=c,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,v=0;v<84;v++){var L=(v+.5)/84;e.maskBreaks(i*(1-L)+L*p)!==O&&d++}(h*=d/84)||(t[n].drop=!0),s&&c>A&&(h=c)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(C,t,t._definedDelta),t.rangebreaks){var ot="y"===t._id.charAt(0),st=1;"auto"===t.tickmode&&(st=t.tickfont?t.tickfont.size:12);var lt=NaN;for(r=C.length-1;r>-1;r--)if(C[r].drop)C.splice(r,1);else{C[r].value=Dt(C[r].value,t);var ut=t.c2p(C[r].value);(ot?lt>ut-st:ltp||ftp&&(ct.periodX=p),ft10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=M&&a<=10||e>=15*M)t._tickround="d";else if(e>=L&&a<=16||e>=E)t._tickround="M";else if(e>=C&&a<=19||e>=L)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),u=Math.floor(Math.log(l)/Math.LN10+.01),c=void 0===t.minexponent?3:t.minexponent;Math.abs(u)>c&&(yt(t.exponentformat)&&!mt(u)?t._tickexponent=3*Math.round((u-1)/3):t._tickexponent=u)}else t._tickround=null}function vt(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}q.autoTicks=function(t,e,r){var n;function a(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var o=2*e;if(o>y)e/=y,n=a(10),t.dtick="M"+12*pt(e,n,ot);else if(o>T)e/=T,t.dtick="M"+pt(e,1,st);else if(o>M){if(t.dtick=pt(e,M,t._hasDayOfWeekBreaks?[1,2,7,14]:ut),!r){var l=q.getTickFormat(t),u="period"===t.ticklabelmode;u&&(t._rawTick0=t.tick0),/%[uVW]/.test(l)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),u&&(t._dowTick0=t.tick0)}}else o>E?t.dtick=pt(e,E,st):o>L?t.dtick=pt(e,L,lt):o>C?t.dtick=pt(e,C,lt):(n=a(10),t.dtick=pt(e,n,ot))}else if("log"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(t._isMinor&&(e*=1.5),e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var f=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/f,n=a(10),t.dtick="L"+pt(e,n,ot)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):It(t)?(t.tick0=0,n=1,t.dtick=pt(e,n,ht)):(t.tick0=0,n=a(10),t.dtick=pt(e,n,ot));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var h=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(h)}},q.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),u=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,u,a);if("L"===l)return Math.log(Math.pow(10,t)+u)/Math.LN10;if("D"===l){var c="D2"===e?ft:ct,f=t+.01*o,h=s.roundUp(s.mod(f,1),c,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},q.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] ")}else t._prevDateHead=l,u+="
"+l;e.text=u}(t,o,r,u):"log"===c?function(t,e,r,n,a){var o=t.dtick,l=e.x,u=t.tickformat,c="string"==typeof o&&o.charAt(0);if("never"===a&&(a=""),n&&"L"!==c&&(o="L3",c="L"),u||"L"===c)e.text=xt(Math.pow(10,l),t,a,n);else if(i(o)||"D"===c&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;"power"===p||yt(p)&&mt(f)?(e.text=0===f?1:1===f?"10":"10"+(f>1?"":P)+h+"",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(f>0?"+":P)+h:(e.text=xt(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==c)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,u,v):"category"===c?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r=""),e.text=String(r)}(t,o):"multicategory"===c?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):It(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=xt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=xt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="π":e.text=o[0]+"π":e.text=["",o[0],"","⁄","",o[1],"","π"].join(""),l&&(e.text=P+e.text)}}}}(t,o,r,u,v):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide"),e.text=xt(e.x,t,i,n)}(t,o,0,u,v),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),"boundaries"===t.tickson||t.showdividers){var g=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[g(o.x-.5),g(o.x+t.dtick-.5)]}return o},q.hoverLabelText=function(t,e,r){r&&(t=s.extendFlat({},t,{hoverformat:r}));var n=Array.isArray(e)?e[0]:e,i=Array.isArray(e)?e[1]:void 0;if(void 0!==i&&i!==n)return q.hoverLabelText(t,n,r)+" - "+q.hoverLabelText(t,i,r);var a="log"===t.type&&n<=0,o=q.tickText(t,t.c2l(a?-n:n),"hover").text;return a?0===n?"0":P+o:o};var gt=["f","p","n","μ","m","","k","M","G","T"];function yt(t){return"SI"===t||"B"===t}function mt(t){return t>14||t<-15}function xt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",u=e._tickexponent,c=q.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};dt(h),o=(Number(h._tickround)||0)+4,u=h._tickexponent,e.hoverformat&&(c=e.hoverformat)}if(c)return e._numFormat(c)(t).replace(/-/g,P);var p,d=Math.pow(10,-o)/2;if("none"===l&&(u=0),(t=Math.abs(t))"+p+"":"B"===l&&9===u?t+="B":yt(l)&&(t+=gt[u/3+5])),a?P+t:t}function bt(t,e){if(t){var r=Object.keys(B).reduce((function(t,r){return-1!==e.indexOf(r)&&B[r].forEach((function(e){t[e]=1})),t}),{});Object.keys(t).forEach((function(e){r[e]||(1===e.length?t[e]=0:delete t[e])}))}}function _t(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,a=c(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(i)))){r=n;break}break;case"log":for(e=0;e=0&&i.unshift(i.splice(n,1).shift())}}));var o={false:{left:0,right:0}};return s.syncOrAsync(i.map((function(e){return function(){if(e){var n=q.getFromId(t,e);r||(r={}),r.axShifts=o,r.overlayingShiftedAx=a;var i=q.drawOne(t,n,r);return n._shiftPusher&&Ft(n,n._fullDepth||0,o,!0),n._r=n.range.slice(),n._rl=s.simpleMap(n._r,n.r2l),i}}})))},q.drawOne=function(t,e,r){var n,i,l,u=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];e.setScale();var d=t._fullLayout,v=e._id,g=v.charAt(0),y=q.counterLetter(v),m=d._plots[e._mainSubplot];if(m){if(e._shiftPusher=e.autoshift||-1!==p.indexOf(e._id)||-1!==p.indexOf(e.overlaying),e._shiftPusher&"free"===e.anchor){var x=e.linewidth/2||0;"inside"===e.ticks&&(x+=e.ticklen),Ft(e,x,u,!0),Ft(e,e.shift||0,u,!1)}!0===r.skipTitle&&void 0!==e._shift||(e._shift=function(t,e){return t.autoshift?e[t.overlaying][t.side]:t.shift||0}(e,u));var b=m[g+"axislayer"],_=e._mainLinePosition,w=_+=e._shift,T=e._mainMirrorPosition,k=e._vals=q.calcTicks(e),A=[e.mirror,w,T].join("_");for(n=0;n0?r.bottom-c:0,f))));var h=0,p=0;if(e._shiftPusher&&(h=Math.max(f,r.height>0?"l"===l?c-r.left:r.right-c:0),e.title.text!==d._dfltTitle[g]&&(p=(e._titleStandoff||0)+(e._titleScoot||0),"l"===l&&(p+=kt(e))),e._fullDepth=Math.max(h,p)),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var v=[0,1],m="number"==typeof e._shift?e._shift:0;if("x"===g){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?c-r.top:0,f),v.reverse()),r.width>0){var x=r.right-(e._offset+e._length);x>0&&(n.xr=1,n.r=x);var b=e._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(e._depth=Math.max(r.height>0?c-r.left:0,f),n[l]=e._depth-m):(e._depth=Math.max(r.height>0?r.right-c:0,f),n[l]=e._depth+m,v.reverse()),r.height>0){var _=r.bottom-(e._offset+e._length);_>0&&(n.yb=0,n.b=_);var w=e._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[y]="free"===e.anchor?e.position:e._anchorAxis.domain[v[0]],e.title.text!==d._dfltTitle[g]&&(n[l]+=kt(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=f),!0===e.mirror||"ticks"===e.mirror?i[y]=e._anchorAxis.domain[v[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[y]=[e._counterDomainMin,e._counterDomainMax][v[1]]))}lt&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),"string"==typeof e.automargin&&(bt(n,e.automargin),bt(i,e.automargin)),a.autoMargin(t,St(e),n),a.autoMargin(t,Et(e),i),a.autoMargin(t,Lt(e),s)})),s.syncOrAsync(ot)}}function ut(t){var r=v+(t||"tick");return M[r]||(M[r]=function(t,e){var r,n,i,a;return t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=Mt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0),{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),M[r]}},q.getTickSigns=function(t,e){var r=t._id.charAt(0),n={x:"top",y:"right"}[r],i=t.side===n?1:-1,a=[-1,1,i,-i];return"inside"!==(e?(t.minor||{}).ticks:t.ticks)==("x"===r)&&(a=a.map((function(t){return-t}))),t.side&&a.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),a},q.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},q.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var u=t.side,c=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;return(o||n)&&(c+=h*U,f+=(t.linewidth||0)/2),(i||a)&&(c+=(t.linewidth||0)/2,f+=3),s&&"top"===u&&(f-=h*(1-U)),(i||n)&&(c=-c),"bottom"!==u&&"right"!==u||(f=-f),[l?c:0,s?f:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(wt(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(wt(e)))}},q.makeTickPath=function(t,e,r,n){n||(n={});var i=n.minor;if(i&&!t.minor)return"";var a=void 0!==n.len?n.len:i?t.minor.ticklen:t.ticklen,o=t._id.charAt(0),s=(t.linewidth||1)/2;return"x"===o?"M0,"+(e+s*r)+"v"+a*r:"M"+(e+s*r)+",0h"+a*r},q.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",a=function(t){return-1!==n.indexOf(t)},o=a("top"),l=a("left"),u=a("right"),c=a("bottom")||l||o||u,f=a("inside"),h="inside"===n&&"inside"===t.ticks||!f&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,d=0,v=h?t.ticklen:0;if(f?v*=-1:c&&(v=0),h&&(p+=v,r)){var g=s.deg2rad(r);p=v*Math.cos(g)+1,d=v*Math.sin(g)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var y,m,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,A=t._id.charAt(0),M=t.tickangle;if("x"===A)b=(_=!f&&"bottom"===k||f&&"top"===k)?1:-1,f&&(b*=-1),y=d*b,m=e+p*b,x=_?1:-.2,90===Math.abs(M)&&(f?x+=j:x=-90===M&&"bottom"===k?U:90===M&&"top"===k?j:.5,T=j/2*(M/90)),w.xFn=function(t){return t.dx+y+T*t.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*x},w.anchorFn=function(t,e){if(c){if(l)return"end";if(u)return"start"}return i(e)&&0!==e&&180!==e?e*b<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==f?-n:0};else if("y"===A){if(b=(_=!f&&"left"===k||f&&"right"===k)?1:-1,f&&(b*=-1),y=p,m=d*b,x=0,f||90!==Math.abs(M)||(x=-90===M&&"left"===k||90===M&&"right"===k?U:.5),f){var S=i(M)?+M:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*U*b,x=0}}w.xFn=function(t){return t.dx+e-(y+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+m+t.fontSize*j},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},q.drawTicks=function(t,e,r){r=r||{};var i=e._id+"tick",a=[].concat(e.minor&&e.minor.ticks?r.vals.filter((function(t){return t.minor&&!t.noTick})):[]).concat(e.ticks?r.vals.filter((function(t){return!t.minor&&!t.noTick})):[]),o=r.layer.selectAll("path."+i).data(a,Tt);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==r.crisp).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.tickcolor:e.tickcolor)})).style("stroke-width",(function(r){return h.crispRound(t,r.minor?e.minor.tickwidth:e.tickwidth,1)+"px"})).attr("d",r.path).style("display",null),Rt(e,[R]),o.attr("transform",r.transFn)},q.drawGrid=function(t,e,r){if(r=r||{},"sync"!==e.tickmode){var i=e._id+"grid",a=e.minor&&e.minor.showgrid,o=a?r.vals.filter((function(t){return t.minor})):[],s=e.showgrid?r.vals.filter((function(t){return!t.minor})):[],l=r.counterAxis;if(l&&q.shouldShowZeroLine(t,e,l))for(var u="array"===e.tickmode,c=0;c=0;y--){var m=y?v:g;if(m){var x=m.selectAll("path."+i).data(y?s:o,Tt);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==r.crisp),x.attr("transform",r.transFn).attr("d",r.path).each((function(t){return f.stroke(n.select(this),t.minor?e.minor.gridcolor:e.gridcolor||"#ddd")})).style("stroke-dasharray",(function(t){return h.dashStyle(t.minor?e.minor.griddash:e.griddash,t.minor?e.minor.gridwidth:e.gridwidth)})).style("stroke-width",(function(t){return(t.minor?d:e._gw)+"px"})).style("display",null),"function"==typeof r.path&&x.attr("d",r.path)}}Rt(e,[D,z])}},q.drawZeroLine=function(t,e,r){r=r||r;var n=e._id+"zl",i=q.shouldShowZeroLine(t,e,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:e._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each((function(){r.layer.selectAll("path").sort((function(t,e){return Y(t.id,e.id)}))})),a.attr("transform",r.transFn).attr("d",r.path).call(f.stroke,e.zerolinecolor||f.defaultLine).style("stroke-width",h.crispRound(t,e.zerolinewidth,e._gw||1)+"px").style("display",null),Rt(e,[I])},q.drawLabels=function(t,e,r){r=r||{};var a=t._fullLayout,o=e._id,c=o.charAt(0),f=r.cls||o+"tick",p=r.vals.filter((function(t){return t.text})),d=r.labelFns,v=r.secondary?0:e.tickangle,g=(e._prevTickAngles||{})[f],y=r.layer.selectAll("g."+f).data(e.showticklabels?p:[],Tt),m=[];function x(t,a){t.each((function(t){var o=n.select(this),s=o.select(".text-math-group"),c=d.anchorFn(t,a),f=r.transFn.call(o.node(),t)+(i(a)&&0!=+a?" rotate("+a+","+d.xFn(t)+","+(d.yFn(t)-t.fontSize/2)+")":""),p=u.lineCount(o),v=V*t.fontSize,g=d.heightFn(t,i(a)?+a:0,(p-1)*v);if(g&&(f+=l(0,g)),s.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":c}),y.style("opacity",1),e._adjustTickLabelsOverflow&&e._adjustTickLabelsOverflow()}else{var m=h.bBox(s.node()).width*{end:-.5,start:.5}[c];s.attr("transform",f+l(m,0))}}))}y.enter().append("g").classed(f,1).append("text").attr("text-anchor","middle").each((function(e){var r=n.select(this),i=t._promises.length;r.call(u.positionText,d.xFn(e),d.yFn(e)).call(h.font,e.font,e.fontSize,e.fontColor).text(e.text).call(u.convertToTspans,t),t._promises[i]?m.push(t._promises.pop().then((function(){x(r,v)}))):x(r,v)})),Rt(e,[F]),y.exit().remove(),r.repositionOnUpdate&&y.each((function(t){n.select(this).select("text").call(u.positionText,d.xFn(t),d.yFn(t))})),e._adjustTickLabelsOverflow=function(){var r=e.ticklabeloverflow;if(r&&"allow"!==r){var i=-1!==r.indexOf("hide"),o="x"===e._id.charAt(0),l=0,u=o?t._fullLayout.width:t._fullLayout.height;if(-1!==r.indexOf("domain")){var c=s.simpleMap(e.range,e.r2l);l=e.l2p(c[0])+e._offset,u=e.l2p(c[1])+e._offset}var f=Math.min(l,u),p=Math.max(l,u),d=e.side,v=1/0,g=-1/0;for(var m in y.each((function(t){var r=n.select(this);if(r.select(".text-math-group").empty()){var a=h.bBox(r.node()),s=0;o?(a.right>p||a.leftp||a.top+(e.tickangle?0:t.fontSize/4)e["_visibleLabelMin_"+r._id]?l.style("display","none"):"tick"!==t.K||i||l.style("display",null)}))}))}))}))},x(y,g+1?g:v);var b=null;e._selections&&(e._selections[f]=y);var _=[function(){return m.length&&Promise.all(m)}];e.automargin&&a._redrawFromAutoMarginCount&&90===g?(b=90,_.push((function(){x(y,g)}))):_.push((function(){if(x(y,v),p.length&&"x"===c&&!i(v)&&("log"!==e.type||"D"!==String(e.dtick).charAt(0))){b=0;var t,n=0,a=[];if(y.each((function(t){n=Math.max(n,t.fontSize);var r=e.l2p(t.x),i=Mt(this),o=h.bBox(i.node());a.push({top:0,bottom:10,height:10,left:r-o.width/2,right:r+o.width/2+2,width:o.width+2})})),"boundaries"!==e.tickson&&!e.showdividers||r.secondary){var o=p.length,l=Math.abs((p[o-1].x-p[0].x)*e._m)/(o-1),u=e.ticklabelposition||"",f=function(t){return-1!==u.indexOf(t)},d=f("top"),g=f("left"),m=f("right"),_=f("bottom")||g||d||m?(e.tickwidth||0)+6:0,w=l<2.5*n||"multicategory"===e.type||"realaxis"===e._name;for(t=0;t1)for(n=1;n2*o}(i,e))return"date";var g="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},c=0;c2*i}(i,g)?"category":function(t,e){for(var r=t.length,n=0;n=2){var s,u,c="";if(2===o.length)for(s=0;s<2;s++)if(u=b(o[s])){c=g;break}var f=i("pattern",c);if(f===g)for(s=0;s<2;s++)(u=b(o[s]))&&(e.bounds[s]=o[s]=u-1);if(f)for(s=0;s<2;s++)switch(u=o[s],f){case g:if(!n(u))return void(e.enabled=!1);if((u=+u)!==Math.floor(u)||u<0||u>=7)return void(e.enabled=!1);e.bounds[s]=o[s]=u;break;case y:if(!n(u))return void(e.enabled=!1);if((u=+u)<0||u>24)return void(e.enabled=!1);e.bounds[s]=o[s]=u}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},e.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},e.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},15258:function(t){"use strict";t.exports=function(t,e,r,n){if("category"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i="array");var s,l=r("categoryorder",i);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=e.categoryorder="trace"),"trace"===l?e._initialCategories=[]:"array"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function g(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;ou*x)||T)for(r=0;rI&&FP&&(P=F);h/=(P-C)/(2*O),C=l.l2r(C),P=l.l2r(P),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function N(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",u(r,n)).attr("d",i+"Z")}function j(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:f.background,stroke:f.defaultLine,"stroke-width":1,opacity:0}).attr("transform",u(e,r)).attr("d","M0,0Z")}function U(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),V(t,e,i,a)}function V(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function H(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function q(t){O&&t.data&&t._context.showTips&&(i.notifier(i._(t,"Double-click to zoom back out"),"long"),O=!1)}function G(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,P)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function Z(t,e,r,n,a){for(var o,s,l,u,c=!1,f={},h={},p=(a||{}).xaHash,d=(a||{}).yaHash,v=0;v=0)i._fullLayout._deactivateShape(i);else{var o=i._fullLayout.clickmode;if(H(i),2!==t||yt||qt(),gt)o.indexOf("select")>-1&&S(r,i,J,K,e.id,Pt),o.indexOf("event")>-1&&p.click(i,r,e.id);else if(1===t&&yt){var s=v?I:O,u="s"===v||"w"===y?0:1,f=s._name+".range["+u+"]",h=function(t,e){var r,n=t.range[e],i=Math.abs(n-t.range[1-e]);return"date"===t.type?n:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(i)/Math.LN10))+3,a("."+r+"g")(Math.pow(10,n))):(r=Math.floor(Math.log(Math.abs(n))/Math.LN10)-Math.floor(Math.log(i)/Math.LN10)+4,a("."+String(r)+"g")(n))}(s,u),d="left",g="middle";if(s.fixedrange)return;v?(g="n"===v?"top":"bottom","right"===s.side&&(d="right")):"e"===y&&(d="right"),i._context.showAxisRangeEntryBoxes&&n.select(bt).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(h),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:d,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&l.call("_guiRelayout",i,f,e)}))}}}function Dt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min(tt,pt*e+_t)),i=Math.max(0,Math.min(et,dt*r+wt)),a=Math.abs(n-_t),o=Math.abs(i-wt);function s(){St="",Tt.r=Tt.l,Tt.t=Tt.b,Lt.attr("d","M0,0Z")}if(Tt.l=Math.min(_t,n),Tt.r=Math.max(_t,n),Tt.t=Math.min(wt,i),Tt.b=Math.max(wt,i),rt.isSubplotConstrained)a>P||o>P?(St="xy",a/tt>o/et?(o=a*et/tt,wt>i?Tt.t=wt-o:Tt.b=wt+o):(a=o*tt/et,_t>n?Tt.l=_t-a:Tt.r=_t+a),Lt.attr("d",G(Tt))):s();else if(nt.isSubplotConstrained)if(a>P||o>P){St="xy";var l=Math.min(Tt.l/tt,(et-Tt.b)/et),u=Math.max(Tt.r/tt,(et-Tt.t)/et);Tt.l=l*tt,Tt.r=u*tt,Tt.b=(1-l)*et,Tt.t=(1-u)*et,Lt.attr("d",G(Tt))}else s();else!at||o0){var c;if(nt.isSubplotConstrained||!it&&1===at.length){for(c=0;cb[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s),"sync"===e.tickmode&&(e.tickmode="auto")}return r("layer"),e}},89426:function(t,e,r){"use strict";var n=r(59652);t.exports=function(t,e,r,i,a){a||(a={});var o=a.tickSuffixDflt,s=n(t);r("tickprefix")&&r("showtickprefix",s),r("ticksuffix",o)&&r("showticksuffix",s)}},42449:function(t,e,r){"use strict";var n=r(18783).FROM_BL;t.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},21994:function(t,e,r){"use strict";var n=r(39898),i=r(84096).g0,a=r(71828),o=a.numberFormat,s=r(92770),l=a.cleanNumber,u=a.ms2DateTime,c=a.dateTime2ms,f=a.ensureNumber,h=a.isArrayOrTypedArray,p=r(50606),d=p.FP_SAFE,v=p.BADNUM,g=p.LOG_CLIP,y=p.ONEWEEK,m=p.ONEDAY,x=p.ONEHOUR,b=p.ONEMIN,_=p.ONESEC,w=r(41675),T=r(85555),k=T.HOUR_PATTERN,A=T.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function S(t){return null!=t}t.exports=function(t,e){e=e||{};var r=t._id||"x",p=r.charAt(0);function E(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return v}function L(e,r,n,i){if((i||{}).msUTC&&s(e))return+e;var o=c(e,n||t.calendar);if(o===v){if(!s(e))return v;e=+e;var l=Math.floor(10*a.mod(e+.05,1)),u=Math.round(e-l/10);o=c(new Date(u))+l/10}return o}function C(e,r,n){return u(e,r,n||t.calendar)}function P(e){return t._categories[Math.round(e)]}function O(e){if(S(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return v}function I(e){if(t._categoriesMap)return t._categoriesMap[e]}function D(t){var e=I(t);return void 0!==e?e:s(t)?+t:void 0}function z(t){return s(t)?+t:I(t)}function R(t,e,r){return n.round(r+e*t,2)}function F(t,e,r){return(t-r)/e}var B=function(e){return s(e)?R(e,t._m,t._b):v},N=function(e){return F(e,t._m,t._b)};if(t.rangebreaks){var j="y"===p;B=function(e){if(!s(e))return v;var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);var n=j;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,a=i*e,o=0,l=0;lc)){o=a<(u+c)/2?l:l+1;break}o=l+1}var f=t._B[o]||0;return isFinite(f)?R(e,t._m2,f):0},N=function(e){var r=t._rangebreaks.length;if(!r)return F(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return F(e,t._m2,t._B[n])}}t.c2l="log"===t.type?E:f,t.l2c="log"===t.type?M:f,t.l2p=B,t.p2l=N,t.c2p="log"===t.type?function(t,e){return B(E(t,e))}:B,t.p2c="log"===t.type?function(t){return M(N(t))}:N,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=l,t.c2d=t.c2r=t.l2d=t.l2r=f,t.d2p=t.r2p=function(e){return t.l2p(l(e))},t.p2d=t.p2r=N,t.cleanPos=f):"log"===t.type?(t.d2r=t.d2l=function(t,e){return E(l(t),e)},t.r2d=t.r2c=function(t){return M(l(t))},t.d2c=t.r2l=l,t.c2d=t.l2r=f,t.c2r=E,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(N(t))},t.r2p=function(e){return t.l2p(l(e))},t.p2r=N,t.cleanPos=f):"date"===t.type?(t.d2r=t.r2d=a.identity,t.d2c=t.r2c=t.d2l=t.r2l=L,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(L(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(N(t),e,r)},t.cleanPos=function(e){return a.cleanDate(e,v,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=O,t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=f,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:f(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=P,t.d2r=t.d2l_noadd=D,t.r2c=function(e){var r=D(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=I,t.l2r=t.c2r=f,t.r2l=D,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return P(N(t))},t.r2p=t.d2p,t.p2r=N,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:f(t)},t.setupMultiCategory=function(n){var i,o,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var u in l)if(u!==r){var c=e[w.id2name(u)];s=s.concat(c._traceIndices)}var f=[[0,{}],[0,{}]],d=[];for(i=0;id&&(o[n]=d),o[0]===o[1]){var u=Math.max(1,Math.abs(1e-6*o[0]));o[0]-=u,o[1]+=u}}else a.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=w.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,u=t.r2l(t[a][0],o),c=t.r2l(t[a][1],o),f="y"===p;if(f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks&&(t._rangebreaks=t.locateBreaks(Math.min(u,c),Math.max(u,c)),t._rangebreaks.length)){for(s=0;sc&&(h=!h),h&&t._rangebreaks.reverse();var d=h?-1:1;for(t._m2=d*t._length/(Math.abs(c-u)-t._lBreaks),t._B.push(-t._m2*(f?c:u)),s=0;si&&(i+=7,oi&&(i+=24,o=n&&o=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&u.push({min:t,max:n})}};for(n=0;nr.duration?(function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function g(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,u=i._length,c=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),v=a.simpleMap(e.xr1,i.r2l),g=d[1]-d[0],y=v[1]-v[0];p[0]=(d[0]*(1-r)+r*v[0]-d[0])/(d[1]-d[0])*u,p[2]=u*(1-r+r*y/g),i.range[0]=i.l2r(d[0]*(1-r)+r*v[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*v[1])}else p[0]=0,p[2]=u;if(h){var m=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=m[1]-m[0],_=x[1]-x[0];p[1]=(m[1]*(1-r)+r*x[1]-m[1])/(m[0]-m[1])*c,p[3]=c*(1-r+r*_/b),l.range[0]=i.l2r(m[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(m[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=c;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?u/p[2]:1,T=h?c/p[3]:1,k=f?p[0]:0,A=h?p[1]:0,M=f?p[0]/p[2]*u:0,S=h?p[1]/p[3]*c:0,E=i._offset-M,L=l._offset-S;n.clipRect.call(o.setTranslate,k,A).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,L).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},951:function(t,e,r){"use strict";var n=r(73972).traceIs,i=r(4322);function a(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=a(t),i=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}t.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(function(t,e){if("-"===t.type){var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var u=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(u)if("histogram"!==u.type||l!=={v:"y",h:"x"}[u.orientation||"v"]){var c=l+"calendar",f=u[c],h={noMultiCategory:!n(u,"cartesian")||n(u,"noMultiCategory")};if("box"===u.type&&u._hasPreCompStats&&l==={h:"x",v:"y"}[u.orientation||"v"]&&(h.noMultiCategory=!0),h.autotypenumbers=t.autotypenumbers,o(u,l)){var p=a(u),d=[];for(r=0;r0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}e.manageCommandObserver=function(t,r,n,o){var s={},l=!0;r&&r._commandObserver&&(s=r._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var u=e.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(r&&r._commandObserver){if(u)return s;if(r._commandObserver.remove)return r._commandObserver.remove(),r._commandObserver=null,s}if(u){a(t,u,s.cache),s.check=function(){if(l){var e=a(t,u,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:u.type,prop:u.prop,traces:u.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0&&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]]]}}t.exports=function(t){return new M(t)},S.plot=function(t,e,r,n){var i=this;if(n)return i.update(t,e,!0);i._geoCalcData=t,i._fullLayout=e;var a=e[this.id],o=[],s=!1;for(var l in w.layerNameToAdjective)if("frame"!==l&&a["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(a,e)}if(!r){if(this.updateProjection(t,e))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(e,n),this.updateDims(e,n),this.updateFx(e,n),d.generalUpdatePerTraceModule(this.graphDiv,this,t,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},S.updateProjection=function(t,e){var r=this.graphDiv,n=e[this.id],l=e._size,c=n.domain,f=n.projection,h=n.lonaxis,p=n.lataxis,d=h._ax,v=p._ax,y=this.projection=function(t){var e=t.projection,r=e.type,n=w.projNames[r];n="geo"+u.titleCase(n);for(var l=(i[n]||s[n])(),c=t._isSatellite?180*Math.acos(1/e.distance)/Math.PI:t._isClipped?w.lonaxisSpan[r]/2:null,f=["center","rotate","parallels","clipExtent"],h=function(t){return t?l:[]},p=0;pc*Math.PI/180}return!1},l.getPath=function(){return a().projection(l)},l.getBounds=function(t){return l.getPath().bounds(t)},l.precision(w.precision),t._isSatellite&&l.tilt(e.tilt).distance(e.distance),c&&l.clipAngle(c-w.clipPad),l}(n),m=[[l.l+l.w*c.x[0],l.t+l.h*(1-c.y[1])],[l.l+l.w*c.x[1],l.t+l.h*(1-c.y[0])]],x=n.center||{},b=f.rotation||{},_=h.range||[],T=p.range||[];if(n.fitbounds){d._length=m[1][0]-m[0][0],v._length=m[1][1]-m[0][1],d.range=g(r,d),v.range=g(r,v);var k=(d.range[0]+d.range[1])/2,A=(v.range[0]+v.range[1])/2;if(n._isScoped)x={lon:k,lat:A};else if(n._isClipped){x={lon:k,lat:A},b={lon:k,lat:A,roll:b.roll};var M=f.type,S=w.lonaxisSpan[M]/2||180,L=w.lataxisSpan[M]/2||90;_=[k-S,k+S],T=[A-L,A+L]}else x={lon:k,lat:A},b={lon:k,lat:b.lat,roll:b.roll}}y.center([x.lon-b.lon,x.lat-b.lat]).rotate([-b.lon,-b.lat,b.roll]).parallels(f.parallels);var C=E(_,T);y.fitExtent(m,C);var P=this.bounds=y.getBounds(C),O=this.fitScale=y.scale(),I=y.translate();if(n.fitbounds){var D=y.getBounds(E(d.range,v.range)),z=Math.min((P[1][0]-P[0][0])/(D[1][0]-D[0][0]),(P[1][1]-P[0][1])/(D[1][1]-D[0][1]));isFinite(z)?y.scale(z*O):u.warn("Something went wrong during"+this.id+"fitbounds computations.")}else y.scale(f.scale*O);var R=this.midPt=[(P[0][0]+P[1][0])/2,(P[0][1]+P[1][1])/2];if(y.translate([I[0]+(R[0]-I[0]),I[1]+(R[1]-I[1])]).clipExtent(P),n._isAlbersUsa){var F=y([x.lon,x.lat]),B=y.translate();y.translate([B[0]-(F[0]-B[0]),B[1]-(F[1]-B[1])])}},S.updateBaseLayers=function(t,e){var r=this,i=r.topojson,a=r.layers,o=r.basePaths;function s(t){return"lonaxis"===t||"lataxis"===t}function l(t){return Boolean(w.lineLayers[t])}function u(t){return Boolean(w.fillLayers[t])}var c=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter((function(t){return l(t)||u(t)?e["show"+t]:!s(t)||e[t].showgrid})),p=r.framework.selectAll(".layer").data(c,String);p.exit().each((function(t){delete a[t],delete o[t],n.select(this).remove()})),p.enter().append("g").attr("class",(function(t){return"layer "+t})).each((function(t){var e=a[t]=n.select(this);"bg"===t?r.bgRect=e.append("rect").style("pointer-events","all"):s(t)?o[t]=e.append("path").style("fill","none"):"backplot"===t?e.append("g").classed("choroplethlayer",!0):"frontplot"===t?e.append("g").classed("scatterlayer",!0):l(t)?o[t]=e.append("path").style("fill","none").style("stroke-miterlimit",2):u(t)&&(o[t]=e.append("path").style("stroke","none"))})),p.order(),p.each((function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||u(r)?n.datum(A(i,i.objects[r])):s(r)&&n.datum(function(t,e,r){var n,i,a,o=e[t],s=w.scopeDefaults[e.scope];"lonaxis"===t?(n=s.lonaxisRange,i=s.lataxisRange,a=function(t,e){return[t,e]}):"lataxis"===t&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(t,e){return[e,t]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};v.setConvert(l,r);var u=v.calcTicks(l);e.isScoped||"lonaxis"!==t||u.pop();for(var c=u.length,f=new Array(c),h=0;h-1&&b(n.event,i,[r.xaxis],[r.yaxis],r.id,c),s.indexOf("event")>-1&&p.click(i,n.event))}))}function f(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},S.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",i),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(h.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},v.setConvert(t.mockAxis,r)},S.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},u.extendFlat(this.viewInitial,e)},S.render=function(t){this._hasMarkerAngles&&t?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?c(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},44622:function(t,e,r){"use strict";var n=r(27659).AU,i=r(71828).counterRegex,a=r(69082),o="geo",s=i(o),l={};l.geo={valType:"subplotid",dflt:o,editType:"calc"},t.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:r(77519),supplyLayoutDefaults:r(82161),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&P<0&&(P+=360);var O,I,D,z=(C+P)/2;if(!p){var R=d?f.projRotate:[z,0,0];O=r("projection.rotation.lon",R[0]),r("projection.rotation.lat",R[1]),r("projection.rotation.roll",R[2]),r("showcoastlines",!d&&x)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!x&&void 0)&&r("oceancolor")}p?(I=-96.6,D=38.7):(I=d?z:O,D=(L[0]+L[1])/2),r("center.lon",I),r("center.lat",D),v&&(r("projection.tilt"),r("projection.distance")),g&&r("projection.parallels",f.projParallels||[0,60]),r("projection.scale"),r("showland",!!x&&void 0)&&r("landcolor"),r("showlakes",!!x&&void 0)&&r("lakecolor"),r("showrivers",!!x&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==c&&x)&&(r("countrycolor"),r("countrywidth")),("usa"===c||"north america"===c&&50===u)&&(r("showsubunits",x),r("subunitcolor"),r("subunitwidth")),d||r("showframe",x)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):y?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}t.exports=function(t,e,r){i(t,e,r,{type:"geo",attributes:s,handleDefaults:u,fullData:r,partition:"y"})}},74455:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(73972),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},u={cursor:"auto"};function c(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],u=o._fullLayout,c=u[n],f={},h={};function p(t,e){f[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,u._preGUI,f);var r=i.nestedProperty(c,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",h)}function h(t,e){var r=c(0,e);function i(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render(!0);var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(u),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,v,g=c(0,e);function y(t){return e.invert(t)}function m(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=y(r)})).on("zoom",(function(){if(h=n.mouse(this),function(t){var r=y(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return g.scale(e.scale()),void g.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?y(h)&&(d=y(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=y(r=h),v=!0,t.render(!0);var l=e.rotate(),u=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":u[0],"geo.center.lat":u[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(u),v&&f(t,e,m)})),g}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=c(0,e),o=function(t){for(var e=0,r=arguments.length,i=[];++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var v=180-a-2*p,g=(Math.atan2(h,c)-Math.atan2(u,i))*s,y=(Math.atan2(h,c)-Math.atan2(u,-i))*s;return b(r[0],r[1],a,g)<=b(r[0],r[1],v,y)?[a,g,r[2]]:[v,y,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),u=Math.sin(n);return i[a]=t[a]*l-t[s]*u,i[s]=t[s]*l+t[a]*u,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(u.boxEnd[1]=u.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),u.boxEnd[1]l[3]&&(u.boxEnd[1]=l[3],u.boxEnd[0]=u.boxStart[0]+(l[3]-u.boxStart[1])/Math.abs(_))):(u.boxEnd[0]=u.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),u.boxEnd[0]l[2]&&(u.boxEnd[0]=l[2],u.boxEnd[1]=u.boxStart[1]+(l[2]-u.boxStart[0])*Math.abs(_)))}}else u.boxEnabled?(a=u.boxStart[0]!==u.boxEnd[0],s=u.boxStart[1]!==u.boxEnd[1],a||s?(a&&(g(0,u.boxStart[0],u.boxEnd[0]),t.xaxis.autorange=!1),s&&(g(1,u.boxStart[1],u.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),u.boxEnabled=!1,u.boxInited=!1):u.boxInited&&(u.boxInited=!1);break;case"pan":u.boxEnabled=!1,u.boxInited=!1,e?(u.panning||(u.dragStart[0]=n,u.dragStart[1]=i),Math.abs(u.dragStart[0]-n).999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}t.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:c,attributes:l,handleDefaults:f,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},65500:function(t,e,r){"use strict";var n=r(77894),i=r(27670).Y,a=r(1426).extendFlat,o=r(71828).counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({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:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function(t,e,r){"use strict";var n=r(78614),i=["xaxis","yaxis","zaxis"];function a(){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]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},t.exports=function(t){var e=new a;return e.merge(t),e}},96085:function(t,e,r){"use strict";t.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],u=0;u<3;++u){var c=s[a[u]];if(c._length=(r[u].hi-r[u].lo)*r[u].pixelsPerDataUnit/t.dataScale[u],Math.abs(c._length)===1/0||isNaN(c._length))l[u]=[];else{c._input_range=c.range.slice(),c.range[0]=r[u].lo/t.dataScale[u],c.range[1]=r[u].hi/t.dataScale[u],c._m=1/(t.dataScale[u]*r[u].pixelsPerDataUnit),c.range[0]===c.range[1]&&(c.range[0]-=1,c.range[1]+=1);var f=c.tickmode;if("auto"===c.tickmode){c.tickmode="linear";var h=c.nticks||i.constrain(c._length/40,4,9);n.autoTicks(c,Math.abs(c.range[1]-c.range[0])/h)}for(var p=n.calcTicks(c,{msUTC:!0}),d=0;d/g," "));l[u]=p,c.tickmode=f}}for(e.ticks=l,u=0;u<3;++u)for(o[u]=.5*(t.glplot.bounds[0][u]+t.glplot.bounds[1][u]),d=0;d<2;++d)e.bounds[d][u]=t.glplot.bounds[d][u];t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!u&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._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),b(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,h=e.glplot.selection,v=0;v")):"isosurface"===t.type||"volume"===t.type?(T.valueLabel=p.hoverLabelText(e._mockAxis,e._mockAxis.d2l(h.traceCoordinate[3]),t.valuehoverformat),S.push("value: "+T.valueLabel),h.textLabel&&S.push(h.textLabel),x=S.join("
")):x=h.textLabel;var E={x:h.traceCoordinate[0],y:h.traceCoordinate[1],z:h.traceCoordinate[2],data:_._input,fullData:_,curveNumber:_.index,pointNumber:w};d.appendArrayPointValue(E,_,w),t._module.eventData&&(E=_._module.eventData(E,h,_,{},w));var L={points:[E]};if(e.fullSceneLayout.hovermode){var C=[];d.loneHover({trace:_,x:(.5+.5*m[0]/m[3])*s,y:(.5-.5*m[1]/m[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:x,name:c.name,color:d.castHoverOption(_,w,"bgcolor")||c.color,borderColor:d.castHoverOption(_,w,"bordercolor"),fontFamily:d.castHoverOption(_,w,"font.family"),fontSize:d.castHoverOption(_,w,"font.size"),fontColor:d.castHoverOption(_,w,"font.color"),nameLength:d.castHoverOption(_,w,"namelength"),textAlign:d.castHoverOption(_,w,"align"),hovertemplate:f.castOption(_,w,"hovertemplate"),hovertemplateLabels:f.extendFlat({},E,T),eventData:[E]},{container:n,gd:r,inOut_bbox:C}),E.bbox=C[0]}h.buttons&&h.distance<5?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var k=["xaxis","yaxis","zaxis"];function A(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],u=e[o+"calendar"],c=e["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(c||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dy[1][o])y[0][o]=-1,y[1][o]=1;else{var C=y[1][o]-y[0][o];y[0][o]-=C/32,y[1][o]+=C/32}if("reversed"===l.autorange){var P=y[0][o];y[0][o]=y[1][o],y[1][o]=P}}else{var O=l.range;y[0][o]=l.r2l(O[0]),y[1][o]=l.r2l(O[1])}y[0][o]===y[1][o]&&(y[0][o]-=1,y[1][o]+=1),m[o]=y[1][o]-y[0][o],n.glplot.setBounds(o,{min:y[0][o]*p[o],max:y[1][o]*p[o]})}var I=c.aspectmode;if("cube"===I)g=[1,1,1];else if("manual"===I){var D=c.aspectratio;g=[D.x,D.y,D.z]}else{if("auto"!==I&&"data"!==I)throw new Error("scene.js aspectRatio was not one of the enumerated types");var z=[1,1,1];for(o=0;o<3;++o){var R=x[u=(l=c[k[o]]).type];z[o]=Math.pow(R.acc,1/R.count)/p[o]}g="data"===I||Math.max.apply(null,z)/Math.min.apply(null,z)<=4?z:[1,1,1]}c.aspectratio.x=f.aspectratio.x=g[0],c.aspectratio.y=f.aspectratio.y=g[1],c.aspectratio.z=f.aspectratio.z=g[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 F=c.domain||null,B=e._size||null;if(F&&B){var N=n.container.style;N.position="absolute",N.left=B.l+F.x[0]*B.w+"px",N.top=B.t+(1-F.y[1])*B.h+"px",N.width=B.w*(F.x[1]-F.x[0])+"px",N.height=B.h*(F.y[1]-F.y[0])+"px"}n.glplot.redraw()}},w.destroy=function(){var t=this;t.glplot&&(t.camera.mouseListener.enabled=!1,t.container.removeEventListener("wheel",t.camera.wheelListener),t.camera=null,t.glplot.dispose(),t.container.parentNode.removeChild(t.container),t.glplot=null)},w.getCamera=function(){var t,e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),{up:{x:(t=e.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},w.setViewport=function(t){var e,r=this,n=t.camera;r.camera.lookAt.apply(this,[[(e=n).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]]),r.glplot.setAspectratio(t.aspectratio),"orthographic"===n.projection.type!==r.camera._ortho&&(r.glplot.redraw(),r.glplot.clearRGBA(),r.glplot.dispose(),r.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this,l=s.fullLayout,u=s.isCameraChanged(t),h=s.isAspectChanged(t),p=u||h;if(p){var d={};u&&(e=s.getCamera(),n=(r=f.nestedProperty(t,s.id+".camera")).get(),d[s.id+".camera"]=n),h&&(i=s.glplot.getAspectratio(),o=(a=f.nestedProperty(t,s.id+".aspectratio")).get(),d[s.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",t,l._preGUI,d),u&&(r.set(e),f.nestedProperty(l,s.id+".camera").set(e)),h&&(a.set(i),f.nestedProperty(l,s.id+".aspectratio").set(i),s.glplot.redraw())}return p},w.updateFx=function(t,e){var r=this,n=r.camera;if(n)if("orbit"===t)n.mode="orbit",n.keyBindingMode="rotate";else if("turntable"===t){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 h=r.id+".camera.up",p={x:0,y:0,z:1},d={};d[h]=p;var v=i.layout;c.call("_storeDirectGUIEdit",v,a._preGUI,d),o.up=p,f.nestedProperty(v,h).set(p)}}else n.keyBindingMode=t;r.fullSceneLayout.hovermode=e},w.toImage=function(t){var e=this;t||(t="png"),e.staticMode&&e.container.appendChild(n),e.glplot.redraw();var r=e.glplot.gl,i=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);r.readPixels(0,0,i,a,r.RGBA,r.UNSIGNED_BYTE,o),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l,u=s.getContext("2d",{willReadFrequently:!0}),c=u.createImageData(i,a);switch(c.data.set(o),u.putImageData(c,0,0),t){case"jpeg":l=s.toDataURL("image/jpeg");break;case"webp":l=s.toDataURL("image/webp");break;default:l=s.toDataURL("image/png")}return e.staticMode&&e.container.removeChild(n),l},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this,e=t.graphDiv._fullLayout;t._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(t._mockAxis,e)},t.exports=_},90060:function(t){"use strict";t.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;aOpenStreetMap
contributors',a=['© Carto',i].join(" "),o=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),s={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:i,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:a,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}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:a,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}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:o,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:o,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},l=n(s);t.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:s,styleValuesNonMapbox:l,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join("\n"),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("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",l.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),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("\n"),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\')'}}},13056:function(t,e,r){"use strict";var n=r(71828);t.exports=function(t,e){var r=t.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,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}switch(a){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s}return{anchor:u[0]&&u[1]?u.join("-"):u[0]?u[0]:u[1]?u[1]:"center",offset:c}}},50101:function(t,e,r){"use strict";var n=r(44517),i=r(71828),a=i.strTranslate,o=i.strScale,s=r(27659).AU,l=r(77922),u=r(39898),c=r(91424),f=r(63893),h=r(10481),p="mapbox",d=e.constants=r(77734);function v(t){return"string"==typeof t&&(-1!==d.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://"))}e.name=p,e.attr="subplot",e.idRoot=p,e.idRegex=e.attrRegex=i.counterRegex(p),e.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},e.layoutAttributes=r(23585),e.supplyLayoutDefaults=r(77882),e.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.mapbox;if(n.version!==d.requiredVersion)throw new Error(d.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(d.multipleTokensErrorMsg),n[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=y.split("|").join("
");x.text(w).attr("data-unformatted",w).call(f.convertToTspans,t),b=c.bBox(x.node())}x.attr("transform",a(-3,8-b.height)),m.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 T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];m.attr("transform",a(k[0],k[1])+o(T))}},e.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function c(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.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=u(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,u(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};return"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates),a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution)),a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&g(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&u.click(n,e.originalEvent)}}},b.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=function(t,r){r.isRect?(t.range={})[e.id]=[u([r.xmin,r.ymin]),u([r.xmax,r.ymax])]:(t.lassoPoints={})[e.id]=r.map(u)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),h(o)||f(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearOutline),e.dragOptions.prepFn=function(t,r,n){p(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearOutline),e.div.onmousedown=null,e.div.ontouchstart=null,e.div.removeEventListener("touchstart",e.div._ontouchstart),e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function u(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},b.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},b.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){_.sendDataToCloud(t)}));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})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},_.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=_.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var k=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];function M(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&D.length>1){for(s.getComponentMethod("grid","sizeDefaults")(u,l),o=0;o15&&D.length>15&&0===l.shapes.length&&0===l.images.length,_.linkSubplots(h,l,f,n),_.cleanPlot(h,l,f,n);var N=!(!n._has||!n._has("gl2d")),j=!(!l._has||!l._has("gl2d")),U=!(!n._has||!n._has("cartesian"))||N,V=!(!l._has||!l._has("cartesian"))||j;U&&!V?n._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),n._zoomlayer&&!t._dragging&&d({_fullLayout:n}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=_.layoutAttributes.width.min,p=_.layoutAttributes.height.min;n1,v=!e.height&&Math.abs(r.height-i)>1;(v||d)&&(d&&(r.width=n),v&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),_.sanitizeMargins(r)},_.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,o,l=s.componentsRegistry,u=e._basePlotModules,f=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(t,e);for(var h in u.length||u.push(f),e._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(c.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(p){var m=(r.t+r.b)/p;m>1&&(r.t/=m,r.b/=m)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,w=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;d[e]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:w,size:r.t+g}},v[e]=1}else delete d[e],delete v[e];if(!n._replotting)return _.doAutoMargin(t)}},_.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),P(e);var i=e._size,a=e.margin,l=c.extendFlat({},i),u=a.l,f=a.r,h=a.t,d=a.b,v=e._pushmargin,g=e._pushmarginIds,y=e.minreducedwidth,m=e.minreducedheight;if(!1!==e.margin.autoexpand){for(var x in v)g[x]||delete v[x];for(var b in v.base={l:{val:0,size:u},r:{val:1,size:f},t:{val:1,size:h},b:{val:0,size:d}},v){var w=v[b].l||{},T=v[b].b||{},k=w.val,A=w.size,M=T.val,S=T.size;for(var E in v){if(o(A)&&v[E].r){var L=v[E].r.val,C=v[E].r.size;if(L>k){var O=(A*L+(C-r)*k)/(L-k),I=(C*(1-k)+(A-r)*(1-L))/(L-k);O+I>u+f&&(u=O,f=I)}}if(o(S)&&v[E].t){var D=v[E].t.val,z=v[E].t.size;if(D>M){var R=(S*D+(z-n)*M)/(D-M),F=(z*(1-M)+(S-n)*(1-D))/(D-M);R+F>d+h&&(d=R,h=F)}}}}}var B=c.constrain(r-a.l-a.r,2,y),N=c.constrain(n-a.t-a.b,2,m),j=Math.max(0,r-B),U=Math.max(0,n-N);if(j){var V=(u+f)/j;V>1&&(u/=V,f/=V)}if(U){var H=(d+h)/U;H>1&&(d/=H,h/=H)}if(i.l=Math.round(u),i.r=Math.round(f),i.t=Math.round(h),i.b=Math.round(d),i.p=Math.round(a.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&(_.didMarginChange(l,i)||function(t){if("_redrawFromAutoMarginCount"in t._fullLayout)return!1;var e=p.list(t,"",!0);for(var r in e)if(e[r].autoshift||e[r].shift)return!0;return!1}(t))){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var q=3*(1+Object.keys(g).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return s.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,o=0;function l(){return a++,function(){var e;o++,n||o!==a||(e=i,t._transitionData&&(function(t){if(t)for(;t.length;)t.shift()}(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return s.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)))}}r.runFn(l),setTimeout(l())}))}],a=c.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}_.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},_.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&_.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function u(t,e){if("function"==typeof t)return e?"_function_":null;if(c.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!c.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=u(t[a],e)}else e&&(i[a]="_function")})),i}return Array.isArray(t)?t.map((function(t){return u(t,e)})):c.isTypedArray(t)?c.simpleMap(t,c.identity):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=u(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return l&&(f.frames=u(l)),a&&(f.config=u(t._context,!0)),"object"===n?f:JSON.stringify(f)},_.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:h,y:h}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(o,u,f),i=0;i1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:u,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),u=(-o+l)/(2*a),c=(-o-l)/(2*a);return[[u,e*u+i+n],[c,e*c+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return"M"+h(c(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t=90||i>90&&a>=450?1:s<=0&&u<=0?0:Math.max(s,u),[i<=180&&a>=180||i>180&&a>=540?-1:o>=0&&l>=0?0:Math.min(o,l),i<=270&&a>=270||i>270&&a>=630?-1:s>=0&&u>=0?0:Math.min(s,u),a>=360?1:o<=0&&l<=0?0:Math.max(o,l),e]}(d),_=b[2]-b[0],w=b[3]-b[1],T=p/h,k=Math.abs(w/_);T>k?(v=h,x=(p-(g=h*k))/i.h/2,y=[s[0],s[1]],m=[f[0]+x,f[1]-x]):(g=p,x=(h-(v=p/k))/i.w/2,y=[s[0]+x,s[1]-x],m=[f[0],f[1]]),r.xLength2=v,r.yLength2=g,r.xDomain2=y,r.yDomain2=m;var A,M=r.xOffset2=i.l+i.w*y[0],S=r.yOffset2=i.t+i.h*(1-m[1]),E=r.radius=v/_,L=r.innerRadius=r.getHole(e)*E,C=r.cx=M-E*b[0],P=r.cy=S+E*b[3],O=r.cxx=C-M,I=r.cyy=P-S,D=a.side;"counterclockwise"===D?(A=D,D="top"):"clockwise"===D&&(A=D,D="bottom"),r.radialAxis=r.mockAxis(t,e,a,{_id:"x",side:D,_trueSide:A,domain:[L/i.w,E/i.w]}),r.angularAxis=r.mockAxis(t,e,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(t,e),r.updateAngularAxis(t,e),r.updateRadialAxis(t,e),r.updateRadialAxisTitle(t,e),r.xaxis=r.mockCartesianAxis(t,e,{_id:"x",domain:y}),r.yaxis=r.mockCartesianAxis(t,e,{_id:"y",domain:m});var F=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",F).attr("transform",l(O,I)),n.frontplot.attr("transform",l(M,S)).call(c.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",F).attr("transform",l(C,P)).call(u.fill,e.bgcolor)},N.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},N.mockCartesianAxis=function(t,e,r){var n=this,i=n.isSmith,a=r._id,s=o.extendFlat({type:"linear"},r);p(s,t);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var t=n.sectorBBox,r=l[a],i=n.radialAxis._rl,o=(i[1]-i[0])/(1-n.getHole(e));s.range=[t[r[0]]*o,t[r[1]]*o]},s.isPtWithinRange="x"!==a||i?function(){return!0}:function(t){return n.isPtInside(t)},s.setRange(),s.setScale(),s},N.doAutoRange=function(t,e){var r=this,n=r.gd,i=r.radialAxis,a=r.getRadial(e);v(n,i);var o=i.range;a.range=o.slice(),a._input.range=o.slice(),i._rl=[i.r2l(o[0],null,"gregorian"),i.r2l(o[1],null,"gregorian")]},N.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,f=r.cx,p=r.cy,d=r.getRadial(e),v=z(r.getSector(e)[0],360),g=r.radialAxis,y=c90&&v<=270&&(g.tickangle=180);var x=m?function(t){var e=I(r,C([t.x,0]));return l(e[0]-f,e[1]-p)}:function(t){return l(g.l2p(t.x)+c,0)},b=m?function(t){return O(r,t.x,-1/0,1/0)}:function(t){return r.pathArc(g.r2p(t.x)+c)},_=j(d);if(r.radialTickLayout!==_&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),y){g.setScale();var w=0,T=m?(g.tickvals||[]).filter((function(t){return t>=0})).map((function(t){return h.tickText(g,t,!0,!1)})):h.calcTicks(g),k=m?T:h.clipEnds(g,T),A=h.getTickSigns(g)[2];m&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(A=-A),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),h.drawTicks(n,g,{vals:T,layer:i["radial-axis"],path:h.makeTickPath(g,0,A),transFn:x,crisp:!1}),h.drawGrid(n,g,{vals:k,layer:i["radial-grid"],path:b,transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:T,layer:i["radial-axis"],transFn:x,labelFns:h.makeLabelFns(g,w)})}var M=r.radialAxisAngle=r.vangles?F(U(R(d.angle),r.vangles)):d.angle,S=l(f,p),E=S+s(-M);V(i["radial-axis"],y&&(d.showticklabels||d.ticks),{transform:E}),V(i["radial-grid"],y&&d.showgrid,{transform:m?"":S}),V(i["radial-line"].select("line"),y&&d.showline,{x1:m?-a:c,y1:0,x2:a,y2:0,transform:E}).attr("stroke-width",d.linewidth).call(u.stroke,d.linecolor)},N.updateRadialAxisTitle=function(t,e,r){if(!this.isSmith){var n=this,i=n.gd,a=n.radius,o=n.cx,s=n.cy,l=n.getRadial(e),u=n.id+"title",f=0;if(l.title){var h=c.bBox(n.layers["radial-axis"].node()).height,p=l.title.font.size,d=l.side;f="top"===d?p:"counterclockwise"===d?-(h+.4*p):h+.8*p}var v=void 0!==r?r:n.radialAxisAngle,g=R(v),y=Math.cos(g),m=Math.sin(g),b=o+a/2*y+f*m,_=s-a/2*m+f*y;n.layers["radial-axis-title"]=x.draw(i,u,{propContainer:l,propName:n.id+".radialaxis.title",placeholder:D(i,"Click to enter radial axis title"),attributes:{x:b,y:_,"text-anchor":"middle"},transform:{rotate:-v}})}},N.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,c=r.innerRadius,f=r.cx,p=r.cy,d=r.getAngular(e),v=r.angularAxis,g=r.isSmith;g||(r.fillViewInitialKey("angularaxis.rotation",d.rotation),v.setGeometry(),v.setScale());var y=g?function(t){var e=I(r,C([0,t.x]));return Math.atan2(e[0]-f,e[1]-p)-Math.PI/2}:function(t){return v.t2g(t.x)};"linear"===v.type&&"radians"===v.thetaunit&&(v.tick0=F(v.tick0),v.dtick=F(v.dtick));var m=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},x=g?function(t){var e=I(r,C([0,t.x]));return l(e[0],e[1])}:function(t){return m(y(t))},b=g?function(t){var e=I(r,C([0,t.x])),n=Math.atan2(e[0]-f,e[1]-p)-Math.PI/2;return l(e[0],e[1])+s(-F(n))}:function(t){var e=y(t);return m(e)+s(-F(e))},_=g?function(t){return P(r,t.x,0,1/0)}:function(t){var e=y(t),r=Math.cos(e),n=Math.sin(e);return"M"+[f+c*r,p-c*n]+"L"+[f+a*r,p-a*n]},w=h.makeLabelFns(v,0).labelStandoff,T={xFn:function(t){var e=y(t);return Math.cos(e)*w},yFn:function(t){var e=y(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(w+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*M)},anchorFn:function(t){var e=y(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=y(t);return-.5*(1+Math.sin(n))*r}},k=j(d);r.angularTickLayout!==k&&(i["angular-axis"].selectAll("."+v._id+"tick").remove(),r.angularTickLayout=k);var A,S=g?[1/0].concat(v.tickvals||[]).map((function(t){return h.tickText(v,t,!0,!1)})):h.calcTicks(v);if(g&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===e.gridshape?(A=S.map(y),o.angleDelta(A[0],A[1])<0&&(A=A.slice().reverse())):A=null,r.vangles=A,"category"===v.type&&(S=S.filter((function(t){return o.isAngleInsideSector(y(t),r.sectorInRad)}))),v.visible){var E="inside"===v.ticks?-1:1,L=(v.linewidth||1)/2;h.drawTicks(n,v,{vals:S,layer:i["angular-axis"],path:"M"+E*L+",0h"+E*v.ticklen,transFn:b,crisp:!1}),h.drawGrid(n,v,{vals:S,layer:i["angular-grid"],path:_,transFn:o.noop,crisp:!1}),h.drawLabels(n,v,{vals:S,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:x,labelFns:T})}V(i["angular-line"].select("path"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr("stroke-width",d.linewidth).call(u.stroke,d.linecolor)},N.updateFx=function(t,e){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1)),this.updateHoverAndMainDrag(t))},N.updateHoverAndMainDrag=function(t){var e,r,s=this,u=s.isSmith,c=s.gd,f=s.layers,h=t._zoomlayer,p=S.MINZOOM,d=S.OFFEDGE,v=s.radius,x=s.innerRadius,T=s.cx,k=s.cy,A=s.cxx,M=s.cyy,L=s.sectorInRad,C=s.vangles,P=s.radialAxis,O=E.clampTiny,I=E.findXYatLength,D=E.findEnclosingVertexAngles,z=S.cornerHalfWidth,R=S.cornerLen/2,F=g.makeDragger(f,"path","maindrag",!1===t.dragmode?"none":"crosshair");n.select(F).attr("d",s.pathSubplot()).attr("transform",l(T,k)),F.onmousemove=function(t){m.hover(c,t,s.id),c._fullLayout._lasthover=F,c._fullLayout._hoversubplot=s.id},F.onmouseout=function(t){c._dragging||y.unhover(c,t)};var B,N,j,U,V,H,q,G,Z,Y={element:F,gd:c,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function W(t,e){return Math.sqrt(t*t+e*e)}function X(t,e){return W(t-A,e-M)}function J(t,e){return Math.atan2(M-e,t-A)}function K(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function $(t,e){if(0===t)return s.pathSector(2*z);var r=R/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,v)),o=a-z,l=a+z;return"M"+K(o,n)+"A"+[o,o]+" 0,0,0 "+K(o,i)+"L"+K(l,i)+"A"+[l,l]+" 0,0,1 "+K(l,n)+"Z"}function Q(t,e,r){if(0===t)return s.pathSector(2*z);var n,i,a=K(t,e),o=K(t,r),l=O((a[0]+o[0])/2),u=O((a[1]+o[1])/2);if(l&&u){var c=u/l,f=-1/c,h=I(z,c,l,u);n=I(R,f,h[0][0],h[0][1]),i=I(R,f,h[1][0],h[1][1])}else{var p,d;u?(p=R,d=z):(p=z,d=R),n=[[l-p,u-d],[l+p,u-d]],i=[[l-p,u+d],[l+p,u+d]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function tt(t,e){return e=Math.max(Math.min(e,v),x),tp?(t-1&&1===t&&_(e,c,[s.xaxis],[s.yaxis],s.id,Y),r.indexOf("event")>-1&&m.click(c,e,s.id)}Y.prepFn=function(t,n,a){var l=c._fullLayout.dragmode,f=F.getBoundingClientRect();c._fullLayout._calcInverseTransform(c);var p=c._fullLayout._invTransform;e=c._fullLayout._invScaleX,r=c._fullLayout._invScaleY;var d=o.apply3DTransform(p)(n-f.left,a-f.top);if(B=d[0],N=d[1],C){var y=E.findPolygonOffset(v,L[0],L[1],C);B+=A+y[0],N+=M+y[1]}switch(l){case"zoom":Y.clickFn=st,u||(Y.moveFn=C?it:rt,Y.doneFn=at,function(){j=null,U=null,V=s.pathSubplot(),H=!1;var t=c._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(G=g.makeZoombox(h,q,T,k,V)).attr("fill-rule","evenodd"),Z=g.makeCorners(h,T,k),w(c)}());break;case"select":case"lasso":b(t,n,a,Y,l)}},y.init(Y)},N.updateRadialDrag=function(t,e,r){var i=this,u=i.gd,c=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,v=i.radialAxis,m=S.radialDragBoxSize,x=m/2;if(v.visible){var b,_,T,M=R(i.radialAxisAngle),E=v._rl,L=E[0],C=E[1],P=E[r],O=.75*(E[1]-E[0])/(1-i.getHole(e))/f;r?(b=p+(f+x)*Math.cos(M),_=d-(f+x)*Math.sin(M),T="radialdrag"):(b=p+(h-x)*Math.cos(M),_=d-(h-x)*Math.sin(M),T="radialdrag-inner");var I,D,z,B=g.makeRectDragger(c,T,"crosshair",-x,-x,m,m),N={element:B,gd:u};!1===t.dragmode&&(N.dragmode=!1),V(n.select(B),v.visible&&h0==(r?z>L:zn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,u=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o0?1:0}function r(t){var e=t[0],r=t[1];if(!isFinite(e)||!isFinite(r))return[1,0];var n=(e+1)*(e+1)+r*r;return[(e*e+r*r-1)/n,2*r/n]}function n(t,e){var r=e[0],n=e[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function i(t,e){return e*t.radius}t.exports={smith:r,reactanceArc:function(t,e,a,o){var s=n(t,r([a,e])),l=s[0],u=s[1],c=n(t,r([o,e])),f=c[0],h=c[1];if(0===e)return["M"+l+","+u,"L"+f+","+h].join(" ");var p=i(t,1/Math.abs(e));return["M"+l+","+u,"A"+p+","+p+" 0 0,"+(e<0?1:0)+" "+f+","+h].join(" ")},resistanceArc:function(t,a,o,s){var l=i(t,1/(a+1)),u=n(t,r([a,o])),c=u[0],f=u[1],h=n(t,r([a,s])),p=h[0],d=h[1];if(e(o)!==e(s)){var v=n(t,r([a,0]));return["M"+c+","+f,"A"+l+","+l+" 0 0,"+(00){for(var n=[],i=0;i=c&&(h.min=0,d.min=0,g.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function v(t,e,r,n){var i=h[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o("uirevision",n.uirevision),e.type="linear";var p=o("color"),d=p!==i.color.dflt?p:r.font.color,v=e._name.charAt(0).toUpperCase(),g="Component "+v,y=o("title.text",g);e._hovertitle=y===g?y:v,a.coerceFont(o,"title.font",{family:r.font.family,size:a.bigFont(r.font.size),color:d}),o("min"),c(t,e,o,"linear"),l(t,e,o,"linear"),s(t,e,o,"linear"),u(t,e,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:d}),o("tickangle"),o("tickformat")),f(t,e,o,{dfltColor:p,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o("hoverformat"),o("layer")}t.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:h,handleDefaults:d,font:e.font,paper_bgcolor:e.paper_bgcolor})}},64380:function(t,e,r){"use strict";var n=r(39898),i=r(84267),a=r(73972),o=r(71828),s=o.strTranslate,l=o._,u=r(7901),c=r(91424),f=r(21994),h=r(1426).extendFlat,p=r(74875),d=r(89298),v=r(28569),g=r(30211),y=r(64505),m=y.freeMode,x=y.rectMode,b=r(92998),_=r(47322).prepSelect,w=r(47322).selectOnClick,T=r(47322).clearOutline,k=r(47322).clearSelectionsCache,A=r(85555);function M(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=M;var S=M.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=this,n=e[r.id],i=e._size;r._hasClipOnAxisFalse=!1;for(var a=0;aE*b?i=(a=b)*E:a=(i=x)/E,o=y*i/x,l=m*a/b,r=e.l+e.w*v-i/2,n=e.t+e.h*(1-g)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:"linear",range:[w+2*k-_,_-w-2*T],domain:[v-o/2,v+o/2],_id:"x"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,_-T-k],domain:[g-l/2,g+l/2],_id:"y"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var A=p.yaxis.domain[0],M=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(M,p.graphDiv._fullLayout),M.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var L=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[A,A+l*E],anchor:"free",position:0,_id:"y",_length:i});f(L,p.graphDiv._fullLayout),L.setScale();var C="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",C),p.layers.plotbg.select("path").attr("d",C);var P="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",P);var O=s(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",O),p.clipDefRelative.select("path").attr("transform",null);var I=s(r-S._offset,n+a);p.layers.baxis.attr("transform",I),p.layers.bgrid.attr("transform",I);var D=s(r+i/2,n)+"rotate(30)"+s(0,-M._offset);p.layers.aaxis.attr("transform",D),p.layers.agrid.attr("transform",D);var z=s(r+i/2,n)+"rotate(-30)"+s(0,-L._offset);p.layers.caxis.attr("transform",z),p.layers.cgrid.attr("transform",z),p.drawAxes(!0),p.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(u.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(u.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",L.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(u.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),c.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this,r=e.graphDiv,n=e.id.substr(7)+"title",i=e.layers,a=e.aaxis,o=e.baxis,s=e.caxis;if(e.drawAx(a),e.drawAx(o),e.drawAx(s),t){var u=Math.max(a.showticklabels?a.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(o.showticklabels?o.tickfont.size:0)+("outside"===o.ticks?o.ticklen:0)+3;i["a-title"]=b.draw(r,"a"+n,{propContainer:a,propName:e.id+".aaxis.title",placeholder:l(r,"Click to enter Component A title"),attributes:{x:e.x0+e.w/2,y:e.y0-a.title.font.size/3-u,"text-anchor":"middle"}}),i["b-title"]=b.draw(r,"b"+n,{propContainer:o,propName:e.id+".baxis.title",placeholder:l(r,"Click to enter Component B title"),attributes:{x:e.x0-c,y:e.y0+e.h+.83*o.title.font.size+c,"text-anchor":"middle"}}),i["c-title"]=b.draw(r,"c"+n,{propContainer:s,propName:e.id+".caxis.title",placeholder:l(r,"Click to enter Component C title"),attributes:{x:e.x0+e.w+c,y:e.y0+e.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},S.drawAx=function(t){var e,r=this,n=r.graphDiv,i=t._name,a=i.charAt(0),s=t._id,l=r.layers[i],u=a+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);r[u]!==c&&(l.selectAll("."+s+"tick").remove(),r[u]=c),t.setScale();var f=d.calcTicks(t),h=d.clipEnds(t,f),p=d.makeTransTickFn(t),v=d.getTickSigns(t)[2],g=o.deg2rad(30),y=v*(t.linewidth||1)/2,m=v*t.ticklen,x=r.w,b=r.h,_="b"===a?"M0,"+y+"l"+Math.sin(g)*m+","+Math.cos(g)*m:"M"+y+",0l"+Math.cos(g)*m+","+-Math.sin(g)*m,w={a:"M0,0l"+b+",-"+x/2,b:"M0,0l-"+x/2+",-"+b,c:"M0,0l-"+b+","+x/2}[a];d.drawTicks(n,t,{vals:"inside"===t.ticks?h:f,layer:l,path:_,transFn:p,crisp:!1}),d.drawGrid(n,t,{vals:h,layer:r.layers[a+"grid"],path:w,transFn:p,crisp:!1}),d.drawLabels(n,t,{vals:f,layer:l,transFn:p,labelFns:d.makeLabelFns(t,0,30)})};var L=A.MINZOOM/2+.87,C="m-0.87,.5h"+L+"v3h-"+(L+5.2)+"l"+(L/2+2.6)+",-"+(.87*L+4.5)+"l2.6,1.5l-"+L/2+","+.87*L+"Z",P="m0.87,.5h-"+L+"v3h"+(L+5.2)+"l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-2.6,1.5l"+L/2+","+.87*L+"Z",O="m0,1l"+L/2+","+.87*L+"l2.6,-1.5l-"+(L/2+2.6)+",-"+(.87*L+4.5)+"l-"+(L/2+2.6)+","+(.87*L+4.5)+"l2.6,1.5l"+L/2+",-"+.87*L+"Z",I=!0;function D(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,y,b,T,k,M=this,S=M.layers.plotbg.select("path").node(),L=M.graphDiv,z=L._fullLayout._zoomlayer;function R(t){var e={};return e[M.id+".aaxis.min"]=t.a,e[M.id+".baxis.min"]=t.b,e[M.id+".caxis.min"]=t.c,e}function F(t,e){var r=L._fullLayout.clickmode;D(L),2===t&&(L.emit("plotly_doubleclick",null),a.call("_guiRelayout",L,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&w(e,L,[M.xaxis],[M.yaxis],M.id,M.dragOptions),r.indexOf("event")>-1&&g.click(L,e,M.id)}function B(t,e){return 1-e/M.h}function N(t,e){return 1-(t+(M.h-e)/Math.sqrt(3))/M.w}function j(t,e){return(t-(M.h-e)/Math.sqrt(3))/M.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),u=Math.max(0,Math.min(1,N(r,n),N(o,s))),c=Math.max(0,Math.min(1,j(r,n),j(o,s))),v=(l/2+c)*M.w,g=(1-l/2-u)*M.w,m=(v+g)/2,x=g-v,_=(1-l)*M.h,w=_-x/E;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),b=!0),L.emit("plotly_relayouting",R(p))}function V(){D(L),p!==f&&(a.call("_guiRelayout",L,R(p)),I&&L.data&&L._context.showTips&&(o.notifier(l(L,"Double-click to zoom back out"),"long"),I=!1))}function H(t,e){var r=t/M.xaxis._m,n=e/M.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),u=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[u]},e=(f.a-p.a)*M.yaxis._m,t=(f.c-p.c-f.b+p.b)*M.xaxis._m);var h=s(M.x0+t,M.y0+e);M.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var d=s(-t,-e);M.clipDefRelative.select("path").attr("transform",d),M.aaxis.range=[p.a,M.sum-p.b-p.c],M.baxis.range=[M.sum-p.a-p.c,p.b],M.caxis.range=[M.sum-p.a-p.b,p.c],M.drawAxes(!1),M._hasClipOnAxisFalse&&M.plotContainer.select(".scatterlayer").selectAll(".trace").call(c.hideOutsideRangePoints,M),L.emit("plotly_relayouting",R(p))}function q(){a.call("_guiRelayout",L,R(p))}this.dragOptions={element:S,gd:L,plotinfo:{id:M.id,domain:L._fullLayout[M.id].domain,xaxis:M.xaxis,yaxis:M.yaxis},subplot:M.id,prepFn:function(a,l,c){M.dragOptions.xaxes=[M.xaxis],M.dragOptions.yaxes=[M.yaxis],t=L._fullLayout._invScaleX,e=L._fullLayout._invScaleY;var v=M.dragOptions.dragmode=L._fullLayout.dragmode;m(v)?M.dragOptions.minDrag=1:M.dragOptions.minDrag=void 0,"zoom"===v?(M.dragOptions.moveFn=U,M.dragOptions.clickFn=F,M.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,L._fullLayout._calcInverseTransform(L);var c=L._fullLayout._invTransform,v=o.apply3DTransform(c)(r,n);r=v[0],n=v[1],f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,h=M.aaxis.range[1]-f.a,d=i(M.graphDiv._fullLayout[M.id].bgcolor).getLuminance(),y="M0,"+M.h+"L"+M.w/2+", 0L"+M.w+","+M.h+"Z",b=!1,T=z.append("path").attr("class","zoombox").attr("transform",s(M.x0,M.y0)).style({fill:d>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",y),k=z.append("path").attr("class","zoombox-corners").attr("transform",s(M.x0,M.y0)).style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),M.clearOutline(L)}(0,l,c)):"pan"===v?(M.dragOptions.moveFn=H,M.dragOptions.clickFn=F,M.dragOptions.doneFn=q,f={a:M.aaxis.range[0],b:M.baxis.range[1],c:M.caxis.range[1]},p=f,M.clearOutline(L)):(x(v)||m(v))&&_(a,l,c,M.dragOptions,v)}},S.onmousemove=function(t){g.hover(L,t,M.id),L._fullLayout._lasthover=S,L._fullLayout._hoversubplot=M.id},S.onmouseout=function(t){L._dragging||v.unhover(L,t)},v.init(this.dragOptions)}},73972:function(t,e,r){"use strict";var n=r(47769),i=r(64213),a=r(75138),o=r(41965),s=r(24401).addStyleRule,l=r(1426),u=r(9012),c=r(10820),f=l.extendFlat,h=l.extendDeepAll;function p(t){var r=t.name,i=t.categories,a=t.meta;if(e.modules[r])n.log("Type "+r+" already registered");else{e.subplotsRegistry[t.basePlotModule.name]||function(t){var r=t.name;if(e.subplotsRegistry[r])n.log("Plot type "+r+" already registered.");else for(var i in y(t),e.subplotsRegistry[r]=t,e.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:""});for(r=0;r")?"":e.html(t).text()}));return e.remove(),r}(w)).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},75341:function(t,e,r){"use strict";var n=r(71828);t.exports=function(t,e){for(var r=0;rf+u||!n(c))}for(var p=0;pa))return e}return void 0!==r?r:t.dflt},e.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},e.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},e.getValue=function(t,e){var r;return Array.isArray(t)?e0?e+=r:c<0&&(e-=r)}return e}function D(t){var e=c,r=t.b,i=I(t);return n.inbox(r-e,i-e,_+(i-e)/(i-r)-1)}var z=t[f+"a"],R=t[h+"a"];v=Math.abs(z.r2c(z.range[1])-z.r2c(z.range[0]));var F=n.getDistanceFunction(i,p,d,(function(t){return(p(t)+d(t))/2}));if(n.getClosest(g,F,t),!1!==t.index&&g[t.index].p!==u){k||(L=function(t){return Math.min(A(t),t.p-m.bargroupwidth/2)},C=function(t){return Math.max(M(t),t.p+m.bargroupwidth/2)});var B=g[t.index],N=y.base?B.b+B.s:B.s;t[h+"0"]=t[h+"1"]=R.c2p(B[h],!0),t[h+"LabelVal"]=N;var j=m.extents[m.extents.round(B.p)];t[f+"0"]=z.c2p(x?L(B):j[0],!0),t[f+"1"]=z.c2p(x?C(B):j[1],!0);var U=void 0!==B.orig_p;return t[f+"LabelVal"]=U?B.orig_p:B.p,t.labelLabel=l(z,t[f+"LabelVal"],y[f+"hoverformat"]),t.valueLabel=l(R,t[h+"LabelVal"],y[h+"hoverformat"]),t.baseLabel=l(R,B.b,y[h+"hoverformat"]),t.spikeDistance=(function(t){var e=c,r=t.b,i=I(t);return n.inbox(r-e,i-e,w+(i-e)/(i-r)-1)}(B)+function(t){return P(A(t),M(t),w)}(B))/2,t[f+"Spike"]=z.c2p(B.p,!0),o(B,y,t),t.hovertemplate=y.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}t.exports={hoverPoints:function(t,e,r,n,a){var o=c(t,e,r,n,a);if(o){var s=o.cd,l=s[0].trace,u=s[o.index];return o.color=f(l,u),i.getComponentMethod("errorbars","hoverInfo")(u,l,o),[o]}},hoverOnBars:c,getTraceColor:f}},60822:function(t,e,r){"use strict";t.exports={attributes:r(1486),layoutAttributes:r(43641),supplyDefaults:r(90769).supplyDefaults,crossTraceDefaults:r(90769).crossTraceDefaults,supplyLayoutDefaults:r(13957),calc:r(92290),crossTraceCalc:r(11661).crossTraceCalc,colorbar:r(4898),arraysToCalcdata:r(75341),plot:r(17295).plot,style:r(16688).style,styleOnSelect:r(16688).styleOnSelect,hoverPoints:r(95423).hoverPoints,eventData:r(58065),selectPoints:r(81974),moduleType:"trace",name:"bar",basePlotModule:r(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function(t){"use strict";t.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"}}},13957:function(t,e,r){"use strict";var n=r(73972),i=r(89298),a=r(71828),o=r(43641);t.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,u=!1,c=!1,f={},h=s("barmode"),p=0;p0}function S(t){return"auto"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function L(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,u=a.anchor||"end",c="end"===u,f="start"===u,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,v=i.height,g=Math.abs(e-t),y=Math.abs(n-r),m=g>2*_&&y>2*_?_:0;g-=2*m,y-=2*m;var x=S(l);"auto"!==l||d<=g&&v<=y||!(d>g||v>y)||(d>y||v>g)&&d.01?q:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?q(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,z),N=G(N,B,z),j=G(j,U,!z),U=G(U,j,!z)}var Z=A(a.ensureSingle(O,"path"),P,g,y);if(Z.style("vector-effect","non-scaling-stroke").attr("d",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?"M0,0Z":"M"+B+","+j+"V"+U+"H"+N+"V"+j+"Z").call(l.setClipUrl,e.layerClipId,t),!P.uniformtext.mode&&R){var Y=l.makePointStyleFns(f);l.singlePointStyle(u,Z,f,Y,t)}!function(t,e,r,n,i,s,u,f,p,g,y){var w,T=e.xaxis,M=e.yaxis,C=t._fullLayout;function P(e,r,n){return a.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t)}var O=n[0].trace,I="h"===O.orientation,D=function(t,e,r,n,i){var o,s=e[0].trace;return o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,"texttemplate");if(!s)return"";var l,u,f,h,p="histogram"===o.type,d="waterfall"===o.type,v="funnel"===o.type,g="h"===o.orientation;function y(t){return c(h,h.c2l(t),!0).text}g?(l="y",u=i,f="x",h=n):(l="x",u=n,f="y",h=i);var m,x=e[r],_={};_.label=x.p,_.labelLabel=_[l+"Label"]=(m=x.p,c(u,u.c2l(m),!0).text);var w=a.castOption(o,x.i,"text");(0===w||w)&&(_.text=w),_.value=x.s,_.valueLabel=_[f+"Label"]=y(x.s);var T={};b(T,o,x.i),(p||void 0===T.x)&&(T.x=g?_.value:_.label),(p||void 0===T.y)&&(T.y=g?_.label:_.value),(p||void 0===T.xLabel)&&(T.xLabel=g?_.valueLabel:_.labelLabel),(p||void 0===T.yLabel)&&(T.yLabel=g?_.labelLabel:_.valueLabel),d&&(_.delta=+x.rawS||x.s,_.deltaLabel=y(_.delta),_.final=x.v,_.finalLabel=y(_.final),_.initial=_.final-_.delta,_.initialLabel=y(_.initial)),v&&(_.value=x.s,_.valueLabel=y(_.value),_.percentInitial=x.begR,_.percentInitialLabel=a.formatPercent(x.begR),_.percentPrevious=x.difR,_.percentPreviousLabel=a.formatPercent(x.difR),_.percentTotal=x.sumR,_.percenTotalLabel=a.formatPercent(x.sumR));var k=a.castOption(o,x.i,"customdata");return k&&(_.customdata=k),a.texttemplateString(s,_,t._d3locale,T,_,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function u(t){return c(o?r:n,+t,!0).text}var f,h,p=i.textinfo,d=t[e],v=p.split("+"),g=[],y=function(t){return-1!==v.indexOf(t)};if(y("label")&&g.push((h=t[e].p,c(o?n:r,h,!0).text)),y("text")&&(0===(f=a.castOption(i,d.i,"text"))||f)&&g.push(f),s){var m=+d.rawS||d.s,x=d.v,b=x-m;y("initial")&&g.push(u(b)),y("delta")&&g.push(u(m)),y("final")&&g.push(u(x))}if(l){y("value")&&g.push(u(d.s));var _=0;y("percent initial")&&_++,y("percent previous")&&_++,y("percent total")&&_++;var w=_>1;y("percent initial")&&(f=a.formatPercent(d.begR),w&&(f+=" of initial"),g.push(f)),y("percent previous")&&(f=a.formatPercent(d.difR),w&&(f+=" of previous"),g.push(f)),y("percent total")&&(f=a.formatPercent(d.sumR),w&&(f+=" of total"),g.push(f))}return g.join("
")}(e,r,n,i):v.getValue(s.text,r),v.coerceString(m,o)}(C,n,i,T,M);w=function(t,e){var r=v.getValue(t.textposition,e);return v.coerceEnumerated(x,r)}(O,i);var z="stack"===g.mode||"relative"===g.mode,R=n[i],F=!z||R._outmost;if(D&&"none"!==w&&(!R.isBlank&&s!==u&&f!==p||"auto"!==w&&"inside"!==w)){var B=C.font,N=d.getBarColor(n[i],O),j=d.getInsideTextFont(O,i,B,N),U=d.getOutsideTextFont(O,i,B),V=r.datum();I?"log"===T.type&&V.s0<=0&&(s=T.range[0]0&&Z>0&&(G<=W&&Z<=X||G<=X&&Z<=W||(I?W>=G*(X/Z):X>=Z*(W/G)))?w="inside":(w="outside",H.remove(),H=null)):w="inside"),!H){var J=(H=P(r,D,Y=a.ensureUniformFontSize(t,"outside"===w?U:j))).attr("transform");if(H.attr("transform",""),G=(q=l.bBox(H.node())).width,Z=q.height,H.attr("transform",J),G<=0||Z<=0)return void H.remove()}var K,$=O.textangle;K="outside"===w?function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,u=a.angle||0,c=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/c));var v=S(u),g=E(i,v),y=(s?g.x:g.y)/2,m=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,A=0,M=s?k(e,t):k(r,n);return s?(b=e-M*o,T=M*y):(w=n+M*o,A=-M*y),{textX:m,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:A,scale:d,rotate:v}}(s,u,f,p,q,{isHorizontal:I,constrained:"both"===O.constraintext||"outside"===O.constraintext,angle:$}):L(s,u,f,p,q,{isHorizontal:I,constrained:"both"===O.constraintext||"inside"===O.constraintext,angle:$,anchor:O.insidetextanchor}),K.fontSize=Y.size,h("histogram"===O.type?"bar":O.type,K,C),R.transform=K;var Q=A(H,C,g,y);a.setTransormAndDisplay(Q,K)}else r.select("text").remove()}(t,e,O,r,p,B,N,j,U,g,y),e.layerClipId&&l.hideOutsideRangePoint(u,O.select("text"),w,C,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(u,j?null:e.layerClipId,t)}));u.getComponentMethod("errorbars","plot")(t,O,e,g)},toMoveInsideBar:L}},81974:function(t){"use strict";function e(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}t.exports=function(t,r){var n,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l="funnel"===s.type,u="h"===s.orientation,c=[];if(!1===r)for(n=0;n1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:v,styleOnSelect:function(t,e,r){var i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each((function(t){var i,s=n.select(this);if(t.selected){i=o.ensureUniformFontSize(r,g(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)}))}(t.selectAll("text"),e,r)}(r,i,t):(d(r,i,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:m,getOutsideTextFont:x,getBarColor:_,resizeText:l}},98340:function(t,e,r){"use strict";var n=r(7901),i=r(52075).hasColorscale,a=r(1586),o=r(71828).coercePattern;t.exports=function(t,e,r,s,l){var u=r("marker.color",s),c=i(t,"marker");c&&a(t,e,l,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,l,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),o(r,"marker.pattern",u,c),r("selected.marker.color"),r("unselected.marker.color")}},72597:function(t,e,r){"use strict";var n=r(39898),i=r(71828);function a(t){return"_"+t+"Text_minsize"}t.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=oh.range[1]&&(x+=Math.PI),n.getClosest(u,(function(t){return v(m,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?g+Math.min(1,Math.abs(t.thetag1-t.thetag0)/y)-1+(t.rp1-m)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=u[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,c,t),s(_,c,f,t),t.hovertemplate=c.hovertemplate,t.color=a(c,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},23381:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"barpolar",basePlotModule:r(23580),categories:["polar","bar","showLegend"],attributes:r(55023),layoutAttributes:r(40151),supplyDefaults:r(6135),supplyLayoutDefaults:r(19860),calc:r(74692).calc,crossTraceCalc:r(74692).crossTraceCalc,plot:r(60173),colorbar:r(4898),formatLabels:r(98608),style:r(16688).style,styleOnSelect:r(16688).styleOnSelect,hoverPoints:r(27379),selectPoints:r(81974),meta:{}}},40151:function(t){"use strict";t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function(t,e,r){"use strict";var n=r(71828),i=r(40151);t.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l0?(u=o,c=l):(u=l,c=o);var f=[s.findEnclosingVertexAngles(u,t.vangles)[0],(u+c)/2,s.findEnclosingVertexAngles(c,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,u,c,f,e,r)}:function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select("g.barlayer");a.makeTraceGroups(p,r,"trace bars").each((function(){var r=n.select(this),s=a.ensureSingle(r,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(t){var e,r=n.select(this),o=t.rp0=c.c2p(t.s0),s=t.rp1=c.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var v=c.c2g(t.s1),g=(p+d)/2;t.ct=[l.c2p(v*Math.cos(g)),u.c2p(v*Math.sin(g))],e=h(o,s,p,d)}else e="M0,0Z";a.ensureSingle(r,"path").attr("d",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},53522:function(t,e,r){"use strict";var n=r(82196),i=r(1486),a=r(22399),o=r(12663).axisHoverFormat,s=r(5386).f,l=r(1426).extendFlat,u=n.marker,c=u.line;t.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:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,xhoverformat:o("x"),yhoverformat:o("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"},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:l({},u.symbol,{arrayOk:!1,editType:"plot"}),opacity:l({},u.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:l({},u.angle,{arrayOk:!1,editType:"calc"}),size:l({},u.size,{arrayOk:!1,editType:"calc"}),color:l({},u.color,{arrayOk:!1,editType:"style"}),line:{color:l({},c.color,{arrayOk:!1,dflt:a.defaultLine,editType:"style"}),width:l({},c.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:n.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:l({},n.text,{}),hovertext:l({},n.hovertext,{}),hovertemplate:s({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function(t,e,r){"use strict";var n=r(92770),i=r(89298),a=r(42973),o=r(71828),s=r(50606).BADNUM,l=o._;t.exports=function(t,e){var r,u,m,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||"x"),A=i.getFromId(t,e.yaxis||"y"),M=[],S="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(m=k,x="x",b=A,_="y",w=!!e.yperiodalignment):(m=A,x="y",b=k,_="x",w=!!e.xperiodalignment);var E,L,C,P,O,I,D=function(t,e,r,i){var s,l=e+"0"in t;if(e in t||l&&"d"+e in t){var u=r.makeCalcdata(t,e);return[a(t,r,e,u).vals,u]}s=l?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(t.name)&&"date"===r.type)?t.name:i;for(var c="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]),f=t._length,h=new Array(f),p=0;pE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return m.d2c((e[t]||[])[r])},H=1/0,q=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Z=V("lowerfence");E.lf=Z!==s&&Z<=E.q1?Z:p(E,C,P);var Y=V("upperfence");E.uf=Y!==s&&Y>=E.q3?Y:d(E,C,P);var W=V("mean");E.mean=W!==s?W:P?o.mean(C,P):(E.q1+E.q3)/2;var X=V("sd");E.sd=W!==s&&X>=0?X:P?o.stdev(C,P,E.mean):E.q3-E.q1,E.lo=v(E),E.uo=g(E);var J=V("notchspan");J=J!==s&&J>0?J:y(E,P),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,$=E.uf;e.boxpoints&&C.length&&(K=Math.min(K,C[0]),$=Math.max($,C[P-1])),e.notched&&(K=Math.min(K,E.ln),$=Math.max($,E.un)),E.min=K,E.max=$}else{var Q;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),Q=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=Q,E.q1=E.q3=Q,E.lf=E.uf=Q,E.mean=E.sd=Q,E.ln=E.un=Q,E.min=E.max=Q}H=Math.min(H,E.min),q=Math.max(q,E.max),E.pts2=L.filter(j),M.push(E)}}e._extremes[m._id]=i.findExtremes(m,[H,q],{padded:!0})}else{var tt=m.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ct,ft;(E={}).pos=E[_]=B[r],L=E.pts=nt[r].sort(f),P=(C=E[x]=L.map(h)).length,E.min=C[0],E.max=C[P-1],E.mean=o.mean(C,P),E.sd=o.stdev(C,P,E.mean),E.med=o.interp(C,.5),P%2&&(lt||ut)?(lt?(ct=C.slice(0,P/2),ft=C.slice(P/2+1)):ut&&(ct=C.slice(0,P/2+1),ft=C.slice(P/2)),E.q1=o.interp(ct,.5),E.q3=o.interp(ft,.5)):(E.q1=o.interp(C,.25),E.q3=o.interp(C,.75)),E.lf=p(E,C,P),E.uf=d(E,C,P),E.lo=v(E),E.uo=g(E);var ht=y(E,P);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=L.filter(j),M.push(E)}e._extremes[m._id]=i.findExtremes(m,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(M[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,"median:"),min:l(t,"min:"),q1:l(t,"q1:"),q3:l(t,"q3:"),max:l(t,"max:"),mean:"sd"===e.boxmean?l(t,"mean ± σ:"):l(t,"mean:"),lf:l(t,"lower fence:"),uf:l(t,"upper fence:")}},T[S]++,M):[{t:{empty:!0}}]};var u={text:"tx",hovertext:"htx"};function c(t,e,r){for(var n in u)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[u[n]]=e[n][r[0]][r[1]]):t[u[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function v(t){return 4*t.q1-3*t.q3}function g(t){return 4*t.q3-3*t.q1}function y(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},37188:function(t,e,r){"use strict";var n=r(89298),i=r(71828),a=r(99082).getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,u,c=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],v=0;for(s=0;s1,b=1-f[t+"gap"],_=1-f[t+"groupgap"];for(s=0;s0){var q=E.pointpos,G=E.jitter,Z=E.marker.size/2,Y=0;q+G>=0&&((Y=V*(q+G))>M?(H=!0,j=Z,B=Y):Y>R&&(j=Z,B=M)),Y<=M&&(B=M);var W=0;q-G<=0&&((W=-V*(q-G))>S?(H=!0,U=Z,N=W):W>F&&(U=Z,N=S)),W<=S&&(N=S)}else B=M,N=S;var X=new Array(u.length);for(l=0;l0?(g="v",y=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",y=Math.min(_)):y=0;if(y){e._length=y;var S=r("orientation",g);e._hasPreCompStats?"v"===S&&0===x?(r("x0",0),r("dx",1)):"h"===S&&0===m&&(r("y0",0),r("dy",1)):"v"===S&&0===x?r("x0"):"h"===S&&0===m&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,u,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";e._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var c=r(a+"points",l);c?(r("jitter","all"===c?.3:0),r("pointpos","all"===c?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",e.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===c&&(r("marker.line.outliercolor",e.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 e.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(e,r)}t.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,u,r,i)}if(c(t,e,s,i),!1!==e.visible){o(t,e,i,s),s("xhoverformat"),s("yhoverformat");var l=e._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(t.marker||{}).color||r),s("line.width"),s("fillcolor",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s("mean"),d=s("sd");p&&p.length&&(h=!0,d&&d.length&&(h="sd"))}s("boxmean",h),s("whiskerwidth"),s("width"),s("quartilemethod");var v=!1;if(l){var g=s("notchspan");g&&g.length&&(v=!0)}else n.validate(t.notchwidth,u.notchwidth)&&(v=!0);s("notched",v)&&s("notchwidth"),f(t,e,s,{prefix:"box"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,u,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,u=e.pos,c=!!u.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),d.exit().remove(),d.each((function(t){var e=u.c2l(t.pos+f,!0),i=u.l2p(e-o)+h,a=u.l2p(e+s)+h,d=c?(i+a)/2:u.l2p(e)+h,v=l.c2p(t.mean,!0),g=l.c2p(t.mean-t.sd,!0),y=l.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+v+","+i+"V"+a+("sd"===p?"m0,0L"+g+","+d+"L"+v+","+i+"L"+y+","+d+"Z":"")):n.select(this).attr("d","M"+i+","+v+"H"+a+("sd"===p?"m0,0L"+d+","+g+"L"+i+","+v+"L"+d+","+y+"Z":""))}))}t.exports={plot:function(t,e,r,a){var u=e.xaxis,c=e.yaxis;i.makeTraceGroups(a,r,"trace boxes").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty?i.remove():("h"===h.orientation?(e=c,r=u):(e=u,r=c),o(i,{pos:e,val:r},h,f),s(i,{x:u,y:c},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},24626:function(t){"use strict";t.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;for(var r=1/0,a=-1/0,o=t.length,s=0;s0?Math.floor:Math.ceil,O=L>0?Math.ceil:Math.floor,I=L>0?Math.min:Math.max,D=L>0?Math.max:Math.min,z=P(S+C),R=O(E-C),F=[[f=M(S)]];for(a=z;a*L=0;i--)a[c-i]=t[f][i],o[c-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:u}),s}},20347:function(t,e,r){"use strict";var n=r(89298),i=r(1426).extendFlat;t.exports=function(t,e,r){var a,o,s,l,u,c,f,h,p,d,v,g,y,m,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t["_"+r],A=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var M=t._xctrl,S=t._yctrl,E=M[0].length,L=M.length,C=t._a.length,P=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var O=b.smoothing?3:1;function I(n){var i,a,o,s,l,u,c,f,p,d,v,g,y=[],m=[],x={};if("b"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(P-2,a))),s=a-o,x.length=P,x.crossLength=C,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),y.push(l[0]+p[0]/3),m.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),y.push(f[0]-d[0]/3),m.push(f[1]-d[1]/3)),y.push(f[0]),m.push(f[1]),l=f;else for(i=t.a2i(n),u=Math.floor(Math.max(0,Math.min(C-2,i))),c=i-u,x.length=C,x.crossLength=P,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],u,e,c,r)},a=0;a0&&(v=t.dxydj([],u,a-1,c,0),y.push(l[0]+v[0]/3),m.push(l[1]+v[1]/3),g=t.dxydj([],u,a-1,c,1),y.push(f[0]-g[0]/3),m.push(f[1]-g[1]/3)),y.push(f[0]),m.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=A,x.value=n,x.constvar=r,x.index=h,x.x=y,x.y=m,x.smoothing=A.smoothing,x}function D(n){var i,a,o,s,l,u=[],c=[],f={};if(f.length=x.length,f.crossLength=k.length,"b"===e)for(o=Math.max(0,Math.min(P-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;ix.length-1||_.push(i(D(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c;hx.length-1||v<0||v>x.length-1))for(g=x[s],y=x[v],a=0;ax[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(D(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,c=(u=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=u[1],h=c;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(I(p),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(h=c-1;hx[x.length-1]||w.push(i(I(d),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(I(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(I(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},83311:function(t,e,r){"use strict";var n=r(89298),i=r(1426).extendFlat;t.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:u}}},89740:function(t,e,r){"use strict";var n=r(39898),i=r(91424),a=r(27669),o=r(67961),s=r(11651),l=r(63893),u=r(71828),c=u.strRotate,f=u.strTranslate,h=r(18783);function p(t,e,r,s,l,u){var c="const-"+l+"-lines",f=r.selectAll("."+c).data(u);f.enter().append("path").classed(c,!0).style("vector-effect","non-scaling-stroke"),f.each((function(r){var s=r,l=s.x,u=s.y,c=a([],l,t.c2p),f=a([],u,e.c2p),h="M"+o(c,f,s.smoothing);n.select(this).attr("d",h).style("stroke-width",s.width).style("stroke",s.color).style("stroke-dasharray",i.dashStyle(s.dash,s.width)).style("fill","none")})),f.exit().remove()}function d(t,e,r,a,o,u,h,p){var d=u.selectAll("text."+p).data(h);d.enter().append("text").classed(p,!0);var v=0,g={};return d.each((function(o,u){var h;if("auto"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}u||(g={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,y=n.select(this).attr({"text-anchor":d>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),m=i.bBox(this);y.attr("transform",f(h.p[0],h.p[1])+c(h.angle)+f(o.axis.labelpadding*d,.3*m.height)),v=Math.max(v,m.width+o.axis.labelpadding)})),d.exit().remove(),g.maxExtent=v,g}t.exports=function(t,e,r,i){var l=e.xaxis,c=e.yaxis,f=t._fullLayout._clips;u.makeTraceGroups(i,r,"trace").each((function(e){var r=n.select(this),i=e[0],h=i.trace,v=h.aaxis,g=h.baxis,m=u.ensureSingle(r,"g","minorlayer"),x=u.ensureSingle(r,"g","majorlayer"),b=u.ensureSingle(r,"g","boundarylayer"),_=u.ensureSingle(r,"g","labellayer");r.style("opacity",h.opacity),p(l,c,x,0,"a",v._gridlines),p(l,c,x,0,"b",g._gridlines),p(l,c,m,0,"a",v._minorgridlines),p(l,c,m,0,"b",g._minorgridlines),p(l,c,b,0,"a-boundary",v._boundarylines),p(l,c,b,0,"b-boundary",g._boundarylines);var w=d(t,l,c,h,0,_,v._labels,"a-label"),T=d(t,l,c,h,0,_,g._labels,"b-label");!function(t,e,r,n,i,a,o,l){var c,f,h,p,d=u.aggNums(Math.min,null,r.a),v=u.aggNums(Math.max,null,r.a),g=u.aggNums(Math.min,null,r.b),m=u.aggNums(Math.max,null,r.b);c=.5*(d+v),f=g,h=r.ab2xy(c,f,!0),p=r.dxyda_rough(c,f),void 0===o.angle&&u.extendFlat(o,s(r,i,a,h,r.dxydb_rough(c,f))),y(t,e,r,0,h,p,r.aaxis,i,a,o,"a-title"),c=d,f=.5*(g+m),h=r.ab2xy(c,f,!0),p=r.dxydb_rough(c,f),void 0===l.angle&&u.extendFlat(l,s(r,i,a,h,r.dxyda_rough(c,f))),y(t,e,r,0,h,p,r.baxis,i,a,l,"b-title")}(t,_,h,0,l,c,w,T),function(t,e,r,n,i){var s,l,c,f,h=r.select("#"+t._clipPathId);h.size()||(h=r.append("clipPath").classed("carpetclip",!0));var p=u.ensureSingle(h,"path","carpetboundary"),d=e.clipsegments,v=[];for(f=0;f90&&m<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+g)*v*a-_),b.attr("transform",f(e.p[0],e.p[1])+c(e.angle)+f(0,_)).attr("text-anchor","middle").call(i.font,h.title.font)})),b.exit().remove()}},11435:function(t,e,r){"use strict";var n=r(35509),i=r(65888).findBin,a=r(45664),o=r(20349),s=r(54495),l=r(73057);t.exports=function(t){var e=t._a,r=t._b,u=e.length,c=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[u-1],v=r[0],g=r[c-1],y=e[e.length-1]-e[0],m=r[r.length-1]-r[0],x=y*n.RELATIVE_CULL_TOLERANCE,b=m*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,v-=b,g+=b,t.isVisible=function(t,e){return t>p&&tv&&ed||eg},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],u,c,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),u-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),u-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),u-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(u-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),c-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(c-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(ne[u-1]|ir[c-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,v=0,g=0,y=[];ne[u-1]?(f=u-2,h=1,v=(n-e[u-1])/(e[u-1]-e[u-2])):h=o-(f=Math.max(0,Math.min(u-2,Math.floor(o)))),ir[c-1]?(p=c-2,d=1,g=(i-r[c-1])/(r[c-1]-r[c-2])):d=s-(p=Math.max(0,Math.min(c-2,Math.floor(s)))),v&&(t.dxydi(y,f,p,h,d),l[0]+=y[0]*v,l[1]+=y[1]*v),g&&(t.dxydj(y,f,p,h,d),l[0]+=y[0]*g,l[1]+=y[1]*g)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=m*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},72505:function(t,e,r){"use strict";var n=r(71828);t.exports=function(t,e,r){var i,a,o,s=[],l=[],u=t[0].length,c=t.length;function f(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log("Smoother converged to",k,"after",A,"iterations"),t}},19237:function(t,e,r){"use strict";var n=r(71828).isArray1D;t.exports=function(t,e,r){var i=r("x"),a=i&&i.length,o=r("y"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,a&&!n(i)||s&&!n(o))e._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},69568:function(t,e,r){"use strict";var n=r(5386).f,i=r(19316),a=r(50693),o=r(9012),s=r(22399).defaultLine,l=r(1426).extendFlat,u=i.marker.line;t.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},u.color,{dflt:s}),width:l({},u.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:i.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function(t,e,r){"use strict";var n=r(92770),i=r(50606).BADNUM,a=r(78803),o=r(75225),s=r(66279);function l(t){return t&&"string"==typeof t}t.exports=function(t,e){var r,u=e._length,c=new Array(u);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f")}}(t,f,o),[t]}},51319:function(t,e,r){"use strict";t.exports={attributes:r(69568),supplyDefaults:r(61869),colorbar:r(61243),calc:r(38675),calcGeoJSON:r(99841).calcGeoJSON,plot:r(99841).plot,style:r(99636).style,styleOnSelect:r(99636).styleOnSelect,hoverPoints:r(42300),eventData:r(92069),selectPoints:r(81253),moduleType:"trace",name:"choropleth",basePlotModule:r(44622),categories:["geo","noOpacity","showLegend"],meta:{}}},99841:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(41327),o=r(90973).getTopojsonFeatures,s=r(71739).findExtremes,l=r(99636).style;t.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,u=r._length,c="geojson-id"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},t.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},12674:function(t,e,r){"use strict";var n=r(50693),i=r(12663).axisHoverFormat,a=r(5386).f,o=r(2418),s=r(9012),l=r(1426).extendFlat,u={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:a({editType:"calc"},{keys:["norm"]}),uhoverformat:i("u",1),vhoverformat:i("v",1),whoverformat:i("w",1),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),showlegend:l({},s.showlegend,{dflt:!1})};l(u,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach((function(t){u[t]=o[t]})),u.hoverinfo=l({},s.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),u.transforms=void 0,t.exports=u},31371:function(t,e,r){"use strict";var n=r(78803);t.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,u=0;uo.level||o.starts.length&&a===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,u=-1/0,c=1/0;for(r=0;r":p>u&&(n.prefixBoundary=!0);break;case"<":(pu||n.starts.length&&h===c)&&(n.prefixBoundary=!0);break;case"][":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fu&&(n.prefixBoundary=!0)}}}},90654:function(t,e,r){"use strict";var n=r(21081),i=r(86068),a=r(53572);t.exports={min:"zmin",max:"zmax",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,u=o.coloring,c=i(e,{isColorbar:!0});if("heatmap"===u){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===u&&(r._fillcolor=c);r._line={color:"lines"===u?c:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},36914:function(t){"use strict";t.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}}},83179:function(t,e,r){"use strict";var n=r(92770),i=r(14523),a=r(7901),o=a.addOpacity,s=a.opacity,l=r(74808),u=l.CONSTRAINT_REDUCTION,c=l.COMPARISON_OPS2;t.exports=function(t,e,r,a,l,f){var h,p,d,v=e.contours,g=r("contours.operation");v._operation=u[g],function(t,e){var r;-1===c.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,v),"="===g?h=v.showlines=!0:(h=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),h&&(p=r("line.color",d&&s(d)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash")),r("line.smoothing"),i(r,a,p,f)}},64237:function(t,e,r){"use strict";var n=r(74808),i=r(92770);function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}t.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},67217:function(t){"use strict";t.exports=function(t,e,r,n){var i=n("contours.start"),a=n("contours.end"),o=!1===i||!1===a,s=r("contours.size");!(o?e.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},84857:function(t,e,r){"use strict";var n=r(71828);function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}t.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),a=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},53572:function(t){"use strict";t.exports=function(t){return t.end+t.size/1e6}},81696:function(t,e,r){"use strict";var n=r(71828),i=r(36914);function a(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1,[n,a]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,v=t.z[0].length,g=e.slice(),y=h.slice();for(u=0;u<1e4;u++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[c]=i.SADDLEREMAINDER[f]):delete t.crossings[c],!(h=i.NEWDELTA[f])){n.log("Found bad marching index:",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],c=e.join(","),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var m=h[0]&&(e[0]<0||e[0]>v-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===g[0]&&e[1]===g[1]&&h[0]===y[0]&&h[1]===y[1]||r&&m)break;f=t.crossings[c]}1e4===u&&n.log("Infinite loop in contour?");var x,b,_,w,T,k,A,M,S,E,L,C,P,O,I,D=a(p[0],p[p.length-1],o,l),z=0,R=.2*t.smoothing,F=[],B=0;for(u=1;u=B;u--)if((x=F[u])=B&&x+F[b]M&&S--,t.edgepaths[S]=L.concat(p,E));break}V||(t.edgepaths[M]=p.concat(E))}for(M=0;Mt?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}t.exports=function(t){var e,r,a,o,s,l,u,c,f,h=t[0].z,p=h.length,d=h[0].length,v=2===p||2===d;for(r=0;r=0&&(n=m,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-m[1])<.01&&(m[0]-r[0])*(n[0]-m[0])>=0&&(n=m,s=l):i.log("endpt to newendpt is not vert. or horz.",r,n,m)}if(r=n,s>=0)break;f+="L"+n}if(s===t.edgepaths.length){i.log("unclosed perimeter path");break}h=s,(d=-1===p.indexOf(h))&&(h=p[0],f+="Z")}for(h=0;hn.center?n.right-s:s-n.left)/(c+Math.abs(Math.sin(u)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(u)*o);if(h<1||p<1)return 1/0;var d=y.EDGECOST*(1/(h-1)+1/(p-1));d+=y.ANGLECOST*u*u;for(var v=s-c,g=l-f,m=s+c,x=l+f,b=0;b2*y.MAXCOST)break;p&&(s/=2),l=(o=u-s/2)+1.5*s}if(h<=y.MAXCOST)return c},e.addLabelData=function(t,e,r,n){var i=e.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,u=t.theta,c=Math.sin(u),f=Math.cos(u),h=function(t,e){return[s+t*f-e*c,l+t*c+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:u,level:e.level,width:a,height:o}),n.push(p)},e.drawLabels=function(t,e,r,a,o){var l=t.selectAll("text").data(e,(function(t){return t.text+","+t.x+","+t.y+","+t.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+i+")"}).call(s.convertToTspans,r)})),o){for(var u="",c=0;cr.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if("constraint"!==r.type){var u,c=r.start,f=r.end,h=t._input.contours;c>f&&(r.start=h.start=f,f=r.end=h.end=c,c=r.start),r.size>0||(u=c===f?1:a(c,f,t.ncontours).dtick,h.size=r.size=u)}}},84426:function(t,e,r){"use strict";var n=r(39898),i=r(91424),a=r(70035),o=r(86068);t.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",(function(t){return t[0].trace.opacity})),e.each((function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,u=a.start,c="constraint"===a.type,f=!c&&"lines"===a.coloring,h=!c&&"fill"===a.coloring,p=f||h?o(r):null;e.selectAll("g.contourlevel").each((function(t){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)}));var d=a.labelfont;if(e.selectAll("g.contourlabels text").each((function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})})),c)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(h){var v;e.selectAll("g.contourfill path").style("fill",(function(t){return void 0===v&&(v=t.level),p(t.level+.5*l)})),void 0===v&&(v=u),e.selectAll("g.contourbg path").style("fill",p(v-.5*l))}})),a(t)}},8724:function(t,e,r){"use strict";var n=r(1586),i=r(14523);t.exports=function(t,e,r,a,o){var s,l=r("contours.coloring"),u="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(u=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),i(r,a,u,o)}},88085:function(t,e,r){"use strict";var n=r(21606),i=r(70600),a=r(50693),o=r(1426).extendFlat,s=i.contours;t.exports=o({carpet:{valType:"string",editType:"calc"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},59885:function(t,e,r){"use strict";var n=r(78803),i=r(71828),a=r(68296),o=r(4742),s=r(824),l=r(43907),u=r(70769),c=r(75005),f=r(22882),h=r(18670);t.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),c(d,e,e._defaultColor,t._fullLayout)}var v=function(t,e){var r,c,f,h,p,d,v,g=e._carpetTrace,y=g.aaxis,m=g.baxis;y._minDtick=0,m._minDtick=0,i.isArray1D(e.z)&&a(e,y,m,"a","b",["z"]),r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?y.makeCalcdata(e,"_a"):[],h=h?m.makeCalcdata(e,"_b"):[],c=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,v=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(v),s(v,e._emptypoints);var x=i.maxRowLength(v),b="scaled"===e.xtype?"":r,_=u(e,b,c,f,x,y),w="scaled"===e.ytype?"":h,T={a:_,b:u(e,w,p,d,v.length,m),z:v};return"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:v,containerStr:"",cLetter:"z"}),[T]}(t,e);return h(e,e._z),v}}},75005:function(t,e,r){"use strict";var n=r(71828),i=r(67684),a=r(88085),o=r(83179),s=r(67217),l=r(8724);t.exports=function(t,e,r,u){function c(r,i){return n.coerce(t,e,a,r,i)}if(c("carpet"),t.a&&t.b){if(!i(t,e,c,u,"a","b"))return void(e.visible=!1);c("text"),"constraint"===c("contours.type")?o(t,e,c,u,r,{hasHover:!1}):(s(t,e,c,(function(r){return n.coerce2(t,e,a,r)})),l(t,e,c,u,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},93740:function(t,e,r){"use strict";t.exports={attributes:r(88085),supplyDefaults:r(75005),colorbar:r(90654),calc:r(59885),plot:r(51048),style:r(84426),moduleType:"trace",name:"contourcarpet",basePlotModule:r(93612),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},51048:function(t,e,r){"use strict";var n=r(39898),i=r(27669),a=r(67961),o=r(91424),s=r(71828),l=r(87678),u=r(81696),c=r(29854),f=r(36914),h=r(84857),p=r(87558),d=r(20083),v=r(22882),g=r(4536);function y(t,e,r){var n=t.getPointAtLength(e),i=t.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 m(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}t.exports=function(t,e,r,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),T=r[0],k=T.trace,A=k._carpetTrace=v(t,k),M=t.calcdata[A.index][0];if(A.visible&&"legendonly"!==A.visible){var S=T.a,E=T.b,L=k.contours,C=p(L,e,T),P="constraint"===L.type,O=L._operation,I=P?"="===O?"lines":"fill":L.coloring,D=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(C);var z=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);u(C,z,R);var F,B,N,j,U=C;"constraint"===L.type&&(U=h(C,O)),function(t,e){var r,n,i,a,o,s,l,u,c;for(r=0;r=0;j--)F=M.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var H="M"+V.join("L")+"Z";!function(t,e,r,n,o,l){var u,c,f,h,p=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(h=0;h=0&&(h=L,d=v):Math.abs(f[1]-h[1])=0&&(h=L,d=v):s.log("endpt to newendpt is not vert. or horz.",f,h,L)}if(d>=0)break;m+=S(f,h),f=h}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}c=d,(b=-1===x.indexOf(c))&&(c=x[0],m+=S(f,h)+"Z",f=null)}for(c=0;cv&&(n.max=v),n.len=n.max-n.min}function g(t,e){var r,n=0,o=.1;return(Math.abs(t[0]-l)0?+p[c]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:m})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(c=1;c<_.length;c++)T.push(_[c][0],_[c][1]);var k=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(u.heatmap.paint,{"heatmap-weight":d?k:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":v?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),u.geojson={type:"FeatureCollection",features:f},u.heatmap.layout.visibility="visible",u}},79429:function(t,e,r){"use strict";var n=r(71828),i=r(1586),a=r(64096);t.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s("lon")||[],u=s("lat")||[],c=Math.min(l.length,u.length);c?(e._length=c,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},62474:function(t){"use strict";t.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},84684:function(t,e,r){"use strict";var n=r(89298),i=r(28178).hoverPoints,a=r(28178).getExtraText;t.exports=function(t,e,r){var o=i(t,e,r);if(o){var s=o[0],l=s.cd,u=l[0].trace,c=l[s.index];if(delete s.color,"z"in c){var f=s.subplot.mockAxis;s.z=c.z,s.zLabel=n.tickText(f,f.c2l(c.z),"hover").text}return s.extraText=a(u,c,l[0].t.labels),[s]}}},93814:function(t,e,r){"use strict";t.exports={attributes:r(64096),supplyDefaults:r(79429),colorbar:r(61243),formatLabels:r(15636),calc:r(85070),plot:r(7336),hoverPoints:r(84684),eventData:r(62474),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},t.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},49789:function(t,e,r){"use strict";var n=r(71828);t.exports=function(t,e){for(var r=0;r"),l.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;return n(i)?i:n(a)&&o?a:void 0}(c,h),[l]}}},51759:function(t,e,r){"use strict";t.exports={attributes:r(1285),layoutAttributes:r(10440),supplyDefaults:r(26199).supplyDefaults,crossTraceDefaults:r(26199).crossTraceDefaults,supplyLayoutDefaults:r(93138),calc:r(9532),crossTraceCalc:r(8984),plot:r(80461),style:r(68266).style,hoverPoints:r(63341),eventData:r(34598),selectPoints:r(81974),moduleType:"trace",name:"funnel",basePlotModule:r(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},10440:function(t){"use strict";t.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"}}},93138:function(t,e,r){"use strict";var n=r(71828),i=r(10440);t.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),u(r,s,t),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},86807:function(t,e,r){"use strict";var n=r(34e3),i=r(9012),a=r(27670).Y,o=r(5386).f,s=r(5386).s,l=r(1426).extendFlat;t.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:a({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"}}},6452:function(t,e,r){"use strict";var n=r(74875);e.name="funnelarea",e.plot=function(t,r,i,a){n.plotBasePlot(e.name,t,r,i,a)},e.clean=function(t,r,i,a){n.cleanBasePlot(e.name,t,r,i,a)}},89574:function(t,e,r){"use strict";var n=r(32354);t.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:"funnelarea"})}}},86282:function(t,e,r){"use strict";var n=r(71828),i=r(86807),a=r(27670).c,o=r(90769).handleText,s=r(37434).handleLabelsAndValues;t.exports=function(t,e,r,l){function u(r,a){return n.coerce(t,e,i,r,a)}var c=u("labels"),f=u("values"),h=s(c,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(u("label0"),u("dlabel")),p){e._length=p,u("marker.line.width")&&u("marker.line.color",l.paper_bgcolor),u("marker.colors"),u("scalegroup");var d,v=u("text"),g=u("texttemplate");if(g||(d=u("textinfo",Array.isArray(v)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),g||d&&"none"!==d){var y=u("textposition");o(t,e,l,u,y,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,u),u("title.text")&&(u("title.position"),n.coerceFont(u,"title.font",l.font)),u("aspectratio"),u("baseratio")}else e.visible=!1}},10421:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:r(6452),categories:["pie-like","funnelarea","showLegend"],attributes:r(86807),layoutAttributes:r(80097),supplyDefaults:r(86282),supplyLayoutDefaults:r(57402),calc:r(89574).calc,crossTraceCalc:r(89574).crossTraceCalc,plot:r(79187),style:r(71858),styleOne:r(63463),meta:{}}},80097:function(t,e,r){"use strict";var n=r(92774).hiddenlabels;t.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function(t,e,r){"use strict";var n=r(71828),i=r(80097);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},79187:function(t,e,r){"use strict";var n=r(39898),i=r(91424),a=r(71828),o=a.strScale,s=a.strTranslate,l=r(63893),u=r(17295).toMoveInsideBar,c=r(72597),f=c.recordMinTextSize,h=c.clearMinTextSize,p=r(53581),d=r(14575),v=d.attachFxHandlers,g=d.determineInsideTextFont,y=d.layoutAreas,m=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}t.exports=function(t,e){var r=t._context.staticPlot,c=t._fullLayout;h("funnelarea",c),m(e,t),y(e,c._size),a.makeTraceGroups(c._funnelarealayer,e,"trace").each((function(e){var h=n.select(this),d=e[0],y=d.trace;!function(t){if(t.length){var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o,s,l=Math.pow(i,2),u=e.vTotal,c=u,f=u*l/(1-l)/u,h=[];for(h.push(E()),o=t.length-1;o>-1;o--)if(!(s=t[o]).hidden){var p=s.v/c;f+=p,h.push(E())}var d=1/0,v=-1/0;for(o=0;o-1;o--)if(!(s=t[o]).hidden){var M=h[A+=1][0],S=h[A][1];s.TL=[-M,S],s.TR=[M,S],s.BL=T,s.BR=k,s.pxmid=(_=s.TR,w=s.BR,[.5*(_[0]+w[0]),.5*(_[1]+w[1])]),T=s.TL,k=s.TR}}function E(){var t,e={x:t=Math.sqrt(f),y:-t};return[e.x,e.y]}}(e),h.each((function(){var h=n.select(this).selectAll("g.slice").data(e);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each((function(o,s){if(o.hidden)n.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=y.index;var h=d.cx,m=d.cy,x=n.select(this),w=x.selectAll("path.surface").data([o]);w.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),x.call(v,t,e);var T="M"+(h+o.TR[0])+","+(m+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+"Z";w.attr("d",T),b(t,o,d);var k=p.castOption(y.textposition,o.pts),A=x.selectAll("g.slicetext").data(o.text&&"none"!==k?[0]:[]);A.enter().append("g").classed("slicetext",!0),A.exit().remove(),A.each((function(){var r=a.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),p=a.ensureUniformFontSize(t,g(y,o,c.font));r.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,p).call(l.convertToTspans,t);var d,v,x,b=i.bBox(r.node()),_=Math.min(o.BL[1],o.BR[1])+m,w=Math.max(o.TL[1],o.TR[1])+m;v=Math.max(o.TL[0],o.BL[0])+h,x=Math.min(o.TR[0],o.BR[0])+h,(d=u(v,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=p.size,f(y.type,d,c),e[s].transform=d,a.setTransormAndDisplay(r,d)}))}}));var m=n.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);m.enter().append("g").classed("titletext",!0),m.exit().remove(),m.each((function(){var e=a.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),r=y.title.text;y._meta&&(r=a.templateString(r,y._meta)),e.text(r).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,y.title.font).call(l.convertToTspans,t);var u=x(d,c._size);e.attr("transform",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},71858:function(t,e,r){"use strict";var n=r(39898),i=r(63463),a=r(72597).resizeText;t.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(".trace");a(t,e,"funnelarea"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(i,t,e)}))}))}},21606:function(t,e,r){"use strict";var n=r(82196),i=r(9012),a=r(41940),o=r(12663).axisHoverFormat,s=r(5386).f,l=r(5386).s,u=r(50693),c=r(1426).extendFlat;t.exports=c({z:{valType:"data_array",editType:"calc"},x:c({},n.x,{impliedEdits:{xtype:"array"}}),x0:c({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:c({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:c({},n.y,{impliedEdits:{ytype:"array"}}),y0:c({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:c({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:c({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:c({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:c({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:c({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:c({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:c({},n.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:o("x"),yhoverformat:o("y"),zhoverformat:o("z",1),hovertemplate:s(),texttemplate:l({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:a({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:c({},i.showlegend,{dflt:!1})},{transforms:void 0},u("",{cLetter:"z",autoColorDflt:!1}))},90757:function(t,e,r){"use strict";var n=r(73972),i=r(71828),a=r(89298),o=r(42973),s=r(17562),l=r(78803),u=r(68296),c=r(4742),f=r(824),h=r(43907),p=r(70769),d=r(50606).BADNUM;function v(t){for(var e=[],r=t.length,n=0;nz){I("x scale is not linear");break}}if(x.length&&"fast"===P){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){I("y scale is not linear");break}}}var B=i.maxRowLength(T),N="scaled"===e.xtype?"":r,j=p(e,N,g,y,B,M),U="scaled"===e.ytype?"":x,V=p(e,U,b,_,T.length,S);C||(e._extremes[M._id]=a.findExtremes(M,j),e._extremes[S._id]=a.findExtremes(S,V));var H={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&m&&(H.orig_x=m),e.yperiodalignment&&w&&(H.orig_y=w),N&&N.length===j.length-1&&(H.xCenter=N),U&&U.length===V.length-1&&(H.yCenter=U),L&&(H.xRanges=A.xRanges,H.yRanges=A.yRanges,H.pts=A.pts),E||l(t,e,{vals:T,cLetter:"z"}),E&&e.contours&&"heatmap"===e.contours.coloring){var q={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};H.xfill=p(q,N,g,y,B,M),H.yfill=p(q,U,b,_,T.length,S)}return[H]}},4742:function(t,e,r){"use strict";var n=r(92770),i=r(71828),a=r(50606).BADNUM;t.exports=function(t,e,r,o){var s,l,u,c,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||v)[2]+(f[[r+1,i]]||v)[2]+(f[[r,i-1]]||v)[2]+(f[[r,i+1]]||v)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),u=!0);if(!u)throw"findEmpties iterated with no new neighbors";for(a in l)f[a]=l[a],c.push(l[a])}return c.sort((function(t,e){return e[2]-t[2]}))}},46248:function(t,e,r){"use strict";var n=r(30211),i=r(71828),a=r(89298),o=r(21081).extractOpts;t.exports=function(t,e,r,s,l){l||(l={});var u,c,f,h,p=l.isContour,d=t.cd[0],v=d.trace,g=t.xa,y=t.ya,m=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=v.zhoverformat,A=m,M=x;if(!1!==t.index){try{f=Math.round(t.index[1]),h=Math.round(t.index[0])}catch(e){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index)}if(f<0||f>=b[0].length||h<0||h>b.length)return}else{if(n.inbox(e-m[0],e-m[m.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(p){var S;for(A=[2*m[0]-m[1]],S=1;Sv&&(y=Math.max(y,Math.abs(t[a][o]-d)/(g-v))))}return y}t.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log("interp2d didn't converge quickly",i),t}},58623:function(t,e,r){"use strict";var n=r(71828);t.exports=function(t,e){t("texttemplate");var r=n.extendFlat({},e.font,{color:"auto",size:"auto"});n.coerceFont(t,"textfont",r)}},70769:function(t,e,r){"use strict";var n=r(73972),i=r(71828).isArrayOrTypedArray;t.exports=function(t,e,r,a,o,s){var l,u,c,f=[],h=n.traceIs(t,"contour"),p=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(i(e)&&e.length>1&&!p&&"category"!==s.type){var v=e.length;if(!(v<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],c=1;c0;)w=T.c2p(F[E]),E--;for(w0;)S=k.c2p(B[E]),E--;if(SZt||Zt>k._length))for(L=Vt;LWt||Wt>T._length)){var Xt=c({x:Yt,y:Gt},I,t._fullLayout);Xt.x=Yt,Xt.y=Gt;var Jt=O.z[E][L];void 0===Jt?(Xt.z="",Xt.zLabel=""):(Xt.z=Jt,Xt.zLabel=s.tickText(Bt,Jt,"hover").text);var Kt=O.text&&O.text[E]&&O.text[E][L];void 0!==Kt&&!1!==Kt||(Kt=""),Xt.text=Kt;var $t=l.texttemplateString(Rt,Xt,t._fullLayout._d3locale,Xt,I._meta||{});if($t){var Qt=$t.split("
"),te=Qt.length,ee=0;for(C=0;C0&&(a=!0);for(var l=0;la){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]u?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:u:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&&t>o){var l=d(e,a,s),u=d(r,a,s),c=t===i?0:1;return l[c]!==u[c]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(t,e,r,n,a){var s,l,u=-1.1*e,h=-.1*e,p=t-h,d=r[0],v=r[1],g=Math.min(f(d+h,d+p,n,a),f(v+h,v+p,n,a)),y=Math.min(f(d+u,d+h,n,a),f(v+u,v+h,n,a));if(g>y&&yo){var m=s===i?1:6,x=s===i?"M12":"M1";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf("-",m);s>0&&(o=o.substr(0,s));var u=n.d2c(o,0,a);if(ur.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),D.start=r.l2r(j),F||i.nestedProperty(e,y+".start").set(D.start)}var U=b.end,V=r.r2l(I.end),H=void 0!==V;if((b.endFound||H)&&V!==r.r2l(U)){var q=H?V:i.aggNums(Math.max,null,d);D.end=r.l2r(q),H||i.nestedProperty(e,y+".start").set(D.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[y]=i.extendFlat({},e[y]||{}),delete e._input[G],delete e[G]),[D,d]}t.exports={calc:function(t,e){var r,a,p,d,v=[],g=[],y="h"===e.orientation,m=o.getFromId(t,y?e.yaxis:e.xaxis),x=y?"y":"x",b={x:"y",y:"x"}[x],_=e[x+"calendar"],w=e.cumulative,T=h(t,e,m,x),k=T[0],A=T[1],M="string"==typeof k.size,S=[],E=M?S:k,L=[],C=[],P=[],O=0,I=e.histnorm,D=e.histfunc,z=-1!==I.indexOf("density");w.enabled&&z&&(I=I.replace(/ ?density$/,""),z=!1);var R,F="max"===D||"min"===D?null:0,B=l.count,N=u[I],j=!1,U=function(t){return m.r2c(t,0,_)};for(i.isArrayOrTypedArray(e[b])&&"count"!==D&&(R=e[b],j="avg"===D,B=l[D]),r=U(k.start),p=U(k.end)+(r-o.tickIncrement(r,k.size,!1,_))/1e6;r=0&&d=0;n--)s(n);else if("increasing"===e){for(n=1;n=0;n--)t[n]+=t[n+1];"exclude"===r&&(t.push(0),t.shift())}}(g,w.direction,w.currentbin);var K=Math.min(v.length,g.length),$=[],Q=0,tt=K-1;for(r=0;r=Q;r--)if(g[r]){tt=r;break}for(r=Q;r<=tt;r++)if(n(v[r])&&n(g[r])){var et={p:v[r],s:g[r],b:0};w.enabled||(et.pts=P[r],Z?et.ph0=et.ph1=P[r].length?A[P[r][0]]:v[r]:(e._computePh=!0,et.ph0=q(S[r]),et.ph1=q(S[r+1],!0))),$.push(et)}return 1===$.length&&($[0].width1=o.tickIncrement($[0].p,k.size,!1,_)-$[0].p),s($,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected($,e,X),$},calcAllAutoBins:h}},72406:function(t){"use strict";t.exports={eventDataKeys:["binNumber"]}},82222:function(t,e,r){"use strict";var n=r(71828),i=r(41675),a=r(73972).traceIs,o=r(26125),s=n.nestedProperty,l=r(99082).getAxisGroup,u=[{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"}],c=["x","y"];t.exports=function(t,e){var r,f,h,p,d,v,g,y=e._histogramBinOpts={},m=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return"v"===t.orientation?"x":"y"}function T(t,r,a){var o=t.uid+"__"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+"calendar"]||"",u=y[r],c=!0;u&&(s===u.axType&&l===u.calendar?(c=!1,u.traces.push(t),u.dirs.push(a)):(r=o,s!==u.axType&&n.warn(["Attempted to group the bins of trace",t.index,"set on a","type:"+s,"axis","with bins on","type:"+u.axType,"axis."].join(" ")),l!==u.calendar&&n.warn(["Attempted to group the bins of trace",t.index,"set with a",l,"calendar","with bins",u.calendar?"on a "+u.calendar+" calendar":"w/o a set calendar"].join(" ")))),c&&(y[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+"calendar"]||""}),t["_"+a+"bingroup"]=r}for(d=0;dS&&T.splice(S,T.length-S),M.length>S&&M.splice(S,M.length-S);var E=[],L=[],C=[],P="string"==typeof w.size,O="string"==typeof A.size,I=[],D=[],z=P?I:w,R=O?D:A,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf("density"),H="max"===U||"min"===U?null:0,q=a.count,G=o[j],Z=!1,Y=[],W=[],X="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";X&&"count"!==U&&(Z="avg"===U,q=a[U]);var J=w.size,K=x(w.start),$=x(w.end)+(K-i.tickIncrement(K,J,!1,y))/1e6;for(r=K;r<$;r=i.tickIncrement(r,J,!1,y))L.push(H),I.push(r),Z&&C.push(0);I.push(r);var Q,tt=L.length,et=(r-K)/tt,rt=(Q=K+et/2,v.c2r(Q,0,y)),nt=A.size,it=b(A.start),at=b(A.end)+(it-i.tickIncrement(it,nt,!1,m))/1e6;for(r=it;r=0&&p=0&&d-1,flipY:C.tiling.flip.indexOf("y")>-1,orientation:C.tiling.orientation,pad:{inner:C.tiling.pad},maxDepth:C._maxDepth}).descendants(),z=1/0,R=-1/0;D.forEach((function(t){var e=t.depth;e>=C._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(z=Math.min(z,e),R=Math.max(R,e))})),d=d.data(D,c.getPtId),C._maxVisibleLayers=isFinite(R)?R-z+1:0,d.enter().append("g").classed("slice",!0),k(d,p,{},[g,y],b),d.order();var F=null;if(T&&S){var B=c.getPtId(S);d.each((function(t){null===F&&c.getPtId(t)===B&&(F={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var N=function(){return F||{x0:0,x1:g,y0:0,y1:y}},j=d;return T&&(j=j.transition().each("end",(function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),j.each((function(s){s._x0=m(s.x0),s._x1=m(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=m(s.x1-C.tiling.pad),s._hoverY=x(I?s.y1-C.tiling.pad/2:s.y0+C.tiling.pad/2);var d=n.select(this),v=i.ensureSingle(d,"path","surface",(function(t){t.style("pointer-events",E?"none":"all")}));T?v.transition().attrTween("d",(function(t){var e=A(t,p,N(),[g,y],{orientation:C.tiling.orientation,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1});return function(t){return b(e(t))}})):v.attr("d",b),d.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{isTransitioning:t._transitioning}),v.call(l,s,C,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=h(s,r,C,e,L)||"";var k=i.ensureSingle(d,"g","slicetext"),S=i.ensureSingle(k,"text","",(function(t){t.attr("data-notex",1)})),D=i.ensureUniformFontSize(t,c.determineTextFont(C,s,L.font));S.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",O?"end":P?"start":"middle").call(a.font,D).call(o.convertToTspans,t),s.textBB=a.bBox(S.node()),s.transform=_(s,{fontSize:D.size}),s.transform.fontSize=D.size,T?S.transition().attrTween("transform",(function(t){var e=M(t,p,N(),[g,y]);return function(t){return w(e(t))}})):S.attr("transform",w(s))})),F}},69816:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"icicle",basePlotModule:r(96346),categories:[],animatable:!0,attributes:r(46291),layoutAttributes:r(92894),supplyDefaults:r(56524),supplyLayoutDefaults:r(21070),calc:r(46584).y,crossTraceCalc:r(46584).T,plot:r(85596),style:r(82454).style,colorbar:r(4898),meta:{}}},92894:function(t){"use strict";t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function(t,e,r){"use strict";var n=r(71828),i=r(92894);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("iciclecolorway",e.colorway),r("extendiciclecolors")}},21538:function(t,e,r){"use strict";var n=r(674),i=r(14102);t.exports=function(t,e,r){var a=r.flipX,o=r.flipY,s="h"===r.orientation,l=r.maxDepth,u=e[0],c=e[1];l&&(u=(t.height+1)*e[0]/Math.min(t.height+1,l),c=(t.height+1)*e[1]/Math.min(t.height+1,l));var f=n.partition().padding(r.pad.inner).size(s?[e[1],u]:[e[0],c])(t);return(s||a||o)&&i(f,e,{swapXY:s,flipX:a,flipY:o}),f}},85596:function(t,e,r){"use strict";var n=r(80694),i=r(90666);t.exports=function(t,e,r,a){return n(t,e,r,a,{type:"icicle",drawDescendants:i})}},82454:function(t,e,r){"use strict";var n=r(39898),i=r(7901),a=r(71828),o=r(72597).resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,"marker.line.color")||i.defaultLine,u=a.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",u).call(i.fill,n.color).call(i.stroke,l).style("opacity",o?r.leaf.opacity:null)}t.exports={style:function(t){var e=t._fullLayout._iciclelayer.selectAll(".trace");o(t,e,"icicle"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style("opacity",r.opacity),e.selectAll("path.surface").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},17230:function(t,e,r){"use strict";for(var n=r(9012),i=r(5386).f,a=r(1426).extendFlat,o=r(51877).colormodel,s=["rgb","rgba","rgba256","hsl","hsla"],l=[],u=[],c=0;c0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var c,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?c=o.z[h][f]:s._hasSource&&(c=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(f,h,1,1).data),c){var p,d=o.hi||s.hoverinfo;if(d){var v=d.split("+");-1!==v.indexOf("all")&&(v=["color"]),-1!==v.indexOf("color")&&(p=!0)}var g,y=a.colormodel[s.colormodel],m=y.colormodel||s.colormodel,x=m.length,b=s._scaler(c),_=y.suffix,w=[];(s.hovertemplate||p)&&(w.push("["+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(", ")),4===x&&w.push(", "+b[3]+_[3]),w.push("]"),w=w.join(""),t.extraText=m.toUpperCase()+": "+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?g=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(g=s.text[h][f]);var T=u.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,A=o.y0+(h+.5)*s.dy,M="["+c.slice(0,s.colormodel.length).join(", ")+"]";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:M,text:g,hovertemplateLabels:{zLabel:M,colorLabel:w,"color[0]Label":b[0]+_[0],"color[1]Label":b[1]+_[1],"color[2]Label":b[2]+_[2],"color[3]Label":b[3]+_[3]}})]}}}},94507:function(t,e,r){"use strict";t.exports={attributes:r(17230),supplyDefaults:r(13245),calc:r(71113),plot:r(60775),style:r(12826),hoverPoints:r(28749),eventData:r(30835),moduleType:"trace",name:"image",basePlotModule:r(93612),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},60775:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=i.strTranslate,o=r(77922),s=r(51877),l=i.isIOS()||i.isSafari()||i.isIE();t.exports=function(t,e,r,u){var c=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(u,r,"im").each((function(e){var r=n.select(this),l=e[0],u=l.trace,p=("fast"===u.zsmooth||!1===u.zsmooth&&h)&&!u._hasZ&&u._hasSource&&"linear"===c.type&&"linear"===f.type;u._realImage=p;var d,v,g,y,m,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,A=u.dx,M=u.dy;for(x=0;void 0===d&&x0;)v=c.c2p(_+x*A),x--;for(x=0;void 0===y&&x0;)m=f.c2p(w+x*M),x--;vO[0];if(I||D){var z=d+S/2,R=y+E/2;C+="transform:"+a(z+"px",R+"px")+"scale("+(I?-1:1)+","+(D?-1:1)+")"+a(-z+"px",-R+"px")+";"}}L.attr("style",C);var F=new Promise((function(t){if(u._hasZ)t();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===T&&u._canvas.el.height===k&&u._canvas.source===u.source)t();else{var e=document.createElement("canvas");e.width=T,e.height=k;var r=e.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var n=u._image;n.onload=function(){r.drawImage(n,0,0),u._canvas={el:e,source:u.source},t()},n.setAttribute("src",u.source)}})).then((function(){var t,e;if(u._hasZ)e=B((function(t,e){return b[e][t]})),t=e.toDataURL("image/png");else if(u._hasSource)if(p)t=u.source;else{var r=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,T,k).data;e=B((function(t,e){var n=4*(e*T+t);return[r[n],r[n+1],r[n+2],r[n+3]]})),t=e.toDataURL("image/png")}L.attr({"xlink:href":t,height:E,width:S,x:d,y:y})}));t._promises.push(F)}function B(t){var e=document.createElement("canvas");e.width=S,e.height=E;var r,n=e.getContext("2d",{willReadFrequently:!0}),a=function(t){return i.constrain(Math.round(c.c2p(_+t*A)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*M)-y),0,E)},h=s.colormodel[u.colormodel],p=h.colormodel||u.colormodel,v=h.fmt;for(x=0;x0}function T(t){t.each((function(t){m.stroke(n.select(this),t.line.color)})).each((function(t){m.fill(n.select(this),t.color)})).style("stroke-width",(function(t){return t.line.width}))}function k(t,e,r){var n=t._fullLayout,i=o.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),a={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return o.coerce(i,a,y,t,e)}return v(i,a,l,s,n),g(i,a,l,s),a}function A(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function M(t,e,r,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(a);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(p.convertToTspans,i).call(f.font,e),f.bBox(o.node())}function S(t,e,r,n,i,a){var s="_cache"+e;t[s]&&t[s].key===i||(t[s]={key:i,value:r});var l=o.aggNums(a,null,[t[s].value,n],2);return t[s].value=l,l}t.exports=function(t,e,r,v){var g,y=t._fullLayout;w(r)&&v&&(g=v()),o.makeTraceGroups(y._indicatorlayer,e,"trace").each((function(e){var v,E,L,C,P,O=e[0].trace,I=n.select(this),D=O._hasGauge,z=O._isAngular,R=O._isBullet,F=O.domain,B={w:y._size.w*(F.x[1]-F.x[0]),h:y._size.h*(F.y[1]-F.y[0]),l:y._size.l+y._size.w*F.x[0],r:y._size.r+y._size.w*(1-F.x[1]),t:y._size.t+y._size.h*(1-F.y[1]),b:y._size.b+y._size.h*F.y[0]},N=B.l+B.w/2,j=B.t+B.h/2,U=Math.min(B.w/2,B.h),V=h.innerRadius*U,H=O.align||"center";if(E=j,D){if(z&&(v=N,E=j+U/2,L=function(t){return function(t,e){return[e/Math.sqrt(t.width/2*(t.width/2)+t.height*t.height),t,e]}(t,.9*V)}),R){var q=h.bulletPadding,G=1-h.bulletNumberDomainSize+q;v=B.l+(G+(1-G)*b[H])*B.w,L=function(t){return A(t,(h.bulletNumberDomainSize-q)*B.w,B.h)}}}else v=B.l+b[H]*B.w,L=function(t){return A(t,B.w,B.h)};!function(t,e,r,i){var u,c,h,v=r[0].trace,g=i.numbersX,y=i.numbersY,T=v.align||"center",A=x[T],E=i.transitionOpts,L=i.onComplete,C=o.ensureSingle(e,"g","numbers"),P=[];v._hasNumber&&P.push("number"),v._hasDelta&&(P.push("delta"),"left"===v.delta.position&&P.reverse());var O=C.selectAll("text").data(P);function I(e,r,n,i){if(!e.match("s")||n>=0==i>=0||r(n).slice(-1).match(_)||r(i).slice(-1).match(_))return r;var a=e.slice().replace("s","f").replace(/\d+/,(function(t){return parseInt(t)-1})),o=k(t,{tickformat:a});return function(t){return Math.abs(t)<1?d.tickText(o,t).text:r(t)}}O.enter().append("text"),O.attr("text-anchor",(function(){return A})).attr("class",(function(t){return t})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),O.exit().remove();var D,z=v.mode+v.align;if(v._hasDelta&&(D=function(){var e=k(t,{tickformat:v.delta.valueformat},v._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=v.delta.suffix,s=v.delta.prefix,l=function(t){return v.delta.relative?t.relativeDelta:t.delta},u=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?v.delta.increasing.symbol:v.delta.decreasing.symbol)+s+e(t)+o},h=function(t){return t.delta>=0?v.delta.increasing.color:v.delta.decreasing.color};void 0===v._deltaLastValue&&(v._deltaLastValue=l(r[0]));var g=C.select("text.delta");function y(){g.text(u(l(r[0]),i)).call(m.fill,h(r[0])).call(p.convertToTspans,t)}return g.call(f.font,v.delta.font).call(m.fill,h({delta:v._deltaLastValue})),w(E)?g.transition().duration(E.duration).ease(E.easing).tween("text",(function(){var t=n.select(this),e=l(r[0]),o=v._deltaLastValue,s=I(v.delta.valueformat,i,o,e),c=a(o,e);return v._deltaLastValue=e,function(e){t.text(u(c(e),s)),t.call(m.fill,h({delta:c(e)}))}})).each("end",(function(){y(),L&&L()})).each("interrupt",(function(){y(),L&&L()})):y(),c=M(u(l(r[0]),i),v.delta.font,A,t),g}(),z+=v.delta.position+v.delta.font.size+v.delta.font.family+v.delta.valueformat,z+=v.delta.increasing.symbol+v.delta.decreasing.symbol,h=c),v._hasNumber&&(function(){var e=k(t,{tickformat:v.number.valueformat},v._range);e.setScale(),d.prepTicks(e);var i=function(t){return d.tickText(e,t).text},o=v.number.suffix,s=v.number.prefix,l=C.select("text.number");function c(){var e="number"==typeof r[0].y?s+i(r[0].y)+o:"-";l.text(e).call(f.font,v.number.font).call(p.convertToTspans,t)}w(E)?l.transition().duration(E.duration).ease(E.easing).each("end",(function(){c(),L&&L()})).each("interrupt",(function(){c(),L&&L()})).attrTween("text",(function(){var t=n.select(this),e=a(r[0].lastY,r[0].y);v._lastValue=r[0].y;var l=I(v.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(s+l(e(r))+o)}})):c(),u=M(s+i(r[0].y)+o,v.number.font,A,t)}(),z+=v.number.font.size+v.number.font.family+v.number.valueformat+v.number.suffix+v.number.prefix,h=u),v._hasDelta&&v._hasNumber){var R,F,B=[(u.left+u.right)/2,(u.top+u.bottom)/2],N=[(c.left+c.right)/2,(c.top+c.bottom)/2],j=.75*v.delta.font.size;"left"===v.delta.position&&(R=S(v,"deltaPos",0,-1*(u.width*b[v.align]+c.width*(1-b[v.align])+j),z,Math.min),F=B[1]-N[1],h={width:u.width+c.width+j,height:Math.max(u.height,c.height),left:c.left+R,right:u.right,top:Math.min(u.top,c.top+F),bottom:Math.max(u.bottom,c.bottom+F)}),"right"===v.delta.position&&(R=S(v,"deltaPos",0,u.width*(1-b[v.align])+c.width*b[v.align]+j,z,Math.max),F=B[1]-N[1],h={width:u.width+c.width+j,height:Math.max(u.height,c.height),left:u.left,right:c.right+R,top:Math.min(u.top,c.top+F),bottom:Math.max(u.bottom,c.bottom+F)}),"bottom"===v.delta.position&&(R=null,F=c.height,h={width:Math.max(u.width,c.width),height:u.height+c.height,left:Math.min(u.left,c.left),right:Math.max(u.right,c.right),top:u.bottom-u.height,bottom:u.bottom+c.height}),"top"===v.delta.position&&(R=null,F=u.top,h={width:Math.max(u.width,c.width),height:u.height+c.height,left:Math.min(u.left,c.left),right:Math.max(u.right,c.right),top:u.bottom-u.height-c.height,bottom:u.bottom}),D.attr({dx:R,dy:F})}(v._hasNumber||v._hasDelta)&&C.attr("transform",(function(){var t=i.numbersScaler(h);z+=t[2];var e,r=S(v,"numbersScale",1,t[0],z,Math.min);v._scaleNumbers||(r=1),e=v._isAngular?y-r*h.bottom:y-r*(h.top+h.bottom)/2,v._numbersTop=r*h.top+e;var n=h[T];"center"===T&&(n=(h.left+h.right)/2);var a=g-r*n;return a=S(v,"numbersTranslate",0,a,z,Math.max),l(a,e)+s(r)}))}(t,I,e,{numbersX:v,numbersY:E,numbersScaler:L,transitionOpts:r,onComplete:g}),D&&(C={range:O.gauge.axis.range,color:O.gauge.bgcolor,line:{color:O.gauge.bordercolor,width:0},thickness:1},P={range:O.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:O.gauge.bordercolor,width:O.gauge.borderwidth},thickness:1});var Z=I.selectAll("g.angular").data(z?e:[]);Z.exit().remove();var Y=I.selectAll("g.angularaxis").data(z?e:[]);Y.exit().remove(),z&&function(t,e,r,a){var o,s,f,h,p=r[0].trace,v=a.size,g=a.radius,y=a.innerRadius,m=a.gaugeBg,x=a.gaugeOutline,b=[v.l+v.w/2,v.t+v.h/2+g/2],_=a.gauge,A=a.layer,M=a.transitionOpts,S=a.onComplete,E=Math.PI/2;function L(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-E;return r<-E?-E:r>E?E:r}function C(t){return n.svg.arc().innerRadius((y+g)/2-t/2*(g-y)).outerRadius((y+g)/2+t/2*(g-y)).startAngle(-E)}function P(t){t.attr("d",(function(t){return C(t.thickness).startAngle(L(t.range[0])).endAngle(L(t.range[1]))()}))}_.enter().append("g").classed("angular",!0),_.attr("transform",l(b[0],b[1])),A.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),A.selectAll("g.xangularaxistick,path,text").remove(),(o=k(t,p.gauge.axis)).type="linear",o.range=p.gauge.axis.range,o._id="xangularaxis",o.ticklabeloverflow="allow",o.setScale();var O=function(t){return(o.range[0]-t.x)/(o.range[1]-o.range[0])*Math.PI+Math.PI},I={},D=d.makeLabelFns(o,0).labelStandoff;I.xFn=function(t){var e=O(t);return Math.cos(e)*D},I.yFn=function(t){var e=O(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(D+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*c)},I.anchorFn=function(t){var e=O(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},I.heightFn=function(t,e,r){var n=O(t);return-.5*(1+Math.sin(n))*r};var z=function(t){return l(b[0]+g*Math.cos(t),b[1]-g*Math.sin(t))};f=function(t){return z(O(t))};if(s=d.calcTicks(o),h=d.getTickSigns(o)[2],o.visible){h="inside"===o.ticks?-1:1;var R=(o.linewidth||1)/2;d.drawTicks(t,o,{vals:s,layer:A,path:"M"+h*R+",0h"+h*o.ticklen,transFn:function(t){var e=O(t);return z(e)+"rotate("+-u(e)+")"}}),d.drawLabels(t,o,{vals:s,layer:A,transFn:f,labelFns:I})}var F=[m].concat(p.gauge.steps),B=_.selectAll("g.bg-arc").data(F);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(P).call(T),B.exit().remove();var N=C(p.gauge.bar.thickness),j=_.selectAll("g.value-arc").data([p.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var U,V,H,q=j.select("path");w(M)?(q.transition().duration(M.duration).ease(M.easing).each("end",(function(){S&&S()})).each("interrupt",(function(){S&&S()})).attrTween("d",(U=N,V=L(r[0].lastY),H=L(r[0].y),function(){var t=i(V,H);return function(e){return U.endAngle(t(e))()}})),p._lastValue=r[0].y):q.attr("d","number"==typeof r[0].y?N.endAngle(L(r[0].y)):"M0,0Z"),q.call(T),j.exit().remove(),F=[];var G=p.gauge.threshold.value;(G||0===G)&&F.push({range:[G,G],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var Z=_.selectAll("g.threshold-arc").data(F);Z.enter().append("g").classed("threshold-arc",!0).append("path"),Z.select("path").call(P).call(T),Z.exit().remove();var Y=_.selectAll("g.gauge-outline").data([x]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(P).call(T),Y.exit().remove()}(t,0,e,{radius:U,innerRadius:V,gauge:Z,layer:Y,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:g});var W=I.selectAll("g.bullet").data(R?e:[]);W.exit().remove();var X=I.selectAll("g.bulletaxis").data(R?e:[]);X.exit().remove(),R&&function(t,e,r,n){var i,a,o,s,u,c=r[0].trace,f=n.gauge,p=n.layer,v=n.gaugeBg,g=n.gaugeOutline,y=n.size,x=c.domain,b=n.transitionOpts,_=n.onComplete;f.enter().append("g").classed("bullet",!0),f.attr("transform",l(y.l,y.t)),p.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),p.selectAll("g.xbulletaxistick,path,text").remove();var A=y.h,M=c.gauge.bar.thickness*A,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(c._hasNumber||c._hasDelta?1-h.bulletNumberDomainSize:1);function L(t){t.attr("width",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr("x",(function(t){return i.c2p(t.range[0])})).attr("y",(function(t){return.5*(1-t.thickness)*A})).attr("height",(function(t){return t.thickness*A}))}(i=k(t,c.gauge.axis))._id="xbulletaxis",i.domain=[S,E],i.setScale(),a=d.calcTicks(i),o=d.makeTransTickFn(i),s=d.getTickSigns(i)[2],u=y.t+y.h,i.visible&&(d.drawTicks(t,i,{vals:"inside"===i.ticks?d.clipEnds(i,a):a,layer:p,path:d.makeTickPath(i,u,s),transFn:o}),d.drawLabels(t,i,{vals:a,layer:p,transFn:o,labelFns:d.makeLabelFns(i,u)}));var C=[v].concat(c.gauge.steps),P=f.selectAll("g.bg-bullet").data(C);P.enter().append("g").classed("bg-bullet",!0).append("rect"),P.select("rect").call(L).call(T),P.exit().remove();var O=f.selectAll("g.value-bullet").data([c.gauge.bar]);O.enter().append("g").classed("value-bullet",!0).append("rect"),O.select("rect").attr("height",M).attr("y",(A-M)/2).call(T),w(b)?O.select("rect").transition().duration(b.duration).ease(b.easing).each("end",(function(){_&&_()})).each("interrupt",(function(){_&&_()})).attr("width",Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y)))):O.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],r[0].y))):0),O.exit().remove();var I=r.filter((function(){return c.gauge.threshold.value||0===c.gauge.threshold.value})),D=f.selectAll("g.threshold-bullet").data(I);D.enter().append("g").classed("threshold-bullet",!0).append("line"),D.select("line").attr("x1",i.c2p(c.gauge.threshold.value)).attr("x2",i.c2p(c.gauge.threshold.value)).attr("y1",(1-c.gauge.threshold.thickness)/2*A).attr("y2",(1-(1-c.gauge.threshold.thickness)/2)*A).call(m.stroke,c.gauge.threshold.line.color).style("stroke-width",c.gauge.threshold.line.width),D.exit().remove();var z=f.selectAll("g.gauge-outline").data([g]);z.enter().append("g").classed("gauge-outline",!0).append("rect"),z.select("rect").call(L).call(T),z.exit().remove()}(t,0,e,{gauge:W,layer:X,size:B,gaugeBg:C,gaugeOutline:P,transitionOpts:r,onComplete:g});var J=I.selectAll("text.title").data(e);J.exit().remove(),J.enter().append("text").classed("title",!0),J.attr("text-anchor",(function(){return R?x.right:x[O.title.align]})).text(O.title.text).call(f.font,O.title.font).call(p.convertToTspans,t),J.attr("transform",(function(){var t,e=B.l+B.w*b[O.title.align],r=h.titlePadding,n=f.bBox(J.node());return D?(z&&(t=O.gauge.axis.visible?f.bBox(Y.node()).top-r-n.bottom:B.t+B.h/2-U/2-n.bottom-r),R&&(t=E-(n.top+n.bottom)/2,e=B.l-h.bulletPadding*B.w)):t=O._numbersTop-r-n.bottom,l(e,t)}))}))}},16249:function(t,e,r){"use strict";var n=r(50693),i=r(12663).axisHoverFormat,a=r(5386).f,o=r(2418),s=r(9012),l=r(1426).extendFlat,u=r(30962).overrideAll,c=t.exports=u(l({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:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),valuehoverformat:i("value",1),showlegend:l({},s.showlegend,{dflt:!1})},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,lightposition:o.lightposition,lighting:o.lighting,flatshading:o.flatshading,contour:o.contour,hoverinfo:l({},s.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},56959:function(t,e,r){"use strict";var n=r(78803),i=r(88489).processGrid,a=r(88489).filter;t.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){C();var i,a,o,l=[r],u=[n];if(s>=1)l=[r],u=[n];else if(s>0){var c=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:L(d,v,y);h[p]=x>-1?x:O(d,v,y,R(e,m))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++g}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var u=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var c=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,c,n,i),d=B(h,f,n,i);o=l(t,[d,p,c],[-1,-1,r[a[0]]])||o,o=l(t,[c,f,d],[r[a[0]],r[a[1]],-1])||o,u=!0}})),u||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var c=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,c,n,i),d=B(h,c,n,i);o=l(t,[d,p,c],[-1,-1,r[a[0]]])||o,u=!0}})),o}function H(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return v&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]];if(v)i=F(t,[u,c,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,u,r,n),d=B(h,c,r,n),g=B(h,f,r,n);i=F(null,[p,d,g],[-1,-1,-1])||i}s=!0}})),s||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,u,r,n),d=B(f,c,r,n),g=B(h,c,r,n),y=B(h,u,r,n);v?(i=F(t,[u,y,p],[e[l[0]],-1,-1])||i,i=F(t,[c,d,g],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(t,n,i){F(null,[e[t],e[n],e[i]],[r[t],r[n],r[i]])};n(0,1,2),n(2,3,0)}(0,[p,d,g,y],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var u=a[l[0]],c=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(c,u,r,n),d=B(f,u,r,n),g=B(h,u,r,n);v?(i=F(t,[u,p,d],[e[l[0]],-1,-1])||i,i=F(t,[u,d,g],[e[l[0]],-1,-1])||i,i=F(t,[u,g,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,g],[-1,-1,-1])||i,s=!0}}))),i}function q(t,e,r,n,i,a,o,s,l,u,c){var f=!1;return d&&(z(t,"A")&&(f=H(null,[e,r,n,a],u,c)||f),z(t,"B")&&(f=H(null,[r,n,i,l],u,c)||f),z(t,"C")&&(f=H(null,[r,a,o,l],u,c)||f),z(t,"D")&&(f=H(null,[n,a,s,l],u,c)||f),z(t,"E")&&(f=H(null,[r,n,a,l],u,c)||f)),v&&(f=H(t,[r,n,a,l],u,c)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Z(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function Y(t,e,r,n,i,a,o){var s,l,u,c,f=!1,h=function(){f=V(t,[s,l,u],[-1,-1,-1],i,a)||f,f=V(t,[u,c,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],v=o[2];return p&&(s=I(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=I(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),u=I(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),c=I(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=I(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=I(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),u=I(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),c=I(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),v&&(s=I(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],v),l=I(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],v),u=I(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],v),c=I(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],v),h()),f}function W(t,e,r,n,i,a,o,s,l,u,c,f){var h=t;return f?(d&&"even"===t&&(h=null),q(h,e,r,n,i,a,o,s,l,u,c)):(d&&"odd"===t&&(h=null),q(h,l,s,o,a,i,n,r,e,u,c))}function X(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(L-M)?[A,L]:[L,M];d=!0,$(r,C[0],C[1]),d=!1}}var I=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];["x","y","z"].forEach((function(r){for(var n=[],i=0;i0&&(f.push(d.id),"x"===r?h.push([d.distRatio,0,0]):"y"===r?h.push([0,d.distRatio,0]):h.push([0,0,d.distRatio]))}else c=rt(1,"x"===r?b-1:"y"===r?_-1:w-1);f.length>0&&(n[a]="x"===r?Q(e,f,o,s,h,n[a]):"y"===r?tt(e,f,o,s,h,n[a]):et(e,f,o,s,h,n[a]),a++),c.length>0&&(n[a]="x"===r?X(e,c,o,s,n[a]):"y"===r?J(e,c,o,s,n[a]):K(e,c,o,s,n[a]),a++)}var v=t.caps[r];v.show&&v.fill&&(D(v.fill),n[a]="x"===r?X(e,[0,b-1],o,s,n[a]):"y"===r?J(e,[0,_-1],o,s,n[a]):K(e,[0,w-1],o,s,n[a]),a++)}})),0===g&&P(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=y,t._Ys=m,t._Zs=x}(),t}t.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new u(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},82738:function(t,e,r){"use strict";var n=r(71828),i=r(73972),a=r(16249),o=r(1586);function s(t,e,r,n,a){var s=a("isomin"),l=a("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var u=a("x"),c=a("y"),f=a("z"),h=a("value");u&&u.length&&c&&c.length&&f&&f.length&&h&&h.length?(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach((function(t){a(t+"hoverformat");var e="caps."+t;a(e+".show")&&a(e+".fill");var r="slices."+t;a(r+".show")&&(a(r+".fill"),a(r+".locations"))})),a("spaceframe.show")&&a("spaceframe.fill"),a("surface.show")&&(a("surface.count"),a("surface.fill"),a("surface.pattern")),a("contour.show")&&(a("contour.color"),a("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(t){a(t)})),o(t,e,n,a,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}t.exports={supplyDefaults:function(t,e,r,i){s(t,e,0,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},64943:function(t,e,r){"use strict";t.exports={attributes:r(16249),supplyDefaults:r(82738).supplyDefaults,calc:r(56959),colorbar:{min:"cmin",max:"cmax"},plot:r(22674).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:r(58547),categories:["gl3d","showLegend"],meta:{}}},2418:function(t,e,r){"use strict";var n=r(50693),i=r(12663).axisHoverFormat,a=r(5386).f,o=r(54532),s=r(9012),l=r(1426).extendFlat;t.exports=l({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:a({editType:"calc"}),xhoverformat:i("x"),yhoverformat:i("y"),zhoverformat:i("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:o.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:l({},o.contours.x.show,{}),color:o.contours.x.color,width:o.contours.x.width,editType:"calc"},lightposition:{x:l({},o.lightposition.x,{dflt:1e5}),y:l({},o.lightposition.y,{dflt:1e5}),z:l({},o.lightposition.z,{dflt:0}),editType:"calc"},lighting:l({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},o.lighting),hoverinfo:l({},s.hoverinfo,{editType:"calc"}),showlegend:l({},s.showlegend,{dflt:!1})})},82932:function(t,e,r){"use strict";var n=r(78803);t.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},91134:function(t,e,r){"use strict";var n=r(9330).gl_mesh3d,i=r(9330).delaunay_triangulate,a=r(9330).alpha_shape,o=r(9330).convex_hull,s=r(81697).parseColorScale,l=r(78614),u=r(21081).extractOpts,c=r(90060);function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=c(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!g(t.i,f)||!g(t.j,f)||!g(t.k,f))return;n=c(v(t.i),v(t.j),v(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],a=e.length,o=0;oy):g=A>w,y=A;var M=u(w,T,k,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[k,T],m&&(M.orig_p=r[b]),d&&(M.tx=e.text[b]),v&&(M.htx=e.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,"open:")+" ",high:i(t,"high:")+" ",low:i(t,"low:")+" ",close:i(t,"close:")+" "}}),x}t.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a"+u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat):((m=i.extendFlat({},h)).y0=m.y1=_,m.yLabelVal=b,m.yLabel=u.labels[x]+n.hoverLabelText(s,b,l.yhoverformat),m.name="",f.push(m),g[b]=m)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=c(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,v=p.dir;function g(t){return f.labels[t]+n.hoverLabelText(o,l[t][d],l.yhoverformat)}var y=p.hi||l.hoverinfo,m=y.split("+"),x="all"===y,b=x||-1!==m.indexOf("y"),_=x||-1!==m.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+u[v]]:[];return _&&s(p,l,w),h.extraText=w.join("
"),h.y0=h.y1=o.c2p(p.yc,!0),[h]}t.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},54186:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"ohlc",basePlotModule:r(93612),categories:["cartesian","svg","showLegend"],meta:{},attributes:r(2522),supplyDefaults:r(16169),calc:r(3485).calc,plot:r(72314),style:r(53101),hoverPoints:r(66449).hoverPoints,selectPoints:r(67324)}},14555:function(t,e,r){"use strict";var n=r(73972),i=r(71828);t.exports=function(t,e,r,a){var o=r("x"),s=r("open"),l=r("high"),u=r("low"),c=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x"],a),s&&l&&u&&c){var f=Math.min(s.length,l.length,u.length,c.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},72314:function(t,e,r){"use strict";var n=r(39898),i=r(71828);t.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,"trace ohlc").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var u=a.tickLen,c=e.selectAll("path").data(i.identity);c.enter().append("path"),c.exit().remove(),c.attr("d",(function(t){if(t.empty)return"M0,0Z";var e=s.c2p(t.pos-u,!0),r=s.c2p(t.pos+u,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return"M"+e+","+o.c2p(t.o,!0)+"H"+n+"M"+n+","+o.c2p(t.h,!0)+"V"+o.c2p(t.l,!0)+"M"+r+","+o.c2p(t.c,!0)+"H"+n}))}}))}},67324:function(t){"use strict";t.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(r))for(e=0;e0;u&&(o="array");var c=r("categoryorder",o);"array"===c?(r("categoryarray"),r("ticktext")):(delete t.categoryarray,delete t.ticktext),u||"array"!==c||(e.categoryorder="trace")}}t.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:"dimensions",handleItemDefaults:c}),d=function(t,e,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,h);o(e,f,h),Array.isArray(p)&&p.length||(e.visible=!1),u(e,p,"values",d),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var v={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(h,"labelfont",v);var g={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,"tickfont",g)}},94873:function(t,e,r){"use strict";t.exports={attributes:r(99506),supplyDefaults:r(14647),calc:r(28699),plot:r(45784),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:r(27677),categories:["noOpacity"],meta:{}}},45460:function(t,e,r){"use strict";var n=r(39898),i=r(29502).k4,a=r(72391),o=r(30211),s=r(71828),l=s.strTranslate,u=r(91424),c=r(84267),f=r(63893);function h(t,e,r,i){var a=e._context.staticPlot,o=t.map(F.bind(0,e,r)),c=i.selectAll("g.parcatslayer").data([null]);c.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var h=c.selectAll("g.trace.parcats").data(o,p),m=h.enter().append("g").attr("class","trace parcats");h.attr("transform",(function(t){return l(t.x,t.y)})),m.append("g").attr("class","paths");var x=h.select("g.paths").selectAll("path.path").data((function(t){return t.paths}),p);x.attr("fill",(function(t){return t.model.color}));var w=x.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(t){return t.model.color})).attr("fill-opacity",0);_(w),x.attr("d",(function(t){return t.svgD})),w.empty()||x.sort(v),x.exit().remove(),x.on("mouseover",g).on("mouseout",y).on("click",b),m.append("g").attr("class","dimensions");var A=h.select("g.dimensions").selectAll("g.dimension").data((function(t){return t.dimensions}),p);A.enter().append("g").attr("class","dimension"),A.attr("transform",(function(t){return l(t.x,0)})),A.exit().remove();var M=A.selectAll("g.category").data((function(t){return t.categories}),p),S=M.enter().append("g").attr("class","category");M.attr("transform",(function(t){return l(0,t.y)})),S.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})),T(S);var E=M.selectAll("rect.bandrect").data((function(t){return t.bands}),p);E.each((function(){s.raiseToTop(this)})),E.attr("fill",(function(t){return t.color}));var D=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(t){return t.color})).attr("fill-opacity",0);E.attr("fill",(function(t){return t.color})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return t.y})).attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"})),k(D),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none");var z=e._fullLayout.paper_bgcolor;M.select("text.catlabel").attr("text-anchor",(function(t){return d(t)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",f.makeTextShadow(z)).style("fill","rgb(0, 0, 0)").attr("x",(function(t){return d(t)?t.width+5:-5})).attr("y",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){u.font(n.select(this),t.parcatsViewModel.categorylabelfont),f.convertToTspans(n.select(this),e)})),S.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(t){return t.width/2})).attr("y",-5).text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})).each((function(t){u.font(n.select(this),t.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",L).on("mouseout",C),M.exit().remove(),A.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on("dragstart",P).on("drag",O).on("dragend",I)),h.each((function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),h.exit().remove()}function p(t){return t.key}function d(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function v(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),L=n.mouse(f)[0];o.loneHover({trace:h,x:b-d.left+v.left,y:_-d.top+v.top,text:E,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:T,idealAlign:L1&&h.displayInd===f.dimensions.length-1?(i=u.left,a="left"):(i=u.left+u.width,a="right");var v=c.model.count,g=c.model.categoryLabel,y=v/c.parcatsViewModel.model.count,m={countLabel:v,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==c.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",m.countLabel].join(" ")),-1!==c.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+m.categoryLabel+"):",m.probabilityLabel].join(" "));var b=x.join("
");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:m,eventData:[{data:p._input,fullData:p,count:v,category:g,probability:y}]}}function L(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,a=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron,u=this;"color"===l?(function(t){var e=n.select(t).datum(),r=A(e);w(r),r.each((function(){s.raiseToTop(this)})),n.select(t.parentNode).selectAll("rect.bandrect").filter((function(t){return t.color===e.color})).each((function(){s.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(u),S(u,"plotly_hover",n.event)):(function(t){n.select(t.parentNode).selectAll("rect.bandrect").each((function(t){var e=A(t);w(e),e.each((function(){s.raiseToTop(this)}))})),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(u),M(u,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===l?e=E(r,a,u):"color"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),u=n.select(r).datum(),f=u.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,v=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var g=f.model.categoryLabel,y=u.parcatsViewModel.model.count,m=0;u.categoryViewModel.bands.forEach((function(t){t.color===u.color&&(m+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===u.color&&(b+=t.model.count)}));var _=m/y,w=m/b,T=m/x,k={countLabel:y,categoryLabel:g,probabilityLabel:_.toFixed(3)},A=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf("count")&&A.push(["Count:",k.countLabel].join(" ")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(A.push("P(color ∩ "+g+"): "+k.probabilityLabel),A.push("P("+g+" | color): "+w.toFixed(3)),A.push("P(color | "+g+"): "+T.toFixed(3)));var M=A.join("
"),S=c.mostReadable(u.color,["black","white"]);return{trace:d,x:o*(i-e.left),y:s*(v-e.top),text:M,color:u.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:g,count:y,probability:_,categorycount:x,colorcount:b,bandcolorcount:m}]}}(r,a,u):"dimension"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(E(t,e,this))})),i}(r,a,u)),e&&o.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r}))}}function C(t){var e=t.parcatsViewModel;e.dragDimension||(_(e.pathSelection),T(e.dimensionSelection.selectAll("g.category")),k(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(v),-1!==e.hoverinfoItems.indexOf("skip"))||("color"===t.parcatsViewModel.hoveron?S(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event))}function P(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map((function(t){return t.displayInd})),e.model.dragY=e.y,s.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(e){e.yf.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var h=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}j(t.parcatsViewModel),N(t.parcatsViewModel),R(t.parcatsViewModel),z(t.parcatsViewModel)}}function I(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=D(t.parcatsViewModel),i=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==i[e]}));o&&i.forEach((function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map((function(t){return t.displayInd}));if(s=t.initialDragCategoryDisplayInds.some((function(t,e){return t!==l[e]}))){var u=t.model.categories.slice().sort((function(t,e){return t.displayInd-e.displayInd})),c=u.map((function(t){return t.categoryValue})),f=u.map((function(t){return t.categoryLabel}));e["dimensions["+t.model.containerInd+"].categoryarray"]=[c],e["dimensions["+t.model.containerInd+"].ticktext"]=[f],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?S(t.potentialClickBand,"plotly_click",n.event.sourceEvent):M(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd&&(t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null),t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,j(t.parcatsViewModel),N(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){R(t.parcatsViewModel,!0),z(t.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&a.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function D(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)c+="C"+u[s]+","+(e[s+1]+n)+" "+l[s]+","+(e[s]+n)+" "+(t[s]+r[s])+","+(e[s]+n),c+="l-"+r[s]+",0 ";return c+"Z"}function N(t){var e=t.dimensions,r=t.model,n=e.map((function(t){return t.categories.map((function(t){return t.y}))})),i=t.model.dimensions.map((function(t){return t.categories.map((function(t){return t.displayInd}))})),a=t.model.dimensions.map((function(t){return t.displayInd})),o=t.dimensions.map((function(t){return t.model.dimensionInd})),s=e.map((function(t){return t.x})),l=e.map((function(t){return t.width})),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(t){var e=t.categoryInds.map((function(t,e){return i[e][t]}));return o.map((function(t){return e[t]}))}u.sort((function(e,r){var n=f(e),i=f(r);return"backward"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var h=new Array(u.length),p=e[0].model.count,d=e[0].categories.map((function(t){return t.height})).reduce((function(t,e){return t+e})),v=0;v0?d*(y.count/p):0;for(var m,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*i;var a,o,s,l,u,c=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),v=8*(f-h)/2,g=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(g.sort((function(t,e){return t.displayInd-e.displayInd})),u=0;u0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:v,bands:[],parcatsViewModel:t},v=v+a+8,c.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:c,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}t.exports=function(t,e,r,n){h(r,t,n,e)}},45784:function(t,e,r){"use strict";var n=r(45460);t.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},73362:function(t,e,r){"use strict";var n=r(50693),i=r(13838),a=r(41940),o=r(27670).Y,s=r(1426).extendFlat,l=r(44467).templatedArray;t.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.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:s({editType:"calc"},n("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"}}},57920:function(t,e,r){"use strict";var n=r(25706),i=r(39898),a=r(28984).keyFun,o=r(28984).repeat,s=r(71828).sorterAsc,l=r(71828).strTranslate,u=n.bar.snapRatio;function c(t,e){return t*(1-u)+e*u}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],u=l,f=a;i*fe){h=r;break}}if(a=c,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-u[f][1]t[1]+r||e=.9*t[1]+.1*t[0]?"n":e<=.9*t[0]+.1*t[1]?"s":"ns"}(d,e);v&&(o.interval=l[a],o.intervalPix=d,o.region=v)}}if(t.ordinal&&!o.region){var g=t.unitTickvals,m=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&m<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a="crosshair";r.clickableOrdinalRange?a="pointer":r.region&&(a=r.region+"-resize"),i.select(document.body).style("cursor",a)}function k(t){t.on("mousemove",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on("mouseleave",(function(t){t.parent.inBrushDrag||m()})).call(i.behavior.drag().on("dragstart",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,u=o.svgBrush;if(u.wasDragged=!1,u.grabbingBar="ns"===s.region,u.grabbingBar){var c=l.map(e.unitToPaddedPx);u.grabPoint=r-c[0]-n.verticalPadding,u.barLength=c[1]-c[0]}u.clickableOrdinalRange=s.clickableOrdinalRange,u.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(u.stayingIntervals=u.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),u.startExtent=s.region?l["s"===s.region?1:0]:a,e.parent.inBrushDrag=!0,u.brushStartCallback()}(this,t)})).on("drag",(function(t){w(this,t)})).on("dragend",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,m(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(e),u?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function A(t,e){return t[0]-e[0]}function M(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}t.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(A)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e),n=r.slice();e.filter.set(n),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t,e,r){var i=t.selectAll("."+n.cn.axisBrush).data(o,a);i.enter().append("g").classed(n.cn.axisBrush,!0),function(t,e,r){var i=r._context.staticPlot,a=t.selectAll(".background").data(o);a.enter().append("rect").classed("background",!0).call(d).call(v).style("pointer-events",i?"none":"auto").attr("transform",l(0,n.verticalPadding)),a.call(k).attr("height",(function(t){return t.height-n.verticalPadding}));var s=t.selectAll(".highlight-shadow").data(o);s.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",e).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),s.attr("y1",(function(t){return t.height})).call(x);var u=t.selectAll(".highlight").data(o);u.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),u.attr("y1",(function(t){return t.height})).call(x)}(i,e,r)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(A)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},71791:function(t,e,r){"use strict";t.exports={attributes:r(73362),supplyDefaults:r(3633),calc:r(24639),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:r(49351),categories:["gl","regl","noOpacity","noHover"],meta:{}}},49351:function(t,e,r){"use strict";var n=r(39898),i=r(27659).a0,a=r(21341),o=r(77922);e.name="parcoords",e.plot=function(t){var e=i(t.calcdata,"parcoords")[0];e.length&&a(t,e)},e.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},e.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this,r=t.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":r,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},24639:function(t,e,r){"use strict";var n=r(71828).isArrayOrTypedArray,i=r(21081),a=r(28984).wrap;t.exports=function(t,e){var r,o;return i.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),d.splice(f));var v=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),g=function(t,e,r,o,s){var l=s("line.color",r);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,c);o(e,l,c),Array.isArray(v)&&v.length||(e.visible=!1),h(e,v,"values",g);var y={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(c,"labelfont",y),n.coerceFont(c,"tickfont",y),n.coerceFont(c,"rangefont",y),c("labelangle"),c("labelside"),c("unselected.line.color"),c("unselected.line.opacity")}},1602:function(t,e,r){"use strict";var n=r(71828).isTypedArray;e.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},e.isOrdinal=function(t){return!!t.tickvals},e.isVisible=function(t){return t.visible||!("visible"in t)}},67618:function(t,e,r){"use strict";var n=r(71791);n.plot=r(21341),t.exports=n},83398:function(t,e,r){"use strict";var n=r(56068),i=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n p17_20, p21_24, p25_28, p29_32,\n p33_36, p37_40, p41_44, p45_48,\n p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\nuniform sampler2D maskTexture, palette;\n\nbool isPick = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n return (\n fOutside(p[0], lo[0], hi[0]) ||\n fOutside(p[1], lo[1], hi[1]) ||\n fOutside(p[2], lo[2], hi[2]) ||\n fOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n return (\n vOutside(p[0], lo[0], hi[0]) ||\n vOutside(p[1], lo[1], hi[1]) ||\n vOutside(p[2], lo[2], hi[2]) ||\n vOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n return mOutside(A, loA, hiA) ||\n mOutside(B, loB, hiB) ||\n mOutside(C, loC, hiC) ||\n mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n mat4 pnts[4];\n pnts[0] = A;\n pnts[1] = B;\n pnts[2] = C;\n pnts[3] = D;\n\n for(int i = 0; i < 4; ++i) {\n for(int j = 0; j < 4; ++j) {\n for(int k = 0; k < 4; ++k) {\n if(0 == iMod(\n int(255.0 * texture2D(maskTexture,\n vec2(\n (float(i * 2 + j / 2) + 0.5) / 8.0,\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n ))[3]\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n 2\n )) return true;\n }\n }\n }\n return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n float x = 0.5 * sign(v) + 0.5;\n float y = axisY(x, A, B, C, D);\n float z = 1.0 - abs(v);\n\n z += isContext ? 0.0 : 2.0 * float(\n outsideBoundingBox(A, B, C, D) ||\n outsideRasterMask(A, B, C, D)\n );\n\n return vec4(\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n z,\n 1.0\n );\n}\n\nvoid main() {\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n float v = colors[3];\n\n gl_Position = position(isContext, v, A, B, C, D);\n\n fragColor =\n isContext ? vec4(contextColor) :\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}\n"]),o=r(25706).maxDimensionCount,s=r(71828),l=new Uint8Array(4),u=new Uint8Array(4),c={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function h(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(function(t){t.read({x:0,y:0,width:1,height:1,data:l})}(t),r.drawCompleted=!0),function s(l){var u=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*u,a.offset=2*l*n,e(a),l*n+u>>8*e)%256/255}function v(t,e,r){for(var n=new Array(8*e),i=0,a=0;ac&&(c=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&no._length&&(S=S.slice(0,o._length));var L,C=o.tickvals;function P(t,e){return{val:t,text:L[e]}}function O(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){L=o.ticktext,Array.isArray(L)&&L.length?L.length>C.length?L=L.slice(0,C.length):C.length>L.length&&(C=C.slice(0,L.length)):L=C.map(a(o.tickformat));for(var I=1;I=r||l>=i)return;var u=t.lineLayer.readPixel(s,i-1-l),c=0!==u[3],f=c?u[2]+256*(u[1]+256*u[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==N&&(c?a.hover(h):a.unhover&&a.unhover(h),N=f)}})),B.style("opacity",(function(t){return t.pick?0:1})),p.style("background","rgba(255, 255, 255, 0)");var j=p.selectAll("."+m.cn.parcoords).data(F,d);j.exit().remove(),j.enter().append("g").classed(m.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),j.attr("transform",(function(t){return u(t.model.translateX,t.model.translateY)}));var U=j.selectAll("."+m.cn.parcoordsControlView).data(v,d);U.enter().append("g").classed(m.cn.parcoordsControlView,!0),U.attr("transform",(function(t){return u(t.model.pad.l,t.model.pad.t)}));var V=U.selectAll("."+m.cn.yAxis).data((function(t){return t.dimensions}),d);V.enter().append("g").classed(m.cn.yAxis,!0),U.each((function(t){I(V,t,T)})),B.each((function(t){if(t.viewModel){!t.lineLayer||a?t.lineLayer=b(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||a;t.lineLayer.render(t.viewModel.panels,e)}})),V.attr("transform",(function(t){return u(t.xScale(t.xIndex),0)})),V.call(n.behavior.drag().origin((function(t){return t})).on("drag",(function(t){var e=t.parent;R.linePickActive(!1),t.x=Math.max(-m.overdrag,Math.min(t.model.width+m.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,V.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),I(V,e,T),V.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr("transform",(function(t){return u(t.xScale(t.xIndex),0)})),n.select(this).attr("transform",u(t.x,0)),V.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,I(V,e,T),n.select(this).attr("transform",(function(t){return u(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!E(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),V.exit().remove();var H=V.selectAll("."+m.cn.axisOverlays).data(v,d);H.enter().append("g").classed(m.cn.axisOverlays,!0),H.selectAll("."+m.cn.axis).remove();var q=H.selectAll("."+m.cn.axis).data(v,d);q.enter().append("g").classed(m.cn.axis,!0),q.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return y.isOrdinal(t)?e:D(t.model.dimensions[t.visibleIndex],e)})).scale(r)),f.font(q.selectAll("text"),t.model.tickFont)})),q.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),q.selectAll("text").style("text-shadow",c.makeTextShadow(A)).style("cursor","default");var G=H.selectAll("."+m.cn.axisHeading).data(v,d);G.enter().append("g").classed(m.cn.axisHeading,!0);var Z=G.selectAll("."+m.cn.axisTitle).data(v,d);Z.enter().append("text").classed(m.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",o?"none":"auto"),Z.text((function(t){return t.label})).each((function(e){var r=n.select(this);f.font(r,e.model.labelFont),c.convertToTspans(r,t)})).attr("transform",(function(t){var e=O(t.model.labelAngle,t.model.labelSide),r=m.axisTitleOffset;return(e.dir>0?"":u(0,2*r+t.model.height))+l(e.degrees)+u(-r*e.dx,-r*e.dy)})).attr("text-anchor",(function(t){var e=O(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var Y=H.selectAll("."+m.cn.axisExtent).data(v,d);Y.enter().append("g").classed(m.cn.axisExtent,!0);var W=Y.selectAll("."+m.cn.axisExtentTop).data(v,d);W.enter().append("g").classed(m.cn.axisExtentTop,!0),W.attr("transform",u(0,-m.axisExtentOffset));var X=W.selectAll("."+m.cn.axisExtentTopText).data(v,d);X.enter().append("text").classed(m.cn.axisExtentTopText,!0).call(P),X.text((function(t){return z(t,!0)})).each((function(t){f.font(n.select(this),t.model.rangeFont)}));var J=Y.selectAll("."+m.cn.axisExtentBottom).data(v,d);J.enter().append("g").classed(m.cn.axisExtentBottom,!0),J.attr("transform",(function(t){return u(0,t.model.height+m.axisExtentOffset)}));var K=J.selectAll("."+m.cn.axisExtentBottomText).data(v,d);K.enter().append("text").classed(m.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(P),K.text((function(t){return z(t,!1)})).each((function(t){f.font(n.select(this),t.model.rangeFont)})),x.ensureAxisBrush(H,A,t)}},21341:function(t,e,r){"use strict";var n=r(17171),i=r(79749),a=r(1602).isVisible,o={};function s(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}(t.exports=function(t,e){var r=t._fullLayout;if(i(t,[],o)){var l={},u={},c={},f={},h=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=f[r]=n._fullInput.index;l[r]=t.data[i].dimensions,u[r]=t.data[i].dimensions.slice()})),n(t,e,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(e,n,i){var a=u[e][n],o=i.map((function(t){return t.slice()})),s="dimensions["+n+"].constraintrange",l=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===l[s]){var h=a.constraintrange;l[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit("plotly_restyle",[d,[f[e]]])},hover:function(e){t.emit("plotly_hover",e)},unhover:function(e){t.emit("plotly_unhover",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return s(t,e,r)-s(t,e,n)}}(r,u[e].filter(a));l[e].sort(n),u[e].filter((function(t){return!a(t)})).sort((function(t){return u[e].indexOf(t)})).forEach((function(t){l[e].splice(l[e].indexOf(t),1),l[e].splice(u[e].indexOf(t),0,t)})),t.emit("plotly_restyle",[{dimensions:[l[e]]},[f[e]]])}})}}).reglPrecompiled=o},34e3:function(t,e,r){"use strict";var n=r(9012),i=r(27670).Y,a=r(41940),o=r(22399),s=r(5386).f,l=r(5386).s,u=r(1426).extendFlat,c=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.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:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},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:u({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:u({},c,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:u({},c,{}),outsidetextfont:u({},c,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:u({},c,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:u({},c,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function(t,e,r){"use strict";var n=r(74875);e.name="pie",e.plot=function(t,r,i,a){n.plotBasePlot(e.name,t,r,i,a)},e.clean=function(t,r,i,a){n.cleanBasePlot(e.name,t,r,i,a)}},32354:function(t,e,r){"use strict";var n=r(92770),i=r(84267),a=r(7901),o={};function s(t){return function(e,r){return!!e&&!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e)}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r=0})),("funnelarea"===e.type?y:e.sort)&&a.sort((function(t,e){return e.v-t.v})),a[0]&&(a[0].vTotal=g),a},crossTraceCalc:function(t,e){var r=(e||{}).type;r||(r="pie");var n=t._fullLayout,i=t.calcdata,a=n[r+"colorway"],s=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(a=l(a,o));for(var u=0,c=0;c0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}t.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function u(r,n){return i.coerce(t,e,a,r,n)}var c=l(u("labels"),u("values")),f=c.len;if(e._hasLabels=c.hasLabels,e._hasValues=c.hasValues,!e._hasLabels&&e._hasValues&&(u("label0"),u("dlabel")),f){e._length=f,u("marker.line.width")&&u("marker.line.color"),u("marker.colors"),u("scalegroup");var h,p=u("text"),d=u("texttemplate");if(d||(h=u("textinfo",Array.isArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),d||h&&"none"!==h){var v=u("textposition");s(t,e,n,u,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(v)||"auto"===v||"outside"===v)&&u("automargin"),("inside"===v||"auto"===v||Array.isArray(v))&&u("insidetextorientation")}o(e,n,u);var g=u("hole");if(u("title.text")){var y=u("title.position",g?"middle center":"top center");g||"middle center"!==y||(e.title.position="top center"),i.coerceFont(u,"title.font",n.font)}u("sort"),u("direction"),u("rotation"),u("pull")}else e.visible=!1}}},20007:function(t,e,r){"use strict";var n=r(23469).appendArrayMultiPointValues;t.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),"funnelarea"===e.type&&(delete r.v,delete r.i),r}},53581:function(t,e,r){"use strict";var n=r(71828);function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}e.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},e.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},e.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r"),name:f.hovertemplate||-1!==h.indexOf("name")?f.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:g.castOption(_.bgcolor,t.pts)||t.color,borderColor:g.castOption(_.bordercolor,t.pts),fontFamily:g.castOption(w.family,t.pts),fontSize:g.castOption(w.size,t.pts),fontColor:g.castOption(w.color,t.pts),nameLength:g.castOption(_.namelength,t.pts),textAlign:g.castOption(_.align,t.pts),hovertemplate:g.castOption(f.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[y(t,f)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e,inOut_bbox:T}),t.bbox=T[0],u._hasHoverLabel=!0}u._hasHoverEvent=!0,e.emit("plotly_hover",{points:[y(t,f)],event:n.event})}})),t.on("mouseout",(function(t){var r=e._fullLayout,i=e._fullData[u.index],o=n.select(this).datum();u._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[y(o,i)],event:n.event}),u._hasHoverEvent=!1),u._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),u._hasHoverLabel=!1)})),t.on("click",(function(t){var r=e._fullLayout,i=e._fullData[u.index];e._dragging||!1===r.hovermode||(e._hoverdata=[y(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=g.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=g.castOption(t._input.textfont.color,e.pts));var i=g.castOption(t.insidetextfont.family,e.pts)||g.castOption(t.textfont.family,e.pts)||r.family,a=g.castOption(t.insidetextfont.size,e.pts)||g.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(f||p){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(s||d||f){var m=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/m,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;v.push(a)}(d||p)&&((a=T(t,n,o,l,u)).textPosAngle=(e.startangle+e.stopangle)/2,v.push(a)),(d||h)&&((a=k(t,n,o,l,u)).textPosAngle=(e.startangle+e.stopangle)/2,v.push(a));for(var x=0,b=0,_=0;_=1)break}return v[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*v);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:A(a,o/e),rotate:M(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*v);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:A(a,o/e),rotate:M(i+Math.PI/2)}}function A(t,e){return Math.cos(e)-t*e}function M(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function L(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function C(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=O(a),-1!==a.title.position.indexOf("top")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf("bottom")&&(o.y+=(1+i)*t.r);var l,u=t.r/(void 0===(l=t.trace.aspectratio)?1:l),c=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(c+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf("center")?c*=2:-1!==a.title.position.indexOf("right")&&(c+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=c/t.titleBox.width,n=P(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function P(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function O(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function I(t,e){for(var r=[],n=0;n1?c=(u=r.r)/i.aspectratio:u=(c=r.r)*i.aspectratio,l=(u*=(1+i.baseratio)/2)*c}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(a){var x=l.castOption(i,e.i,"texttemplate");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:g.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:g.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,"customdata")}}(e),_=g.getFirstFilled(i.text,e.pts);(m(_)||""===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=""}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}t.exports={plot:function(t,e){var r=t._context.staticPlot,a=t._fullLayout,h=a._size;d("pie",a),_(e,t),I(e,h);var v=l.makeTraceGroups(a._pielayer,e,"trace").each((function(e){var d=n.select(this),v=e[0],y=v.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=g.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,u="px0",c="px1";if("counterclockwise"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),d.attr("stroke-linejoin","round"),d.each((function(){var m=n.select(this).selectAll("g.slice").data(e);m.enter().append("g").classed("slice",!0),m.exit().remove();var _=[[[],[]],[[],[]]],T=!1;m.each((function(i,o){if(i.hidden)n.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=y.index,_[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var u=v.cx,c=v.cy,h=n.select(this),d=h.selectAll("path.surface").data([i]);if(d.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),h.call(x,t,e),y.pull){var m=+g.castOption(y.pull,i.pts)||0;m>0&&(u+=m*i.pxmid[0],c+=m*i.pxmid[1])}i.cxFinal=u,i.cyFinal=c;var k=y.hole;if(i.v===v.vTotal){var A="M"+(u+i.px0[0])+","+(c+i.px0[1])+P(i.px0,i.pxmid,!0,1)+P(i.pxmid,i.px0,!0,1)+"Z";k?d.attr("d","M"+(u+k*i.px0[0])+","+(c+k*i.px0[1])+P(i.px0,i.pxmid,!1,k)+P(i.pxmid,i.px0,!1,k)+"Z"+A):d.attr("d",A)}else{var M=P(i.px0,i.px1,!0,1);if(k){var S=1-k;d.attr("d","M"+(u+k*i.px1[0])+","+(c+k*i.px1[1])+P(i.px1,i.px0,!1,k)+"l"+S*i.px0[0]+","+S*i.px0[1]+M+"Z")}else d.attr("d","M"+u+","+c+"l"+i.px0[0]+","+i.px0[1]+M+"Z")}z(t,i,v);var E=g.castOption(y.textposition,i.pts),C=h.selectAll("g.slicetext").data(i.text&&"none"!==E?[0]:[]);C.enter().append("g").classed("slicetext",!0),C.exit().remove(),C.each((function(){var r=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),h=l.ensureUniformFontSize(t,"outside"===E?function(t,e,r){return{color:g.castOption(t.outsidetextfont.color,e.pts)||g.castOption(t.textfont.color,e.pts)||r.color,family:g.castOption(t.outsidetextfont.family,e.pts)||g.castOption(t.textfont.family,e.pts)||r.family,size:g.castOption(t.outsidetextfont.size,e.pts)||g.castOption(t.textfont.size,e.pts)||r.size}}(y,i,a.font):b(y,i,a.font));r.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,h).call(f.convertToTspans,t);var d,m=s.bBox(r.node());if("outside"===E)d=L(m,i);else if(d=w(m,i,v),"auto"===E&&d.scale<1){var x=l.ensureUniformFontSize(t,y.outsidetextfont);r.call(s.font,x),d=L(m=s.bBox(r.node()),i)}var _=d.textPosAngle,k=void 0===_?i.pxmid:D(v.r,_);if(d.targetX=u+k[0]*d.rCenter+(d.x||0),d.targetY=c+k[1]*d.rCenter+(d.y||0),R(d,m),d.outside){var A=d.targetY;i.yLabelMin=A-m.height/2,i.yLabelMid=A,i.yLabelMax=A+m.height/2,i.labelExtraX=0,i.labelExtraY=0,T=!0}d.fontSize=h.size,p(y.type,d,a),e[o].transform=d,l.setTransormAndDisplay(r,d)}))}function P(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return"a"+n*v.r+","+n*v.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}}));var k=n.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(k.enter().append("g").classed("titletext",!0),k.exit().remove(),k.each((function(){var e,r=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),i=y.title.text;y._meta&&(i=l.templateString(i,y._meta)),r.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,y.title.font).call(f.convertToTspans,t),e="middle center"===y.title.position?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}(v):C(v,h),r.attr("transform",c(e.x,e.y)+u(Math.min(1,e.scale))+c(e.tx,e.ty))})),T&&function(t,e){var r,n,i,a,o,s,l,u,c,f,h,p,d;function v(t,e){return t.pxmid[1]-e.pxmid[1]}function y(t,e){return e.pxmid[1]-t.pxmid[1]}function m(t,r){r||(r={});var i,u,c,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,v=n?t.yLabelMax:t.yLabelMin,y=t.cyFinal+o(t.px0[1],t.px1[1]),m=p-d;if(m*l>0&&(t.labelExtraY=m),Array.isArray(e.pull))for(u=0;u=(g.castOption(e.pull,c.pts)||0)||((t.pxmid[1]-c.pxmid[1])*l>0?(m=c.cyFinal+o(c.px0[1],c.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=m):(v+t.labelExtraY-y)*l>0&&(i=3*s*Math.abs(u-f.indexOf(t)),(h=c.cxFinal+a(c.px0[0],c.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?v:y,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=t[n][r]).sort(i),c=t[1-n][r],f=c.concat(u),p=[],h=0;hMath.abs(f)?s+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(a+t.labelExtraX+u):s+="l"+t.labelExtraX+","+c+"v"+(f-c)+"h"+u}else s+="V"+(t.yLabelMid+t.labelExtraY)+"h"+u;l.ensureSingle(r,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(m,y),T&&y.automargin){var A=s.bBox(d.node()),M=y.domain,S=h.w*(M.x[1]-M.x[0]),E=h.h*(M.y[1]-M.y[0]),P=(.5*S-v.r)/h.w,O=(.5*E-v.r)/h.h;i.autoMargin(t,"pie."+y.uid+".automargin",{xl:M.x[0]-P,xr:M.x[1]+P,yb:M.y[0]-O,yt:M.y[1]+O,l:Math.max(v.cx-v.r-A.left,0),r:Math.max(A.right-(v.cx+v.r),0),b:Math.max(A.bottom-(v.cy+v.r),0),t:Math.max(v.cy-v.r-A.top,0),pad:5})}}))}));setTimeout((function(){v.selectAll("tspan").each((function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))}))}),0)},formatSliceLabel:z,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:C,prerenderTitles:_,layoutAreas:I,attachFxHandlers:x,computeTransform:R}},68357:function(t,e,r){"use strict";var n=r(39898),i=r(63463),a=r(72597).resizeText;t.exports=function(t){var e=t._fullLayout._pielayer.selectAll(".trace");a(t,e,"pie"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(i,t,e)}))}))}},63463:function(t,e,r){"use strict";var n=r(7901),i=r(53581).castOption;t.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style("stroke-width",s).call(n.fill,e.color).call(n.stroke,o)}},10959:function(t,e,r){"use strict";var n=r(82196);t.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},42743:function(t,e,r){"use strict";var n=r(9330).gl_pointcloud2d,i=r(78614),a=r(71739).findExtremes,o=r(34603);function s(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,u=this.xData=this.pickXData=t.x,c=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var v=i(t.marker.color),g=i(t.marker.border.color),y=t.opacity*t.marker.opacity;v[3]*=y,this.pointcloudOptions.color=v;var m=t.marker.blend;null===m&&(m=u.length<100||c.length<100),this.pointcloudOptions.blend=m,g[3]*=y,this.pointcloudOptions.borderColor=g;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},t.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},33876:function(t,e,r){"use strict";var n=r(71828),i=r(10959);t.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio"),e._length=null}},20593:function(t,e,r){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" "),t.exports={attributes:r(10959),supplyDefaults:r(33876),calc:r(36563),plot:r(42743),moduleType:"trace",name:"pointcloud",basePlotModule:r(4796),categories:["gl","gl2d","showLegend"],meta:{}}},39953:function(t,e,r){"use strict";var n=r(41940),i=r(9012),a=r(22399),o=r(77914),s=r(27670).Y,l=r(5386).f,u=r(50693),c=r(44467).templatedArray,f=r(12663).descriptionOnlyNumbers,h=r(1426).extendFlat,p=r(30962).overrideAll;(t.exports=p({hoverinfo:h({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:f("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),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:a.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:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.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:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:c("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:h(u().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},75536:function(t,e,r){"use strict";var n=r(30962).overrideAll,i=r(27659).a0,a=r(60436),o=r(528),s=r(6964),l=r(28569),u=r(47322).prepSelect,c=r(71828),f=r(73972),h="sankey";function p(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if(o&&"pan"!==i&&"zoom"!==i){s(o,a);var h={_id:"x",c2p:c.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:"y",c2p:c.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:c.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;rm&&(m=a.source[e]),a.target[e]>m&&(m=a.target[e]);var x,b=m+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(L,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(L)||w[E]!==w[L])){w.hasOwnProperty(L)&&(L=w[L]),w.hasOwnProperty(E)&&(E=w[E]),L=+L,h[E=+E]=h[L]=!0;var C="";a.label&&a.label[e]&&(C=a.label[e]);var P=null;C&&p.hasOwnProperty(C)&&(P=p[C]),u.push({pointNumber:e,label:C,color:c?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:P,source:E,target:L,value:+S}),M.source.push(E),M.target.push(L)}}var O=b+_.length,I=o(r.color),D=o(r.customdata),z=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:I?r.color[e]:r.color,customdata:D?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(O,M.source,M.target)&&(F=!0),{circular:F,links:u,nodes:z,groups:_,groupLookup:w}}(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},85247:function(t){"use strict";t.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"}}},26857:function(t,e,r){"use strict";var n=r(71828),i=r(39953),a=r(7901),o=r(84267),s=r(27670).c,l=r(38048),u=r(44467),c=r(85501);function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}t.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),v=t.node,g=u.newContainer(e,"node");function y(t,e){return n.coerce(v,g,i.node,t,e)}y("label"),y("groups"),y("x"),y("y"),y("pad"),y("thickness"),y("line.color"),y("line.width"),y("hoverinfo",t.hoverinfo),l(v,g,y,d),y("hovertemplate");var m=h.colorway;y("color",g.label.map((function(t,e){return a.addOpacity(function(t){return m[t%m.length]}(e),.8)}))),y("customdata");var x=t.link||{},b=u.newContainer(e,"link");function _(t,e){return n.coerce(x,b,i.link,t,e)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",t.hoverinfo),l(x,b,_,d),_("hovertemplate");var w,T=o(h.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(T,b.value.length)),_("customdata"),c(x,b,{name:"colorscales",handleItemDefaults:f}),s(e,h,p),p("orientation"),p("valueformat"),p("valuesuffix"),g.x.length&&g.y.length&&(w="freeform"),p("arrangement",w),n.coerceFont(p,"textfont",n.extendFlat({},h.font)),e._length=null}},29396:function(t,e,r){"use strict";t.exports={attributes:r(39953),supplyDefaults:r(26857),calc:r(92930),plot:r(60436),moduleType:"trace",name:"sankey",basePlotModule:r(75536),selectPoints:r(84564),categories:["noOpacity"],meta:{}}},60436:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=i.numberFormat,o=r(3393),s=r(30211),l=r(7901),u=r(85247).cn,c=i._;function f(t){return""!==t}function h(t,e){return t.filter((function(t){return t.key===e.traceId}))}function p(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function d(t){n.select(t).select("text.name").style("fill","black")}function v(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function y(t,e,r){e&&r&&h(r,e).selectAll("."+u.sankeyLink).filter(v(e)).call(x.bind(0,e,r,!1))}function m(t,e,r){e&&r&&h(r,e).selectAll("."+u.sankeyLink).filter(v(e)).call(b.bind(0,e,r,!1))}function x(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),i&&h(e,t).selectAll("."+u.sankeyLink).filter((function(t){return t.link.label===i})).style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),r&&h(e,t).selectAll("."+u.sankeyNode).filter(g(t)).call(y)}function b(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(t){return t.tinyColorAlpha})),i&&h(e,t).selectAll("."+u.sankeyLink).filter((function(t){return t.link.label===i})).style("fill-opacity",(function(t){return t.tinyColorAlpha})),r&&h(e,t).selectAll(u.sankeyNode).filter(g(t)).call(m)}function _(t,e){var r=t.hoverlabel||{},n=i.nestedProperty(r,e).get();return!Array.isArray(n)&&n}t.exports=function(t,e){for(var r=t._fullLayout,i=r._paper,h=r._size,v=0;v"),color:_(o,"bgcolor")||l.addOpacity(v.color,1),borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:n.event.x"),color:_(o,"bgcolor")||i.tinyColorHue,borderColor:_(o,"bordercolor"),fontFamily:_(o,"font.family"),fontSize:_(o,"font.size"),fontColor:_(o,"font.color"),nameLength:_(o,"namelength"),textAlign:_(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:m,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});p(w,.85),d(w)}}},unhover:function(e,i,a){!1!==t._fullLayout.hovermode&&(n.select(e).call(m,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit("plotly_unhover",{event:n.event,points:[i.node]})),s.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var a=r.node;a.originalEvent=n.event,t._hoverdata=[a],n.select(e).call(m,r,i),s.click(t,{target:!0})}}})}},3393:function(t,e,r){"use strict";var n=r(49887),i=r(29502).k4,a=r(39898),o=r(30838),s=r(86781),l=r(85247),u=r(84267),c=r(7901),f=r(91424),h=r(71828),p=h.strTranslate,d=h.strRotate,v=r(28984),g=v.keyFun,y=v.repeat,m=v.unwrap,x=r(63893),b=r(73972),_=r(18783),w=_.CAP_SHIFT,T=_.LINE_SPACING;function k(t,e,r){var n,i=m(e),a=i.trace,c=a.domain,f="h"===a.orientation,p=a.node.pad,d=a.node.thickness,v=t.width*(c.x[1]-c.x[0]),g=t.height*(c.y[1]-c.y[0]),y=i._nodes,x=i._links,b=i.circular;(n=b?s.sankeyCircular().circularLinkGap(0):o.sankey()).iterations(l.sankeyIterations).size(f?[v,g]:[g,v]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(y).links(x);var _,w,T,k=n();for(var A in n.nodePadding()o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(y=k.nodes).forEach((function(t){var e,r,n,i=0,a=t.length;for(t.sort((function(t,e){return t.y0-e.y0})),n=0;n=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p})),n.update(k)}return{circular:b,key:r,trace:a,guid:h.randstr(),horizontal:f,width:v,height:g,nodePad:a.node.pad,nodeLineColor:a.node.line.color,nodeLineWidth:a.node.line.width,linkLineColor:a.link.line.color,linkLineWidth:a.link.line.width,linkArrowLength:a.link.arrowlen,valueFormat:a.valueformat,valueSuffix:a.valuesuffix,textFont:a.textfont,translateX:c.x[0]*t.width+t.margin.l,translateY:t.height-c.y[1]*t.height+t.margin.t,dragParallel:f?g:v,dragPerpendicular:f?v:g,arrangement:a.arrangement,sankey:n,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(t,e,r){var n=u(e.color),i=e.source.label+"|"+e.target.label+"__"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:c.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:M,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,linkArrowLength:t.linkArrowLength,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function M(){return function(t){var e=t.linkArrowLength;if(t.link.circular)return function(t,e){var r=t.width/2,n=t.circularPathData;return"top"===t.circularLinkType?"M "+(n.targetX-e)+" "+(n.targetY+r)+" L"+(n.rightInnerExtent-e)+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r-e)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-e)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent-r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 1 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY-n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.leftInnerExtent+" "+(n.sourceY-r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 0 "+(n.leftFullExtent-r)+" "+(n.sourceY-n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"L"+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r-e)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-e)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+(n.rightInnerExtent-e)+" "+(n.targetY-r)+"L"+(n.targetX-e)+" "+(n.targetY-r)+(e>0?"L"+n.targetX+" "+n.targetY:"")+"Z":"M "+(n.targetX-e)+" "+(n.targetY-r)+" L"+(n.rightInnerExtent-e)+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r-e)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r-e)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent+r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 0 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY+n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.leftInnerExtent+" "+(n.sourceY+r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 1 "+(n.leftFullExtent-r)+" "+(n.sourceY+n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"L"+(n.rightInnerExtent-e)+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r-e)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r-e)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+(n.rightInnerExtent-e)+" "+(n.targetY+r)+"L"+(n.targetX-e)+" "+(n.targetY+r)+(e>0?"L"+n.targetX+" "+n.targetY:"")+"Z"}(t.link,e);var r=Math.abs((t.link.target.x0-t.link.source.x1)/2);e>r&&(e=r);var n=t.link.source.x1,a=t.link.target.x0-e,o=i(n,a),s=o(.5),l=o(.5),u=t.link.y0-t.link.width/2,c=t.link.y0+t.link.width/2,f=t.link.y1-t.link.width/2,h=t.link.y1+t.link.width/2,p="M"+n+","+u,d="C"+s+","+u+" "+l+","+f+" "+a+","+f,v="C"+l+","+h+" "+s+","+c+" "+n+","+c,g=e>0?"L"+(a+e)+","+(f+t.link.width/2):"";return p+d+(g+="L"+a+","+h)+v+"Z"}}function S(t,e){var r=u(e.color),n=l.nodePadAcross,i=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var a=e.dx,o=Math.max(.5,e.dy),s="node_"+e.pointNumber;return e.group&&(s=h.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:s,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(a),visibleHeight:o,zoneX:-n,zoneY:-i,zoneWidth:a+2*n,zoneHeight:o+2*i,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:c.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,s].join("_"),interactionState:t.interactionState,figure:t}}function E(t){t.attr("transform",(function(t){return p(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function L(t){t.call(E)}function C(t,e){t.call(L),e.attr("d",M())}function P(t){t.attr("width",(function(t){return t.node.x1-t.node.x0})).attr("height",(function(t){return t.visibleHeight}))}function O(t){return t.link.width>1||t.linkLineWidth>0}function I(t){return p(t.translateX,t.translateY)+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function D(t,e,r){t.on(".basic",null).on("mouseover.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on("mousemove.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on("mouseout.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)})).on("click.basic",(function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)}))}function z(t,e,r,i){var o=a.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on("dragstart",(function(a){if("fixed"!==a.arrangement&&(h.ensureSingle(i._fullLayout._infolayer,"g","dragcover",(function(t){i._fullLayout._dragCover=t})),h.raiseToTop(this),a.interactionState.dragInProgress=a.node,F(a.node),a.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,a.interactionState.hovered),a.interactionState.hovered=!1),"snap"===a.arrangement)){var o=a.traceId+"|"+a.key;a.forceLayouts[o]?a.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&n.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,a),function(t,e,r,n,i){window.requestAnimationFrame((function a(){var o;for(o=0;o0)window.requestAnimationFrame(a);else{var s=r.node.originalX;r.node.x0=s-r.visibleWidth/2,r.node.x1=s+r.visibleWidth/2,R(r,i)}}))}(t,e,a,o,i)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=a.event.x,i=a.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),i=Math.max(0,Math.min(r.size-r.visibleHeight/2,i)),r.node.y0=i-r.visibleHeight/2,r.node.y1=i+r.visibleHeight/2),F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),C(t.filter(B(r)),e))}})).on("dragend",(function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;el&&C[y].gap;)y--;for(x=C[y].s,v=C.length-1;v>y;v--)C[v].s=x;for(;lS[f]&&f=0;f--){var h=t[f];if("scatter"===h.type&&h.xaxis===u.xaxis&&h.yaxis===u.yaxis){h.opacity=void 0;break}}}}}},17438:function(t,e,r){"use strict";var n=r(71828),i=r(73972),a=r(82196),o=r(47581),s=r(34098),l=r(67513),u=r(73927),c=r(565),f=r(49508),h=r(11058),p=r(94039),d=r(82410),v=r(28908),g=r(71828).coercePattern;t.exports=function(t,e,r,y){function m(r,i){return n.coerce(t,e,a,r,i)}var x=l(t,e,y,m);if(x||(e.visible=!1),e.visible){u(t,e,y,m),m("xhoverformat"),m("yhoverformat");var b=c(t,e,y,m);"group"===y.scattermode&&void 0===e.orientation&&m("orientation","v");var _=!b&&x=Math.min(e,r)&&d<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(h.c2p(t.x)-d);return a=Math.min(e,r)&&v<=Math.max(e,r)?0:1/0}var n=Math.max(3,t.mrc||0),i=1-1/n,a=Math.abs(p.c2p(t.y)-v);return aY!=(N=D[O][1])>=Y&&(R=D[O-1][0],F=D[O][0],N-B&&(z=R+(F-R)*(Y-B)/(N-B),H=Math.min(H,z),q=Math.max(q,z)));H=Math.max(H,0),q=Math.min(q,h._length);var W=s.defaultLine;return s.opacity(f.fillcolor)?W=f.fillcolor:s.opacity((f.line||{}).color)&&(W=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:H,x1:q,y0:Y,y1:Y,color:W,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},67368:function(t,e,r){"use strict";var n=r(34098);t.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:r(82196),layoutAttributes:r(21479),supplyDefaults:r(17438),crossTraceDefaults:r(34936),supplyLayoutDefaults:r(79334),calc:r(47761).calc,crossTraceCalc:r(72626),arraysToCalcdata:r(75225),plot:r(32663),colorbar:r(4898),formatLabels:r(8225),style:r(16296).style,styleOnSelect:r(16296).styleOnSelect,hoverPoints:r(33720),selectPoints:r(98002),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:r(93612),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},21479:function(t){"use strict";t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function(t,e,r){"use strict";var n=r(71828),i=r(21479);t.exports=function(t,e){var r,a="group"===e.barmode;"group"===e.scattermode&&("scattergap",r=a?e.bargap:.2,n.coerce(t,e,i,"scattergap",r))}},11058:function(t,e,r){"use strict";var n=r(71828).isArrayOrTypedArray,i=r(52075).hasColorscale,a=r(1586);t.exports=function(t,e,r,o,s,l){l||(l={});var u=(t.marker||{}).color;s("line.color",r),i(t,"line")?a(t,e,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(u)&&u||r),s("line.width"),l.noDash||s("line.dash"),l.backoff&&s("line.backoff")}},34621:function(t,e,r){"use strict";var n=r(91424),i=r(50606),a=i.BADNUM,o=i.LOG_CLIP,s=o+.5,l=o-.5,u=r(71828),c=u.segmentsIntersect,f=u.constrain,h=r(47581);t.exports=function(t,e){var r,i,o,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E=e.trace||{},L=e.xaxis,C=e.yaxis,P="log"===L.type,O="log"===C.type,I=L._length,D=C._length,z=e.backoff,R=E.marker,F=e.connectGaps,B=e.baseTolerance,N=e.shape,j="linear"===N,U=E.fill&&"none"!==E.fill,V=[],H=h.minTolerance,q=t.length,G=new Array(q),Z=0;function Y(r){var n=t[r];if(!n)return!1;var i=e.linearized?L.l2p(n.x):L.c2p(n.x),o=e.linearized?C.l2p(n.y):C.c2p(n.y);if(i===a){if(P&&(i=L.c2p(n.x,!0)),i===a)return!1;O&&o===a&&(i*=Math.abs(L._m*D*(L._m>0?s:l)/(C._m*I*(C._m>0?s:l)))),i*=1e3}if(o===a){if(O&&(o=C.c2p(n.y,!0)),o===a)return!1;o*=1e3}return[i,o]}function W(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,u=i*o+a*s;if(u>0&&uot||t[1]lt)return[f(t[0],at,ot),f(t[1],st,lt)]}function ft(t,e){return t[0]===e[0]&&(t[0]===at||t[0]===ot)||t[1]===e[1]&&(t[1]===st||t[1]===lt)||void 0}function ht(t,e,r){return function(n,i){var a=ct(n),o=ct(i),s=[];if(a&&o&&ft(a,o))return s;a&&s.push(a),o&&s.push(o);var l=2*u.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);return l&&((a&&o?l>0==a[t]>o[t]?a:o:a||o)[t]+=l),s}}function pt(t){var e=t[0],r=t[1],n=e===G[Z-1][0],i=r===G[Z-1][1];if(!n||!i)if(Z>1){var a=e===G[Z-2][0],o=r===G[Z-2][1];n&&(e===at||e===ot)&&a?o?Z--:G[Z-1]=t:i&&(r===st||r===lt)&&o?a?Z--:G[Z-1]=t:G[Z++]=t}else G[Z++]=t}function dt(t){G[Z-1][0]!==t[0]&&G[Z-1][1]!==t[1]&&pt([Q,tt]),pt(t),et=null,Q=tt=0}"linear"===N||"spline"===N?nt=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=ut[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&J(o,t)ot?ot:0,$=e[1]lt?lt:0,K||$){if(Z)if(et){var n=nt(et,e);n.length>1&&(dt(n[0]),G[Z++]=n[1])}else rt=nt(G[Z-1],e)[0],G[Z++]=rt;else G[Z++]=[K||e[0],$||e[1]];var i=G[Z-1];K&&$&&(i[0]!==K||i[1]!==$)?(et&&(Q!==K&&tt!==$?pt(Q&&tt?(a=et,s=(o=e)[0]-a[0],l=(o[1]-a[1])/s,(a[1]*o[0]-o[1]*a[0])/s>0?[l>0?at:ot,lt]:[l>0?ot:at,st]):[Q||K,tt||$]):Q&&tt&&pt([Q,tt])),pt([K,$])):Q-K&&tt-$&&pt([K||Q,$||tt]),et=e,Q=K,tt=$}else et&&dt(nt(et,e)[0]),G[Z++]=e;var a,o,s,l}for(r=0;rX(v,yt))break;o=v,(w=m[0]*y[0]+m[1]*y[1])>b?(b=w,p=v,g=!1):w<_&&(_=w,d=v,g=!0)}if(g?(gt(p),o!==d&>(d)):(d!==i&>(d),o!==p&>(p)),gt(o),r>=t.length||!v)break;gt(v),i=v}}else gt(p)}et&&pt([Q||et[0],tt||et[1]]),V.push(G.slice(0,Z))}var mt=N.slice(N.length-1);if(z&&"h"!==mt&&"v"!==mt){for(var xt=!1,bt=-1,_t=[],wt=0;wt=0?l=p:(l=p=h,h++),l0?Math.max(r,a):0}}},4898:function(t){"use strict";t.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function(t,e,r){"use strict";var n=r(7901),i=r(52075).hasColorscale,a=r(1586),o=r(34098);t.exports=function(t,e,r,s,l,u){var c=o.isBubble(t),f=(t.line||{}).color;u=u||{},f&&(r=f),l("marker.symbol"),l("marker.opacity",c?.7:1),l("marker.size"),u.noAngle||(l("marker.angle"),u.noAngleRef||l("marker.angleref"),u.noStandOff||l("marker.standoff")),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),u.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),u.noLine||(l("marker.line.color",f&&!Array.isArray(f)&&e.marker.color!==f?f:c?n.background:n.defaultLine),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",c?1:0)),c&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),u.gradient&&"none"!==l("marker.gradient.type")&&l("marker.gradient.color")}},73927:function(t,e,r){"use strict";var n=r(71828).dateTick0,i=r(50606).ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}t.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",a(s,e.ycalendar)),n("yperiodalignment"))}}},32663:function(t,e,r){"use strict";var n=r(39898),i=r(73972),a=r(71828),o=a.ensureSingle,s=a.identity,l=r(91424),u=r(34098),c=r(34621),f=r(68687),h=r(61082).tester;function p(t,e,r,f,p,d,v){var g;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,c=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(u.hasMarkers(h)){var p=h.marker.maxdisplayed;if(0!==p){var d=i.filter((function(t){return t.x>=c[0]&&t.x<=c[1]&&t.y>=f[0]&&t.y<=f[1]})),v=Math.ceil(d.length/p),g=0;o.forEach((function(t,r){var n=t[0].trace;u.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function m(t){return y?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,"g","errorbars"),A=o(T,"g","lines"),M=o(T,"g","points"),S=o(T,"g","text");if(i.getComponentMethod("errorbars","plot")(t,k,r,v),!0===_.visible){var E,L;m(T).style("opacity",_.opacity);var C=_.fill.charAt(_.fill.length-1);"x"!==C&&"y"!==C&&(C=""),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=T;var P,O,I="",D=[],z=_._prevtrace;z&&(I=z._prevRevpath||"",L=z._nextFill,D=z._polygons);var R,F,B,N,j,U,V,H="",q="",G=[],Z=a.noop;if(E=_._ownFill,u.hasLines(_)||"none"!==_.fill){for(L&&L.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split("").reverse().join(""))):R=F="spline"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return"M"+t.join("L")},B=function(t){return F(t.reverse())},G=c(f,{xaxis:x,yaxis:b,trace:_,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,backoff:w.backoff,simplify:w.simplify,fill:_.fill}),V=_._polygons=new Array(G.length),g=0;g0,g=f(t,e,r);(c=i.selectAll("g.trace").data(g,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),c.order(),function(t,e,r){e.each((function(e){var i=o(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,u=[];a._ownfill&&u.push("_ownFill"),a._nexttrace&&u.push("_nextFill");var c=i.selectAll("g").data(u,s);c.enter().append("g"),c.exit().each((function(t){a[t]=null})).remove(),c.order().each((function(t){a[t]=o(n.select(this),"path","js-fill")}))}))}(t,c,e),v?(u&&(h=u()),n.transition().duration(a.duration).ease(a.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){i.selectAll("g.trace").each((function(r,n){p(t,n,e,r,g,this,a)}))}))):c.each((function(r,n){p(t,n,e,r,g,this,a)})),d&&c.exit().remove(),i.selectAll("path:not([d])").remove()}},98002:function(t,e,r){"use strict";var n=r(34098);t.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,u=t.yaxis,c=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r0){var h=i.c2l(c);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}t.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function b(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var E=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f("surfacecolor",p||d);for(var v=["x","y","z"],g=0;g<3;++g){var y="projection."+v[g];f(y+".show")&&(f(y+".opacity"),f(y+".scale"))}var m=n.getComponentMethod("errorbars","supplyDefaults");m(t,e,p||d||r,{axis:"z"}),m(t,e,p||d||r,{axis:"y",inherit:"z"}),m(t,e,p||d||r,{axis:"x",inherit:"z"})}else e.visible=!1}},13551:function(t,e,r){"use strict";t.exports={plot:r(58925),attributes:r(44542),markerSymbols:r(87381),supplyDefaults:r(21428),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:r(36563),moduleType:"trace",name:"scatter3d",basePlotModule:r(58547),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},97001:function(t,e,r){"use strict";var n=r(82196),i=r(9012),a=r(5386).f,o=r(5386).s,s=r(50693),l=r(1426).extendFlat,u=n.marker,c=n.line,f=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},n.hovertext,{}),line:{color:c.color,width:c.width,dash:c.dash,backoff:c.backoff,shape:l({},c.shape,{values:["linear","spline"]}),smoothing:c.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:l({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:l({width:f.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a()}},34618:function(t,e,r){"use strict";var n=r(92770),i=r(36922),a=r(75225),o=r(66279),s=r(47761).calcMarkerSize,l=r(22882);t.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&"legendonly"!==r.visible){var u;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var c,f,h=e._length,p=new Array(h),d=!1;for(u=0;u")}return o}function m(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,g.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},46858:function(t,e,r){"use strict";t.exports={attributes:r(97001),supplyDefaults:r(98965),colorbar:r(4898),formatLabels:r(48953),calc:r(34618),plot:r(1913),style:r(16296).style,styleOnSelect:r(16296).styleOnSelect,hoverPoints:r(22931),selectPoints:r(98002),eventData:r(16165),moduleType:"trace",name:"scattercarpet",basePlotModule:r(93612),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},1913:function(t,e,r){"use strict";var n=r(32663),i=r(89298),a=r(91424);t.exports=function(t,e,r,o){var s,l,u,c=r[0][0].carpet,f=i.getFromId(t,c.xaxis||"x"),h=i.getFromId(t,c.yaxis||"y"),p={xaxis:f,yaxis:h,plot:e.plot};for(s=0;s")}function p(t){return t+"°"}}(u,v,t,l[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}},17988:function(t,e,r){"use strict";t.exports={attributes:r(19316),supplyDefaults:r(10659),colorbar:r(4898),formatLabels:r(82719),calc:r(84622),calcGeoJSON:r(89171).calcGeoJSON,plot:r(89171).plot,style:r(33095),styleOnSelect:r(16296).styleOnSelect,hoverPoints:r(14977),eventData:r(84084),selectPoints:r(20548),moduleType:"trace",name:"scattergeo",basePlotModule:r(44622),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},89171:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(90973).getTopojsonFeatures,o=r(18214),s=r(41327),l=r(71739).findExtremes,u=r(50606).BADNUM,c=r(47761).calcMarkerSize,f=r(34098),h=r(33095);t.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d="geojson-id"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=g,w=2*b,T={},k=l.makeCalcdata(e,"x"),A=m.makeCalcdata(e,"y"),M=s(e,l,"x",k),S=s(e,m,"y",A),E=M.vals,L=S.vals;e._x=E,e._y=L,e.xperiodalignment&&(e._origX=k,e._xStarts=M.starts,e._xEnds=M.ends),e.yperiodalignment&&(e._origY=A,e._yStarts=S.starts,e._yEnds=S.ends);var C=new Array(w),P=new Array(b);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n)),s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}return s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel))),s}(t,0,e,C,E,L),D=d(t,x);return f(o,e),_?I.marker&&(O=I.marker.sizeAvg||Math.max(I.marker.size,3)):O=u(e,b),c(t,e,l,m,E,L,O),I.errorX&&y(e,l,I.errorX),I.errorY&&y(e,m,I.errorY),I.fill&&!D.fill2d&&(D.fill2d=!0),I.marker&&!D.scatter2d&&(D.scatter2d=!0),I.line&&!D.line2d&&(D.line2d=!0),!I.errorX&&!I.errorY||D.error2d||(D.error2d=!0),I.text&&!D.glText&&(D.glText=!0),I.marker&&(I.marker.snap=b),D.lineOptions.push(I.line),D.errorXOptions.push(I.errorX),D.errorYOptions.push(I.errorY),D.fillOptions.push(I.fill),D.markerOptions.push(I.marker),D.markerSelectedOptions.push(I.markerSel),D.markerUnselectedOptions.push(I.markerUnsel),D.textOptions.push(I.text),D.textSelectedOptions.push(I.textSel),D.textUnselectedOptions.push(I.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),T._scene=D,T.index=D.count,T.x=E,T.y=L,T.positions=C,D.count++,[{x:!1,y:!1,t:T,trace:e}]}},78232:function(t){"use strict";t.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,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]}}},19635:function(t,e,r){"use strict";var n=r(92770),i=r(82019),a=r(25075),o=r(73972),s=r(71828),l=r(91424),u=r(41675),c=r(81697).formatColor,f=r(34098),h=r(39984),p=r(68645),d=r(78232),v=r(37822).DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=r(23469).appendArrayPointValue;function m(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,u=Array.isArray(l)?l:[l],c=o.color,f=o.size,h=o.family,p={},d=t._context.plotGlPixelRatio,v=e.texttemplate;if(v){p.text=[];var g=i._d3locale,m=Array.isArray(v),x=m?Math.min(v.length,a):a,b=m?function(t){return v[t]}:function(){return v};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?"rect":"round";if(u&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(u)?u.length>1?u[i]:u[0]:u,v=g[p],y=g[d],m=c?c/.8+1:0,x=-y*m-.5*y;o.offset[i]=[v*m/h,x/h]}}return o}}},47148:function(t,e,r){"use strict";var n=r(71828),i=r(73972),a=r(68645),o=r(42341),s=r(47581),l=r(34098),u=r(67513),c=r(73927),f=r(49508),h=r(11058),p=r(28908),d=r(82410);t.exports=function(t,e,r,v){function g(r,i){return n.coerce(t,e,o,r,i)}var y=!!t.marker&&a.isOpenSymbol(t.marker.symbol),m=l.isBubble(t),x=u(t,e,v,g);if(x){c(t,e,v,g),g("xhoverformat"),g("yhoverformat");var b=x100},e.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},20794:function(t,e,r){"use strict";var n=r(73972),i=r(71828),a=r(34603);function o(t,e,r,o){var s=t.xa,l=t.ya,u=t.distance,c=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.ma=i.isArrayOrTypedArray(d.angle)?d.angle[f]:d.angle,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var v=d&&d.line;v&&(h.mlc=Array.isArray(v.color)?v.color[f]:v.color,h.mlw=i.isArrayOrTypedArray(v.width)?v.width[f]:v.width);var g=d&&d.gradient;g&&"none"!==g.type&&(h.mgt=Array.isArray(g.type)?g.type[f]:g.type,h.mgc=Array.isArray(g.color)?g.color[f]:g.color);var y=s.c2p(h.x,!0),m=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,A=o._origY,M=i.extendFlat({},t,{color:a(o,h),x0:y-x,x1:y+x,xLabelVal:k?k[f]:h.x,y0:m-x,y1:m+x,yLabelVal:A?A[f]:h.y,cd:T,distance:u,spikeDistance:c,hovertemplate:h.ht});return h.htx?M.text=h.htx:h.tx?M.text=h.tx:o.text&&(M.text=o.text),i.fillText(h,o,M),n.getComponentMethod("errorbars","hoverInfo")(h,o,M),M}t.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,u,c,f,h,p,d,v=t.cd,g=v[0].t,y=v[0].trace,m=t.xa,x=t.ya,b=g.x,_=g.y,w=m.c2p(e),T=x.c2p(r),k=t.distance;if(g.tree){var A=m.p2c(w-k),M=m.p2c(w+k),S=x.p2c(T-k),E=x.p2c(T+k);i="x"===n?g.tree.range(Math.min(A,M),Math.min(x._rl[0],x._rl[1]),Math.max(A,M),Math.max(x._rl[0],x._rl[1])):g.tree.range(Math.min(A,M),Math.min(S,E),Math.max(A,M),Math.max(S,E))}else i=g.ids;var L=k;if("x"===n){var C=!!y.xperiodalignment,P=!!y.yperiodalignment;for(c=0;c=Math.min(O,I)&&w<=Math.max(O,I)?0:1/0}if(f=Math.min(D,z)&&T<=Math.max(D,z)?0:1/0}d=Math.sqrt(f*f+h*h),s=i[c]}}}else for(c=i.length-1;c>-1;c--)l=b[a=i[c]],u=_[a],f=m.c2p(l)-w,h=x.c2p(u)-T,(p=Math.sqrt(f*f+h*h))m.glText.length){var T=_-m.glText.length;for(v=0;vr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),m.line2d.update(m.lineOptions)),m.error2d){var A=(m.errorXOptions||[]).concat(m.errorYOptions||[]);m.error2d.update(A)}m.scatter2d&&m.scatter2d.update(m.markerOptions),m.fillOrder=s.repeat(null,_),m.fill2d&&(m.fillOptions=m.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,u=m.lineOptions[e],c=[];s._ownfill&&c.push(e),s._nexttrace&&c.push(e+1),c.length&&(m.fillOrder[e]=c);var f,h,p=[],d=u&&u.positions||l.positions;if("tozeroy"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if("tozerox"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],i=0,t.splitNull=!0,a=0;a-1;for(v=0;v<_;v++){var L=r[v][0],C=L.trace,P=L.t,O=P.index,I=C._length,D=P.x,z=P.y;if(C.selectedpoints||S||E){if(S||(S=!0),C.selectedpoints){var R=m.selectBatch[O]=s.selIndices2selPoints(C),F={};for(g=0;g")}function c(t){return t+"°"}}t.exports={hoverPoints:function(t,e,r){var o=t.cd,c=o[0].trace,f=t.xa,h=t.ya,p=t.subplot,d=[],v=l+c.uid+"-circle",g=c.cluster&&c.cluster.enabled;if(g){var y=p.map.queryRenderedFeatures(null,{layers:[v]});d=y.map((function(t){return t.id}))}var m=360*(e>=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),x=e-m;if(n.getClosest(o,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;if(g&&-1===d.indexOf(t.i+1))return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=p.project([n,a]),l=o.x-f.c2p([x,a]),u=o.y-h.c2p([n,r]),c=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+u*u)-c,1-3/c)}),t),!1!==t.index){var b=o[t.index],_=b.lonlat,w=[i.modHalf(_[0],360)+m,_[1]],T=f.c2p(w),k=h.c2p(w),A=b.mrc||1;t.x0=T-A,t.x1=T+A,t.y0=k-A,t.y1=k+A;var M={};M[c.subplot]={_subplot:p};var S=c._module.formatLabels(b,c,M);return t.lonLabel=S.lonLabel,t.latLabel=S.latLabel,t.color=a(c,b),t.extraText=u(c,b,o[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}},getExtraText:u}},20467:function(t,e,r){"use strict";t.exports={attributes:r(99181),supplyDefaults:r(76645),colorbar:r(4898),formatLabels:r(15636),calc:r(84622),plot:r(86951),hoverPoints:r(28178).hoverPoints,eventData:r(53353),selectPoints:r(86387),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:r(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function(t,e,r){"use strict";var n=r(71828),i=r(15790),a=r(77734).traceLayerPrefix,o={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function s(t,e,r,n){this.type="scattermapbox",this.subplot=t,this.uid=e,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol",cluster:"source-"+e+"-circle",clusterCount:"source-"+e+"-circle"},this.layerIds={fill:a+e+"-fill",line:a+e+"-line",circle:a+e+"-circle",symbol:a+e+"-symbol",cluster:a+e+"-cluster",clusterCount:a+e+"-cluster-count"},this.below=null}var l=s.prototype;l.addSource=function(t,e,r){var i={type:"geojson",data:e.geojson};r&&r.enabled&&n.extendFlat(i,{cluster:!0,clusterMaxZoom:r.maxzoom}),this.subplot.map.addSource(this.sourceIds[t],i)},l.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},l.addLayer=function(t,e,r){var n={type:e.type,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint};e.filter&&(n.filter=e.filter),this.subplot.addLayer(n,r)},l.update=function(t){var e=t[0].trace,r=this.subplot,n=r.map,a=i(r.gd,t),s=r.belowLookup["trace-"+this.uid],l=!(!e.cluster||!e.cluster.enabled),u=!!this.clusterEnabled,c=this;function f(t){u?function(t){for(var e=o.cluster,r=e.length-1;r>=0;r--){var i=e[r];n.removeLayer(c.layerIds[i])}t||n.removeSource(c.sourceIds.circle)}(t):function(t){for(var e=o.nonCluster,r=e.length-1;r>=0;r--){var i=e[r];n.removeLayer(c.layerIds[i]),t||n.removeSource(c.sourceIds[i])}}(t)}function h(t){l?function(t){t||c.addSource("circle",a.circle,e.cluster);for(var r=o.cluster,n=0;n=0;r--){var n=e[r];t.removeLayer(this.layerIds[n]),t.removeSource(this.sourceIds[n])}},t.exports=function(t,e){var r,n,a,l=e[0].trace,u=l.cluster&&l.cluster.enabled,c=!0!==l.visible,f=new s(t,l.uid,u,c),h=i(t.gd,e),p=f.below=t.belowLookup["trace-"+l.uid];if(u)for(f.addSource("circle",h.circle,l.cluster),r=0;r")}}t.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},91271:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:r(23580),categories:["polar","symbols","showLegend","scatter-like"],attributes:r(81245),supplyDefaults:r(22184).supplyDefaults,colorbar:r(4898),formatLabels:r(98608),calc:r(26442),plot:r(45162),style:r(16296).style,styleOnSelect:r(16296).styleOnSelect,hoverPoints:r(59150).hoverPoints,selectPoints:r(98002),meta:{}}},45162:function(t,e,r){"use strict";var n=r(32663),i=r(50606).BADNUM;t.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),o=e.xaxis,s=e.yaxis,l={xaxis:o,yaxis:s,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},u=e.radialAxis,c=e.angularAxis,f=0;f=u&&(m.marker.cluster=d.tree),m.marker&&(m.markerSel.positions=m.markerUnsel.positions=m.marker.positions=_),m.line&&_.length>1&&l.extendFlat(m.line,s.linePositions(t,p,_)),m.text&&(l.extendFlat(m.text,{positions:_},s.textPosition(t,p,m.text,m.marker)),l.extendFlat(m.textSel,{positions:_},s.textPosition(t,p,m.text,m.markerSel)),l.extendFlat(m.textUnsel,{positions:_},s.textPosition(t,p,m.text,m.markerUnsel))),m.fill&&!h.fill2d&&(h.fill2d=!0),m.marker&&!h.scatter2d&&(h.scatter2d=!0),m.line&&!h.line2d&&(h.line2d=!0),m.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(m.line),h.fillOptions.push(m.fill),h.markerOptions.push(m.marker),h.markerSelectedOptions.push(m.markerSel),h.markerUnselectedOptions.push(m.markerUnsel),h.textOptions.push(m.text),h.textSelectedOptions.push(m.textSel),h.textUnselectedOptions.push(m.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=g,d.theta=y,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}},t.exports.reglPrecompiled={}},48300:function(t,e,r){"use strict";var n=r(5386).f,i=r(5386).s,a=r(1426).extendFlat,o=r(82196),s=r(9012),l=o.line;t.exports={mode:o.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:o.text,texttemplate:i({editType:"plot"},{keys:["real","imag","text"]}),hovertext:o.hovertext,line:{color:l.color,width:l.width,dash:l.dash,backoff:l.backoff,shape:a({},l.shape,{values:["linear","spline"]}),smoothing:l.smoothing,editType:"calc"},connectgaps:o.connectgaps,marker:o.marker,cliponaxis:a({},o.cliponaxis,{dflt:!1}),textposition:o.textposition,textfont:o.textfont,fill:a({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:o.fillcolor,hoverinfo:a({},s.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:o.hoveron,hovertemplate:n(),selected:o.selected,unselected:o.unselected}},30621:function(t,e,r){"use strict";var n=r(92770),i=r(50606).BADNUM,a=r(36922),o=r(75225),s=r(66279),l=r(47761).calcMarkerSize;t.exports=function(t,e){for(var r=t._fullLayout,u=e.subplot,c=r[u].realaxis,f=r[u].imaginaryaxis,h=c.makeCalcdata(e,"real"),p=f.makeCalcdata(e,"imag"),d=e._length,v=new Array(d),g=0;g")}}t.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,u=s.cd[s.index],c=s.trace;if(l.isPtInside(u))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(u,c,l,s),s.hovertemplate=c.hovertemplate,o}},makeHoverPointText:i}},85956:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:r(7504),categories:["smith","symbols","showLegend","scatter-like"],attributes:r(48300),supplyDefaults:r(65269),colorbar:r(4898),formatLabels:r(62047),calc:r(30621),plot:r(12480),style:r(16296).style,styleOnSelect:r(16296).styleOnSelect,hoverPoints:r(11350).hoverPoints,selectPoints:r(98002),meta:{}}},12480:function(t,e,r){"use strict";var n=r(32663),i=r(50606).BADNUM,a=r(23893).smith;t.exports=function(t,e,r){for(var o=e.layers.frontplot.select("g.scatterlayer"),s=e.xaxis,l=e.yaxis,u={xaxis:s,yaxis:l,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},c=0;c"),o.hovertemplate=h.hovertemplate,a}function x(t,e){y.push(t._hovertitle+": "+e)}}},52979:function(t,e,r){"use strict";t.exports={attributes:r(50413),supplyDefaults:r(46008),colorbar:r(4898),formatLabels:r(93645),calc:r(54337),plot:r(7507),style:r(16296).style,styleOnSelect:r(16296).styleOnSelect,hoverPoints:r(47250),selectPoints:r(98002),eventData:r(4524),moduleType:"trace",name:"scatterternary",basePlotModule:r(61639),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},7507:function(t,e,r){"use strict";var n=r(32663);t.exports=function(t,e,r){var i=e.plotContainer;i.select(".scatterlayer").selectAll("*").remove();for(var a=e.xaxis,o=e.yaxis,s={xaxis:a,yaxis:o,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},l=e.layers.frontplot.select("g.scatterlayer"),u=0;uh?b.sizeAvg||Math.max(b.size,3):a(e,x),p=0;pa&&l||i-1,P=!0;if(o(x)||p.selectedpoints||C){var O=p._length;if(p.selectedpoints){v.selectBatch=p.selectedpoints;var I=p.selectedpoints,D={};for(l=0;l1&&(c=v[m-1],h=g[m-1],d=y[m-1]),e=0;ec?"-":"+")+"x")).replace("y",(f>h?"-":"+")+"y")).replace("z",(p>d?"-":"+")+"z");var L=function(){m=0,M=[],S=[],E=[]};(!m||m2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,c=e._len,f={};function d(t,e){var n=r[e],o=i[u[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,"xaxis"),d(e._v,"yaxis"),d(e._w,"zaxis"),c),!c)return{positions:[],cells:[]};var v=d(e._Xs,"xaxis"),g=d(e._Ys,"yaxis"),y=d(e._Zs,"zaxis");if(f.meshgrid=[v,g,y],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,"xaxis"),d(e._startsY,"yaxis"),d(e._startsZ,"zaxis"));else{for(var m=g[0],x=h(v),b=h(y),_=new Array(x.length*b.length),w=0,T=0;T=0};m?(r=Math.min(y.length,b.length),l=function(t){return M(y[t])&&S(t)},f=function(t){return String(y[t])}):(r=Math.min(x.length,b.length),l=function(t){return M(x[t])&&S(t)},f=function(t){return String(x[t])}),w&&(r=Math.min(r,_.length));for(var E=0;E1){for(var O=a.randstr(),I=0;I"),name:A||D("name")?m.name:void 0,color:k("hoverlabel.bgcolor")||x.color,borderColor:k("hoverlabel.bordercolor"),fontFamily:k("hoverlabel.font.family"),fontSize:k("hoverlabel.font.size"),fontColor:k("hoverlabel.font.color"),nameLength:k("hoverlabel.namelength"),textAlign:k("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:P,eventData:l};g&&(F.x0=E-i.rInscribed*i.rpx1,F.x1=E+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?"left":"right"),y&&(F.x=E,F.idealAlign=E<0?"left":"right");var B=[];o.loneHover(F,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r,inOut_bbox:B}),l[0].bbox=B[0],d._hasHoverLabel=!0}if(y){var N=t.select("path.surface");h.styleOne(N,i,m,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:l||[f(i,m,h.eventDataKeys)],event:n.event})}})),t.on("mouseout",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),y){var l=t.select("path.surface");h.styleOne(l,s,a,{hovered:!1})}})),t.on("click",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=g&&(u.isHierarchyRoot(t)||u.isLeaf(t)),c=u.getPtId(t),p=u.isEntry(t)?u.findEntryWithChild(v,c):u.findEntryWithLevel(v,c),y=u.getPtId(p),m={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(m.nextLevel=y);var x=l.triggerHandler(r,"plotly_"+d.type+"click",m);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call("_storeDirectGUIEdit",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:y}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call("animate",r,b,_)}}))}},2791:function(t,e,r){"use strict";var n=r(71828),i=r(7901),a=r(6964),o=r(53581);function s(t){return t.data.data.pid}e.findEntryWithLevel=function(t,r){var n;return r&&t.eachAfter((function(t){if(e.getPtId(t)===r)return n=t.copy()})),n||t},e.findEntryWithChild=function(t,r){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},e.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,s(r))},e.listPath=function(t,r){var n=t.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return e.listPath(n,r).concat(i)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=o.formatPieValue,e.formatPercent=function(t,e){var r=n.formatPercent(t,0);return"0%"===r&&(r=o.formatPiePercent(t,e)),r}},87619:function(t,e,r){"use strict";t.exports={moduleType:"trace",name:"sunburst",basePlotModule:r(66888),categories:[],animatable:!0,attributes:r(57564),layoutAttributes:r(2654),supplyDefaults:r(17094),supplyLayoutDefaults:r(57034),calc:r(52147).calc,crossTraceCalc:r(52147).crossTraceCalc,plot:r(24714).plot,style:r(29969).style,colorbar:r(4898),meta:{}}},2654:function(t){"use strict";t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function(t,e,r){"use strict";var n=r(71828),i=r(2654);t.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},24714:function(t,e,r){"use strict";var n=r(39898),i=r(674),a=r(29502).sX,o=r(91424),s=r(71828),l=r(63893),u=r(72597),c=u.recordMinTextSize,f=u.clearMinTextSize,h=r(14575),p=r(53581).getRotationAngle,d=h.computeTransform,v=h.transformInsideText,g=r(29969).styleOne,y=r(16688).resizeText,m=r(83523),x=r(7055),b=r(2791);function _(t,r,u,f){var h=t._context.staticPlot,y=t._fullLayout,_=!y.uniformtext.mode&&b.hasTransition(f),T=n.select(u).selectAll("g.slice"),k=r[0],A=k.trace,M=k.hierarchy,S=b.findEntryWithLevel(M,A.level),E=b.getMaxDepth(A),L=y._size,C=A.domain,P=L.w*(C.x[1]-C.x[0]),O=L.h*(C.y[1]-C.y[0]),I=.5*Math.min(P,O),D=k.cx=L.l+L.w*(C.x[1]+C.x[0])/2,z=k.cy=L.t+L.h*(1-C.y[0])-O/2;if(!S)return T.remove();var R=null,F={};_&&T.each((function(t){F[b.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!R&&b.isEntry(t)&&(R=t)}));var B=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(S).descendants(),N=S.height+1,j=0,U=E;k.hasMultipleRoots&&b.isHierarchyRoot(S)&&(B=B.slice(1),N-=1,j=1,U+=1),B=B.filter((function(t){return t.y1<=U}));var V=p(A.rotation);V&&B.forEach((function(t){t.x0+=V,t.x1+=V}));var H=Math.min(N,E),q=function(t){return(t-j)/H*I},G=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},Z=function(t){return s.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,D,z)},Y=function(t){return D+w(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},W=function(t){return z+w(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(T=T.data(B,b.getPtId)).enter().append("g").classed("slice",!0),_?T.exit().transition().each((function(){var t=n.select(this);t.select("path.surface").transition().attrTween("d",(function(t){var e=function(t){var e,r=b.getPtId(t),n=F[r],i=F[b.getPtId(S)];if(i){var o=(t.x1>i.x1?2*Math.PI:0)+V;e=t.rpx1X?2*Math.PI:0)+V;e={x0:i,x1:i}}else e={rpx0:I,rpx1:I},s.extendFlat(e,$(t));else e={rpx0:0,rpx1:0};else e={x0:V,x1:V};return a(e,n)}(t);return function(t){return Z(e(t))}})):f.attr("d",Z),u.call(m,S,t,r,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(b.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),f.call(g,i,A);var p=s.ensureSingle(u,"g","slicetext"),w=s.ensureSingle(p,"text","",(function(t){t.attr("data-notex",1)})),T=s.ensureUniformFontSize(t,b.determineTextFont(A,i,y.font));w.text(e.formatSliceLabel(i,S,A,r,y)).classed("slicetext",!0).attr("text-anchor","middle").call(o.font,T).call(l.convertToTspans,t);var M=o.bBox(w.node());i.transform=v(M,i,k),i.transform.targetX=Y(i),i.transform.targetY=W(i);var E=function(t,e){var r=t.transform;return d(r,e),r.fontSize=T.size,c(A.type,r,y),s.getTextTransform(r)};_?w.transition().attrTween("transform",(function(t){var e=function(t){var e,r=F[b.getPtId(t)],n=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},R)if(t.parent)if(X){var i=t.x1>X?2*Math.PI:0;e.x0=e.x1=i}else s.extendFlat(e,$(t));else e.x0=e.x1=V;else e.x0=e.x1=V;var o=a(e.transform.textPosAngle,t.transform.textPosAngle),l=a(e.rpx1,t.rpx1),u=a(e.x0,t.x0),f=a(e.x1,t.x1),h=a(e.transform.scale,n.scale),p=a(e.transform.rotate,n.rotate),d=0===n.rCenter?3:0===e.transform.rCenter?1/3:1,v=a(e.transform.rCenter,n.rCenter);return function(t){var e=l(t),r=u(t),i=f(t),a=function(t){return v(Math.pow(t,d))}(t),s={pxmid:G(e,(r+i)/2),rpx1:e,transform:{textPosAngle:o(t),rCenter:a,x:n.x,y:n.y}};return c(A.type,n,y),{transform:{targetX:Y(s),targetY:W(s),scale:h(t),rotate:p(t),rCenter:a}}}}(t);return function(t){return E(e(t),M)}})):w.attr("transform",E(i,M))}))}function w(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}e.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,u=!r,c=!s.uniformtext.mode&&b.hasTransition(r);f("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),c?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(e){_(t,e,this,r)}))}))):(a.each((function(e){_(t,e,this,r)})),s.uniformtext.mode&&y(t,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,o=r.textinfo;if(!(a||o&&"none"!==o))return"";var l=i.separators,u=n[0],c=t.data.data,f=u.hierarchy,h=b.isHierarchyRoot(t),p=b.getParent(f,t),d=b.getValue(t);if(!a){var v,g=o.split("+"),y=function(t){return-1!==g.indexOf(t)},m=[];if(y("label")&&c.label&&m.push(c.label),c.hasOwnProperty("v")&&y("value")&&m.push(b.formatValue(c.v,l)),!h){y("current path")&&m.push(b.getPath(t.data));var x=0;y("percent parent")&&x++,y("percent entry")&&x++,y("percent root")&&x++;var _=x>1;if(x){var w,T=function(t){v=b.formatPercent(w,l),_&&(v+=" of "+t),m.push(v)};y("percent parent")&&!h&&(w=d/b.getValue(p),T("parent")),y("percent entry")&&(w=d/b.getValue(e),T("entry")),y("percent root")&&(w=d/b.getValue(f),T("root"))}}return y("text")&&(v=s.castOption(r,c.i,"text"),s.isValidTextValue(v)&&m.push(v)),m.join("
")}var k=s.castOption(r,c.i,"texttemplate");if(!k)return"";var A={};c.label&&(A.label=c.label),c.hasOwnProperty("v")&&(A.value=c.v,A.valueLabel=b.formatValue(c.v,l)),A.currentPath=b.getPath(t.data),h||(A.percentParent=d/b.getValue(p),A.percentParentLabel=b.formatPercent(A.percentParent,l),A.parent=b.getPtLabel(p)),A.percentEntry=d/b.getValue(e),A.percentEntryLabel=b.formatPercent(A.percentEntry,l),A.entry=b.getPtLabel(e),A.percentRoot=d/b.getValue(f),A.percentRootLabel=b.formatPercent(A.percentRoot,l),A.root=b.getPtLabel(f),c.hasOwnProperty("color")&&(A.color=c.color);var M=s.castOption(r,c.i,"text");return(s.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=s.castOption(r,c.i,"customdata"),s.texttemplateString(k,A,i._d3locale,A,r._meta||{})}},29969:function(t,e,r){"use strict";var n=r(39898),i=r(7901),a=r(71828),o=r(72597).resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,"marker.line.color")||i.defaultLine,u=a.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",u).call(i.fill,n.color).call(i.stroke,l).style("opacity",o?r.leaf.opacity:null)}t.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");o(t,e,"sunburst"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style("opacity",r.opacity),e.selectAll("path.surface").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},54532:function(t,e,r){"use strict";var n=r(7901),i=r(50693),a=r(12663).axisHoverFormat,o=r(5386).f,s=r(9012),l=r(1426).extendFlat,u=r(30962).overrideAll;function c(t){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:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var f=t.exports=u(l({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:o(),xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:l({},i.zauto,{}),zmin:l({},i.zmin,{}),zmax:l({},i.zmax,{})},hoverinfo:l({},s.hoverinfo),showlegend:l({},s.showlegend,{dflt:!1})}),"calc","nested");f.x.editType=f.y.editType=f.z.editType="calc+clearAxisTypes",f.transforms=void 0},18396:function(t,e,r){"use strict";var n=r(78803);t.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):n(t,e,{vals:e.z,containerStr:"",cLetter:"c"})}},43768:function(t,e,r){"use strict";var n=r(9330).gl_surface3d,i=r(9330).ndarray,a=r(9330).ndarray_linear_interpolate.d2,o=r(824),s=r(43907),l=r(71828).isArrayOrTypedArray,u=r(81697).parseColorScale,c=r(78614),f=r(21081).extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,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 p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.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++){null!=t.dataCoordinate[a]&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var o=this.data.hovertext||this.data.text;return Array.isArray(o)&&o[i]&&void 0!==o[i][n]?t.textLabel=o[i][n]:t.textLabel=o||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[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 v(t,e){if(t0){r=d[n];break}return r}function m(t,e){if(!(t<1||e<1)){for(var r=g(t),n=g(e),i=1,a=0;a_;)r--,r/=y(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,u=1+a+1,c=i(new Float32Array(l*u),[l,u]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]",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"}}},51018:function(t,e,r){"use strict";var n=r(49850),i=r(1426).extendFlat,a=r(92770);function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||u===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=u+1,a=0);return n}t.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[""],d=l(d));var v=d.concat(p(r).map((function(){return u((d[0]||[""]).length)}))),g=e.domain,y=Math.floor(t._fullLayout._size.w*(g.x[1]-g.x[0])),m=Math.floor(t._fullLayout._size.h*(g.y[1]-g.y[0])),x=e.header.values.length?v[0].map((function(){return e.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return e.cells.height})):[],_=x.reduce(s,0),w=h(b,m-_+n.uplift),T=f(h(x,_),[]),k=f(w,T),A={},M=e._fullInput.columnorder.concat(p(r.map((function(t,e){return e})))),S=v.map((function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1})),E=S.reduce(s,0);S=S.map((function(t){return t/E*y}));var L=Math.max(o(e.header.line.width),o(e.cells.line.width)),C={key:e.uid+t._context.staticPlot,translateX:g.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-g.y[1]),size:t._fullLayout._size,width:y,maxLineWidth:L,height:m,columnOrder:M,groupHeight:m,rowBlocks:k,headerRowBlocks:T,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:v}),gdColumns:v.map((function(t){return t[0]})),gdColumnsOriginalOrder:v.map((function(t){return t[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:v.map((function(t,e){var r=A[t];return A[t]=(r||0)+1,{key:t+"__"+A[t],label:t,specIndex:e,xIndex:M[e],xScale:c,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return C.columns.forEach((function(t){t.calcdata=C,t.x=c(t)})),C}},56269:function(t,e,r){"use strict";var n=r(1426).extendFlat;e.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},e.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0;return[r,e?r+e.rows.length:0]}(t);return(t.values||[]).slice(e[0],e[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}}))}},39754:function(t,e,r){"use strict";var n=r(71828),i=r(44464),a=r(27670).c;t.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),n.coerceFont(s,"header.font",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(t,e){return t-e})),o=i.map((function(t){return a.indexOf(t)})),s=o.length;s/i),l=!o||s;t.mayHaveMarkup=o&&i.match(/[<&>]/);var u,c="string"==typeof(u=i)&&u.match(n.latexCheck);t.latex=c;var f,h,p=c?"":T(t.calcdata.cells.prefix,e,r)||"",d=c?"":T(t.calcdata.cells.suffix,e,r)||"",v=c?null:T(t.calcdata.cells.format,e,r)||null,g=p+(v?a(v)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!c&&(f=w(g)),t.cellHeightMayIncrease=s||c||t.mayHaveMarkup||(void 0===f?w(g):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var y=(" "===n.wrapSplitCharacter?g.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===u.length&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),e.each((function(t,e){t.page=u[e],t.scrollY=l})),e.attr("transform",(function(t){var e=z(t.rowBlocks,t.page)-t.scrollY;return c(0,e)})),t&&(C(t,r,e,u,n.prevPages,n,0),C(t,r,e,u,n.prevPages,n,1),x(r,t))}}function L(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter((function(t){return s.key===t.key})),u=r||s.scrollbarState.dragMultiplier,c=s.scrollY;s.scrollY=void 0===a?s.scrollY+u*i.event.dy:a;var f=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(A);return E(t,f,l),s.scrollY===c}}function C(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(t,e){return e===o&&n[e]!==i[e]}));b(t,e,a,r),i[o]=n[o]})))}function P(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll("tspan.line").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=e[e.length-1].width,s=e.slice(0,-1),l=[],u=0,c=t.column.columnWidth-2*n.cellPad;for(t.value="";s.length;)u+(i=(r=s.shift()).width+a)>c&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],u=0),l.push(r.text),u+=i;u&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0})),o.selectAll("tspan.line").remove(),_(o.select("."+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(D)}}function O(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=B(o),u=o.key-l.firstRowIndex,f=l.rows[u].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[u].rowHeight&&(l.rows[u].rowHeight=p,t.selectAll("."+n.cn.columnCell).call(D),E(null,t.filter(A),0),x(r,a,!0)),s.attr("transform",(function(){var t=this,e=t.parentNode.getBoundingClientRect(),r=i.select(t.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),a=t.transform.baseVal.consolidate(),s=r.top-e.top+(a?a.matrix.f:n.cellPad);return c(I(o,i.select(t.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width),s)})),o.settledY=!0}}}function I(t,e){switch(t.align){case"left":default:return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2}}function D(t){t.attr("transform",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+R(e,1/0)}),0),r=R(B(t),t.key);return c(0,r+e)})).selectAll("."+n.cn.cellRect).attr("height",(function(t){return(e=B(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function z(t,e){for(var r=0,n=e-1;n>=0;n--)r+=F(t[n]);return r}function R(t,e){for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:c({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:u.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c({},s.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:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},78018:function(t,e,r){"use strict";var n=r(74875);e.name="treemap",e.plot=function(t,r,i,a){n.plotBasePlot(e.name,t,r,i,a)},e.clean=function(t,r,i,a){n.cleanBasePlot(e.name,t,r,i,a)}},65039:function(t,e,r){"use strict";var n=r(52147);e.y=function(t,e){return n.calc(t,e)},e.T=function(t){return n._runCrossTraceCalc("treemap",t)}},43473:function(t){"use strict";t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function(t,e,r){"use strict";var n=r(71828),i=r(45802),a=r(7901),o=r(27670).c,s=r(90769).handleText,l=r(97313).TEXTPAD,u=r(21081),c=u.hasColorscale,f=u.handleDefaults;t.exports=function(t,e,r,u){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h("labels"),d=h("parents");if(p&&p.length&&d&&d.length){var v=h("values");v&&v.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),"squarify"===h("tiling.packing")&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var g=h("text");h("texttemplate"),e.texttemplate||h("textinfo",Array.isArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate");var y=h("pathbar.visible");s(t,e,u,h,"auto",{hasPathbar:y,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var m=-1!==e.textposition.indexOf("bottom");h("marker.line.width")&&h("marker.line.color",u.paper_bgcolor);var x=h("marker.colors");(e._hasColorscale=c(t,"marker","colors")||(t.marker||{}).coloraxis)?f(t,e,u,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(x||[]).length);var b=2*e.textfont.size;h("marker.pad.t",m?b/4:b),h("marker.pad.l",b/4),h("marker.pad.r",b/4),h("marker.pad.b",m?b:b/4),h("marker.cornerradius"),e._hovered={marker:{line:{width:2,color:a.contrast(u.paper_bgcolor)}}},y&&(h("pathbar.thickness",e.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),o(e,u,h),e._length=null}else e.visible=!1}},80694:function(t,e,r){"use strict";var n=r(39898),i=r(2791),a=r(72597).clearMinTextSize,o=r(16688).resizeText,s=r(46650);t.exports=function(t,e,r,l,u){var c,f,h=u.type,p=u.drawDescendants,d=t._fullLayout,v=d["_"+h+"layer"],g=!r;a(h,d),(c=v.selectAll("g.trace."+h).data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed(h,!0),c.order(),!d.uniformtext.mode&&i.hasTransition(r)?(l&&(f=l()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){f&&f()})).each("interrupt",(function(){f&&f()})).each((function(){v.selectAll("g.trace").each((function(e){s(t,e,this,r,p)}))}))):(c.each((function(e){s(t,e,this,r,p)})),d.uniformtext.mode&&o(t,v.selectAll(".trace"),h)),g&&c.exit().remove()}},66209:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(91424),o=r(63893),s=r(37210),l=r(96362).styleOne,u=r(43473),c=r(2791),f=r(83523),h=!0;t.exports=function(t,e,r,p,d){var v=d.barDifY,g=d.width,y=d.height,m=d.viewX,x=d.viewY,b=d.pathSlice,_=d.toMoveInsideSlice,w=d.strTransform,T=d.hasTransition,k=d.handleSlicesExit,A=d.makeUpdateSliceInterpolator,M=d.makeUpdateTextInterpolator,S={},E=t._context.staticPlot,L=t._fullLayout,C=e[0],P=C.trace,O=C.hierarchy,I=g/P._entryDepth,D=c.listPath(r.data,"id"),z=s(O.copy(),[g,y],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(z=z.filter((function(t){var e=D.indexOf(t.data.id);return-1!==e&&(t.x0=I*e,t.x1=I*(e+1),t.y0=v,t.y1=v+y,t.onPathbar=!0,!0)}))).reverse(),(p=p.data(z,c.getPtId)).enter().append("g").classed("pathbar",!0),k(p,h,S,[g,y],b),p.order();var R=p;T&&(R=R.transition().each("end",(function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),R.each((function(s){s._x0=m(s.x0),s._x1=m(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=m(s.x1-Math.min(g,y)/2),s._hoverY=x(s.y1-y/2);var p=n.select(this),d=i.ensureSingle(p,"path","surface",(function(t){t.style("pointer-events",E?"none":"all")}));T?d.transition().attrTween("d",(function(t){var e=A(t,h,S,[g,y]);return function(t){return b(e(t))}})):d.attr("d",b),p.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),d.call(l,s,P,{hovered:!1}),s._text=(c.getPtLabel(s)||"").split("
").join(" ")||"";var v=i.ensureSingle(p,"g","slicetext"),k=i.ensureSingle(v,"text","",(function(t){t.attr("data-notex",1)})),C=i.ensureUniformFontSize(t,c.determineTextFont(P,s,L.font,{onPathbar:!0}));k.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(a.font,C).call(o.convertToTspans,t),s.textBB=a.bBox(k.node()),s.transform=_(s,{fontSize:C.size,onPathbar:!0}),s.transform.fontSize=C.size,T?k.transition().attrTween("transform",(function(t){var e=M(t,h,S,[g,y]);return function(t){return w(e(t))}})):k.attr("transform",w(s))}))}},52583:function(t,e,r){"use strict";var n=r(39898),i=r(71828),a=r(91424),o=r(63893),s=r(37210),l=r(96362).styleOne,u=r(43473),c=r(2791),f=r(83523),h=r(24714).formatSliceLabel,p=!1;t.exports=function(t,e,r,d,v){var g=v.width,y=v.height,m=v.viewX,x=v.viewY,b=v.pathSlice,_=v.toMoveInsideSlice,w=v.strTransform,T=v.hasTransition,k=v.handleSlicesExit,A=v.makeUpdateSliceInterpolator,M=v.makeUpdateTextInterpolator,S=v.prevEntry,E=t._context.staticPlot,L=t._fullLayout,C=e[0].trace,P=-1!==C.textposition.indexOf("left"),O=-1!==C.textposition.indexOf("right"),I=-1!==C.textposition.indexOf("bottom"),D=!I&&!C.marker.pad.t||I&&!C.marker.pad.b,z=s(r,[g,y],{packing:C.tiling.packing,squarifyratio:C.tiling.squarifyratio,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,pad:{inner:C.tiling.pad,top:C.marker.pad.t,left:C.marker.pad.l,right:C.marker.pad.r,bottom:C.marker.pad.b}}).descendants(),R=1/0,F=-1/0;z.forEach((function(t){var e=t.depth;e>=C._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(R=Math.min(R,e),F=Math.max(F,e))})),d=d.data(z,c.getPtId),C._maxVisibleLayers=isFinite(F)?F-R+1:0,d.enter().append("g").classed("slice",!0),k(d,p,{},[g,y],b),d.order();var B=null;if(T&&S){var N=c.getPtId(S);d.each((function(t){null===B&&c.getPtId(t)===N&&(B={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var j=function(){return B||{x0:0,x1:g,y0:0,y1:y}},U=d;return T&&(U=U.transition().each("end",(function(){var e=n.select(this);c.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),U.each((function(s){var d=c.isHeader(s,C);s._x0=m(s.x0),s._x1=m(s.x1),s._y0=x(s.y0),s._y1=x(s.y1),s._hoverX=m(s.x1-C.marker.pad.r),s._hoverY=x(I?s.y1-C.marker.pad.b/2:s.y0+C.marker.pad.t/2);var v=n.select(this),k=i.ensureSingle(v,"path","surface",(function(t){t.style("pointer-events",E?"none":"all")}));T?k.transition().attrTween("d",(function(t){var e=A(t,p,j(),[g,y]);return function(t){return b(e(t))}})):k.attr("d",b),v.call(f,r,t,e,{styleOne:l,eventDataKeys:u.eventDataKeys,transitionTime:u.CLICK_TRANSITION_TIME,transitionEasing:u.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,t,{isTransitioning:t._transitioning}),k.call(l,s,C,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=d?D?"":c.getPtLabel(s)||"":h(s,r,C,e,L)||"";var S=i.ensureSingle(v,"g","slicetext"),z=i.ensureSingle(S,"text","",(function(t){t.attr("data-notex",1)})),R=i.ensureUniformFontSize(t,c.determineTextFont(C,s,L.font));z.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",O?"end":P||d?"start":"middle").call(a.font,R).call(o.convertToTspans,t),s.textBB=a.bBox(z.node()),s.transform=_(s,{fontSize:R.size,isHeader:d}),s.transform.fontSize=R.size,T?z.transition().attrTween("transform",(function(t){var e=M(t,p,j(),[g,y]);return function(t){return w(e(t))}})):z.attr("transform",w(s))})),B}},14102:function(t){"use strict";t.exports=function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i),n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i),n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?C+I:-(O+I):0,z={x0:P,x1:P,y0:D,y1:D+O},R=function(t,e,r){var n=y.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return t.x0===e.x0&&t.x1===e.x1&&t.y0===e.y0&&t.y1===e.y1?{x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1}:{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},F=null,B={},N={},j=null,U=function(t,e){return e?B[h(t)]:N[h(t)]};g.hasMultipleRoots&&k&&M++,y._maxDepth=M,y._backgroundColor=v.paper_bgcolor,y._entryDepth=b.data.depth,y._atRootLevel=k;var V=-L/2+S.l+S.w*(E.x[1]+E.x[0])/2,H=-C/2+S.t+S.h*(1-(E.y[1]+E.y[0])/2),q=function(t){return V+t},G=function(t){return H+t},Z=G(0),Y=q(0),W=function(t){return Y+t},X=function(t){return Z+t};function J(t,e){return t+","+e}var K=W(0),$=function(t){t.x=Math.max(K,t.x)},Q=y.pathbar.edgeshape,tt=y[m?"tiling":"marker"].pad,et=function(t){return-1!==y.textposition.indexOf(t)},rt=et("top"),nt=et("left"),it=et("right"),at=et("bottom"),ot=function(t,e){var r=t.x0,n=t.x1,i=t.y0,a=t.y1,o=t.textBB,c=rt||e.isHeader&&!at?"start":at?"end":"middle",f=et("right"),h=et("left")||e.onPathbar?-1:f?1:0;if(e.isHeader){if((r+=(m?tt:tt.l)-s)>=(n-=(m?tt:tt.r)-s)){var p=(r+n)/2;r=p,n=p}var d;at?i<(d=a-(m?tt:tt.b))&&d"===Q?(l.x-=a,u.x-=a,c.x-=a,f.x-=a):"/"===Q?(c.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):"\\"===Q?(l.x-=a,u.x-=a,o.x-=a/2,s.x-=a/2):"<"===Q&&(o.x-=a,s.x-=a),$(l),$(f),$(o),$(u),$(c),$(s),"M"+J(l.x,l.y)+"L"+J(u.x,u.y)+"L"+J(s.x,s.y)+"L"+J(c.x,c.y)+"L"+J(f.x,f.y)+"L"+J(o.x,o.y)+"Z"},toMoveInsideSlice:ot,makeUpdateSliceInterpolator:lt,makeUpdateTextInterpolator:ut,handleSlicesExit:ct,hasTransition:A,strTransform:ft}):w.remove()}},96362:function(t,e,r){"use strict";var n=r(39898),i=r(7901),a=r(71828),o=r(2791),s=r(72597).resizeText;function l(t,e,r,n){var s,l,u=(n||{}).hovered,c=e.data.data,f=c.i,h=c.color,p=o.isHierarchyRoot(e),d=1;if(u)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s="rgba(0,0,0,0)",l=0;else if(s=a.castOption(r,f,"marker.line.color")||i.defaultLine,l=a.castOption(r,f,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var v=r.marker.depthfade;if(v){var g,y=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===v){var m=o.getMaxDepth(r);g=isFinite(m)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else g=e.data.depth-r._entryDepth,r._atRootLevel||g++;if(g>0)for(var x=0;x0){var b,_,w,T,k,A=t.xa,M=t.ya;"h"===d.orientation?(k=e,b="y",w=M,_="x",T=A):(k=r,b="x",w=A,_="y",T=M);var S=p[t.index];if(k>=S.span[0]&&k<=S.span[1]){var E=i.extendFlat({},t),L=T.c2p(k,!0),C=s.getKdeValue(S,d,k),P=s.getPositionOnKdePath(S,d,L),O=w._offset,I=w._length;E[b+"0"]=P[0],E[b+"1"]=P[1],E[_+"0"]=E[_+"1"]=L,E[_+"Label"]=_+": "+a.hoverLabelText(T,k,d[_+"hoverformat"])+", "+p[0].t.labels.kde+" "+C.toFixed(3);for(var D=0,z=0;z")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;return i(n)?n:i(a)&&o?a:void 0}(h,g),[c]}function k(t){return n(v,t,h[d+"hoverformat"])}}},19990:function(t,e,r){"use strict";t.exports={attributes:r(43037),layoutAttributes:r(13494),supplyDefaults:r(83266).supplyDefaults,crossTraceDefaults:r(83266).crossTraceDefaults,supplyLayoutDefaults:r(5176),calc:r(52752),crossTraceCalc:r(70766),plot:r(30436),style:r(55750).style,hoverPoints:r(61326),eventData:r(58593),selectPoints:r(81974),moduleType:"trace",name:"waterfall",basePlotModule:r(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},13494:function(t){"use strict";t.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"}}},5176:function(t,e,r){"use strict";var n=r(71828),i=r(13494);t.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(g+=h?"M"+f[0]+","+d[1]+"V"+d[0]:"M"+f[1]+","+d[0]+"H"+f[0]),"between"!==p&&(r.isSum||s path").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),u(r,s,t),r.selectAll(".lines").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},82887:function(t,e,r){"use strict";var n=r(89298),i=r(71828),a=r(86281),o=r(79344).p,s=r(50606).BADNUM;e.moduleType="transform",e.name="aggregate";var l=e.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},u=l.aggregations;function c(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),u=l.get(),c=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case"count":return f;case"first":return h;case"last":return p;case"sum":return function(t,e){for(var r=0,i=0;ii&&(i=c,o=u)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o":return function(t){return h(t)>s};case">=":return function(t){return h(t)>=s};case"[]":return function(t){var e=h(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=h(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=h(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=h(t);return es[1]};case"](":return function(t){var e=h(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=h(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(h(t))};case"}{":return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},y=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(g=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},y=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(g);for(var w=o(e.transforms,r),T=0;T1?"%{group} (%{trace})":"%{group}");var l=t.styles,u=o.styles=[];if(l)for(a=0;ap)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,v.prototype),e}function v(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return m(t)}return g(t,e,r)}function g(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!v.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|w(t,e),n=d(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(rt(t,Uint8Array)){var e=new Uint8Array(t);return b(e.buffer,e.byteOffset,e.byteLength)}return x(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(t));if(rt(t,ArrayBuffer)||t&&rt(t.buffer,ArrayBuffer))return b(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(rt(t,SharedArrayBuffer)||t&&rt(t.buffer,SharedArrayBuffer)))return b(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return v.from(n,e,r);var i=function(t){if(v.isBuffer(t)){var e=0|_(t.length),r=d(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||nt(t.length)?d(0):x(t):"Buffer"===t.type&&Array.isArray(t.data)?x(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return v.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(t))}function y(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function m(t){return y(t),d(t<0?0:0|_(t))}function x(t){for(var e=t.length<0?0:0|_(t.length),r=d(e),n=0;n=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|t}function w(t,e){if(v.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||rt(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+u(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return tt(t).length;default:if(i)return n?-1:Q(t).length;e=(""+e).toLowerCase(),i=!0}}function T(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return F(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return z(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function k(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),nt(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=v.from(e,n)),v.isBuffer(e))return 0===e.length?-1:M(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):M(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a,o=e.length;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?c.fromByteArray(t):c.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=t[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?(v.isBuffer(a)||(a=v.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else{if(!v.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},v.byteLength=w,v.prototype._isBuffer=!0,v.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},h&&(v.prototype[h]=v.prototype.inspect),v.prototype.compare=function(t,e,r,n,i){if(rt(t,Uint8Array)&&(t=v.from(t,t.offset,t.byteLength)),!v.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+u(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),l=this.slice(n,i),c=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return L(this,t,e,r);case"base64":return C(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function z(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,a){if(!v.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function U(t,e,r,n,i){X(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function V(t,e,r,n,i){X(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function H(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,0,r,4),f.write(t,e,r,n,23,4),r+4}function G(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,0,r,8),f.write(t,e,r,n,52,8),r+8}v.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},v.prototype.readUint8=v.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},v.prototype.readBigUInt64LE=at((function(t){J(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},v.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},v.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},v.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},v.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},v.prototype.readBigInt64LE=at((function(t){J(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<>>=0,e||N(t,4,this.length),f.read(this,t,!0,23,4)},v.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),f.read(this,t,!1,23,4)},v.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),f.read(this,t,!0,52,8)},v.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),f.read(this,t,!1,52,8)},v.prototype.writeUintLE=v.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},v.prototype.writeUint8=v.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigUInt64LE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeBigUInt64BE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return V(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},v.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},v.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},v.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},v.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigInt64LE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeBigInt64BE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return V(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeFloatLE=function(t,e,r){return q(this,t,e,!0,r)},v.prototype.writeFloatBE=function(t,e,r){return q(this,t,e,!1,r)},v.prototype.writeDoubleLE=function(t,e,r){return G(this,t,e,!0,r)},v.prototype.writeDoubleBE=function(t,e,r){return G(this,t,e,!1,r)},v.prototype.copy=function(t,e,r,n){if(!v.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function X(t,e,r,n,i,a){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new Z.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){J(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||K(e,t.length-(r+1))}(n,i,a)}function J(t,e){if("number"!=typeof t)throw new Z.ERR_INVALID_ARG_TYPE(e,"number",t)}function K(t,e,r){if(Math.floor(t)!==t)throw J(t,r),new Z.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new Z.ERR_BUFFER_OUT_OF_BOUNDS;throw new Z.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),Y("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(u(e))}),TypeError),Y("ERR_OUT_OF_RANGE",(function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=W(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=W(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var $=/[^+/0-9A-Za-z-_]/g;function Q(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function tt(t){return c.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function et(t,e,r,n){var i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function rt(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function nt(t){return t!=t}var it=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function at(t){return"undefined"==typeof BigInt?ot:t}function ot(){throw new Error("BigInt not supported")}},3910:function(t,e){"use strict";e.byteLength=function(t){var e=l(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,a=l(t),o=a[0],s=a[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,o,s)),c=0,f=s>0?o-4:o;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=16383,s=0,l=n-i;sl?l:s+o));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,a,o=[],s=e;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},3187:function(t,e){e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*v}},1152:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],u=t.mode||"turntable",c=n(),f=i(),h=a();return c.setDistanceLimits(l[0],l[1]),c.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:c,orbit:f,matrix:h},u)};var n=r(3440),i=r(7774),a=r(9298);function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.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 s=o.prototype;s.flush=function(t){for(var e=this._controllerList,r=0;r0?u=u.ushln(f):f<0&&(c=c.ushln(-f)),s(u,c)}},234:function(t,e,r){"use strict";var n=r(3218);t.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},4275:function(t,e,r){"use strict";var n=r(1928);t.exports=function(t){return t.cmp(new n(0))}},9958:function(t,e,r){"use strict";var n=r(4275);t.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a20?52:r+32}},3218:function(t,e,r){"use strict";r(1928),t.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},5514:function(t,e,r){"use strict";var n=r(1928),i=r(8362);t.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},8524:function(t,e,r){"use strict";var n=r(5514),i=r(4275);t.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);return o.cmpn(1)?[t.div(o),e.div(o)]:[t,e]}},2813:function(t,e,r){"use strict";var n=r(1928);t.exports=function(t){return new n(t)}},3962:function(t,e,r){"use strict";var n=r(8524);t.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},4951:function(t,e,r){"use strict";var n=r(4275);t.exports=function(t){return n(t[0])*n(t[1])}},4354:function(t,e,r){"use strict";var n=r(8524);t.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},7999:function(t,e,r){"use strict";var n=r(9958),i=r(1112);t.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,u=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return u*s;if(s){var c=i(s)+4,f=n(l.ushln(c).divRound(r));return u*(s+f*Math.pow(2,-c))}var h=r.bitLength()-l.bitLength()+53;return f=n(l.ushln(h).divRound(r)),h<1023?u*f*Math.pow(2,-h):u*(f*=Math.pow(2,-1023))*Math.pow(2,1023-h)}},5070:function(t){"use strict";function e(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function r(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function n(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function i(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function a(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function o(t,e,r,n,i,a){return"function"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,a){return o(t,r,n,i,a,e)},gt:function(t,e,n,i,a){return o(t,e,n,i,a,r)},lt:function(t,e,r,i,a){return o(t,e,r,i,a,n)},le:function(t,e,r,n,a){return o(t,e,r,n,a,i)},eq:function(t,e,r,n,i){return o(t,e,r,n,i,a)}}},2288:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,1+((t|=t>>>8)|t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},1928:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function a(t,e,r){if(a.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=a:e.BN=a,a.BN=a,a.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(6601).Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(t,e,r){var n=s(t,r);return r-1>=e&&(n|=s(t,r-1)<<4),n}function u(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n=e;n-=2)i=l(t,e,n)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(t.length-e)%2==0?e+1:e;n=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,l=0,c=r;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","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"],f=[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],h=[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];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,f=67108863&l,h=Math.min(u,e.length-1),p=Math.max(0,u-t.length+1);p<=h;p++){var d=u-p|0;c+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[u]=0|f,l=0|c}return 0!==l?r.words[u]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=f[t],p=h[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var v=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?v+r:c[u-v.length]+v+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n(void 0!==o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,u=new t(a),c=this.clone();if(l){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,p=0|o[1],d=8191&p,v=p>>>13,g=0|o[2],y=8191&g,m=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],T=8191&w,k=w>>>13,A=0|o[5],M=8191&A,S=A>>>13,E=0|o[6],L=8191&E,C=E>>>13,P=0|o[7],O=8191&P,I=P>>>13,D=0|o[8],z=8191&D,R=D>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],U=8191&j,V=j>>>13,H=0|s[1],q=8191&H,G=H>>>13,Z=0|s[2],Y=8191&Z,W=Z>>>13,X=0|s[3],J=8191&X,K=X>>>13,$=0|s[4],Q=8191&$,tt=$>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ut=st>>>13,ct=0|s[8],ft=8191&ct,ht=ct>>>13,pt=0|s[9],dt=8191&pt,vt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;u=((a=Math.imul(h,V))+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(v,U)|0,a=Math.imul(v,V);var yt=(u+(n=n+Math.imul(f,q)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,q)|0))<<13)|0;u=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(d,q)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(v,q)|0,a=a+Math.imul(v,G)|0;var mt=(u+(n=n+Math.imul(f,Y)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,Y)|0))<<13)|0;u=((a=a+Math.imul(h,W)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(y,q)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(m,q)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(d,Y)|0,i=(i=i+Math.imul(d,W)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,W)|0;var xt=(u+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,J)|0))<<13)|0;u=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(b,q)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,q)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(y,Y)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(v,J)|0,a=a+Math.imul(v,K)|0;var bt=(u+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,Q)|0))<<13)|0;u=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(M,U),i=(i=Math.imul(M,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(T,q)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,q)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(b,Y)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,W)|0,n=n+Math.imul(y,J)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(m,J)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(d,Q)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,tt)|0;var _t=(u+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;u=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(L,U),i=(i=Math.imul(L,V))+Math.imul(C,U)|0,a=Math.imul(C,V),n=n+Math.imul(M,q)|0,i=(i=i+Math.imul(M,G)|0)+Math.imul(S,q)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(T,Y)|0,i=(i=i+Math.imul(T,W)|0)+Math.imul(k,Y)|0,a=a+Math.imul(k,W)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,tt)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(v,rt)|0,a=a+Math.imul(v,nt)|0;var wt=(u+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;u=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(O,U),i=(i=Math.imul(O,V))+Math.imul(I,U)|0,a=Math.imul(I,V),n=n+Math.imul(L,q)|0,i=(i=i+Math.imul(L,G)|0)+Math.imul(C,q)|0,a=a+Math.imul(C,G)|0,n=n+Math.imul(M,Y)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(y,rt)|0,i=(i=i+Math.imul(y,nt)|0)+Math.imul(m,rt)|0,a=a+Math.imul(m,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(v,at)|0,a=a+Math.imul(v,ot)|0;var Tt=(u+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ut)|0)+Math.imul(h,lt)|0))<<13)|0;u=((a=a+Math.imul(h,ut)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(z,U),i=(i=Math.imul(z,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(O,q)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(I,q)|0,a=a+Math.imul(I,G)|0,n=n+Math.imul(L,Y)|0,i=(i=i+Math.imul(L,W)|0)+Math.imul(C,Y)|0,a=a+Math.imul(C,W)|0,n=n+Math.imul(M,J)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(T,Q)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,Q)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(y,at)|0,i=(i=i+Math.imul(y,ot)|0)+Math.imul(m,at)|0,a=a+Math.imul(m,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ut)|0)+Math.imul(v,lt)|0,a=a+Math.imul(v,ut)|0;var kt=(u+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;u=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(z,q)|0,i=(i=i+Math.imul(z,G)|0)+Math.imul(R,q)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(I,Y)|0,a=a+Math.imul(I,W)|0,n=n+Math.imul(L,J)|0,i=(i=i+Math.imul(L,K)|0)+Math.imul(C,J)|0,a=a+Math.imul(C,K)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,tt)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(y,lt)|0,i=(i=i+Math.imul(y,ut)|0)+Math.imul(m,lt)|0,a=a+Math.imul(m,ut)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(v,ft)|0,a=a+Math.imul(v,ht)|0;var At=(u+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,vt)|0)+Math.imul(h,dt)|0))<<13)|0;u=((a=a+Math.imul(h,vt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,q),i=(i=Math.imul(B,G))+Math.imul(N,q)|0,a=Math.imul(N,G),n=n+Math.imul(z,Y)|0,i=(i=i+Math.imul(z,W)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(O,J)|0,i=(i=i+Math.imul(O,K)|0)+Math.imul(I,J)|0,a=a+Math.imul(I,K)|0,n=n+Math.imul(L,Q)|0,i=(i=i+Math.imul(L,tt)|0)+Math.imul(C,Q)|0,a=a+Math.imul(C,tt)|0,n=n+Math.imul(M,rt)|0,i=(i=i+Math.imul(M,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ut)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ut)|0,n=n+Math.imul(y,ft)|0,i=(i=i+Math.imul(y,ht)|0)+Math.imul(m,ft)|0,a=a+Math.imul(m,ht)|0;var Mt=(u+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,vt)|0)+Math.imul(v,dt)|0))<<13)|0;u=((a=a+Math.imul(v,vt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,Y),i=(i=Math.imul(B,W))+Math.imul(N,Y)|0,a=Math.imul(N,W),n=n+Math.imul(z,J)|0,i=(i=i+Math.imul(z,K)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(I,Q)|0,a=a+Math.imul(I,tt)|0,n=n+Math.imul(L,rt)|0,i=(i=i+Math.imul(L,nt)|0)+Math.imul(C,rt)|0,a=a+Math.imul(C,nt)|0,n=n+Math.imul(M,at)|0,i=(i=i+Math.imul(M,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ut)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ut)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(u+(n=n+Math.imul(y,dt)|0)|0)+((8191&(i=(i=i+Math.imul(y,vt)|0)+Math.imul(m,dt)|0))<<13)|0;u=((a=a+Math.imul(m,vt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,K))+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(z,Q)|0,i=(i=i+Math.imul(z,tt)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(I,rt)|0,a=a+Math.imul(I,nt)|0,n=n+Math.imul(L,at)|0,i=(i=i+Math.imul(L,ot)|0)+Math.imul(C,at)|0,a=a+Math.imul(C,ot)|0,n=n+Math.imul(M,lt)|0,i=(i=i+Math.imul(M,ut)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ut)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(k,ft)|0,a=a+Math.imul(k,ht)|0;var Et=(u+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,vt)|0)+Math.imul(_,dt)|0))<<13)|0;u=((a=a+Math.imul(_,vt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,Q),i=(i=Math.imul(B,tt))+Math.imul(N,Q)|0,a=Math.imul(N,tt),n=n+Math.imul(z,rt)|0,i=(i=i+Math.imul(z,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(O,at)|0,i=(i=i+Math.imul(O,ot)|0)+Math.imul(I,at)|0,a=a+Math.imul(I,ot)|0,n=n+Math.imul(L,lt)|0,i=(i=i+Math.imul(L,ut)|0)+Math.imul(C,lt)|0,a=a+Math.imul(C,ut)|0,n=n+Math.imul(M,ft)|0,i=(i=i+Math.imul(M,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Lt=(u+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,vt)|0)+Math.imul(k,dt)|0))<<13)|0;u=((a=a+Math.imul(k,vt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(z,at)|0,i=(i=i+Math.imul(z,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(I,lt)|0,a=a+Math.imul(I,ut)|0,n=n+Math.imul(L,ft)|0,i=(i=i+Math.imul(L,ht)|0)+Math.imul(C,ft)|0,a=a+Math.imul(C,ht)|0;var Ct=(u+(n=n+Math.imul(M,dt)|0)|0)+((8191&(i=(i=i+Math.imul(M,vt)|0)+Math.imul(S,dt)|0))<<13)|0;u=((a=a+Math.imul(S,vt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(z,lt)|0,i=(i=i+Math.imul(z,ut)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ut)|0,n=n+Math.imul(O,ft)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(I,ft)|0,a=a+Math.imul(I,ht)|0;var Pt=(u+(n=n+Math.imul(L,dt)|0)|0)+((8191&(i=(i=i+Math.imul(L,vt)|0)+Math.imul(C,dt)|0))<<13)|0;u=((a=a+Math.imul(C,vt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(B,lt),i=(i=Math.imul(B,ut))+Math.imul(N,lt)|0,a=Math.imul(N,ut),n=n+Math.imul(z,ft)|0,i=(i=i+Math.imul(z,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var Ot=(u+(n=n+Math.imul(O,dt)|0)|0)+((8191&(i=(i=i+Math.imul(O,vt)|0)+Math.imul(I,dt)|0))<<13)|0;u=((a=a+Math.imul(I,vt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(B,ft),i=(i=Math.imul(B,ht))+Math.imul(N,ft)|0,a=Math.imul(N,ht);var It=(u+(n=n+Math.imul(z,dt)|0)|0)+((8191&(i=(i=i+Math.imul(z,vt)|0)+Math.imul(R,dt)|0))<<13)|0;u=((a=a+Math.imul(R,vt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Dt=(u+(n=Math.imul(B,dt))|0)+((8191&(i=(i=Math.imul(B,vt))+Math.imul(N,dt)|0))<<13)|0;return u=((a=Math.imul(N,vt))+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,l[0]=gt,l[1]=yt,l[2]=mt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=Tt,l[8]=kt,l[9]=At,l[10]=Mt,l[11]=St,l[12]=Et,l[13]=Lt,l[14]=Ct,l[15]=Pt,l[16]=Ot,l[17]=It,l[18]=Dt,0!==u&&(l[19]=u,r.length++),r};function v(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=p),a.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):v(this,t,e),r},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==c||u>=i);u--){var f=0|this.words[u];this.words[u]=c<<26-a|f>>>a,c=f&s}return l&&0!==c&&(l.words[l.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var u=0;u=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var c=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(c),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,v=1;0==(r.words[0]&v)&&d<26;++d,v<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(c),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(u)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,c=1;0==(e.words[0]&c)&&u<26;++u,c<<=1);if(u>0)for(e.iushrn(u);u-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new T(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){T.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(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)}m.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(x,m),x.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i>>22,a=o}a>>>=22,t.words[i-10]=a,0===a&&t.length>10?t.length-=10:t.length-=9},x.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new x;else if("p224"===t)e=new b;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},T.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},T.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},T.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},T.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},T.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},T.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},T.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},T.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},T.prototype.isqr=function(t){return this.imul(t,t.clone())},T.prototype.sqr=function(t){return this.mul(t,t)},T.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),u=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new a(2*c*c).toRed(this);0!==this.pow(c,u).cmp(l);)c.redIAdd(l);for(var f=this.pow(c,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var v=p,g=0;0!==v.cmp(s);g++)v=v.redSqr();n(g=0;n--){for(var u=e.words[n],c=l-1;c>=0;c--){var f=u>>c&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4==++s||0===n&&0===c)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},T.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},T.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new k(t)},i(k,T),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2692:function(t){"use strict";t.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(c<=0)){var f,h=i.mallocDouble(2*c*s),p=i.mallocInt32(s);if((s=l(t,c,h,p))>0){if(1===c&&n)a.init(s),f=a.sweepComplete(c,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*c*u),v=i.mallocInt32(u);(u=l(e,c,d,v))>0&&(a.init(s+u),f=1===c?a.sweepBipartite(c,r,0,s,h,p,0,u,d,v):o(c,r,n,s,h,p,u,d,v),i.free(d),i.free(v))}i.free(h),i.free(p)}return f}}}function c(t,e){n.push([t,e])}function f(t){return n=[],u(t,t,c,!0),n}function h(t,e){return n=[],u(t,e,c,!1),n}},7333:function(t,e){"use strict";function r(t){return t?function(t,e,r,n,i,a,o,s,l,u,c){return i-n>l-s?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,p=f*n;hu-l?n?function(t,e,r,n,i,a,o,s,l,u,c){for(var f=2*t,h=n,p=f*n;h0;){var L=6*(S-=1),C=y[L],P=y[L+1],O=y[L+2],I=y[L+3],D=y[L+4],z=y[L+5],R=2*S,F=m[R],B=m[R+1],N=1&z,j=!!(16&z),U=c,V=w,H=k,q=A;if(N&&(U=k,V=A,H=c,q=w),!(2&z&&(O=p(t,C,P,O,U,V,B),P>=O)||4&z&&(P=d(t,C,P,O,U,V,F))>=O)){var G=O-P,Z=D-I;if(j){if(t*G*(G+Z)<4194304){if(void 0!==(M=l.scanComplete(t,C,e,P,O,U,V,I,D,H,q)))return M;continue}}else{if(t*Math.min(G,Z)<128){if(void 0!==(M=o(t,C,e,N,P,O,U,V,I,D,H,q)))return M;continue}if(t*G*Z<4194304){if(void 0!==(M=l.scanBipartite(t,C,e,N,P,O,U,V,I,D,H,q)))return M;continue}}var Y=f(t,C,P,O,U,V,F,B);if(P=p0)&&!(p1>=hi)"),h=c("lo===p0"),p=c("lo>>1,f=2*t,h=c,p=o[f*c+e];l=m?(h=y,p=m):g>=b?(h=v,p=g):(h=x,p=b):m>=b?(h=y,p=m):b>=g?(h=v,p=g):(h=x,p=b);for(var _=f*(u-1),w=f*h,T=0;Tr&&i[f+e]>u;--c,f-=o){for(var h=f,p=f+o,d=0;dh;++h,l+=s)if(i[l+f]===o)if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var v=a[h];a[h]=a[c],a[c++]=v}return c},"loh;++h,l+=s)if(i[l+f]p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var v=a[h];a[h]=a[c],a[c++]=v}return c},"lo<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o)if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var v=a[h];a[h]=a[c],a[c++]=v}return c},"hi<=p0":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=t+e,h=r;n>h;++h,l+=s)if(i[l+f]<=o)if(c===h)c+=1,u+=s;else{for(var p=0;s>p;++p){var d=i[l+p];i[l+p]=i[u],i[u++]=d}var v=a[h];a[h]=a[c],a[c++]=v}return c},"lop;++p,l+=s){var d=i[l+f],v=i[l+h];if(dg;++g){var y=i[l+g];i[l+g]=i[u],i[u++]=y}var m=a[p];a[p]=a[c],a[c++]=m}}return c},"lo<=p0&&p0<=hi":function(t,e,r,n,i,a,o){for(var s=2*t,l=s*r,u=l,c=r,f=e,h=t+e,p=r;n>p;++p,l+=s){var d=i[l+f],v=i[l+h];if(d<=o&&o<=v)if(c===p)c+=1,u+=s;else{for(var g=0;s>g;++g){var y=i[l+g];i[l+g]=i[u],i[u++]=y}var m=a[p];a[p]=a[c],a[c++]=m}}return c},"!(lo>=p0)&&!(p1>=hi)":function(t,e,r,n,i,a,o,s){for(var l=2*t,u=l*r,c=u,f=r,h=e,p=t+e,d=r;n>d;++d,u+=l){var v=i[u+h],g=i[u+p];if(!(v>=o||s>=g))if(f===d)f+=1,c+=l;else{for(var y=0;l>y;++y){var m=i[u+y];i[u+y]=i[c],i[c++]=m}var x=a[d];a[d]=a[f],a[f++]=x}}return f}}},309:function(t){"use strict";function e(t,e,r){for(var n=2*(t+1),i=t+1;i<=e;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >t;){var u=r[l-2],c=r[l-1];if(ur[e+1])}function s(t,e,r,n){var i=n[t*=2];return i>1,v=d-f,g=d+f,y=h,m=v,x=d,b=g,_=p,w=t+1,T=u-1,k=0;o(y,m,c)&&(k=y,y=m,m=k),o(b,_,c)&&(k=b,b=_,_=k),o(y,x,c)&&(k=y,y=x,x=k),o(m,x,c)&&(k=m,m=x,x=k),o(y,b,c)&&(k=y,y=b,b=k),o(x,b,c)&&(k=x,x=b,b=k),o(m,_,c)&&(k=m,m=_,_=k),o(m,x,c)&&(k=m,m=x,x=k),o(b,_,c)&&(k=b,b=_,_=k);for(var A=c[2*m],M=c[2*m+1],S=c[2*b],E=c[2*b+1],L=2*y,C=2*x,P=2*_,O=2*h,I=2*d,D=2*p,z=0;z<2;++z){var R=c[L+z],F=c[C+z],B=c[P+z];c[O+z]=R,c[I+z]=F,c[D+z]=B}n(v,t,c),n(g,u,c);for(var N=w;N<=T;++N)if(s(N,A,M,c))N!==w&&r(N,w,c),++w;else if(!s(N,S,E,c))for(;;){if(s(T,S,E,c)){s(T,A,M,c)?(i(N,w,T,c),++w,--T):(r(N,T,c),--T);break}if(--T>>1;a(d,S);var E=0,L=0;for(T=0;T=o)v(c,f,L--,C=C-o|0);else if(C>=0)v(l,u,E--,C);else if(C<=-268435456){C=-C-o|0;for(var P=0;P>>1;a(d,E);var L=0,C=0,P=0;for(k=0;k>1==d[2*k+3]>>1&&(I=2,k+=1),O<0){for(var D=-(O>>1)-1,z=0;z>1)-1,0===I?v(l,u,L--,D):1===I?v(c,f,C--,D):2===I&&v(h,p,P--,D)}},scanBipartite:function(t,e,r,n,i,s,c,f,h,p,y,m){var x=0,b=2*t,_=e,w=e+t,T=1,k=1;n?k=o:T=o;for(var A=i;A>>1;a(d,L);var C=0;for(A=0;A=o?(O=!n,M-=o):(O=!!n,M-=1),O)g(l,u,C++,M);else{var I=m[M],D=b*M,z=y[D+e+1],R=y[D+e+1+t];t:for(var F=0;F>>1;a(d,T);var k=0;for(x=0;x=o)l[k++]=b-o;else{var M=p[b-=1],S=g*b,E=h[S+e+1],L=h[S+e+1+t];t:for(var C=0;C=0;--C)if(l[C]===b){for(D=C+1;D0;){for(var p=r.pop(),d=(c=-1,f=-1,l=o[s=r.pop()],1);d=0||(e.flip(s,p),i(t,e,r,c,s,f),i(t,e,r,s,f,c),i(t,e,r,f,p,c),i(t,e,r,p,c,f))}}},7098:function(t,e,r){"use strict";var n,i=r(5070);function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}t.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(u[p]!==-i){u[p]=i,c[p];for(var d=0;d<3;++d){var v=h[3*p+d];v>=0&&0===u[v]&&(f[3*p+d]?l.push(v):(s.push(v),u[v]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var y=function(t,e,r){for(var n=0,i=0;i1&&i(r[h[p-2]],r[h[p-1]],a)>0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=f.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function c(t,e){var r;return(r=t.a[0]d[0]&&i.push(new o(d,p,2,l),new o(p,d,1,l))}i.sort(s);for(var v=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),g=[new a([v,1],[v,0],-1,[],[],[],[])],y=[],m=(l=0,i.length);l=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;ne[2]?1:0)}function y(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--a){var x=e[c=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],T=t[_];if((w[0]-T[0]||w[1]-T[1])<0){var k=b;b=_,_=k}x[0]=b;var A,M=x[1]=S[1];for(i&&(A=x[2]);a>0&&n[a-1][0]===c;){var S,E=(S=n[--a])[1];i?e.push([M,E,A]):e.push([M,E]),M=E}i?e.push([M,_,A]):e.push([M,_])}return h}(t,e,h,v,r),m=d(t,g);return y(e,m,r),!!m||h.length>0||v.length>0}},5528:function(t,e,r){"use strict";t.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=c(a,f);if(0===o(h))return null;var p=c(f,s(t,r)),d=i(p,h),v=u(a,d);return l(t,v)};var n=r(3962),i=r(9189),a=r(4354),o=r(4951),s=r(6695),l=r(7584),u=r(4469);function c(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},5692:function(t){t.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},9156:function(t,e,r){"use strict";var n=r(5692),i=r(3578);function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}t.exports=function(t){var e,r,l,u,c,f,h,p,d,v;if(t||(t={}),p=(t.nshades||72)-1,h=t.format||"hex",(f=t.colormap)||(f="jet"),"string"==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+" not a supported colorscale");c=n[f]}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);c=f.slice()}if(c.length>p+1)throw new Error(f+" map requires nshades to be at least size "+c.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1],e=c.map((function(t){return Math.round(t.index*p)})),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var g=c.map((function(t,e){var r=c[e].index,n=c[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=d[0]+(d[1]-d[0])*r),n})),y=[];for(v=0;v0||l(t,e,a)?-1:1:0===s?u>0||l(t,e,r)?1:-1:i(u-s)}var f=n(t,e,r);return f>0?o>0&&n(t,e,a)>0?1:-1:f<0?o>0||n(t,e,a)>0?1:-1:n(t,e,a)>0||l(t,e,r)?1:-1};var n=r(417),i=r(7538),a=r(87),o=r(2019),s=r(9662);function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),u=a(r[1],-e[1]),c=s(o(n,l),o(i,u));return c[c.length-1]>=0}},7538:function(t){"use strict";t.exports=function(t){return t<0?-1:t>0?1:0}},9209:function(t){t.exports=function(t,n){var i=t.length,a=t.length-n.length;if(a)return a;switch(i){case 0:return 0;case 1:return t[0]-n[0];case 2:return t[0]+t[1]-n[0]-n[1]||e(t[0],t[1])-e(n[0],n[1]);case 3:var o=t[0]+t[1],s=n[0]+n[1];if(a=o+t[2]-(s+n[2]))return a;var l=e(t[0],t[1]),u=e(n[0],n[1]);return e(l,t[2])-e(u,n[2])||e(l+t[2],o)-e(u+n[2],s);case 4:var c=t[0],f=t[1],h=t[2],p=t[3],d=n[0],v=n[1],g=n[2],y=n[3];return c+f+h+p-(d+v+g+y)||e(c,f,h,p)-e(d,v,g,y,d)||e(c+f,c+h,c+p,f+h,f+p,h+p)-e(d+v,d+g,d+y,v+g,v+y,g+y)||e(c+f+h,c+f+p,c+h+p,f+h+p)-e(d+v+g,d+v+y,d+g+y,v+g+y);default:for(var m=t.slice().sort(r),x=n.slice().sort(r),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},8722:function(t,e,r){"use strict";t.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=r(2183),i=r(2153)},9680:function(t){"use strict";t.exports=function(t,e,r,n,i,a){var o=i-1,s=i*i,l=o*o,u=(1+2*i)*l,c=i*l,f=s*(3-2*i),h=s*o;if(t.length){a||(a=new Array(t.length));for(var p=t.length-1;p>=0;--p)a[p]=u*t[p]+c*e[p]+f*r[p]+h*n[p];return a}return u*t+c*e+f*r+h*n},t.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,u=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var c=t.length-1;c>=0;--c)a[c]=o*t[c]+s*e[c]+l*r[c]+u*n[c];return a}return o*t+s*e+l*r[c]+u*n}},4419:function(t,e,r){"use strict";var n=r(2183),i=r(1215);function a(t,e){this.point=t,this.index=e}function o(t,e){for(var r=t.point,n=e.point,i=r.length,a=0;a=2)return!1;t[r]=n}return!0})):_.filter((function(t){for(var e=0;e<=s;++e){var r=y[t[e]];if(r<0)return!1;t[e]=r}return!0})),1&s)for(c=0;c<_.length;++c)h=(b=_[c])[0],b[0]=b[1],b[1]=h;return _}},8362:function(t){var e=!1;if("undefined"!=typeof Float64Array){var r=new Float64Array(1),n=new Uint32Array(r.buffer);r[0]=1,e=!0,1072693248===n[1]?(t.exports=function(t){return r[0]=t,[n[0],n[1]]},t.exports.pack=function(t,e){return n[0]=t,n[1]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[0]},t.exports.hi=function(t){return r[0]=t,n[1]}):1072693248===n[0]?(t.exports=function(t){return r[0]=t,[n[1],n[0]]},t.exports.pack=function(t,e){return n[1]=t,n[0]=e,r[0]},t.exports.lo=function(t){return r[0]=t,n[1]},t.exports.hi=function(t){return r[0]=t,n[0]}):e=!1}if(!e){var i=new Buffer(8);t.exports=function(t){return i.writeDoubleLE(t,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},t.exports.pack=function(t,e){return i.writeUInt32LE(t,0,!0),i.writeUInt32LE(e,4,!0),i.readDoubleLE(0,!0)},t.exports.lo=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(0,!0)},t.exports.hi=function(t){return i.writeDoubleLE(t,0,!0),i.readUInt32LE(4,!0)}}t.exports.sign=function(e){return t.exports.hi(e)>>>31},t.exports.exponent=function(e){return(t.exports.hi(e)<<1>>>21)-1023},t.exports.fraction=function(e){var r=t.exports.lo(e),n=t.exports.hi(e),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},t.exports.denormalized=function(e){return!(2146435072&t.exports.hi(e))}},3094:function(t){"use strict";function e(t,r,n){var i=0|t[n];if(i<=0)return[];var a,o=new Array(i);if(n===t.length-1)for(a=0;a0)return function(t,e){var r,n;for(r=new Array(t),n=0;n=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p=r-1)for(var c=s.length-1,f=(e[r-1],0);f=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--f)n.push(a(l[f-1],u[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=a(u[h-1],c[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],u=s[1],c=t-e,f=c>1e-6?1/c:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(a(l[h-1],u[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--f)n.push(a(l[f],u[f],n[o]+c*i[o])),i.push(0),o+=1}}},7080:function(t){"use strict";function e(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function r(t){return new e(t._color,t.key,t.value,t.left,t.right,t._count)}function n(t,r){return new e(t,r.key,r.value,r.left,r.right,r._count)}function i(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function a(t,e){this._compare=t,this.root=e}t.exports=function(t){return new a(t||p,null)};var o=a.prototype;function s(t,e){var r;return e.left&&(r=s(t,e.left))?r:(r=t(e.key,e.value))||(e.right?s(t,e.right):void 0)}function l(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left&&(i=l(t,e,r,n.left)))return i;if(i=r(n.key,n.value))return i}if(n.right)return l(t,e,r,n.right)}function u(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=u(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return u(t,e,r,n,i.right)}function c(t,e){this.tree=t,this._stack=e}Object.defineProperty(o,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(o,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(t,r){for(var o=this._compare,s=this.root,l=[],u=[];s;){var c=o(t,s.key);l.push(s),u.push(c),s=c<=0?s.left:s.right}l.push(new e(0,t,r,null,null,1));for(var f=l.length-2;f>=0;--f)s=l[f],u[f]<=0?l[f]=new e(s._color,s.key,s.value,l[f+1],s.right,s._count+1):l[f]=new e(s._color,s.key,s.value,s.left,l[f+1],s._count+1);for(f=l.length-1;f>1;--f){var h=l[f-1];if(s=l[f],1===h._color||1===s._color)break;var p=l[f-2];if(p.left===h)if(h.left===s){if(!(d=p.right)||0!==d._color){p._color=0,p.left=h.right,h._color=1,h.right=p,l[f-2]=h,l[f-1]=s,i(p),i(h),f>=3&&((v=l[f-3]).left===p?v.left=h:v.right=h);break}h._color=1,p.right=n(1,d),p._color=0,f-=1}else{if(!(d=p.right)||0!==d._color){h.right=s.left,p._color=0,p.left=s.right,s._color=1,s.left=h,s.right=p,l[f-2]=s,l[f-1]=h,i(p),i(h),i(s),f>=3&&((v=l[f-3]).left===p?v.left=s:v.right=s);break}h._color=1,p.right=n(1,d),p._color=0,f-=1}else if(h.right===s){if(!(d=p.left)||0!==d._color){p._color=0,p.right=h.left,h._color=1,h.left=p,l[f-2]=h,l[f-1]=s,i(p),i(h),f>=3&&((v=l[f-3]).right===p?v.right=h:v.left=h);break}h._color=1,p.left=n(1,d),p._color=0,f-=1}else{var d;if(!(d=p.left)||0!==d._color){var v;h.left=s.right,p._color=0,p.right=s.left,s._color=1,s.right=h,s.left=p,l[f-2]=s,l[f-1]=h,i(p),i(h),i(s),f>=3&&((v=l[f-3]).right===p?v.right=s:v.left=s);break}h._color=1,p.left=n(1,d),p._color=0,f-=1}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return s(t,this.root);case 2:return l(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return u(e,r,this._compare,t,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new c(this,t)}}),Object.defineProperty(o,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new c(this,t)}}),o.at=function(t){if(t<0)return new c(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new c(this,[])},o.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new c(this,n)},o.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new c(this,n)},o.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new c(this,n)},o.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new c(this,n)},o.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new c(this,n);r=i<=0?r.left:r.right}return new c(this,[])},o.remove=function(t){var e=this.find(t);return e?e.remove():this},o.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var f=c.prototype;function h(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function p(t,e){return te?1:0}Object.defineProperty(f,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(f,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),f.clone=function(){return new c(this.tree,this._stack.slice())},f.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var o=new Array(t.length),s=t[t.length-1];o[o.length-1]=new e(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=t.length-2;l>=0;--l)(s=t[l]).left===t[l+1]?o[l]=new e(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new e(s._color,s.key,s.value,s.left,o[l+1],s._count);if((s=o[o.length-1]).left&&s.right){var u=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var c=o[u-1];for(o.push(new e(s._color,c.key,c.value,s.left,s.right,s._count)),o[u-1].key=s.key,o[u-1].value=s.value,l=o.length-2;l>=u;--l)s=o[l],o[l]=new e(s._color,s.key,s.value,s.left,o[l+1],s._count);o[u-1].left=o[u]}if(0===(s=o[o.length-1])._color){var f=o[o.length-2];for(f.left===s?f.left=null:f.right===s&&(f.right=null),o.pop(),l=0;l=0;--l){if(e=t[l],0===l)return void(e._color=1);if((a=t[l-1]).left===e){if((o=a.right).right&&0===o.right._color)return s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,e._color=1,a._color=1,s._color=1,i(a),i(o),l>1&&((u=t[l-2]).left===a?u.left=o:u.right=o),void(t[l-1]=o);if(o.left&&0===o.left._color)return s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,e._color=1,i(a),i(o),i(s),l>1&&((u=t[l-2]).left===a?u.left=s:u.right=s),void(t[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.right=n(0,o));a.right=n(0,o);continue}o=r(o),a.right=o.left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((u=t[l-2]).left===a?u.left=o:u.right=o),t[l-1]=o,t[l]=a,l+11&&((u=t[l-2]).right===a?u.right=o:u.left=o),void(t[l-1]=o);if(o.right&&0===o.right._color)return s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,e._color=1,i(a),i(o),i(s),l>1&&((u=t[l-2]).right===a?u.right=s:u.left=s),void(t[l-1]=s);if(1===o._color){if(0===a._color)return a._color=1,void(a.left=n(0,o));a.left=n(0,o);continue}var u;o=r(o),a.left=o.right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1&&((u=t[l-2]).right===a?u.right=o:u.left=o),t[l-1]=o,t[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(f,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(f,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),f.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),f.update=function(t){var r=this._stack;if(0===r.length)throw new Error("Can't update empty node!");var n=new Array(r.length),i=r[r.length-1];n[n.length-1]=new e(i._color,i.key,t,i.left,i.right,i._count);for(var o=r.length-2;o>=0;--o)(i=r[o]).left===r[o+1]?n[o]=new e(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new e(i._color,i.key,i.value,i.left,n[o+1],i._count);return new a(this.tree._compare,n[0])},f.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(f,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},7453:function(t,e,r){"use strict";t.exports=function(t,e){var r=new c(t);return r.update(e),r};var n=r(9557),i=r(1681),a=r(1011),o=r(2864),s=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function c(t){this.gl=t,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(t)}var f=c.prototype;function h(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}f.update=function(t){function e(e,r,n){if(n in t){var i,a=t[n],o=this[n];(e?Array.isArray(a)&&Array.isArray(a[0]):Array.isArray(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}t=t||{};var r,a=e.bind(this,!1,Number),o=e.bind(this,!1,Boolean),l=e.bind(this,!1,String),u=e.bind(this,!0,(function(t){if(Array.isArray(t)){if(3===t.length)return[+t[0],+t[1],+t[2],1];if(4===t.length)return[+t[0],+t[1],+t[2],+t[3]]}return[0,0,0,1]})),c=!1,f=!1;if("bounds"in t)for(var h=t.bounds,p=0;p<2;++p)for(var d=0;d<3;++d)h[p][d]!==this.bounds[p][d]&&(f=!0),this.bounds[p][d]=h[p][d];if("ticks"in t)for(r=t.ticks,c=!0,this.autoTicks=!1,p=0;p<3;++p)this.tickSpacing[p]=0;else a("tickSpacing")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&("ticks"in t||"tickSpacing"in t||(this.autoTicks=!0),f=!0,c=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),c=!0),c){for(p=0;p<3;++p)r[p].sort((function(t,e){return t.x-e.x}));s.equal(r,this.ticks)?c=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(c=!0),a("tickSize"),a("tickAngle"),a("tickPad"),u("tickColor");var v=l("labels");l("labelFont")&&(v=!0),o("labelEnable"),a("labelSize"),a("labelPad"),u("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),u("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),u("lineTickColor"),o("gridEnable"),a("gridWidth"),u("gridColor"),o("zeroEnable"),u("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),u("backgroundColor"),this._text?this._text&&(v||c)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=n(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&c&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var p=[new h,new h,new h];function d(t,e,r,n,i){for(var a=t.primalOffset,o=t.primalMinor,s=t.mirrorOffset,l=t.mirrorMinor,u=n[e],c=0;c<3;++c)if(e!==c){var f=a,h=s,p=o,d=l;u&1<0?(p[c]=-1,d[c]=0):(p[c]=0,d[c]=1)}}var v=[0,0,0],g={model:l,view:l,projection:l,_ortho:!1};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var y=[0,0,0],m=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||g;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=t._ortho||!1,c=o(r,n,i,a,s),f=c.cubeEdges,h=c.axis,b=n[12],_=n[13],w=n[14],T=n[15],k=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*T)/e.drawingBufferHeight,A=0;A<3;++A)this.lastCubeProps.cubeEdges[A]=f[A],this.lastCubeProps.axis[A]=h[A];var M=p;for(A=0;A<3;++A)d(p[A],A,this.bounds,f,h);e=this.gl;var S,E,L,C=v;for(A=0;A<3;++A)this.backgroundEnable[A]?C[A]=h[A]:C[A]=0;for(this._background.draw(r,n,i,a,C,this.backgroundColor),this._lines.bind(r,n,i,this),A=0;A<3;++A){var P=[0,0,0];h[A]>0?P[A]=a[1][A]:P[A]=a[0][A];for(var O=0;O<2;++O){var I=(A+1+O)%3,D=(A+1+(1^O))%3;this.gridEnable[I]&&this._lines.drawGrid(I,D,this.bounds,P,this.gridColor[I],this.gridWidth[I]*this.pixelRatio)}for(O=0;O<2;++O)I=(A+1+O)%3,D=(A+1+(1^O))%3,this.zeroEnable[D]&&Math.min(a[0][D],a[1][D])<=0&&Math.max(a[0][D],a[1][D])>=0&&this._lines.drawZero(I,D,this.bounds,P,this.zeroLineColor[D],this.zeroLineWidth[D]*this.pixelRatio)}for(A=0;A<3;++A){this.lineEnable[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].primalOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio),this.lineMirror[A]&&this._lines.drawAxisLine(A,this.bounds,M[A].mirrorOffset,this.lineColor[A],this.lineWidth[A]*this.pixelRatio);var z=u(y,M[A].primalMinor),R=u(m,M[A].mirrorMinor),F=this.lineTickLength;for(O=0;O<3;++O){var B=k/r[5*O];z[O]*=F[O]*B,R[O]*=F[O]*B}this.lineTickEnable[A]&&this._lines.drawAxisTicks(A,M[A].primalOffset,z,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio),this.lineTickMirror[A]&&this._lines.drawAxisTicks(A,M[A].mirrorOffset,R,this.lineTickColor[A],this.lineTickWidth[A]*this.pixelRatio)}function N(t){(L=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0||a>0&&l<0||a<0&&l>0||a<0&&l<0?N(n):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&N(i)}for(this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio),A=0;A<3;++A){var U=M[A].primalMinor,V=M[A].mirrorMinor,H=u(x,M[A].primalOffset);for(O=0;O<3;++O)this.lineTickEnable[A]&&(H[O]+=k*U[O]*Math.max(this.lineTickLength[O],0)/r[5*O]);var q=[0,0,0];if(q[A]=1,this.tickEnable[A]){for(-3600===this.tickAngle[A]?(this.tickAngle[A]=0,this.tickAlign[A]="auto"):this.tickAlign[A]=-1,E=1,"auto"===(S=[this.tickAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),L=[0,0,0],j(A,U,V),O=0;O<3;++O)H[O]+=k*U[O]*this.tickPad[O]/r[5*O];this._text.drawTicks(A,this.tickSize[A],this.tickAngle[A],H,this.tickColor[A],q,L,S)}if(this.labelEnable[A]){for(E=0,L=[0,0,0],this.labels[A].length>4&&(N(A),E=1),"auto"===(S=[this.labelAlign[A],.5,E])[0]?S[0]=0:S[0]=parseInt(""+S[0]),O=0;O<3;++O)H[O]+=k*U[O]*this.labelPad[O]/r[5*O];H[A]+=.5*(a[0][A]+a[1][A]),this._text.drawLabel(A,this.labelSize[A],this.labelAngle[A],H,this.labelColor[A],[0,0,0],L,S)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},1011:function(t,e,r){"use strict";t.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var u=(l+1)%3,c=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d<=1;d+=2){f[u]=d;for(var v=-1;v<=1;v+=2)f[c]=v,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var g=u;u=c,c=g}var y=n(t,new Float32Array(e)),m=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:y,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:t.FLOAT,size:3,offset:12,stride:24}],m),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,y,x,b)};var n=r(5827),i=r(2944),a=r(1943).bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},2864:function(t,e,r){"use strict";t.exports=function(t,e,r,a,p){i(s,e,t),i(s,r,s);for(var m=0,x=0;x<2;++x){c[2]=a[x][2];for(var b=0;b<2;++b){c[1]=a[b][1];for(var _=0;_<2;++_)c[0]=a[_][0],h(l[m],c,s),m+=1}}var w=-1;for(x=0;x<8;++x){for(var T=l[x][3],k=0;k<3;++k)u[x][k]=l[x][k]/T;p&&(u[x][2]*=-1),T<0&&(w<0||u[x][2]E&&(w|=1<E&&(w|=1<u[x][1])&&(R=x);var F=-1;for(x=0;x<3;++x)(N=R^1<u[B][0]&&(B=N))}var j=v;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^B)]=R&B;var U=7^B;U===w||U===z?(U=7^F,j[n.log2(B^U)]=U&B):j[n.log2(F^U)]=U&F;var V=g,H=w;for(A=0;A<3;++A)V[A]=H&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);e.f=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);e.bg=function(t){return i(t,u,c,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(t,e,r){"use strict";t.exports=function(t,e,r,i,o,l){var u=n(t),f=a(t,[{buffer:u,size:3}]),h=s(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,i,o,l),p};var n=r(5827),a=r(2944),o=r(875),s=r(1943).f,l=window||i.global||{},u=l.__TEXT_CACHE||{};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}l.__TEXT_CACHE={};var f=c.prototype,h=[0,0];f.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},f.unbind=function(){this.vao.unbind()},f.update=function(t,e,r,n,i){var a=[];function s(t,e,r,n,i,s){var l=u[r];l||(l=u[r]={});var c=l[e];c||(c=l[e]=function(t,e){try{return o(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,h=c.positions,p=c.cells,d=0,v=p.length;d=0;--y){var m=h[g[y]];a.push(f*m[0],-f*m[1],t)}}for(var l=[0,0,0],c=[0,0,0],f=[0,0,0],h=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){f[d]=a.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),h[d]=(a.length/3|0)-f[d],l[d]=a.length/3|0;for(var v=0;v=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,u=o%a;o<0?(l=0|-Math.ceil(l),u=0|-u):(l=0|Math.floor(l),u|=0);var c=""+l;if(o<0&&(c="-"+c),i){for(var f=""+u;f.length=t[0][i];--o)a.push({x:o*e[i],text:r(e[i],o)});n.push(a)}return n},e.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function c(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=u(this.gl,this.type,this.length,this.usage,t.data,e):this.length=u(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=u(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?c(t,"uint16"):c(t,"float32"),this.length=u(this.gl,this.type,this.length,this.usage,e<0?f:f.subarray(0,t.length),e),n.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=u(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},t.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.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(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.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 i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},1140:function(t,e,r){"use strict";var n=r(2858);t.exports=function(t,e){var r=t.positions,i=t.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,u=1/0,c=-1/0,f=1/0,h=-1/0,p=null,d=null,v=[],g=1/0,y=!1,m=0;mo&&(o=n.length(b)),m){var _=2*n.distance(p,x)/(n.length(d)+n.length(b));_?(g=Math.min(g,_),y=!1):y=!0}y||(p=x,d=b),v.push(b)}var w=[s,u,f],T=[l,c,h];e&&(e[0]=w,e[1]=T),0===o&&(o=1);var k=1/o;isFinite(g)||(g=1),a.vectorScale=g;var A=t.coneSize||.5;t.absoluteConeSize&&(A=t.absoluteConeSize*k),a.coneScale=A,m=0;for(var M=0;m=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(t){this.pickId=t},p.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=c({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return u(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],f=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],p=t.vertexIntensity,d=1/0,v=-1/0;if(p)if(t.vertexIntensityBounds)d=+t.vertexIntensityBounds[0],v=+t.vertexIntensityBounds[1];else for(var g=0;g0){var v=this.triShader;v.bind(),v.uniforms=u,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},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()},t.exports=function(t,e,r){var n=r.shaders;1===arguments.length&&(t=(e=t).gl);var s=d(t,n),l=v(t,n),c=o(t,u(new Uint8Array([255,255,255,255]),[1,1,4]));c.generateMipmap(),c.minFilter=t.LINEAR_MIPMAP_LINEAR,c.magFilter=t.LINEAR;var f=i(t),p=i(t),g=i(t),y=i(t),m=i(t),x=a(t,[{buffer:f,type:t.FLOAT,size:4},{buffer:m,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:g,type:t.FLOAT,size:4},{buffer:y,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),b=new h(t,c,s,l,f,p,m,g,y,x,r.traceType||"cone");return b.update(e),b}},7234:function(t,e,r){var n=r(6832),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // 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).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // 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).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(t){t.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},6603:function(t,e,r){var n=r(1950);t.exports=function(t){return n[t]}},3110:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var u=new s(e,r,o,l);return u.update(t),u};var n=r(5827),i=r(2944),a=r(7667),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function u(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],u=n[15],c=(t._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*u)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]*this.pixelRatio),r.capSize=this.capSize[f]*c,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var c=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=c[n],a=0;a0&&((p=c.slice())[s]+=d[1][s],i.push(c[0],c[1],c[2],v[0],v[1],v[2],v[3],0,0,0,p[0],p[1],p[2],v[0],v[1],v[2],v[3],0,0,0),u(this.bounds,p),o+=2+f(i,p,v,s)))}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},7667:function(t,e,r){"use strict";var n=r(6832),i=r(5158),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);t.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(t,e,r){"use strict";var n=r(8931);t.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var u=t.getExtension("WEBGL_draw_buffers");if(!l&&u&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;ac||r<0||r>c)throw new Error("gl-fbo: Parameters are too large for FBO");var f=1;if("color"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(f>1){if(!u)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(f>t.getParameter(u.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+f+" draw buffers")}}var h=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&f>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");h=t.FLOAT}else n.preferFloat&&f>0&&p&&(h=t.FLOAT);var v=!0;"depth"in n&&(v=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new d(t,e,r,h,f,v,g,u)};var i,a,o,s,l=null;function u(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function c(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var m=r.getExtension("WEBGL_depth_texture");m?d?t.depth=h(r,i,a,m.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):v&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):v?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){for(t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null),y=0;yi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var a=u(n),o=0;o>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var v=i.attributes;return this.positionBuffer.bind(),v.position.pointer(),this.weightBuffer.bind(),v.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),v.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=o;var u,c,f,p,d=t.colorLevels||[0],v=t.colorValues||[0,0,0,1],g=d.length,y=this.bounds;l?(u=y[0]=r[0],c=y[1]=o[0],f=y[2]=r[r.length-1],p=y[3]=o[o.length-1]):(u=y[0]=r[0]+(r[1]-r[0])/2,c=y[1]=o[0]+(o[1]-o[0])/2,f=y[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,p=y[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var m=1/(f-u),x=1/(p-c),b=e[0],_=e[1];this.shape=[b,_];var w=(l?(b-1)*(_-1):b*_)*(h.length>>>1);this.numVertices=w;for(var T=a.mallocUint8(4*w),k=a.mallocFloat32(2*w),A=a.mallocUint8(2*w),M=a.mallocUint32(w),S=0,E=l?b-1:b,L=l?_-1:_,C=0;C max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(t){return i(t,a,o,null,l)},e.createPickShader=function(t){return i(t,a,s,null,l)}},6086:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=f(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),c=u(new Array(1024),[256,1,4]),p=0;p<1024;++p)c.data[p]=255;var d=a(e,c);d.wrap=e.REPEAT;var v=new y(e,r,o,s,l,d);return v.update(t),v};var n=r(5827),i=r(2944),a=r(8931),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=r(5070),u=r(5050),c=r(248),f=c.createShader,h=c.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function v(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function g(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function y(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,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=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var m=y.prototype;m.isTransparent=function(){return this.hasAlpha},m.isOpaque=function(){return!this.hasAlpha},m.pickSlots=1,m.setPickBase=function(t){this.pickId=t},m.drawTransparent=m.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,clipBounds:v(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,pickId:this.pickId,clipBounds:v(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},m.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,c=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var p=t.color||t.colors||[0,0,0,1],v=t.lineWidth||1,g=!1;t:for(e=1;e0){for(var w=0;w<24;++w)i.push(i[i.length-12]);c+=2,g=!0}continue t}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(p[0])?(y=p.length>e-1?p[e-1]:p.length>0?p[p.length-1]:[0,0,0,1],m=p.length>e?p[e]:p.length>0?p[p.length-1]:[0,0,0,1]):y=m=p,3===y.length&&(y=[y[0],y[1],y[2],1]),3===m.length&&(m=[m[0],m[1],m[2],1]),!this.hasAlpha&&y[3]<1&&(this.hasAlpha=!0),x=Array.isArray(v)?v.length>e-1?v[e-1]:v.length>0?v[v.length-1]:[0,0,0,1]:v;var T=s;if(s+=d(b,_),g){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],T,x,y[0],y[1],y[2],y[3]);c+=2,g=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],T,x,y[0],y[1],y[2],y[3],b[0],b[1],b[2],_[0],_[1],_[2],T,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,m[0],m[1],m[2],m[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,m[0],m[1],m[2],m[3]),c+=4}}if(this.buffer.update(i),a.push(s),o.push(h[h.length-1].slice()),this.bounds=f,this.vertexCount=c,this.points=o,this.arcLength=a,"dashes"in t){var k=t.dashes.slice();for(k.unshift(0),e=1;e1.0001)return null;y+=g[f]}return Math.abs(y-1)>.001?null:[h,s(t,g),g]}},2056:function(t,e,r){var n=r(6832),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},8116:function(t,e,r){"use strict";var n=r(5158),i=r(5827),a=r(2944),o=r(8931),s=r(115),l=r(104),u=r(7437),c=r(5050),f=r(9156),h=r(7212),p=r(5306),d=r(2056),v=r(4340),g=d.meshShader,y=d.wireShader,m=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,T,k,A,M,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=c,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=u,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=v,this.edgeVAO=m,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=T,this.pointSizes=k,this.pointIds=b,this.pointVAO=A,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=M,this.contourVAO=S,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=w,this._view=w,this._projection=w,this._resolution=[1,1]}var k=T.prototype;function A(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function M(t){var e=n(t,g.vertex,g.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}function S(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}function E(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function L(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function C(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function P(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}k.isOpaque=function(){return!this.hasAlpha},k.isTransparent=function(){return this.hasAlpha},k.pickSlots=1,k.setPickBase=function(t){this.pickId=t},k.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},k.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};(s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},k.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;ai[k]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[t],r.uniforms.angle=y[t],a.drawArrays(a.TRIANGLES,i[k],i[A]-i[k]))),m[t]&&T&&(c[1^t]-=M*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=c,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,T)),c[1^t]=M*s[2+(1^t)]-1,d[t+2]&&(c[1^t]+=M*p*v[t+2],ki[k]&&(r.uniforms.dataAxis=u,r.uniforms.screenOffset=c,r.uniforms.color=g[t+2],r.uniforms.angle=y[t+2],a.drawArrays(a.TRIANGLES,i[k],i[A]-i[k]))),m[t+2]&&T&&(c[1^t]+=M*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=c,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,T))}),v.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,u=r.pixelRatio;if(this.titleCount){for(var c=0;c<2;++c)e[c]=2*(o[c]*u-a[c])/(a[2+c]-a[c])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),v.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,u=.5*(n[o+2]+n[o]),c=n[o+2]-n[o],f=a[o],v=a[o+2]-f,g=i[o],y=i[o+2]-g;p[o]=2*l/c*v/y,h[o]=2*(s-u)/c*v/y}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),v.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,u=t.bounds;for(o=0;o<2;++o){var c=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e=0){var v=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(v,e[1],v,e[3],p[d],h[d]):o.drawLine(e[0],v,e[2],v,p[d],h[d])}}for(d=0;d=0;--t)this.objects[t].dispose();for(this.objects.length=0,t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},u.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},u.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))u.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*e/window.innerHeight*(a-u.lastT())/20;u.pan(a,0,0,f*(Math.exp(o)-1))}}}),!0)},d.enableMouseListeners(),d};var n=r(8161),i=r(1152),a=r(6145),o=r(6475),s=r(2565),l=r(5233)},8245:function(t,e,r){var n=r(6832),i=r(5158),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);t.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec2"}])}},1059:function(t,e,r){"use strict";var n=r(4296),i=r(7453),a=r(2771),o=r(6496),s=r(2611),l=r(4234),u=r(8126),c=r(6145),f=r(1120),h=r(5268),p=r(8245),d=r(2861)({tablet:!0,featureDetect:!0});function v(){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 g(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}return e>0?(r=Math.round(Math.pow(10,e)),Math.ceil(t/r)*r):Math.ceil(t)}function y(t){return"boolean"!=typeof t||t}t.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;e||(e=document.createElement("canvas"),t.container?t.container.appendChild(e):document.body.appendChild(e));var r=t.gl;if(r||(t.glOptions&&(d=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d})),!r)throw new Error("webgl not supported");var m=t.bounds||[[-10,-10,-10],[10,10,10]],x=new v,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!d}),_=p(r),w=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,T={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:w},k=t.axes||{},A=i(r,k);A.enable=!k.disable;var M=t.spikes||{},S=o(r,M),E=[],L=[],C=[],P=[],O=!0,I=!0,D={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},z=(I=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),R=t.cameraObject||n(e,T),F={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:x,camera:R,axes:A,axesPixels:null,spikes:S,bounds:m,objects:E,shape:z,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:y(t.autoResize),autoBounds:y(t.autoBounds),autoScale:!!t.autoScale,autoCenter:y(t.autoCenter),clipToBounds:y(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:D,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,I=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},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)}},B=[r.drawingBufferWidth/F.pixelRatio|0,r.drawingBufferHeight/F.pixelRatio|0];function N(){if(!F._stopped&&F.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*F.pixelRatio),a=0|Math.ceil(n*F.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",O=!0}}}function j(){for(var t=E.length,e=P.length,n=0;n0&&0===C[e-1];)C.pop(),P.pop().dispose()}function U(){if(F.contextLost)return!0;r.isContextLost()&&(F.contextLost=!0,F.mouseListener.enabled=!1,F.selection.object=null,F.oncontextloss&&F.oncontextloss())}F.autoResize&&N(),window.addEventListener("resize",N),F.update=function(t){F._stopped||(t=t||{},O=!0,I=!0)},F.add=function(t){F._stopped||(t.axes=A,E.push(t),L.push(-1),O=!0,I=!0,j())},F.remove=function(t){if(!F._stopped){var e=E.indexOf(t);e<0||(E.splice(e,1),L.pop(),O=!0,I=!0,j())}},F.dispose=function(){if(!F._stopped&&(F._stopped=!0,window.removeEventListener("resize",N),e.removeEventListener("webglcontextlost",U),F.mouseListener.enabled=!1,!F.contextLost)){A.dispose(),S.dispose();for(var t=0;tx.distance)continue;for(var u=0;u 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),e.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),e.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},8271:function(t,e,r){"use strict";var n=r(5158),i=r(5827),a=r(5306),o=r(8023);function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}t.exports=function(t,e){var r=t.gl,a=new s(t,i(r),i(r),n(r,o.pointVertex,o.pointFragment),n(r,o.pickVertex,o.pickFragment));return a.update(e),t.addObject(a),a};var l,u,c=s.prototype;c.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},c.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),u=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),c=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=c<5,r.uniforms.pointSize=c,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(u[0]=255&t,u[1]=t>>8&255,u[2]=t>>16&255,u[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=u,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),c.draw=c.unifiedDraw,c.drawPick=c.unifiedDraw,c.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},6093:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u=e[0],c=e[1],f=e[2],h=e[3],p=r[0],d=r[1],v=r[2],g=r[3];return(a=u*p+c*d+f*v+h*g)<0&&(a=-a,p=-p,d=-d,v=-v,g=-g),1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),t[0]=s*u+l*p,t[1]=s*c+l*d,t[2]=s*f+l*v,t[3]=s*h+l*g,t}},8240:function(t){"use strict";t.exports=function(t){return t||0===t?t.toString():""}},4123:function(t,e,r){"use strict";var n=r(875);t.exports=function(t,e,r){var a=i[e];if(a||(a=i[e]={}),t in a)return a[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,u,c=n(t,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),u=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),c=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],f={vertex:a,fragment:l,attributes:c},h={vertex:o,fragment:l,attributes:c},p={vertex:s,fragment:l,attributes:c},d={vertex:a,fragment:u,attributes:c},v={vertex:o,fragment:u,attributes:c},g={vertex:s,fragment:u,attributes:c};function y(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}e.createPerspective=function(t){return y(t,f)},e.createOrtho=function(t){return y(t,h)},e.createProject=function(t){return y(t,p)},e.createPickPerspective=function(t){return y(t,d)},e.createPickOrtho=function(t){return y(t,v)},e.createPickProject=function(t){return y(t,g)}},2182:function(t,e,r){"use strict";var n=r(3596),i=r(5827),a=r(2944),o=r(5306),s=r(104),l=r(9282),u=r(4123),c=r(8240),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function v(t){return!0===t||t>1?1:t}function g(t,e,r,n,i,a,o,s,l,u,c,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=u,this.pickOrthoShader=c,this.pickProjectShader=f,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}t.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),u=l.createPickOrtho(e),c=l.createPickProject(e),f=i(e),h=i(e),p=i(e),d=i(e),v=new g(e,r,n,o,f,h,p,d,a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),s,u,c);return v.update(t),v};var y=g.prototype;y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},y.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var m=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],T=f.slice(),k=[0,0,0],A=[[0,0,0],[0,0,0]];function M(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function C(t,e,r,n,i,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,u=r.model||f,c=r.view||f,h=r.projection||f,d=e.axesBounds,v=function(t){for(var e=A,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],m[0]=2/o.drawingBufferWidth,m[1]=2/o.drawingBufferHeight,t.bind(),l.view=c,l.projection=h,l.screenSize=m,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=v,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var g=0;g<3;++g)if(a[g]){l.scale=e.projectScale[g],l.opacity=e.projectOpacity[g];for(var y=T,L=0;L<16;++L)y[L]=0;for(L=0;L<4;++L)y[5*L]=1;y[5*g]=0,i[g]<0?y[12+g]=d[0][g]:y[12+g]=d[1][g],s(y,u,y),l.model=y;var C=(g+1)%3,P=(g+2)%3,O=M(x),I=M(b);O[C]=1,I[P]=1;var D=p(0,0,0,S(_,O)),z=p(0,0,0,S(w,I));if(Math.abs(D[1])>Math.abs(z[1])){var R=D;D=z,z=R,R=O,O=I,I=R;var F=C;C=P,P=F}D[0]<0&&(O[C]=-1),z[1]>0&&(I[P]=-1);var B=0,N=0;for(L=0;L<4;++L)B+=Math.pow(u[4*C+L],2),N+=Math.pow(u[4*P+L],2);O[C]/=Math.sqrt(B),I[P]/=Math.sqrt(N),l.axes[0]=O,l.axes[1]=I,l.fragClipBounds[0]=E(k,v[0],g,-1e8),l.fragClipBounds[1]=E(k,v[1],g,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}(e,r,n,i),a===r.hasAlpha||o){t.bind();var u=t.uniforms;u.model=n.model||f,u.view=n.view||f,u.projection=n.projection||f,m[0]=2/l.drawingBufferWidth,m[1]=2/l.drawingBufferHeight,u.screenSize=m,u.highlightId=r.highlightId,u.highlightScale=r.highlightScale,u.fragClipBounds=L,u.clipBounds=r.axes.bounds,u.opacity=r.opacity,u.pickGroup=r.pickId/255,u.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function P(t,e,r,i){var a;a=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},y.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},y.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){Array.isArray(t.projectOpacity)?this.projectOpacity=t.projectOpacity.slice():(r=+t.projectOpacity,this.projectOpacity=[r,r,r]);for(var n=0;n<3;++n)this.projectOpacity[n]=v(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=v(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=t.position,l=t.font||"normal",u=t.alignment||[0,0];if(2===u.length)i=u[0],a=u[1];else for(i=[],a=[],n=0;n0){var I=0,D=x,z=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),B=Array.isArray(y)&&Array.isArray(y[0]);t:for(n=0;n<_;++n){for(m+=1,w=s[n],T=0;T<3;++T){if(isNaN(w[T])||!isFinite(w[T]))continue t;f[T]=Math.max(f[T],w[T]),c[T]=Math.min(c[T],w[T])}k=(N=P(h,n,l,this.pixelRatio)).mesh,A=N.lines,M=N.bounds;var N,j=N.visible;if(j)if(Array.isArray(p)){if(3===(U=F?n0?1-M[0][0]:Z<0?1+M[1][0]:1,Y*=Y>0?1-M[0][1]:Y<0?1+M[1][1]:1],X=k.cells||[],J=k.positions||[];for(T=0;T0){var y=r*c;o.drawBox(f-y,h-y,p+y,h+y,a),o.drawBox(f-y,d-y,p+y,d+y,a),o.drawBox(f-y,h-y,f+y,d+y,a),o.drawBox(p-y,h-y,p+y,d+y,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},2611:function(t,e,r){"use strict";t.exports=function(t,e){var r=e[0],a=e[1];return new l(t,n(t,r,a,{}),i.mallocUint8(r*a*4))};var n=r(4234),i=r(5306),a=r(5050),o=r(2288).nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var u=l.prototype;Object.defineProperty(u,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;ar)for(t=r;te)for(t=e;t=0){for(var T=0|w.type.charAt(w.type.length-1),k=new Array(T),A=0;A=0;)M+=1;_[m]=M}var S=new Array(r.length);function E(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t=0){if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+f+": "+h);s(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+f+": "+h);var d;if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+f+": "+h);l(t,e,p,i,d,a,f)}}}return a};var n=r(9068);function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;a.pointer=function(t,e,r,n){var i=this,a=i._gl,o=i._locations[i._index];a.vertexAttribPointer(o,i._dimension,t||a.FLOAT,!!e,r||0,n||0),a.enableVertexAttribArray(o)},a.set=function(t,e,r,n){return this._constFunc(this._locations[this._index],t,e,r,n)},Object.defineProperty(a,"location",{get:function(){return this._locations[this._index]},set:function(t){return t!==this._locations[this._index]&&(this._locations[this._index]=0|t,this._wrapper.program=null),0|t}});var o=[function(t,e,r){return void 0===r.length?t.vertexAttrib1f(e,r):t.vertexAttrib1fv(e,r)},function(t,e,r,n){return void 0===r.length?t.vertexAttrib2f(e,r,n):t.vertexAttrib2fv(e,r)},function(t,e,r,n,i){return void 0===r.length?t.vertexAttrib3f(e,r,n,i):t.vertexAttrib3fv(e,r)},function(t,e,r,n,i,a){return void 0===r.length?t.vertexAttrib4f(e,r,n,i,a):t.vertexAttrib4fv(e,r)}];function s(t,e,r,n,a,s,l){var u=o[a],c=new i(t,e,r,n,a,u);Object.defineProperty(s,l,{set:function(e){return t.disableVertexAttribArray(n[r]),u(t,n[r],e),e},get:function(){return c},enumerable:!0})}function l(t,e,r,n,i,a,o){for(var l=new Array(i),u=new Array(i),c=0;c4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+m);t["uniformMatrix"+y+"fv"](s[f],!1,h);break}throw new i("","Unknown uniform data type for "+name+": "+m)}if((y=m.charCodeAt(m.length-1)-48)<2||y>4)throw new i("","Invalid data type");switch(m.charAt(0)){case"b":case"i":t["uniform"+y+"iv"](s[f],h);break;case"v":t["uniform"+y+"fv"](s[f],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+m)}}}}}}function u(t,e){if("object"!=typeof e)return[[t,e]];var r=[];for(var n in e){var i=e[n],a=t;parseInt(n)+""===n?a+="["+n+"]":a+="."+n,"object"==typeof i?r.push.apply(r,u(a,i)):r.push([a,i])}return r}function c(t,e,n){if("object"==typeof n){var u=f(n);Object.defineProperty(t,e,{get:a(u),set:l(n),enumerable:!0,configurable:!1})}else s[n]?Object.defineProperty(t,e,{get:(c=n,function(t,e,r){return t.getUniform(e.program,r[c])}),set:l(n),enumerable:!0,configurable:!1}):t[e]=function(t){switch(t){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var e=t.indexOf("vec");if(0<=e&&e<=1&&t.length===4+e){if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[n].type);var c}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // 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).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);e.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(t,e,r){"use strict";var n=r(2858),i=r(4020),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(t,e){var r,n=t.length;for(r=0;re)return r-1}return r},s=function(t,e,r){return tr?r:t},l=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;nf-1||m>h-1||x>p-1)return n.create();var b,_,w,T,k,A,M=a[0][d],S=a[0][y],E=a[1][v],L=a[1][m],C=a[2][g],P=(l-M)/(S-M),O=(u-E)/(L-E),I=(c-C)/(a[2][x]-C);switch(isFinite(P)||(P=.5),isFinite(O)||(O=.5),isFinite(I)||(I=.5),r.reversedX&&(d=f-1-d,y=f-1-y),r.reversedY&&(v=h-1-v,m=h-1-m),r.reversedZ&&(g=p-1-g,x=p-1-x),r.filled){case 5:k=g,A=x,w=v*p,T=m*p,b=d*p*h,_=y*p*h;break;case 4:k=g,A=x,b=d*p,_=y*p,w=v*p*f,T=m*p*f;break;case 3:w=v,T=m,k=g*h,A=x*h,b=d*h*p,_=y*h*p;break;case 2:w=v,T=m,b=d*h,_=y*h,k=g*h*f,A=x*h*f;break;case 1:b=d,_=y,k=g*f,A=x*f,w=v*f*p,T=m*f*p;break;default:b=d,_=y,w=v*f,T=m*f,k=g*f*h,A=x*f*h}var D=i[b+w+k],z=i[b+w+A],R=i[b+T+k],F=i[b+T+A],B=i[_+w+k],N=i[_+w+A],j=i[_+T+k],U=i[_+T+A],V=n.create(),H=n.create(),q=n.create(),G=n.create();n.lerp(V,D,B,P),n.lerp(H,z,N,P),n.lerp(q,R,j,P),n.lerp(G,F,U,P);var Z=n.create(),Y=n.create();n.lerp(Z,V,q,O),n.lerp(Y,H,G,O);var W=n.create();return n.lerp(W,Z,Y,I),W}(e,t,p)},v=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=d(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,i,0]);var o=d(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,0,i]);var s=d(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},g=[],y=e[0][0],m=e[0][1],x=e[0][2],b=e[1][0],_=e[1][1],w=e[1][2],T=function(t){var e=t[0],r=t[1],n=t[2];return!(eb||r_||nw)},k=10*n.distance(e[0],e[1])/u,A=k*k,M=1,S=0,E=r.length;E>1&&(M=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=t.length,u=0;uS&&(S=F),z.push(F),g.push({points:P,velocities:O,divergences:z});for(var B=0;B<100*u&&P.lengthA&&n.scale(N,N,k/Math.sqrt(j)),n.add(N,N,C),I=d(N),n.squaredDistance(D,N)-A>-1e-4*A&&(P.push(N),D=N,O.push(I),R=v(N,I),F=n.length(R),isFinite(F)&&F>S&&(S=F),z.push(F)),C=N}}var U=function(t,e,r,a){for(var o=0,s=0;s0)for(T=0;T<8;T++){var k=(T+1)%8;u.push(h[T],p[T],p[k],p[k],h[k],h[T]),f.push(m,y,y,y,m,m),d.push(v,g,g,g,v,v);var A=u.length;c.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var M=h;h=p,p=M;var S=m;m=y,y=S;var E=v;v=g,g=E}return{positions:u,cells:c,vectors:f,vertexIntensity:d}}(t,r,a,o)})),f=[],h=[],p=[],d=[];for(s=0;s max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color — in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);e.createShader=function(t){var e=n(t,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createPickShader=function(t){var e=n(t,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},e.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},e.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},3754:function(t,e,r){"use strict";t.exports=function(t){var e=t.gl,r=m(e),n=b(e),s=x(e),l=_(e),u=i(e),c=a(e,[{buffer:u,size:4,stride:40,offset:0},{buffer:u,size:3,stride:40,offset:16},{buffer:u,size:3,stride:40,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),v=o(e,1,256,e.RGBA,e.UNSIGNED_BYTE);v.minFilter=e.LINEAR,v.magFilter=e.LINEAR;var g=new M(e,[0,0],[[0,0,0],[0,0,0]],r,n,u,c,v,s,l,f,h,p,d,[0,0,0]),y={levels:[[],[],[]]};for(var w in t)y[w]=t[w];return y.colormap=y.colormap||"jet",g.update(y),g};var n=r(2288),i=r(5827),a=r(2944),o=r(8931),s=r(5306),l=r(9156),u=r(7498),c=r(7382),f=r(5050),h=r(4162),p=r(104),d=r(7437),v=r(5070),g=r(9144),y=r(9054),m=y.createShader,x=y.createContourShader,b=y.createPickShader,_=y.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[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 A(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}function M(t,e,r,n,i,a,o,l,u,c,h,p,d,v,g){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=u,this._contourPickShader=c,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new A([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=v,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=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.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}!function(){for(var t=0;t<3;++t){var e=k[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();var S=M.prototype;S.genColormap=function(t,e){var r=!1,n=c([l({colormap:t,nshades:256,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return u.divseq(n,255),this.hasAlphaScale=r,n},S.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},S.isOpaque=function(){return!this.isTransparent()},S.pickSlots=1,S.setPickBase=function(t){this.pickId=t};var E=[0,0,0],L={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function C(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||E,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=L.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var u=L.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)u[i][n]=t.clipBounds[i][n];u[0][r]=-1e8,u[1][r]=1e8}return L.showSurface=o,L.showContour=s,L}var P={model:w,view:w,projection:w,inverseModel:w.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},O=w.slice(),I=[1,0,0,0,1,0,0,0,1];function D(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=P;n.model=t.model||w,n.view=t.view||w,n.projection=t.projection||w,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=I,n.vertexColor=this.vertexColor;var s=O;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var u=s[12+i];for(o=0;o<3;++o)u+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=u/l}var c=C(n,this);if(c.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=c.projections[i],this._shader.uniforms.clipBounds=c.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(c.showContour){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(f.uniforms.permutation=k[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var u=r.position;u[0]=u[1]=u[2]=0;for(var c=0;c<2;++c)for(var f=c?a:1-a,h=0;h<2;++h)for(var p=i+c,d=s+h,g=f*(h?l:1-l),y=0;y<3;++y)u[y]+=this._field[y].get(p,d)*g;for(var m=this._pickResult.level,x=0;x<3;++x)if(m[x]=v.le(this.contourLevels[x],u[x]),m[x]<0)this.contourLevels[x].length>0&&(m[x]=0);else if(m[x]Math.abs(_-u[x])&&(m[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],y=0;y<3;++y)r.dataCoordinate[y]=this._field[y].get(r.index[0],r.index[1]);return r},S.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();u.assign(t.lo(1,1).hi(r[0],r[1]),e),u.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),u.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),u.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),u.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},S.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=R(t.contourWidth,Number)),"showContour"in t&&(this.showContour=R(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=R(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=R(t.contourProject,(function(t){return R(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=R(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=R(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var u=l[o];for(y=0;y<2;++y)if(u.shape[y]!==a[y])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],u)}}else if(t.ticks){var c=t.ticks;if(!Array.isArray(c)||2!==c.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=c[o];if((Array.isArray(p)||p.length)&&(p=f(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var d=f(p.data,a);d.stride[o]=p.stride[0],d.stride[1^o]=0,this.padField(this._field[o],d)}}else{for(o=0;o<2;++o){var v=[0,0];v[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],v,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var xt=0;xt<5;++xt)$.pop();U-=1}continue t}$.push(nt[0],nt[1],ot[0],ot[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[Q]=et,this._contourCounts[Q]=rt}var bt=s.mallocFloat($.length);for(o=0;o<$.length;++o)bt[o]=$[o];this._contourBuffer.update(bt),s.freeFloat(bt)}},S.dispose=function(){this._shader.dispose(),this._vao.dispose(),this._coordinateBuffer.dispose(),this._colorMap.dispose(),this._contourBuffer.dispose(),this._contourVAO.dispose(),this._contourShader.dispose(),this._contourPickShader.dispose(),this._dynamicBuffer.dispose(),this._dynamicVAO.dispose();for(var t=0;t<3;++t)s.freeFloat(this._field[t].data)},S.highlight=function(t){var e,r;if(!t)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(e=0;e<3;++e)this.enableHighlight[e]?this.highlightLevel[e]=t.level[e]:this.highlightLevel[e]=-1;for(r=this.snapToData?t.dataCoordinate:t.position,e=0;e<3;++e)r[e]-=this.objectOffset[e];if(this.enableDynamic[0]&&r[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&r[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&r[2]!==this.dynamicLevel[2]){for(var n=0,i=this.shape,a=s.mallocFloat(12*i[0]*i[1]),o=0;o<3;++o)if(this.enableDynamic[o]){this.dynamicLevel[o]=r[o];var l=(o+1)%3,u=(o+2)%3,c=this._field[o],f=this._field[l],p=this._field[u],d=h(c,r[o]),v=d.cells,g=d.positions;for(this._dynamicOffsets[o]=n,e=0;ei||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function p(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var d=p.prototype;function v(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function g(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function y(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new p(t,o,e,r,n,i)}function m(t,e,r,n,i,a){var o=g(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new p(t,o,r,n,i,a)}function x(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=v(o,e.stride.slice()),u=0;"float32"===r?u=t.FLOAT:"float64"===r?(u=t.FLOAT,l=!1,r="float32"):"uint8"===r?u=t.UNSIGNED_BYTE:(u=t.UNSIGNED_BYTE,l=!1,r="uint8");var c,h,d=0;if(2===o.length)d=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])d=t.ALPHA;else if(2===o[2])d=t.LUMINANCE_ALPHA;else if(3===o[2])d=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");d=t.RGBA}}u!==t.FLOAT||t.getExtension("OES_texture_float")||(u=t.UNSIGNED_BYTE,l=!1);var y=e.size;if(l)c=0===e.offset&&e.data.length===y?e.data:e.data.subarray(e.offset,e.offset+y);else{var m=[o[2],o[2]*o[0],1];h=a.malloc(y,r);var x=n(h,o,m,0);"float32"!==r&&"float64"!==r||u!==t.UNSIGNED_BYTE?i.assign(x,e):f(x,e),c=h.subarray(0,y)}var b=g(t);return t.texImage2D(t.TEXTURE_2D,0,d,o[0],o[1],0,d,u,c),l||a.free(h),new p(t,b,o[0],o[1],d,u)}Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),d.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},d.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=c(t)?t:t.raw;if(l)this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l);else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,u,c){var h=c.dtype,p=c.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var d=0,g=0,y=v(p,c.stride.slice());if("float32"===h?d=t.FLOAT:"float64"===h?(d=t.FLOAT,y=!1,h="float32"):"uint8"===h?d=t.UNSIGNED_BYTE:(d=t.UNSIGNED_BYTE,y=!1,h="uint8"),2===p.length)g=t.LUMINANCE,p=[p[0],p[1],1],c=n(c.data,p,[c.stride[0],c.stride[1],1],c.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])g=t.ALPHA;else if(2===p[2])g=t.LUMINANCE_ALPHA;else if(3===p[2])g=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");g=t.RGBA}p[2]}if(g!==t.LUMINANCE&&g!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(g=s),g!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var m=c.size,x=u.indexOf(o)<0;if(x&&u.push(o),d===l&&y)0===c.offset&&c.data.length===m?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,c.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,c.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,c.data.subarray(c.offset,c.offset+m)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,c.data.subarray(c.offset,c.offset+m));else{var b;b=l===t.FLOAT?a.mallocFloat32(m):a.mallocUint8(m);var _=n(b,p,[p[2],p[2]*p[0],1]);d===t.FLOAT&&l===t.UNSIGNED_BYTE?f(_,c):i.assign(_,c),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,m)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,m)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},3056:function(t){"use strict";t.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(5415),i=r(899),a=r(9305)},8827:function(t){t.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},7622:function(t){t.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},8782:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},8501:function(t){t.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},903:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},5981:function(t,e,r){t.exports=r(8288)},8288:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},8629:function(t,e,r){t.exports=r(7979)},7979:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},9305:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},154:function(t){t.exports=1e-6},4932:function(t,e,r){t.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=r(154)},5777:function(t){t.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},3306:function(t){t.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},7447:function(t,e,r){t.exports=function(t,e,r,i,a,o){var s,l;for(e||(e=3),r||(r=0),l=i?Math.min(i*e+r,t.length):t.length,s=r;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}},6660:function(t){t.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},392:function(t){t.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=e[0],t[1]=i+o*u-s*l,t[2]=a+o*l+s*u,t}},3222:function(t){t.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+s*l+o*u,t[1]=e[1],t[2]=a+s*u-o*l,t}},3388:function(t){t.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),u=Math.cos(n);return t[0]=i+o*u-s*l,t[1]=a+o*l+s*u,t[2]=e[2],t}},1624:function(t){t.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},5685:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},6722:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},831:function(t){t.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},5294:function(t,e,r){t.exports=r(6403)},3303:function(t,e,r){t.exports=r(4337)},6403:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},4337:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},8921:function(t,e,r){t.exports=r(911)},911:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},9908:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},3255:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},6568:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=c*u+p*-o+f*-l-h*-s,t[1]=f*u+p*-s+h*-o-c*-l,t[2]=h*u+p*-l+c*-s-f*-o,t}},3433:function(t){t.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},1413:function(t){t.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},3470:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},5313:function(t){t.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},5446:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},205:function(t){t.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},4242:function(t){t.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},5680:function(t){t.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},4020:function(t,e,r){t.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(t){t.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},8177:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},8746:function(t){t.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},3030:function(t){t.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},2170:function(t){t.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},746:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},6459:function(t){t.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},381:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o),t}},3770:function(t,e,r){var n=r(381),i=r(5510);t.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},5510:function(t){t.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},4224:function(t){t.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},6453:function(t){t.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},1542:function(t){t.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},9037:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},2705:function(t){t.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},6342:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},5022:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],u=r[3],c=u*n+s*a-l*i,f=u*i+l*n-o*a,h=u*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=c*u+p*-o+f*-l-h*-s,t[1]=f*u+p*-s+h*-o-c*-l,t[2]=h*u+p*-l+c*-s-f*-o,t[3]=e[3],t}},9365:function(t,e,r){var n=r(8096),i=r(7896);t.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return S(r),x+=r.length,(v=v.slice(r.length)).length}}function D(){return/[^a-fA-F0-9]/.test(e)?(S(v.join("")),d=l,h):(v.push(e),r=e,h+1)}function z(){return"."===e||/[eE]/.test(e)?(v.push(e),d=5,r=e,h+1):"x"===e&&1===v.length&&"0"===v[0]?(d=11,v.push(e),r=e,h+1):/[^\d]/.test(e)?(S(v.join("")),d=l,h):(v.push(e),r=e,h+1)}function R(){return"f"===e&&(v.push(e),r=e,h+=1),/[eE]/.test(e)?(v.push(e),r=e,h+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(S(v.join("")),d=l,h):(v.push(e),r=e,h+1)}function F(){if(/[^\d\w_]/.test(e)){var t=v.join("");return d=M[t]?8:A[t]?7:6,S(v.join("")),d=l,h}return v.push(e),r=e,h+1}};var n=r(399),i=r(9746),a=r(9525),o=r(9458),s=r(3585),l=999,u=9999,c=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(t,e,r){var n=r(9525);n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),t.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},9525:function(t){t.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},9458:function(t,e,r){var n=r(399);t.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},399:function(t){t.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},9746:function(t){t.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(t,e,r){var n=r(3193);t.exports=function(t,e){var r=n(e),i=[];return(i=i.concat(r(t))).concat(r(null))}},6832:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n0;)for(var s=(t=o.pop()).adjacent,l=0;l<=r;++l){var u=s[l];if(u.boundary&&!(u.lastVisited<=-n)){for(var c=u.vertices,f=0;f<=r;++f){var h=c[f];i[f]=h<0?e:a[h]}var p=this.orient();if(p>0)return u;u.lastVisited=-n,0===p&&o.push(u)}}return null},c.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,u=s.adjacent,c=0;c<=n;++c)a[c]=i[l[c]];for(s.lastVisited=r,c=0;c<=n;++c){var f=u[c];if(!(f.lastVisited>=r)){var h=a[c];a[c]=t;var p=this.orient();if(a[c]=h,p<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},c.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,u=this.interior,c=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,u.push(e);for(var h=[];f.length>0;){var p=(e=f.pop()).vertices,d=e.adjacent,v=p.indexOf(r);if(!(v<0))for(var g=0;g<=n;++g)if(g!==v){var y=d[g];if(y.boundary&&!(y.lastVisited>=r)){var m=y.vertices;if(y.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)m[b]<0?(x=b,l[b]=t):l[b]=i[m[b]];if(this.orient()>0){m[x]=r,y.boundary=!1,u.push(y),f.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var _=y.adjacent,w=p.slice(),T=d.slice(),k=new a(w,T,!0);c.push(k);var A=_.indexOf(e);if(!(A<0))for(_[A]=k,T[v]=y,w[g]=-1,T[g]=e,d[g]=k,k.flip(),b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=new Array(n-1),E=0,L=0;L<=n;++L){var C=w[L];C<0||L===b||(S[E++]=C)}h.push(new o(S,k,b))}}}}}for(h.sort(s),g=0;g+1=0?o[l++]=s[c]:u=1&c;if(u===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},9014:function(t,e,r){"use strict";var n=r(5070);function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}t.exports=function(t){return t&&0!==t.length?new y(g(t)):new y(null)};var a=i.prototype;function o(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=g(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function u(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function c(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r>1],a=[],o=[],s=[];for(r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=g([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=g([t]);else{var r=n.ge(this.leftPoints,t,d),i=n.ge(this.rightPoints,t,v);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},a.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?u(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?u(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,t,d);athis.mid?this.right&&(r=this.right.queryPoint(t,e))?r:f(this.rightPoints,t,e):h(this.leftPoints,e);var r},a.queryInterval=function(t,e,r){var n;return tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r))?n:ethis.mid?f(this.rightPoints,t,r):h(this.leftPoints,r)};var m=y.prototype;m.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},m.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},m.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},m.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(m,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(m,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9560:function(t){"use strict";t.exports=function(t){for(var e=new Array(t),r=0;r1&&-1!==n.indexOf("Macintosh")&&-1!==n.indexOf("Safari")&&(i=!0),i}},3596:function(t){"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},3578:function(t){t.exports=function(t,e,r){return t*(1-r)+e*r}},7191:function(t,e,r){var n=r(4690),i=r(9823),a=r(7332),o=r(7787),s=r(7437),l=r(2142),u={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},c=i(),f=i(),h=[0,0,0,0],p=[[0,0,0],[0,0,0],[0,0,0]],d=[0,0,0];function v(t,e,r,n,i){t[0]=e[0]*n+r[0]*i,t[1]=e[1]*n+r[1]*i,t[2]=e[2]*n+r[2]*i}t.exports=function(t,e,r,i,g,y){if(e||(e=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[0,0,0,1]),!n(c,t))return!1;if(a(f,c),f[3]=0,f[7]=0,f[11]=0,f[15]=1,Math.abs(o(f)<1e-8))return!1;var m,x,b,_,w,T,k,A=c[3],M=c[7],S=c[11],E=c[12],L=c[13],C=c[14],P=c[15];if(0!==A||0!==M||0!==S){if(h[0]=A,h[1]=M,h[2]=S,h[3]=P,!s(f,f))return!1;l(f,f),m=g,b=f,_=(x=h)[0],w=x[1],T=x[2],k=x[3],m[0]=b[0]*_+b[4]*w+b[8]*T+b[12]*k,m[1]=b[1]*_+b[5]*w+b[9]*T+b[13]*k,m[2]=b[2]*_+b[6]*w+b[10]*T+b[14]*k,m[3]=b[3]*_+b[7]*w+b[11]*T+b[15]*k}else g[0]=g[1]=g[2]=0,g[3]=1;if(e[0]=E,e[1]=L,e[2]=C,function(t,e){t[0][0]=e[0],t[0][1]=e[1],t[0][2]=e[2],t[1][0]=e[4],t[1][1]=e[5],t[1][2]=e[6],t[2][0]=e[8],t[2][1]=e[9],t[2][2]=e[10]}(p,c),r[0]=u.length(p[0]),u.normalize(p[0],p[0]),i[0]=u.dot(p[0],p[1]),v(p[1],p[1],p[0],1,-i[0]),r[1]=u.length(p[1]),u.normalize(p[1],p[1]),i[0]/=r[1],i[1]=u.dot(p[0],p[2]),v(p[2],p[2],p[0],1,-i[1]),i[2]=u.dot(p[1],p[2]),v(p[2],p[2],p[1],1,-i[2]),r[2]=u.length(p[2]),u.normalize(p[2],p[2]),i[1]/=r[2],i[2]/=r[2],u.cross(d,p[1],p[2]),u.dot(p[0],d)<0)for(var O=0;O<3;O++)r[O]*=-1,p[O][0]*=-1,p[O][1]*=-1,p[O][2]*=-1;return y[0]=.5*Math.sqrt(Math.max(1+p[0][0]-p[1][1]-p[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-p[0][0]+p[1][1]-p[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-p[0][0]-p[1][1]+p[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+p[0][0]+p[1][1]+p[2][2],0)),p[2][1]>p[1][2]&&(y[0]=-y[0]),p[0][2]>p[2][0]&&(y[1]=-y[1]),p[1][0]>p[0][1]&&(y[2]=-y[2]),!0}},4690:function(t){t.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},7649:function(t,e,r){var n=r(1868),i=r(1102),a=r(7191),o=r(7787),s=r(1116),l=f(),u=f(),c=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}t.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,u.translate,u.scale,u.skew,u.perspective,u.quaternion);return!(!h||!p||(n(c.translate,l.translate,u.translate,f),n(c.skew,l.skew,u.skew,f),n(c.scale,l.scale,u.scale,f),n(c.perspective,l.perspective,u.perspective,f),s(c.quaternion,l.quaternion,u.quaternion,f),i(t,c.translate,c.scale,c.skew,c.perspective,c.quaternion),0))}},1102:function(t,e,r){var n={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)},i=(n.create(),n.create());t.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},9298:function(t,e,r){"use strict";var n=r(5070),i=r(7649),a=r(7437),o=r(6109),s=r(7115),l=r(5240),u=r(3012),c=r(998),f=(r(3668),r(899)),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.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]}t.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,u=0;u<16;++u)o[u]=s[l++];else{var c=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(u=0;u<16;++u)h[u]=s[l++];var d=this.nextMatrix;for(u=0;u<16;++u)d[u]=s[l++],p=p&&h[u]===d[u];if(c<1e-6||p)for(u=0;u<16;++u)o[u]=h[u];else i(o,h,d,(t-e[r])/c)}var v=this.computedUp;v[0]=o[1],v[1]=o[5],v[2]=o[9],f(v,v);var g=this.computedInverse;a(g,o);var y=this.computedEye,m=g[15];y[0]=g[12]/m,y[1]=g[13]/m,y[2]=g[14]/m;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(u=0;u<3;++u)x[u]=y[u]-o[2+4*u]*b}},d.idle=function(t){if(!(t1&&n(t[o[c-2]],t[o[c-1]],u)<=0;)c-=1,o.pop();for(o.push(l),c=s.length;c>1&&n(t[s[c-2]],t[s[c-1]],u)>=0;)c-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,h=(i=0,o.length);i0;--p)r[f++]=s[p];return r};var n=r(417)[3]},6145:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function u(t,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||u!==i||c!==a||l(s))&&(r=0|t,i=u||0,a=c||0,e&&e(r,i,a,o))}function c(t){u(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?u(0,t):u(r,t)}function d(t){u(r|n.buttons(t),t)}function v(t){u(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",v),t.addEventListener("mouseleave",c),t.addEventListener("mouseenter",c),t.addEventListener("mouseout",c),t.addEventListener("mouseover",c),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",v),t.removeEventListener("mouseleave",c),t.removeEventListener("mouseenter",c),t.removeEventListener("mouseout",c),t.removeEventListener("mouseover",c),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var n=r(4110)},2565:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=t.clientX||0,o=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},4110:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0"),"function"!=typeof t.vertex&&e("Must specify vertex creation function"),"function"!=typeof t.cell&&e("Must specify cell creation function"),"function"!=typeof t.phase&&e("Must specify phase function");for(var o=t.getters||[],s=new Array(a),l=0;l=0?s[l]=!0:s[l]=!1;return function(t,e,r,a,o,s){var l=[s,o].join(",");return(0,i[l])(t,e,r,n.mallocUint32,n.freeUint32)}(t.vertex,t.cell,t.phase,0,r,s)};var i={"false,0,1":function(t,e,r,n,i){return function(a,o,s,l){var u,c=0|a.shape[0],f=0|a.shape[1],h=a.data,p=0|a.offset,d=0|a.stride[0],v=0|a.stride[1],g=p,y=0|-d,m=0,x=0|-v,b=0,_=-d-v|0,w=0,T=0|d,k=v-d*c|0,A=0,M=0,S=0,E=2*c|0,L=n(E),C=n(E),P=0,O=0,I=-1,D=-1,z=0,R=0|-c,F=0|c,B=0,N=-c-1|0,j=c-1|0,U=0,V=0,H=0;for(A=0;A0){if(M=1,L[P++]=r(h[g],o,s,l),g+=T,c>0)for(A=1,u=h[g],O=L[P]=r(u,o,s,l),z=L[P+I],B=L[P+R],U=L[P+N],O===z&&O===B&&O===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(A,M,u,m,b,w,O,z,B,U,o,s,l),V=C[P]=S++),P+=1,g+=T,A=2;A0)for(A=1,u=h[g],O=L[P]=r(u,o,s,l),z=L[P+I],B=L[P+R],U=L[P+N],O===z&&O===B&&O===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(A,M,u,m,b,w,O,z,B,U,o,s,l),V=C[P]=S++,U!==B&&e(C[P+R],V,b,w,B,U,o,s,l)),P+=1,g+=T,A=2;A0){if(A=1,L[P++]=r(h[g],o,s,l),g+=T,f>0)for(M=1,u=h[g],O=L[P]=r(u,o,s,l),B=L[P+R],z=L[P+I],U=L[P+N],O===B&&O===z&&O===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(A,M,u,m,b,w,O,B,z,U,o,s,l),V=C[P]=S++),P+=1,g+=T,M=2;M0)for(M=1,u=h[g],O=L[P]=r(u,o,s,l),B=L[P+R],z=L[P+I],U=L[P+N],O===B&&O===z&&O===U||(m=h[g+y],b=h[g+x],w=h[g+_],t(A,M,u,m,b,w,O,B,z,U,o,s,l),V=C[P]=S++,U!==B&&e(C[P+R],V,w,m,U,B,o,s,l)),P+=1,g+=T,M=2;M2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),t.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),t.pick(0,-1,1).lo(1).hi(a[1]-2)),e(t.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),t.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),e(t.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),t.pick(-1,0,0).lo(1).hi(a[0]-2)),e(t.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),t.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),e(t.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),t.set(0,0,0,0),t.set(0,0,1,0),t.set(a[0]-1,0,0,0),t.set(a[0]-1,0,1,0),t.set(0,a[1]-1,0,0),t.set(0,a[1]-1,1,0),t.set(a[0]-1,a[1]-1,0,0),t.set(a[0]-1,a[1]-1,1,0),t}}t.exports=function(t,e,r){return Array.isArray(r)||(r=n(e.dimension,"string"==typeof r?r:"clamp")),0===e.size?t:0===e.dimension?(t.set(0),t):function(t){var e=t.join();if(a=c[e])return a;for(var r=t.length,n=[f,h],i=1;i<=r;++i)n.push(p(i));var a=d.apply(void 0,n);return c[e]=a,a}(r)(t,e)}},3581:function(t){"use strict";function e(t,e){var r=Math.floor(e),n=e-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|t[1];b>0;){b<64?(u=b,b=0):(u=64,b-=64),n=y+x*f+b*h,o=m+x*d+b*v;var _=0,w=0,T=0,k=p,A=f-c*p,M=h-l*f,S=g,E=d-c*g,L=v-l*d;for(T=0;T0;){v<64?(l=v,v=0):(l=64,v-=64);for(var g=0|t[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=p+v*c+g*u,o=d+v*h+g*f;var y=0,m=0,x=c,b=u-l*c,_=h,w=f-l*h;for(m=0;m0;){m<64?(u=m,m=0):(u=64,m-=64);for(var x=0|t[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|t[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=g+m*h+x*c+b*f,o=y+m*v+x*p+b*d;var _=0,w=0,T=0,k=h,A=c-u*h,M=f-s*c,S=v,E=p-u*v,L=d-s*p;for(T=0;Tr;){y=0,m=v-o;e:for(g=0;gb)break e;m+=f,y+=h}for(y=v,m=v-o,g=0;g>1,q=H-j,G=H+j,Z=U,Y=q,W=H,X=G,J=V,K=i+1,$=a-1,Q=!0,tt=0,et=0,rt=0,nt=f,it=e(nt),at=e(nt);A=l*Z,M=l*Y,N=s;t:for(k=0;k0){g=Z,Z=Y,Y=g;break t}if(rt<0)break t;N+=p}A=l*X,M=l*J,N=s;t:for(k=0;k0){g=X,X=J,J=g;break t}if(rt<0)break t;N+=p}A=l*Z,M=l*W,N=s;t:for(k=0;k0){g=Z,Z=W,W=g;break t}if(rt<0)break t;N+=p}A=l*Y,M=l*W,N=s;t:for(k=0;k0){g=Y,Y=W,W=g;break t}if(rt<0)break t;N+=p}A=l*Z,M=l*X,N=s;t:for(k=0;k0){g=Z,Z=X,X=g;break t}if(rt<0)break t;N+=p}A=l*W,M=l*X,N=s;t:for(k=0;k0){g=W,W=X,X=g;break t}if(rt<0)break t;N+=p}A=l*Y,M=l*J,N=s;t:for(k=0;k0){g=Y,Y=J,J=g;break t}if(rt<0)break t;N+=p}A=l*Y,M=l*W,N=s;t:for(k=0;k0){g=Y,Y=W,W=g;break t}if(rt<0)break t;N+=p}A=l*X,M=l*J,N=s;t:for(k=0;k0){g=X,X=J,J=g;break t}if(rt<0)break t;N+=p}for(A=l*Z,M=l*Y,S=l*W,E=l*X,L=l*J,C=l*U,P=l*H,O=l*V,B=0,N=s,k=0;k0)){if(rt<0){for(A=l*b,M=l*K,S=l*$,N=s,k=0;k0)for(;;){for(_=s+$*l,B=0,k=0;k0)){for(_=s+$*l,B=0,k=0;kV){t:for(;;){for(_=s+K*l,B=0,N=s,k=0;k1&&n?s(r,n[0],n[1]):s(r)}(t,e,l);return n(l,u)}},8729:function(t,e,r){"use strict";var n=r(8139),i={};t.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(":"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},5050:function(t,e,r){var n=r(4780),i="undefined"!=typeof Float64Array;function a(t,e){return t[0]-e[0]}function o(){var t,e=this.stride,r=new Array(e.length);for(t=0;t=0&&(e+=a*(r=0|t),i-=r),new n(this.data,i,a,e)},i.step=function(t){var e=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"==typeof t&&((a=0|t)<0?(i+=r*(e-1),e=o(-e/a)):e=o(e/a),r*=a),new n(this.data,e,r,i)},i.transpose=function(t){t=void 0===t?0:0|t;var e=this.shape,r=this.stride;return new n(this.data,e[t],r[t],this.offset)},i.pick=function(t){var r=[],n=[],i=this.offset;return"number"==typeof t&&t>=0?i=i+this.stride[0]*t|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,e[r.length+1])(this.data,r,n,i)},function(t,e,r,i){return new n(t,e[0],r[0],i)}},2:function(t,e,r){function n(t,e,r,n,i,a){this.data=t,this.shape=[e,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=t,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(e,r,n){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]=n},i.get=function(e,r){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r):this.data[this.offset+this.stride[0]*e+this.stride[1]*r]},i.index=function(t,e){return this.offset+this.stride[0]*t+this.stride[1]*e},i.hi=function(t,e){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,this.stride[0],this.stride[1],this.offset)},i.lo=function(t,e){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof t&&t>=0&&(r+=s*(i=0|t),a-=i),"number"==typeof e&&e>=0&&(r+=l*(i=0|e),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(t,e){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,u=Math.ceil;return"number"==typeof t&&((l=0|t)<0?(s+=a*(r-1),r=u(-r/l)):r=u(r/l),a*=l),"number"==typeof e&&((l=0|e)<0?(s+=o*(i-1),i=u(-i/l)):i=u(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(t,e){t=void 0===t?0:0|t,e=void 0===e?1:0|e;var r=this.shape,i=this.stride;return new n(this.data,r[t],r[e],i[t],i[e],this.offset)},i.pick=function(t,r){var n=[],i=[],a=this.offset;return"number"==typeof t&&t>=0?a=a+this.stride[0]*t|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,e[n.length+1])(this.data,n,i,a)},function(t,e,r,i){return new n(t,e[0],e[1],r[0],r[1],i)}},3:function(t,e,r){function n(t,e,r,n,i,a,o,s){this.data=t,this.shape=[e,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=t,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var t=Math.abs(this.stride[0]),e=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return t>e?e>r?[2,1,0]:t>r?[1,2,0]:[1,0,2]:t>r?[2,0,1]:r>e?[0,1,2]:[0,2,1]}}),i.set=function(e,r,n,i){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(e,r,n){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n]},i.index=function(t,e,r){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r},i.hi=function(t,e,r){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(t,e,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.stride[0],c=this.stride[1],f=this.stride[2];return"number"==typeof t&&t>=0&&(i+=u*(a=0|t),o-=a),"number"==typeof e&&e>=0&&(i+=c*(a=0|e),s-=a),"number"==typeof r&&r>=0&&(i+=f*(a=0|r),l-=a),new n(this.data,o,s,l,u,c,f,i)},i.step=function(t,e,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],u=this.stride[2],c=this.offset,f=0,h=Math.ceil;return"number"==typeof t&&((f=0|t)<0?(c+=s*(i-1),i=h(-i/f)):i=h(i/f),s*=f),"number"==typeof e&&((f=0|e)<0?(c+=l*(a-1),a=h(-a/f)):a=h(a/f),l*=f),"number"==typeof r&&((f=0|r)<0?(c+=u*(o-1),o=h(-o/f)):o=h(o/f),u*=f),new n(this.data,i,a,o,s,l,u,c)},i.transpose=function(t,e,r){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[t],i[e],i[r],a[t],a[e],a[r],this.offset)},i.pick=function(t,r,n){var i=[],a=[],o=this.offset;return"number"==typeof t&&t>=0?o=o+this.stride[0]*t|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,e[i.length+1])(this.data,i,a,o)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],r[0],r[1],r[2],i)}},4:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u){this.data=t,this.shape=[e,r,n,i],this.stride=[a,o,s,l],this.offset=0|u}var i=n.prototype;return i.dtype=t,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(e,r,n,i){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(t,e,r,n){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n},i.hi=function(t,e,r,i){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(t,e,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],u=this.shape[2],c=this.shape[3],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3];return"number"==typeof t&&t>=0&&(a+=f*(o=0|t),s-=o),"number"==typeof e&&e>=0&&(a+=h*(o=0|e),l-=o),"number"==typeof r&&r>=0&&(a+=p*(o=0|r),u-=o),"number"==typeof i&&i>=0&&(a+=d*(o=0|i),c-=o),new n(this.data,s,l,u,c,f,h,p,d,a)},i.step=function(t,e,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],u=this.stride[0],c=this.stride[1],f=this.stride[2],h=this.stride[3],p=this.offset,d=0,v=Math.ceil;return"number"==typeof t&&((d=0|t)<0?(p+=u*(a-1),a=v(-a/d)):a=v(a/d),u*=d),"number"==typeof e&&((d=0|e)<0?(p+=c*(o-1),o=v(-o/d)):o=v(o/d),c*=d),"number"==typeof r&&((d=0|r)<0?(p+=f*(s-1),s=v(-s/d)):s=v(s/d),f*=d),"number"==typeof i&&((d=0|i)<0?(p+=h*(l-1),l=v(-l/d)):l=v(l/d),h*=d),new n(this.data,a,o,s,l,u,c,f,h,p)},i.transpose=function(t,e,r,i){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[t],a[e],a[r],a[i],o[t],o[e],o[r],o[i],this.offset)},i.pick=function(t,r,n,i){var a=[],o=[],s=this.offset;return"number"==typeof t&&t>=0?s=s+this.stride[0]*t|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,e[a.length+1])(this.data,a,o,s)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],r[0],r[1],r[2],r[3],i)}},5:function(t,e,r){function n(t,e,r,n,i,a,o,s,l,u,c,f){this.data=t,this.shape=[e,r,n,i,a],this.stride=[o,s,l,u,c],this.offset=0|f}var i=n.prototype;return i.dtype=t,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(e,r,n,i,a,o){return"generic"===t?this.data.set(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(e,r,n,i,a){return"generic"===t?this.data.get(this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*e+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(t,e,r,n,i){return this.offset+this.stride[0]*t+this.stride[1]*e+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(t,e,r,i,a){return new n(this.data,"number"!=typeof t||t<0?this.shape[0]:0|t,"number"!=typeof e||e<0?this.shape[1]:0|e,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(t,e,r,i,a){var o=this.offset,s=0,l=this.shape[0],u=this.shape[1],c=this.shape[2],f=this.shape[3],h=this.shape[4],p=this.stride[0],d=this.stride[1],v=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof t&&t>=0&&(o+=p*(s=0|t),l-=s),"number"==typeof e&&e>=0&&(o+=d*(s=0|e),u-=s),"number"==typeof r&&r>=0&&(o+=v*(s=0|r),c-=s),"number"==typeof i&&i>=0&&(o+=g*(s=0|i),f-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),h-=s),new n(this.data,l,u,c,f,h,p,d,v,g,y,o)},i.step=function(t,e,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],u=this.shape[3],c=this.shape[4],f=this.stride[0],h=this.stride[1],p=this.stride[2],d=this.stride[3],v=this.stride[4],g=this.offset,y=0,m=Math.ceil;return"number"==typeof t&&((y=0|t)<0?(g+=f*(o-1),o=m(-o/y)):o=m(o/y),f*=y),"number"==typeof e&&((y=0|e)<0?(g+=h*(s-1),s=m(-s/y)):s=m(s/y),h*=y),"number"==typeof r&&((y=0|r)<0?(g+=p*(l-1),l=m(-l/y)):l=m(l/y),p*=y),"number"==typeof i&&((y=0|i)<0?(g+=d*(u-1),u=m(-u/y)):u=m(u/y),d*=y),"number"==typeof a&&((y=0|a)<0?(g+=v*(c-1),c=m(-c/y)):c=m(c/y),v*=y),new n(this.data,o,s,l,u,c,f,h,p,d,v,g)},i.transpose=function(t,e,r,i,a){t=void 0===t?0:0|t,e=void 0===e?1:0|e,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[t],o[e],o[r],o[i],o[a],s[t],s[e],s[r],s[i],s[a],this.offset)},i.pick=function(t,r,n,i,a){var o=[],s=[],l=this.offset;return"number"==typeof t&&t>=0?l=l+this.stride[0]*t|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,e[o.length+1])(this.data,o,s,l)},function(t,e,r,i){return new n(t,e[0],e[1],e[2],e[3],e[4],r[0],r[1],r[2],r[3],r[4],i)}}};function l(t,e){var r=-1===e?"T":String(e),n=s[r];return-1===e?n(t):0===e?n(t,u[t][0]):n(t,u[t],o)}var u={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};t.exports=function(t,e,r,a){if(void 0===t)return(0,u.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,c=1;s>=0;--s)r[s]=c,c*=e[s]}if(void 0===a)for(a=0,s=0;s>>0;t.exports=function(t,e){if(isNaN(t)||isNaN(e))return NaN;if(t===e)return t;if(0===t)return e<0?-i:i;var r=n.hi(t),o=n.lo(t);return e>t==t>0?o===a?(r+=1,o=0):o+=1:0===o?(o=a,r-=1):o-=1,n.pack(o,r)}},115:function(t,e){e.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa){var b=i[u],_=1/Math.sqrt(g*m);for(x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;b[x]+=_*(y[w]*v[T]-y[T]*v[w])}}}for(o=0;oa)for(_=1/Math.sqrt(k),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},e.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0,u=0;u<3;++u)h[u]*=p;i[o]=h}return i}},567:function(t){"use strict";t.exports=function(t,e,r,n,i,a,o,s,l,u){var c=e+a+u;if(f>0){var f=Math.sqrt(c+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,u);f=Math.sqrt(2*h-c+1),e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},7774:function(t,e,r){"use strict";t.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),c(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));return i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up),i};var n=r(8444),i=r(3012),a=r(5950),o=r(7437),s=r(567);function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function u(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function c(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=u(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),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 h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;c(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var u=0,f=0;f<3;++f)u+=r[l+4*f]*i[f];r[12+l]=-u}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],u=l(a,o,s);a/=u,o/=u,s/=u;var c=i[0],f=i[4],h=i[8],p=c*a+f*o+h*s,d=l(c-=a*p,f-=o*p,h-=s*p);c/=d,f/=d,h/=d;var v=i[2],g=i[6],y=i[10],m=v*a+g*o+y*s,x=v*c+g*f+y*h,b=l(v-=m*a+x*c,g-=m*o+x*f,y-=m*s+x*h);v/=b,g/=b,y/=b;var _=c*e+a*r,w=f*e+o*r,T=h*e+s*r;this.center.move(t,_,w,T);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+n),this.radius.set(t,Math.log(k))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],c=i[1],f=i[5],h=i[9],p=i[2],d=i[6],v=i[10],g=e*a+r*c,y=e*o+r*f,m=e*s+r*h,x=-(d*m-v*y),b=-(v*g-p*m),_=-(p*y-d*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),T=u(x,b,_,w);T>1e-6?(x/=T,b/=T,_/=T,w/=T):(x=b=_=0,w=1);var k=this.computedRotation,A=k[0],M=k[1],S=k[2],E=k[3],L=A*w+E*x+M*_-S*b,C=M*w+E*b+S*x-A*_,P=S*w+E*_+A*b-M*x,O=E*w-A*x-M*b-S*_;if(n){x=p,b=d,_=v;var I=Math.sin(n)/l(x,b,_);x*=I,b*=I,_*=I,O=O*(w=Math.cos(e))-(L=L*w+O*x+C*_-P*b)*x-(C=C*w+O*b+P*x-L*_)*b-(P=P*w+O*_+L*b-C*x)*_}var D=u(L,C,P,O);D>1e-6?(L/=D,C/=D,P/=D,O/=D):(L=C=P=0,O=1),this.rotation.set(t,L,C,P,O)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),c(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,u=0;u<3;++u)l+=Math.pow(r[u]-e[u],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),c(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,u=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,u-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.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]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},4930:function(t,e,r){"use strict";var n=r(6184);t.exports=function(t,e,r){return n(r=void 0!==r?r+"":" ",e)+t}},4405:function(t){t.exports=function(t,e){e||(e=[0,""]),t=String(t);var r=parseFloat(t,10);return e[0]=r,e[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},4166:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=0|e.length,i=t.length,a=[new Array(r),new Array(r)],o=0;o0){o=a[c][r][0],l=c;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],p=0;p0&&(o=d,s=v,l=f)}return i||o&&u(o,l),s}function f(t,r){var i=a[r][t][0],o=[t];u(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=c(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=c(l,f,!0);if(n(e[l],e[f],e[h],e[p])<0)break;o.push(t),s=c(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(o=0;o0;){a[0][o].length;var v=f(o,p);h(0,v)?d.push.apply(d,v):(d.length>0&&l.push(d),d=v)}d.length>0&&l.push(d)}return l};var n=r(9398)},3959:function(t,e,r){"use strict";t.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var u=o.pop();i[u]=!1;var c=r[u];for(s=0;s0}))).length,g=new Array(v),y=new Array(v);for(p=0;p0;){var B=R.pop(),N=E[B];l(N,(function(t,e){return t-e}));var j,U=N.length,V=F[B];if(0===V){var H=d[B];j=[H]}for(p=0;p=0||(F[q]=1^V,R.push(q),0===V&&(z(H=d[q])||(H.reverse(),j.push(H))))}0===V&&r.push(j)}return r};var n=r(8348),i=r(4166),a=r(211),o=r(9660),s=r(9662),l=r(1215),u=r(3959);function c(t,e){for(var r=new Array(t),n=0;n0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,u=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(u>0)a=a.left;else{if(!(u<0))return 0;s=1,a=a.right}}return s}}(y.slabs,y.coordinates);return 0===a.length?m:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),m)};var n=r(417)[3],i=r(4385),a=r(9014),o=r(5070);function s(){return!0}function l(t){for(var e={},r=0;r=u?(k=1,m=u+2*h+d):m=h*(k=-h/u)+d):(k=0,p>=0?(A=0,m=d):-p>=f?(A=1,m=f+2*p+d):m=p*(A=-p/f)+d);else if(A<0)A=0,h>=0?(k=0,m=d):-h>=u?(k=1,m=u+2*h+d):m=h*(k=-h/u)+d;else{var M=1/T;m=(k*=M)*(u*k+c*(A*=M)+2*h)+A*(c*k+f*A+2*p)+d}else k<0?(b=f+p)>(x=c+h)?(_=b-x)>=(w=u-2*c+f)?(k=1,A=0,m=u+2*h+d):m=(k=_/w)*(u*k+c*(A=1-k)+2*h)+A*(c*k+f*A+2*p)+d:(k=0,b<=0?(A=1,m=f+2*p+d):p>=0?(A=0,m=d):m=p*(A=-p/f)+d):A<0?(b=u+h)>(x=c+p)?(_=b-x)>=(w=u-2*c+f)?(A=1,k=0,m=f+2*p+d):m=(k=1-(A=_/w))*(u*k+c*A+2*h)+A*(c*k+f*A+2*p)+d:(A=0,b<=0?(k=1,m=u+2*h+d):h>=0?(k=0,m=d):m=h*(k=-h/u)+d):(_=f+p-c-h)<=0?(k=0,A=1,m=f+2*p+d):_>=(w=u-2*c+f)?(k=1,A=0,m=u+2*h+d):m=(k=_/w)*(u*k+c*(A=1-k)+2*h)+A*(c*k+f*A+2*p)+d;var S=1-k-A;for(l=0;l0){var u=t[r-1];if(0===n(s,u)&&a(u)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},6184:function(t){"use strict";var e,r="";t.exports=function(t,n){if("string"!=typeof t)throw new TypeError("expected a string");if(1===n)return t;if(2===n)return t+t;var i=t.length*n;if(e!==t||void 0===e)e=t,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=t),n>>=1,t+=t;return r=(r+=t).substr(0,i)}},8161:function(t,e,r){t.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(t){"use strict";t.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],u=r[1]-n[1],c=t[2]-n[2],f=e[2]-n[2],p=r[2]-n[2],d=a*u,v=o*l,g=o*s,y=i*u,m=i*l,x=a*s,b=c*(d-v)+f*(g-y)+p*(m-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(v))*Math.abs(c)+(Math.abs(g)+Math.abs(y))*Math.abs(f)+(Math.abs(m)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=c(t.length)),e.apply(void 0,t)}function v(t,e,r,n,i,a,o){return function(e,r,s,l,u){switch(arguments.length){case 0:case 1:return 0;case 2:return n(e,r);case 3:return i(e,r,s);case 4:return a(e,r,s,l);case 5:return o(e,r,s,l,u)}for(var c=new Array(arguments.length),f=0;f0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);return!(s>0&&l>0||s<0&&l<0)&&(0!==a||0!==o||0!==s||0!==l||function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),u=r[i],c=n[i],f=Math.min(u,c);if(Math.max(u,c)=n?(i=f,(l+=1)=n?(i=f,(l+=1)>1,u=e[2*l+1];if(u===a)return l;a>1,u=e[2*l+1];if(u===a)return l;a>1,u=e[2*l+1];if(u===a)return l;a0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,1+((t|=t>>>8)|t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},6656:function(t,e,r){"use strict";var n=r(9392),i=r(9521);function a(t,e){var r=t.length,n=t.length-e.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return(s=t[0]+t[1]-e[0]-e[1])||i(t[0],t[1])-i(e[0],e[1]);case 3:var a=t[0]+t[1],o=e[0]+e[1];if(s=a+t[2]-(o+e[2]))return s;var s,l=i(t[0],t[1]),u=i(e[0],e[1]);return(s=i(l,t[2])-i(u,e[2]))||i(l+t[2],a)-i(u+e[2],o);default:var c=t.slice(0);c.sort();var f=e.slice(0);f.sort();for(var h=0;h>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function c(t,e){for(var r=new Array(t.length),i=0,o=r.length;i=t.length||0!==a(t[g],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>c&1&&u.push(i[c]);e.push(u)}return s(e)},e.skeleton=f,e.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=y(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=m(t);if(!(r>=0&&e0){var t=k[0];return g(0,M-1),M-=1,x(0),t}return-1}function w(t,e){var r=k[t];return u[r]===e?t:(u[r]=-1/0,b(t),_(),u[r]=e,b((M+=1)-1))}function T(t){if(!c[t]){c[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),A[e]>=0&&w(A[e],v(e)),A[r]>=0&&w(A[r],v(r))}}var k=[],A=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||u[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=A[e],i=A[r];n!==i&&C.push([n,i])}})),i.unique(i.normalize(C)),{positions:E,edges:C}};var n=r(417),i=r(6656)},6638:function(t,e,r){"use strict";t.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),u=n(r,a,o);if(l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;if(l=n(s,o,a),u=n(s,o,r),l<0){if(u<=0)return l}else if(l>0){if(u>=0)return l}else if(u)return u;return a[0]-s[0]};var n=r(417);function i(t,e){var r,i,a,o;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),u=Math.min(e[0][1],e[1][1]),c=Math.max(e[0][1],e[1][1]);return lc?s-c:l-c}r=e[1],i=e[0]}t[0][1]0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=u(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=u(t.right,e))return l;t=t.left}}return r}function c(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=u(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var c=u(this.slabs[e-1],t);c&&(s?o(c.key,s)>0&&(s=c.key,i=c.value):(i=c.value,s=c.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},4670:function(t,e,r){"use strict";var n=r(9130),i=r(9662);function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l0||i>0&&c<0){var f=o(s,c,l,i);r.push(f),n.push(f.slice())}c<0?n.push(l.slice()):c>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=c}return{positive:r,negative:n}},t.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&u<0)&&r.push(o(i,u,s,n)),u>=0&&r.push(s.slice()),n=u}return r},t.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&u<0)&&r.push(o(i,u,s,n)),u<=0&&r.push(s.slice()),n=u}return r}},8974:function(t,e,r){var n;!function(){"use strict";var i={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 a(t){return s(u(t),arguments)}function o(t,e){return a.apply(null,[t].concat(e||[]))}function s(t,e){var r,n,o,s,l,u,c,f,h,p=1,d=t.length,v="";for(n=0;n=0),s.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,s.width?parseInt(s.width):0);break;case"e":r=s.precision?parseFloat(r).toExponential(s.precision):parseFloat(r).toExponential();break;case"f":r=s.precision?parseFloat(r).toFixed(s.precision):parseFloat(r);break;case"g":r=s.precision?String(Number(r.toPrecision(s.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=s.precision?r.substring(0,s.precision):r;break;case"t":r=String(!!r),r=s.precision?r.substring(0,s.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=s.precision?r.substring(0,s.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=s.precision?r.substring(0,s.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}i.json.test(s.type)?v+=r:(!i.number.test(s.type)||f&&!s.sign?h="":(h=f?"+":"-",r=r.toString().replace(i.sign,"")),u=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",c=s.width-(h+r).length,l=s.width&&c>0?u.repeat(c):"",v+=s.align?h+r+l:"0"===u?h+l+r:l+h+r)}return v}var l=Object.create(null);function u(t){if(l[t])return l[t];for(var e,r=t,n=[],a=0;r;){if(null!==(e=i.text.exec(r)))n.push(e[0]);else if(null!==(e=i.modulo.exec(r)))n.push("%");else{if(null===(e=i.placeholder.exec(r)))throw new SyntaxError("[sprintf] unexpected placeholder");if(e[2]){a|=1;var o=[],s=e[2],u=[];if(null===(u=i.key.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(o.push(u[1]);""!==(s=s.substring(u[0].length));)if(null!==(u=i.key_access.exec(s)))o.push(u[1]);else{if(null===(u=i.index_access.exec(s)))throw new SyntaxError("[sprintf] failed to parse named argument key");o.push(u[1])}e[2]=o}else a|=2;if(3===a)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:e[0],param_no:e[1],keys:e[2],sign:e[3],pad_char:e[4],align:e[5],width:e[6],precision:e[7],type:e[8]})}r=r.substring(e[0].length)}return l[t]=n}e.sprintf=a,e.vsprintf=o,"undefined"!=typeof window&&(window.sprintf=a,window.vsprintf=o,void 0===(n=function(){return{sprintf:a,vsprintf:o}}.call(e,r,e,t))||(t.exports=n))}()},4162:function(t,e,r){"use strict";t.exports=function(t,e){if(t.dimension<=0)return{positions:[],cells:[]};if(1===t.dimension)return function(t,e){for(var r=i(t,e),n=r.length,a=new Array(n),o=new Array(n),s=0;sn|0},vertex:function(t,e,r,n,i,a,o,s,l,u,c,f,h){var p=(o<<0)+(s<<1)+(l<<2)+(u<<3)|0;if(0!==p&&15!==p)switch(p){case 0:case 15:c.push([t-.5,e-.5]);break;case 1:c.push([t-.25-.25*(n+r-2*h)/(r-n),e-.25-.25*(i+r-2*h)/(r-i)]);break;case 2:c.push([t-.75-.25*(-n-r+2*h)/(n-r),e-.25-.25*(a+n-2*h)/(n-a)]);break;case 3:c.push([t-.5,e-.5-.5*(i+r+a+n-4*h)/(r-i+n-a)]);break;case 4:c.push([t-.25-.25*(a+i-2*h)/(i-a),e-.75-.25*(-i-r+2*h)/(i-r)]);break;case 5:c.push([t-.5-.5*(n+r+a+i-4*h)/(r-n+i-a),e-.5]);break;case 6:c.push([t-.5-.25*(-n-r+a+i)/(n-r+i-a),e-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:c.push([t-.75-.25*(a+i-2*h)/(i-a),e-.75-.25*(a+n-2*h)/(n-a)]);break;case 8:c.push([t-.75-.25*(-a-i+2*h)/(a-i),e-.75-.25*(-a-n+2*h)/(a-n)]);break;case 9:c.push([t-.5-.25*(n+r+-a-i)/(r-n+a-i),e-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:c.push([t-.5-.5*(-n-r-a-i+4*h)/(n-r+a-i),e-.5]);break;case 11:c.push([t-.25-.25*(-a-i+2*h)/(a-i),e-.75-.25*(i+r-2*h)/(r-i)]);break;case 12:c.push([t-.5,e-.5-.5*(-i-r-a-n+4*h)/(i-r+a-n)]);break;case 13:c.push([t-.75-.25*(n+r-2*h)/(r-n),e-.25-.25*(-a-n+2*h)/(a-n)]);break;case 14:c.push([t-.25-.25*(-n-r+2*h)/(n-r),e-.25-.25*(-i-r+2*h)/(i-r)])}},cell:function(t,e,r,n,i,a,o,s,l){i?s.push([t,e]):s.push([e,t])}});return function(t,e){var r=[],i=[];return n(t,r,i,e),{positions:r,cells:i}}}},o={}},6946:function(t,e,r){"use strict";t.exports=function t(e,r,i){i=i||{};var a=o[e];a||(a=o[e]={" ":{data:new Float32Array(0),shape:.2}});var s=a[r];if(!s)if(r.length<=1||!/\d/.test(r))s=a[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o0&&(f+=.02);var p=new Float32Array(c),d=0,v=-.5*f;for(h=0;hMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),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 u=0;u<16;++u)this.computedMatrix[u]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[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 e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),c=0;for(a=0;a<3;++a)r[a]-=e[a]*i/n,c+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(c);for(a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],v=this.computedAngle[1],g=Math.cos(d),y=Math.sin(d),m=Math.cos(v),x=Math.sin(v),b=this.computedCenter,_=g*m,w=y*m,T=x,k=-g*x,A=-y*x,M=m,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var L=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+A*h[a]+M*e[a],E[4*a+2]=L,E[4*a+3]=0}var C=E[1],P=E[5],O=E[9],I=E[2],D=E[6],z=E[10],R=P*z-O*D,F=O*I-C*z,B=C*D-P*I,N=u(R,F,B);for(R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B,a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){c=0;for(var j=0;j<3;++j)c+=E[a+4*j]*S[j];E[12+a]=-c}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,u=0;u<3;++u)i[4*u]=o[u],i[4*u+1]=s[u],i[4*u+2]=l[u];for(a(i,i,n,d),u=0;u<3;++u)o[u]=i[4*u],s[u]=i[4*u+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=u(a,o,s);a/=l,o/=l,s/=l;var c=i[0],f=i[4],h=i[8],p=c*a+f*o+h*s,d=u(c-=a*p,f-=o*p,h-=s*p),v=(c/=d)*e+a*r,g=(f/=d)*e+o*r,y=(h/=d)*e+s*r;this.center.move(t,v,g,y);var m=Math.exp(this.computedRadius[0]);m=Math.max(1e-4,m+n),this.radius.set(t,Math.log(m))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),v=Math.max(h,p,d);h===v?(s=s<0?-1:1,l=f=0):d===v?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var g=u(s,l,f);s/=g,l/=g,f/=g}var y,m,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=u(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),A=f*(x/=T)-s*_,M=s*b-l*x,S=u(k,A,M);if(k/=S,A/=S,M/=S,this.center.jump(t,q,G,Z),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],L=e[5],C=e[9],P=E*x+L*b+C*_,O=E*k+L*A+C*M;y=R<0?-Math.PI/2:Math.PI/2,m=Math.atan2(O,P)}else{var I=e[2],D=e[6],z=e[10],R=I*s+D*l+z*f,F=I*x+D*b+z*_,B=I*k+D*A+z*M;y=Math.asin(c(R)),m=Math.atan2(B,F)}this.angle.jump(t,m,y),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var H=V[15],q=V[12]/H,G=V[13]/H,Z=V[14]/H,Y=Math.exp(this.computedRadius[0]);this.center.jump(t,q-N*Y,G-j*Y,Z-U*Y)},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,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=u(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=u(l,f,h);if(!(p<1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,v=d[0],g=d[1],y=d[2],m=i*v+a*g+o*y,x=u(v-=m*i,g-=m*a,y-=m*o);if(!(x<.01&&(x=u(v=a*h-o*f,g=o*l-i*h,y=i*f-a*l))<1e-6)){v/=x,g/=x,y/=x,this.up.set(t,i,a,o),this.right.set(t,v,g,y),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*y-o*g,_=o*v-i*y,w=i*g-a*v,T=u(b,_,w),k=i*l+a*f+o*h,A=v*l+g*f+y*h,M=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(c(k)),E=Math.atan2(M,A),L=this.angle._state,C=L[L.length-1],P=L[L.length-2];C%=2*Math.PI;var O=Math.abs(C+2*Math.PI-E),I=Math.abs(C-E),D=Math.abs(C-2*Math.PI-E);O0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function v(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function y(t){return new Int8Array(p(t),0,t)}function m(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}e.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);c[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){f[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return d(t);case"uint16":return v(t);case"uint32":return g(t);case"int8":return y(t);case"int16":return m(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return k(t);case"biguint64":return T(t);case"buffer":return M(t);case"data":case"dataview":return A(t);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=d,e.mallocUint16=v,e.mallocUint32=g,e.mallocInt8=y,e.mallocInt16=m,e.mallocInt32=x,e.mallocFloat32=e.mallocFloat=b,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=T,e.mallocBigInt64=k,e.mallocDataView=A,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)u.UINT8[t].length=0,u.UINT16[t].length=0,u.UINT32[t].length=0,u.INT8[t].length=0,u.INT16[t].length=0,u.INT32[t].length=0,u.FLOAT[t].length=0,u.DOUBLE[t].length=0,u.BIGUINT64[t].length=0,u.BIGINT64[t].length=0,u.UINT8C[t].length=0,c[t].length=0,f[t].length=0}},1731:function(t){"use strict";function e(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",d(function(t,e,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(v=0;v-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(L(),"?px "),m*=Math.pow(.75,l-s),n=n.replace("?px ",L())),y+=.25*_*(l-s)}if(!0===o.superscripts){var f=t.indexOf("+"),h=r.indexOf("+"),p=f>-1?parseInt(t[1+f]):0,d=h>-1?parseInt(r[1+h]):0;p!==d&&(n=n.replace(L(),"?px "),m*=Math.pow(.75,d-p),n=n.replace("?px ",L())),y-=.25*_*(d-p)}if(!0===o.bolds){var v=t.indexOf(u)>-1,g=r.indexOf(u)>-1;!v&&g&&(n=x?n.replace("italic ","italic bold "):"bold "+n),v&&!g&&(n=n.replace("bold ",""))}if(!0===o.italics){var x=t.indexOf(c)>-1,b=r.indexOf(c)>-1;!x&&b&&(n="italic "+n),x&&!b&&(n=n.replace("italic ",""))}e.font=n}for(d=0;d",a="",o=i.length,s=a.length,l="+"===e[0]||"-"===e[0],u=0,c=-s;u>-1&&-1!==(u=r.indexOf(i,u))&&-1!==(c=r.indexOf(a,u+o))&&!(c<=u);){for(var f=u;f=c)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=u+o,d=r.substr(p,c-p).indexOf(i);u=-1!==d?d:c+s}return n}function h(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function p(t,e,r,n){var i=h(t,n),a=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l=0?e[a]:i}))},has___:{value:x((function(e){var n=m(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:x((function(n,i){var a,o=m(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this}))},delete___:{value:x((function(n){var i,a,o=m(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0||(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,0))}))}})};v.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof v||b();var t,n=new r,i=void 0,a=!1;return t=e?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new v),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new v),i.set___(t,e)}else n.set(t,e);return this},Object.create(v.prototype,{get___:{value:x((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:x((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:x(t)},delete___:{value:x((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:x((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}e&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=v.prototype,t.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),t.exports=v)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function y(t){return!(t.substr(0,l.length)==l&&"___"===t.substr(t.length-3))}function m(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[u];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,u,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function x(t){return t.prototype=null,Object.freeze(t)}function b(){p||"undefined"==typeof console||(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},9222:function(t,e,r){var n=r(7178);t.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},7178:function(t){t.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},4037:function(t,e,r){var n=r(9222);t.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},6183:function(t){"use strict";t.exports=function(t){var e={};return function(r,n,i){var a=r.dtype,o=r.order,s=[a,o.join()].join(),l=e[s];return l||(e[s]=l=t([a,o])),l(r.shape.slice(0),r.data,r.stride,0|r.offset,n,i)}}(function(){return function(t,e,r,n,i,a){var o=t[0],s=r[0],l=[0],u=s;n|=0;var c=0,f=s;for(c=0;c=0!=p>=0&&i.push(l[0]+.5+.5*(h+p)/(h-p)),n+=f,++l[0]}}}.bind(void 0,{funcName:"zeroCrossings"}))},9584:function(t,e,r){"use strict";t.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=r(6183)},6601:function(){}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={id:n,loaded:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}return r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.nmd=function(t){return t.paths=[],t.children||(t.children=[]),t},r(7386)}()},t.exports=n()},12856:function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;rp)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,v.prototype),e}function v(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return m(t)}return g(t,e,r)}function g(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!v.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|w(t,e),n=d(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(rt(t,Uint8Array)){var e=new Uint8Array(t);return b(e.buffer,e.byteOffset,e.byteLength)}return x(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(t));if(rt(t,ArrayBuffer)||t&&rt(t.buffer,ArrayBuffer))return b(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(rt(t,SharedArrayBuffer)||t&&rt(t.buffer,SharedArrayBuffer)))return b(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return v.from(n,e,r);var i=function(t){if(v.isBuffer(t)){var e=0|_(t.length),r=d(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||nt(t.length)?d(0):x(t):"Buffer"===t.type&&Array.isArray(t.data)?x(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return v.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+u(t))}function y(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function m(t){return y(t),d(t<0?0:0|_(t))}function x(t){for(var e=t.length<0?0:0|_(t.length),r=d(e),n=0;n=p)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|t}function w(t,e){if(v.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||rt(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+u(t));var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return tt(t).length;default:if(i)return n?-1:Q(t).length;e=(""+e).toLowerCase(),i=!0}}function T(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return F(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return z(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return O(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function k(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function A(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),nt(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=v.from(e,n)),v.isBuffer(e))return 0===e.length?-1:M(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):M(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a,o=e.length;for(n>o/2&&(n=o/2),a=0;a>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function O(t,e,r){return 0===e&&r===t.length?c.fromByteArray(t):c.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:a>223?3:a>191?2:1;if(i+s<=r){var l=void 0,u=void 0,c=void 0,f=void 0;switch(s){case 1:a<128&&(o=a);break;case 2:128==(192&(l=t[i+1]))&&(f=(31&a)<<6|63&l)>127&&(o=f);break;case 3:l=t[i+1],u=t[i+2],128==(192&l)&&128==(192&u)&&(f=(15&a)<<12|(63&l)<<6|63&u)>2047&&(f<55296||f>57343)&&(o=f);break;case 4:l=t[i+1],u=t[i+2],c=t[i+3],128==(192&l)&&128==(192&u)&&128==(192&c)&&(f=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c)>65535&&f<1114112&&(o=f)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){var e=t.length;if(e<=D)return String.fromCharCode.apply(String,t);for(var r="",n=0;nn.length?(v.isBuffer(a)||(a=v.from(a)),a.copy(n,i)):Uint8Array.prototype.set.call(n,a,i);else{if(!v.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},v.byteLength=w,v.prototype._isBuffer=!0,v.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;er&&(t+=" ... "),""},h&&(v.prototype[h]=v.prototype.inspect),v.prototype.compare=function(t,e,r,n,i){if(rt(t,Uint8Array)&&(t=v.from(t,t.offset,t.byteLength)),!v.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+u(t));if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),l=this.slice(n,i),c=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":case"latin1":case"binary":return L(this,t,e,r);case"base64":return C(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},v.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var D=4096;function z(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,a){if(!v.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function U(t,e,r,n,i){X(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a,a>>=8,t[r++]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,r}function V(t,e,r,n,i){X(e,n,i,t,r,7);var a=Number(e&BigInt(4294967295));t[r+7]=a,a>>=8,t[r+6]=a,a>>=8,t[r+5]=a,a>>=8,t[r+4]=a;var o=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=o,o>>=8,t[r+2]=o,o>>=8,t[r+1]=o,o>>=8,t[r]=o,r+8}function H(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,0,r,4),f.write(t,e,r,n,23,4),r+4}function G(t,e,r,n,i){return e=+e,r>>>=0,i||H(t,0,r,8),f.write(t,e,r,n,52,8),r+8}v.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},v.prototype.readUint8=v.prototype.readUInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),this[t]},v.prototype.readUint16LE=v.prototype.readUInt16LE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]|this[t+1]<<8},v.prototype.readUint16BE=v.prototype.readUInt16BE=function(t,e){return t>>>=0,e||N(t,2,this.length),this[t]<<8|this[t+1]},v.prototype.readUint32LE=v.prototype.readUInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},v.prototype.readUint32BE=v.prototype.readUInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},v.prototype.readBigUInt64LE=at((function(t){J(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=e+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,24),i=this[++t]+this[++t]*Math.pow(2,8)+this[++t]*Math.pow(2,16)+r*Math.pow(2,24);return BigInt(n)+(BigInt(i)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=e*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t],i=this[++t]*Math.pow(2,24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+r;return(BigInt(n)<>>=0,e>>>=0,r||N(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},v.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||N(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},v.prototype.readInt8=function(t,e){return t>>>=0,e||N(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},v.prototype.readInt16LE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt16BE=function(t,e){t>>>=0,e||N(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},v.prototype.readInt32LE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},v.prototype.readInt32BE=function(t,e){return t>>>=0,e||N(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},v.prototype.readBigInt64LE=at((function(t){J(t>>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=this[t+4]+this[t+5]*Math.pow(2,8)+this[t+6]*Math.pow(2,16)+(r<<24);return(BigInt(n)<>>=0,"offset");var e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);var n=(e<<24)+this[++t]*Math.pow(2,16)+this[++t]*Math.pow(2,8)+this[++t];return(BigInt(n)<>>=0,e||N(t,4,this.length),f.read(this,t,!0,23,4)},v.prototype.readFloatBE=function(t,e){return t>>>=0,e||N(t,4,this.length),f.read(this,t,!1,23,4)},v.prototype.readDoubleLE=function(t,e){return t>>>=0,e||N(t,8,this.length),f.read(this,t,!0,52,8)},v.prototype.readDoubleBE=function(t,e){return t>>>=0,e||N(t,8,this.length),f.read(this,t,!1,52,8)},v.prototype.writeUintLE=v.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},v.prototype.writeUint8=v.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},v.prototype.writeUint16LE=v.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeUint16BE=v.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeUint32LE=v.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},v.prototype.writeUint32BE=v.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigUInt64LE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return U(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeBigUInt64BE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return V(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),v.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},v.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},v.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},v.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},v.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},v.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},v.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},v.prototype.writeBigInt64LE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return U(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeBigInt64BE=at((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return V(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),v.prototype.writeFloatLE=function(t,e,r){return q(this,t,e,!0,r)},v.prototype.writeFloatBE=function(t,e,r){return q(this,t,e,!1,r)},v.prototype.writeDoubleLE=function(t,e,r){return G(this,t,e,!0,r)},v.prototype.writeDoubleBE=function(t,e,r){return G(this,t,e,!1,r)},v.prototype.copy=function(t,e,r,n){if(!v.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a=n+4;r-=3)e="_".concat(t.slice(r-3,r)).concat(e);return"".concat(t.slice(0,r)).concat(e)}function X(t,e,r,n,i,a){if(t>r||t3?0===e||e===BigInt(0)?">= 0".concat(s," and < 2").concat(s," ** ").concat(8*(a+1)).concat(s):">= -(2".concat(s," ** ").concat(8*(a+1)-1).concat(s,") and < 2 ** ")+"".concat(8*(a+1)-1).concat(s):">= ".concat(e).concat(s," and <= ").concat(r).concat(s),new Z.ERR_OUT_OF_RANGE("value",o,t)}!function(t,e,r){J(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||K(e,t.length-(r+1))}(n,i,a)}function J(t,e){if("number"!=typeof t)throw new Z.ERR_INVALID_ARG_TYPE(e,"number",t)}function K(t,e,r){if(Math.floor(t)!==t)throw J(t,r),new Z.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new Z.ERR_BUFFER_OUT_OF_BOUNDS;throw new Z.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(e),t)}Y("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?"".concat(t," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),Y("ERR_INVALID_ARG_TYPE",(function(t,e){return'The "'.concat(t,'" argument must be of type number. Received type ').concat(u(e))}),TypeError),Y("ERR_OUT_OF_RANGE",(function(t,e,r){var n='The value of "'.concat(t,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>Math.pow(2,32)?i=W(String(r)):"bigint"==typeof r&&(i=String(r),(r>Math.pow(BigInt(2),BigInt(32))||r<-Math.pow(BigInt(2),BigInt(32)))&&(i=W(i)),i+="n"),n+" It must be ".concat(e,". Received ").concat(i)}),RangeError);var $=/[^+/0-9A-Za-z-_]/g;function Q(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function tt(t){return c.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace($,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function et(t,e,r,n){var i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function rt(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function nt(t){return t!=t}var it=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}();function at(t){return"undefined"==typeof BigInt?ot:t}function ot(){throw new Error("BigInt not supported")}},35791:function(t){"use strict";t.exports=i,t.exports.isMobile=i,t.exports.default=i;var e=/(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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(t){t||(t={});var i=t.ua;if(i||"undefined"==typeof navigator||(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;var a=e.test(i)&&!r.test(i)||!!t.tablet&&n.test(i);return!a&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},86781:function(t,e,r){"use strict";r.r(e),r.d(e,{sankeyCenter:function(){return h},sankeyCircular:function(){return L},sankeyJustify:function(){return f},sankeyLeft:function(){return u},sankeyRight:function(){return c}});var n=r(33064),i=r(15140),a=r(45879),o=r(2502),s=r.n(o);function l(t){return t.target.depth}function u(t){return t.depth}function c(t,e){return e-1-t.height}function f(t,e){return t.sourceLinks.length?t.depth:e-1}function h(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?(0,n.VV)(t.sourceLinks,l)-1:0}function p(t){return function(){return t}}var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function v(t,e){return y(t.source,e.source)||t.index-e.index}function g(t,e){return y(t.target,e.target)||t.index-e.index}function y(t,e){return t.partOfCycle===e.partOfCycle?t.y0-e.y0:"top"===t.circularLinkType||"bottom"===e.circularLinkType?-1:1}function m(t){return t.value}function x(t){return(t.y0+t.y1)/2}function b(t){return x(t.source)}function _(t){return x(t.target)}function w(t){return t.index}function T(t){return t.nodes}function k(t){return t.links}function A(t,e){var r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function M(t,e){return e(t)}var S=25,E=10;function L(){var t,e,r=0,a=0,o=1,s=1,l=24,u=w,c=f,h=T,M=k,L=32,O=2,D=null;function z(){var t={nodes:h.apply(null,arguments),links:M.apply(null,arguments)};F(t),C(t,0,D),B(t),N(t),P(t,u),j(t,L,u),U(t);for(var e=4,r=0;r0?e+S+E:e,bottom:r=r>0?r+S+E:r,left:a=a>0?a+S+E:a,right:i=i>0?i+S+E:i}}(u),d=function(t,e){var i=(0,n.Fp)(t.nodes,(function(t){return t.column})),u=o-r,c=s-a,f=u/(u+e.right+e.left),h=c/(c+e.top+e.bottom);return r=r*f+e.left,o=0==e.right?o:o*f,a=a*h+e.top,s*=h,t.nodes.forEach((function(t){t.x0=r+t.column*((o-r-l)/i),t.x1=t.x0+l})),h}(u,p);f*=d,u.links.forEach((function(t){t.width=t.value*f})),h.forEach((function(t){var e=t.length;t.forEach((function(t,r){t.depth==h.length-1&&1==e||0==t.depth&&1==e?(t.y0=s/2-t.value*f,t.y1=t.y0+t.value*f):t.partOfCycle?0==I(t,i)?(t.y0=s/2+r,t.y1=t.y0+t.value*f):"top"==t.circularLinkType?(t.y0=a+r,t.y1=t.y0+t.value*f):(t.y0=s-t.value*f-r,t.y1=t.y0+t.value*f):0==p.top||0==p.bottom?(t.y0=(s-a)/e*r,t.y1=t.y0+t.value*f):(t.y0=(s-a)/2-e/2+r,t.y1=t.y0+t.value*f)}))}))}(f),g();for(var p=1,d=c;d>0;--d)v(p*=.99,f),g();function v(t,e){var r=h.length;h.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var l;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&I(i,e)>0);else if(0==o&&1==a)l=i.y1-i.y0,i.y0=s/2-l/2,i.y1=s/2+l/2;else if(o==r-1&&1==a)l=i.y1-i.y0,i.y0=s/2-l/2,i.y1=s/2+l/2;else{var u=(0,n.J6)(i.sourceLinks,_),c=(0,n.J6)(i.targetLinks,b),f=((u&&c?(u+c)/2:u||c)-x(i))*t;i.y0+=f,i.y1+=f}}))}))}function g(){h.forEach((function(e){var r,n,i,o=a,l=e.length;for(e.sort(y),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+t;if((n=o-t-s)>0)for(o=r.y0-=n,r.y1-=n,i=l-2;i>=0;--i)(n=(r=e[i]).y1+t-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}function U(t){t.nodes.forEach((function(t){t.sourceLinks.sort(g),t.targetLinks.sort(v)})),t.nodes.forEach((function(t){var e=t.y0,r=e,n=t.y1,i=n;t.sourceLinks.forEach((function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)})),t.targetLinks.forEach((function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)}))}))}return z.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:p(t),z):u},z.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:p(t),z):c},z.nodeWidth=function(t){return arguments.length?(l=+t,z):l},z.nodePadding=function(e){return arguments.length?(t=+e,z):t},z.nodes=function(t){return arguments.length?(h="function"==typeof t?t:p(t),z):h},z.links=function(t){return arguments.length?(M="function"==typeof t?t:p(t),z):M},z.size=function(t){return arguments.length?(r=a=0,o=+t[0],s=+t[1],z):[o-r,s-a]},z.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],a=+t[0][1],s=+t[1][1],z):[[r,a],[o,s]]},z.iterations=function(t){return arguments.length?(L=+t,z):L},z.circularLinkGap=function(t){return arguments.length?(O=+t,z):O},z.nodePaddingRatio=function(t){return arguments.length?(e=+t,z):e},z.sortNodes=function(t){return arguments.length?(D=t,z):D},z.update=function(t){return P(t,u),U(t),t.links.forEach((function(t){t.circular&&(t.circularLinkType=t.y0+t.y11||i>1)}function z(t,e,r){return t.sort(F),t.forEach((function(n,i){var a,o,s=0;if($(n,r)&&D(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var u=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=u>s?u:s}n.circularPathData.verticalBuffer=s+n.width/2}})),t}function R(t,e,r,i){var o=(0,n.VV)(t.links,(function(t){return t.source.y0}));t.links.forEach((function(t){t.circular&&(t.circularPathData={})})),z(t.links.filter((function(t){return"top"==t.circularLinkType})),e,i),z(t.links.filter((function(t){return"bottom"==t.circularLinkType})),e,i),t.links.forEach((function(n){if(n.circular){if(n.circularPathData.arcRadius=n.width+E,n.circularPathData.leftNodeBuffer=5,n.circularPathData.rightNodeBuffer=5,n.circularPathData.sourceWidth=n.source.x1-n.source.x0,n.circularPathData.sourceX=n.source.x0+n.circularPathData.sourceWidth,n.circularPathData.targetX=n.target.x0,n.circularPathData.sourceY=n.y0,n.circularPathData.targetY=n.y1,$(n,i)&&D(n))n.circularPathData.leftSmallArcRadius=E+n.width/2,n.circularPathData.leftLargeArcRadius=E+n.width/2,n.circularPathData.rightSmallArcRadius=E+n.width/2,n.circularPathData.rightLargeArcRadius=E+n.width/2,"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=n.source.y1+S+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=n.source.y0-S-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius);else{var s=n.source.column,l=n.circularLinkType,u=t.links.filter((function(t){return t.source.column==s&&t.circularLinkType==l}));"bottom"==n.circularLinkType?u.sort(N):u.sort(B);var c=0;u.forEach((function(t,r){t.circularLinkID==n.circularLinkID&&(n.circularPathData.leftSmallArcRadius=E+n.width/2+c,n.circularPathData.leftLargeArcRadius=E+n.width/2+r*e+c),c+=t.width})),s=n.target.column,u=t.links.filter((function(t){return t.target.column==s&&t.circularLinkType==l})),"bottom"==n.circularLinkType?u.sort(U):u.sort(j),c=0,u.forEach((function(t,r){t.circularLinkID==n.circularLinkID&&(n.circularPathData.rightSmallArcRadius=E+n.width/2+c,n.circularPathData.rightLargeArcRadius=E+n.width/2+r*e+c),c+=t.width})),"bottom"==n.circularLinkType?(n.circularPathData.verticalFullExtent=Math.max(r,n.source.y1,n.target.y1)+S+n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent-n.circularPathData.rightLargeArcRadius):(n.circularPathData.verticalFullExtent=o-S-n.circularPathData.verticalBuffer,n.circularPathData.verticalLeftInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.leftLargeArcRadius,n.circularPathData.verticalRightInnerExtent=n.circularPathData.verticalFullExtent+n.circularPathData.rightLargeArcRadius)}n.circularPathData.leftInnerExtent=n.circularPathData.sourceX+n.circularPathData.leftNodeBuffer,n.circularPathData.rightInnerExtent=n.circularPathData.targetX-n.circularPathData.rightNodeBuffer,n.circularPathData.leftFullExtent=n.circularPathData.sourceX+n.circularPathData.leftLargeArcRadius+n.circularPathData.leftNodeBuffer,n.circularPathData.rightFullExtent=n.circularPathData.targetX-n.circularPathData.rightLargeArcRadius-n.circularPathData.rightNodeBuffer}if(n.circular)n.path=function(t){return"top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY}(n);else{var f=(0,a.h5)().source((function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]})).target((function(t){return[t.target.x0,t.y1]}));n.path=f(n)}}))}function F(t,e){return V(t)==V(e)?"bottom"==t.circularLinkType?N(t,e):B(t,e):V(e)-V(t)}function B(t,e){return t.y0-e.y0}function N(t,e){return e.y0-t.y0}function j(t,e){return t.y1-e.y1}function U(t,e){return e.y1-t.y1}function V(t){return t.target.column-t.source.column}function H(t){return t.target.x0-t.source.x1}function q(t,e){var r=O(t),n=H(e)/Math.tan(r);return"up"==K(t)?t.y1+n:t.y1-n}function G(t,e){var r=O(t),n=H(e)/Math.tan(r);return"up"==K(t)?t.y1-n:t.y1+n}function Z(t,e,r,n){t.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)t.nodes.forEach((function(o){if(o.column==a){var u,c=s/(l+1),f=Math.pow(1-c,3),h=3*c*Math.pow(1-c,2),p=3*Math.pow(c,2)*(1-c),d=Math.pow(c,3),v=f*i.y0+h*i.y0+p*i.y1+d*i.y1,g=v-i.width/2,y=v+i.width/2;g>o.y0&&ga.y0&&i.y0a.y0&&i.y1a.y1)&&Y(t,u,e,r)}))):(y>o.y0&&yo.y1)&&(u=y-o.y0+10,o=Y(o,u,e,r),t.nodes.forEach((function(t){M(t,n)!=M(o,n)&&t.column==o.column&&t.y0o.y1&&Y(t,u,e,r)})))}}))}}))}function Y(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach((function(t){t.y1=t.y1+e})),t.sourceLinks.forEach((function(t){t.y0=t.y0+e}))),t}function W(t,e,r,n){t.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>e&&(i.y=i.y-(i.y+(i.y1-i.y0)-e));var a=t.links.filter((function(t){return M(t.source,r)==M(i,r)})),o=a.length;o>1&&a.sort((function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!J(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=G(e,t);return t.y1-r}if(e.target.column>t.target.column)return G(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(t){t.y0=s+t.width/2,s+=t.width})),a.forEach((function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort((function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!J(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function $(t,e){return M(t.source,e)==M(t.target,e)}function Q(t,e,r){var i=t.nodes,a=t.links,o=!1,s=!1;if(a.forEach((function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)})),0==o||0==s){var l=(0,n.VV)(i,(function(t){return t.y0})),u=(r-e)/((0,n.Fp)(i,(function(t){return t.y1}))-l);i.forEach((function(t){var e=(t.y1-t.y0)*u;t.y0=(t.y0-l)*u,t.y1=t.y0+e})),a.forEach((function(t){t.y0=(t.y0-l)*u,t.y1=(t.y1-l)*u,t.width=t.width*u}))}}},30838:function(t,e,r){"use strict";r.r(e),r.d(e,{sankey:function(){return w},sankeyCenter:function(){return u},sankeyJustify:function(){return l},sankeyLeft:function(){return o},sankeyLinkHorizontal:function(){return M},sankeyRight:function(){return s}});var n=r(33064),i=r(15140);function a(t){return t.target.depth}function o(t){return t.depth}function s(t,e){return e-1-t.height}function l(t,e){return t.sourceLinks.length?t.depth:e-1}function u(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?(0,n.VV)(t.sourceLinks,a)-1:0}function c(t){return function(){return t}}function f(t,e){return p(t.source,e.source)||t.index-e.index}function h(t,e){return p(t.target,e.target)||t.index-e.index}function p(t,e){return t.y0-e.y0}function d(t){return t.value}function v(t){return(t.y0+t.y1)/2}function g(t){return v(t.source)*t.value}function y(t){return v(t.target)*t.value}function m(t){return t.index}function x(t){return t.nodes}function b(t){return t.links}function _(t,e){var r=t.get(e);if(!r)throw new Error("missing: "+e);return r}function w(){var t=0,e=0,r=1,a=1,o=24,s=8,u=m,w=l,T=x,k=b,A=32;function M(){var t={nodes:T.apply(null,arguments),links:k.apply(null,arguments)};return S(t),E(t),L(t),C(t),P(t),t}function S(t){t.nodes.forEach((function(t,e){t.index=e,t.sourceLinks=[],t.targetLinks=[]}));var e=(0,i.UI)(t.nodes,u);t.links.forEach((function(t,r){t.index=r;var n=t.source,i=t.target;"object"!=typeof n&&(n=t.source=_(e,n)),"object"!=typeof i&&(i=t.target=_(e,i)),n.sourceLinks.push(t),i.targetLinks.push(t)}))}function E(t){t.nodes.forEach((function(t){t.value=Math.max((0,n.Sm)(t.sourceLinks,d),(0,n.Sm)(t.targetLinks,d))}))}function L(e){var n,i,a;for(n=e.nodes,i=[],a=0;n.length;++a,n=i,i=[])n.forEach((function(t){t.depth=a,t.sourceLinks.forEach((function(t){i.indexOf(t.target)<0&&i.push(t.target)}))}));for(n=e.nodes,i=[],a=0;n.length;++a,n=i,i=[])n.forEach((function(t){t.height=a,t.targetLinks.forEach((function(t){i.indexOf(t.source)<0&&i.push(t.source)}))}));var s=(r-t-o)/(a-1);e.nodes.forEach((function(e){e.x1=(e.x0=t+Math.max(0,Math.min(a-1,Math.floor(w.call(null,e,a))))*s)+o}))}function C(t){var r=(0,i.b1)().key((function(t){return t.x0})).sortKeys(n.j2).entries(t.nodes).map((function(t){return t.values}));!function(){var i=(0,n.Fp)(r,(function(t){return t.length})),o=.6666666666666666*(a-e)/(i-1);s>o&&(s=o);var l=(0,n.VV)(r,(function(t){return(a-e-(t.length-1)*s)/(0,n.Sm)(t,d)}));r.forEach((function(t){t.forEach((function(t,e){t.y1=(t.y0=e)+t.value*l}))})),t.links.forEach((function(t){t.width=t.value*l}))}(),f();for(var o=1,l=A;l>0;--l)c(o*=.99),f(),u(o),f();function u(t){r.forEach((function(e){e.forEach((function(e){if(e.targetLinks.length){var r=((0,n.Sm)(e.targetLinks,g)/(0,n.Sm)(e.targetLinks,d)-v(e))*t;e.y0+=r,e.y1+=r}}))}))}function c(t){r.slice().reverse().forEach((function(e){e.forEach((function(e){if(e.sourceLinks.length){var r=((0,n.Sm)(e.sourceLinks,y)/(0,n.Sm)(e.sourceLinks,d)-v(e))*t;e.y0+=r,e.y1+=r}}))}))}function f(){r.forEach((function(t){var r,n,i,o=e,l=t.length;for(t.sort(p),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+s;if((n=o-s-a)>0)for(o=r.y0-=n,r.y1-=n,i=l-2;i>=0;--i)(n=(r=t[i]).y1+s-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}function P(t){t.nodes.forEach((function(t){t.sourceLinks.sort(h),t.targetLinks.sort(f)})),t.nodes.forEach((function(t){var e=t.y0,r=e;t.sourceLinks.forEach((function(t){t.y0=e+t.width/2,e+=t.width})),t.targetLinks.forEach((function(t){t.y1=r+t.width/2,r+=t.width}))}))}return M.update=function(t){return P(t),t},M.nodeId=function(t){return arguments.length?(u="function"==typeof t?t:c(t),M):u},M.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:c(t),M):w},M.nodeWidth=function(t){return arguments.length?(o=+t,M):o},M.nodePadding=function(t){return arguments.length?(s=+t,M):s},M.nodes=function(t){return arguments.length?(T="function"==typeof t?t:c(t),M):T},M.links=function(t){return arguments.length?(k="function"==typeof t?t:c(t),M):k},M.size=function(n){return arguments.length?(t=e=0,r=+n[0],a=+n[1],M):[r-t,a-e]},M.extent=function(n){return arguments.length?(t=+n[0][0],r=+n[1][0],e=+n[0][1],a=+n[1][1],M):[[t,e],[r,a]]},M.iterations=function(t){return arguments.length?(A=+t,M):A},M}var T=r(45879);function k(t){return[t.source.x1,t.y0]}function A(t){return[t.target.x0,t.y1]}function M(){return(0,T.h5)().source(k).target(A)}},39898:function(t,e,r){var n,i;(function(){var a={version:"3.8.0"},o=[].slice,s=function(t){return o.call(t)},l=self.document;function u(t){return t&&(t.ownerDocument||t.document||t).documentElement}function c(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(t){s=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var f=this.Element.prototype,h=f.setAttribute,p=f.setAttributeNS,d=this.CSSStyleDeclaration.prototype,v=d.setProperty;f.setAttribute=function(t,e){h.call(this,t,e+"")},f.setAttributeNS=function(t,e,r){p.call(this,t,e,r+"")},d.setProperty=function(t,e,r){v.call(this,t,e+"",r)}}function g(t,e){return te?1:t>=e?0:NaN}function y(t){return null===t?NaN:+t}function m(t){return!isNaN(t)}function x(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}a.ascending=g,a.descending=function(t,e){return et?1:e>=t?0:NaN},a.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},a.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},a.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},a.deviation=function(){var t=a.variance.apply(this,arguments);return t?Math.sqrt(t):t};var b=x(g);function _(t){return t.length}a.bisectLeft=b.left,a.bisect=a.bisectRight=b.right,a.bisector=function(t){return x(1===t.length?function(e,r){return g(t(e),r)}:t)},a.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},a.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},a.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var w=Math.abs;function T(t){for(var e=1;t*e%1;)e*=10;return e}function k(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function A(){this._=Object.create(null)}function M(t){return"__proto__"==(t+="")||"\0"===t[0]?"\0"+t:t}function S(t){return"\0"===(t+="")[0]?t.slice(1):t}function E(t){return M(t)in this._}function L(t){return(t=M(t))in this._&&delete this._[t]}function C(){var t=[];for(var e in this._)t.push(S(e));return t}function P(){var t=0;for(var e in this._)++t;return t}function O(){for(var t in this._)return!1;return!0}function I(){this._=Object.create(null)}function D(t){return t}function z(t,e,r){return function(){var n=r.apply(e,arguments);return n===e?t:n}}function R(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var r=0,n=F.length;re;)i.push(n/a);else for(;(n=t+r*++o)=n.length)return e?e.call(r,a):t?a.sort(t):a;for(var l,u,c,f,h=-1,p=a.length,d=n[s++],v=new A;++h=n.length)return t;var r=[],a=i[e++];return t.forEach((function(t,n){r.push({key:t,values:s(n,e)})})),a?r.sort((function(t,e){return a(t.key,e.key)})):r}return r.map=function(t,e){return o(e,t,0)},r.entries=function(t){return s(o(a.map,t,0),0)},r.key=function(t){return n.push(t),r},r.sortKeys=function(t){return i[n.length-1]=t,r},r.sortValues=function(e){return t=e,r},r.rollup=function(t){return e=t,r},r},a.set=function(t){var e=new I;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},a.event=null,a.requote=function(t){return t.replace(q,"\\$&")};var q=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,G={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function Z(t){return G(t,J),t}var Y=function(t,e){return e.querySelector(t)},W=function(t,e){return e.querySelectorAll(t)},X=function(t,e){var r=t.matches||t[R(t,"matchesSelector")];return X=function(t,e){return r.call(t,e)},X(t,e)};"function"==typeof Sizzle&&(Y=function(t,e){return Sizzle(t,e)[0]||null},W=Sizzle,X=Sizzle.matchesSelector),a.selection=function(){return a.select(l.documentElement)};var J=a.selection.prototype=[];function K(t){return"function"==typeof t?t:function(){return Y(t,this)}}function $(t){return"function"==typeof t?t:function(){return W(t,this)}}J.select=function(t){var e,r,n,i,a=[];t=K(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),tt.hasOwnProperty(r)?{space:tt[r],local:t}:t}},J.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node();return(t=a.ns.qualify(t)).local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)}for(e in t)this.each(et(e,t[e]));return this}return this.each(et(t,e))},J.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=it(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},J.sort=function(t){t=pt.apply(this,arguments);for(var e=-1,r=this.length;++e=e&&(e=i+1);!(o=s[e])&&++e0&&(t=t.slice(0,i));var l=xt.get(t);function u(){var e=this[n];e&&(this.removeEventListener(t,e,e.$),delete this[n])}return l&&(t=l,o=_t),i?e?function(){var i=o(e,s(arguments));u.call(this),this.addEventListener(t,this[n]=i,i.$=r),i._=e}:u:e?B:function(){var e,r=new RegExp("^__on([^.]+)"+a.requote(t)+"$");for(var n in this)if(e=n.match(r)){var i=this[n];this.removeEventListener(e[1],i,i.$),delete this[n]}}}a.selection.enter=vt,a.selection.enter.prototype=gt,gt.append=J.append,gt.empty=J.empty,gt.node=J.node,gt.call=J.call,gt.size=J.size,gt.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s1?Ot:t<-1?-Ot:Math.asin(t)}function Rt(t){return((t=Math.exp(t))+1/t)/2}var Ft=Math.SQRT2;a.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],u=e[2],c=s-i,f=l-a,h=c*c+f*f;if(h<1e-12)n=Math.log(u/o)/Ft,r=function(t){return[i+t*c,a+t*f,o*Math.exp(Ft*t*n)]};else{var p=Math.sqrt(h),d=(u*u-o*o+4*h)/(2*o*2*p),v=(u*u-o*o-4*h)/(2*u*2*p),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(v*v+1)-v);n=(y-g)/Ft,r=function(t){var e,r=t*n,s=Rt(g),l=o/(2*p)*(s*(e=Ft*r+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+l*c,a+l*f,o*s/Rt(Ft*r+g)]}}return r.duration=1e3*n,r},a.behavior.zoom=function(){var t,e,r,n,i,o,s,u,f,h={x:0,y:0,k:1},p=[960,500],d=jt,v=250,g=0,y="mousedown.zoom",m="mousemove.zoom",x="mouseup.zoom",b="touchstart.zoom",_=H(w,"zoomstart","zoom","zoomend");function w(t){t.on(y,P).on(Nt+".zoom",I).on("dblclick.zoom",D).on(b,O)}function T(t){return[(t[0]-h.x)/h.k,(t[1]-h.y)/h.k]}function k(t){h.k=Math.max(d[0],Math.min(d[1],t))}function A(t,e){e=function(t){return[t[0]*h.k+h.x,t[1]*h.k+h.y]}(e),h.x+=t[0]-e[0],h.y+=t[1]-e[1]}function M(t,r,n,i){t.__chart__={x:h.x,y:h.y,k:h.k},k(Math.pow(2,i)),A(e=r,n),t=a.select(t),v>0&&(t=t.transition().duration(v)),t.call(w.event)}function S(){s&&s.domain(o.range().map((function(t){return(t-h.x)/h.k})).map(o.invert)),f&&f.domain(u.range().map((function(t){return(t-h.y)/h.k})).map(u.invert))}function E(t){g++||t({type:"zoomstart"})}function L(t){S(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function C(t){--g||(t({type:"zoomend"}),e=null)}function P(){var t=this,e=_.of(t,arguments),r=0,n=a.select(c(t)).on(m,s).on(x,l),i=T(a.mouse(t)),o=kt(t);function s(){r=1,A(a.mouse(t),i),L(e)}function l(){n.on(m,null).on(x,null),o(r),C(e)}$i.call(t),E(e)}function O(){var t,e=this,r=_.of(e,arguments),n={},o=0,s=".zoom-"+a.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],f=a.select(e),p=kt(e);function d(){var r=a.touches(e);return t=h.k,r.forEach((function(t){t.identifier in n&&(n[t.identifier]=T(t))})),r}function v(){var t=a.event.target;a.select(t).on(l,g).on(u,m),c.push(t);for(var r=a.event.changedTouches,s=0,f=r.length;s1){y=p[0];var x=p[1],b=y[0]-x[0],_=y[1]-x[1];o=b*b+_*_}}function g(){var s,l,u,c,f=a.touches(e);$i.call(e);for(var h=0,p=f.length;h360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ie(a(t+120),a(t),a(t-120))}function Gt(t,e,r){return this instanceof Gt?(this.h=+t,this.c=+e,void(this.l=+r)):arguments.length<2?t instanceof Gt?new Gt(t.h,t.c,t.l):te(t instanceof Wt?t.l:(t=fe((t=a.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new Gt(t,e,r)}Ht.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,this.l/t)},Ht.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Vt(this.h,this.s,t*this.l)},Ht.rgb=function(){return qt(this.h,this.s,this.l)},a.hcl=Gt;var Zt=Gt.prototype=new Ut;function Yt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Wt(r,Math.cos(t*=It)*e,Math.sin(t)*e)}function Wt(t,e,r){return this instanceof Wt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Wt?new Wt(t.l,t.a,t.b):t instanceof Gt?Yt(t.h,t.c,t.l):fe((t=ie(t)).r,t.g,t.b):new Wt(t,e,r)}Zt.brighter=function(t){return new Gt(this.h,this.c,Math.min(100,this.l+Xt*(arguments.length?t:1)))},Zt.darker=function(t){return new Gt(this.h,this.c,Math.max(0,this.l-Xt*(arguments.length?t:1)))},Zt.rgb=function(){return Yt(this.h,this.c,this.l).rgb()},a.lab=Wt;var Xt=18,Jt=.95047,Kt=1.08883,$t=Wt.prototype=new Ut;function Qt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ie(ne(3.2404542*(i=ee(i)*Jt)-1.5371385*(n=1*ee(n))-.4985314*(a=ee(a)*Kt)),ne(-.969266*i+1.8760108*n+.041556*a),ne(.0556434*i-.2040259*n+1.0572252*a))}function te(t,e,r){return t>0?new Gt(Math.atan2(r,e)*Dt,Math.sqrt(e*e+r*r),t):new Gt(NaN,NaN,t)}function ee(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function re(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ne(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ie(t,e,r){return this instanceof ie?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ie?new ie(t.r,t.g,t.b):ue(""+t,ie,qt):new ie(t,e,r)}function ae(t){return new ie(t>>16,t>>8&255,255&t)}function oe(t){return ae(t)+""}$t.brighter=function(t){return new Wt(Math.min(100,this.l+Xt*(arguments.length?t:1)),this.a,this.b)},$t.darker=function(t){return new Wt(Math.max(0,this.l-Xt*(arguments.length?t:1)),this.a,this.b)},$t.rgb=function(){return Qt(this.l,this.a,this.b)},a.rgb=ie;var se=ie.prototype=new Ut;function le(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ue(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(pe(i[0]),pe(i[1]),pe(i[2]))}return(a=de.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function ce(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new Vt(n,i,l)}function fe(t,e,r){var n=re((.4124564*(t=he(t))+.3575761*(e=he(e))+.1804375*(r=he(r)))/Jt),i=re((.2126729*t+.7151522*e+.072175*r)/1);return Wt(116*i-16,500*(n-i),200*(i-re((.0193339*t+.119192*e+.9503041*r)/Kt)))}function he(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function pe(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}se.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=r.call(i,u)}catch(t){return void o.error.call(i,t)}o.load.call(i,t)}else o.error.call(i,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=f:u.onreadystatechange=function(){u.readyState>3&&f()},u.onprogress=function(t){var e=a.event;a.event=t;try{o.progress.call(i,u)}finally{a.event=e}},i.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",i)},i.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",i):e},i.responseType=function(t){return arguments.length?(c=t,i):c},i.response=function(t){return r=t,i},["get","post"].forEach((function(t){i[t]=function(){return i.send.apply(i,[t].concat(s(arguments)))}})),i.send=function(r,n,a){if(2===arguments.length&&"function"==typeof n&&(a=n,n=null),u.open(r,t,!0),null==e||"accept"in l||(l.accept=e+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=e&&u.overrideMimeType&&u.overrideMimeType(e),null!=c&&(u.responseType=c),null!=a&&i.on("error",a).on("load",(function(t){a(null,t)})),o.beforesend.call(i,u),u.send(null==n?null:n),i},i.abort=function(){return u.abort(),i},a.rebind(i,o,"on"),null==n?i:i.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(n))}de.forEach((function(t,e){de.set(t,ae(e))})),a.functor=ve,a.xhr=ge(D),a.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=ye(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=function(e){for(var r={},n=t.length,i=0;i=l)return o;if(i)return i=!1,a;var e=u;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(_e),_e=setTimeout(ke,e)),be=0):(be=1,we(ke))}function Ae(){for(var t=Date.now(),e=me;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Me(){for(var t,e=me,r=1/0;e;)e.c?(e.t1&&(e=t[a[o-2]],r=t[a[o-1]],n=t[s],(r[0]-e[0])*(n[1]-e[1])-(r[1]-e[1])*(n[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}function Ce(t,e){return t[0]-e[0]||t[1]-e[1]}a.timer=function(){Te.apply(this,arguments)},a.timer.flush=function(){Ae(),Me()},a.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)},a.geom={},a.geom.hull=function(t){var e=Se,r=Ee;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=ve(e),a=ve(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[u[n]][2]]);for(n=+f;nEt)s=s.L;else{if(!((i=a-We(s,o))>Et)){n>-Et?(e=s.P,r=s):i>-Et?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=He(t);if(Fe.insert(e,l),e||r){if(e===r)return Qe(e),r=He(e.site),Fe.insert(l,r),l.edge=r.edge=rr(e.site,l.site),$e(e),void $e(r);if(r){Qe(e),Qe(r);var u=e.site,c=u.x,f=u.y,h=t.x-c,p=t.y-f,d=r.site,v=d.x-c,g=d.y-f,y=2*(h*g-p*v),m=h*h+p*p,x=v*v+g*g,b={x:(g*m-p*x)/y+c,y:(h*x-v*m)/y+f};nr(r.edge,u,d,b),l.edge=rr(u,t,null,b),r.edge=rr(t,d,null,b),$e(e),$e(r)}else l.edge=rr(e.site,l.site)}}function Ye(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,u=l-e;if(!u)return s;var c=s-n,f=1/a-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-l+u/2+i-a/2)))/f+n:(n+s)/2}function We(t,e){var r=t.N;if(r)return Ye(r,e);var n=t.site;return n.y===e?n.x:1/0}function Xe(t){this.site=t,this.edges=[]}function Je(t,e){return e.angle-t.angle}function Ke(){or(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,u=n.y-s,c=a.x-o,f=2*(l*(g=a.y-s)-u*c);if(!(f>=-1e-12)){var h=l*l+u*u,p=c*c+g*g,d=(g*h-u*p)/f,v=(l*p-c*h)/f,g=v+s,y=Ue.pop()||new Ke;y.arc=t,y.site=i,y.x=d+o,y.y=g+Math.sqrt(d*d+v*v),y.cy=g,t.circle=y;for(var m=null,x=Ne._;x;)if(y.y=s)return;if(h>d){if(a){if(a.y>=u)return}else a={x:g,y:l};r={x:g,y:u}}else{if(a){if(a.y1)if(h>d){if(a){if(a.y>=u)return}else a={x:(l-i)/n,y:l};r={x:(u-i)/n,y:u}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.x0)){if(e/=h,h<0){if(e0){if(e>f)return;e>c&&(c=e)}if(e=i-l,h||!(e<0)){if(e/=h,h<0){if(e>f)return;e>c&&(c=e)}else if(h>0){if(e0)){if(e/=p,p<0){if(e0){if(e>f)return;e>c&&(c=e)}if(e=a-u,p||!(e<0)){if(e/=p,p<0){if(e>f)return;e>c&&(c=e)}else if(p>0){if(e0&&(t.a={x:l+c*h,y:u+c*p}),f<1&&(t.b={x:l+f*h,y:u+f*p}),t}}}}}),l=o.length;l--;)(!tr(e=o[l],t)||!s(e)||w(e.a.x-e.b.x)Et||w(i-r)>Et)&&(s.splice(o,0,new ir((y=a.site,m=c,x=w(n-f)Et?{x:f,y:w(e-f)Et?{x:w(r-d)Et?{x:h,y:w(e-h)Et?{x:w(r-p)=r&&u.x<=i&&u.y>=n&&u.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/Et)*Et,y:Math.round(i(t,e)/Et)*Et,i:e}}))}return o.links=function(t){return cr(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},o.triangles=function(t){var e=[];return cr(s(t)).cells.forEach((function(r,n){for(var i,a,o,s,l=r.site,u=r.edges.sort(Je),c=-1,f=u.length,h=u[f-1].edge,p=h.l===l?h.r:h.l;++ca||f>o||h=_)<<1|e>=b,T=w+4;wa&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:xr(r,n)})),a=wr.lastIndex;return av&&(v=l.x),l.y>g&&(g=l.y),u.push(l.x),c.push(l.y);else for(f=0;fv&&(v=x),b>g&&(g=b),u.push(x),c.push(b)}var _=v-p,T=g-d;function k(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,u=t.y;if(null!=l)if(w(l-r)+w(u-n)<.01)A(t,e,r,n,i,a,o,s);else{var c=t.point;t.x=t.y=t.point=null,A(t,c,l,u,i,a,o,s),A(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else A(t,e,r,n,i,a,o,s)}function A(t,e,r,n,i,a,o,s){var l=.5*(i+o),u=.5*(a+s),c=r>=l,f=n>=u,h=f<<1|c;t.leaf=!1,c?i=l:o=l,f?a=u:s=u,k(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,a,o,s)}_>T?g=d+_:v=p+T;var M={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(M,t,+y(t,++f),+m(t,f),p,d,v,g)},visit:function(t){vr(t,M,p,d,v,g)},find:function(t){return gr(M,t[0],t[1],p,d,v,g)}};if(f=-1,null==e){for(;++f=0&&!(r=a.interpolators[n](t,e)););return r}function kr(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function Lr(t){return function(e){return 1-t(1-e)}}function Cr(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function Pr(t){return t*t}function Or(t){return t*t*t}function Ir(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function Dr(t){return 1-Math.cos(t*Ot)}function zr(t){return Math.pow(2,10*(t-1))}function Rr(t){return 1-Math.sqrt(1-t*t)}function Fr(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Br(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function Nr(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=Ur(i),s=jr(i,a),l=Ur(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return r=Mr.get(r)||Ar,Er((n=Sr.get(n)||D)(r.apply(null,o.call(arguments,1))))},a.interpolateHcl=function(t,e){t=a.hcl(t),e=a.hcl(e);var r=t.h,n=t.c,i=t.l,o=e.h-r,s=e.c-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.c:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return Yt(r+o*t,n+s*t,i+l*t)+""}},a.interpolateHsl=function(t,e){t=a.hsl(t),e=a.hsl(e);var r=t.h,n=t.s,i=t.l,o=e.h-r,s=e.s-n,l=e.l-i;return isNaN(s)&&(s=0,n=isNaN(n)?e.s:n),isNaN(o)?(o=0,r=isNaN(r)?e.h:r):o>180?o-=360:o<-180&&(o+=360),function(t){return qt(r+o*t,n+s*t,i+l*t)+""}},a.interpolateLab=function(t,e){t=a.lab(t),e=a.lab(e);var r=t.l,n=t.a,i=t.b,o=e.l-r,s=e.a-n,l=e.b-i;return function(t){return Qt(r+o*t,n+s*t,i+l*t)+""}},a.interpolateRound=Br,a.transform=function(t){var e=l.createElementNS(a.ns.prefix.svg,"g");return(a.transform=function(t){if(null!=t){e.setAttribute("transform",t);var r=e.transform.baseVal.consolidate()}return new Nr(r?r.matrix:Vr)})(t)},Nr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Vr={a:1,b:0,c:0,d:1,e:0,f:0};function Hr(t){return t.length?t.pop()+",":""}function qr(t,e){var r=[],n=[];return t=a.transform(t),e=a.transform(e),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:xr(t[0],e[0])},{i:i-2,x:xr(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(t.translate,e.translate,r,n),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(Hr(r)+"rotate(",null,")")-2,x:xr(t,e)})):e&&r.push(Hr(r)+"rotate("+e+")")}(t.rotate,e.rotate,r,n),function(t,e,r,n){t!==e?n.push({i:r.push(Hr(r)+"skewX(",null,")")-2,x:xr(t,e)}):e&&r.push(Hr(r)+"skewX("+e+")")}(t.skew,e.skew,r,n),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(Hr(r)+"scale(",null,",",null,")");n.push({i:i-4,x:xr(t[0],e[0])},{i:i-2,x:xr(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(Hr(r)+"scale("+e+")")}(t.scale,e.scale,r,n),t=e=null,function(t){for(var e,i=-1,a=n.length;++i0?r=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:r=0})):e>0&&(l.start({type:"start",alpha:r=e}),t=Te(s.tick)),s):r},s.start=function(){var t,e,r,a=y.length,l=m.length,c=u[0],d=u[1];for(t=0;t=0;)r.push(i[n])}function on(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(c=u[l]),c.parent=a,c.depth=a.depth+1;r&&(a.value=0),a.children=u}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return on(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(an(t,(function(t){t.children&&(t.value=0)})),on(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},a.layout.partition=function(){var t=a.layout.hierarchy(),e=[1,1];function r(t,e,n,i){var a=t.children;if(t.x=e,t.y=t.depth*i,t.dx=n,t.dy=i,a&&(o=a.length)){var o,s,l,u=-1;for(n=t.value?n/t.value:0;++us&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=e);return n}function bn(t){return t.reduce(_n,0)}function _n(t,e){return t+e[1]}function wn(t,e){return Tn(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Tn(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function kn(t){return[a.min(t),a.max(t)]}function An(t,e){return t.value-e.value}function Mn(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function Sn(t,e){t._pack_next=e,e._pack_prev=t}function En(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function Ln(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,u=1/0,c=-1/0,f=1/0,h=-1/0;if(e.forEach(Cn),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(In(r,n,i=e[2]),x(i),Mn(r,i),r._pack_prev=i,Mn(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=f[0]&&l<=f[1]&&((s=u[a.bisect(h,l,1,d)-1]).y+=v,s.push(i[o]));return u}return i.value=function(t){return arguments.length?(e=t,i):e},i.range=function(t){return arguments.length?(r=ve(t),i):r},i.bins=function(t){return arguments.length?(n="number"==typeof t?function(e){return Tn(e,t)}:ve(t),i):n},i.frequency=function(e){return arguments.length?(t=!!e,i):t},i},a.layout.pack=function(){var t,e=a.layout.hierarchy().sort(An),r=0,n=[1,1];function i(i,a){var o=e.call(this,i,a),s=o[0],l=n[0],u=n[1],c=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,on(s,(function(t){t.r=+c(t.value)})),on(s,Ln),r){var f=r*(t?1:Math.max(2*s.r/l,2*s.r/u))/2;on(s,(function(t){t.r+=f})),on(s,Ln),on(s,(function(t){t.r-=f}))}return On(s,l/2,u/2,t?1:1/Math.max(2*s.r/l,2*s.r/u)),o}return i.size=function(t){return arguments.length?(n=t,i):n},i.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,i):t},i.padding=function(t){return arguments.length?(r=+t,i):r},nn(i,e)},a.layout.tree=function(){var t=a.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=null;function i(i,a){var u=t.call(this,i,a),c=u[0],f=function(t){for(var e,r={A:null,children:[t]},n=[r];null!=(e=n.pop());)for(var i,a=e.children,o=0,s=a.length;op.x&&(p=t),t.depth>d.depth&&(d=t)}));var v=e(h,p)/2-h.x,g=r[0]/(p.x+e(p,h)/2+v),y=r[1]/(d.depth||1);an(c,(function(t){t.x=(t.x+v)*g,t.y=t.depth*y}))}return u}function o(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r.length){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,a=t,o=t,s=r,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,h=l.m;s=Rn(s),a=zn(a),s&&a;)l=zn(l),(o=Rn(o)).a=t,(i=s.z+f-a.z-u+e(s._,a._))>0&&(Fn(Bn(s,t,n),t,i),u+=i,c+=i),f+=s.m,u+=a.m,h+=l.m,c+=o.m;s&&!Rn(o)&&(o.t=s,o.m+=f-c),a&&!zn(l)&&(l.t=a,l.m+=u-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=r[0],t.y=t.depth*r[1]}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t)?l:null,i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null==(r=t)?null:l,i):n?r:null},nn(i,t)},a.layout.cluster=function(){var t=a.layout.hierarchy().sort(null).value(null),e=Dn,r=[1,1],n=!1;function i(i,o){var s,l=t.call(this,i,o),u=l[0],c=0;on(u,(function(t){var r=t.children;r&&r.length?(t.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(r),t.y=function(t){return 1+a.max(t,(function(t){return t.y}))}(r)):(t.x=s?c+=e(t,s):0,t.y=0,s=t)}));var f=Nn(u),h=jn(u),p=f.x-e(f,h)/2,d=h.x+e(h,f)/2;return on(u,n?function(t){t.x=(t.x-u.x)*r[0],t.y=(u.y-t.y)*r[1]}:function(t){t.x=(t.x-p)/(d-p)*r[0],t.y=(1-(u.y?t.y/u.y:1))*r[1]}),l}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(t){return arguments.length?(n=null==(r=t),i):n?null:r},i.nodeSize=function(t){return arguments.length?(n=null!=(r=t),i):n?r:null},nn(i,t)},a.layout.treemap=function(){var t,e=a.layout.hierarchy(),r=Math.round,n=[1,1],i=null,o=Un,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(t,e){for(var r,n,i=-1,a=t.length;++i0;)s.push(r=u[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,v))<=h?(u.pop(),h=n):(s.area-=s.pop().area,d(s,v,a,!1),v=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(d(s,v,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(c(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return e*=e,(n*=n)?Math.max(e*i*u/n,n/(e*a*u)):1/0}function d(t,e,n,i){var a,o=-1,s=t.length,l=n.x,u=n.y,c=e?r(t.area/e):0;if(e==n.dx){for((i||c>n.dy)&&(c=n.dy);++on.dx)&&(c=n.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=a.random.normal.apply(a,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=a.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?Xn:Gn,l=n?Zr:Gr;return i=o(t,e,l,r),a=o(e,t,l,Tr),s}function s(t){return i(t)}return s.invert=function(t){return a(t)},s.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},s.range=function(t){return arguments.length?(e=t,o()):e},s.rangeRound=function(t){return s.range(t).interpolate(Br)},s.clamp=function(t){return arguments.length?(n=t,o()):n},s.interpolate=function(t){return arguments.length?(r=t,o()):r},s.ticks=function(e){return ti(t,e)},s.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},s.nice=function(e){return $n(t,e),o()},s.copy=function(){return Jn(t,e,r,n)},o()}function Kn(t,e){return a.rebind(t,e,"range","rangeRound","interpolate","clamp")}function $n(t,e){return Zn(t,Yn(Qn(t,e)[2])),Zn(t,Yn(Qn(t,e)[2])),t}function Qn(t,e){null==e&&(e=10);var r=Hn(t),n=r[1]-r[0],i=Math.pow(10,Math.floor(Math.log(n/e)/Math.LN10)),a=e/n*i;return a<=.15?i*=10:a<=.35?i*=5:a<=.75&&(i*=2),r[0]=Math.ceil(r[0]/i)*i,r[1]=Math.floor(r[1]/i)*i+.5*i,r[2]=i,r}function ti(t,e){return a.range.apply(a,Qn(t,e))}function ei(t,e,r,n){function i(t){return(r?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return r?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(r=e[0]>=0,t.domain((n=e.map(Number)).map(i)),o):n},o.base=function(r){return arguments.length?(e=+r,t.domain(n.map(i)),o):e},o.nice=function(){var e=Zn(n.map(i),r?Math:ri);return t.domain(e),n=e.map(a),o},o.ticks=function(){var t=Hn(n),o=[],s=t[0],l=t[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),f=e%1?2:e;if(isFinite(c-u)){if(r){for(;u0;h--)o.push(a(u)*h);for(u=0;o[u]l;c--);o=o.slice(u,c)}return o},o.copy=function(){return ei(t.copy(),e,r,n)},Kn(o,t)}a.scale.linear=function(){return Jn([0,1],[0,1],Tr,!1)},a.scale.log=function(){return ei(a.scale.linear().domain([0,1]),10,!0,[1,10])};var ri={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};function ni(t,e,r){var n=ii(e),i=ii(1/e);function a(e){return t(n(e))}return a.invert=function(e){return i(t.invert(e))},a.domain=function(e){return arguments.length?(t.domain((r=e.map(Number)).map(n)),a):r},a.ticks=function(t){return ti(r,t)},a.tickFormat=function(t,e){return d3_scale_linearTickFormat(r,t,e)},a.nice=function(t){return a.domain($n(r,t))},a.exponent=function(o){return arguments.length?(n=ii(e=o),i=ii(1/e),t.domain(r.map(n)),a):e},a.copy=function(){return ni(t.copy(),e,r)},Kn(a,t)}function ii(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ai(t,e){var r,n,i;function o(i){return n[((r.get(i)||("range"===e.t?r.set(i,t.push(i)):NaN))-1)%n.length]}function s(e,r){return a.range(t.length).map((function(t){return e+r*t}))}return o.domain=function(n){if(!arguments.length)return t;t=[],r=new A;for(var i,a=-1,s=n.length;++a0?r[n-1]:t[0],nf?0:1;if(u=Pt)return l(u,p)+(s?l(s,1-p):"")+"Z";var d,v,g,y,m,x,b,_,w,T,k,A,M=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===vi?Math.sqrt(s*s+u*u):+n.apply(this,arguments),p||(S*=-1),u&&(S=zt(g/u*Math.sin(y))),s&&(M=zt(g/s*Math.sin(y)))),u){m=u*Math.cos(c+S),x=u*Math.sin(c+S),b=u*Math.cos(f-S),_=u*Math.sin(f-S);var L=Math.abs(f-c-2*S)<=Lt?0:1;if(S&&_i(m,x,b,_)===p^L){var C=(c+f)/2;m=u*Math.cos(C),x=u*Math.sin(C),b=_=null}}else m=x=0;if(s){w=s*Math.cos(f-M),T=s*Math.sin(f-M),k=s*Math.cos(c+M),A=s*Math.sin(c+M);var P=Math.abs(c-f+2*M)<=Lt?0:1;if(M&&_i(w,T,k,A)===1-p^P){var O=(c+f)/2;w=s*Math.cos(O),T=s*Math.sin(O),k=A=null}}else w=T=0;if(h>Et&&(d=Math.min(Math.abs(u-s)/2,+r.apply(this,arguments)))>.001){v=s0?0:1}function wi(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,u=-s*a,c=t[0]+l,f=t[1]+u,h=e[0]+l,p=e[1]+u,d=(c+h)/2,v=(f+p)/2,g=h-c,y=p-f,m=g*g+y*y,x=r-n,b=c*p-h*f,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*m-b*b)),w=(b*y-g*_)/m,T=(-b*g-y*_)/m,k=(b*y+g*_)/m,A=(-b*g+y*_)/m,M=w-d,S=T-v,E=k-d,L=A-v;return M*M+S*S>E*E+L*L&&(w=k,T=A),[[w-l,T-u],[w*r/x,T*r/x]]}function Ti(){return!0}function ki(t){var e=Se,r=Ee,n=Ti,i=Mi,a=i.key,o=.7;function s(a){var s,l=[],u=[],c=-1,f=a.length,h=ve(e),p=ve(r);function d(){l.push("M",i(t(u),o))}for(;++c1&&i.push("H",n[0]),i.join("")},"step-before":Ei,"step-after":Li,basis:Oi,"basis-open":function(t){if(t.length<4)return Mi(t);for(var e,r=[],n=-1,i=t.length,a=[0],o=[0];++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);for(r.push(Ii(Ri,a)+","+Ii(Ri,o)),--n;++n9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Mi(t){return t.length>1?t.join("L"):t+"Z"}function Si(t){return t.join("L")+"Z"}function Ei(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var u=2;uLt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return a.radius=function(t){return arguments.length?(r=ve(t),a):r},a.source=function(e){return arguments.length?(t=ve(e),a):t},a.target=function(t){return arguments.length?(e=ve(t),a):e},a.startAngle=function(t){return arguments.length?(n=ve(t),a):n},a.endAngle=function(t){return arguments.length?(i=ve(t),a):i},a},a.svg.diagonal=function(){var t=Ui,e=Vi,r=qi;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=ve(e),n):t},n.target=function(t){return arguments.length?(e=ve(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},a.svg.diagonal.radial=function(){var t=a.svg.diagonal(),e=qi,r=t.projection;return t.projection=function(t){return arguments.length?r(Gi(e=t)):e},t},a.svg.symbol=function(){var t=Yi,e=Zi;function r(r,n){return(Xi.get(t.call(this,r,n))||Wi)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=ve(e),r):t},r.size=function(t){return arguments.length?(e=ve(t),r):e},r};var Xi=a.map({circle:Wi,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Ki)),r=e*Ki;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Ji),r=e*Ji/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Ji),r=e*Ji/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});a.svg.symbolTypes=Xi.keys();var Ji=Math.sqrt(3),Ki=Math.tan(30*It);J.transition=function(t){for(var e,r,n=ea||++ia,i=sa(t),a=[],o=ra||{time:Date.now(),ease:Ir,delay:0,duration:250},s=-1,l=this.length;++s0;)u[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--c.count?delete c[n]:delete t[r],1}f||(a=i.time,o=Te((function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h}),0,a),f=c[n]={tween:new A,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++c.count)}na.call=J.call,na.empty=J.empty,na.node=J.node,na.size=J.size,a.transition=function(t,e){return t&&t.transition?ea?t.transition(e):t:a.selection().transition(t)},a.transition.prototype=na,na.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=K(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",o[1]-o[0])}function v(t){t.select(".extent").attr("y",s[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var f,g,y=this,m=a.select(a.event.target),x=r.of(y,arguments),b=a.select(y),_=m.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&i,k=m.classed("extent"),A=kt(y),M=a.mouse(y),S=a.select(c(y)).on("keydown.brush",C).on("keyup.brush",P);if(a.event.changedTouches?S.on("touchmove.brush",O).on("touchend.brush",D):S.on("mousemove.brush",O).on("mouseup.brush",D),b.interrupt().selectAll("*").interrupt(),k)M[0]=o[0]-M[0],M[1]=s[0]-M[1];else if(_){var E=+/w$/.test(_),L=+/^n/.test(_);g=[o[1-E]-M[0],s[1-L]-M[1]],M[0]=o[E],M[1]=s[L]}else a.event.altKey&&(f=M.slice());function C(){32==a.event.keyCode&&(k||(f=null,M[0]-=o[1],M[1]-=s[1],k=2),U())}function P(){32==a.event.keyCode&&2==k&&(M[0]+=o[1],M[1]+=s[1],k=0,U())}function O(){var t=a.mouse(y),e=!1;g&&(t[0]+=g[0],t[1]+=g[1]),k||(a.event.altKey?(f||(f=[(o[0]+o[1])/2,(s[0]+s[1])/2]),M[0]=o[+(t[0]>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?d=new(f(e.dtype))(g):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=g));for(var y=0;yr||s>1073741824){for(var h=0;he+n||T>r+n||k=M||a===o)){var s=m[i];void 0===o&&(o=s.length);for(var l=a;l=v&&c<=y&&f>=g&&f<=b&&S.push(u)}var h=x[i],p=h[4*a+0],d=h[4*a+1],_=h[4*a+2],E=h[4*a+3],P=C(h,a+1),O=.5*n,I=i+1;L(e,r,O,I,p,d||_||E||P),L(e,r+O,O,I,d,_||E||P),L(e+O,r,O,I,_,E||P),L(e+O,r+O,O,I,E,P)}}function C(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}return L(0,0,1,0,0,1),S},d;function E(t,e,r,i,a){for(var o=[],s=0;s0){e+=Math.abs(o(t[0]));for(var r=1;r2){for(l=0;l=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=c,e.lengthToRadians=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var a=e.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},60302:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(23132);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,v="FeatureCollection"===d,g="Feature"===d,y=v?t.features.length:1,m=0;mu||p>c||d>f)return l=i,u=r,c=p,f=d,void(o=0);var v=n.lineString([l,i],t.properties);if(!1===e(v,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=c,e.lengthToRadians=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var a=e.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},27138:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(94228);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,v="FeatureCollection"===d,g="Feature"===d,y=v?t.features.length:1,m=0;mu||p>c||d>f)return l=i,u=r,c=p,f=d,void(o=0);var v=n.lineString([l,i],t.properties);if(!1===e(v,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;s=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},e.radiansToLength=c,e.lengthToRadians=f,e.lengthToDegrees=function(t,e){return h(f(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(f(t,e),r)},e.convertArea=function(t,r,n){if(void 0===r&&(r="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=e.areaFactors[r];if(!i)throw new Error("invalid original units");var a=e.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},e.isNumber=p,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!p(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},e.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},e.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},e.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},e.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},e.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},e.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},e.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},88553:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(64182);function i(t,e,r){if(null!==t)for(var n,a,o,s,l,u,c,f,h=0,p=0,d=t.type,v="FeatureCollection"===d,g="Feature"===d,y=v?t.features.length:1,m=0;mu||p>c||d>f)return l=i,u=r,c=p,f=d,void(o=0);var v=n.lineString([l,i],t.properties);if(!1===e(v,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;si&&(i=t[o]),t[o]1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;it.length)&&(r=t.length),t.substring(r-e.length,r)===e}var y="",m="",x="",b="",_={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:"};function w(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function T(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var k=function(t){function e(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==p(t)||null===t)throw new v("options","Object",t);var i=t.message,a=t.operator,l=t.stackStartFn,u=t.actual,c=t.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=o(this,h(e).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(y="",m="",b="",x=""):(y="",m="",b="",x="")),"object"===p(u)&&null!==u&&"object"===p(c)&&null!==c&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=w(u),c=w(c)),"deepStrictEqual"===a||"strictEqual"===a)r=o(this,h(e).call(this,function(t,e,r){var i="",a="",o=0,s="",l=!1,u=T(t),c=u.split("\n"),f=T(e).split("\n"),h=0,d="";if("strictEqual"===r&&"object"===p(t)&&"object"===p(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===c.length&&1===f.length&&c[0]!==f[0]){var v=c[0].length+f[0].length;if(v<=10){if(!("object"===p(t)&&null!==t||"object"===p(e)&&null!==e||0===t&&0===e))return"".concat(_[r],"\n\n")+"".concat(c[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&v<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;c[0][h]===f[0][h];)h++;h>2&&(d="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",h),"^"),h=0)}}for(var w=c[c.length-1],k=f[f.length-1];w===k&&(h++<2?s="\n ".concat(w).concat(s):i=w,c.pop(),f.pop(),0!==c.length&&0!==f.length);)w=c[c.length-1],k=f[f.length-1];var A=Math.max(c.length,f.length);if(0===A){var M=u.split("\n");if(M.length>30)for(M[26]="".concat(y,"...").concat(b);M.length>27;)M.pop();return"".concat(_.notIdentical,"\n\n").concat(M.join("\n"),"\n")}h>3&&(s="\n".concat(y,"...").concat(b).concat(s),l=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var S=0,E=_[r]+"\n".concat(m,"+ actual").concat(b," ").concat(x,"- expected").concat(b),L=" ".concat(y,"...").concat(b," Lines skipped");for(h=0;h1&&h>2&&(C>4?(a+="\n".concat(y,"...").concat(b),l=!0):C>3&&(a+="\n ".concat(f[h-2]),S++),a+="\n ".concat(f[h-1]),S++),o=h,i+="\n".concat(x,"-").concat(b," ").concat(f[h]),S++;else if(f.length1&&h>2&&(C>4?(a+="\n".concat(y,"...").concat(b),l=!0):C>3&&(a+="\n ".concat(c[h-2]),S++),a+="\n ".concat(c[h-1]),S++),o=h,a+="\n".concat(m,"+").concat(b," ").concat(c[h]),S++;else{var P=f[h],O=c[h],I=O!==P&&(!g(O,",")||O.slice(0,-1)!==P);I&&g(P,",")&&P.slice(0,-1)===O&&(I=!1,O+=","),I?(C>1&&h>2&&(C>4?(a+="\n".concat(y,"...").concat(b),l=!0):C>3&&(a+="\n ".concat(c[h-2]),S++),a+="\n ".concat(c[h-1]),S++),o=h,a+="\n".concat(m,"+").concat(b," ").concat(O),i+="\n".concat(x,"-").concat(b," ").concat(P),S+=2):(a+=i,i="",1!==C&&0!==h||(a+="\n ".concat(O),S++))}if(S>20&&h30)for(k[26]="".concat(y,"...").concat(b);k.length>27;)k.pop();r=1===k.length?o(this,h(e).call(this,"".concat(d," ").concat(k[0]))):o(this,h(e).call(this,"".concat(d,"\n\n").concat(k.join("\n"),"\n")))}else{var A=T(u),M="",S=_[a];"notDeepEqual"===a||"notEqual"===a?(A="".concat(_[a],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(M="".concat(T(c)),A.length>512&&(A="".concat(A.slice(0,509),"...")),M.length>512&&(M="".concat(M.slice(0,509),"...")),"deepEqual"===a||"equal"===a?A="".concat(S,"\n\n").concat(A,"\n\nshould equal\n\n"):M=" ".concat(a," ").concat(M)),r=o(this,h(e).call(this,"".concat(A).concat(M)))}return Error.stackTraceLimit=f,r.generatedMessage=!i,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=u,r.expected=c,r.operator=a,Error.captureStackTrace&&Error.captureStackTrace(s(r),l),r.stack,r.name="AssertionError",o(r)}var r,l;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(e,t),r=e,l=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(t,e){return d(this,function(t){for(var e=1;e2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}u("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),u("ERR_INVALID_ARG_TYPE",(function(t,e,i){var a,s,l,u,f;if(void 0===o&&(o=r(32791)),o("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(s="not ",e.substr(0,s.length)===s)?(a="must not be",e=e.replace(/^not /,"")):a="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))l="The ".concat(t," ").concat(a," ").concat(c(e,"type"));else{var h=("number"!=typeof f&&(f=0),f+".".length>(u=t).length||-1===u.indexOf(".",f)?"argument":"property");l='The "'.concat(t,'" ').concat(h," ").concat(a," ").concat(c(e,"type"))}return l+". Received type ".concat(n(i))}),TypeError),u("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(43827));var i=s.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),u("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),u("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n0,"At least one arg needs to be specified");var i="The ",a=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),a){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,a-1).join(", "),i+=", and ".concat(e[a-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=l},74061:function(t,e,r){"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var a=void 0!==/a/g.flags,o=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},s=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},l=Object.is?Object.is:r(64003),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},c=Number.isNaN?Number.isNaN:r(15567);function f(t){return t.call.bind(t)}var h=f(Object.prototype.hasOwnProperty),p=f(Object.prototype.propertyIsEnumerable),d=f(Object.prototype.toString),v=r(43827).types,g=v.isAnyArrayBuffer,y=v.isArrayBufferView,m=v.isDate,x=v.isMap,b=v.isRegExp,_=v.isSet,w=v.isNativeError,T=v.isBoxedPrimitive,k=v.isNumberObject,A=v.isStringObject,M=v.isBooleanObject,S=v.isBigIntObject,E=v.isSymbolObject,L=v.isFloat32Array,C=v.isFloat64Array;function P(t){if(0===t.length||t.length>10)return!0;for(var e=0;e57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function O(t){return Object.keys(t).filter(P).concat(u(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function I(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i0?o-4:o;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e),1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=16383,s=0,l=n-i;sl?l:s+o));return 1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,n){for(var i,a,o=[],s=e;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},91358:function(t){"use strict";function e(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>=0?(a=o,i=o-1):n=o+1}return a}function r(t,e,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)>0?(a=o,i=o-1):n=o+1}return a}function n(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<0?(a=o,n=o+1):i=o-1}return a}function i(t,e,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=t[o];(void 0!==r?r(s,e):s-e)<=0?(a=o,n=o+1):i=o-1}return a}function a(t,e,r,n,i){for(;n<=i;){var a=n+i>>>1,o=t[a],s=void 0!==r?r(o,e):o-e;if(0===s)return a;s<=0?n=a+1:i=a-1}return-1}function o(t,e,r,n,i,a){return"function"==typeof r?a(t,e,r,void 0===n?0:0|n,void 0===i?t.length-1:0|i):a(t,e,void 0,void 0===r?0:0|r,void 0===n?t.length-1:0|n)}t.exports={ge:function(t,r,n,i,a){return o(t,r,n,i,a,e)},gt:function(t,e,n,i,a){return o(t,e,n,i,a,r)},lt:function(t,e,r,i,a){return o(t,e,r,i,a,n)},le:function(t,e,r,n,a){return o(t,e,r,n,a,i)},eq:function(t,e,r,n,i){return o(t,e,r,n,i,a)}}},13547:function(t,e){"use strict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}e.INT_BITS=32,e.INT_MAX=2147483647,e.INT_MIN=-1<<31,e.sign=function(t){return(t>0)-(t<0)},e.abs=function(t){var e=t>>31;return(t^e)-e},e.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},e.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},e.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},e.countTrailingZeros=r,e.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,1+(t|=t>>>16)},e.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},e.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var n=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|n[t>>>16&255]<<8|n[t>>>24&255]},e.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},e.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},e.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},e.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},e.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},44781:function(t,e,r){"use strict";var n=r(53435);t.exports=function(t,e){e||(e={});var r,o,s,l,u,c,f,h,p,d,v,g=null==e.cutoff?.25:e.cutoff,y=null==e.radius?8:e.radius,m=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,c=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext("2d"),r=h.width,o=h.height,l=(p=f.getImageData(0,0,r,o)).data,c=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(f=t,r=(h=t.canvas).width,o=h.height,l=(p=f.getImageData(0,0,r,o)).data,c=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,c=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(r*o),d=0,v=u.length;dr?r:t:te?e:t}},6475:function(t,e,r){"use strict";var n=r(53435);function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(255&n(o,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},76857:function(t){"use strict";t.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]}},25075:function(t,e,r){"use strict";var n=r(36652),i=r(53435),a=r(90660);t.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(a(e))(4),o="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},90736:function(t,e,r){"use strict";var n=r(76857),i=r(10973),a=r(46775);t.exports=function(t){var e,s,l=[],u=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)u=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var c=(p=t.slice(1)).length;u=1,c<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===c&&(u=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===c&&(u=parseInt(p[6]+p[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var f=e[1],h="rgb"===f,p=f.replace(/a$/,"");s=p,c="cmyk"===p?4:"gray"===p?1:3,l=e[2].trim().split(/\s*,\s*/).map((function(t,e){if(/%$/.test(t))return e===c?parseFloat(t)/100:"rgb"===p?255*parseFloat(t)/100:parseFloat(t);if("h"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),u=h||void 0===l[c]?1:l[c],l=l.slice(0,c)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),s=t.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s="rgb",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s="hsl",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),u=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(u/=100)}else(Array.isArray(t)||r.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",u=4===t.length?t[3]:1);else s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:u}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},36652:function(t,e,r){"use strict";var n=r(90736),i=r(80009),a=r(53435);t.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},80009:function(t,e,r){"use strict";var n=r(6866);t.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var u=0;u<3;u++)(n=o+1/3*-(u-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[u]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},6866:function(t){"use strict";t.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function(t){t.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|ç)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|ã)o.?tom(e|é)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},72791:function(t,e,r){"use strict";t.exports={parse:r(41004),stringify:r(53313)}},63625:function(t,e,r){"use strict";var n=r(40402);t.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},41004:function(t,e,r){"use strict";var n=r(90448),i=r(38732),a=r(41901),o=r(15659),s=r(96209),l=r(83794),u=r(99011),c=r(63625).isSize;t.exports=h;var f=h.cache={};function h(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(f[t])return f[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=u(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),f[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(c(e)){var d=u(e,"/");if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):"/"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error("Missing required font-family.");return r.family=u(h.join(" "),/\s*,\s*/).map(n),f[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},53313:function(t,e,r){"use strict";var n=r(71299),i=r(63625).isSize,a=d(r(38732)),o=d(r(41901)),s=d(r(15659)),l=d(r(96209)),u=d(r(83794)),c={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="serif";function p(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function d(t){for(var e={},r=0;re?1:t>=e?0:NaN}r.d(e,{j2:function(){return n},Fp:function(){return s},J6:function(){return u},TS:function(){return c},VV:function(){return f},w6:function(){return h},Sm:function(){return p}}),1===(i=n).length&&(a=i,i=function(t,e){return n(a(t),e)});var i,a,o=Array.prototype;function s(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n}function l(t){return null===t?NaN:+t}function u(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r}function f(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function h(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n=n.length)return null!=t&&r.sort(t),null!=e?e(r):r;for(var u,c,f,h=-1,p=r.length,d=n[i++],v=o(),g=s();++hn.length)return t;var a,o=i[r-1];return null!=e&&r>=n.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:s(t,r)})}))),null!=o?a.sort((function(t,e){return o(t.key,e.key)})):a}return r={object:function(t){return a(t,0,l,u)},map:function(t){return a(t,0,c,f)},entries:function(t){return s(a(t,0,c,f),0)},key:function(t){return n.push(t),r},sortKeys:function(t){return i[n.length-1]=t,r},sortValues:function(e){return t=e,r},rollup:function(t){return e=t,r}}}function l(){return{}}function u(t,e,r){t[e]=r}function c(){return o()}function f(t,e,r){t.set(e,r)}function h(){}var p=o.prototype;h.prototype=function(t,e){var r=new h;if(t instanceof h)t.each((function(t){r.add(t)}));else if(t){var n=-1,i=t.length;if(null==e)for(;++n=(a=(v+y)/2))?v=a:y=a,(c=r>=(o=(g+m)/2))?g=o:m=o,i=p,!(p=p[f=c<<1|u]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(u=e>=(a=(v+y)/2))?v=a:y=a,(c=r>=(o=(g+m)/2))?g=o:m=o}while((f=c<<1|u)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function s(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i}function l(t){return t[0]}function u(t){return t[1]}function c(t,e,r){var n=new f(null==e?l:e,null==r?u:r,NaN,NaN,NaN,NaN);return null==t?n:n.addAll(t)}function f(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function h(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}r.r(e),r.d(e,{forceCenter:function(){return n},forceCollide:function(){return g},forceLink:function(){return b},forceManyBody:function(){return X},forceRadial:function(){return J},forceSimulation:function(){return W},forceX:function(){return K},forceY:function(){return $}});var p=c.prototype=f.prototype;function d(t){return t.x+t.vx}function v(t){return t.y+t.vy}function g(t){var e,r,n=1,o=1;function s(){for(var t,i,s,u,f,h,p,g=e.length,y=0;yu+d||if+d||os.index){var v=u-l.x-l.vx,g=f-l.y-l.vy,y=v*v+g*g;yt.r&&(t.r=t[e].r)}function u(){if(e){var n,i,a=e.length;for(r=new Array(a),n=0;nf&&(f=n),ih&&(h=i));if(u>f||c>h)return this;for(this.cover(u,c).cover(f,h),r=0;rt||t>=i||n>e||e>=a;)switch(s=(ep||(a=u.y0)>d||(o=u.x1)=m)<<1|t>=y)&&(u=v[v.length-1],v[v.length-1]=v[v.length-1-c],v[v.length-1-c]=u)}else{var x=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(d+g)/2))?d=s:g=s,(c=o>=(l=(v+y)/2))?v=l:y=l,e=p,!(p=p[f=c<<1|u]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)},p.removeAll=function(t){for(var e=0,r=t.length;e=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}}))}function A(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;a=0&&e._call.call(null,t),e=e._next;--C}()}finally{C=0,function(){for(var t,e,r=S,n=1/0;r;)r._call?(n>r._time&&(n=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:S=e);E=t,q(n)}(),D=0}}function H(){var t=R.now(),e=t-I;e>1e3&&(z-=e,I=t)}function q(t){C||(P&&(P=clearTimeout(P)),t-D>24?(t<1/0&&(P=setTimeout(V,t-R.now()-z)),O&&(O=clearInterval(O))):(O||(I=R.now(),O=setInterval(H,1e3)),C=1,F(V)))}function G(t){return t.x}function Z(t){return t.y}j.prototype=U.prototype={constructor:j,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?B():+r)+(null==e?0:+e),this._next||E===this||(E?E._next=this:S=this,E=this),this._call=t,this._time=r,q()},stop:function(){this._call&&(this._call=null,this._time=1/0,q())}};var Y=Math.PI*(3-Math.sqrt(5));function W(t){var e,r=1,n=.001,i=1-Math.pow(n,1/300),a=0,o=.6,s=(0,y.UI)(),l=U(c),u=L("tick","end");function c(){f(),u.call("tick",e),r1?(null==r?s.remove(t):s.set(t,p(r)),e):s.get(t)},find:function(e,r,n){var i,a,o,s,l,u=0,c=t.length;for(null==n?n=1/0:n*=n,u=0;u1?(u.on(t,r),e):u.on(t)}}}function X(){var t,e,r,n,o=i(-30),s=1,l=1/0,u=.81;function f(n){var i,a=t.length,o=c(t,G,Z).visitAfter(p);for(r=n,i=0;i=l)){(t.data!==e||t.next)&&(0===f&&(d+=(f=a())*f),0===h&&(d+=(h=a())*h),d1?n[0]+n.slice(2):n,+t.slice(r+1)]}r.d(e,{WU:function(){return h},FF:function(){return v}});var i,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(t){if(!(e=a.exec(t)))throw new Error("invalid format: "+t);var e;return new s({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function s(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function l(t,e){var r=n(t,e);if(!r)return t+"";var i=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+new Array(a-i.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var u={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return l(100*t,e)},r:l,s:function(t,e){var r=n(t,e);if(!r)return t+"";var a=r[0],o=r[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+new Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+new Array(1-s).join("0")+n(t,Math.max(0,e+s-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function c(t){return t}var f,h,p=Array.prototype.map,d=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function v(t){var e,r,a=void 0===t.grouping||void 0===t.thousands?c:(e=p.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(t.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(r)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",f=void 0===t.decimal?".":t.decimal+"",h=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(p.call(t.numerals,String)),v=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",y=void 0===t.nan?"NaN":t.nan+"";function m(t){var e=(t=o(t)).fill,r=t.align,n=t.sign,c=t.symbol,p=t.zero,m=t.width,x=t.comma,b=t.precision,_=t.trim,w=t.type;"n"===w?(x=!0,w="g"):u[w]||(void 0===b&&(b=12),_=!0,w="g"),(p||"0"===e&&"="===r)&&(p=!0,e="0",r="=");var T="$"===c?s:"#"===c&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",k="$"===c?l:/[%p]/.test(w)?v:"",A=u[w],M=/[defgprs%]/.test(w);function S(t){var o,s,l,u=T,c=k;if("c"===w)c=A(t)+c,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?y:A(Math.abs(t),b),_&&(t=function(t){t:for(var e,r=t.length,n=1,i=-1;n0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),v&&0==+t&&"+"!==n&&(v=!1),u=(v?"("===n?n:g:"-"===n||"("===n?"":n)+u,c=("s"===w?d[8+i/3]:"")+c+(v&&"("===n?")":""),M)for(o=-1,s=t.length;++o(l=t.charCodeAt(o))||l>57){c=(46===l?f+t.slice(o+1):t.slice(o))+c,t=t.slice(0,o);break}}x&&!p&&(t=a(t,1/0));var S=u.length+t.length+c.length,E=S>1)+u+t+c+E.slice(S);break;default:t=E+u+t+c}return h(t)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+""},S}return{format:m,formatPrefix:function(t,e){var r,i=m(((t=o(t)).type="f",t)),a=3*Math.max(-8,Math.min(8,Math.floor((r=e,((r=n(Math.abs(r)))?r[1]:NaN)/3)))),s=Math.pow(10,-a),l=d[8+a/3];return function(t){return i(s*t)+l}}}}f=v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),h=f.format,f.formatPrefix},65704:function(t,e,r){"use strict";r.r(e),r.d(e,{geoAiry:function(){return z},geoAiryRaw:function(){return D},geoAitoff:function(){return F},geoAitoffRaw:function(){return R},geoArmadillo:function(){return N},geoArmadilloRaw:function(){return B},geoAugust:function(){return U},geoAugustRaw:function(){return j},geoBaker:function(){return G},geoBakerRaw:function(){return q},geoBerghaus:function(){return W},geoBerghausRaw:function(){return Y},geoBertin1953:function(){return rt},geoBertin1953Raw:function(){return et},geoBoggs:function(){return ct},geoBoggsRaw:function(){return ut},geoBonne:function(){return vt},geoBonneRaw:function(){return dt},geoBottomley:function(){return yt},geoBottomleyRaw:function(){return gt},geoBromley:function(){return xt},geoBromleyRaw:function(){return mt},geoChamberlin:function(){return Et},geoChamberlinAfrica:function(){return St},geoChamberlinRaw:function(){return At},geoCollignon:function(){return Ct},geoCollignonRaw:function(){return Lt},geoCraig:function(){return Ot},geoCraigRaw:function(){return Pt},geoCraster:function(){return zt},geoCrasterRaw:function(){return Dt},geoCylindricalEqualArea:function(){return Ft},geoCylindricalEqualAreaRaw:function(){return Rt},geoCylindricalStereographic:function(){return Nt},geoCylindricalStereographicRaw:function(){return Bt},geoEckert1:function(){return Ut},geoEckert1Raw:function(){return jt},geoEckert2:function(){return Ht},geoEckert2Raw:function(){return Vt},geoEckert3:function(){return Gt},geoEckert3Raw:function(){return qt},geoEckert4:function(){return Yt},geoEckert4Raw:function(){return Zt},geoEckert5:function(){return Xt},geoEckert5Raw:function(){return Wt},geoEckert6:function(){return Kt},geoEckert6Raw:function(){return Jt},geoEisenlohr:function(){return te},geoEisenlohrRaw:function(){return Qt},geoFahey:function(){return ne},geoFaheyRaw:function(){return re},geoFoucaut:function(){return ae},geoFoucautRaw:function(){return ie},geoFoucautSinusoidal:function(){return se},geoFoucautSinusoidalRaw:function(){return oe},geoGilbert:function(){return he},geoGingery:function(){return ge},geoGingeryRaw:function(){return pe},geoGinzburg4:function(){return xe},geoGinzburg4Raw:function(){return me},geoGinzburg5:function(){return _e},geoGinzburg5Raw:function(){return be},geoGinzburg6:function(){return Te},geoGinzburg6Raw:function(){return we},geoGinzburg8:function(){return Ae},geoGinzburg8Raw:function(){return ke},geoGinzburg9:function(){return Se},geoGinzburg9Raw:function(){return Me},geoGringorten:function(){return Ce},geoGringortenQuincuncial:function(){return ei},geoGringortenRaw:function(){return Le},geoGuyou:function(){return De},geoGuyouRaw:function(){return Ie},geoHammer:function(){return $},geoHammerRaw:function(){return J},geoHammerRetroazimuthal:function(){return Be},geoHammerRetroazimuthalRaw:function(){return Re},geoHealpix:function(){return Ye},geoHealpixRaw:function(){return He},geoHill:function(){return Xe},geoHillRaw:function(){return We},geoHomolosine:function(){return er},geoHomolosineRaw:function(){return tr},geoHufnagel:function(){return nr},geoHufnagelRaw:function(){return rr},geoHyperelliptical:function(){return sr},geoHyperellipticalRaw:function(){return or},geoInterrupt:function(){return fr},geoInterruptedBoggs:function(){return pr},geoInterruptedHomolosine:function(){return vr},geoInterruptedMollweide:function(){return yr},geoInterruptedMollweideHemispheres:function(){return xr},geoInterruptedQuarticAuthalic:function(){return hn},geoInterruptedSinuMollweide:function(){return _r},geoInterruptedSinusoidal:function(){return Tr},geoKavrayskiy7:function(){return Ar},geoKavrayskiy7Raw:function(){return kr},geoLagrange:function(){return Sr},geoLagrangeRaw:function(){return Mr},geoLarrivee:function(){return Cr},geoLarriveeRaw:function(){return Lr},geoLaskowski:function(){return Or},geoLaskowskiRaw:function(){return Pr},geoLittrow:function(){return Dr},geoLittrowRaw:function(){return Ir},geoLoximuthal:function(){return Rr},geoLoximuthalRaw:function(){return zr},geoMiller:function(){return Br},geoMillerRaw:function(){return Fr},geoModifiedStereographic:function(){return Jr},geoModifiedStereographicAlaska:function(){return Gr},geoModifiedStereographicGs48:function(){return Zr},geoModifiedStereographicGs50:function(){return Yr},geoModifiedStereographicLee:function(){return Xr},geoModifiedStereographicMiller:function(){return Wr},geoModifiedStereographicRaw:function(){return Nr},geoMollweide:function(){return ot},geoMollweideRaw:function(){return at},geoMtFlatPolarParabolic:function(){return tn},geoMtFlatPolarParabolicRaw:function(){return Qr},geoMtFlatPolarQuartic:function(){return rn},geoMtFlatPolarQuarticRaw:function(){return en},geoMtFlatPolarSinusoidal:function(){return an},geoMtFlatPolarSinusoidalRaw:function(){return nn},geoNaturalEarth:function(){return on.Z},geoNaturalEarth2:function(){return ln},geoNaturalEarth2Raw:function(){return sn},geoNaturalEarthRaw:function(){return on.K},geoNellHammer:function(){return cn},geoNellHammerRaw:function(){return un},geoNicolosi:function(){return dn},geoNicolosiRaw:function(){return pn},geoPatterson:function(){return _n},geoPattersonRaw:function(){return bn},geoPeirceQuincuncial:function(){return ri},geoPierceQuincuncial:function(){return ri},geoPolyconic:function(){return Tn},geoPolyconicRaw:function(){return wn},geoPolyhedral:function(){return Ln},geoPolyhedralButterfly:function(){return Rn},geoPolyhedralCollignon:function(){return Nn},geoPolyhedralWaterman:function(){return jn},geoProject:function(){return Gn},geoQuantize:function(){return ni},geoQuincuncial:function(){return ti},geoRectangularPolyconic:function(){return ai},geoRectangularPolyconicRaw:function(){return ii},geoRobinson:function(){return li},geoRobinsonRaw:function(){return si},geoSatellite:function(){return ci},geoSatelliteRaw:function(){return ui},geoSinuMollweide:function(){return Qe},geoSinuMollweideRaw:function(){return $e},geoSinusoidal:function(){return pt},geoSinusoidalRaw:function(){return ht},geoStitch:function(){return Ti},geoTimes:function(){return Ai},geoTimesRaw:function(){return ki},geoTwoPointAzimuthal:function(){return Li},geoTwoPointAzimuthalRaw:function(){return Si},geoTwoPointAzimuthalUsa:function(){return Ei},geoTwoPointEquidistant:function(){return Oi},geoTwoPointEquidistantRaw:function(){return Ci},geoTwoPointEquidistantUsa:function(){return Pi},geoVanDerGrinten:function(){return Di},geoVanDerGrinten2:function(){return Ri},geoVanDerGrinten2Raw:function(){return zi},geoVanDerGrinten3:function(){return Bi},geoVanDerGrinten3Raw:function(){return Fi},geoVanDerGrinten4:function(){return ji},geoVanDerGrinten4Raw:function(){return Ni},geoVanDerGrintenRaw:function(){return Ii},geoWagner:function(){return Vi},geoWagner4:function(){return Yi},geoWagner4Raw:function(){return Zi},geoWagner6:function(){return Xi},geoWagner6Raw:function(){return Wi},geoWagner7:function(){return Hi},geoWagnerRaw:function(){return Ui},geoWiechel:function(){return Ki},geoWiechelRaw:function(){return Ji},geoWinkel3:function(){return Qi},geoWinkel3Raw:function(){return $i}});var n=r(15002),i=Math.abs,a=Math.atan,o=Math.atan2,s=(Math.ceil,Math.cos),l=Math.exp,u=Math.floor,c=Math.log,f=Math.max,h=Math.min,p=Math.pow,d=Math.round,v=Math.sign||function(t){return t>0?1:t<0?-1:0},g=Math.sin,y=Math.tan,m=1e-6,x=1e-12,b=Math.PI,_=b/2,w=b/4,T=Math.SQRT1_2,k=P(2),A=P(b),M=2*b,S=180/b,E=b/180;function L(t){return t>1?_:t<-1?-_:Math.asin(t)}function C(t){return t>1?0:t<-1?b:Math.acos(t)}function P(t){return t>0?Math.sqrt(t):0}function O(t){return(l(t)-l(-t))/2}function I(t){return(l(t)+l(-t))/2}function D(t){var e=y(t/2),r=2*c(s(t/2))/(e*e);function n(t,e){var n=s(t),i=s(e),a=g(e),o=i*n,l=-((1-o?c((1+o)/2)/(1-o):-.5)+r/(1+o));return[l*i*g(t),l*a]}return n.invert=function(e,n){var a,l=P(e*e+n*n),u=-t/2,f=50;if(!l)return[0,0];do{var h=u/2,p=s(h),d=g(h),v=d/p,y=-c(i(p));u-=a=(2/v*y-r*v-l)/(-y/(d*d)+1-r/(2*p*p))*(p<0?.7:1)}while(i(a)>m&&--f>0);var x=g(u);return[o(e*x,l*s(u)),L(n*x/l)]},n}function z(){var t=_,e=(0,n.r)(D),r=e(t);return r.radius=function(r){return arguments.length?e(t=r*E):t*S},r.scale(179.976).clipAngle(147)}function R(t,e){var r=s(e),n=function(t){return t?t/Math.sin(t):1}(C(r*s(t/=2)));return[2*r*g(t)*n,g(e)*n]}function F(){return(0,n.Z)(R).scale(152.63)}function B(t){var e=g(t),r=s(t),n=t>=0?1:-1,a=y(n*t),l=(1+e-r)/2;function u(t,i){var u=s(i),c=s(t/=2);return[(1+u)*g(t),(n*i>-o(c,a)-.001?0:10*-n)+l+g(i)*r-(1+u)*e*c]}return u.invert=function(t,u){var c=0,f=0,h=50;do{var p=s(c),d=g(c),v=s(f),y=g(f),x=1+v,b=x*d-t,_=l+y*r-x*e*p-u,w=x*p/2,T=-d*y,k=e*x*d/2,A=r*v+e*p*y,M=T*k-A*w,S=(_*T-b*A)/M/2,E=(b*k-_*w)/M;i(E)>2&&(E/=2),c-=S,f-=E}while((i(S)>m||i(E)>m)&&--h>0);return n*f>-o(s(c),a)-.001?[2*c,f]:null},u}function N(){var t=20*E,e=t>=0?1:-1,r=y(e*t),i=(0,n.r)(B),a=i(t),l=a.stream;return a.parallel=function(n){return arguments.length?(r=y((e=(t=n*E)>=0?1:-1)*t),i(t)):t*S},a.stream=function(n){var i=a.rotate(),u=l(n),c=(a.rotate([0,0]),l(n)),f=a.precision();return a.rotate(i),u.sphere=function(){c.polygonStart(),c.lineStart();for(var n=-180*e;e*n<180;n+=90*e)c.point(n,90*e);if(t)for(;e*(n-=3*e*f)>=-180;)c.point(n,e*-o(s(n*E/2),r)*S);c.lineEnd(),c.polygonEnd()},u},a.scale(218.695).center([0,28.0974])}function j(t,e){var r=y(e/2),n=P(1-r*r),i=1+n*s(t/=2),a=g(t)*n/i,o=r/i,l=a*a,u=o*o;return[4/3*a*(3+l-3*u),4/3*o*(3+3*l-u)]}function U(){return(0,n.Z)(j).scale(66.1603)}R.invert=function(t,e){if(!(t*t+4*e*e>b*b+m)){var r=t,n=e,a=25;do{var o,l=g(r),u=g(r/2),c=s(r/2),f=g(n),h=s(n),p=g(2*n),d=f*f,v=h*h,y=u*u,x=1-v*c*c,_=x?C(h*c)*P(o=1/x):o=0,w=2*_*h*u-t,T=_*f-e,k=o*(v*y+_*h*c*d),A=o*(.5*l*p-2*_*f*u),M=.25*o*(p*u-_*f*v*l),S=o*(d*c+_*y*h),E=A*M-S*k;if(!E)break;var L=(T*A-w*S)/E,O=(w*M-T*k)/E;r-=L,n-=O}while((i(L)>m||i(O)>m)&&--a>0);return[r,n]}},j.invert=function(t,e){if(e*=3/8,!(t*=3/8)&&i(e)>1)return null;var r=1+t*t+e*e,n=P((r-P(r*r-4*e*e))/2),a=L(n)/3,l=n?function(t){return c(t+P(t*t-1))}(i(e/n))/3:function(t){return c(t+P(t*t+1))}(i(t))/3,u=s(a),f=I(l),h=f*f-u*u;return[2*v(t)*o(O(l)*u,.25-h),2*v(e)*o(f*g(a),.25+h)]};var V=P(8),H=c(1+k);function q(t,e){var r=i(e);return rx&&--u>0);return[t/(s(o)*(V-1/g(o))),v(e)*o]};var Z=r(17889);function Y(t){var e=2*b/t;function r(t,r){var n=(0,Z.N)(t,r);if(i(t)>_){var a=o(n[1],n[0]),l=P(n[0]*n[0]+n[1]*n[1]),u=e*d((a-_)/e)+_,c=o(g(a-=u),2-s(a));a=u+L(b/l*g(c))-c,n[0]=l*s(a),n[1]=l*g(a)}return n}return r.invert=function(t,r){var n=P(t*t+r*r);if(n>_){var i=o(r,t),l=e*d((i-_)/e)+_,u=i>l?-1:1,c=n*s(l-i),f=1/y(u*C((c-b)/P(b*(b-2*c)+n*n)));i=l+2*a((f+u*P(f*f-3))/3),t=n*s(i),r=n*g(i)}return Z.N.invert(t,r)},r}function W(){var t=5,e=(0,n.r)(Y),r=e(t),i=r.stream,a=.01,l=-s(a*E),u=g(a*E);return r.lobes=function(r){return arguments.length?e(t=+r):t},r.stream=function(e){var n=r.rotate(),c=i(e),f=(r.rotate([0,0]),i(e));return r.rotate(n),c.sphere=function(){f.polygonStart(),f.lineStart();for(var e=0,r=360/t,n=2*b/t,i=90-180/t,c=_;e0&&i(n)>m);return s<0?NaN:r}function tt(t,e,r){return void 0===e&&(e=40),void 0===r&&(r=x),function(n,a,o,s){var l,u,c;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var f=0;fl)o-=u/=2,s-=c/=2;else{l=v;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,m=t(o+g,s),x=t(o,s+y),b=(m[0]-h[0])/g,_=(m[1]-h[1])/g,w=(x[0]-h[0])/y,T=(x[1]-h[1])/y,k=T*b-_*w,A=(i(k)<.5?.5:1)/k;if(o+=u=(d*w-p*T)*A,s+=c=(p*_-d*b)*A,i(u)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return e.invert=tt(e),e}function rt(){return(0,n.Z)(et()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function nt(t,e){var r,n=t*g(e),a=30;do{e-=r=(e+g(e)-n)/(1+s(e))}while(i(r)>m&&--a>0);return e/2}function it(t,e,r){function n(n,i){return[t*n*s(i=nt(r,i)),e*g(i)]}return n.invert=function(n,i){return i=L(i/e),[n/(t*s(i)),L((2*i+g(2*i))/r)]},n}K.invert=function(t,e){var r=2*L(e/2);return[t*s(r/2)/s(r),r]};var at=it(k/_,k,b);function ot(){return(0,n.Z)(at).scale(169.529)}var st=2.00276,lt=1.11072;function ut(t,e){var r=nt(b,e);return[st*t/(1/s(e)+lt/s(r)),(e+k*g(r))/st]}function ct(){return(0,n.Z)(ut).scale(160.857)}function ft(t){var e=0,r=(0,n.r)(t),i=r(e);return i.parallel=function(t){return arguments.length?r(e=t*E):e*S},i}function ht(t,e){return[t*s(e),e]}function pt(){return(0,n.Z)(ht).scale(152.63)}function dt(t){if(!t)return ht;var e=1/y(t);function r(r,n){var i=e+t-n,a=i?r*s(n)/i:i;return[i*g(a),e-i*s(a)]}return r.invert=function(r,n){var i=P(r*r+(n=e-n)*n),a=e+t-i;return[i/s(a)*o(r,n),a]},r}function vt(){return ft(dt).scale(123.082).center([0,26.1441]).parallel(45)}function gt(t){function e(e,r){var n=_-r,i=n?e*t*g(n)/n:n;return[n*g(i)/t,_-n*s(i)]}return e.invert=function(e,r){var n=e*t,i=_-r,a=P(n*n+i*i),s=o(n,i);return[(a?a/g(a):1)*s/t,_-a]},e}function yt(){var t=.5,e=(0,n.r)(gt),r=e(t);return r.fraction=function(r){return arguments.length?e(t=+r):t},r.scale(158.837)}ut.invert=function(t,e){var r,n,a=st*e,o=e<0?-w:w,l=25;do{n=a-k*g(o),o-=r=(g(2*o)+2*o-b*g(n))/(2*s(2*o)+2+b*s(n)*k*s(o))}while(i(r)>m&&--l>0);return n=a-k*g(o),[t*(1/s(n)+lt/s(o))/st,n]},ht.invert=function(t,e){return[t/s(e),e]};var mt=it(1,4/b,b);function xt(){return(0,n.Z)(mt).scale(152.63)}var bt=r(66624),_t=r(49386);function wt(t,e,r,n,a,l){var u,c=s(l);if(i(t)>1||i(l)>1)u=C(r*a+e*n*c);else{var f=g(t/2),h=g(l/2);u=2*L(P(f*f+e*n*h*h))}return i(u)>m?[u,o(n*g(l),e*a-r*n*c)]:[0,0]}function Tt(t,e,r){return C((t*t+e*e-r*r)/(2*t*e))}function kt(t){return t-2*b*u((t+b)/(2*b))}function At(t,e,r){for(var n,i=[[t[0],t[1],g(t[1]),s(t[1])],[e[0],e[1],g(e[1]),s(e[1])],[r[0],r[1],g(r[1]),s(r[1])]],a=i[2],o=0;o<3;++o,a=n)n=i[o],a.v=wt(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var l=Tt(i[0].v[0],i[2].v[0],i[1].v[0]),u=Tt(i[0].v[0],i[1].v[0],i[2].v[0]),c=b-l;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*s(l),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*g(l))];return function(t,e){var r,n=g(e),a=s(e),o=new Array(3);for(r=0;r<3;++r){var l=i[r];if(o[r]=wt(e-l[1],l[3],l[2],a,n,t-l[0]),!o[r][0])return l.point;o[r][1]=kt(o[r][1]-l.v[1])}var h=f.slice();for(r=0;r<3;++r){var p=2==r?0:r+1,d=Tt(i[r].v[0],o[r][0],o[p][0]);o[r][1]<0&&(d=-d),r?1==r?(d=u-d,h[0]-=o[r][0]*s(d),h[1]-=o[r][0]*g(d)):(d=c-d,h[0]+=o[r][0]*s(d),h[1]+=o[r][0]*g(d)):(h[0]+=o[r][0]*s(d),h[1]-=o[r][0]*g(d))}return h[0]/=3,h[1]/=3,h}}function Mt(t){return t[0]*=E,t[1]*=E,t}function St(){return Et([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Et(t,e,r){var i=(0,bt.Z)({type:"MultiPoint",coordinates:[t,e,r]}),a=[-i[0],-i[1]],o=(0,_t.Z)(a),s=At(Mt(o(t)),Mt(o(e)),Mt(o(r)));s.invert=tt(s);var l=(0,n.Z)(s).rotate(a),u=l.center;return delete l.rotate,l.center=function(t){return arguments.length?u(o(t)):o.invert(u())},l.clipAngle(90)}function Lt(t,e){var r=P(1-g(e));return[2/A*t*r,A*(1-r)]}function Ct(){return(0,n.Z)(Lt).scale(95.6464).center([0,30])}function Pt(t){var e=y(t);function r(t,r){return[t,(t?t/g(t):1)*(g(r)*s(t)-e*s(r))]}return r.invert=e?function(t,r){t&&(r*=g(t)/t);var n=s(t);return[t,2*o(P(n*n+e*e-r*r)-n,e-r)]}:function(t,e){return[t,L(t?e*y(t)/t:e)]},r}function Ot(){return ft(Pt).scale(249.828).clipAngle(90)}Lt.invert=function(t,e){var r=(r=e/A-1)*r;return[r>0?t*P(b/r)/2:0,L(1-r)]};var It=P(3);function Dt(t,e){return[It*t*(2*s(2*e/3)-1)/A,It*A*g(e/3)]}function zt(){return(0,n.Z)(Dt).scale(156.19)}function Rt(t){var e=s(t);function r(t,r){return[t*e,g(r)/e]}return r.invert=function(t,r){return[t/e,L(r*e)]},r}function Ft(){return ft(Rt).parallel(38.58).scale(195.044)}function Bt(t){var e=s(t);function r(t,r){return[t*e,(1+e)*y(r/2)]}return r.invert=function(t,r){return[t/e,2*a(r/(1+e))]},r}function Nt(){return ft(Bt).scale(124.75)}function jt(t,e){var r=P(8/(3*b));return[r*t*(1-i(e)/b),r*e]}function Ut(){return(0,n.Z)(jt).scale(165.664)}function Vt(t,e){var r=P(4-3*g(i(e)));return[2/P(6*b)*t*r,v(e)*P(2*b/3)*(2-r)]}function Ht(){return(0,n.Z)(Vt).scale(165.664)}function qt(t,e){var r=P(b*(4+b));return[2/r*t*(1+P(1-4*e*e/(b*b))),4/r*e]}function Gt(){return(0,n.Z)(qt).scale(180.739)}function Zt(t,e){var r=(2+_)*g(e);e/=2;for(var n=0,a=1/0;n<10&&i(a)>m;n++){var o=s(e);e-=a=(e+g(e)*(o+2)-r)/(2*o*(1+o))}return[2/P(b*(4+b))*t*(1+s(e)),2*P(b/(4+b))*g(e)]}function Yt(){return(0,n.Z)(Zt).scale(180.739)}function Wt(t,e){return[t*(1+s(e))/P(2+b),2*e/P(2+b)]}function Xt(){return(0,n.Z)(Wt).scale(173.044)}function Jt(t,e){for(var r=(1+_)*g(e),n=0,a=1/0;n<10&&i(a)>m;n++)e-=a=(e+g(e)-r)/(1+s(e));return r=P(2+b),[t*(1+s(e))/r,2*e/r]}function Kt(){return(0,n.Z)(Jt).scale(173.044)}Dt.invert=function(t,e){var r=3*L(e/(It*A));return[A*t/(It*(2*s(2*r/3)-1)),r]},jt.invert=function(t,e){var r=P(8/(3*b)),n=e/r;return[t/(r*(1-i(n)/b)),n]},Vt.invert=function(t,e){var r=2-i(e)/P(2*b/3);return[t*P(6*b)/(2*r),v(e)*L((4-r*r)/3)]},qt.invert=function(t,e){var r=P(b*(4+b))/2;return[t*r/(1+P(1-e*e*(4+b)/(4*b))),e*r/2]},Zt.invert=function(t,e){var r=e*P((4+b)/b)/2,n=L(r),i=s(n);return[t/(2/P(b*(4+b))*(1+i)),L((n+r*(i+2))/(2+_))]},Wt.invert=function(t,e){var r=P(2+b),n=e*r/2;return[r*t/(1+s(n)),n]},Jt.invert=function(t,e){var r=1+_,n=P(r/2);return[2*t*n/(1+s(e*=n)),L((e+g(e))/r)]};var $t=3+2*k;function Qt(t,e){var r=g(t/=2),n=s(t),i=P(s(e)),o=s(e/=2),l=g(e)/(o+k*n*i),u=P(2/(1+l*l)),f=P((k*o+(n+r)*i)/(k*o+(n-r)*i));return[$t*(u*(f-1/f)-2*c(f)),$t*(u*l*(f+1/f)-2*a(l))]}function te(){return(0,n.Z)(Qt).scale(62.5271)}Qt.invert=function(t,e){if(!(r=j.invert(t/1.2,1.065*e)))return null;var r,n=r[0],o=r[1],l=20;t/=$t,e/=$t;do{var u=n/2,p=o/2,d=g(u),v=s(u),y=g(p),x=s(p),b=s(o),w=P(b),A=y/(x+k*v*w),M=A*A,S=P(2/(1+M)),E=(k*x+(v+d)*w)/(k*x+(v-d)*w),L=P(E),C=L-1/L,O=L+1/L,I=S*C-2*c(L)-t,D=S*A*O-2*a(A)-e,z=y&&T*w*d*M/y,R=(k*v*x+w)/(2*(x+k*v*w)*(x+k*v*w)*w),F=-.5*A*S*S*S,B=F*z,N=F*R,U=(U=2*x+k*w*(v-d))*U*L,V=(k*v*x*w+b)/U,H=-k*d*y/(w*U),q=C*B-2*V/L+S*(V+V/E),G=C*N-2*H/L+S*(H+H/E),Z=A*O*B-2*z/(1+M)+S*O*z+S*A*(V-V/E),Y=A*O*N-2*R/(1+M)+S*O*R+S*A*(H-H/E),W=G*Z-Y*q;if(!W)break;var X=(D*G-I*Y)/W,J=(I*Z-D*q)/W;n-=X,o=f(-_,h(_,o-J))}while((i(X)>m||i(J)>m)&&--l>0);return i(i(o)-_)n){var h=P(f),p=o(c,u),v=r*d(p/r),y=p-v,x=t*s(y),w=(t*g(y)-y*g(x))/(_-x),T=de(y,w),k=(b-t)/ve(T,x,b);u=h;var A,M=50;do{u-=A=(t+ve(T,x,u)*k-h)/(T(u)*k)}while(i(A)>m&&--M>0);c=y*g(u),u<_&&(c-=w*(u-_));var S=g(v),E=s(v);l[0]=u*E-c*S,l[1]=u*S+c*E}return l}return a.invert=function(e,a){var l=e*e+a*a;if(l>n){var u=P(l),c=o(a,e),f=r*d(c/r),h=c-f;e=u*s(h),a=u*g(h);for(var p=e-_,v=g(e),y=a/v,m=e<_?1/0:0,w=10;;){var T=t*g(y),k=t*s(y),A=g(k),M=_-k,S=(T-y*A)/M,E=de(y,S);if(i(m)m||i(p)>m)&&--y>0);return[d,v]},c}var me=ye(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function xe(){return(0,n.Z)(me).scale(149.995)}var be=ye(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function _e(){return(0,n.Z)(be).scale(153.93)}var we=ye(5/6*b,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Te(){return(0,n.Z)(we).scale(130.945)}function ke(t,e){var r=t*t,n=e*e;return[t*(1-.162388*n)*(.87-952426e-9*r*r),e*(1+n/12)]}function Ae(){return(0,n.Z)(ke).scale(131.747)}ke.invert=function(t,e){var r,n=t,a=e,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-e)/(1+s/4)}while(i(r)>m&&--o>0);o=50,t/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-t)/(.87-.00476213*l)}while(i(r)>m&&--o>0);return[n,a]};var Me=ye(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Se(){return(0,n.Z)(Me).scale(131.087)}function Ee(t){var e=t(_,0)[0]-t(-_,0)[0];function r(r,n){var i=r>0?-.5:.5,a=t(r+i*b,n);return a[0]-=i*e,a}return t.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=t.invert(r+i*e,n),o=a[0]-i*b;return o<-b?o+=2*b:o>b&&(o-=2*b),a[0]=o,a}),r}function Le(t,e){var r=v(t),n=v(e),a=s(e),l=s(t)*a,u=g(t)*a,c=g(n*e);t=i(o(u,c)),e=L(l),i(t-_)>m&&(t%=_);var f=function(t,e){if(e===_)return[0,0];var r,n,a=g(e),o=a*a,l=o*o,u=1+l,c=1+3*l,f=1-l,h=L(1/P(u)),p=f+o*u*h,d=(1-a)/p,v=P(d),y=d*u,x=P(y),w=v*f;if(0===t)return[0,-(w+o*x)];var T,k=s(e),A=1/k,M=2*a*k,S=(-p*k-(-3*o+h*c)*M*(1-a))/(p*p),E=-A*M,C=-A*(o*u*S+d*c*M),O=-2*A*(f*(.5*S/v)-2*o*v*M),I=4*t/b;if(t>.222*b||e.175*b){if(r=(w+o*P(y*(1+l)-w*w))/(1+l),t>b/4)return[r,r];var D=r,z=.5*r;r=.5*(z+D),n=50;do{var R=r*(O+E*P(y-r*r))+C*L(r/x)-I;if(!R)break;R<0?z=r:D=r,r=.5*(z+D)}while(i(D-z)>m&&--n>0)}else{r=m,n=25;do{var F=r*r,B=P(y-F),N=O+E*B,j=r*N+C*L(r/x)-I;r-=T=B?j/(N+(C-E*F)/B):0}while(i(T)>m&&--n>0)}return[r,-w-o*P(y-r*r)]}(t>b/4?_-t:t,e);return t>b/4&&(c=f[0],f[0]=-f[1],f[1]=-c),f[0]*=r,f[1]*=-n,f}function Ce(){return(0,n.Z)(Ee(Le)).scale(239.75)}function Pe(t,e){var r,n,o,u,c,f;if(e=.999999)return r=(1-e)/4,o=1/(n=I(t)),[(u=((f=l(2*(f=t)))-1)/(f+1))+r*((c=n*O(t))-t)/(n*n),o-r*u*o*(c-t),o+r*u*o*(c+t),2*a(l(t))-_+r*(c-t)/n];var h=[1,0,0,0,0,0,0,0,0],p=[P(e),0,0,0,0,0,0,0,0],d=0;for(n=P(1-e),c=1;i(p[d]/h[d])>m&&d<8;)r=h[d++],p[d]=(r-n)/2,h[d]=(r+n)/2,n=P(r*n),c*=2;o=c*h[d]*t;do{o=(L(u=p[d]*g(n=o)/h[d])+o)/2}while(--d);return[g(o),u=s(o),u/s(o-n),o]}function Oe(t,e){if(!e)return t;if(1===e)return c(y(t/2+w));for(var r=1,n=P(1-e),o=P(e),s=0;i(o)>m;s++){if(t%b){var l=a(n*y(t)/r);l<0&&(l+=b),t+=l+~~(t/b)*b}else t+=t;o=(r+n)/2,n=P(r*n),o=((r=o)-n)/2}return t/(p(2,s)*r)}function Ie(t,e){var r=(k-1)/(k+1),n=P(1-r*r),u=Oe(_,n*n),f=c(y(b/4+i(e)/2)),h=l(-1*f)/P(r),p=function(t,e){var r=t*t,n=e+1,i=1-r-e*e;return[.5*((t>=0?_:-_)-o(i,2*t)),-.25*c(i*i+4*r)+.5*c(n*n+r)]}(h*s(-1*t),h*g(-1*t)),d=function(t,e,r){var n=i(t),o=O(i(e));if(n){var s=1/g(n),l=1/(y(n)*y(n)),u=-(l+r*(o*o*s*s)-1+r),c=(-u+P(u*u-(r-1)*l*4))/2;return[Oe(a(1/P(c)),r)*v(t),Oe(a(P((c/l-1)/r)),1-r)*v(e)]}return[0,Oe(a(o),1-r)*v(e)]}(p[0],p[1],n*n);return[-d[1],(e>=0?1:-1)*(.5*u-d[0])]}function De(){return(0,n.Z)(Ee(Ie)).scale(151.496)}Le.invert=function(t,e){i(t)>1&&(t=2*v(t)-t),i(e)>1&&(e=2*v(e)-e);var r=v(t),n=v(e),a=-r*t,l=-n*e,u=l/a<1,c=function(t,e){for(var r=0,n=1,a=.5,o=50;;){var l=a*a,u=P(a),c=L(1/P(1+l)),f=1-l+a*(1+l)*c,h=(1-u)/f,p=P(h),d=h*(1+l),v=p*(1-l),g=P(d-t*t),y=e+v+a*g;if(i(n-r)0?r=a:n=a,a=.5*(r+n)}if(!o)return null;var m=L(u),_=s(m),w=1/_,T=2*u*_,k=(-f*_-(-3*a+c*(1+3*l))*T*(1-u))/(f*f);return[b/4*(t*(-2*w*(.5*k/p*(1-l)-2*a*p*T)+-w*T*g)+-w*(a*(1+l)*k+h*(1+3*l)*T)*L(t/P(d))),m]}(u?l:a,u?a:l),f=c[0],h=c[1],p=s(h);return u&&(f=-_-f),[r*(o(g(f)*p,-g(h))+b),n*L(s(f)*p)]},Ie.invert=function(t,e){var r,n,i,s,u,f,h=(k-1)/(k+1),p=P(1-h*h),d=(n=-t,i=p*p,(r=.5*Oe(_,p*p)-e)?(s=Pe(r,i),n?(f=(u=Pe(n,1-i))[1]*u[1]+i*s[0]*s[0]*u[0]*u[0],[[s[0]*u[2]/f,s[1]*s[2]*u[0]*u[1]/f],[s[1]*u[1]/f,-s[0]*s[2]*u[0]*u[2]/f],[s[2]*u[1]*u[2]/f,-i*s[0]*s[1]*u[0]/f]]):[[s[0],0],[s[1],0],[s[2],0]]):[[0,(u=Pe(n,1-i))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),v=function(t,e){var r=e[0]*e[0]+e[1]*e[1];return[(t[0]*e[0]+t[1]*e[1])/r,(t[1]*e[0]-t[0]*e[1])/r]}(d[0],d[1]);return[o(v[1],v[0])/-1,2*a(l(-.5*c(h*v[0]*v[0]+h*v[1]*v[1])))-_]};var ze=r(7613);function Re(t){var e=g(t),r=s(t),n=Fe(t);function a(t,a){var o=n(t,a);t=o[0],a=o[1];var l=g(a),u=s(a),c=s(t),f=C(e*l+r*u*c),h=g(f),p=i(h)>m?f/h:1;return[p*r*g(t),(i(t)>_?p:-p)*(e*u-r*l*c)]}return n.invert=Fe(-t),a.invert=function(t,r){var i=P(t*t+r*r),a=-g(i),l=s(i),u=i*l,c=-r*a,f=i*e,h=P(u*u+c*c-f*f),p=o(u*f+c*h,c*f-u*h),d=(i>_?-1:1)*o(t*a,i*s(p)*l+r*g(p)*a);return n.invert(d,p)},a}function Fe(t){var e=g(t),r=s(t);return function(t,n){var i=s(n),a=s(t)*i,l=g(t)*i,u=g(n);return[o(l,a*r-u*e),L(u*r+a*e)]}}function Be(){var t=0,e=(0,n.r)(Re),r=e(t),i=r.rotate,a=r.stream,o=(0,ze.Z)();return r.parallel=function(n){if(!arguments.length)return t*S;var i=r.rotate();return e(t=n*E).rotate(i)},r.rotate=function(e){return arguments.length?(i.call(r,[e[0],e[1]-t*S]),o.center([-e[0],-e[1]]),r):((e=i.call(r))[1]+=t*S,e)},r.stream=function(t){return(t=a(t)).sphere=function(){t.polygonStart();var e,r=o.radius(89.99)().coordinates[0],n=r.length-1,i=-1;for(t.lineStart();++i=0;)t.point((e=r[i])[0],e[1]);t.lineEnd(),t.polygonEnd()},t},r.scale(79.4187).parallel(45).clipAngle(179.999)}var Ne=r(33064),je=r(72736),Ue=L(1-1/3)*S,Ve=Rt(0);function He(t){var e=Ue*E,r=Lt(b,e)[0]-Lt(-b,e)[0],n=Ve(0,e)[1],a=Lt(0,e)[1],o=A-a,s=M/t,l=4/M,c=n+o*o*4/M;function p(p,d){var v,g=i(d);if(g>e){var y=h(t-1,f(0,u((p+b)/s)));(v=Lt(p+=b*(t-1)/t-y*s,g))[0]=v[0]*M/r-M*(t-1)/(2*t)+y*M/t,v[1]=n+4*(v[1]-a)*o/M,d<0&&(v[1]=-v[1])}else v=Ve(p,d);return v[0]*=l,v[1]/=c,v}return p.invert=function(e,p){e/=l;var d=i(p*=c);if(d>n){var v=h(t-1,f(0,u((e+b)/s)));e=(e+b*(t-1)/t-v*s)*r/M;var g=Lt.invert(e,.25*(d-n)*M/o+a);return g[0]-=b*(t-1)/t-v*s,p<0&&(g[1]=-g[1]),g}return Ve.invert(e,p)},p}function qe(t,e){return[t,1&e?89.999999:Ue]}function Ge(t,e){return[t,1&e?-89.999999:-Ue]}function Ze(t){return[.999999*t[0],t[1]]}function Ye(){var t=4,e=(0,n.r)(He),r=e(t),i=r.stream;return r.lobes=function(r){return arguments.length?e(t=+r):t},r.stream=function(e){var n=r.rotate(),a=i(e),o=(r.rotate([0,0]),i(e));return r.rotate(n),a.sphere=function(){var e,r;(0,je.Z)((e=180/t,r=[].concat((0,Ne.w6)(-180,180+e/2,e).map(qe),(0,Ne.w6)(180,-180-e/2,-e).map(Ge)),{type:"Polygon",coordinates:[180===e?r.map(Ze):r]}),o)},a},r.scale(239.75)}function We(t){var e,r=1+t,n=L(g(1/r)),a=2*P(b/(e=b+4*n*r)),l=.5*a*(r+P(t*(2+t))),u=t*t,c=r*r;function f(f,h){var p,d,v=1-g(h);if(v&&v<2){var y,m=_-h,w=25;do{var T=g(m),k=s(m),A=n+o(T,r-k),M=1+c-2*r*k;m-=y=(m-u*n-r*T+M*A-.5*v*e)/(2*r*T*A)}while(i(y)>x&&--w>0);p=a*P(M),d=f*A/b}else p=a*(t+v),d=f*n/b;return[p*g(d),l-p*s(d)]}return f.invert=function(t,i){var s=t*t+(i-=l)*i,f=(1+c-s/(a*a))/(2*r),h=C(f),p=g(h),d=n+o(p,r-f);return[L(t/P(s))*b/d,L(1-2*(h-u*n-r*p+(1+c-2*r*f)*d)/e)]},f}function Xe(){var t=1,e=(0,n.r)(We),r=e(t);return r.ratio=function(r){return arguments.length?e(t=+r):t},r.scale(167.774).center([0,18.67])}var Je=.7109889596207567,Ke=.0528035274542;function $e(t,e){return e>-Je?((t=at(t,e))[1]+=Ke,t):ht(t,e)}function Qe(){return(0,n.Z)($e).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function tr(t,e){return i(e)>Je?((t=at(t,e))[1]-=e>0?Ke:-Ke,t):ht(t,e)}function er(){return(0,n.Z)(tr).scale(152.63)}function rr(t,e,r,n){var i=P(4*b/(2*r+(1+t-e/2)*g(2*r)+(t+e)/2*g(4*r)+e/2*g(6*r))),a=P(n*g(r)*P((1+t*s(2*r)+e*s(4*r))/(1+t+e))),o=r*u(1);function l(r){return P(1+t*s(2*r)+e*s(4*r))}function u(n){var i=n*r;return(2*i+(1+t-e/2)*g(2*i)+(t+e)/2*g(4*i)+e/2*g(6*i))/r}function c(t){return l(t)*g(t)}var f=function(t,e){var n=r*Q(u,o*g(e)/r,e/b);isNaN(n)&&(n=r*v(e));var c=i*l(n);return[c*a*t/b*s(n),c/a*g(n)]};return f.invert=function(t,e){var n=Q(c,e*a/i);return[t*b/(s(n)*i*a*l(n)),L(r*u(n/r)/o)]},0===r&&(i=P(n/b),(f=function(t,e){return[t*i,g(e)/i]}).invert=function(t,e){return[t/i,L(e*i)]}),f}function nr(){var t=1,e=0,r=45*E,i=2,a=(0,n.r)(rr),o=a(t,e,r,i);return o.a=function(n){return arguments.length?a(t=+n,e,r,i):t},o.b=function(n){return arguments.length?a(t,e=+n,r,i):e},o.psiMax=function(n){return arguments.length?a(t,e,r=+n*E,i):r*S},o.ratio=function(n){return arguments.length?a(t,e,r,i=+n):i},o.scale(180.739)}function ir(t,e,r,n,i,a,o,s,l,u,c){if(c.nanEncountered)return NaN;var f,h,p,d,v,g,y,m,x,b;if(h=t(e+.25*(f=r-e)),p=t(r-.25*f),isNaN(h))c.nanEncountered=!0;else{if(!isNaN(p))return b=((g=(d=f*(n+4*h+i)/12)+(v=f*(i+4*p+a)/12))-o)/15,u>l?(c.maxDepthCount++,g+b):Math.abs(b)t?r=n:e=n,n=e+r>>1}while(n>e);var i=u[n+1]-u[n];return i&&(i=(t-u[n+1])/i),(n+1+i)/s}var h=2*f(1)/b*o/r,d=function(t,e){var r=f(i(g(e))),a=n(r)*t;return r/=h,[a,e>=0?r:-r]};return d.invert=function(t,e){var r;return i(e*=h)<1&&(r=v(e)*L(a(i(e))*o)),[t/n(i(e)),r]},d}function sr(){var t=0,e=2.5,r=1.183136,i=(0,n.r)(or),a=i(t,e,r);return a.alpha=function(n){return arguments.length?i(t=+n,e,r):t},a.k=function(n){return arguments.length?i(t,e=+n,r):e},a.gamma=function(n){return arguments.length?i(t,e,r=+n):r},a.scale(152.63)}function lr(t,e){return i(t[0]-e[0])=0;--s)r=(e=t[1][s])[0][0],n=e[0][1],i=e[1][1],a=e[2][0],o=e[2][1],l.push(ur([[a-m,o-m],[a-m,i+m],[r+m,i+m],[r+m,n-m]],30));return{type:"Polygon",coordinates:[(0,Ne.TS)(l)]}}function fr(t,e,r){var i,a;function o(r,n){for(var i=n<0?-1:1,a=e[+(n<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=t(r-a[o][1][0],n);return l[0]+=t(a[o][1][0],i*n>i*a[o][0][1]?a[o][0][1]:n)[0],l}r?o.invert=r(o):t.invert&&(o.invert=function(r,n){for(var i=a[+(n<0)],s=e[+(n<0)],l=0,u=i.length;lo&&(r=a,a=o,o=r),[[n,a],[i,o]]}))})),s):e.map((function(t){return t.map((function(t){return[[t[0][0]*S,t[0][1]*S],[t[1][0]*S,t[1][1]*S],[t[2][0]*S,t[2][1]*S]]}))}))},null!=e&&s.lobes(e),s}$e.invert=function(t,e){return e>-Je?at.invert(t,e-Ke):ht.invert(t,e)},tr.invert=function(t,e){return i(e)>Je?at.invert(t,e+(e>0?Ke:-Ke)):ht.invert(t,e)};var hr=[[[[-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 pr(){return fr(ut,hr).scale(160.857)}var dr=[[[[-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 vr(){return fr(tr,dr).scale(152.63)}var gr=[[[[-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 yr(){return fr(at,gr).scale(169.529)}var mr=[[[[-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 xr(){return fr(at,mr).scale(169.529).rotate([20,0])}var br=[[[[-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 _r(){return fr($e,br,tt).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var wr=[[[[-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 Tr(){return fr(ht,wr).scale(152.63).rotate([-20,0])}function kr(t,e){return[3/M*t*P(b*b/3-e*e),e]}function Ar(){return(0,n.Z)(kr).scale(158.837)}function Mr(t){function e(e,r){if(i(i(r)-_)2)return null;var a=(e/=2)*e,s=(r/=2)*r,l=2*r/(1+a+s);return l=p((1+l)/(1-l),1/t),[o(2*e,1-a-s)/t,L((l-1)/(l+1))]},e}function Sr(){var t=.5,e=(0,n.r)(Mr),r=e(t);return r.spacing=function(r){return arguments.length?e(t=+r):t},r.scale(124.75)}kr.invert=function(t,e){return[M/3*t/P(b*b/3-e*e),e]};var Er=b/k;function Lr(t,e){return[t*(1+P(s(e)))/2,e/(s(e/2)*s(t/6))]}function Cr(){return(0,n.Z)(Lr).scale(97.2672)}function Pr(t,e){var r=t*t,n=e*e;return[t*(.975534+n*(-.0143059*r-.119161+-.0547009*n)),e*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function Or(){return(0,n.Z)(Pr).scale(139.98)}function Ir(t,e){return[g(t)/s(e),y(e)*s(t)]}function Dr(){return(0,n.Z)(Ir).scale(144.049).clipAngle(89.999)}function zr(t){var e=s(t),r=y(w+t/2);function n(n,a){var o=a-t,s=i(o)=0;)h=(f=t[c])[0]+l*(i=h)-u*p,p=f[1]+l*p+u*i;return[h=l*(i=h)-u*p,p=l*p+u*i]}return r.invert=function(r,n){var l=20,u=r,c=n;do{for(var f,h=e,p=t[h],d=p[0],v=p[1],y=0,m=0;--h>=0;)y=d+u*(f=y)-c*m,m=v+u*m+c*f,d=(p=t[h])[0]+u*(f=d)-c*v,v=p[1]+u*v+c*f;var x,b,_=(y=d+u*(f=y)-c*m)*y+(m=v+u*m+c*f)*m;u-=x=((d=u*(f=d)-c*v-r)*y+(v=u*v+c*f-n)*m)/_,c-=b=(v*y-d*m)/_}while(i(x)+i(b)>1e-12&&--l>0);if(l){var w=P(u*u+c*c),T=2*a(.5*w),k=g(T);return[o(u*k,w*s(T)),w?L(c*k/w):0]}},r}Lr.invert=function(t,e){var r=i(t),n=i(e),a=m,o=_;nm||i(x)>m)&&--a>0);return a&&[r,n]},Ir.invert=function(t,e){var r=t*t,n=e*e+1,i=r+n,a=t?T*P((i-P(i*i-4*r))/r):1/P(n);return[L(t*a),v(e)*C(a)]},Fr.invert=function(t,e){return[t,2.5*a(l(.8*e))-.625*b]};var jr=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Ur=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Vr=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Hr=[[.9245,0],[0,0],[.01943,0]],qr=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Gr(){return Jr(jr,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Zr(){return Jr(Ur,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Yr(){return Jr(Vr,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Wr(){return Jr(Hr,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Xr(){return Jr(qr,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Jr(t,e){var r=(0,n.Z)(Nr(t)).rotate(e).clipAngle(90),i=(0,_t.Z)(e),a=r.center;return delete r.rotate,r.center=function(t){return arguments.length?a(i(t)):i.invert(a())},r}var Kr=P(6),$r=P(7);function Qr(t,e){var r=L(7*g(e)/(3*Kr));return[Kr*t*(2*s(2*r/3)-1)/$r,9*g(r/3)/$r]}function tn(){return(0,n.Z)(Qr).scale(164.859)}function en(t,e){for(var r,n=(1+T)*g(e),a=e,o=0;o<25&&(a-=r=(g(a/2)+g(a)-n)/(.5*s(a/2)+s(a)),!(i(r)x&&--l>0);return[t/(.84719-.13063*(n=s*s)+(o=n*(a=n*n))*o*(.05494*n-.04515-.02326*a+.00331*o)),s]},un.invert=function(t,e){for(var r=e/2,n=0,a=1/0;n<10&&i(a)>m;++n){var o=s(e/2);e-=a=(e-y(e/2)-r)/(1-.5/(o*o))}return[2*t/(1+s(e)),e]};var fn=[[[[-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 hn(){return fr(J(1/0),fn).rotate([20,0]).scale(152.63)}function pn(t,e){var r=g(e),n=s(e),a=v(t);if(0===t||i(e)===_)return[0,e];if(0===e)return[t,0];if(i(t)===_)return[t*n,_*r];var o=b/(2*t)-2*t/b,l=2*e/b,u=(1-l*l)/(r-l),c=o*o,f=u*u,h=1+c/f,p=1+f/c,d=(o*r/u-o/2)/h,y=(f*r/c+u/2)/p,m=y*y-(f*r*r/c+u*r-1)/p;return[_*(d+P(d*d+n*n/h)*a),_*(y+P(m<0?0:m)*v(-e*o)*a)]}function dn(){return(0,n.Z)(pn).scale(127.267)}pn.invert=function(t,e){var r=(t/=_)*t,n=r+(e/=_)*e,i=b*b;return[t?(n-1+P((1-n)*(1-n)+4*r))/(2*t)*_:0,Q((function(t){return n*(b*g(t)-2*t)*b+4*t*t*(e-g(t))+2*b*t-i*e}),0)]};var vn=1.0148,gn=.23185,yn=-.14499,mn=.02406,xn=1.790857183;function bn(t,e){var r=e*e;return[t,e*(vn+r*r*(gn+r*(yn+mn*r)))]}function _n(){return(0,n.Z)(bn).scale(139.319)}function wn(t,e){if(i(e)xn?e=xn:e<-1.790857183&&(e=-1.790857183);var r,n=e;do{var a=n*n;n-=r=(n*(vn+a*a*(gn+a*(yn+mn*a)))-e)/(1.0148+a*a*(1.1592500000000001+a*(.21654*a-1.01493)))}while(i(r)>m);return[t,n]},wn.invert=function(t,e){if(i(e)m&&--o>0);return l=y(a),[(i(e)=0;)if(n=e[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(e.face,r.face),i=(c=n.map(r.project),f=n.map(e.project),h=Sn(c[1],c[0]),p=Sn(f[1],f[0]),d=function(t,e){return o(t[0]*e[1]-t[1]*e[0],t[0]*e[0]+t[1]*e[1])}(h,p),v=En(h)/En(p),Mn([1,0,c[0][0],0,1,c[0][1]],Mn([v,0,0,0,v,0],Mn([s(d),g(d),0,-g(d),s(d),0],[1,0,-f[0][0],0,1,-f[0][1]]))));e.transform=r.transform?Mn(r.transform,i):i;for(var a=r.edges,l=0,u=a.length;l0?[-e[0],0]:[180-e[0],180])};var e=zn.map((function(e){return{face:e,project:t(e)}}));return[-1,0,0,1,0,1,4,5].forEach((function(t,r){var n=e[t];n&&(n.children||(n.children=[])).push(e[r])})),Ln(e[0],(function(t,r){return e[t<-b/2?r<0?6:4:t<0?r<0?2:0:tn^p>n&&r<(h-u)*(n-c)/(p-c)+u&&(i=!i)}return i}(t[0],r))return t.push(e),!0}))||t.push([e])})),Jn=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}};function ti(t){var e=t(_,0)[0]-t(-_,0)[0];function r(r,n){var a=i(r)<_,o=t(a?r:r>0?r-b:r+b,n),s=(o[0]-o[1])*T,l=(o[0]+o[1])*T;if(a)return[s,l];var u=e*T,c=s>0^l>0?-1:1;return[c*s-v(l)*u,c*l-v(s)*u]}return t.invert&&(r.invert=function(r,n){var a=(r+n)*T,o=(n-r)*T,s=i(a)<.5*e&&i(o)<.5*e;if(!s){var l=e*T,u=a>0^o>0?-1:1,c=-u*r+(o>0?1:-1)*l,f=-u*n+(a>0?1:-1)*l;a=(-c-f)*T,o=(c-f)*T}var h=t.invert(a,o);return s||(h[0]+=a>0?b:-b),h}),(0,n.Z)(r).rotate([-90,-90,45]).clipAngle(179.999)}function ei(){return ti(Le).scale(176.423)}function ri(){return ti(Ie).scale(111.48)}function ni(t,e){if(!(0<=(e=+e)&&e<=20))throw new Error("invalid digits");function r(t){var r=t.length,n=2,i=new Array(r);for(i[0]=+t[0].toFixed(e),i[1]=+t[1].toFixed(e);n2||a[0]!=e[0]||a[1]!=e[1])&&(n.push(a),e=a)}return 1===n.length&&t.length>1&&n.push(r(t[t.length-1])),n}function a(t){return t.map(i)}function o(t){if(null==t)return t;var e;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(o)};break;case"Point":e={type:"Point",coordinates:r(t.coordinates)};break;case"MultiPoint":e={type:t.type,coordinates:n(t.coordinates)};break;case"LineString":e={type:t.type,coordinates:i(t.coordinates)};break;case"MultiLineString":case"Polygon":e={type:t.type,coordinates:a(t.coordinates)};break;case"MultiPolygon":e={type:"MultiPolygon",coordinates:t.coordinates.map(a)};break;default:return t}return null!=t.bbox&&(e.bbox=t.bbox),e}function s(t){var e={type:"Feature",properties:t.properties,geometry:o(t.geometry)};return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),e}if(null!=t)switch(t.type){case"Feature":return s(t);case"FeatureCollection":var l={type:"FeatureCollection",features:t.features.map(s)};return null!=t.bbox&&(l.bbox=t.bbox),l;default:return o(t)}return t}function ii(t){var e=g(t);function r(r,n){var i=e?y(r*e/2)/e:r/2;if(!n)return[2*i,-t];var o=2*a(i*g(n)),l=1/y(n);return[g(o)*l,n+(1-s(o))*l-t]}return r.invert=function(r,n){if(i(n+=t)m&&--c>0);var d=r*(f=y(u)),v=y(i(n)0?_:-_)*(f+o*(d-l)/2+o*o*(d-2*f+l)/2)]}function li(){return(0,n.Z)(si).scale(152.63)}function ui(t,e){var r=function(t){function e(e,r){var n=s(r),i=(t-1)/(t-n*s(e));return[i*n*g(e),i*g(r)]}return e.invert=function(e,r){var n=e*e+r*r,i=P(n),a=(t-P(1-n*(t+1)/(t-1)))/((t-1)/i+i/(t-1));return[o(e*a,i*P(1-a*a)),i?L(r*a/i):0]},e}(t);if(!e)return r;var n=s(e),i=g(e);function a(e,a){var o=r(e,a),s=o[1],l=s*i/(t-1)+n;return[o[0]*n/l,s/l]}return a.invert=function(e,a){var o=(t-1)/(t-1-a*i);return r.invert(o*e,o*a*n)},a}function ci(){var t=2,e=0,r=(0,n.r)(ui),i=r(t,e);return i.distance=function(n){return arguments.length?r(t=+n,e):t},i.tilt=function(n){return arguments.length?r(t,e=n*E):e*S},i.scale(432.147).clipAngle(C(1/t)*S-1e-6)}oi.forEach((function(t){t[1]*=1.0144})),si.invert=function(t,e){var r=e/_,n=90*r,a=h(18,i(n/5)),o=f(0,u(a));do{var s=oi[o][1],l=oi[o+1][1],c=oi[h(19,o+2)][1],p=c-s,d=c-2*l+s,v=2*(i(r)-l)/p,g=d/p,y=v*(1-g*v*(1-2*g*v));if(y>=0||1===o){n=(e>=0?5:-5)*(y+a);var m,b=50;do{y=(a=h(18,i(n)/5))-(o=u(a)),s=oi[o][1],l=oi[o+1][1],c=oi[h(19,o+2)][1],n-=(m=(e>=0?_:-_)*(l+y*(c-s)/2+y*y*(c-2*l+s)/2)-e)*S}while(i(m)>x&&--b>0);break}}while(--o>=0);var w=oi[o][0],T=oi[o+1][0],k=oi[h(19,o+2)][0];return[t/(T+y*(k-w)/2+y*y*(k-2*T+w)/2),n*E]};var fi=-179.9999,hi=179.9999,pi=-89.9999,di=89.9999;function vi(t){return t.length>0}function gi(t){return-90===t||90===t?[0,t]:[-180,(e=t,Math.floor(1e4*e)/1e4)];var e}function yi(t){var e=t[0],r=t[1],n=!1;return e<=fi?(e=-180,n=!0):e>=hi&&(e=180,n=!0),r<=pi?(r=-90,n=!0):r>=di&&(r=90,n=!0),n?[e,r]:t}function mi(t){return t.map(yi)}function xi(t,e,r){for(var n=0,i=t.length;n=hi||c<=pi||c>=di){a[o]=yi(l);for(var f=o+1;ffi&&ppi&&d=s)break;r.push({index:-1,polygon:e,ring:a=a.slice(f-1)}),a[0]=gi(a[0][1]),o=-1,s=a.length}}}}function bi(t){var e,r,n,i,a,o,s=t.length,l={},u={};for(e=0;e0?b-l:l)*S],c=(0,n.Z)(t(s)).rotate(u),f=(0,_t.Z)(u),h=c.center;return delete c.rotate,c.center=function(t){return arguments.length?h(f(t)):f.invert(h())},c.clipAngle(90)}function Si(t){var e=s(t);function r(t,r){var n=(0,In.M)(t,r);return n[0]*=e,n}return r.invert=function(t,r){return In.M.invert(t/e,r)},r}function Ei(){return Li([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Li(t,e){return Mi(Si,t,e)}function Ci(t){if(!(t*=2))return Z.N;var e=-t/2,r=-e,n=t*t,i=y(r),a=.5/g(r);function l(i,a){var o=C(s(a)*s(i-e)),l=C(s(a)*s(i-r));return[((o*=o)-(l*=l))/(2*t),(a<0?-1:1)*P(4*n*l-(n-o+l)*(n-o+l))/(2*t)]}return l.invert=function(t,n){var l,u,c=n*n,f=s(P(c+(l=t+e)*l)),h=s(P(c+(l=t+r)*l));return[o(u=f-h,l=(f+h)*i),(n<0?-1:1)*C(P(l*l+u*u)*a)]},l}function Pi(){return Oi([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Oi(t,e){return Mi(Ci,t,e)}function Ii(t,e){if(i(e)m&&--l>0);return[v(t)*(P(a*a+4)+a)*b/4,_*s]};var qi=4*b+3*P(3),Gi=2*P(2*b*P(3)/qi),Zi=it(Gi*P(3)/b,Gi,qi/6);function Yi(){return(0,n.Z)(Zi).scale(176.84)}function Wi(t,e){return[t*P(1-3*e*e/(b*b)),e]}function Xi(){return(0,n.Z)(Wi).scale(152.63)}function Ji(t,e){var r=s(e),n=s(t)*r,i=1-n,a=s(t=o(g(t)*r,-g(e))),l=g(t);return[l*(r=P(1-n*n))-a*i,-a*r-l*i]}function Ki(){return(0,n.Z)(Ji).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function $i(t,e){var r=R(t,e);return[(r[0]+t/_)/2,(r[1]+e)/2]}function Qi(){return(0,n.Z)($i).scale(158.837)}Wi.invert=function(t,e){return[t/P(1-3*e*e/(b*b)),e]},Ji.invert=function(t,e){var r=(t*t+e*e)/-2,n=P(-r*(2+r)),i=e*r+t*n,a=t*r-e*n,s=P(a*a+i*i);return[o(n*i,s*(1+r)),s?-L(n*a/s):0]},$i.invert=function(t,e){var r=t,n=e,a=25;do{var o,l=s(n),u=g(n),c=g(2*n),f=u*u,h=l*l,p=g(r),d=s(r/2),v=g(r/2),y=v*v,x=1-h*d*d,b=x?C(l*d)*P(o=1/x):o=0,w=.5*(2*b*l*v+r/_)-t,T=.5*(b*u+n)-e,k=.5*o*(h*y+b*l*d*f)+.5/_,A=o*(p*c/4-b*u*v),M=.125*o*(c*v-b*u*h*p),S=.5*o*(f*d+b*y*l)+.5,E=A*M-S*k,L=(T*A-w*S)/E,O=(w*M-T*k)/E;r-=L,n-=O}while((i(L)>m||i(O)>m)&&--a>0);return[r,n]}},33940:function(t,e,r){"use strict";function n(){return new i}function i(){this.reset()}r.d(e,{Z:function(){return n}}),i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(t){o(a,t,this.t),o(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new i;function o(t,e,r){var n=t.s=e+r,i=n-e,a=n-i;t.t=e-a+(r-i)}},97860:function(t,e,r){"use strict";r.d(e,{L9:function(){return h},ZP:function(){return x},gL:function(){return d}});var n,i,a,o,s,l=r(33940),u=r(39695),c=r(73182),f=r(72736),h=(0,l.Z)(),p=(0,l.Z)(),d={point:c.Z,lineStart:c.Z,lineEnd:c.Z,polygonStart:function(){h.reset(),d.lineStart=v,d.lineEnd=g},polygonEnd:function(){var t=+h;p.add(t<0?u.BZ+t:t),this.lineStart=this.lineEnd=this.point=c.Z},sphere:function(){p.add(u.BZ)}};function v(){d.point=y}function g(){m(n,i)}function y(t,e){d.point=m,n=t,i=e,t*=u.uR,e*=u.uR,a=t,o=(0,u.mC)(e=e/2+u.pu),s=(0,u.O$)(e)}function m(t,e){t*=u.uR,e=(e*=u.uR)/2+u.pu;var r=t-a,n=r>=0?1:-1,i=n*r,l=(0,u.mC)(e),c=(0,u.O$)(e),f=s*c,p=o*l+f*(0,u.mC)(i),d=f*n*(0,u.O$)(i);h.add((0,u.fv)(d,p)),a=t,o=l,s=c}function x(t){return p.reset(),(0,f.Z)(t,d),2*p}},77338:function(t,e,r){"use strict";r.d(e,{Z:function(){return C}});var n,i,a,o,s,l,u,c,f,h,p=r(33940),d=r(97860),v=r(7620),g=r(39695),y=r(72736),m=(0,p.Z)(),x={point:b,lineStart:w,lineEnd:T,polygonStart:function(){x.point=k,x.lineStart=A,x.lineEnd=M,m.reset(),d.gL.polygonStart()},polygonEnd:function(){d.gL.polygonEnd(),x.point=b,x.lineStart=w,x.lineEnd=T,d.L9<0?(n=-(a=180),i=-(o=90)):m>g.Ho?o=90:m<-g.Ho&&(i=-90),h[0]=n,h[1]=a},sphere:function(){n=-(a=180),i=-(o=90)}};function b(t,e){f.push(h=[n=t,a=t]),eo&&(o=e)}function _(t,e){var r=(0,v.Og)([t*g.uR,e*g.uR]);if(c){var l=(0,v.T5)(c,r),u=[l[1],-l[0],0],p=(0,v.T5)(u,l);(0,v.iJ)(p),p=(0,v.Y1)(p);var d,y=t-s,m=y>0?1:-1,x=p[0]*g.RW*m,b=(0,g.Wn)(y)>180;b^(m*so&&(o=d):b^(m*s<(x=(x+360)%360-180)&&xo&&(o=e)),b?tS(n,a)&&(a=t):S(t,a)>S(n,a)&&(n=t):a>=n?(ta&&(a=t)):t>s?S(n,t)>S(n,a)&&(a=t):S(t,a)>S(n,a)&&(n=t)}else f.push(h=[n=t,a=t]);eo&&(o=e),c=r,s=t}function w(){x.point=_}function T(){h[0]=n,h[1]=a,x.point=b,c=null}function k(t,e){if(c){var r=t-s;m.add((0,g.Wn)(r)>180?r+(r>0?360:-360):r)}else l=t,u=e;d.gL.point(t,e),_(t,e)}function A(){d.gL.lineStart()}function M(){k(l,u),d.gL.lineEnd(),(0,g.Wn)(m)>g.Ho&&(n=-(a=180)),h[0]=n,h[1]=a,c=null}function S(t,e){return(e-=t)<0?e+360:e}function E(t,e){return t[0]-e[0]}function L(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eS(s[0],s[1])&&(s[1]=l[1]),S(l[0],s[1])>S(s[0],s[1])&&(s[0]=l[0])):u.push(s=l);for(c=-1/0,e=0,s=u[r=u.length-1];e<=r;s=l,++e)l=u[e],(p=S(s[1],l[0]))>c&&(c=p,n=l[0],a=s[1])}return f=h=null,n===1/0||i===1/0?[[NaN,NaN],[NaN,NaN]]:[[n,i],[a,o]]}},7620:function(t,e,r){"use strict";r.d(e,{Og:function(){return a},T:function(){return u},T5:function(){return s},Y1:function(){return i},iJ:function(){return c},j9:function(){return o},s0:function(){return l}});var n=r(39695);function i(t){return[(0,n.fv)(t[1],t[0]),(0,n.ZR)(t[2])]}function a(t){var e=t[0],r=t[1],i=(0,n.mC)(r);return[i*(0,n.mC)(e),i*(0,n.O$)(e),(0,n.O$)(r)]}function o(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function s(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function l(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function u(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function c(t){var e=(0,n._b)(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}},66624:function(t,e,r){"use strict";r.d(e,{Z:function(){return I}});var n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x=r(39695),b=r(73182),_=r(72736),w={sphere:b.Z,point:T,lineStart:A,lineEnd:E,polygonStart:function(){w.lineStart=L,w.lineEnd=C},polygonEnd:function(){w.lineStart=A,w.lineEnd=E}};function T(t,e){t*=x.uR,e*=x.uR;var r=(0,x.mC)(e);k(r*(0,x.mC)(t),r*(0,x.O$)(t),(0,x.O$)(e))}function k(t,e,r){++n,a+=(t-a)/n,o+=(e-o)/n,s+=(r-s)/n}function A(){w.point=M}function M(t,e){t*=x.uR,e*=x.uR;var r=(0,x.mC)(e);g=r*(0,x.mC)(t),y=r*(0,x.O$)(t),m=(0,x.O$)(e),w.point=S,k(g,y,m)}function S(t,e){t*=x.uR,e*=x.uR;var r=(0,x.mC)(e),n=r*(0,x.mC)(t),a=r*(0,x.O$)(t),o=(0,x.O$)(e),s=(0,x.fv)((0,x._b)((s=y*o-m*a)*s+(s=m*n-g*o)*s+(s=g*a-y*n)*s),g*n+y*a+m*o);i+=s,l+=s*(g+(g=n)),u+=s*(y+(y=a)),c+=s*(m+(m=o)),k(g,y,m)}function E(){w.point=T}function L(){w.point=P}function C(){O(d,v),w.point=T}function P(t,e){d=t,v=e,t*=x.uR,e*=x.uR,w.point=O;var r=(0,x.mC)(e);g=r*(0,x.mC)(t),y=r*(0,x.O$)(t),m=(0,x.O$)(e),k(g,y,m)}function O(t,e){t*=x.uR,e*=x.uR;var r=(0,x.mC)(e),n=r*(0,x.mC)(t),a=r*(0,x.O$)(t),o=(0,x.O$)(e),s=y*o-m*a,d=m*n-g*o,v=g*a-y*n,b=(0,x._b)(s*s+d*d+v*v),_=(0,x.ZR)(b),w=b&&-_/b;f+=w*s,h+=w*d,p+=w*v,i+=_,l+=_*(g+(g=n)),u+=_*(y+(y=a)),c+=_*(m+(m=o)),k(g,y,m)}function I(t){n=i=a=o=s=l=u=c=f=h=p=0,(0,_.Z)(t,w);var e=f,r=h,d=p,v=e*e+r*r+d*d;return v0?os)&&(o+=i*a.BZ));for(var h,p=o;i>0?p>s:p0?i.pi:-i.pi,u=(0,i.Wn)(o-r);(0,i.Wn)(u-i.pi)0?i.ou:-i.ou),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(l,n),t.point(o,n),e=0):a!==l&&u>=i.pi&&((0,i.Wn)(r-a)i.Ho?(0,i.z4)(((0,i.O$)(e)*(o=(0,i.mC)(n))*(0,i.O$)(r)-(0,i.O$)(n)*(a=(0,i.mC)(e))*(0,i.O$)(t))/(a*o*s)):(e+n)/2}(r,n,o,s),t.point(a,n),t.lineEnd(),t.lineStart(),t.point(l,n),e=0),t.point(r=o,n=s),a=l},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var a;if(null==t)a=r*i.ou,n.point(-i.pi,a),n.point(0,a),n.point(i.pi,a),n.point(i.pi,0),n.point(i.pi,-a),n.point(0,-a),n.point(-i.pi,-a),n.point(-i.pi,0),n.point(-i.pi,a);else if((0,i.Wn)(t[0]-e[0])>i.Ho){var o=t[0]1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}},1457:function(t,e,r){"use strict";r.d(e,{Z:function(){return l}});var n=r(7620),i=r(7613),a=r(39695),o=r(67108),s=r(97023);function l(t){var e=(0,a.mC)(t),r=6*a.uR,l=e>0,u=(0,a.Wn)(e)>a.Ho;function c(t,r){return(0,a.mC)(t)*(0,a.mC)(r)>e}function f(t,r,i){var o=(0,n.Og)(t),s=(0,n.Og)(r),l=[1,0,0],u=(0,n.T5)(o,s),c=(0,n.j9)(u,u),f=u[0],h=c-f*f;if(!h)return!i&&t;var p=e*c/h,d=-e*f/h,v=(0,n.T5)(l,u),g=(0,n.T)(l,p),y=(0,n.T)(u,d);(0,n.s0)(g,y);var m=v,x=(0,n.j9)(g,m),b=(0,n.j9)(m,m),_=x*x-b*((0,n.j9)(g,g)-1);if(!(_<0)){var w=(0,a._b)(_),T=(0,n.T)(m,(-x-w)/b);if((0,n.s0)(T,g),T=(0,n.Y1)(T),!i)return T;var k,A=t[0],M=r[0],S=t[1],E=r[1];M0^T[1]<((0,a.Wn)(T[0]-A)a.pi^(A<=T[0]&&T[0]<=M)){var P=(0,n.T)(m,(-x+w)/b);return(0,n.s0)(P,g),[T,(0,n.Y1)(P)]}}}function h(e,r){var n=l?t:a.pi-t,i=0;return e<-n?i|=1:e>n&&(i|=2),r<-n?i|=4:r>n&&(i|=8),i}return(0,s.Z)(c,(function(t){var e,r,n,i,s;return{lineStart:function(){i=n=!1,s=1},point:function(p,d){var v,g=[p,d],y=c(p,d),m=l?y?0:h(p,d):y?h(p+(p<0?a.pi:-a.pi),d):0;if(!e&&(i=n=y)&&t.lineStart(),y!==n&&(!(v=f(e,g))||(0,o.Z)(e,v)||(0,o.Z)(g,v))&&(g[2]=1),y!==n)s=0,y?(t.lineStart(),v=f(g,e),t.point(v[0],v[1])):(v=f(e,g),t.point(v[0],v[1],2),t.lineEnd()),e=v;else if(u&&e&&l^y){var x;m&r||!(x=f(g,e,!0))||(s=0,l?(t.lineStart(),t.point(x[0][0],x[0][1]),t.point(x[1][0],x[1][1]),t.lineEnd()):(t.point(x[1][0],x[1][1]),t.lineEnd(),t.lineStart(),t.point(x[0][0],x[0][1],3)))}!y||e&&(0,o.Z)(e,g)||t.point(g[0],g[1]),e=g,n=y,r=m},lineEnd:function(){n&&t.lineEnd(),e=null},clean:function(){return s|(i&&n)<<1}}}),(function(e,n,a,o){(0,i.m)(o,t,r,a,e,n)}),l?[0,-t]:[-a.pi,t-a.pi])}},97023:function(t,e,r){"use strict";r.d(e,{Z:function(){return l}});var n=r(85272),i=r(46225),a=r(39695),o=r(23071),s=r(33064);function l(t,e,r,a){return function(l){var f,h,p,d=e(l),v=(0,n.Z)(),g=e(v),y=!1,m={point:x,lineStart:_,lineEnd:w,polygonStart:function(){m.point=T,m.lineStart=k,m.lineEnd=A,h=[],f=[]},polygonEnd:function(){m.point=x,m.lineStart=_,m.lineEnd=w,h=(0,s.TS)(h);var t=(0,o.Z)(f,a);h.length?(y||(l.polygonStart(),y=!0),(0,i.Z)(h,c,t,r,l)):t&&(y||(l.polygonStart(),y=!0),l.lineStart(),r(null,null,1,l),l.lineEnd()),y&&(l.polygonEnd(),y=!1),h=f=null},sphere:function(){l.polygonStart(),l.lineStart(),r(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function x(e,r){t(e,r)&&l.point(e,r)}function b(t,e){d.point(t,e)}function _(){m.point=b,d.lineStart()}function w(){m.point=x,d.lineEnd()}function T(t,e){p.push([t,e]),g.point(t,e)}function k(){g.lineStart(),p=[]}function A(){T(p[0][0],p[0][1]),g.lineEnd();var t,e,r,n,i=g.clean(),a=v.result(),o=a.length;if(p.pop(),f.push(p),p=null,o)if(1&i){if((e=(r=a[0]).length-1)>0){for(y||(l.polygonStart(),y=!0),l.lineStart(),t=0;t1&&2&i&&a.push(a.pop().concat(a.shift())),h.push(a.filter(u))}return m}}function u(t){return t.length>1}function c(t,e){return((t=t.x)[0]<0?t[1]-a.ou-a.Ho:a.ou-t[1])-((e=e.x)[0]<0?e[1]-a.ou-a.Ho:a.ou-e[1])}},87605:function(t,e,r){"use strict";r.d(e,{Z:function(){return u}});var n=r(39695),i=r(85272),a=r(46225),o=r(33064),s=1e9,l=-s;function u(t,e,r,u){function c(n,i){return t<=n&&n<=r&&e<=i&&i<=u}function f(n,i,a,o){var s=0,l=0;if(null==n||(s=h(n,a))!==(l=h(i,a))||d(n,i)<0^a>0)do{o.point(0===s||3===s?t:r,s>1?u:e)}while((s=(s+a+4)%4)!==l);else o.point(i[0],i[1])}function h(i,a){return(0,n.Wn)(i[0]-t)0?0:3:(0,n.Wn)(i[0]-r)0?2:1:(0,n.Wn)(i[1]-e)0?1:0:a>0?3:2}function p(t,e){return d(t.x,e.x)}function d(t,e){var r=h(t,1),n=h(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(n){var h,d,v,g,y,m,x,b,_,w,T,k=n,A=(0,i.Z)(),M={point:S,lineStart:function(){M.point=E,d&&d.push(v=[]),w=!0,_=!1,x=b=NaN},lineEnd:function(){h&&(E(g,y),m&&_&&A.rejoin(),h.push(A.result())),M.point=S,_&&k.lineEnd()},polygonStart:function(){k=A,h=[],d=[],T=!0},polygonEnd:function(){var e=function(){for(var e=0,r=0,n=d.length;ru&&(f-i)*(u-a)>(h-a)*(t-i)&&++e:h<=u&&(f-i)*(u-a)<(h-a)*(t-i)&&--e;return e}(),r=T&&e,i=(h=(0,o.TS)(h)).length;(r||i)&&(n.polygonStart(),r&&(n.lineStart(),f(null,null,1,n),n.lineEnd()),i&&(0,a.Z)(h,p,e,f,n),n.polygonEnd()),k=n,h=d=v=null}};function S(t,e){c(t,e)&&k.point(t,e)}function E(n,i){var a=c(n,i);if(d&&v.push([n,i]),w)g=n,y=i,m=a,w=!1,a&&(k.lineStart(),k.point(n,i));else if(a&&_)k.point(n,i);else{var o=[x=Math.max(l,Math.min(s,x)),b=Math.max(l,Math.min(s,b))],f=[n=Math.max(l,Math.min(s,n)),i=Math.max(l,Math.min(s,i))];!function(t,e,r,n,i,a){var o,s=t[0],l=t[1],u=0,c=1,f=e[0]-s,h=e[1]-l;if(o=r-s,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o0)){if(o/=h,h<0){if(o0){if(o>c)return;o>u&&(u=o)}if(o=a-l,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>u&&(u=o)}else if(h>0){if(o0&&(t[0]=s+u*f,t[1]=l+u*h),c<1&&(e[0]=s+c*f,e[1]=l+c*h),!0}}}}}(o,f,t,e,r,u)?a&&(k.lineStart(),k.point(n,i),T=!1):(_||(k.lineStart(),k.point(o[0],o[1])),k.point(f[0],f[1]),a||k.lineEnd(),T=!1)}x=n,b=i,_=a}return M}}},46225:function(t,e,r){"use strict";r.d(e,{Z:function(){return o}});var n=r(67108),i=r(39695);function a(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function o(t,e,r,o,l){var u,c,f=[],h=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,r,o=t[0],s=t[e];if((0,n.Z)(o,s)){if(!o[2]&&!s[2]){for(l.lineStart(),u=0;u=0;--u)l.point((d=p[u])[0],d[1]);else o(g.x,g.p.x,-1,l);g=g.p}p=(g=g.o).z,y=!y}while(!g.v);l.lineEnd()}}}function s(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n0&&(i=S(t[a],t[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))g.Ho})).map(l)).concat((0,F.w6)((0,g.mD)(a/p)*p,i,p).filter((function(t){return(0,g.Wn)(t%v)>g.Ho})).map(u))}return m.lines=function(){return x().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[c(n).concat(f(o).slice(1),c(r).reverse().slice(1),f(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(n=+t[0][0],r=+t[1][0],s=+t[0][1],o=+t[1][1],n>r&&(t=n,n=r,r=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[n,s],[r,o]]},m.extentMinor=function(r){return arguments.length?(e=+r[0][0],t=+r[1][0],a=+r[0][1],i=+r[1][1],e>t&&(r=e,e=t,t=r),a>i&&(r=a,a=i,i=r),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(d=+t[0],v=+t[1],m):[d,v]},m.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],m):[h,p]},m.precision=function(h){return arguments.length?(y=+h,l=B(a,i,90),u=N(e,t,y),c=B(s,o,90),f=N(n,r,y),m):y},m.extentMajor([[-180,-90+g.Ho],[180,90-g.Ho]]).extentMinor([[-180,-80-g.Ho],[180,80+g.Ho]])}function U(){return j()()}var V,H,q,G,Z=r(83074),Y=r(8593),W=(0,v.Z)(),X=(0,v.Z)(),J={point:y.Z,lineStart:y.Z,lineEnd:y.Z,polygonStart:function(){J.lineStart=K,J.lineEnd=tt},polygonEnd:function(){J.lineStart=J.lineEnd=J.point=y.Z,W.add((0,g.Wn)(X)),X.reset()},result:function(){var t=W/2;return W.reset(),t}};function K(){J.point=$}function $(t,e){J.point=Q,V=q=t,H=G=e}function Q(t,e){X.add(G*t-q*e),q=t,G=e}function tt(){Q(V,H)}var et,rt,nt,it,at=J,ot=r(3559),st=0,lt=0,ut=0,ct=0,ft=0,ht=0,pt=0,dt=0,vt=0,gt={point:yt,lineStart:mt,lineEnd:_t,polygonStart:function(){gt.lineStart=wt,gt.lineEnd=Tt},polygonEnd:function(){gt.point=yt,gt.lineStart=mt,gt.lineEnd=_t},result:function(){var t=vt?[pt/vt,dt/vt]:ht?[ct/ht,ft/ht]:ut?[st/ut,lt/ut]:[NaN,NaN];return st=lt=ut=ct=ft=ht=pt=dt=vt=0,t}};function yt(t,e){st+=t,lt+=e,++ut}function mt(){gt.point=xt}function xt(t,e){gt.point=bt,yt(nt=t,it=e)}function bt(t,e){var r=t-nt,n=e-it,i=(0,g._b)(r*r+n*n);ct+=i*(nt+t)/2,ft+=i*(it+e)/2,ht+=i,yt(nt=t,it=e)}function _t(){gt.point=yt}function wt(){gt.point=kt}function Tt(){At(et,rt)}function kt(t,e){gt.point=At,yt(et=nt=t,rt=it=e)}function At(t,e){var r=t-nt,n=e-it,i=(0,g._b)(r*r+n*n);ct+=i*(nt+t)/2,ft+=i*(it+e)/2,ht+=i,pt+=(i=it*t-nt*e)*(nt+t),dt+=i*(it+e),vt+=3*i,yt(nt=t,it=e)}var Mt=gt;function St(t){this._context=t}St.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,g.BZ)}},result:y.Z};var Et,Lt,Ct,Pt,Ot,It=(0,v.Z)(),Dt={point:y.Z,lineStart:function(){Dt.point=zt},lineEnd:function(){Et&&Rt(Lt,Ct),Dt.point=y.Z},polygonStart:function(){Et=!0},polygonEnd:function(){Et=null},result:function(){var t=+It;return It.reset(),t}};function zt(t,e){Dt.point=Rt,Lt=Pt=t,Ct=Ot=e}function Rt(t,e){Pt-=t,Ot-=e,It.add((0,g._b)(Pt*Pt+Ot*Ot)),Pt=t,Ot=e}var Ft=Dt;function Bt(){this._string=[]}function Nt(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function jt(t,e){var r,n,i=4.5;function a(t){return t&&("function"==typeof i&&n.pointRadius(+i.apply(this,arguments)),(0,m.Z)(t,r(n))),n.result()}return a.area=function(t){return(0,m.Z)(t,r(at)),at.result()},a.measure=function(t){return(0,m.Z)(t,r(Ft)),Ft.result()},a.bounds=function(t){return(0,m.Z)(t,r(ot.Z)),ot.Z.result()},a.centroid=function(t){return(0,m.Z)(t,r(Mt)),Mt.result()},a.projection=function(e){return arguments.length?(r=null==e?(t=null,Y.Z):(t=e).stream,a):t},a.context=function(t){return arguments.length?(n=null==t?(e=null,new Bt):new St(e=t),"function"!=typeof i&&n.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(n.pointRadius(+t),+t),a):i},a.projection(t).context(e)}Bt.prototype={_radius:4.5,_circle:Nt(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Nt(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Ut=r(15002);function Vt(t){var e=0,r=g.pi/3,n=(0,Ut.r)(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*g.uR,r=t[1]*g.uR):[e*g.RW,r*g.RW]},i}function Ht(t,e){var r=(0,g.O$)(t),n=(r+(0,g.O$)(e))/2;if((0,g.Wn)(n)=.12&&i<.234&&n>=-.425&&n<-.214?s:i>=.166&&i<.234&&n>=-.214&&n<-.115?l:o).invert(t)},c.stream=function(r){return t&&e===r?t:(n=[o.stream(e=r),s.stream(r),l.stream(r)],i=n.length,t={point:function(t,e){for(var r=-1;++r0?e<-g.ou+g.Ho&&(e=-g.ou+g.Ho):e>g.ou-g.Ho&&(e=g.ou-g.Ho);var r=i/(0,g.sQ)(te(e),n);return[r*(0,g.O$)(n*t),i-r*(0,g.mC)(n*t)]}return a.invert=function(t,e){var r=i-e,a=(0,g.Xx)(n)*(0,g._b)(t*t+r*r),o=(0,g.fv)(t,(0,g.Wn)(r))*(0,g.Xx)(r);return r*n<0&&(o-=g.pi*(0,g.Xx)(t)*(0,g.Xx)(r)),[o/n,2*(0,g.z4)((0,g.sQ)(i/a,1/n))-g.ou]},a}function re(){return Vt(ee).scale(109.5).parallels([30,30])}Kt.invert=function(t,e){return[t,2*(0,g.z4)((0,g.Qq)(e))-g.ou]};var ne=r(97492);function ie(t,e){var r=(0,g.mC)(t),n=t===e?(0,g.O$)(t):(r-(0,g.mC)(e))/(e-t),i=r/n+t;if((0,g.Wn)(n)2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)}xe.invert=(0,me.O)((function(t){return 2*(0,g.z4)(t)})),_e.invert=function(t,e){return[-e,2*(0,g.z4)((0,g.Qq)(t))-g.ou]}},83074:function(t,e,r){"use strict";r.d(e,{Z:function(){return i}});var n=r(39695);function i(t,e){var r=t[0]*n.uR,i=t[1]*n.uR,a=e[0]*n.uR,o=e[1]*n.uR,s=(0,n.mC)(i),l=(0,n.O$)(i),u=(0,n.mC)(o),c=(0,n.O$)(o),f=s*(0,n.mC)(r),h=s*(0,n.O$)(r),p=u*(0,n.mC)(a),d=u*(0,n.O$)(a),v=2*(0,n.ZR)((0,n._b)((0,n.Jy)(o-i)+s*u*(0,n.Jy)(a-r))),g=(0,n.O$)(v),y=v?function(t){var e=(0,n.O$)(t*=v)/g,r=(0,n.O$)(v-t)/g,i=r*f+e*p,a=r*h+e*d,o=r*l+e*c;return[(0,n.fv)(a,i)*n.RW,(0,n.fv)(o,(0,n._b)(i*i+a*a))*n.RW]}:function(){return[r*n.RW,i*n.RW]};return y.distance=v,y}},39695:function(t,e,r){"use strict";r.d(e,{BZ:function(){return l},Ho:function(){return n},Jy:function(){return A},Kh:function(){return T},O$:function(){return x},OR:function(){return w},Qq:function(){return g},RW:function(){return u},Wn:function(){return f},Xx:function(){return b},ZR:function(){return k},_b:function(){return _},aW:function(){return i},cM:function(){return y},fv:function(){return p},mC:function(){return d},mD:function(){return v},ou:function(){return o},pi:function(){return a},pu:function(){return s},sQ:function(){return m},uR:function(){return c},z4:function(){return h}});var n=1e-6,i=1e-12,a=Math.PI,o=a/2,s=a/4,l=2*a,u=180/a,c=a/180,f=Math.abs,h=Math.atan,p=Math.atan2,d=Math.cos,v=Math.ceil,g=Math.exp,y=(Math.floor,Math.log),m=Math.pow,x=Math.sin,b=Math.sign||function(t){return t>0?1:t<0?-1:0},_=Math.sqrt,w=Math.tan;function T(t){return t>1?0:t<-1?a:Math.acos(t)}function k(t){return t>1?o:t<-1?-o:Math.asin(t)}function A(t){return(t=x(t/2))*t}},73182:function(t,e,r){"use strict";function n(){}r.d(e,{Z:function(){return n}})},3559:function(t,e,r){"use strict";var n=r(73182),i=1/0,a=i,o=-i,s=o,l={point:function(t,e){to&&(o=t),es&&(s=e)},lineStart:n.Z,lineEnd:n.Z,polygonStart:n.Z,polygonEnd:n.Z,result:function(){var t=[[i,a],[o,s]];return o=s=-(a=i=1/0),t}};e.Z=l},67108:function(t,e,r){"use strict";r.d(e,{Z:function(){return i}});var n=r(39695);function i(t,e){return(0,n.Wn)(t[0]-e[0])=0?1:-1,L=E*S,C=L>a.pi,P=x*A;if(o.add((0,a.fv)(P*E*(0,a.O$)(L),b*M+P*(0,a.mC)(L))),c+=C?S+E*a.BZ:S,C^y>=r^T>=r){var O=(0,i.T5)((0,i.Og)(g),(0,i.Og)(w));(0,i.iJ)(O);var I=(0,i.T5)(u,O);(0,i.iJ)(I);var D=(C^S>=0?-1:1)*(0,a.ZR)(I[2]);(n>D||n===D&&(O[0]||O[1]))&&(f+=C^S>=0?1:-1)}}return(c<-a.Ho||c4*e&&y--){var w=o+d,T=s+v,k=u+g,A=(0,l._b)(w*w+T*T+k*k),M=(0,l.ZR)(k/=A),S=(0,l.Wn)((0,l.Wn)(k)-1)e||(0,l.Wn)((x*P+b*O)/_-.5)>.3||o*d+s*v+u*g2?t[2]%360*l.uR:0,V()):[L*l.RW,C*l.RW,P*l.RW]},j.angle=function(t){return arguments.length?(O=t%360*l.uR,V()):O*l.RW},j.reflectX=function(t){return arguments.length?(I=t?-1:1,V()):I<0},j.reflectY=function(t){return arguments.length?(D=t?-1:1,V()):D<0},j.precision=function(t){return arguments.length?(x=d(b,N=t*t),H()):(0,l._b)(N)},j.fitExtent=function(t,e){return(0,f.qg)(j,t,e)},j.fitSize=function(t,e){return(0,f.mF)(j,t,e)},j.fitWidth=function(t,e){return(0,f.V6)(j,t,e)},j.fitHeight=function(t,e){return(0,f.rf)(j,t,e)},function(){return e=t.apply(this,arguments),j.invert=e.invert&&U,V()}}},26867:function(t,e,r){"use strict";r.d(e,{K:function(){return a},Z:function(){return o}});var n=r(15002),i=r(39695);function a(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}function o(){return(0,n.Z)(a).scale(175.295)}a.invert=function(t,e){var r,n=e,a=25;do{var o=n*n,s=o*o;n-=r=(n*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while((0,i.Wn)(r)>i.Ho&&--a>0);return[t/(.8707+(o=n*n)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),n]}},57962:function(t,e,r){"use strict";r.d(e,{I:function(){return o},Z:function(){return s}});var n=r(39695),i=r(25382),a=r(15002);function o(t,e){return[(0,n.mC)(e)*(0,n.O$)(t),(0,n.O$)(e)]}function s(){return(0,a.Z)(o).scale(249.5).clipAngle(90+n.Ho)}o.invert=(0,i.O)(n.ZR)},49386:function(t,e,r){"use strict";r.d(e,{I:function(){return o},Z:function(){return c}});var n=r(96059),i=r(39695);function a(t,e){return[(0,i.Wn)(t)>i.pi?t+Math.round(-t/i.BZ)*i.BZ:t,e]}function o(t,e,r){return(t%=i.BZ)?e||r?(0,n.Z)(l(t),u(e,r)):l(t):e||r?u(e,r):a}function s(t){return function(e,r){return[(e+=t)>i.pi?e-i.BZ:e<-i.pi?e+i.BZ:e,r]}}function l(t){var e=s(t);return e.invert=s(-t),e}function u(t,e){var r=(0,i.mC)(t),n=(0,i.O$)(t),a=(0,i.mC)(e),o=(0,i.O$)(e);function s(t,e){var s=(0,i.mC)(e),l=(0,i.mC)(t)*s,u=(0,i.O$)(t)*s,c=(0,i.O$)(e),f=c*r+l*n;return[(0,i.fv)(u*a-f*o,l*r-c*n),(0,i.ZR)(f*a+u*o)]}return s.invert=function(t,e){var s=(0,i.mC)(e),l=(0,i.mC)(t)*s,u=(0,i.O$)(t)*s,c=(0,i.O$)(e),f=c*a-u*o;return[(0,i.fv)(u*a+c*o,l*r+f*n),(0,i.ZR)(f*r-l*n)]},s}function c(t){function e(e){return(e=t(e[0]*i.uR,e[1]*i.uR))[0]*=i.RW,e[1]*=i.RW,e}return t=o(t[0]*i.uR,t[1]*i.uR,t.length>2?t[2]*i.uR:0),e.invert=function(e){return(e=t.invert(e[0]*i.uR,e[1]*i.uR))[0]*=i.RW,e[1]*=i.RW,e},e}a.invert=a},72736:function(t,e,r){"use strict";function n(t,e){t&&a.hasOwnProperty(t.type)&&a[t.type](t,e)}r.d(e,{Z:function(){return l}});var i={Feature:function(t,e){n(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,i=-1,a=r.length;++i=0;)e+=r[n].value;else e=1;t.value=e}function l(t,e){var r,n,i,a,o,s=new h(t),l=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=u);r=c.pop();)if(l&&(r.value=+r.data.value),(i=e(r.data))&&(o=i.length))for(r.children=new Array(o),a=o-1;a>=0;--a)c.push(n=r.children[a]=new h(i[a])),n.parent=r,n.depth=r.depth+1;return s.eachBefore(f)}function u(t){return t.children}function c(t){t.data=t.data.data}function f(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function h(t){this.data=t,this.depth=this.height=0,this.parent=null}r.r(e),r.d(e,{cluster:function(){return o},hierarchy:function(){return l},pack:function(){return I},packEnclose:function(){return d},packSiblings:function(){return S},partition:function(){return N},stratify:function(){return q},tree:function(){return K},treemap:function(){return rt},treemapBinary:function(){return nt},treemapDice:function(){return B},treemapResquarify:function(){return at},treemapSlice:function(){return $},treemapSliceDice:function(){return it},treemapSquarify:function(){return et}}),h.prototype=l.prototype={constructor:h,count:function(){return this.eachAfter(s)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return l(this).eachBefore(c)}};var p=Array.prototype.slice;function d(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(p.call(t))).length,a=[];n0&&r*r>n*n+i*i}function m(t,e){for(var r=0;r(o*=o)?(n=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function T(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function k(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function A(t){this._=t,this.next=null,this.previous=null}function M(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,u,c,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;w(r,e,n=t[2]),e=new A(e),r=new A(r),n=new A(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;s0)throw new Error("cycle");return a}return r.id=function(e){return arguments.length?(t=L(e),r):t},r.parentId=function(t){return arguments.length?(e=L(t),r):e},r}function G(t,e){return t.parent===e.parent?1:2}function Z(t){var e=t.children;return e?e[0]:t.t}function Y(t){var e=t.children;return e?e[e.length-1]:t.t}function W(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function X(t,e,r){return t.a.parent===e.parent?t.a:r}function J(t,e){this._=t,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=e}function K(){var t=G,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new J(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new J(n[i],i)),r.parent=e;return(o.parent=new J(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var u=i,c=i,f=i;i.eachBefore((function(t){t.xc.x&&(c=t),t.depth>f.depth&&(f=t)}));var h=u===c?1:t(u,c)/2,p=h-u.x,d=e/(c.x+h+p),v=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*v}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],u=a.m,c=o.m,f=s.m,h=l.m;s=Y(s),a=Z(a),s&&a;)l=Z(l),(o=Y(o)).a=e,(i=s.z+f-a.z-u+t(s._,a._))>0&&(W(X(s,e,n),e,i),u+=i,c+=i),f+=s.m,u+=a.m,h+=l.m,c+=o.m;s&&!Y(o)&&(o.t=s,o.m+=f-c),a&&!Z(l)&&(l.t=a,l.m+=u-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i}function $(t,e,r,n,i){for(var a,o=t.children,s=-1,l=o.length,u=t.value&&(i-r)/t.value;++sh&&(h=s),g=c*c*v,(p=Math.max(h/g,g/f))>d){c-=s;break}d=p}y.push(o={value:c,dice:l1?e:1)},r}(Q);function rt(){var t=et,e=!1,r=1,n=1,i=[0],a=C,o=C,s=C,l=C,u=C;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(F),t}function f(e){var r=i[e.depth],n=e.x0+r,c=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var c=s[e];return c.x0=i,c.y0=a,c.x1=o,void(c.y1=l)}for(var f=u[e],h=n/2+f,p=e+1,d=r-1;p>>1;u[v]l-a){var m=(i*y+o*g)/n;t(e,p,g,i,a,m,l),t(p,r,y,m,a,o,l)}else{var x=(a*y+l*g)/n;t(e,p,g,i,a,o,x),t(p,r,y,i,x,o,l)}}(0,l,t.value,e,r,n,i)}function it(t,e,r,n,i){(1&t.depth?$:B)(t,e,r,n,i)}var at=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,u,c,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(Q)},29502:function(t,e,r){"use strict";function n(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function i(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function a(){}r.d(e,{sX:function(){return Y},k4:function(){return U}});var o=.7,s=1/o,l="\\s*([+-]?\\d+)\\s*",u="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),p=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),d=new RegExp("^rgba\\("+[l,l,l,u]+"\\)$"),v=new RegExp("^rgba\\("+[c,c,c,u]+"\\)$"),g=new RegExp("^hsl\\("+[u,c,c]+"\\)$"),y=new RegExp("^hsla\\("+[u,c,c,u]+"\\)$"),m={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function x(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function _(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=f.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?w(e):3===r?new M(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?T(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?T(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=h.exec(t))?new M(e[1],e[2],e[3],1):(e=p.exec(t))?new M(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=d.exec(t))?T(e[1],e[2],e[3],e[4]):(e=v.exec(t))?T(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=g.exec(t))?C(e[1],e[2]/100,e[3]/100,1):(e=y.exec(t))?C(e[1],e[2]/100,e[3]/100,e[4]):m.hasOwnProperty(t)?w(m[t]):"transparent"===t?new M(NaN,NaN,NaN,0):null}function w(t){return new M(t>>16&255,t>>8&255,255&t,1)}function T(t,e,r,n){return n<=0&&(t=e=r=NaN),new M(t,e,r,n)}function k(t){return t instanceof a||(t=_(t)),t?new M((t=t.rgb()).r,t.g,t.b,t.opacity):new M}function A(t,e,r,n){return 1===arguments.length?k(t):new M(t,e,r,null==n?1:n)}function M(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function S(){return"#"+L(this.r)+L(this.g)+L(this.b)}function E(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function L(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function C(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new O(t,e,r,n)}function P(t){if(t instanceof O)return new O(t.h,t.s,t.l,t.opacity);if(t instanceof a||(t=_(t)),!t)return new O;if(t instanceof O)return t;var e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),o=Math.max(e,r,n),s=NaN,l=o-i,u=(o+i)/2;return l?(s=e===o?(r-n)/l+6*(r0&&u<1?0:s,new O(s,l,u,t.opacity)}function O(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function I(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function D(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function z(t){return function(){return t}}function R(t,e){var r=e-t;return r?function(t,e){return function(r){return t+r*e}}(t,r):z(isNaN(t)?e:t)}n(a,_,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:x,formatHex:x,formatHsl:function(){return P(this).formatHsl()},formatRgb:b,toString:b}),n(M,A,i(a,{brighter:function(t){return t=null==t?s:Math.pow(s,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:S,formatHex:S,formatRgb:E,toString:E})),n(O,(function(t,e,r,n){return 1===arguments.length?P(t):new O(t,e,r,null==n?1:n)}),i(a,{brighter:function(t){return t=null==t?s:Math.pow(s,t),new O(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new O(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new M(I(t>=240?t-240:t+120,i,n),I(t,i,n),I(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var F=function t(e){var r=function(t){return 1==(t=+t)?R:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):z(isNaN(e)?r:e)}}(e);function n(t,e){var n=r((t=A(t)).r,(e=A(e)).r),i=r(t.g,e.g),a=r(t.b,e.b),o=R(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return n.gamma=t,n}(1);function B(t){return function(e){var r,n,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(r=0;r=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],o=n>0?t[n-1]:2*i-a,s=na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:U(r,n)})),a=q.lastIndex;return aa)if(Math.abs(h*u-c*f)>a&&o){var d=r-s,v=i-l,g=u*u+c*c,y=d*d+v*v,m=Math.sqrt(g),x=Math.sqrt(p),b=o*Math.tan((n-Math.acos((g+p-y)/(2*m*x)))/2),_=b/x,w=b/m;Math.abs(_-1)>a&&(this._+="L"+(t+_*f)+","+(e+_*h)),this._+="A"+o+","+o+",0,0,"+ +(h*d>f*v)+","+(this._x1=t+w*u)+","+(this._y1=e+w*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,r,s,l,u){t=+t,e=+e,u=!!u;var c=(r=+r)*Math.cos(s),f=r*Math.sin(s),h=t+c,p=e+f,d=1^u,v=u?s-l:l-s;if(r<0)throw new Error("negative radius: "+r);null===this._x1?this._+="M"+h+","+p:(Math.abs(this._x1-h)>a||Math.abs(this._y1-p)>a)&&(this._+="L"+h+","+p),r&&(v<0&&(v=v%i+i),v>o?this._+="A"+r+","+r+",0,1,"+d+","+(t-c)+","+(e-f)+"A"+r+","+r+",0,1,"+d+","+(this._x1=h)+","+(this._y1=p):v>a&&(this._+="A"+r+","+r+",0,"+ +(v>=n)+","+d+","+(this._x1=t+r*Math.cos(l))+","+(this._y1=e+r*Math.sin(l))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var u=l,c=Array.prototype.slice;function f(t){return function(){return t}}function h(t){return t[0]}function p(t){return t[1]}function d(t){return t.source}function v(t){return t.target}function g(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function y(){return function(t){var e=d,r=v,n=h,i=p,a=null;function o(){var o,s=c.call(arguments),l=e.apply(this,s),f=r.apply(this,s);if(a||(a=o=u()),t(a,+n.apply(this,(s[0]=l,s)),+i.apply(this,s),+n.apply(this,(s[0]=f,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(r=t,o):r},o.x=function(t){return arguments.length?(n="function"==typeof t?t:f(+t),o):n},o.y=function(t){return arguments.length?(i="function"==typeof t?t:f(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}(g)}},84096:function(t,e,r){"use strict";r.d(e,{i$:function(){return d},Dq:function(){return h},g0:function(){return v}});var n=r(58176),i=r(48480),a=r(59879),o=r(82301),s=r(34823),l=r(79791);function u(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function c(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function f(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function h(t){var e=t.dateTime,r=t.date,s=t.time,l=t.periods,h=t.days,p=t.shortDays,d=t.months,v=t.shortMonths,y=w(l),m=T(l),x=w(h),b=T(h),_=w(p),St=T(p),Et=w(d),Lt=T(d),Ct=w(v),Pt=T(v),Ot={a:function(t){return p[t.getDay()]},A:function(t){return h[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return d[t.getMonth()]},c:null,d:q,e:q,f:X,H:G,I:Z,j:Y,L:W,m:J,M:K,p:function(t){return l[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:At,s:Mt,S:$,u:Q,U:tt,V:et,w:rt,W:nt,x:null,X:null,y:it,Y:at,Z:ot,"%":kt},It={a:function(t){return p[t.getUTCDay()]},A:function(t){return h[t.getUTCDay()]},b:function(t){return v[t.getUTCMonth()]},B:function(t){return d[t.getUTCMonth()]},c:null,d:st,e:st,f:ht,H:lt,I:ut,j:ct,L:ft,m:pt,M:dt,p:function(t){return l[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:At,s:Mt,S:vt,u:gt,U:yt,V:mt,w:xt,W:bt,x:null,X:null,y:_t,Y:wt,Z:Tt,"%":kt},Dt={a:function(t,e,r){var n=_.exec(e.slice(r));return n?(t.w=St[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=x.exec(e.slice(r));return n?(t.w=b[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=Ct.exec(e.slice(r));return n?(t.m=Pt[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=Et.exec(e.slice(r));return n?(t.m=Lt[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,r,n){return Ft(t,e,r,n)},d:D,e:D,f:j,H:R,I:R,j:z,L:N,m:I,M:F,p:function(t,e,r){var n=y.exec(e.slice(r));return n?(t.p=m[n[0].toLowerCase()],r+n[0].length):-1},q:O,Q:V,s:H,S:B,u:A,U:M,V:S,w:k,W:E,x:function(t,e,n){return Ft(t,r,e,n)},X:function(t,e,r){return Ft(t,s,e,r)},y:C,Y:L,Z:P,"%":U};function zt(t,e){return function(r){var n,i,a,o=[],s=-1,l=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++s53)return null;"w"in h||(h.w=1),"Z"in h?(l=(s=c(f(h.y,0,1))).getUTCDay(),s=l>4||0===l?n.l6.ceil(s):(0,n.l6)(s),s=i.Z.offset(s,7*(h.V-1)),h.y=s.getUTCFullYear(),h.m=s.getUTCMonth(),h.d=s.getUTCDate()+(h.w+6)%7):(l=(s=u(f(h.y,0,1))).getDay(),s=l>4||0===l?a.wA.ceil(s):(0,a.wA)(s),s=o.Z.offset(s,7*(h.V-1)),h.y=s.getFullYear(),h.m=s.getMonth(),h.d=s.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),l="Z"in h?c(f(h.y,0,1)).getUTCDay():u(f(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(l+5)%7:h.w+7*h.U-(l+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,c(h)):u(h)}}function Ft(t,e,r,n){for(var i,a,o=0,s=e.length,l=r.length;o=l)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=Dt[i in g?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Ot.x=zt(r,Ot),Ot.X=zt(s,Ot),Ot.c=zt(e,Ot),It.x=zt(r,It),It.X=zt(s,It),It.c=zt(e,It),{format:function(t){var e=zt(t+="",Ot);return e.toString=function(){return t},e},parse:function(t){var e=Rt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=zt(t+="",It);return e.toString=function(){return t},e},utcParse:function(t){var e=Rt(t+="",!0);return e.toString=function(){return t},e}}}var p,d,v,g={"-":"",_:" ",0:"0"},y=/^\s*\d+/,m=/^%/,x=/[\\^$*+?|[\]().{}]/g;function b(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function P(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function O(t,e,r){var n=y.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function I(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function D(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function z(t,e,r){var n=y.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function R(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function F(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function B(t,e,r){var n=y.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function N(t,e,r){var n=y.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function j(t,e,r){var n=y.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function U(t,e,r){var n=m.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function V(t,e,r){var n=y.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function H(t,e,r){var n=y.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function q(t,e){return b(t.getDate(),e,2)}function G(t,e){return b(t.getHours(),e,2)}function Z(t,e){return b(t.getHours()%12||12,e,2)}function Y(t,e){return b(1+o.Z.count((0,s.Z)(t),t),e,3)}function W(t,e){return b(t.getMilliseconds(),e,3)}function X(t,e){return W(t,e)+"000"}function J(t,e){return b(t.getMonth()+1,e,2)}function K(t,e){return b(t.getMinutes(),e,2)}function $(t,e){return b(t.getSeconds(),e,2)}function Q(t){var e=t.getDay();return 0===e?7:e}function tt(t,e){return b(a.OM.count((0,s.Z)(t)-1,t),e,2)}function et(t,e){var r=t.getDay();return t=r>=4||0===r?(0,a.bL)(t):a.bL.ceil(t),b(a.bL.count((0,s.Z)(t),t)+(4===(0,s.Z)(t).getDay()),e,2)}function rt(t){return t.getDay()}function nt(t,e){return b(a.wA.count((0,s.Z)(t)-1,t),e,2)}function it(t,e){return b(t.getFullYear()%100,e,2)}function at(t,e){return b(t.getFullYear()%1e4,e,4)}function ot(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+b(e/60|0,"0",2)+b(e%60,"0",2)}function st(t,e){return b(t.getUTCDate(),e,2)}function lt(t,e){return b(t.getUTCHours(),e,2)}function ut(t,e){return b(t.getUTCHours()%12||12,e,2)}function ct(t,e){return b(1+i.Z.count((0,l.Z)(t),t),e,3)}function ft(t,e){return b(t.getUTCMilliseconds(),e,3)}function ht(t,e){return ft(t,e)+"000"}function pt(t,e){return b(t.getUTCMonth()+1,e,2)}function dt(t,e){return b(t.getUTCMinutes(),e,2)}function vt(t,e){return b(t.getUTCSeconds(),e,2)}function gt(t){var e=t.getUTCDay();return 0===e?7:e}function yt(t,e){return b(n.Ox.count((0,l.Z)(t)-1,t),e,2)}function mt(t,e){var r=t.getUTCDay();return t=r>=4||0===r?(0,n.hB)(t):n.hB.ceil(t),b(n.hB.count((0,l.Z)(t),t)+(4===(0,l.Z)(t).getUTCDay()),e,2)}function xt(t){return t.getUTCDay()}function bt(t,e){return b(n.l6.count((0,l.Z)(t)-1,t),e,2)}function _t(t,e){return b(t.getUTCFullYear()%100,e,2)}function wt(t,e){return b(t.getUTCFullYear()%1e4,e,4)}function Tt(){return"+0000"}function kt(){return"%"}function At(t){return+t}function Mt(t){return Math.floor(+t/1e3)}p=h({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"]}),d=p.format,p.parse,v=p.utcFormat,p.utcParse},82301:function(t,e,r){"use strict";r.d(e,{a:function(){return o}});var n=r(30052),i=r(54263),a=(0,n.Z)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.yB)/i.UD}),(function(t){return t.getDate()-1}));e.Z=a;var o=a.range},54263:function(t,e,r){"use strict";r.d(e,{UD:function(){return o},Y2:function(){return a},Ym:function(){return n},iM:function(){return s},yB:function(){return i}});var n=1e3,i=6e4,a=36e5,o=864e5,s=6048e5},81041:function(t,e,r){"use strict";r.r(e),r.d(e,{timeDay:function(){return y.Z},timeDays:function(){return y.a},timeFriday:function(){return m.mC},timeFridays:function(){return m.b$},timeHour:function(){return v},timeHours:function(){return g},timeInterval:function(){return n.Z},timeMillisecond:function(){return a},timeMilliseconds:function(){return o},timeMinute:function(){return h},timeMinutes:function(){return p},timeMonday:function(){return m.wA},timeMondays:function(){return m.bJ},timeMonth:function(){return b},timeMonths:function(){return _},timeSaturday:function(){return m.EY},timeSaturdays:function(){return m.Ff},timeSecond:function(){return u},timeSeconds:function(){return c},timeSunday:function(){return m.OM},timeSundays:function(){return m.vm},timeThursday:function(){return m.bL},timeThursdays:function(){return m.$t},timeTuesday:function(){return m.sy},timeTuesdays:function(){return m.aU},timeWednesday:function(){return m.zg},timeWednesdays:function(){return m.Ld},timeWeek:function(){return m.OM},timeWeeks:function(){return m.vm},timeYear:function(){return w.Z},timeYears:function(){return w.g},utcDay:function(){return L.Z},utcDays:function(){return L.y},utcFriday:function(){return C.QQ},utcFridays:function(){return C.fz},utcHour:function(){return S},utcHours:function(){return E},utcMillisecond:function(){return a},utcMilliseconds:function(){return o},utcMinute:function(){return k},utcMinutes:function(){return A},utcMonday:function(){return C.l6},utcMondays:function(){return C.$3},utcMonth:function(){return O},utcMonths:function(){return I},utcSaturday:function(){return C.g4},utcSaturdays:function(){return C.Q_},utcSecond:function(){return u},utcSeconds:function(){return c},utcSunday:function(){return C.Ox},utcSundays:function(){return C.SU},utcThursday:function(){return C.hB},utcThursdays:function(){return C.xj},utcTuesday:function(){return C.J1},utcTuesdays:function(){return C.DK},utcWednesday:function(){return C.b3},utcWednesdays:function(){return C.uy},utcWeek:function(){return C.Ox},utcWeeks:function(){return C.SU},utcYear:function(){return D.Z},utcYears:function(){return D.D}});var n=r(30052),i=(0,n.Z)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?(0,n.Z)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i,o=i.range,s=r(54263),l=(0,n.Z)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*s.Ym)}),(function(t,e){return(e-t)/s.Ym}),(function(t){return t.getUTCSeconds()})),u=l,c=l.range,f=(0,n.Z)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Ym)}),(function(t,e){t.setTime(+t+e*s.yB)}),(function(t,e){return(e-t)/s.yB}),(function(t){return t.getMinutes()})),h=f,p=f.range,d=(0,n.Z)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*s.Ym-t.getMinutes()*s.yB)}),(function(t,e){t.setTime(+t+e*s.Y2)}),(function(t,e){return(e-t)/s.Y2}),(function(t){return t.getHours()})),v=d,g=d.range,y=r(82301),m=r(59879),x=(0,n.Z)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),b=x,_=x.range,w=r(34823),T=(0,n.Z)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s.yB)}),(function(t,e){return(e-t)/s.yB}),(function(t){return t.getUTCMinutes()})),k=T,A=T.range,M=(0,n.Z)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*s.Y2)}),(function(t,e){return(e-t)/s.Y2}),(function(t){return t.getUTCHours()})),S=M,E=M.range,L=r(48480),C=r(58176),P=(0,n.Z)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),O=P,I=P.range,D=r(79791)},30052:function(t,e,r){"use strict";r.d(e,{Z:function(){return a}});var n=new Date,i=new Date;function a(t,e,r,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(r){return t(r=new Date(r-1)),e(r,1),t(r),r},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+r)),e(r,i),t(r)}while(a=e)for(;t(e),!r(e);)e.setTime(e-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;e(t,-1),!r(t););else for(;--n>=0;)for(;e(t,1),!r(t););}))},r&&(s.count=function(e,a){return n.setTime(+e),i.setTime(+a),t(n),t(i),Math.floor(r(n,i))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}},48480:function(t,e,r){"use strict";r.d(e,{y:function(){return o}});var n=r(30052),i=r(54263),a=(0,n.Z)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.UD}),(function(t){return t.getUTCDate()-1}));e.Z=a;var o=a.range},58176:function(t,e,r){"use strict";r.d(e,{$3:function(){return d},DK:function(){return v},J1:function(){return l},Ox:function(){return o},QQ:function(){return f},Q_:function(){return x},SU:function(){return p},b3:function(){return u},fz:function(){return m},g4:function(){return h},hB:function(){return c},l6:function(){return s},uy:function(){return g},xj:function(){return y}});var n=r(30052),i=r(54263);function a(t){return(0,n.Z)((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/i.iM}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),f=a(5),h=a(6),p=o.range,d=s.range,v=l.range,g=u.range,y=c.range,m=f.range,x=h.range},79791:function(t,e,r){"use strict";r.d(e,{D:function(){return a}});var n=r(30052),i=(0,n.Z)((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.Z)((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null},e.Z=i;var a=i.range},59879:function(t,e,r){"use strict";r.d(e,{$t:function(){return y},EY:function(){return h},Ff:function(){return x},Ld:function(){return g},OM:function(){return o},aU:function(){return v},b$:function(){return m},bJ:function(){return d},bL:function(){return c},mC:function(){return f},sy:function(){return l},vm:function(){return p},wA:function(){return s},zg:function(){return u}});var n=r(30052),i=r(54263);function a(t){return(0,n.Z)((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.yB)/i.iM}))}var o=a(0),s=a(1),l=a(2),u=a(3),c=a(4),f=a(5),h=a(6),p=o.range,d=s.range,v=l.range,g=u.range,y=c.range,m=f.range,x=h.range},34823:function(t,e,r){"use strict";r.d(e,{g:function(){return a}});var n=r(30052),i=(0,n.Z)((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?(0,n.Z)((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null},e.Z=i;var a=i.range},17045:function(t,e,r){"use strict";var n=r(8709),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=Object.defineProperty,l=s&&function(){var t={};try{for(var e in s(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),u=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===a.call(i)&&n())&&(l?s(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},c=function(t,e){var r=arguments.length>2?arguments[2]:{},a=n(e);i&&(a=o.call(a,Object.getOwnPropertySymbols(e)));for(var s=0;ss*l){var p=(h-f)/s;o[c]=1e3*p}}return o}function i(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*a){o=l=t[0],s=f=t[1];for(var b=a;bl&&(l=h),d>f&&(f=d);v=0!==(v=Math.max(l-o,f-s))?1/v:0}return i(m,x,a,o,s,v),x}function r(t,e,r,n,i){var a,o;if(i===M(t,e,r,n)>0)for(a=e;a=e;a-=n)o=T(a,t[a],t[a+1],o);return o&&y(o,o.next)&&(k(o),o=o.next),o}function n(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!y(n,n.next)&&0!==g(n.prev,n,n.next))n=n.next;else{if(k(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function i(t,e,r,u,c,f,p){if(t){!p&&f&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=h(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(t,u,c,f);for(var d,v,g=t;t.prev!==t.next;)if(d=t.prev,v=t.next,f?o(t,u,c,f):a(t))e.push(d.i/r),e.push(t.i/r),e.push(v.i/r),k(t),t=v.next,g=v.next;else if((t=v)===g){p?1===p?i(t=s(n(t),e,r),e,r,u,c,f,2):2===p&&l(t,e,r,u,c,f):i(n(t),e,r,u,c,f,1);break}}}function a(t){var e=t.prev,r=t,n=t.next;if(g(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(d(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(t,e,r,n){var i=t.prev,a=t,o=t.next;if(g(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=h(s,l,e,r,n),p=h(u,c,e,r,n),v=t.prevZ,y=t.nextZ;v&&v.z>=f&&y&&y.z<=p;){if(v!==t.prev&&v!==t.next&&d(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;if(v=v.prevZ,y!==t.prev&&y!==t.next&&d(i.x,i.y,a.x,a.y,o.x,o.y,y.x,y.y)&&g(y.prev,y,y.next)>=0)return!1;y=y.nextZ}for(;v&&v.z>=f;){if(v!==t.prev&&v!==t.next&&d(i.x,i.y,a.x,a.y,o.x,o.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;y&&y.z<=p;){if(y!==t.prev&&y!==t.next&&d(i.x,i.y,a.x,a.y,o.x,o.y,y.x,y.y)&&g(y.prev,y,y.next)>=0)return!1;y=y.nextZ}return!0}function s(t,e,r){var i=t;do{var a=i.prev,o=i.next.next;!y(a,o)&&m(a,i,i.next,o)&&_(a,o)&&_(o,a)&&(e.push(a.i/r),e.push(i.i/r),e.push(o.i/r),k(i),k(i.next),i=t=o),i=i.next}while(i!==t);return n(i)}function l(t,e,r,a,o,s){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&v(l,u)){var c=w(l,u);return l=n(l,l.next),c=n(c,c.next),i(l,e,r,a,o,s),void i(c,e,r,a,o,s)}u=u.next}l=l.next}while(l!==t)}function u(t,e){return t.x-e.x}function c(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&i!==n.x&&d(ar.x||n.x===r.x&&f(r,n)))&&(r=n,p=l)),n=n.next}while(n!==u);return r}(t,e),e){var r=w(e,t);n(e,e.next),n(r,r.next)}}function f(t,e){return g(t.prev,t,e.prev)<0&&g(e.next,t,t.next)<0}function h(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function p(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&m(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(_(t,e)&&_(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.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!==t);return n}(t,e)&&(g(t.prev,t,e.prev)||g(t,e.prev,e))||y(t,e)&&g(t.prev,t,t.next)>0&&g(e.prev,e,e.next)>0)}function g(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,r,n){var i=b(g(t,e,r)),a=b(g(t,e,n)),o=b(g(r,n,t)),s=b(g(r,n,e));return i!==a&&o!==s||!(0!==i||!x(t,r,e))||!(0!==a||!x(t,n,e))||!(0!==o||!x(r,t,n))||!(0!==s||!x(r,e,n))}function x(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function b(t){return t>0?1:t<0?-1:0}function _(t,e){return g(t.prev,t,t.next)<0?g(t,e,t.next)>=0&&g(t,t.prev,e)>=0:g(t,e,t.prev)<0||g(t,t.next,e)<0}function w(t,e){var r=new A(t.i,t.x,t.y),n=new A(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function T(t,e,r,n){var i=new A(t,e,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 k(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function A(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function M(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},2502:function(t,e,r){var n=r(68664);t.exports=function(t,e){var r,i=[],a=[],o=[],s={},l=[];function u(t){o[t]=!1,s.hasOwnProperty(t)&&Object.keys(s[t]).forEach((function(e){delete s[t][e],o[e]&&u(e)}))}function c(t){var e,n,i=!1;for(a.push(t),o[t]=!0,e=0;e=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o1&&"boolean"!=typeof e)throw new TypeError('"allowMissing" argument must be a boolean');for(var r=g(t),n=y("%"+(r.length>0?r[0]:"")+"%",e),o=1;o=r.length){var s=a(n,r[o]);if(!e&&!(r[o]in n))throw new i("base intrinsic for "+t+" exists, but the property is not available.");n=s?s.get||s.value:n[r[o]]}else n=n[r[o]];return n}},84671:function(t,e,r){"use strict";var n=r(77575),i=r(72943)("%Function%"),a=i.apply,o=i.call;t.exports=function(){return n.apply(o,arguments)},t.exports.apply=function(){return n.apply(a,arguments)}},92978:function(t,e,r){"use strict";var n=r(72943),i=r(84671),a=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&a(t,".prototype.")?i(r):r}},67295:function(t,e,r){"use strict";var n=r(72943)("%Object.getOwnPropertyDescriptor%");if(n)try{n([],"length")}catch(t){n=null}t.exports=n},16134:function(t,e,r){"use strict";var n=r(36672);t.exports=function(){return n(this).length=0,this}},4892:function(t,e,r){"use strict";t.exports=r(64404)()?Array.from:r(49441)},64404:function(t){"use strict";t.exports=function(){var t,e,r=Array.from;return"function"==typeof r&&(e=r(t=["raz","dwa"]),Boolean(e&&e!==t&&"dwa"===e[1]))}},49441:function(t,e,r){"use strict";var n=r(8260).iterator,i=r(73051),a=r(33717),o=r(35976),s=r(78513),l=r(36672),u=r(95296),c=r(87963),f=Array.isArray,h=Function.prototype.call,p={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;t.exports=function(t){var e,r,v,g,y,m,x,b,_,w,T=arguments[1],k=arguments[2];if(t=Object(l(t)),u(T)&&s(T),this&&this!==Array&&a(this))e=this;else{if(!T){if(i(t))return 1!==(y=t.length)?Array.apply(null,t):((g=new Array(1))[0]=t[0],g);if(f(t)){for(g=new Array(y=t.length),r=0;r=55296&&m<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,v):w,e?(p.value=w,d(g,v,p)):g[v]=w,++v;y=v}if(void 0===y)for(y=o(t.length),e&&(g=new e(y)),r=0;r0?1:-1}},56247:function(t,e,r){"use strict";var n=r(9953),i=Math.abs,a=Math.floor;t.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},35976:function(t,e,r){"use strict";var n=r(56247),i=Math.max;t.exports=function(t){return i(0,n(t))}},67260:function(t,e,r){"use strict";var n=r(78513),i=r(36672),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;t.exports=function(t,e){return function(r,u){var c,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(u),c=s(r),h&&c.sort("function"==typeof h?a.call(h,r):void 0),"function"!=typeof t&&(t=c[t]),o.call(t,c,(function(t,n){return l.call(r,t)?o.call(u,f,r[t],t,r,n):e}))}}},95879:function(t,e,r){"use strict";t.exports=r(73583)()?Object.assign:r(34205)},73583:function(t){"use strict";t.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},34205:function(t,e,r){"use strict";var n=r(68700),i=r(36672),a=Math.max;t.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o-1}},87963:function(t){"use strict";var e=Object.prototype.toString,r=e.call("");t.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||e.call(t)===r)||!1}},43043:function(t){"use strict";var e=Object.create(null),r=Math.random;t.exports=function(){var t;do{t=r().toString(36).slice(2)}while(e[t]);return t}},32411:function(t,e,r){"use strict";var n,i=r(1496),a=r(66741),o=r(62072),s=r(8260),l=r(95426),u=Object.defineProperty;n=t.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?a.call(e,"key+value")?"key+value":a.call(e,"key")?"key":"value":"value",u(this,"__kind__",o("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),u(n.prototype,s.toStringTag,o("c","Array Iterator"))},27515:function(t,e,r){"use strict";var n=r(73051),i=r(78513),a=r(87963),o=r(66661),s=Array.isArray,l=Function.prototype.call,u=Array.prototype.some;t.exports=function(t,e){var r,c,f,h,p,d,v,g,y=arguments[2];if(s(t)||n(t)?r="array":a(t)?r="string":t=o(t),i(e),f=function(){h=!0},"array"!==r)if("string"!==r)for(c=t.next();!c.done;){if(l.call(e,y,c.value,f),h)return;c=t.next()}else for(d=t.length,p=0;p=55296&&g<=56319&&(v+=t[++p]),l.call(e,y,v,f),!h);++p);else u.call(t,(function(t){return l.call(e,y,t,f),h}))}},66661:function(t,e,r){"use strict";var n=r(73051),i=r(87963),a=r(32411),o=r(259),s=r(58095),l=r(8260).iterator;t.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},95426:function(t,e,r){"use strict";var n,i=r(16134),a=r(95879),o=r(78513),s=r(36672),l=r(62072),u=r(55174),c=r(8260),f=Object.defineProperty,h=Object.defineProperties;t.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):f(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(n.prototype,c.iterator,l((function(){return this})))},35940:function(t,e,r){"use strict";var n=r(73051),i=r(95296),a=r(87963),o=r(8260).iterator,s=Array.isArray;t.exports=function(t){return!(!i(t)||!s(t)&&!a(t)&&!n(t)&&"function"!=typeof t[o])}},259:function(t,e,r){"use strict";var n,i=r(1496),a=r(62072),o=r(8260),s=r(95426),l=Object.defineProperty;n=t.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",a("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a("c","String Iterator"))},58095:function(t,e,r){"use strict";var n=r(35940);t.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},73523:function(t){"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=t,c.type=e,c.count=o.length,u=c,console&&console.warn&&console.warn(u)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(o=e[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(void 0===l)return!1;if("function"==typeof l)n(l,this,e);else{var u=l.length,c=d(l,u);for(r=0;r=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return h(this,t,!0)},a.prototype.rawListeners=function(t){return h(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},60774:function(t){var e=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(t){return e()}try{return __global__||e()}finally{delete Object.prototype.__global__}}()},94908:function(t,e,r){"use strict";t.exports=r(51152)()?globalThis:r(60774)},51152:function(t){"use strict";t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},92770:function(t,e,r){"use strict";var n=r(18546);t.exports=function(t){var e=typeof t;if("string"===e){var r=t;if(0==(t=+t)&&n(r))return!1}else if("number"!==e)return!1;return t-t<1}},30120:function(t,e,r){var n=r(90660);t.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,a,o,s,l=t[0].length,u=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(u+r));var c=e.length-r;if(u!==c)throw new Error("source length "+u+" ("+l+"x"+t.length+") does not match destination length "+c);for(i=0,o=r;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},32879:function(t){"use strict";function e(t,a){a||(a={}),("string"==typeof t||Array.isArray(t))&&(a.family=t);var o=Array.isArray(a.family)?a.family.join(", "):a.family;if(!o)throw Error("`family` must be defined");var s=a.size||a.fontSize||a.em||48,l=a.weight||a.fontWeight||"",u=(t=[a.style||a.fontStyle||"",l,s].join(" ")+"px "+o,a.origin||"top");if(e.cache[o]&&s<=e.cache[o].em)return r(e.cache[o],u);var c=a.canvas||e.canvas,f=c.getContext("2d"),h={upper:void 0!==a.upper?a.upper:"H",lower:void 0!==a.lower?a.lower:"x",descent:void 0!==a.descent?a.descent:"p",ascent:void 0!==a.ascent?a.ascent:"h",tittle:void 0!==a.tittle?a.tittle:"i",overshoot:void 0!==a.overshoot?a.overshoot:"O"},p=Math.ceil(1.5*s);c.height=p,c.width=.5*p,f.font=t;var d="H",v={top:0};f.clearRect(0,0,p,p),f.textBaseline="top",f.fillStyle="black",f.fillText(d,0,0);var g=n(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline="bottom",f.fillText(d,0,p);var y=n(f.getImageData(0,0,p,p));v.lineHeight=v.bottom=p-y+g,f.clearRect(0,0,p,p),f.textBaseline="alphabetic",f.fillText(d,0,p);var m=p-n(f.getImageData(0,0,p,p))-1+g;v.baseline=v.alphabetic=m,f.clearRect(0,0,p,p),f.textBaseline="middle",f.fillText(d,0,.5*p);var x=n(f.getImageData(0,0,p,p));v.median=v.middle=p-x-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline="hanging",f.fillText(d,0,.5*p);var b=n(f.getImageData(0,0,p,p));v.hanging=p-b-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline="ideographic",f.fillText(d,0,p);var _=n(f.getImageData(0,0,p,p));if(v.ideographic=p-_-1+g,h.upper&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.upper,0,0),v.upper=n(f.getImageData(0,0,p,p)),v.capHeight=v.baseline-v.upper),h.lower&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.lower,0,0),v.lower=n(f.getImageData(0,0,p,p)),v.xHeight=v.baseline-v.lower),h.tittle&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.tittle,0,0),v.tittle=n(f.getImageData(0,0,p,p))),h.ascent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.ascent,0,0),v.ascent=n(f.getImageData(0,0,p,p))),h.descent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.descent,0,0),v.descent=i(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.overshoot,0,0);var w=i(f.getImageData(0,0,p,p));v.overshoot=w-m}for(var T in v)v[T]/=s;return v.em=s,e.cache[o]=v,r(v,u)}function r(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function n(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}t.exports=e,e.canvas=document.createElement("canvas"),e.cache={}},86165:function(t){var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var a=t.length;if(a===+a)for(var o=0;o1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');var r=S(t),n=r.length>0?r[0]:"",a=E("%"+n+"%",e),s=a.name,u=a.value,c=!1,f=a.alias;f&&(n=f[0],w(r,_([0,1],f)));for(var h=1,p=!0;h=r.length){var m=l(u,d);u=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[d]}else p=b(u,d),u=u[d];p&&!c&&(y[s]=u)}}return u}},85400:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],v=e[13],g=e[14],y=e[15];return t[0]=s*(h*y-p*g)-f*(l*y-u*g)+v*(l*p-u*h),t[1]=-(n*(h*y-p*g)-f*(i*y-a*g)+v*(i*p-a*h)),t[2]=n*(l*y-u*g)-s*(i*y-a*g)+v*(i*u-a*l),t[3]=-(n*(l*p-u*h)-s*(i*p-a*h)+f*(i*u-a*l)),t[4]=-(o*(h*y-p*g)-c*(l*y-u*g)+d*(l*p-u*h)),t[5]=r*(h*y-p*g)-c*(i*y-a*g)+d*(i*p-a*h),t[6]=-(r*(l*y-u*g)-o*(i*y-a*g)+d*(i*u-a*l)),t[7]=r*(l*p-u*h)-o*(i*p-a*h)+c*(i*u-a*l),t[8]=o*(f*y-p*v)-c*(s*y-u*v)+d*(s*p-u*f),t[9]=-(r*(f*y-p*v)-c*(n*y-a*v)+d*(n*p-a*f)),t[10]=r*(s*y-u*v)-o*(n*y-a*v)+d*(n*u-a*s),t[11]=-(r*(s*p-u*f)-o*(n*p-a*f)+c*(n*u-a*s)),t[12]=-(o*(f*g-h*v)-c*(s*g-l*v)+d*(s*h-l*f)),t[13]=r*(f*g-h*v)-c*(n*g-i*v)+d*(n*h-i*f),t[14]=-(r*(s*g-l*v)-o*(n*g-i*v)+d*(n*l-i*s)),t[15]=r*(s*h-l*f)-o*(n*h-i*f)+c*(n*l-i*s),t}},42331:function(t){t.exports=function(t){var e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},31042:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},11902:function(t){t.exports=function(){var t=new Float32Array(16);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},89887:function(t){t.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3],a=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11],p=t[12],d=t[13],v=t[14],g=t[15];return(e*o-r*a)*(f*g-h*v)-(e*s-n*a)*(c*g-h*d)+(e*l-i*a)*(c*v-f*d)+(r*s-n*o)*(u*g-h*p)-(r*l-i*o)*(u*v-f*p)+(n*l-i*s)*(u*d-c*p)}},27812:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r+r,s=n+n,l=i+i,u=r*o,c=n*o,f=n*s,h=i*o,p=i*s,d=i*l,v=a*o,g=a*s,y=a*l;return t[0]=1-f-d,t[1]=c+y,t[2]=h-g,t[3]=0,t[4]=c-y,t[5]=1-u-d,t[6]=p+v,t[7]=0,t[8]=h+g,t[9]=p-v,t[10]=1-u-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},34045:function(t){t.exports=function(t,e,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:(o*=u=1/u,s*=u,l*=u,n=Math.sin(e),a=1-(i=Math.cos(e)),t[0]=o*o*a+i,t[1]=s*o*a+l*n,t[2]=l*o*a-s*n,t[3]=0,t[4]=o*s*a-l*n,t[5]=s*s*a+i,t[6]=l*s*a+o*n,t[7]=0,t[8]=o*l*a+s*n,t[9]=s*l*a-o*n,t[10]=l*l*a+i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}},45973:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=n+n,l=i+i,u=a+a,c=n*s,f=n*l,h=n*u,p=i*l,d=i*u,v=a*u,g=o*s,y=o*l,m=o*u;return t[0]=1-(p+v),t[1]=f+m,t[2]=h-y,t[3]=0,t[4]=f-m,t[5]=1-(c+v),t[6]=d+g,t[7]=0,t[8]=h+y,t[9]=d-g,t[10]=1-(c+p),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}},81472:function(t){t.exports=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},14669:function(t){t.exports=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}},75262:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},331:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},11049:function(t){t.exports=function(t,e){var r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},75195:function(t){t.exports=function(t,e,r,n,i,a,o){var s=1/(r-e),l=1/(i-n),u=1/(a-o);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(i+n)*l,t[10]=(o+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*a*2*u,t[15]=0,t}},71551:function(t){t.exports=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}},79576:function(t,e,r){t.exports={create:r(11902),clone:r(42331),copy:r(31042),identity:r(71551),transpose:r(88654),invert:r(95874),adjoint:r(85400),determinant:r(89887),multiply:r(91362),translate:r(31283),scale:r(10789),rotate:r(65074),rotateX:r(35545),rotateY:r(94918),rotateZ:r(15692),fromRotation:r(34045),fromRotationTranslation:r(45973),fromScaling:r(81472),fromTranslation:r(14669),fromXRotation:r(75262),fromYRotation:r(331),fromZRotation:r(11049),fromQuat:r(27812),frustum:r(75195),perspective:r(7864),perspectiveFromFieldOfView:r(35279),ortho:r(60378),lookAt:r(65551),str:r(6726)}},95874:function(t){t.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],f=e[9],h=e[10],p=e[11],d=e[12],v=e[13],g=e[14],y=e[15],m=r*s-n*o,x=r*l-i*o,b=r*u-a*o,_=n*l-i*s,w=n*u-a*s,T=i*u-a*l,k=c*v-f*d,A=c*g-h*d,M=c*y-p*d,S=f*g-h*v,E=f*y-p*v,L=h*y-p*g,C=m*L-x*E+b*S+_*M-w*A+T*k;return C?(C=1/C,t[0]=(s*L-l*E+u*S)*C,t[1]=(i*E-n*L-a*S)*C,t[2]=(v*T-g*w+y*_)*C,t[3]=(h*w-f*T-p*_)*C,t[4]=(l*M-o*L-u*A)*C,t[5]=(r*L-i*M+a*A)*C,t[6]=(g*b-d*T-y*x)*C,t[7]=(c*T-h*b+p*x)*C,t[8]=(o*E-s*M+u*k)*C,t[9]=(n*M-r*E-a*k)*C,t[10]=(d*w-v*b+y*m)*C,t[11]=(f*b-c*w-p*m)*C,t[12]=(s*A-o*S-l*k)*C,t[13]=(r*S-n*A+i*k)*C,t[14]=(v*x-d*_-g*m)*C,t[15]=(c*_-f*x+h*m)*C,t):null}},65551:function(t,e,r){var n=r(71551);t.exports=function(t,e,r,i){var a,o,s,l,u,c,f,h,p,d,v=e[0],g=e[1],y=e[2],m=i[0],x=i[1],b=i[2],_=r[0],w=r[1],T=r[2];return Math.abs(v-_)<1e-6&&Math.abs(g-w)<1e-6&&Math.abs(y-T)<1e-6?n(t):(f=v-_,h=g-w,p=y-T,a=x*(p*=d=1/Math.sqrt(f*f+h*h+p*p))-b*(h*=d),o=b*(f*=d)-m*p,s=m*h-x*f,(d=Math.sqrt(a*a+o*o+s*s))?(a*=d=1/d,o*=d,s*=d):(a=0,o=0,s=0),l=h*s-p*o,u=p*a-f*s,c=f*o-h*a,(d=Math.sqrt(l*l+u*u+c*c))?(l*=d=1/d,u*=d,c*=d):(l=0,u=0,c=0),t[0]=a,t[1]=l,t[2]=f,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=p,t[11]=0,t[12]=-(a*v+o*g+s*y),t[13]=-(l*v+u*g+c*y),t[14]=-(f*v+h*g+p*y),t[15]=1,t)}},91362:function(t){t.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*v,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*u+_*p+w*y,t[3]=x*o+b*c+_*d+w*m,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*v,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*u+_*p+w*y,t[7]=x*o+b*c+_*d+w*m,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*v,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*u+_*p+w*y,t[11]=x*o+b*c+_*d+w*m,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*v,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*u+_*p+w*y,t[15]=x*o+b*c+_*d+w*m,t}},60378:function(t){t.exports=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t}},7864:function(t){t.exports=function(t,e,r,n,i){var a=1/Math.tan(e/2),o=1/(n-i);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=(i+n)*o,t[11]=-1,t[12]=0,t[13]=0,t[14]=2*i*n*o,t[15]=0,t}},35279:function(t){t.exports=function(t,e,r,n){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(i+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(o-s)*l*.5,t[9]=(i-a)*u*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t}},65074:function(t){t.exports=function(t,e,r,n){var i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E=n[0],L=n[1],C=n[2],P=Math.sqrt(E*E+L*L+C*C);return Math.abs(P)<1e-6?null:(E*=P=1/P,L*=P,C*=P,i=Math.sin(r),o=1-(a=Math.cos(r)),s=e[0],l=e[1],u=e[2],c=e[3],f=e[4],h=e[5],p=e[6],d=e[7],v=e[8],g=e[9],y=e[10],m=e[11],x=E*E*o+a,b=L*E*o+C*i,_=C*E*o-L*i,w=E*L*o-C*i,T=L*L*o+a,k=C*L*o+E*i,A=E*C*o+L*i,M=L*C*o-E*i,S=C*C*o+a,t[0]=s*x+f*b+v*_,t[1]=l*x+h*b+g*_,t[2]=u*x+p*b+y*_,t[3]=c*x+d*b+m*_,t[4]=s*w+f*T+v*k,t[5]=l*w+h*T+g*k,t[6]=u*w+p*T+y*k,t[7]=c*w+d*T+m*k,t[8]=s*A+f*M+v*S,t[9]=l*A+h*M+g*S,t[10]=u*A+p*M+y*S,t[11]=c*A+d*M+m*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}},35545:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*i+u*n,t[5]=o*i+c*n,t[6]=s*i+f*n,t[7]=l*i+h*n,t[8]=u*i-a*n,t[9]=c*i-o*n,t[10]=f*i-s*n,t[11]=h*i-l*n,t}},94918:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[8],c=e[9],f=e[10],h=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i-u*n,t[1]=o*i-c*n,t[2]=s*i-f*n,t[3]=l*i-h*n,t[8]=a*n+u*i,t[9]=o*n+c*i,t[10]=s*n+f*i,t[11]=l*n+h*i,t}},15692:function(t){t.exports=function(t,e,r){var n=Math.sin(r),i=Math.cos(r),a=e[0],o=e[1],s=e[2],l=e[3],u=e[4],c=e[5],f=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*i+u*n,t[1]=o*i+c*n,t[2]=s*i+f*n,t[3]=l*i+h*n,t[4]=u*i-a*n,t[5]=c*i-o*n,t[6]=f*i-s*n,t[7]=h*i-l*n,t}},10789:function(t){t.exports=function(t,e,r){var n=r[0],i=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}},6726:function(t){t.exports=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"}},31283:function(t){t.exports=function(t,e,r){var n,i,a,o,s,l,u,c,f,h,p,d,v=r[0],g=r[1],y=r[2];return e===t?(t[12]=e[0]*v+e[4]*g+e[8]*y+e[12],t[13]=e[1]*v+e[5]*g+e[9]*y+e[13],t[14]=e[2]*v+e[6]*g+e[10]*y+e[14],t[15]=e[3]*v+e[7]*g+e[11]*y+e[15]):(n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],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]=p,t[11]=d,t[12]=n*v+s*g+f*y+e[12],t[13]=i*v+l*g+h*y+e[13],t[14]=a*v+u*g+p*y+e[14],t[15]=o*v+c*g+d*y+e[15]),t}},88654:function(t){t.exports=function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],a=e[6],o=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=i,t[13]=o,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}},42505:function(t,e,r){"use strict";var n=r(72791),i=r(71299),a=r(98580),o=r(12018),s=r(83522),l=r(25075),u=r(68016),c=r(58404),f=r(18863),h=r(10973),p=r(25677),d=r(75686),v=r(53545),g=r(56131),y=r(32879),m=r(30120),x=r(13547).nextPow2,b=new s,_=!1;if(document.body){var w=document.body.appendChild(document.createElement("div"));w.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(w).fontStretch&&(_=!0),document.body.removeChild(w)}var T=function(t){!function(t){return"function"==typeof t&&t._gl&&t.prop&&t.texture&&t.buffer}(t)?this.gl=o(t):(t={regl:t},this.gl=t.regl._gl),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||a({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(),b.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(h(t)?t:{})};T.prototype.createShader=function(){var t=this.regl,e=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(t,e){return[e.atlas.width,e.atlas.height]},atlasDim:function(t,e){return[e.atlas.cols,e.atlas.rows]},atlas:function(t,e){return e.atlas.texture},charStep:function(t,e){return e.atlas.step},em:function(t,e){return e.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:"\n\t\t\tprecision highp float;\n\t\t\tattribute float width, charOffset, char;\n\t\t\tattribute vec2 position;\n\t\t\tuniform float fontSize, charStep, em, align, baseline;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform vec4 color;\n\t\t\tuniform vec2 atlasSize, atlasDim, scale, translate, positionOffset;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvoid main () {\n\t\t\t\tvec2 offset = floor(em * (vec2(align + charOffset, baseline)\n\t\t\t\t\t+ vec2(positionOffset.x, -positionOffset.y)))\n\t\t\t\t\t/ (viewport.zw * scale.xy);\n\n\t\t\t\tvec2 position = (position + translate) * scale;\n\t\t\t\tposition += offset * scale;\n\n\t\t\t\tcharCoord = position * viewport.zw + viewport.xy;\n\n\t\t\t\tgl_Position = vec4(position * 2. - 1., 0, 1);\n\n\t\t\t\tgl_PointSize = charStep;\n\n\t\t\t\tcharId.x = mod(char, atlasDim.x);\n\t\t\t\tcharId.y = floor(char / atlasDim.x);\n\n\t\t\t\tcharWidth = width * em;\n\n\t\t\t\tfontColor = color / 255.;\n\t\t\t}",frag:"\n\t\t\tprecision highp float;\n\t\t\tuniform float fontSize, charStep, opacity;\n\t\t\tuniform vec2 atlasSize;\n\t\t\tuniform vec4 viewport;\n\t\t\tuniform sampler2D atlas;\n\t\t\tvarying vec4 fontColor;\n\t\t\tvarying vec2 charCoord, charId;\n\t\t\tvarying float charWidth;\n\n\t\t\tfloat lightness(vec4 color) {\n\t\t\t\treturn color.r * 0.299 + color.g * 0.587 + color.b * 0.114;\n\t\t\t}\n\n\t\t\tvoid main () {\n\t\t\t\tvec2 uv = gl_FragCoord.xy - charCoord + charStep * .5;\n\t\t\t\tfloat halfCharStep = floor(charStep * .5 + .5);\n\n\t\t\t\t// invert y and shift by 1px (FF expecially needs that)\n\t\t\t\tuv.y = charStep - uv.y;\n\n\t\t\t\t// ignore points outside of character bounding box\n\t\t\t\tfloat halfCharWidth = ceil(charWidth * .5);\n\t\t\t\tif (floor(uv.x) > halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},T.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(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)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(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]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=m(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=T.baseFontSize+"px sans-serif");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(T.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=T.fonts[i],e.font[r]))){var u=t.family.join(", "),c=[t.style];t.style!=t.variant&&c.push(t.variant),t.variant!=t.weight&&c.push(t.weight),_&&t.weight!=t.stretch&&c.push(t.stretch),e.font[r]={baseString:i,family:u,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:y(u,{origin:"top",fontSize:T.baseFontSize,fontStyle:c.join(" ")})},T.fonts[i]=e.font[r]}})),(a||o)&&this.font.forEach((function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h2){for(var w=!t.position[0].length,k=c.mallocFloat(2*this.count),A=0,M=0;A1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,-1*(i+="number"==typeof t?t-n.baseline:-n[t])}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var q;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;q=c.mallocUint8(G);for(var Z=(t.color.subarray||t.color.slice).bind(t.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+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=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text="",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.maxAtlasSize=1024,T.atlasCanvas=document.createElement("canvas"),T.atlasContext=T.atlasCanvas.getContext("2d",{alpha:!1}),T.baseFontSize=64,T.fonts={},t.exports=T},12018:function(t,e,r){"use strict";var n=r(71299);function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.g.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.g.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function o(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}t.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},(t=a(t)||"string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(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)).pixelRatio||(t.pixelRatio=r.g.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}return t.gl||["webgl","experimental-webgl","webgl-experimental"].some((function(e){try{t.gl=t.canvas.getContext(e,t.attrs)}catch(t){}return t.gl})),t.gl}},56068:function(t){t.exports=function(t){"string"==typeof t&&(t=[t]);for(var e=[].slice.call(arguments,1),r=[],n=0;n>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*v}},42018:function(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},47216:function(t){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,r=Object.prototype.toString,n=function(t){return!(e&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===r.call(t)},i=function(t){return!!n(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==r.call(t)&&"[object Function]"===r.call(t.callee)},a=function(){return n(arguments)}();n.isLegacyArguments=i,t.exports=a?n:i},54404:function(t){t.exports=!0},65481:function(t,e,r){"use strict";var n,i=Object.prototype.toString,a=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=r(84543)(),l=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(o.test(a.call(t)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(t);if(!l)return!1;if(void 0===n){var e=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&l(e)}return l(t)===n}},62683:function(t){"use strict";t.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function(t){"use strict";t.exports=function(t){return t!=t}},15567:function(t,e,r){"use strict";var n=r(68222),i=r(17045),a=r(64274),o=r(14922),s=r(22442),l=n(o(),Number);i(l,{getPolyfill:o,implementation:a,shim:s}),t.exports=l},14922:function(t,e,r){"use strict";var n=r(64274);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},22442:function(t,e,r){"use strict";var n=r(17045),i=r(14922);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},64941:function(t){"use strict";t.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},10973:function(t){"use strict";var e=Object.prototype.toString;t.exports=function(t){var r;return"[object Object]"===e.call(t)&&(null===(r=Object.getPrototypeOf(t))||r===Object.getPrototypeOf({}))}},18546:function(t){"use strict";t.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},89546:function(t){"use strict";t.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},9187:function(t,e,r){"use strict";var n=r(86165),i=r(72077),a=r(92978),o=a("Object.prototype.toString"),s=r(57877)()&&"symbol"==typeof Symbol.toStringTag,l=i(),u=a("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1}return!!h&&function(t){var e=!1;return n(f,(function(r,n){if(!e)try{e=r.call(t)===n}catch(t){}})),e}(t)}},44517:function(t){t.exports=function(){"use strict";var t,e,r;function n(n,i){if(t)if(e){var a="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r="1.10.1",n=i;function i(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var a=o;function o(t,e){this.x=t,this.y=e}function s(t,e,r,i){var a=new n(t,e,r,i);return function(t){return a.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},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(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=e*this.x-r*this.y,i=r*this.x+e*this.y;return this.x=n,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.x+r*(this.x-e.x)-n*(this.y-e.y),a=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=i,this.y=a,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var l=s(.25,.1,.25,1);function u(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function f(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function v(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function m(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function x(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function b(t){return Array.isArray(t)?t.map(b):"object"==typeof t&&t?m(t,b):t}var _={};function w(t){_[t]||("undefined"!=typeof console&&console.warn(t),_[t]=!0)}function T(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function k(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),""})),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}var S=null;function E(t){if(null==S){var e=t.navigator?t.navigator.userAgent:null;S=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return S}function L(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var C,P,O,I,D=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),z=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,R=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,F={now:D,frame:function(t){var e=z(t);return{cancel:function(){return R(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return C||(C=self.document.createElement("a")),C.href=t,C.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==P&&(P=self.matchMedia("(prefers-reduced-motion: reduce)")),P.matches)}},B={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"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},N={supported:!1,testSupport:function(t){!j&&I&&(U?V(t):O=t)}},j=!1,U=!1;function V(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,I),t.isContextLost())return;N.supported=!0}catch(t){}t.deleteTexture(e),j=!0}self.document&&((I=self.document.createElement("img")).onload=function(){O&&V(O),O=null,U=!0},I.onerror=function(){j=!0,O=null},I.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var H="01";var q=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function G(t){return 0===t.indexOf("mapbox:")}q.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",H,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!G(t))return t;var r=X(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!G(t))return t;var r=X(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!G(t))return t;var r=X(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return G(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+e+r,J(i))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!G(t))return t;var r=X(t),n=F.devicePixelRatio>=2||512===e?"@2x":"",i=N.supported?".webp":"$1";r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,""+n+i),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var a=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},Q.prototype.processRequests=function(t){},Q.prototype.postEvent=function(t,e,n,i){var a=this;if(B.EVENTS_URL){var o=X(B.EVENTS_URL);o.params.push("access_token="+(i||B.ACCESS_TOKEN||""));var s={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:r,skuId:H,userId:this.anonId},l=e?f(s,e):s,u={url:J(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([l])};this.pendingRequest=kt(u,(function(t){a.pendingRequest=null,n(t),a.saveEventData(),a.processRequests(i)}))}},Q.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var tt,et,rt=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(B.EVENTS_URL&&n||B.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),v(this.anonId)||(this.anonId=d()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(Q),nt=function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t,e){B.EVENTS_URL&&B.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return G(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=$(B.ACCESS_TOKEN),n=r?r.u:B.ACCESS_TOKEN,i=n!==this.eventData.tokenU;v(this.anonId)||(this.anonId=d(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(Q),it=new nt,at=it.postTurnstileEvent.bind(it),ot=new rt,st=ot.postMapLoadEvent.bind(ot),lt="mapbox-tiles",ut=500,ct=50;function ft(){self.caches&&!tt&&(tt=self.caches.open(lt))}function ht(t,e,r){if(ft(),tt){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=M(e.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<42e4||function(t,e){if(void 0===et)try{new Response(new ReadableStream),et=!0}catch(t){et=!1}et?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);ft(),tt&&tt.then((function(e){return e.put(pt(t.url),r)})).catch((function(t){return w(t.message)}))})))}}function pt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}function dt(t,e){if(ft(),!tt)return e(null);var r=pt(t.url);tt.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),r=M(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}var vt,gt=1/0;function yt(){return null==vt&&(vt=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),vt}var mt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(mt);var xt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),bt=A()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};function _t(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:bt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf("sku=")>0&&Y(r);"json"===t.type&&i.headers.set("Accept","application/json");var l=function(r,n,a){if(!o){if(r&&"SecurityError"!==r.message&&w(r),n&&a)return u(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return u(r,n,l)}return e(new xt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},u=function(r,n,s){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then((function(t){o||(n&&s&&ht(i,n,s),a=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(t){o||e(new Error(t.message))}))};return s?dt(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}var wt=function(t,e){if(r=t.url,!(/^file:/.test(r)||/^file:/.test(bt())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return _t(t,e);if(A()&&self.worker&&self.worker.actor){return self.worker.actor.send("getResource",t,e,void 0,!0)}}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(n,t.headers[n]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new xt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},Tt=function(t,e){return wt(f(t,{type:"arrayBuffer"}),e)},kt=function(t,e){return wt(f(t,{method:"POST"}),e)};var At,Mt;At=[],Mt=0;var St=function(t,e){if(N.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),Mt>=B.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return At.push(r),r}Mt++;var n=!1,i=function(){if(!n)for(n=!0,Mt--;At.length&&Mt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Ot.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var It={$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"},sources:{required:!0,type:"sources"},sprite:{type:"string"},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"},"*":{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"},"*":{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:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{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},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{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"],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"}},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":{},within:{}}},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},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},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}},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"}}},Dt=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function zt(t){var e=t.key,r=t.value;return r?[new Dt(e,r,"constants have been deprecated as of v8")]:[]}function Rt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Qt=[Ut,Vt,Ht,qt,Gt,Xt,Zt,Kt(Yt),Jt];function te(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!te(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=Qt;r255?255:t}function i(t){return t<0?0:t>1?1:t}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100*255):n(parseInt(t))}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100):i(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,i=t.replace(/ /g,"").toLowerCase();if(i in r)return r[i].slice();if("#"===i[0])return 4===i.length?(e=parseInt(i.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===i.length&&(e=parseInt(i.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=i.indexOf("("),u=i.indexOf(")");if(-1!==l&&u+1===i.length){var c=i.substr(0,l),f=i.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==f.length)return null;h=o(f.pop());case"rgb":return 3!==f.length?null:[a(f[0]),a(f[1]),a(f[2]),h];case"hsla":if(4!==f.length)return null;h=o(f.pop());case"hsl":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=o(f[1]),v=o(f[2]),g=v<=.5?v*(d+1):v+d-v*d,y=2*v-g;return[n(255*s(y,g,p+1/3)),n(255*s(y,g,p)),n(255*s(y,g,p-1/3)),h];default:return null}}return null}}catch(t){}})),ie=ne.parseCSSColor,ae=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};ae.parse=function(t){if(t){if(t instanceof ae)return t;if("string"==typeof t){var e=ie(t);if(e)return new ae(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},ae.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],n=t[2],i=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(n)+","+i+")"},ae.prototype.toArray=function(){var t=this,e=t.r,r=t.g,n=t.b,i=t.a;return 0===i?[0,0,0,0]:[255*e/i,255*r/i,255*n/i,i]},ae.black=new ae(0,0,0,1),ae.white=new ae(1,1,1,1),ae.transparent=new ae(0,0,0,0),ae.red=new ae(1,0,0,1);var oe=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};oe.prototype.compare=function(t,e){return this.collator.compare(t,e)},oe.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var se=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},le=function(t){this.sections=t};le.fromString=function(t){return new le([new se(t,null,null,null,null)])},le.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},le.factory=function(t){return t instanceof le?t:le.fromString(t)},le.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},le.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function fe(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof ae)return!0;if(t instanceof oe)return!0;if(t instanceof le)return!0;if(t instanceof ue)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if("string"!=typeof s||!(s in ge)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=ge[s],n++}else a=Yt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}r=Kt(a,o)}else r=ge[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var me=function(t){this.type=Xt,this.sections=t};me.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=e.parse(o["font-scale"],1,Vt)))return null;var l=null;if(o["text-font"]&&!(l=e.parse(o["text-font"],1,Kt(Ht))))return null;var u=null;if(o["text-color"]&&!(u=e.parse(o["text-color"],1,Gt)))return null;var c=n[n.length-1];c.scale=s,c.font=l,c.textColor=u}else{var f=e.parse(t[a],1,Yt);if(!f)return null;var h=f.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new me(n)},me.prototype.evaluate=function(t){return new le(this.sections.map((function(e){var r=e.content.evaluate(t);return he(r)===Jt?new se("",r,null,null,null):new se(pe(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},me.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},xe.prototype.eachChild=function(t){t(this.input)},xe.prototype.outputDefined=function(){return!1},xe.prototype.serialize=function(){return["image",this.input.serialize()]};var be={"to-boolean":qt,"to-color":Gt,"to-number":Vt,"to-string":Ht},_e=function(t,e){this.type=t,this.args=e};_e.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=be[r],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":ce(e[0],e[1],e[2],e[3])))return new ae(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new ve(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2]||t[1]<=e[1]||t[3]>=e[3])}function Le(t,e){var r,n=(180+t[0])/360,i=(r=t[1],(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+r*Math.PI/360)))/360),a=Math.pow(2,e.z);return[Math.round(n*a*Me),Math.round(i*a*Me)]}function Ce(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function Pe(t,e){for(var r=!1,n=0,i=e.length;n0&&f<0||c<0&&f>0}function De(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}Se(e,t)}function je(t,e,r,n){for(var i=Math.pow(2,n.z)*Me,a=[n.x*Me,n.y*Me],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Ge(t,e)&&(r=!1)})),r}Ve.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(fe(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;ne))throw new ve("Input is not a number.");o=s-1}return 0}Ye.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Ye.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ye(e,[t]):"coerce"===r?new _e(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||"coerce");else a=r(a,o,e.typeAnnotation||"assert")}if(!(a instanceof de)&&"resolvedImage"!==a.type.kind&&We(a)){var l=new Te;try{a=new de(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},Ye.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Ye(this.registry,n,e||null,i,this.errors)},Ye.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Nt(n,t))},Ye.prototype.checkSubtype=function(t,e){var r=te(t,e);return r&&this.error(r),r};var Je=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,i);if(!c)return null;i=i||c.type,n.push([o,c])}return new Je(i,r,n)},Je.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[Xe(e,n)].evaluate(t)},Je.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var $e=Object.freeze({__proto__:null,number:Ke,color:function(t,e,r){return new ae(Ke(t.r,e.r,r),Ke(t.g,e.g,r),Ke(t.b,e.b,r),Ke(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return Ke(t,e[n],r)}))}}),Qe=.95047,tr=1.08883,er=4/29,rr=6/29,nr=3*rr*rr,ir=Math.PI/180,ar=180/Math.PI;function or(t){return t>.008856451679035631?Math.pow(t,1/3):t/nr+er}function sr(t){return t>rr?t*t*t:nr*(t-er)}function lr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ur(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function cr(t){var e=ur(t.r),r=ur(t.g),n=ur(t.b),i=or((.4124564*e+.3575761*r+.1804375*n)/Qe),a=or((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-or((.0193339*e+.119192*r+.9503041*n)/tr)),alpha:t.a}}function fr(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*sr(e),r=Qe*sr(r),n=tr*sr(n),new ae(lr(3.2404542*r-1.5371385*e-.4985314*n),lr(-.969266*r+1.8760108*e+.041556*n),lr(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function hr(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var pr={forward:cr,reverse:fr,interpolate:function(t,e,r){return{l:Ke(t.l,e.l,r),a:Ke(t.a,e.a,r),b:Ke(t.b,e.b,r),alpha:Ke(t.alpha,e.alpha,r)}}},dr={forward:function(t){var e=cr(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*ar;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*ir,r=t.c;return fr({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:hr(t.h,e.h,r),c:Ke(t.c,e.c,r),l:Ke(t.l,e.l,r),alpha:Ke(t.alpha,e.alpha,r)}}},vr=Object.freeze({__proto__:null,lab:pr,hcl:dr}),gr=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,Vt)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=Gt:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c=f)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var v=e.parse(h,d,u);if(!v)return null;u=u||v.type,l.push([f,v])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new gr(u,r,n,i,l):e.error("Type "+$t(u)+" is not interpolatable.")},gr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=Xe(e,n),o=e[a],s=e[a+1],l=gr.interpolationFactor(this.interpolation,n,o,s),u=r[a].evaluate(t),c=r[a+1].evaluate(t);return"interpolate"===this.operator?$e[this.type.kind.toLowerCase()](u,c,l):"interpolate-hcl"===this.operator?dr.reverse(dr.interpolate(dr.forward(u),dr.forward(c),l)):pr.reverse(pr.interpolate(pr.forward(u),pr.forward(c),l))},gr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new ve("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new ve("Array index must be an integer, but found "+e+" instead.");return r[e]},br.prototype.eachChild=function(t){t(this.index),t(this.input)},br.prototype.outputDefined=function(){return!1},br.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var _r=function(t,e){this.type=qt,this.needle=t,this.haystack=e};_r.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Yt),n=e.parse(t[2],2,Yt);return r&&n?ee(r.type,[qt,Ht,Vt,Ut,Yt])?new _r(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+$t(r.type)+" instead"):null},_r.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!re(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+$t(he(e))+" instead.");if(!re(r,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+$t(he(r))+" instead.");return r.indexOf(e)>=0},_r.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},_r.prototype.outputDefined=function(){return!0},_r.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var wr=function(t,e,r){this.type=Vt,this.needle=t,this.haystack=e,this.fromIndex=r};wr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Yt),n=e.parse(t[2],2,Yt);if(!r||!n)return null;if(!ee(r.type,[qt,Ht,Vt,Ut,Yt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+$t(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Vt);return i?new wr(r,n,i):null}return new wr(r,n)},wr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!re(e,["boolean","string","number","null"]))throw new ve("Expected first argument to be of type boolean, string, number or null, but found "+$t(he(e))+" instead.");if(!re(r,["string","array"]))throw new ve("Expected second argument to be of type array or string, but found "+$t(he(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},wr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},wr.prototype.outputDefined=function(){return!1},wr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Tr=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};Tr.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,he(h)))return null}else r=he(h);if(void 0!==i[String(h)])return u.error("Branch labels must be unique.");i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,Yt);if(!d)return null;var v=e.parse(t[t.length-1],t.length-1,n);return v?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new Tr(r,n,d,i,a,v):null},Tr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(he(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Tr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Tr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},Tr.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Yt),n=e.parse(t[2],2,Vt);if(!r||!n)return null;if(!ee(r.type,[Kt(Yt),Ht,Yt]))return e.error("Expected first argument to be of type array or string, but found "+$t(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Vt);return i?new Ar(r.type,r,n,i):null}return new Ar(r.type,r,n)},Ar.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!re(e,["string","array"]))throw new ve("Expected first argument to be of type array or string, but found "+$t(he(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},Ar.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},Ar.prototype.outputDefined=function(){return!1},Ar.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var Lr=Er("==",(function(t,e,r){return e===r}),Sr),Cr=Er("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!Sr(0,e,r,n)})),Pr=Er("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),Ir=Er("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),Dr=Er(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),zr=function(t,e,r,n,i){this.type=Ht,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};zr.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Vt);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Ht)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Ht)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,Vt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Vt))?null:new zr(r,i,a,o,s)},zr.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},zr.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},zr.prototype.outputDefined=function(){return!1},zr.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Rr=function(t){this.type=Vt,this.input=t};Rr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+$t(r.type)+" instead."):new Rr(r):null},Rr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new ve("Expected value to be of type string or array, but found "+$t(he(e))+" instead.")},Rr.prototype.eachChild=function(t){t(this.input)},Rr.prototype.outputDefined=function(){return!1},Rr.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Fr={"==":Lr,"!=":Cr,">":Or,"<":Pr,">=":Dr,"<=":Ir,array:ye,at:br,boolean:ye,case:kr,coalesce:mr,collator:Ae,format:me,image:xe,in:_r,"index-of":wr,interpolate:gr,"interpolate-hcl":gr,"interpolate-lab":gr,length:Rr,let:xr,literal:de,match:Tr,number:ye,"number-format":zr,object:ye,slice:Ar,step:Je,string:ye,"to-boolean":_e,"to-color":_e,"to-number":_e,"to-string":_e,var:Ze,within:Ve};function Br(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=ce(r,n,i,o);if(s)throw new ve(s);return new ae(r/255*o,n/255*o,i/255*o,o)}function Nr(t,e){return t in e}function jr(t,e){var r=e[t];return void 0===r?null:r}function Ur(t){return{type:t}}function Vr(t){return{result:"success",value:t}}function Hr(t){return{result:"error",value:t}}function qr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Gr(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Zr(t){return!!t.expression&&t.expression.interpolated}function Yr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Wr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Xr(t){return t}function Jr(t,e){var r,n,i,a="color"===e.type,o=t.stops&&"object"==typeof t.stops[0][0],s=o||void 0!==t.property,l=o||!s,u=t.type||(Zr(e)?"exponential":"interval");if(a&&((t=Rt({},t)).stops&&(t.stops=t.stops.map((function(t){return[t[0],ae.parse(t[1])]}))),t.default?t.default=ae.parse(t.default):t.default=ae.parse(e.default)),t.colorSpace&&"rgb"!==t.colorSpace&&!vr[t.colorSpace])throw new Error("Unknown color space: "+t.colorSpace);if("exponential"===u)r=tn;else if("interval"===u)r=Qr;else if("categorical"===u){r=$r,n=Object.create(null);for(var c=0,f=t.stops;c=t.stops[n-1][0])return t.stops[n-1][1];var i=Xe(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function tn(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==Yr(r))return Kr(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var a=Xe(t.stops.map((function(t){return t[0]})),r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],u=$e[e.type]||Xr;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=vr[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return u(r,n,o)}}:u(s,l,o)}function en(t,e,r){return"color"===e.type?r=ae.parse(r):"formatted"===e.type?r=le.fromString(r.toString()):"resolvedImage"===e.type?r=ue.fromString(r.toString()):Yr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Kr(r,t.default,e.default)}ke.register(Fr,{error:[{kind:"error"},[Ht],function(t,e){var r=e[0];throw new ve(r.evaluate(t))}],typeof:[Ht,[Yt],function(t,e){return $t(he(e[0].evaluate(t)))}],"to-rgba":[Kt(Vt,4),[Gt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Gt,[Vt,Vt,Vt],Br],rgba:[Gt,[Vt,Vt,Vt,Vt],Br],has:{type:qt,overloads:[[[Ht],function(t,e){return Nr(e[0].evaluate(t),t.properties())}],[[Ht,Zt],function(t,e){var r=e[0],n=e[1];return Nr(r.evaluate(t),n.evaluate(t))}]]},get:{type:Yt,overloads:[[[Ht],function(t,e){return jr(e[0].evaluate(t),t.properties())}],[[Ht,Zt],function(t,e){var r=e[0],n=e[1];return jr(r.evaluate(t),n.evaluate(t))}]]},"feature-state":[Yt,[Ht],function(t,e){return jr(e[0].evaluate(t),t.featureState||{})}],properties:[Zt,[],function(t){return t.properties()}],"geometry-type":[Ht,[],function(t){return t.geometryType()}],id:[Yt,[],function(t){return t.id()}],zoom:[Vt,[],function(t){return t.globals.zoom}],"heatmap-density":[Vt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Vt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Yt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Vt,Ur(Vt),function(t,e){for(var r=0,n=0,i=e;n":[qt,[Ht,Yt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],"filter-id->":[qt,[Yt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[qt,[Ht,Yt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],"filter-id-<=":[qt,[Yt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[qt,[Ht,Yt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],"filter-id->=":[qt,[Yt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[qt,[Yt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[qt,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[qt,[Kt(Ht)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[qt,[Kt(Yt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[qt,[Ht,Kt(Yt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[qt,[Ht,Kt(Yt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:qt,overloads:[[[qt,qt],function(t,e){var r=e[0],n=e[1];return r.evaluate(t)&&n.evaluate(t)}],[Ur(qt),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in Fr}function an(t,e){var r=new Ye(Fr,[],e?function(t){var e={color:Gt,string:Ht,number:Vt,enum:Ht,boolean:qt,formatted:Xt,resolvedImage:Jt};return"array"===t.type?Kt(e[t.value]||Yt,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Vr(new rn(n,e)):Hr(r.errors)}rn.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},rn.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new ve("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var on=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!qe(e.expression)};on.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},on.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var sn=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!qe(e.expression),this.interpolationType=n};function ln(t,e){if("error"===(t=an(t,e)).result)return t;var r=t.value.expression,n=He(r);if(!n&&!qr(e))return Hr([new Nt("","data expressions not supported")]);var i=Ge(r,["zoom"]);if(!i&&!Gr(e))return Hr([new Nt("","zoom expressions not supported")]);var a=cn(r);if(!a&&!i)return Hr([new Nt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(a instanceof Nt)return Hr([a]);if(a instanceof gr&&!Zr(e))return Hr([new Nt("",'"interpolate" expressions cannot be used with this property')]);if(!a)return Vr(new on(n?"constant":"source",t.value));var o=a instanceof gr?a.interpolation:void 0;return Vr(new sn(n?"camera":"composite",t.value,a.labels,o))}sn.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},sn.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)},sn.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?gr.interpolationFactor(this.interpolationType,t,e,r):0};var un=function(t,e){this._parameters=t,this._specification=e,Rt(this,Jr(this._parameters,this._specification))};function cn(t){var e=null;if(t instanceof xr)e=cn(t.result);else if(t instanceof mr)for(var r=0,n=t.args;rn.maximum?[new Dt(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function dn(t){var e,r,n,i=t.valueSpec,a=Ft(t.value.type),o={},s="categorical"!==a&&void 0===t.value.property,l=!s,u="array"===Yr(t.value.stops)&&"array"===Yr(t.value.stops[0])&&"object"===Yr(t.value.stops[0][0]),c=fn({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===a)return[new Dt(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(hn({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===Yr(r)&&0===r.length&&e.push(new Dt(t.key,r,"array must have at least one stop")),e},default:function(t){return Bn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===a&&s&&c.push(new Dt(t.key,t.value,'missing required property "property"')),"identity"===a||t.value.stops||c.push(new Dt(t.key,t.value,'missing required property "stops"')),"exponential"===a&&t.valueSpec.expression&&!Zr(t.valueSpec)&&c.push(new Dt(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!qr(t.valueSpec)?c.push(new Dt(t.key,t.value,"property functions not supported")):s&&!Gr(t.valueSpec)&&c.push(new Dt(t.key,t.value,"zoom functions not supported"))),"categorical"!==a&&!u||void 0!==t.value.property||c.push(new Dt(t.key,t.value,'"property" property is required')),c;function f(t){var e=[],a=t.value,s=t.key;if("array"!==Yr(a))return[new Dt(s,a,"array expected, "+Yr(a)+" found")];if(2!==a.length)return[new Dt(s,a,"array length 2 expected, length "+a.length+" found")];if(u){if("object"!==Yr(a[0]))return[new Dt(s,a,"object expected, "+Yr(a[0])+" found")];if(void 0===a[0].zoom)return[new Dt(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new Dt(s,a,"object stop key must have value")];if(n&&n>Ft(a[0].zoom))return[new Dt(s,a[0].zoom,"stop zoom values must appear in ascending order")];Ft(a[0].zoom)!==n&&(n=Ft(a[0].zoom),r=void 0,o={}),e=e.concat(fn({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:pn,value:h}}))}else e=e.concat(h({key:s+"[0]",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return nn(Bt(a[1]))?e.concat([new Dt(s+"[1]",a[1],"expressions are not allowed in function stops.")]):e.concat(Bn({key:s+"[1]",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=Yr(t.value),l=Ft(t.value),u=null!==t.value?t.value:n;if(e){if(s!==e)return[new Dt(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new Dt(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var c="number expected, "+s+" found";return qr(i)&&void 0===a&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Dt(t.key,u,c)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);ee?1:0}function _n(t){if(!Array.isArray(t))return!1;if("within"===t[0])return!0;for(var e=1;e"===r||"<="===r||">="===r?Tn(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(wn))):"all"===r?["all"].concat(t.slice(1).map(wn)):"none"===r?["all"].concat(t.slice(1).map(wn).map(Mn)):"in"===r?kn(t[1],t.slice(2)):"!in"===r?Mn(kn(t[1],t.slice(2))):"has"===r?An(t[1]):"!has"===r?Mn(An(t[1])):"within"!==r||t}function Tn(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function kn(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(bn)]]:["filter-in-small",t,["literal",e]]}}function An(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Mn(t){return["!",t]}function Sn(t){return yn(Bt(t.value))?vn(Rt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):En(t)}function En(t){var e=t.value,r=t.key;if("array"!==Yr(e))return[new Dt(r,e,"array expected, "+Yr(e)+" found")];var n,i=t.styleSpec,a=[];if(e.length<1)return[new Dt(r,e,"filter array must have at least 1 element")];switch(a=a.concat(gn({key:r+"[0]",value:e[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),Ft(e[0])){case"<":case"<=":case">":case">=":e.length>=2&&"$type"===Ft(e[1])&&a.push(new Dt(r,e,'"$type" cannot be use with operator "'+e[0]+'"'));case"==":case"!=":3!==e.length&&a.push(new Dt(r,e,'filter array for operator "'+e[0]+'" must have 3 elements'));case"in":case"!in":e.length>=2&&"string"!==(n=Yr(e[1]))&&a.push(new Dt(r+"[1]",e[1],"string expected, "+n+" found"));for(var o=2;o=c[p+0]&&n>=c[p+1])?(o[h]=!0,a.push(u[h])):o[h]=!1}}},Xn.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=c;h++)for(var p=u;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},Xn.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Xn.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Xn.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var f=t[c];u[c]=$n[l].shallow.indexOf(c)>=0?f:ni(f,e)}t instanceof Error&&(u.message=t.message)}if(u.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==l&&(u.$name=l),u}throw new Error("can't serialize object of type "+typeof t)}function ii(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||ei(t)||ri(t)||ArrayBuffer.isView(t)||t instanceof Jn)return t;if(Array.isArray(t))return t.map(ii);if("object"==typeof t){var e=t.$name||"Object",r=$n[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:ii(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var ai=function(){this.first=!0};ai.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function si(t){for(var e=0,r=t;e=65097&&t<=65103)||oi["CJK Compatibility Ideographs"](t)||oi["CJK Compatibility"](t)||oi["CJK Radicals Supplement"](t)||oi["CJK Strokes"](t)||!(!oi["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||oi["CJK Unified Ideographs Extension A"](t)||oi["CJK Unified Ideographs"](t)||oi["Enclosed CJK Letters and Months"](t)||oi["Hangul Compatibility Jamo"](t)||oi["Hangul Jamo Extended-A"](t)||oi["Hangul Jamo Extended-B"](t)||oi["Hangul Jamo"](t)||oi["Hangul Syllables"](t)||oi.Hiragana(t)||oi["Ideographic Description Characters"](t)||oi.Kanbun(t)||oi["Kangxi Radicals"](t)||oi["Katakana Phonetic Extensions"](t)||oi.Katakana(t)&&12540!==t||!(!oi["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!oi["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||oi["Unified Canadian Aboriginal Syllabics"](t)||oi["Unified Canadian Aboriginal Syllabics Extended"](t)||oi["Vertical Forms"](t)||oi["Yijing Hexagram Symbols"](t)||oi["Yi Syllables"](t)||oi["Yi Radicals"](t))))}function ui(t){return!(li(t)||function(t){return!!(oi["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||oi["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||oi["Letterlike Symbols"](t)||oi["Number Forms"](t)||oi["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||oi["Control Pictures"](t)&&9251!==t||oi["Optical Character Recognition"](t)||oi["Enclosed Alphanumerics"](t)||oi["Geometric Shapes"](t)||oi["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||oi["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||oi["CJK Symbols and Punctuation"](t)||oi.Katakana(t)||oi["Private Use Area"](t)||oi["CJK Compatibility Forms"](t)||oi["Small Form Variants"](t)||oi["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function ci(t){return oi.Arabic(t)||oi["Arabic Supplement"](t)||oi["Arabic Extended-A"](t)||oi["Arabic Presentation Forms-A"](t)||oi["Arabic Presentation Forms-B"](t)}function fi(t){return t>=1424&&t<=2303||oi["Arabic Presentation Forms-A"](t)||oi["Arabic Presentation Forms-B"](t)}function hi(t,e){return!(!e&&fi(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||oi.Khmer(t))}function pi(t){for(var e=0,r=t;e-1&&(xi=yi),mi&&mi(t)};function wi(){Ti.fire(new Ct("pluginStateChange",{pluginStatus:xi,pluginURL:bi}))}var Ti=new Ot,ki=function(){return xi},Ai=function(){if(xi!==di||!bi)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");xi=vi,wi(),bi&&Tt({url:bi},(function(t){t?_i(t):(xi=gi,wi())}))},Mi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xi===gi||null!=Mi.applyArabicShaping},isLoading:function(){return xi===vi},setState:function(t){xi=t.pluginStatus,bi=t.pluginURL},isParsed:function(){return null!=Mi.applyArabicShaping&&null!=Mi.processBidirectionalText&&null!=Mi.processStyledBidirectionalText},getPluginURL:function(){return bi}},Si=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ai,this.transition={})};Si.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var Ei=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Wr(t))return new un(t,e);if(nn(t)){var r=ln(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=ae.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};Ei.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ei.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var Li=function(t){this.property=t,this.value=new Ei(t,void 0)};Li.prototype.transitioned=function(t,e){return new Pi(this.property,this.value,e,f({},t.transition,this.transition),t.now)},Li.prototype.untransitioned=function(){return new Pi(this.property,this.value,null,{},0)};var Ci=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Ci.prototype.getValue=function(t){return b(this._values[t].value.value)},Ci.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Li(this._values[t].property)),this._values[t].value=new Ei(this._values[t].property,null===e?void 0:b(e))},Ci.prototype.getTransition=function(t){return b(this._values[t].transition)},Ci.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Li(this._values[t].property)),this._values[t].transition=b(e)||void 0},Ci.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var Oi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Oi.prototype.possiblyEvaluate=function(t,e,r){for(var n=new zi(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Fi),Ni=function(t){this.specification=t};Ni.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new Si(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Si(Math.floor(e.zoom),e)),t.expression.evaluate(new Si(Math.floor(e.zoom+1),e)),e)}},Ni.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ni.prototype.interpolate=function(t){return t};var ji=function(t){this.specification=t};ji.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},ji.prototype.interpolate=function(){return!1};var Ui=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new Ei(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new Li(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Qn("DataDrivenProperty",Fi),Qn("DataConstantProperty",Ri),Qn("CrossFadedDataDrivenProperty",Bi),Qn("CrossFadedProperty",Ni),Qn("ColorRampProperty",ji);var Vi="-transition",Hi=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new Ii(r.layout)),r.paint)){for(var n in this._transitionablePaint=new Ci(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new zi(r.paint)}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".layout."+t;if(this._validate(Zn,n,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return y(t,Vi)?this._transitionablePaint.getTransition(t.slice(0,-Vi.length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var n="layers."+this.id+".paint."+t;if(this._validate(Gn,n,t,e,r))return!1}if(y(t,Vi))return this._transitionablePaint.setTransition(t.slice(0,-Vi.length),e||void 0),!1;var i=this._transitionablePaint._values[t],a="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),s=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var l=this._transitionablePaint._values[t].value;return l.isDataDriven()||o||a||this._handleOverridablePaintPropertyUpdate(t,s,l)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},e.prototype.serialize=function(){var t={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&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),x(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Yn(this,t.call(Hn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:It,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof Di&&qr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(Ot),qi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Gi=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Zi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Yi(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i,a=(i=t.type,qi[i].BYTES_PER_ELEMENT),o=r=Wi(r,Math.max(e,a)),s=t.components||1;return n=Math.max(n,a),r+=a*s,{name:t.name,type:t.type,components:s,offset:o}})),size:Wi(r,Math.max(n,e)),alignment:e}}function Wi(t,e){return Math.ceil(t/e)*e}Zi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Zi.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Zi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Zi.prototype.clear=function(){this.length=0},Zi.prototype.resize=function(t){this.reserve(t),this.length=t},Zi.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Zi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(Zi);Xi.prototype.bytesPerElement=4,Qn("StructArrayLayout2i4",Xi);var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(Zi);Ji.prototype.bytesPerElement=8,Qn("StructArrayLayout4i8",Ji);var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Zi);Ki.prototype.bytesPerElement=12,Qn("StructArrayLayout2i4i12",Ki);var $i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(Zi);$i.prototype.bytesPerElement=8,Qn("StructArrayLayout2i4ub8",$i);var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l,u)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=u,this.uint8[h+17]=c,t},e}(Zi);Qi.prototype.bytesPerElement=18,Qn("StructArrayLayout8ui2ub18",Qi);var ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,u,c,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=u,this.int16[p+9]=c,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(Zi);ta.prototype.bytesPerElement=24,Qn("StructArrayLayout4i4ui4i24",ta);var ea=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(Zi);ea.prototype.bytesPerElement=12,Qn("StructArrayLayout3f12",ea);var ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Zi);ra.prototype.bytesPerElement=4,Qn("StructArrayLayout1ul4",ra);var na=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u){var c=10*t,f=5*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=n,this.int16[c+3]=i,this.int16[c+4]=a,this.int16[c+5]=o,this.uint32[f+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(Zi);na.prototype.bytesPerElement=20,Qn("StructArrayLayout6i1ul2ui20",na);var ia=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(Zi);ia.prototype.bytesPerElement=12,Qn("StructArrayLayout2i2i2i12",ia);var aa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(Zi);aa.prototype.bytesPerElement=16,Qn("StructArrayLayout2f1f2i16",aa);var oa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(Zi);oa.prototype.bytesPerElement=12,Qn("StructArrayLayout2ub2f12",oa);var sa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(Zi);sa.prototype.bytesPerElement=6,Qn("StructArrayLayout3ui6",sa);var la=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g){var y=this.length;return this.resize(y+1),this.emplace(y,t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y){var m=24*t,x=12*t,b=48*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.uint16[m+2]=n,this.uint16[m+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[m+10]=l,this.uint16[m+11]=u,this.uint16[m+12]=c,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=v,this.uint32[x+10]=g,this.int16[m+22]=y,t},e}(Zi);la.prototype.bytesPerElement=48,Qn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",la);var ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.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)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,w,T,k,A,M,S,E){var L=34*t,C=17*t;return this.int16[L+0]=e,this.int16[L+1]=r,this.int16[L+2]=n,this.int16[L+3]=i,this.int16[L+4]=a,this.int16[L+5]=o,this.int16[L+6]=s,this.int16[L+7]=l,this.uint16[L+8]=u,this.uint16[L+9]=c,this.uint16[L+10]=f,this.uint16[L+11]=h,this.uint16[L+12]=p,this.uint16[L+13]=d,this.uint16[L+14]=v,this.uint16[L+15]=g,this.uint16[L+16]=y,this.uint16[L+17]=m,this.uint16[L+18]=x,this.uint16[L+19]=b,this.uint16[L+20]=_,this.uint16[L+21]=w,this.uint16[L+22]=T,this.uint32[C+12]=k,this.float32[C+13]=A,this.float32[C+14]=M,this.float32[C+15]=S,this.float32[C+16]=E,t},e}(Zi);ua.prototype.bytesPerElement=68,Qn("StructArrayLayout8i15ui1ul4f68",ua);var ca=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Zi);ca.prototype.bytesPerElement=4,Qn("StructArrayLayout1f4",ca);var fa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(Zi);fa.prototype.bytesPerElement=6,Qn("StructArrayLayout3i6",fa);var ha=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=2*t,a=4*t;return this.uint32[i+0]=e,this.uint16[a+2]=r,this.uint16[a+3]=n,t},e}(Zi);ha.prototype.bytesPerElement=8,Qn("StructArrayLayout1ul2ui8",ha);var pa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(Zi);pa.prototype.bytesPerElement=4,Qn("StructArrayLayout2ui4",pa);var da=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Zi);da.prototype.bytesPerElement=2,Qn("StructArrayLayout1ui2",da);var va=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(Zi);va.prototype.bytesPerElement=8,Qn("StructArrayLayout2f8",va);var ga=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(Zi);ga.prototype.bytesPerElement=16,Qn("StructArrayLayout4f16",ga);var ya=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={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 r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new a(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Gi);ya.prototype.size=20;var ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new ya(this,t)},e}(na);Qn("CollisionBoxArray",ma);var xa=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={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 r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(Gi);xa.prototype.size=48;var ba=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new xa(this,t)},e}(la);Qn("PlacedSymbolArray",ba);var _a=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={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 r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(Gi);_a.prototype.size=68;var wa=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new _a(this,t)},e}(ua);Qn("SymbolInstanceArray",wa);var Ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(ca);Qn("GlyphOffsetArray",Ta);var ka=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(fa);Qn("SymbolLineVertexArray",ka);var Aa=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(Gi);Aa.prototype.size=8;var Ma=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Aa(this,t)},e}(ha);Qn("FeatureIndexArray",Ma);var Sa=Yi([{name:"a_pos",components:2,type:"Int16"}],4).members,Ea=function(t){void 0===t&&(t=[]),this.segments=t};function La(t,e){return 256*(t=u(Math.floor(t),0,255))+u(Math.floor(e),0,255)}Ea.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>Ea.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+Ea.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>Ea.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},Ea.prototype.get=function(){return this.segments},Ea.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),Oa=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),Ia=Pa,Da=Pa,za=Oa;Ia.murmur3=Da,Ia.murmur2=za;var Ra=function(){this.ids=[],this.positions=[],this.indexed=!1};Ra.prototype.add=function(t,e,r,n){this.ids.push(Ba(t)),this.positions.push(e,r,n)},Ra.prototype.getPositions=function(t){for(var e=Ba(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;){var o=this.positions[3*r],s=this.positions[3*r+1],l=this.positions[3*r+2];a.push({index:o,start:s,end:l}),r++}return a},Ra.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return Na(r,n,0,r.length-1),e&&e.push(r.buffer,n.buffer),{ids:r,positions:n}},Ra.deserialize=function(t){var e=new Ra;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var Fa=Math.pow(2,53)-1;function Ba(t){var e=+t;return!isNaN(e)&&e<=Fa?e:Ia(String(t))}function Na(t,e,r,n){for(;r>1],a=r-1,o=n+1;;){do{a++}while(t[a]i);if(a>=o)break;ja(t,a,o),ja(e,3*a,3*o),ja(e,3*a+1,3*o+1),ja(e,3*a+2,3*o+2)}o-rlo.max||o.ylo.max)&&(w("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=u(o.x,lo.min,lo.max),o.y=u(o.y,lo.min,lo.max))}return r}function co(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var fo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Xi,this.indexArray=new sa,this.segments=new Ea,this.programConfigurations=new no(Sa,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function ho(t,e){for(var r=0;r1){if(yo(t,e))return!0;for(var n=0;n1?t.distSqr(r):t.distSqr(r.sub(e)._mult(i)._add(e))}function _o(t,e){for(var r,n,i,a=!1,o=0;oe.y!=i.y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function wo(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function To(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=T(t,e,r[0]);return a!==T(t,e,r[1])||a!==T(t,e,r[2])||a!==T(t,e,r[3])}function ko(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Ao(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Mo(t,e,r,n,i){if(!e[0]&&!e[1])return t;var o=a.convert(e)._mult(i);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=oo||c<0||c>=oo)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;co(this.layoutVertexArray,u,c,-1,-1),co(this.layoutVertexArray,u,c,1,-1),co(this.layoutVertexArray,u,c,1,1),co(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Qn("CircleBucket",fo,{omit:["layers"]});var So=new Ui({"circle-sort-key":new Fi(It.layout_circle["circle-sort-key"])}),Eo={paint:new Ui({"circle-radius":new Fi(It.paint_circle["circle-radius"]),"circle-color":new Fi(It.paint_circle["circle-color"]),"circle-blur":new Fi(It.paint_circle["circle-blur"]),"circle-opacity":new Fi(It.paint_circle["circle-opacity"]),"circle-translate":new Ri(It.paint_circle["circle-translate"]),"circle-translate-anchor":new Ri(It.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Ri(It.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Ri(It.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Fi(It.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Fi(It.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Fi(It.paint_circle["circle-stroke-opacity"])}),layout:So},Lo="undefined"!=typeof Float32Array?Float32Array:Array;function Co(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function Po(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],u=e[6],c=e[7],f=e[8],h=e[9],p=e[10],d=e[11],v=e[12],g=e[13],y=e[14],m=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*v,t[1]=x*i+b*l+_*h+w*g,t[2]=x*a+b*u+_*p+w*y,t[3]=x*o+b*c+_*d+w*m,x=r[4],b=r[5],_=r[6],w=r[7],t[4]=x*n+b*s+_*f+w*v,t[5]=x*i+b*l+_*h+w*g,t[6]=x*a+b*u+_*p+w*y,t[7]=x*o+b*c+_*d+w*m,x=r[8],b=r[9],_=r[10],w=r[11],t[8]=x*n+b*s+_*f+w*v,t[9]=x*i+b*l+_*h+w*g,t[10]=x*a+b*u+_*p+w*y,t[11]=x*o+b*c+_*d+w*m,x=r[12],b=r[13],_=r[14],w=r[15],t[12]=x*n+b*s+_*f+w*v,t[13]=x*i+b*l+_*h+w*g,t[14]=x*a+b*u+_*p+w*y,t[15]=x*o+b*c+_*d+w*m,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var Oo=Po;var Io,Do=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t};function zo(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}Io=new Lo(3),Lo!=Float32Array&&(Io[0]=0,Io[1]=0,Io[2]=0),function(){var t=new Lo(4);Lo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var Ro=function(t){var e=t[0],r=t[1];return e*e+r*r},Fo=(function(){var t=new Lo(2);Lo!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,Eo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new fo(t)},e.prototype.queryRadius=function(t){var e=t;return ko("circle-radius",this,e)+ko("circle-stroke-width",this,e)+Ao(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=Mo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),c="map"===this.paint.get("circle-pitch-alignment"),f=c?l:function(t,e){return t.map((function(t){return Bo(t,e)}))}(l,s),h=c?u*o:u,p=0,d=n;pt.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=t.data,s=e.data,l=0;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);u=0!==(u=Math.max(a-n,o-i))?1/u:0}return rs(h,p,r,n,i,u),p}function ts(t,e,r,n,i){var a,o;if(i===ks(t,e,r,n)>0)for(a=e;a=e;a-=n)o=_s(a,t[a],t[a+1],o);return o&&vs(o,o.next)&&(ws(o),o=o.next),o}function es(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!vs(n,n.next)&&0!==ds(n.prev,n,n.next))n=n.next;else{if(ws(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function rs(t,e,r,n,i,a,o){if(t){!o&&a&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=cs(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,u=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,u*=2}while(o>1)}(i)}(t,n,i,a);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?is(t,n,i,a):ns(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),ws(t),t=l.next,u=l.next;else if((t=l)===u){o?1===o?rs(t=as(es(t),e,r),e,r,n,i,a,2):2===o&&os(t,e,r,n,i,a):rs(es(t),e,r,n,i,a,1);break}}}function ns(t){var e=t.prev,r=t,n=t.next;if(ds(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(hs(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&ds(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function is(t,e,r,n){var i=t.prev,a=t,o=t.next;if(ds(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,c=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=cs(s,l,e,r,n),h=cs(u,c,e,r,n),p=t.prevZ,d=t.nextZ;p&&p.z>=f&&d&&d.z<=h;){if(p!==t.prev&&p!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&ds(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ds(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&ds(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&hs(i.x,i.y,a.x,a.y,o.x,o.y,d.x,d.y)&&ds(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function as(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!vs(i,a)&&gs(i,n,n.next,a)&&xs(i,a)&&xs(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),ws(n),ws(n.next),n=t=a),n=n.next}while(n!==t);return es(n)}function os(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&ps(o,s)){var l=bs(o,s);return o=es(o,o.next),l=es(l,l.next),rs(o,e,r,n,i,a),void rs(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function ss(t,e){return t.x-e.x}function ls(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=c&&i!==n.x&&hs(ar.x||n.x===r.x&&us(r,n)))&&(r=n,h=l)),n=n.next}while(n!==u);return r}(t,e)){var r=bs(e,t);es(e,e.next),es(r,r.next)}}function us(t,e){return ds(t.prev,t,e.prev)<0&&ds(e.next,t,t.next)<0}function cs(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function fs(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function ps(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&gs(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(xs(t,e)&&xs(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.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!==t);return n}(t,e)&&(ds(t.prev,t,e.prev)||ds(t,e.prev,e))||vs(t,e)&&ds(t.prev,t,t.next)>0&&ds(e.prev,e,e.next)>0)}function ds(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function vs(t,e){return t.x===e.x&&t.y===e.y}function gs(t,e,r,n){var i=ms(ds(t,e,r)),a=ms(ds(t,e,n)),o=ms(ds(r,n,t)),s=ms(ds(r,n,e));return i!==a&&o!==s||!(0!==i||!ys(t,r,e))||!(0!==a||!ys(t,n,e))||!(0!==o||!ys(r,t,n))||!(0!==s||!ys(r,e,n))}function ys(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function ms(t){return t>0?1:t<0?-1:0}function xs(t,e){return ds(t.prev,t,t.next)<0?ds(t,e,t.next)>=0&&ds(t,t.prev,e)>=0:ds(t,e,t.prev)<0||ds(t,t.next,e)<0}function bs(t,e){var r=new Ts(t.i,t.x,t.y),n=new Ts(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function _s(t,e,r,n){var i=new Ts(t,e,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 ws(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Ts(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ks(t,e,r,n){for(var i=0,a=e,o=r-n;ar;){if(n-r>600){var a=n-r+1,o=e-r+1,s=Math.log(a),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(a-l)/a)*(o-a/2<0?-1:1);Ms(t,e,Math.max(r,Math.floor(e-o*l/a+u)),Math.min(n,Math.floor(e+(a-o)*l/a+u)),i)}var c=t[e],f=r,h=n;for(Ss(t,r,e),i(t[n],c)>0&&Ss(t,r,n);f0;)h--}0===i(t[r],c)?Ss(t,r,h):Ss(t,++h,n),h<=e&&(r=h+1),e<=h&&(n=h-1)}}function Ss(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Es(t,e){return te?1:0}function Ls(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&(n+=t[i-1].length,r.holes.push(n))}return r},Ko.default=$o;var Is=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Xi,this.indexArray=new sa,this.indexArray2=new pa,this.programConfigurations=new no(Jo,t.layers,t.zoom),this.segments=new Ea,this.segments2=new Ea,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};Is.prototype.populate=function(t,e,r){this.hasPattern=Ps("fill",this.layers,e);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=t;a>3}if(i--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new a(o,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},Ns.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,u=-1/0;t.pos>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())u&&(u=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,u]},Ns.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=Ns.types[this.type];function c(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function Gs(t,e,r){if(3===t){var n=new Vs(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}Hs.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Bs(this._pbf,e,this.extent,this._keys,this._values)};var Zs={VectorTile:function(t,e){this.layers=t.readFields(Gs,{},e)},VectorTileFeature:Bs,VectorTileLayer:Vs},Ys=Zs.VectorTileFeature.types,Ws=Math.pow(2,13);function Xs(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*Ws)+o,i*Ws*2,a*Ws*2,Math.round(s))}var Js=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ki,this.indexArray=new sa,this.programConfigurations=new no(Fs,t.layers,t.zoom),this.segments=new Ea,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Ks(t,e){return t.x===e.x&&(t.x<0||t.x>oo)||t.y===e.y&&(t.y<0||t.y>oo)}Js.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=Ps("fill-extrusion",this.layers,e);for(var n=0,i=t;noo}))||O.every((function(t){return t.y<0}))||O.every((function(t){return t.y>oo}))))for(var v=0,g=0;g=1){var m=d[g-1];if(!Ks(y,m)){f.vertexLength+4>Ea.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=y.sub(m)._perp()._unit(),b=m.dist(y);v+b>32768&&(v=0),Xs(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,v),Xs(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,v),v+=b,Xs(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,0,v),Xs(this.layoutVertexArray,m.x,m.y,x.x,x.y,0,1,v);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>Ea.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===Ys[t.type]){for(var w=[],T=[],k=f.vertexLength,A=0,M=s;A=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u0;if(T&&y>u){var A=c.dist(p);if(A>2*f){var M=c.sub(c.sub(p)._mult(f/A)._round());this.updateDistance(p,M),this.addCurrentVertex(M,v,0,0,h),p=M}}var S=p&&d,E=S?r:s?"butt":n;if(S&&"round"===E&&(_i&&(E="bevel"),"bevel"===E&&(_>2&&(E="flipbevel"),_100)m=g.mult(-1);else{var L=_*v.add(g).mag()/v.sub(g).mag();m._perp()._mult(L*(k?-1:1))}this.addCurrentVertex(c,m,0,0,h),this.addCurrentVertex(c,m.mult(-1),0,0,h)}else if("bevel"===E||"fakeround"===E){var C=-Math.sqrt(_*_-1),P=k?C:0,O=k?0:C;if(p&&this.addCurrentVertex(c,v,P,O,h),"fakeround"===E)for(var I=Math.round(180*w/Math.PI/20),D=1;D2*f){var j=c.add(d.sub(c)._mult(f/N)._round());this.updateDistance(c,j),this.addCurrentVertex(j,g,0,0,h),c=j}}}}},ol.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.x+e.y*r,s=e.y-e.x*r,l=-e.x+e.y*n,u=-e.y-e.x*n;this.addHalfVertex(t,o,s,a,!1,r,i),this.addHalfVertex(t,l,u,a,!0,-n,i),this.distance>al/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},ol.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=t.x,l=t.y,u=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((s<<1)+(n?1:0),(l<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&u)<<2,u>>6);var c=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),o.primitiveLength++),i?this.e2=c:this.e1=c},ol.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(al-1):this.distance},ol.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Qn("LineBucket",ol,{omit:["layers","patternFeatures"]});var sl=new Ui({"line-cap":new Ri(It.layout_line["line-cap"]),"line-join":new Fi(It.layout_line["line-join"]),"line-miter-limit":new Ri(It.layout_line["line-miter-limit"]),"line-round-limit":new Ri(It.layout_line["line-round-limit"]),"line-sort-key":new Fi(It.layout_line["line-sort-key"])}),ll={paint:new Ui({"line-opacity":new Fi(It.paint_line["line-opacity"]),"line-color":new Fi(It.paint_line["line-color"]),"line-translate":new Ri(It.paint_line["line-translate"]),"line-translate-anchor":new Ri(It.paint_line["line-translate-anchor"]),"line-width":new Fi(It.paint_line["line-width"]),"line-gap-width":new Fi(It.paint_line["line-gap-width"]),"line-offset":new Fi(It.paint_line["line-offset"]),"line-blur":new Fi(It.paint_line["line-blur"]),"line-dasharray":new Ni(It.paint_line["line-dasharray"]),"line-pattern":new Bi(It.paint_line["line-pattern"]),"line-gradient":new ji(It.paint_line["line-gradient"])}),layout:sl},ul=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Si(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=f({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(Fi),cl=new ul(ll.paint.properties["line-width"].specification);cl.useIntegerZoom=!0;var fl=function(t){function e(e){t.call(this,e,ll)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Zo(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=cl.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new ol(t)},e.prototype.queryRadius=function(t){var e=t,r=hl(ko("line-width",this,e),ko("line-gap-width",this,e)),n=ko("line-offset",this,e);return r/2+Math.abs(n)+Ao(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,o,s){var l=Mo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),u=s/2*hl(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),c=this.paint.get("line-offset").evaluate(e,r);return c&&(n=function(t,e){for(var r=[],n=new a(0,0),i=0;i=3)for(var a=0;a0?e+2*t:t}var pl=Yi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dl=Yi([{name:"a_projected_pos",components:3,type:"Float32"}],4),vl=(Yi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Yi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),gl=(Yi([{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"}]),Yi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),yl=Yi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function ml(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),Mi.applyArabicShaping&&(t=Mi.applyArabicShaping(t)),t}(t.text,e,r)})),t}Yi([{name:"triangle",components:3,type:"Uint16"}]),Yi([{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"}]),Yi([{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",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Yi([{type:"Float32",name:"offsetX"}]),Yi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var xl={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var bl=24,_l=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,c=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=u}return(p?-1:1)*o*Math.pow(2,a-n)},wl=function(t,e,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,v=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,u-=8);t[r+p-d]|=128*v},Tl=kl;function kl(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}kl.Varint=0,kl.Fixed64=1,kl.Bytes=2,kl.Fixed32=5;var Al=4294967296,Ml=1/Al,Sl="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function El(t){return t.type===kl.Bytes?t.readVarint()+t.pos:t.pos+1}function Ll(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Cl(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Pl(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function Vl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}kl.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=jl(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Vl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=jl(this.buf,this.pos)+jl(this.buf,this.pos+4)*Al;return this.pos+=8,t},readSFixed64:function(){var t=jl(this.buf,this.pos)+Vl(this.buf,this.pos+4)*Al;return this.pos+=8,t},readFloat:function(){var t=_l(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=_l(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return Ll(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return Ll(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return Ll(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return Ll(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return Ll(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return Ll(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Sl?function(t,e,r){return Sl.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n="",i=e;i239?4:l>223?3:l>191?2:1;if(i+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(a=t[i+1]))&&(u=(31&l)<<6|63&a)<=127&&(u=null):3===c?(a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&((u=(15&l)<<12|(63&a)<<6|63&o)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&((u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,n+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),n+=String.fromCharCode(u),i+=c}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==kl.Bytes)return t.push(this.readVarint(e));var r=El(this);for(t=t||[];this.pos127;);else if(e===kl.Bytes)this.pos=this.readVarint()+this.pos;else if(e===kl.Fixed32)this.pos+=4;else{if(e!==kl.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Cl(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),wl(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),wl(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&Cl(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,kl.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Pl,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ol,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,zl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Il,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,Dl,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,Rl,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,Fl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,Bl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,Nl,e)},writeBytesField:function(t,e){this.writeTag(t,kl.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,kl.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,kl.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,kl.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,kl.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,kl.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,kl.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,kl.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,kl.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,kl.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};function Hl(t,e,r){1===t&&r.readMessage(ql,e)}function ql(t,e,r){if(3===t){var n=r.readMessage(Gl,{}),i=n.id,a=n.bitmap,o=n.width,s=n.height,l=n.left,u=n.top,c=n.advance;e.push({id:i,bitmap:new Ho({width:o+6,height:s+6},a),metrics:{width:o,height:s,left:l,top:u,advance:c}})}}function Gl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function Zl(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h0&&B>A&&(A=B)}else{var N=r[S.fontStack],j=N&&N[L];if(j&&j.rect)O=j.rect,P=j.metrics;else{var U=e[S.fontStack],V=U&&U[L];if(!V)continue;P=V.metrics}C=(_-S.scale)*bl}z?(t.verticalizable=!0,k.push({glyph:L,imageName:I,x:h,y:p+C,vertical:z,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:O}),h+=D*S.scale+u):(k.push({glyph:L,imageName:I,x:h,y:p+C,vertical:z,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:P,rect:O}),h+=P.advance*S.scale+u)}if(0!==k.length){var H=h-u;d=Math.max(H,d),cu(k,0,k.length-1,g,A)}h=0;var q=a*_+A;T.lineOffset=Math.max(A,w),p+=q,v=Math.max(q,v),++y}else p+=a,++y}var G=p-Kl,Z=uu(o),Y=Z.horizontalAlign,W=Z.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var u=(e-r)*i,c=0;c=a!==o?-s*n-Kl:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&eu[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Ql.prototype.substring=function(t,e){var r=new Ql;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Ql.prototype.toString=function(){return this.text},Ql.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},Ql.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push($l.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var eu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ru={};function nu(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*bl/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function iu(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,c=0,f=0;f-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],u=0;sn;)u-=l.shift().angleDelta;if(u>i)return!1;o++,s+=f.dist(h)}return!0}function xu(t){for(var e=0,r=0;ru){var d=(u-l)/p,v=Ke(f.x,h.x,d),g=Ke(f.y,h.y,d),y=new hu(v,g,h.angleTo(f),c);return y._round(),!o||mu(t,y,s,o,e)?y:void 0}l+=p}}function Tu(t,e,r,n,i,a,o,s,l){var u=bu(n,a,o),c=_u(n,i),f=c*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&b=0&&_=0&&h+u<=c){var w=new hu(b,_,m,d);w._round(),n&&!mu(t,w,a,n,i)||p.push(w)}}f+=y}return s||p.length||o||(p=ku(t,f/2,r,n,i,a,o,!0,l)),p}function Au(t,e,r,n,i){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new a(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round():h.x>=n&&(h=new a(n,f.y+(h.y-f.y)*((n-f.x)/(h.x-f.x)))._round()),f.y>=i&&h.y>=i||(f.y>=i?f=new a(f.x+(h.x-f.x)*((i-f.y)/(h.y-f.y)),i)._round():h.y>=i&&(h=new a(f.x+(h.x-f.x)*((i-f.y)/(h.y-f.y)),i)._round()),u&&f.equals(u[u.length-1])||(u=[f],o.push(u)),u.push(h)))))}return o}function Mu(t,e,r,n){var i=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,u=o.paddedRect.h-2,c=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},v=h.reduce(d,0),g=p.reduce(d,0),y=l-v,m=u-g,x=0,b=v,_=0,w=g,T=0,k=y,A=0,M=m;if(o.content&&n){var S=o.content;x=Su(h,0,S[0]),_=Su(p,0,S[1]),b=Su(h,S[0],S[2]),w=Su(p,S[1],S[3]),T=S[0]-x,A=S[1]-_,k=S[2]-S[0]-b,M=S[3]-S[1]-w}var E=function(n,i,l,u){var h=Lu(n.stretch-x,b,c,t.left),p=Cu(n.fixed-T,k,n.stretch,v),d=Lu(i.stretch-_,w,f,t.top),y=Cu(i.fixed-A,M,i.stretch,g),m=Lu(l.stretch-x,b,c,t.left),S=Cu(l.fixed-T,k,l.stretch,v),E=Lu(u.stretch-_,w,f,t.top),L=Cu(u.fixed-A,M,u.stretch,g),C=new a(h,d),P=new a(m,d),O=new a(m,E),I=new a(h,E),D=new a(p/s,y/s),z=new a(S/s,L/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];C._matMult(N),P._matMult(N),I._matMult(N),O._matMult(N)}var j=n.stretch+n.fixed,U=l.stretch+l.fixed,V=i.stretch+i.fixed,H=u.stretch+u.fixed;return{tl:C,tr:P,bl:I,br:O,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+V,w:U-j,h:H-V},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:D,pixelOffsetBR:z,minFontScaleX:k/s/c,minFontScaleY:M/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var L=Eu(h,y,v),C=Eu(p,m,g),P=0;P0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var v=o.top*s-l,g=o.bottom*s+l,y=o.left*s-l,m=o.right*s+l,x=o.collisionPadding;if(x&&(y-=x[0]*s,v-=x[1]*s,m+=x[2]*s,g+=x[3]*s),c){var b=new a(y,v),_=new a(m,v),w=new a(y,g),T=new a(m,g),k=c*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),y=Math.min(b.x,_.x,w.x,T.x),m=Math.max(b.x,_.x,w.x,T.x),v=Math.min(b.y,_.y,w.y,T.y),g=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,y,v,m,g,r,n,i)}this.boxEndIndex=t.length},Ou=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Iu),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Iu(t,e){return te?1:0}function Du(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,i=1/0,o=-1/0,s=-1/0,l=t[0],u=0;uo)&&(o=c.x),(!u||c.y>s)&&(s=c.y)}var f=o-n,h=s-i,p=Math.min(f,h),d=p/2,v=new Ou([],zu);if(0===p)return new a(n,i);for(var g=n;gm.d||!m.d)&&(m=b,r&&console.log("found best %d after %d probes",Math.round(1e4*b.d)/1e4,x)),b.max-m.d<=e||(d=b.h/2,v.push(new Ru(b.p.x-d,b.p.y-d,d,t)),v.push(new Ru(b.p.x+d,b.p.y-d,d,t)),v.push(new Ru(b.p.x-d,b.p.y+d,d,t)),v.push(new Ru(b.p.x+d,b.p.y+d,d,t)),x+=4)}return r&&(console.log("num probes: "+x),console.log("best distance: "+m.d)),m.p}function zu(t,e){return e.max-t.max}function Ru(t,e,r,n){this.p=new a(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(r=!r),n=Math.min(n,bo(t,u,c))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}Ou.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Ou.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Ou.prototype.peek=function(){return this.data[0]},Ou.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,a=e[i];if(r(n,a)>=0)break;e[t]=a,t=i}e[t]=n},Ou.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var Fu=Number.POSITIVE_INFINITY;function Bu(t,e){return e[1]!==Fu?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(t){case"top-right":case"bottom-right":case"right":n=-e;break;case"top-left":case"bottom-left":case"left":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-e;break;case"top":n=e-7}switch(t){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=e;break;case"right":r=-e}return[r,n]}(t,e[0])}function Nu(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var ju=32640;function Uu(t,e,r,n,i,o,s,l,u,c,f,h,p,d,v){var g=function(t,e,r,n,i,o,s,l){for(var u=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,c=[],f=0,h=e.positionedLines;fju&&w(t.layerIds[0]+': Value for "text-size" is >= '+'255. Reduce your "text-size".'):"composite"===y.kind&&((m=[pu*d.compositeTextSizes[0].evaluate(s,{},v),pu*d.compositeTextSizes[1].evaluate(s,{},v)])[0]>ju||m[1]>ju)&&w(t.layerIds[0]+': Value for "text-size" is >= '+'255. Reduce your "text-size".'),t.addSymbols(t.text,g,m,l,o,s,c,e,u.lineStartIndex,u.lineLength,p,v);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&("constant"!==a.value.kind||a.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=i.get("symbol-sort-key");if(this.features=[],l||u){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new Si(this.zoom),v=0,g=t;v=0;for(var I=0,D=k.sections;I=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l0},Ku.prototype.hasIconData=function(){return this.icon.segments.get().length>0},Ku.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},Ku.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},Ku.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},Ku.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),a.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,a.verticalPlacedTextSymbolIndex),a.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.placedIconSymbolIndex),a.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,a.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Qn("SymbolBucket",Ku,{omit:["layers","collisionBoxArray","features","compareText"]}),Ku.MAX_GLYPHS=65535,Ku.addDynamicAttributes=Yu;var $u=new Ui({"symbol-placement":new Ri(It.layout_symbol["symbol-placement"]),"symbol-spacing":new Ri(It.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Ri(It.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Fi(It.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Ri(It.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Ri(It.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Ri(It.layout_symbol["icon-ignore-placement"]),"icon-optional":new Ri(It.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Ri(It.layout_symbol["icon-rotation-alignment"]),"icon-size":new Fi(It.layout_symbol["icon-size"]),"icon-text-fit":new Ri(It.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Ri(It.layout_symbol["icon-text-fit-padding"]),"icon-image":new Fi(It.layout_symbol["icon-image"]),"icon-rotate":new Fi(It.layout_symbol["icon-rotate"]),"icon-padding":new Ri(It.layout_symbol["icon-padding"]),"icon-keep-upright":new Ri(It.layout_symbol["icon-keep-upright"]),"icon-offset":new Fi(It.layout_symbol["icon-offset"]),"icon-anchor":new Fi(It.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Ri(It.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Ri(It.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Ri(It.layout_symbol["text-rotation-alignment"]),"text-field":new Fi(It.layout_symbol["text-field"]),"text-font":new Fi(It.layout_symbol["text-font"]),"text-size":new Fi(It.layout_symbol["text-size"]),"text-max-width":new Fi(It.layout_symbol["text-max-width"]),"text-line-height":new Ri(It.layout_symbol["text-line-height"]),"text-letter-spacing":new Fi(It.layout_symbol["text-letter-spacing"]),"text-justify":new Fi(It.layout_symbol["text-justify"]),"text-radial-offset":new Fi(It.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Ri(It.layout_symbol["text-variable-anchor"]),"text-anchor":new Fi(It.layout_symbol["text-anchor"]),"text-max-angle":new Ri(It.layout_symbol["text-max-angle"]),"text-writing-mode":new Ri(It.layout_symbol["text-writing-mode"]),"text-rotate":new Fi(It.layout_symbol["text-rotate"]),"text-padding":new Ri(It.layout_symbol["text-padding"]),"text-keep-upright":new Ri(It.layout_symbol["text-keep-upright"]),"text-transform":new Fi(It.layout_symbol["text-transform"]),"text-offset":new Fi(It.layout_symbol["text-offset"]),"text-allow-overlap":new Ri(It.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Ri(It.layout_symbol["text-ignore-placement"]),"text-optional":new Ri(It.layout_symbol["text-optional"])}),Qu={paint:new Ui({"icon-opacity":new Fi(It.paint_symbol["icon-opacity"]),"icon-color":new Fi(It.paint_symbol["icon-color"]),"icon-halo-color":new Fi(It.paint_symbol["icon-halo-color"]),"icon-halo-width":new Fi(It.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Fi(It.paint_symbol["icon-halo-blur"]),"icon-translate":new Ri(It.paint_symbol["icon-translate"]),"icon-translate-anchor":new Ri(It.paint_symbol["icon-translate-anchor"]),"text-opacity":new Fi(It.paint_symbol["text-opacity"]),"text-color":new Fi(It.paint_symbol["text-color"],{runtimeType:Gt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new Fi(It.paint_symbol["text-halo-color"]),"text-halo-width":new Fi(It.paint_symbol["text-halo-width"]),"text-halo-blur":new Fi(It.paint_symbol["text-halo-blur"]),"text-translate":new Ri(It.paint_symbol["text-translate"]),"text-translate-anchor":new Ri(It.paint_symbol["text-translate-anchor"])}),layout:$u},tc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ut,this.defaultValue=t};tc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},tc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},tc.prototype.outputDefined=function(){return!1},tc.prototype.serialize=function(){return null},Qn("FormatSectionOverride",tc,{omit:["defaultValue"]});var ec=function(t){function e(e){t.call(this,e,Qu)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a",targetMapId:n,sourceMapId:a.mapId})}}},vc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else A()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},vc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},vc.prototype.processTask=function(t,e){var r=this;if(""===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(ii(e.error)):n(null,ii(e.data)))}else{var i=!1,a=E(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"",sourceMapId:r.mapId,error:e?ni(e):null,data:ni(n,a)},a)}:function(t){i=!0},s=null,l=ii(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,o)}else o(new Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},vc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var yc=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};yc.prototype.setNorthEast=function(t){return this._ne=t instanceof xc?new xc(t.lng,t.lat):xc.convert(t),this},yc.prototype.setSouthWest=function(t){return this._sw=t instanceof xc?new xc(t.lng,t.lat):xc.convert(t),this},yc.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof xc)e=t,r=t;else{if(!(t instanceof yc)){if(Array.isArray(t)){if(4===t.length||t.every(Array.isArray)){var a=t;return this.extend(yc.convert(a))}var o=t;return this.extend(xc.convert(o))}return this}if(e=t._sw,r=t._ne,!e||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new xc(e.lng,e.lat),this._ne=new xc(r.lng,r.lat)),this},yc.prototype.getCenter=function(){return new xc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},yc.prototype.getSouthWest=function(){return this._sw},yc.prototype.getNorthEast=function(){return this._ne},yc.prototype.getNorthWest=function(){return new xc(this.getWest(),this.getNorth())},yc.prototype.getSouthEast=function(){return new xc(this.getEast(),this.getSouth())},yc.prototype.getWest=function(){return this._sw.lng},yc.prototype.getSouth=function(){return this._sw.lat},yc.prototype.getEast=function(){return this._ne.lng},yc.prototype.getNorth=function(){return this._ne.lat},yc.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},yc.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},yc.prototype.isEmpty=function(){return!(this._sw&&this._ne)},yc.prototype.contains=function(t){var e=xc.convert(t),r=e.lng,n=e.lat,i=this._sw.lat<=n&&n<=this._ne.lat,a=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(a=this._sw.lng>=r&&r>=this._ne.lng),i&&a},yc.convert=function(t){return!t||t instanceof yc?t:new yc(t)};var mc=6371008.8,xc=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};xc.prototype.wrap=function(){return new xc(c(this.lng,-180,180),this.lat)},xc.prototype.toArray=function(){return[this.lng,this.lat]},xc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},xc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return mc*Math.acos(Math.min(i,1))},xc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new yc(new xc(this.lng-r,this.lat-e),new xc(this.lng+r,this.lat+e))},xc.convert=function(t){if(t instanceof xc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new xc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new xc(Number("lng"in t?t.lng:t.lon),Number(t.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 bc=2*Math.PI*mc;function _c(t){return bc*Math.cos(t*Math.PI/180)}function wc(t){return(180+t)/360}function Tc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function kc(t,e){return t/_c(e)}function Ac(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}var Mc=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Mc.fromLngLat=function(t,e){void 0===e&&(e=0);var r=xc.convert(t);return new Mc(wc(r.lng),Tc(r.lat),kc(e,r.lat))},Mc.prototype.toLngLat=function(){return new xc(360*this.x-180,Ac(this.y))},Mc.prototype.toAltitude=function(){return t=this.z,e=this.y,t*_c(Ac(e));var t,e},Mc.prototype.meterInMercatorCoordinateUnits=function(){return 1/bc*(t=Ac(this.y),1/Math.cos(t*Math.PI/180));var t};var Sc=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=Cc(0,t,t,e,r)};Sc.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Sc.prototype.url=function(t,e){var r,n,i,a,o,s=(r=this.x,n=this.y,i=this.z,a=gc(256*r,256*(n=Math.pow(2,i)-n-1),i),o=gc(256*(r+1),256*(n+1),i),a[0]+","+a[1]+","+o[0]+","+o[1]),l=function(t,e,r){for(var n,i="",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new Lc(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Lc(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Lc.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?Cc(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):Cc(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},Lc.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},Lc.prototype.children=function(t){if(this.overscaledZ>=t)return[new Lc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Lc(e,this.wrap,e,r,n),new Lc(e,this.wrap,e,r+1,n),new Lc(e,this.wrap,e,r,n+1),new Lc(e,this.wrap,e,r+1,n+1)]},Lc.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},Pc.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Pc.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Pc.prototype.getPixels=function(){return new qo({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Pc.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,u=a;u=0&&c[3]>=0&&s.insert(o,c[0],c[1],c[2],c[3])}},Rc.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Zs.VectorTile(new Tl(this.rawTileData)).layers,this.sourceLayerCoder=new Oc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Rc.prototype.query=function(t,e,r,n){var i=this;this.loadVTLayers();for(var o=t.params||{},s=oo/t.tileSize/t.scale,l=xn(o.filter),u=t.queryGeometry,c=t.queryPadding*s,f=Bc(u),h=this.grid.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c),p=Bc(t.cameraQueryGeometry),d=0,v=this.grid3D.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c,(function(e,r,n,i){return function(t,e,r,n,i){for(var o=0,s=t;o=l.x&&i>=l.y)return!0}var u=[new a(e,r),new a(e,i),new a(n,i),new a(n,r)];if(t.length>2)for(var c=0,f=u;c=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new Si(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),v=0;vn)i=!1;else if(e)if(this.expirationTimect&&(t.getActor().send("enforceCacheSizeLimit",ut),gt=0)},t.clamp=u,t.clearTileCache=function(t){var e=self.caches.delete(lt);t&&e.catch(t).then((function(){return t()}))},t.clipLine=Au,t.clone=function(t){var e=new Lo(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=b,t.clone$2=function(t){var e=new Lo(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=yl,t.config=B,t.create=function(){var t=new Lo(16);return Lo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new Lo(9);return Lo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new Lo(4);return Lo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=an,t.createLayout=Yi,t.createStyleLayer=function(t){return"custom"===t.type?new oc(t):new sc[t.type](t)},t.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=Ke,t.offscreenCanvasSupported=yt,t.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),u=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new Tl(t).readFields(Hl,[])},t.pbf=Tl,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays();var s=512*t.overscaling;t.tilePixelRatio=oo/s,t.compareText={},t.iconsNeedLinear=!1;var l=t.layers[0].layout,u=t.layers[0]._unevaluatedLayout._values,c={};if("composite"===t.textSizeData.kind){var f=t.textSizeData,h=f.minZoom,p=f.maxZoom;c.compositeTextSizes=[u["text-size"].possiblyEvaluate(new Si(h),o),u["text-size"].possiblyEvaluate(new Si(p),o)]}if("composite"===t.iconSizeData.kind){var d=t.iconSizeData,v=d.minZoom,g=d.maxZoom;c.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new Si(v),o),u["icon-size"].possiblyEvaluate(new Si(g),o)]}c.layoutTextSize=u["text-size"].possiblyEvaluate(new Si(t.zoom+1),o),c.layoutIconSize=u["icon-size"].possiblyEvaluate(new Si(t.zoom+1),o),c.textMaxSize=u["text-size"].possiblyEvaluate(new Si(18));for(var y=l.get("text-line-height")*bl,m="map"===l.get("text-rotation-alignment")&&"point"!==l.get("symbol-placement"),x=l.get("text-keep-upright"),b=l.get("text-size"),_=function(){var a=k[T],s=l.get("text-font").evaluate(a,{},o).join(","),u=b.evaluate(a,{},o),f=c.layoutTextSize.evaluate(a,{},o),h=c.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},d=a.text,v=[0,0];if(d){var g=d.toString(),_=l.get("text-letter-spacing").evaluate(a,{},o)*bl,A=function(t){for(var e=0,r=t;e=oo||f.y<0||f.y>=oo||function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v,g,y,m,x,b,_,T,k,A){var M,S,E,L,C,P=t.addToLineVertexArray(e,r),O=0,I=0,D=0,z=0,R=-1,F=-1,B={},N=Ia(""),j=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(j=(M=s.layout.get("text-offset").evaluate(b,{},k).map((function(t){return t*bl})))[0],U=M[1]):(j=s.layout.get("text-radial-offset").evaluate(b,{},k)*bl,U=Fu),t.allowVerticalPlacement&&n.vertical){var V=s.layout.get("text-rotate").evaluate(b,{},k)+90,H=n.vertical;L=new Pu(l,e,u,c,f,H,h,p,d,V),o&&(C=new Pu(l,e,u,c,f,o,g,y,d,V))}if(i){var q=s.layout.get("icon-rotate").evaluate(b,{}),G="none"!==s.layout.get("icon-text-fit"),Z=Mu(i,q,T,G),Y=o?Mu(o,q,T,G):void 0;E=new Pu(l,e,u,c,f,i,g,y,!1,q),O=4*Z.length;var W=t.iconSizeData,X=null;"source"===W.kind?(X=[pu*s.layout.get("icon-size").evaluate(b,{})])[0]>ju&&w(t.layerIds[0]+': Value for "icon-size" is >= '+'255. Reduce your "icon-size".'):"composite"===W.kind&&((X=[pu*_.compositeIconSizes[0].evaluate(b,{},k),pu*_.compositeIconSizes[1].evaluate(b,{},k)])[0]>ju||X[1]>ju)&&w(t.layerIds[0]+': Value for "icon-size" is >= '+'255. Reduce your "icon-size".'),t.addSymbols(t.icon,Z,X,x,m,b,!1,e,P.lineStartIndex,P.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,Y&&(I=4*Y.length,t.addSymbols(t.icon,Y,X,x,m,b,Jl.vertical,e,P.lineStartIndex,P.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var J in n.horizontal){var K=n.horizontal[J];if(!S){N=Ia(K.text);var $=s.layout.get("text-rotate").evaluate(b,{},k);S=new Pu(l,e,u,c,f,K,h,p,d,$)}var Q=1===K.positionedLines.length;if(D+=Uu(t,e,K,a,s,d,b,v,P,n.vertical?Jl.horizontal:Jl.horizontalOnly,Q?Object.keys(n.horizontal):[J],B,R,_,k),Q)break}n.vertical&&(z+=Uu(t,e,n.vertical,a,s,d,b,v,P,Jl.vertical,["vertical"],B,F,_,k));var tt=S?S.boxStartIndex:t.collisionBoxArray.length,et=S?S.boxEndIndex:t.collisionBoxArray.length,rt=L?L.boxStartIndex:t.collisionBoxArray.length,nt=L?L.boxEndIndex:t.collisionBoxArray.length,it=E?E.boxStartIndex:t.collisionBoxArray.length,at=E?E.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,st=C?C.boxEndIndex:t.collisionBoxArray.length,lt=-1,ut=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};lt=ut(S,lt),lt=ut(L,lt),lt=ut(E,lt);var ct=(lt=ut(C,lt))>-1?1:0;ct&&(lt*=A/bl),t.glyphOffsetArray.length>=Ku.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,tt,et,rt,nt,it,at,ot,st,u,D,z,O,I,ct,0,h,j,U,lt)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,m,T,M,l,b,k,S,d,e,a,u,c,o)};if("line"===E)for(var O=0,I=Au(e.geometry,0,0,oo,oo);O1){var U=wu(j,A,r.vertical||v,n,g,x);U&&P(j,U)}}else if("Polygon"===e.type)for(var V=0,H=Ls(e.geometry,0);V=E.maxzoom||"none"!==E.visibility&&(o(S,this.zoom,n),(v[E.id]=E.createBucket({index:c.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,g,this.tileID.canonical),c.bucketLayerIDs.push(S.map((function(t){return t.id}))))}}}var L=t.mapObject(g.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(L).length?a.send("getGlyphs",{uid:this.uid,stacks:L},(function(t,e){f||(f=t,h=e,O.call(l))})):h={};var C=Object.keys(g.iconDependencies);C.length?a.send("getImages",{icons:C,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){f||(f=t,p=e,O.call(l))})):p={};var P=Object.keys(g.patternDependencies);function O(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in v){var l=v[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(g,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:t.values(v).filter((function(t){return!t.isEmpty()})),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}P.length?a.send("getImages",{icons:P,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){f||(f=t,d=e,O.call(l))})):d={},O.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status="done",n.loaded[i]=s,r(e);var l=a.rawData,u={};a.expires&&(u.expires=a.expires),a.cacheControl&&(u.cacheControl=a.cacheControl);var c={};if(o){var f=o.finish();f&&(c.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,u,c))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};c.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=u&&a instanceof u?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},c.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=function t(e,r){var n,i=e&&e.type;if("FeatureCollection"===i)for(n=0;n=0!=!!e&&t.reverse()}var d=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,v=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};v.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function P(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;D(t,e,o,n,i,a%2),I(t,e,r,n,o-1,a+1),I(t,e,r,o+1,i,a+1)}}function D(t,e,r,n,i,a){for(;i>n;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(o-u)/o)*(s-o/2<0?-1:1);D(t,e,r,Math.max(n,Math.floor(r-s*u/o+c)),Math.min(i,Math.floor(r+(o-s)*u/o+c)),a)}var f=e[2*r+a],h=n,p=i;for(z(t,e,n,r),e[2*i+a]>f&&z(t,e,n,i);hf;)p--}e[2*n+a]===f?z(t,e,n,p):z(t,e,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}function z(t,e,r,n){R(t,r,n),R(e,2*r,2*n),R(e,2*r+1,2*n+1)}function R(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function F(t,e,r,n){var i=t-r,a=e-n;return i*i+a*a}_.fromVectorTileJs=w,_.fromGeojsonVt=T,_.GeoJSONWrapper=k;var B=function(t){return t[0]},N=function(t){return t[1]},j=function(t,e,r,n,i){void 0===e&&(e=B),void 0===r&&(r=N),void 0===n&&(n=64),void 0===i&&(i=Float64Array),this.nodeSize=n,this.points=t;for(var a=t.length<65536?Uint16Array:Uint32Array,o=this.ids=new a(t.length),s=this.coords=new i(2*t.length),l=0;l=r&&s<=i&&l>=n&&l<=a&&c.push(t[d]);else{var v=Math.floor((p+h)/2);s=e[2*v],l=e[2*v+1],s>=r&&s<=i&&l>=n&&l<=a&&c.push(t[v]);var g=(f+1)%2;(0===f?r<=s:n<=l)&&(u.push(p),u.push(v-1),u.push(g)),(0===f?i>=s:a>=l)&&(u.push(v+1),u.push(h),u.push(g))}}return c}(this.ids,this.coords,t,e,r,n,this.nodeSize)},j.prototype.within=function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var u=o.pop(),c=o.pop(),f=o.pop();if(c-f<=a)for(var h=f;h<=c;h++)F(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var p=Math.floor((f+c)/2),d=e[2*p],v=e[2*p+1];F(d,v,r,n)<=l&&s.push(t[p]);var g=(u+1)%2;(0===u?r-i<=d:n-i<=v)&&(o.push(f),o.push(p-1),o.push(g)),(0===u?r+i>=d:n+i>=v)&&(o.push(p+1),o.push(c),o.push(g))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var U={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},V=function(t){this.options=X(Object.create(U),t),this.trees=new Array(this.options.maxZoom+1)};function H(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function q(t,e){var r=t.geometry.coordinates,n=r[0],i=r[1];return{x:Y(n),y:W(i),zoom:1/0,index:e,parentId:-1}}function G(t){return{type:"Feature",id:t.id,properties:Z(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function Z(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return X(X({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function W(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function X(t,e){for(var r in e)t[r]=e[r];return t}function J(t){return t.x}function K(t){return t.y}function $(t,e,r,n){for(var i,a=n,o=r-e>>1,s=r-e,l=t[e],u=t[e+1],c=t[r],f=t[r+1],h=e+3;ha)i=h,a=p;else if(p===a){var d=Math.abs(h-o);dn&&(i-e>3&&$(t,e,i,n),t[i+2]=a,r-i>3&&$(t,i,r,n))}function Q(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function tt(t,e,r,n){var i={id:void 0===t?null:t,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)et(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(i*u-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(u-a,2))),i=l,a=u}var c=e.length-3;e[2]=1,$(e,0,c,r),e[c+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function at(t,e,r,n){for(var i=0;i1?1:r}function lt(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],u=0;u=r&&d=n)){var v=[];if("Point"===h||"MultiPoint"===h)ut(f,v,r,n,i);else if("LineString"===h)ct(f,v,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===h)ht(f,v,r,n,i,!1);else if("Polygon"===h)ht(f,v,r,n,i,!0);else if("MultiPolygon"===h)for(var g=0;g=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function ct(t,e,r,n,i,a,o){for(var s,l,u=ft(t),c=0===i?dt:vt,f=t.start,h=0;hr&&(l=c(u,p,d,g,y,r),o&&(u.start=f+s*l)):m>n?x=r&&(l=c(u,p,d,g,y,r),b=!0),x>n&&m<=n&&(l=c(u,p,d,g,y,n),b=!0),!a&&b&&(o&&(u.end=f+s*l),e.push(u),u=ft(t)),o&&(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],v=t[_+2],(m=0===i?p:d)>=r&&m<=n&&pt(u,p,d,v),_=u.length-3,a&&_>=3&&(u[_]!==u[0]||u[_+1]!==u[1])&&pt(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ft(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function ht(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=c),f>o.maxY&&(o.maxY=f)}return o}function _t(t,e,r,n){var i=e.geometry,a=e.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n0===e)for(n=0,i=t.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n=n;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new j(s,J,K,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return r&&console.timeEnd("total time"),this},V.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,f=l.range(Y(r),W(a),Y(i),W(n));c1?this._map(u,!0):null,g=(l<<5)+(e+1)+this.points.length,y=0,m=f;y>5},V.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},V.prototype._map=function(t,e){if(t.numPoints)return e?X({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?X({},n):n},Tt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Tt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,u=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<1&&console.time("creation"),h=this.tiles[f]=bt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var v,g,y,m,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;v=g=y=m=null,x=lt(t,c,r-_,r+T,0,h.minX,h.maxX,l),b=lt(t,c,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(v=lt(x,c,n-_,n+T,1,h.minY,h.maxY,l),g=lt(x,c,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(y=lt(b,c,n-_,n+T,1,h.minY,h.maxY,l),m=lt(b,c,n+w,n+k,1,h.minY,h.maxY,l),b=null),u>1&&console.timeEnd("clipping"),s.push(v||[],e+1,2*r,2*n),s.push(g||[],e+1,2*r,2*n+1),s.push(y||[],e+1,2*r+1,2*n),s.push(m||[],e+1,2*r+1,2*n+1)}}},Tt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t<0||t>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,u=t,c=e,f=r;!l&&u>0;)u--,c=Math.floor(c/2),f=Math.floor(f/2),l=this.tiles[kt(u,c,f)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",u,c,f),a>1&&console.time("drilling down"),this.splitTile(l.source,u,c,f,t,e,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?mt(this.tiles[s],i):null):null};var Mt=function(e){function r(t,r,n,i){e.call(this,t,r,n,At),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));f(o,!0);try{e._geoJSONIndex=n.cluster?new V(function(e){var r=e.superclusterOptions,n=e.clusterProperties;if(!n||!r)return r;for(var i={},a={},o={accumulated:null,zoom:0},s={properties:null},l=Object.keys(n),u=0,c=l;u=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e=0?1.2:1))}function y(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(l=t[++s]);var c=Math.abs(u-l.left),f=Math.abs(u-l.right),h=Math.min(c,f),p=void 0,d=i/r*(n+1);if(l.isDash){var v=n-Math.abs(d);p=Math.sqrt(h*h+v*v)}else p=n-Math.sqrt(h*h+d*d);this.data[o+u]=Math.max(0,Math.min(255,p+128))}},k.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],u=0;u1&&(l=t[++s]);var c=Math.abs(u-l.left),f=Math.abs(u-l.right),h=Math.min(c,f),p=l.isDash?h:-h;this.data[o+u]=Math.max(0,Math.min(255,p+128))}},k.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o=n&&e.x=i&&e.y0&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",n))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?"reloadTile":"loadTile";e.actor=this.actor;var a={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.request=this.actor.send(i,a,(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),O=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),I=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var n=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,O.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(I),z=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,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 t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(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())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,O.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},j.prototype.has=function(t){return t.wrapped().key in this.data},j.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},j.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},j.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},j.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},j.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},j.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},j.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var n={};for(var i in this._tiles){var a=this._tiles[i];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+r),n[a.tileID.key]=a}for(var o in this._tiles=n,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var s in this._tiles){var l=this._tiles[s];this._setTileReloadTimer(s,l)}}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(t){return n._source.hasTile(t)})))):i=[];var a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(Dt(this._source.type)){for(var u={},c={},f=0,h=Object.keys(l);fthis._source.maxzoom){var g=d.children(this._source.maxzoom)[0],y=this.getTile(g);if(y&&y.hasData()){n[g.key]=g;continue}}else{var m=d.children(this._source.maxzoom);if(n[m[0].key]&&n[m[1].key]&&n[m[2].key]&&n[m[3].key])continue}for(var x=v.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(v=this.getTile(_))&&x&&(v=this._addTile(_)),v&&(n[_.key]=_,x=v.wasRequested(),v.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),u=s.map((function(t){return o.pointCoordinate(t)})),c=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,v=0,g=u;v=0&&y[1].y+g>=0){var m=l.map((function(t){return s.getTilePoint(t)})),x=u.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:m,cameraQueryGeometry:x,scale:v})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function It(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function Dt(t){return"raster"===t||"image"===t||"video"===t}function zt(){return new t.window.Worker(ta.workerUrl)}Ot.maxOverzooming=10,Ot.maxUnderzooming=3;var Rt="mapboxgl_preloaded_worker_pool",Ft=function(){this.active={}};Ft.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Qt=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function ae(e,r,n,i,a,o,s,l){var u=i?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,n.transform.zoom),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,v=n.transform.width/n.transform.height,g=!1,y=0;yMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function le(e,r,n,i,a,o,s,l,u,c,f,h,p,d){var v,g=r/24,y=e.lineOffsetX*g,m=e.lineOffsetY*g;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=oe(g,l,y,m,n,f,h,e,u,o,p);if(!w)return{notEnoughRoom:!0};var T=re(w.first.point,s).point,k=re(w.last.point,s).point;if(i&&!n){var A=se(e.writingMode,T,k,d);if(A)return A}v=[w.first];for(var M=e.glyphStartIndex+1;M0?C.point:ue(h,L,S,1,a),O=se(e.writingMode,S,P,d);if(O)return O}var I=ce(g*l.getoffsetX(e.glyphStartIndex),y,m,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,o,p);if(!I)return{notEnoughRoom:!0};v=[I]}for(var D=0,z=v;D0?1:-1,v=0;i&&(d*=-1,v=Math.PI),d<0&&(v+=Math.PI);for(var g=d>0?l+s:l+s+1,y=a,m=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((g+=d)=u)return null;if(m=y,w.push(y),void 0===(y=h[g])){var T=new t.Point(c.getx(g),c.gety(g)),k=re(T,f);if(k.signedDistanceFromCamera>0)y=h[g]=k.point;else{var A=g-d;y=ue(0===x?o:new t.Point(c.getx(A),c.gety(A)),T,m,_-x+1,f)}}x+=b,b=m.dist(y)}var M=(_-x)/b,S=y.sub(m),E=S.mult(M)._add(m);E._add(S._unit()._perp()._mult(n*d));var L=v+Math.atan2(y.y-m.y,y.x-m.x);return w.push(E),{point:E,angle:L,path:w}}Qt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Qt.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Qt.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},Qt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Qt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Qt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Qt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var u=[],c={hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(a,s,o,l,this._queryCellCircle,u,c,i),n?u.length>0:u},Qt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Qt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Qt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Qt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,u=this.boxCells[i];if(null!==u)for(var c=this.bboxes,f=0,h=u;f=c[d+0]&&n>=c[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var v=this.circleCells[i];if(null!==v)for(var g=this.circles,y=0,m=v;yo*o+s*s},Qt.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var u=(o-i)/2,c=Math.abs(e-(i+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var f=l-s,h=c-u;return f*f+h*h<=r*r};var fe=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function he(t,e){for(var r=0;r=1;P--)C.push(E.path[P]);for(var O=1;O0){for(var R=C[0].clone(),F=C[0].clone(),B=1;B=A.x&&F.x<=M.x&&R.y>=A.y&&F.y<=M.y?[C]:F.xM.x||F.yM.y?[]:t.clipLine([C],A.x,A.y,M.x,M.y)}for(var N=0,j=z;N=this.screenRightBoundary||nthis.screenBottomBoundary},ve.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0?(this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(v=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:g,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:v},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:y,placedGlyphBoxes:m}):void 0},Ae.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,u=a.textLabelPlaneMatrix,c=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,v=a.collisionGroup,g=s.get("text-optional"),y=s.get("icon-optional"),m=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),_="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),T="viewport-y"===s.get("symbol-z-order"),k=m&&(x||!o.hasIconData()||y),A=x&&(m||!o.hasTextData()||g);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var M=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new xe(!1,!1,!1);else{var p,T=!1,M=!1,S=!0,E=null,L={box:null,offscreen:null},C={box:null,offscreen:null},P=null,O=null,I=0,D=0,z=0;a.textFeatureIndex?I=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(I=e.featureIndex),a.verticalTextFeatureIndex&&(D=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,n=a,i.markUsedOrientation(o,n,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!x?r:null,h={box:[],offscreen:!1},p=m?2*N.length:N.length,d=0;d=N.length,k=i.attemptAnchorPlacement(g,t,a,s,u,b,_,f,l,v,y,e,o,n,c);if(k&&(h=k.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=k.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox,n=L&&L.box&&L.box.length;return o.allowVerticalPlacement&&!n&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),L&&(T=L.box,S=L.offscreen);var V=F(L&&L.box);if(!T&&i.prevPlacement){var H=i.prevPlacement.variableOffsets[e.crossTileID];H&&(i.variableOffsets[e.crossTileID]=H,i.markUsedJustification(o,H.anchor,e,V))}}else{var q=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,m,f,l,v.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return q(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?q(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(L&&L.box&&L.box.length)}}if(T=(p=L)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Z=t.evaluateSizeForFeature(o.textSizeData,d,G),Y=s.get("text-padding"),W=e.collisionCircleDiameter;P=i.collisionIndex.placeCollisionCircles(m,G,o.lineVertexArray,o.glyphOffsetArray,Z,l,u,c,n,_,v.predicate,W,Y),T=m||P.circles.length>0&&!P.collisionDetected,S=S&&P.offscreen}if(a.iconFeatureIndex&&(z=a.iconFeatureIndex),a.iconBox){var X=function(t){var e=w&&E?ke(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,v.predicate)};M=C&&C.box&&C.box.length&&a.verticalIconBox?(O=X(a.verticalIconBox)).box.length>0:(O=X(a.iconBox)).box.length>0,S=S&&O.offscreen}var J=g||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,K=y||0===e.numIconVertices;if(J||K?K?J||(M=M&&T):T=M&&T:M=T=M&&T,T&&p&&p.box&&(C&&C.box&&D?i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,D,v.ID):i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,I,v.ID)),M&&O&&i.collisionIndex.insertCollisionBox(O.box,s.get("icon-ignore-placement"),o.bucketInstanceId,z,v.ID),P&&(T&&i.collisionIndex.insertCollisionCircles(P.circles,s.get("text-ignore-placement"),o.bucketInstanceId,I,v.ID),n)){var $=o.bucketInstanceId,Q=i.collisionCircleArrays[$];void 0===Q&&(Q=i.collisionCircleArrays[$]=new be);for(var tt=0;tt=0;--E){var L=S[E];M(o.symbolInstances.get(L),o.collisionArrays[L])}else for(var C=e.symbolInstanceStart;C=0&&(e.text.placedSymbolArray.get(u).crossTileID=a>=0&&u!==a?0:n.crossTileID)}},Ae.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0||l>0,x=a.numIconVertices>0,b=i.placedOrientations[a.crossTileID],_=b===t.WritingMode.vertical,w=b===t.WritingMode.horizontal||b===t.WritingMode.horizontalOnly;if(m){var T=De(y.text),k=_?ze:T;d(e.text,s,k);var A=w?ze:T;d(e.text,l,A);var M=y.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=M||_?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=M||w?1:0);var S=i.variableOffsets[a.crossTileID];S&&i.markUsedJustification(e,S.anchor,a,b);var E=i.placedOrientations[a.crossTileID];E&&(i.markUsedJustification(e,"left",a,E),i.markUsedOrientation(e,E,a))}if(x){var L=De(y.icon),C=!(h&&a.verticalPlacedIconSymbolIndex&&_);if(a.placedIconSymbolIndex>=0){var P=C?L:ze;d(e.icon,a.numIconVertices,P),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=y.icon.isHidden()}if(a.verticalPlacedIconSymbolIndex>=0){var O=C?ze:L;d(e.icon,a.numVerticalIconVertices,O),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden()}}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var I=e.collisionArrays[n];if(I){var D=new t.Point(0,0);if(I.textBox||I.verticalTextBox){var z=!0;if(u){var R=i.variableOffsets[v];R?(D=Te(R.anchor,R.width,R.height,R.textOffset,R.textBoxScale),c&&D._rotate(f?i.transform.angle:-i.transform.angle)):z=!1}I.textBox&&Me(e.textCollisionBox.collisionVertexArray,y.text.placed,!z||_,D.x,D.y),I.verticalTextBox&&Me(e.textCollisionBox.collisionVertexArray,y.text.placed,!z||w,D.x,D.y)}var F=Boolean(!w&&I.verticalIconBox);I.iconBox&&Me(e.iconCollisionBox.collisionVertexArray,y.icon.placed,F,h?D.x:0,h?D.y:0),I.verticalIconBox&&Me(e.iconCollisionBox.collisionVertexArray,y.icon.placed,!F,h?D.x:0,h?D.y:0)}}},g=0;gt},Ae.prototype.setStale=function(){this.stale=!0};var Se=Math.pow(2,25),Ee=Math.pow(2,24),Le=Math.pow(2,17),Ce=Math.pow(2,16),Pe=Math.pow(2,9),Oe=Math.pow(2,8),Ie=Math.pow(2,1);function De(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Se+e*Ee+r*Le+e*Ce+r*Pe+e*Oe+r*Ie+e}var ze=0,Re=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Re.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Re(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Fe.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Be=512/t.EXTENT/2,Ne=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var u=o[t.scaledTo(Number(a)).key];u&&u.findMatches(e.symbolInstances,t,i)}}for(var c=0;c1?"@2x":"",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,c())})),u=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){u=null,o||(o=t,a=e,c())}));function c(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],u=l.width,c=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,v=l.stretchX,g=l.stretchY,y=l.content,m=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,m,{x:f,y:h},{x:0,y:0},{width:u,height:c}),r[s]={data:m,pixelRatio:d,sdf:p,stretchX:v,stretchY:g,content:y}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new t.Event("data",{dataType:"style"}))}))},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,n=t;r0)throw new Error("Unimplemented: "+i.map((function(t){return t.command})).join(", ")+".");return n.forEach((function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Ot(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===e.type){if(He(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.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:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;d--){var v=this._order[d];if(r(v))for(var g=i.length-1;g>=0;g--){var y=i[g].feature;if(n[y.layer.id] 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_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),nr=_r("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);}"),ir=_r("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,0,1);}"),ar=_r("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),or=_r("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),sr=_r("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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;}"),lr=_r("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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);}"),ur=_r("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);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;}"),cr=_r("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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 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\n? a_pos\n: 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;}"),fr=_r("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;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 exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),hr=_r("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;\n#define PI 3.141592653589793\nvoid 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),pr=_r("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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);}"),dr=_r("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 float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat 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,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute 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_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat 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_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;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);}"),vr=_r("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;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat 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;}"),gr=_r("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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute 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;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat 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);}"),yr=_r("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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;}"),mr=_r("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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));}"),xr=_r("#define SDF_PX 8.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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);}"),br=_r("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform 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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat 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;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}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);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","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;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 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 ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_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);}");function _r(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nvarying "+r+" "+i+" "+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o="float"===i?"vec2":"vec4",s=a.match(/color/)?"color":o;return n[a]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+r+" "+o+" a_"+a+";\nvarying "+r+" "+i+" "+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = a_"+a+";\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+r+" "+o+" a_"+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = a_"+a+";\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n"}))}}var wr=Object.freeze({__proto__:null,prelude:Xe,background:Je,backgroundPattern:Ke,circle:$e,clippingMask:Qe,heatmap:tr,heatmapTexture:er,collisionBox:rr,collisionCircle:nr,debug:ir,fill:ar,fillOutline:or,fillOutlinePattern:sr,fillPattern:lr,fillExtrusion:ur,fillExtrusionPattern:cr,hillshadePrepare:fr,hillshade:hr,line:pr,lineGradient:dr,linePattern:vr,lineSDF:gr,raster:yr,symbolIcon:mr,symbolSDF:xr,symbolTextAndIcon:br}),Tr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Tr.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,u=0;!l&&u>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}kr.prototype.draw=function(t,e,r,n,i,a,o,s,l,u,c,f,h,p,d,v){var g,y=t.gl;if(!this.failedToCreate){for(var m in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[m].set(o[m]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(g={},g[y.LINES]=2,g[y.TRIANGLES]=3,g[y.LINE_STRIP]=1,g)[e],b=0,_=c.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new Tr)).bind(t,this,l,p?p.getPaintVertexBuffers():[],u,w.vertexOffset,d,v),y.drawElements(e,w.primitiveLength*x,y.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var Mr=function(e,r,n,i){var a=r.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=t.create$1();"viewport"===a.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var u=a.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+n,u_opacity:i}},Sr=function(e,r,n,i,a,o,s){return t.extend(Mr(e,r,n,i),Ar(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},Er=function(t){return{u_matrix:t}},Lr=function(e,r,n,i){return t.extend(Er(e),Ar(n,r,i))},Cr=function(t,e){return{u_matrix:t,u_world:e}},Pr=function(e,r,n,i,a){return t.extend(Lr(e,r,n,i),{u_world:a})},Or=function(e,r,n,i){var a,o,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=ge(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Ir=function(t,e,r){var n=ge(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Dr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},zr=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Rr=function(t){return{u_matrix:t}},Fr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:ge(e,1,r),u_intensity:n}};var Br=function(e,r,n){var i=e.transform;return{u_matrix:Hr(e,r,n),u_ratio:1/ge(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Nr=function(e,r,n){return t.extend(Br(e,r,n),{u_image:0})},jr=function(e,r,n,i){var a=e.transform,o=Vr(r,a);return{u_matrix:Hr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ge(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Ur=function(e,r,n,i,a){var o=e.transform,s=e.lineAtlas,l=Vr(r,o),u="round"===n.layout.get("line-cap"),c=s.getDash(i.from,u),f=s.getDash(i.to,u),h=c.width*a.fromScale,p=f.width*a.toScale;return t.extend(Br(e,r,n),{u_patternscale_a:[l/h,-c.height/2],u_patternscale_b:[l/p,-f.height/2],u_sdfgamma:s.width/(256*Math.min(h,p)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:f.y,u_mix:a.t})};function Vr(t,e){return 1/ge(t,1,e.tileZoom)}function Hr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var qr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(o=i.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:Gr(i.paint.get("raster-hue-rotate"))};var a,o};function Gr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var Zr,Yr=function(t,e,r,n,i,a,o,s,l,u){var c=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:u,u_texture:0}},Wr=function(e,r,n,i,a,o,s,l,u,c,f){var h=a.transform;return t.extend(Yr(e,r,n,i,a,o,s,l,u,c),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Xr=function(e,r,n,i,a,o,s,l,u,c){return t.extend(Wr(e,r,n,i,a,o,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Jr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Kr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,u=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/u,f=c*(n.tileID.canonical.x+n.tileID.wrap*u),h=c*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/ge(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},$r={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Qr(e,r,n,i,a,o,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=m;t.mul(_,y.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,y.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&c.draw(l,u.LINES,Mt.disabled,Et.disabled,e.colorModeForRenderPass(),Ct.disabled,Ir(m,e.transform,g),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram("collisionCircle"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var A=0,M=0,S=f;M=0&&(v[y.associatedIconIndex]={shiftedAnchor:S,angle:E})}else he(y.numGlyphs,p)}if(f){d.clear();for(var C=e.icon.placedSymbolArray,P=0;P0){var s=t.browser.now(),l=(s-e.timeAdded)/o,u=r?(s-r.timeAdded)/o:-1,c=n.getSource(),f=a.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var hn=new t.Color(1,0,0,1),pn=new t.Color(0,1,0,1),dn=new t.Color(0,0,1,1),vn=new t.Color(1,0,1,1),gn=new t.Color(0,1,1,1);function yn(t){var e=t.transform.padding;mn(t,t.transform.height-(e.top||0),3,hn),mn(t,e.bottom||0,3,pn),xn(t,e.left||0,3,dn),xn(t,t.transform.width-(e.right||0),3,vn);var r=t.transform.centerPoint;!function(t,e,r,n){var i=20,a=2;bn(t,e-a/2,r-i/2,a,i,n),bn(t,e-i/2,r-a/2,i,a,n)}(t,r.x,t.transform.height-r.y,gn)}function mn(t,e,r,n){bn(t,0,e+r/2,t.transform.width,r,n)}function xn(t,e,r,n){bn(t,e-r/2,0,r,t.transform.height,n)}function bn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function _n(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=Mt.disabled,u=Et.disabled,c=e.colorModeForRenderPass(),f="$debug";i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,u,c,Ct.disabled,zr(o,t.Color.red),f,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var h=r.getTileByID(n.key).latestRawTileData,p=h&&h.byteLength||0,d=Math.floor(p/1024),v=r.getTile(n).tileSize,g=512/Math.min(v,512)*(n.overscaledZ/e.transform.zoom)*.5,y=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(y+=" => "+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,y+" "+d+"kb"),s.draw(i,a.TRIANGLES,l,u,Lt.alphaBlended,Ct.disabled,zr(o,t.Color.transparent,g),f,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var wn={symbol:function(e,r,n,i,a){if("translucent"===e.renderPass){var o=Et.disabled,s=e.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(e,r,n,i,a,o,s){for(var l=r.transform,u="map"===a,c="map"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(Lt.disabled),r.setDepthMode(Mt.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Et({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},Tn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Et({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},Tn.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var w=this.style._layers[i[this.currentLayer]],T=a[w.source],k=c[w.source];this._renderTileClippingMasks(w,k),this.renderLayer(this,T,w,k)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},Tn.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},Tn.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new kr(this.context,wr[t],e,$r[t],this._showOverdrawInspector)),this.cache[r]},Tn.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()},Tn.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},Tn.prototype.initDebugOverlayCanvas=function(){if(null==this.debugOverlayCanvas){this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var e=this.context.gl;this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,e.RGBA)}},Tn.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var kn=function(t,e){this.points=t,this.planes=e};kn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-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((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new kn(a,o)};var An=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};An.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var Mn=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=r,this.right=n};Mn.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},Mn.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},Mn.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},Mn.prototype.clone=function(){return new Mn(this.top,this.bottom,this.left,this.right)},Mn.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Sn=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Mn,this._posMatrixCache={},this._alignedPosMatrixCache={}},En={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}};Sn.prototype.clone=function(){var t=new Sn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},En.minZoom.get=function(){return this._minZoom},En.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},En.maxZoom.get=function(){return this._maxZoom},En.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},En.minPitch.get=function(){return this._minPitch},En.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},En.maxPitch.get=function(){return this._maxPitch},En.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},En.renderWorldCopies.get=function(){return this._renderWorldCopies},En.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},En.worldSize.get=function(){return this.tileSize*this.scale},En.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},En.size.get=function(){return new t.Point(this.width,this.height)},En.bearing.get=function(){return-this.angle/Math.PI*180},En.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},En.pitch.get=function(){return this._pitch/Math.PI*180},En.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},En.fov.get=function(){return this._fov/Math.PI*180},En.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},En.zoom.get=function(){return this._zoom},En.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},En.center.get=function(){return this._center},En.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},En.padding.get=function(){return this._edgeInsets.toJSON()},En.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},En.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Sn.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},Sn.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},Sn.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},Sn.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new t.UnwrappedTileID(u,e));return r},Sn.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=kn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var u=function(t){return{aabb:new An([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var v=c.pop(),g=v.x,y=v.y,m=v.fullyVisible;if(!m){var x=v.aabb.intersects(s);if(0===x)continue;m=2===x}var b=v.aabb.distanceX(o),_=v.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_)),T=3+(1<T&&v.zoom>=l)f.push({tileID:new t.OverscaledTileID(v.zoom===h?p:v.zoom,v.wrap,v.zoom,g,y),distanceSq:t.sqrLen([o[0]-.5-g,o[1]-.5-y])});else for(var k=0;k<4;k++){var A=(g<<1)+k%2,M=(y<<1)+(k>>1);c.push({aabb:v.aabb.quadrant(k),zoom:v.zoom+1,x:A,y:M,wrap:v.wrap,fullyVisible:m})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},Sn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},En.unmodified.get=function(){return this._unmodified},Sn.prototype.zoomScale=function(t){return Math.pow(2,t)},Sn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},Sn.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},Sn.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},En.point.get=function(){return this.project(this.center)},Sn.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},Sn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},Sn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},Sn.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},Sn.prototype.coordinateLocation=function(t){return t.toLngLat()},Sn.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[0]/i,s=n[0]/a,l=r[1]/i,u=n[1]/a,c=r[2]/i,f=n[2]/a,h=c===f?0:(0-c)/(f-c);return new t.MercatorCoordinate(t.number(o,s,h)/this.worldSize,t.number(l,u,h)/this.worldSize)},Sn.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},Sn.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},Sn.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Sn.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Sn.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},Sn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Sn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var f=this.latRange;a=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-g)}if(this.lngRange){var y=p.x,m=u.x/2;y-ml&&(n=l-m)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=c,this._constraining=!1}},Sn.prototype._calcMatrices=function(){if(this.height){var e=this._fov/2,r=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(e)*this.height;var n=Math.PI/2+this._pitch,i=this._fov*(.5+r.y/this.height),a=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-n-i,.01,Math.PI-.01)),o=this.point,s=o.x,l=o.y,u=1.01*(Math.cos(Math.PI/2-this._pitch)*a+this.cameraToCenterDistance),c=this.height/50,f=new Float64Array(16);t.perspective(f,this._fov,this.width/this.height,c,u),f[8]=2*-r.x/this.width,f[9]=2*r.y/this.height,t.scale(f,f,[1,-1,1]),t.translate(f,f,[0,0,-this.cameraToCenterDistance]),t.rotateX(f,f,this._pitch),t.rotateZ(f,f,this.angle),t.translate(f,f,[-s,-l,0]),this.mercatorMatrix=t.scale([],f,[this.worldSize,this.worldSize,this.worldSize]),t.scale(f,f,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=f,this.invProjMatrix=t.invert([],this.projMatrix);var h=this.width%2/2,p=this.height%2/2,d=Math.cos(this.angle),v=Math.sin(this.angle),g=s-Math.round(s)+d*h+v*p,y=l-Math.round(l)+d*p+v*h,m=new Float64Array(f);if(t.translate(m,m,[g>.5?g-1:g,y>.5?y-1:y,0]),this.alignedProjMatrix=m,f=t.create(),t.scale(f,f,[this.width/2,-this.height/2,1]),t.translate(f,f,[1,-1,0]),this.labelPlaneMatrix=f,f=t.create(),t.scale(f,f,[1,-1,1]),t.translate(f,f,[-1,-1,0]),t.scale(f,f,[2/this.width,2/this.height,1]),this.glCoordMatrix=f,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(f=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=f,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Sn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},Sn.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},Sn.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Ln.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var Cn={linearity:.3,easing:t.bezier(0,0,.3,1)},Pn=t.extend({deceleration:2500,maxSpeed:1400},Cn),On=t.extend({deceleration:20,maxSpeed:1400},Cn),In=t.extend({deceleration:1e3,maxSpeed:360},Cn),Dn=t.extend({deceleration:1e3,maxSpeed:90},Cn),zn=function(t){this._map=t,this.clear()};function Rn(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},zn.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new Bn(t.type,this._map,t))},Un.prototype.dblclick=function(t){return this._firePreventable(new Bn(t.type,this._map,t))},Un.prototype.mouseover=function(t){this._map.fire(new Bn(t.type,this._map,t))},Un.prototype.mouseout=function(t){this._map.fire(new Bn(t.type,this._map,t))},Un.prototype.touchstart=function(t){return this._firePreventable(new Nn(t.type,this._map,t))},Un.prototype.touchmove=function(t){this._map.fire(new Nn(t.type,this._map,t))},Un.prototype.touchend=function(t){this._map.fire(new Nn(t.type,this._map,t))},Un.prototype.touchcancel=function(t){this._map.fire(new Nn(t.type,this._map,t))},Un.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Un.prototype.isEnabled=function(){return!0},Un.prototype.isActive=function(){return!1},Un.prototype.enable=function(){},Un.prototype.disable=function(){};var Vn=function(t){this._map=t};Vn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Vn.prototype.mousemove=function(t){this._map.fire(new Bn(t.type,this._map,t))},Vn.prototype.mousedown=function(){this._delayContextMenu=!0},Vn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Vn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Bn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Vn.prototype.isEnabled=function(){return!0},Vn.prototype.isActive=function(){return!1},Vn.prototype.enable=function(){},Vn.prototype.disable=function(){};var Hn=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function qn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},Gn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Zn=function(t){this.singleTap=new Gn(t),this.numTaps=t.numTaps,this.reset()};Zn.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Zn.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},Zn.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},Zn.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Yn=function(){this._zoomIn=new Zn({numTouches:1,numTaps:2}),this._zoomOut=new Zn({numTouches:2,numTaps:1}),this.reset()};Yn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Yn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Yn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Yn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Yn.prototype.touchcancel=function(){this.reset()},Yn.prototype.enable=function(){this._enabled=!0},Yn.prototype.disable=function(){this._enabled=!1,this.reset()},Yn.prototype.isEnabled=function(){return this._enabled},Yn.prototype.isActive=function(){return this._active};var Wn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};Wn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Wn.prototype._correctButton=function(t,e){return!1},Wn.prototype._move=function(t,e){return{}},Wn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},Wn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=qn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var u=i[l],c=this._touches[l];c&&(a._add(u),o._add(u.sub(c)),s++,i[l]=u)}if(this._touches=i,!(sMath.abs(t.x)}var oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ai(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ai(t)&&ai(e)&&a}},e}(Qn),si={panStep:100,bearingStep:15,pitchStep:10},li=function(){var t=si;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function ui(t){return t*(2-t)}li.prototype.reset=function(){this._active=!1},li.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ui,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},li.prototype.enable=function(){this._enabled=!0},li.prototype.disable=function(){this._enabled=!1,this.reset()},li.prototype.isEnabled=function(){return this._enabled},li.prototype.isActive=function(){return this._active};var ci=4.000244140625,fi=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};fi.prototype.setZoomRate=function(t){this._defaultZoomRate=t},fi.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},fi.prototype.isEnabled=function(){return!!this._enabled},fi.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},fi.prototype.isZooming=function(){return!!this._zooming},fi.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},fi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},fi.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%ci==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}},fi.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},fi.prototype._start=function(e){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 n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},fi.prototype.renderFrame=function(){return this._onScrollFrame()},fi.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>ci?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):c=!0}else o=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},fi.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},fi.prototype.reset=function(){this._active=!1};var hi=function(t,e){this._clickZoom=t,this._tapZoom=e};hi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},hi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},hi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},hi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var pi=function(){this.reset()};pi.prototype.reset=function(){this._active=!1},pi.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},pi.prototype.enable=function(){this._enabled=!0},pi.prototype.disable=function(){this._enabled=!1,this.reset()},pi.prototype.isEnabled=function(){return this._enabled},pi.prototype.isActive=function(){return this._active};var di=function(){this._tap=new Zn({numTouches:1,numTaps:1}),this.reset()};di.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},di.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},di.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},di.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},di.prototype.touchcancel=function(){this.reset()},di.prototype.enable=function(){this._enabled=!0},di.prototype.disable=function(){this._enabled=!1,this.reset()},di.prototype.isEnabled=function(){return this._enabled},di.prototype.isActive=function(){return this._active};var vi=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};vi.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},vi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},vi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},vi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var gi=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};gi.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},gi.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},gi.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},gi.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var yi=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};yi.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},yi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},yi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},yi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},yi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},yi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var mi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(t.Event);function bi(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var _i=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new zn(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!1}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[t.window,"blur",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(g,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(v));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),a&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,p="padding"in e?e.padding:a.padding,d=a.zoomScale(c-o),v=t.Point.convert(e.offset),g=a.centerPoint.add(v),y=a.pointLocation(g),m=t.LngLat.convert(e.center||y);this._normalizeCenter(m);var x=a.project(y),b=a.project(m).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if("minZoom"in e){var A=t.clamp(Math.min(e.minZoom,o,c),a.minZoom,a.maxZoom),M=w/a.zoomScale(A-o);_=Math.sqrt(M/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function L(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var P=E(0),O=function(t){return C(P)/C(P+_*t)},I=function(t){return w*((C(P)*(L(e=P+_*t)/C(e))-L(P))/S)/k;var e},D=(E(1)-P)/_;if(Math.abs(k)<1e-6||!isFinite(D)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var z=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*D,d=1/O(i);a.zoom=1===e?c:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(u,p,e),g=a.centerPoint.add(v));var y=1===e?m:a.unproject(x.add(b.mult(I(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?y.wrap():y,g),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)180?-360:r<-180?360:0}},r}(t.Evented),Ti=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Ti.prototype.getDefaultPosition=function(){return"bottom-right"},Ti.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&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),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ti.prototype.onRemove=function(){r.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},Ti.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+"="+e.value+(n=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Ti.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ki=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};ki.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ki.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ki.prototype.getDefaultPosition=function(){return"bottom-left"},ki.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},ki.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},ki.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var Ai=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ai.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Ai.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>Ci)throw new Error("maxPitch must be less than or equal to 60");var i=new Sn(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new Ai,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},Mi,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Ei))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new _i(this,e);var a="string"==typeof e.hash&&e.hash||void 0;this._hash=e.hash&&new Ln(a).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new Ti({customAttribution:e.customAttribution})),this.addControl(new ki,e.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){r.fire(new t.Event(e.dataType+"dataloading",e))}))}n&&(i.__proto__=n),i.prototype=Object.create(n&&n.prototype),i.prototype.constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),a&&this.fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()Ci)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if("mouseenter"===t||"mouseover"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new Bn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"===t||"mouseout"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new Bn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new Bn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;if(void 0===r)return n.prototype.off.call(this,t,e);return this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ri.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ri.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ri.prototype.off=function(){var t=this.element;r.removeEventListener(t,"mousedown",this.mousedown),r.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(t,"touchmove",this.touchmove),r.removeEventListener(t,"touchend",this.touchend),r.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Ri.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,"mousemove",this.mousemove),r.removeEventListener(t.window,"mouseup",this.mouseup)},Ri.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,"mousemove",this.mousemove),r.addEventListener(t.window,"mouseup",this.mouseup)},Ri.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ri.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ri.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ri.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ri.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.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")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,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")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){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 r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&qi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ui(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ui({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(e){var r=e.originalEvent&&"resize"===e.originalEvent.type;e.geolocateSource||"ACTIVE_LOCK"!==n._watchState||r||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new t.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return t.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 t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Hi--,qi=!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 t.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 t.Event("trackuserlocationstart"))}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")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Hi>1?(e={maximumAge:6e5,timeout:0},qi=!0):(e=this.options.positionOptions,qi=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.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)},n}(t.Evented),Zi={maxWidth:100,unit:"metric"},Yi=function(e){this.options=t.extend({},Zi,e),t.bindAll(["_onMove","setUnit"],this)};function Wi(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?Xi(e,n,l/5280,t._getUIString("ScaleControl.Miles")):Xi(e,n,l,t._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?Xi(e,n,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Xi(e,n,s/1e3,t._getUIString("ScaleControl.Kilometers")):Xi(e,n,s,t._getUIString("ScaleControl.Meters"))}function Xi(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(""+Math.floor(i)).length-1))*((o=i/a)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o))),l=s/r;t.style.width=e*l+"px",t.innerHTML=s+" "+n}Yi.prototype.getDefaultPosition=function(){return"bottom-left"},Yi.prototype._onMove=function(){Wi(this._map,this._container,this.options)},Yi.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Yi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Yi.prototype.setUnit=function(t){this.options.unit=t,Wi(this._map,this._container,this.options)};var Ji=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};Ji.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Ji.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ji.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Ji.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ji.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Ji.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Ji.prototype._isFullscreen=function(){return this._fullscreen},Ji.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Ji.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.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 Ki={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},$i=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Ki),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(n.__proto__=e),n.prototype=Object.create(e&&e.prototype),n.prototype.constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,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._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 t.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.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 t.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),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},n.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},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.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))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(t){var e=this,n=this._lngLat||this._trackPointer;if(this._map&&n&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return e._container.classList.add(t)})),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=Fi(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||t)){var i=this._pos=this._trackPointer&&t?t:this._map.project(this._lngLat),a=this.options.anchor,o=Qi(this.options.offset);if(!a){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=i.y+o.bottom.ythis._map.transform.height-u?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),a=0===s.length?"bottom":s.join("-")}var c=i.add(o[a]).round();r.setTransform(this._container,Bi[a]+" translate("+c.x+"px,"+c.y+"px)"),Ni(this._container,a,"popup")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented);function Qi(e){if(e){if("number"==typeof e){var r=Math.round(Math.sqrt(.5*Math.pow(e,2)));return{center:new t.Point(0,0),top:new t.Point(0,e),"top-left":new t.Point(r,r),"top-right":new t.Point(-r,r),bottom:new t.Point(0,-e),"bottom-left":new t.Point(r,-r),"bottom-right":new t.Point(-r,-r),left:new t.Point(e,0),right:new t.Point(-e,0)}}if(e instanceof t.Point||Array.isArray(e)){var n=t.Point.convert(e);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(e.center||[0,0]),top:t.Point.convert(e.top||[0,0]),"top-left":t.Point.convert(e["top-left"]||[0,0]),"top-right":t.Point.convert(e["top-right"]||[0,0]),bottom:t.Point.convert(e.bottom||[0,0]),"bottom-left":t.Point.convert(e["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(e["bottom-right"]||[0,0]),left:t.Point.convert(e.left||[0,0]),right:t.Point.convert(e.right||[0,0])}}return Qi(new t.Point(0,0))}var ta={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Oi,NavigationControl:zi,GeolocateControl:Gi,AttributionControl:Ti,ScaleControl:Yi,FullscreenControl:Ji,Popup:$i,Marker:Ui,Style:Ye,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){jt().acquire(Rt)},clearPrewarmedResources:function(){var t=Bt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Rt),Bt=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()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Ft.workerCount},set workerCount(t){Ft.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return ta})),r}()},27084:function(t){"use strict";t.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},16825:function(t,e,r){"use strict";t.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function u(t,s){var u=n.x(s),c=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||u!==i||c!==a||l(s))&&(r=0|t,i=u||0,a=c||0,e&&e(r,i,a,o))}function c(t){u(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?u(0,t):u(r,t)}function d(t){u(r|n.buttons(t),t)}function v(t){u(r&~n.buttons(t),t)}function g(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",v),t.addEventListener("mouseleave",c),t.addEventListener("mouseenter",c),t.addEventListener("mouseout",c),t.addEventListener("mouseover",c),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}g();var y={element:t};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(e){e?g():s&&(s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",v),t.removeEventListener("mouseleave",c),t.removeEventListener("mouseenter",c),t.removeEventListener("mouseout",c),t.removeEventListener("mouseover",c),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var n=r(74311)},48956:function(t){var e={left:0,top:0};t.exports=function(t,r,n){r=r||t.currentTarget||t.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=t.clientX||0,o=t.clientY||0,s=(i=r)===window||i===document||i===document.body?e:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},74311:function(t,e){"use strict";function r(t){return t.target||t.srcElement||window}e.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1<0&&a(s,r))}catch(t){c.call(new h(r),t)}}}function c(t){var e=this;e.triggered||(e.triggered=!0,e.def&&(e=e.def),e.msg=t,e.state=2,e.chain.length>0&&a(s,e))}function f(t,e,r,n){for(var i=0;i1&&(i*=y=Math.sqrt(y),s*=y);var m=i*i,x=s*s,b=(u==c?-1:1)*Math.sqrt(Math.abs((m*x-m*g*g-x*v*v)/(m*g*g+x*v*v)));b==1/0&&(b=1);var _=b*i*g/s+(t+f)/2,w=b*-s*v/i+(n+h)/2,T=Math.asin(((n-w)/s).toFixed(9)),k=Math.asin(((h-w)/s).toFixed(9));(T=t<_?e-T:T)<0&&(T=2*e+T),(k=f<_?e-k:k)<0&&(k=2*e+k),c&&T>k&&(T-=2*e),!c&&k>T&&(k-=2*e)}if(Math.abs(k-T)>r){var A=k,M=f,S=h;k=T+r*(c&&k>T?1:-1);var E=a(f=_+i*Math.cos(k),h=w+s*Math.sin(k),i,s,l,0,c,M,S,[k,A,_,w])}var L=Math.tan((k-T)/4),C=4/3*i*L,P=4/3*s*L,O=[2*t-(t+C*Math.sin(T)),2*n-(n-P*Math.cos(T)),f+C*Math.sin(k),h-P*Math.cos(k),f,h];if(p)return O;E&&(O=O.concat(E));for(var I=0;I7&&(r.push(y.splice(0,7)),y.unshift("C"));break;case"S":var x=p,b=d;"C"!=e&&"S"!=e||(x+=x-o,b+=b-l),y=["C",x,b,y[1],y[2],y[3],y[4]];break;case"T":"Q"==e||"T"==e?(f=2*p-f,h=2*d-h):(f=p,h=d),y=i(p,d,f,h,y[1],y[2]);break;case"Q":f=y[1],h=y[2],y=i(p,d,y[1],y[2],y[3],y[4]);break;case"L":y=n(p,d,y[1],y[2]);break;case"H":y=n(p,d,y[1],d);break;case"V":y=n(p,d,p,y[1]);break;case"Z":y=n(p,d,u,c)}e=m,p=y[y.length-2],d=y[y.length-1],y.length>4?(o=y[y.length-4],l=y[y.length-3]):(o=p,l=d),r.push(y)}return r}},56131:function(t){"use strict";var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function i(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,a){for(var o,s,l=i(t),u=1;u0&&!i.call(t,0))for(var v=0;v0)for(var g=0;g=0&&"[object Function]"===e.call(t.callee)),n}},88641:function(t){"use strict";function e(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",a=!!e.flat;n.forEach((function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function r(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(a,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function n(t,n){return Array.isArray(t)?r(t,n):e(t,n)}n.parse=e,n.stringify=r,t.exports=n},18863:function(t,e,r){"use strict";var n=r(71299);t.exports=function(t){var e;return arguments.length>1&&(t=arguments),"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]),t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(e={x:(t=n(t,{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"})).left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height),e}},95616:function(t){t.exports=function(t){var i=[];return t.replace(r,(function(t,r,a){var o=r.toLowerCase();for(a=function(t){var e=t.match(n);return e?e.map(Number):[]}(a),"m"==o&&a.length>2&&(i.push([r].concat(a.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(a.length==e[o])return a.unshift(r),i.push(a);if(a.lengtha!=p>a&&i<(h-c)*(a-f)/(p-f)+c&&(o=!o)}return o}},52142:function(t,e,r){var n,i=r(69444),a=r(29023),o=r(87263),s=r(11328),l=r(55968),u=r(10670),c=!1,f=a();function h(t,e,r){var i=n.segments(t),a=n.segments(e),o=r(n.combine(i,a));return n.polygon(o)}n={buildLog:function(t){return!0===t?c=i():!1===t&&(c=!1),!1!==c&&c.list},epsilon:function(t){return f.epsilon(t)},segments:function(t){var e=o(!0,f,c);return t.regions.forEach(e.addRegion),{segments:e.calculate(t.inverted),inverted:t.inverted}},combine:function(t,e){return{combined:o(!1,f,c).calculate(t.segments,t.inverted,e.segments,e.inverted),inverted1:t.inverted,inverted2:e.inverted}},selectUnion:function(t){return{segments:l.union(t.combined,c),inverted:t.inverted1||t.inverted2}},selectIntersect:function(t){return{segments:l.intersect(t.combined,c),inverted:t.inverted1&&t.inverted2}},selectDifference:function(t){return{segments:l.difference(t.combined,c),inverted:t.inverted1&&!t.inverted2}},selectDifferenceRev:function(t){return{segments:l.differenceRev(t.combined,c),inverted:!t.inverted1&&t.inverted2}},selectXor:function(t){return{segments:l.xor(t.combined,c),inverted:t.inverted1!==t.inverted2}},polygon:function(t){return{regions:s(t.segments,f,c),inverted:t.inverted}},polygonFromGeoJSON:function(t){return u.toPolygon(n,t)},polygonToGeoJSON:function(t){return u.fromPolygon(n,f,t)},union:function(t,e){return h(t,e,n.selectUnion)},intersect:function(t,e){return h(t,e,n.selectIntersect)},difference:function(t,e){return h(t,e,n.selectDifference)},differenceRev:function(t,e){return h(t,e,n.selectDifferenceRev)},xor:function(t,e){return h(t,e,n.selectXor)}},"object"==typeof window&&(window.PolyBool=n),t.exports=n},69444:function(t){t.exports=function(){var t,e=0,r=!1;function n(e,r){return t.list.push({type:e,data:r?JSON.parse(JSON.stringify(r)):void 0}),t}return t={list:[],segmentId:function(){return e++},checkIntersection:function(t,e){return n("check",{seg1:t,seg2:e})},segmentChop:function(t,e){return n("div_seg",{seg:t,pt:e}),n("chop",{seg:t,pt:e})},statusRemove:function(t){return n("pop_seg",{seg:t})},segmentUpdate:function(t){return n("seg_update",{seg:t})},segmentNew:function(t,e){return n("new_seg",{seg:t,primary:e})},segmentRemove:function(t){return n("rem_seg",{seg:t})},tempStatus:function(t,e,r){return n("temp_status",{seg:t,above:e,below:r})},rewind:function(t){return n("rewind",{seg:t})},status:function(t,e,r){return n("status",{seg:t,above:e,below:r})},vert:function(e){return e===r?t:(r=e,n("vert",{x:e}))},log:function(t){return"string"!=typeof t&&(t=JSON.stringify(t,!1," ")),n("log",{txt:t})},reset:function(){return n("reset")},selected:function(t){return n("selected",{segs:t})},chainStart:function(t){return n("chain_start",{seg:t})},chainRemoveHead:function(t,e){return n("chain_rem_head",{index:t,pt:e})},chainRemoveTail:function(t,e){return n("chain_rem_tail",{index:t,pt:e})},chainNew:function(t,e){return n("chain_new",{pt1:t,pt2:e})},chainMatch:function(t){return n("chain_match",{index:t})},chainClose:function(t){return n("chain_close",{index:t})},chainAddHead:function(t,e){return n("chain_add_head",{index:t,pt:e})},chainAddTail:function(t,e){return n("chain_add_tail",{index:t,pt:e})},chainConnect:function(t,e){return n("chain_con",{index1:t,index2:e})},chainReverse:function(t){return n("chain_rev",{index:t})},chainJoin:function(t,e){return n("chain_join",{index1:t,index2:e})},done:function(){return n("done")}}}},29023:function(t){t.exports=function(t){"number"!=typeof t&&(t=1e-10);var e={epsilon:function(e){return"number"==typeof e&&(t=e),t},pointAboveOrOnLine:function(e,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=e[0];return(o-i)*(e[1]-a)-(s-a)*(l-i)>=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-u)*(i-c)/(o-c)+u-n>t&&(s=!s),a=u,o=c}return s}};return e}},10670:function(t){var e={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i0}))}function c(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,u=a.start,c=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,u,c);if(!1===f){if(!e.pointsCollinear(o,s,u))return!1;if(e.pointsSame(o,c)||e.pointsSame(s,u))return!1;var h=e.pointsSame(o,u),p=e.pointsSame(s,c);if(h&&p)return n;var d=!h&&e.pointBetween(o,u,c),v=!p&&e.pointBetween(s,u,c);if(h)return v?l(n,s):l(t,c),n;d&&(p||(v?l(n,s):l(t,c)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,u):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,c)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var p=u(h),d=p.before?p.before.ev:null,v=p.after?p.after.ev:null;function g(){if(d){var t=c(h,d);if(t)return t}return!!v&&c(h,v)}r&&r.tempStatus(h.seg,!!d&&d.seg,!!v&&v.seg);var y,m,x=g();if(x)t?(m=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(x.seg.myFill.above=!x.seg.myFill.above):x.seg.otherFill=h.seg.myFill,r&&r.segmentUpdate(x.seg),h.other.remove(),h.remove();if(a.getHead()!==h){r&&r.rewind(h.seg);continue}t?(m=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=v?v.seg.myFill.above:i,h.seg.myFill.above=m?!h.seg.myFill.below:h.seg.myFill.below):null===h.seg.otherFill&&(y=v?h.primary===v.primary?v.seg.otherFill.above:v.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:y,below:y}),r&&r.status(h.seg,!!d&&d.seg,!!v&&v.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&c(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&&r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,t)}},n.prototype.read_uint16=function(t){var r=this.input;if(t+2>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?256*r[t]+r[t+1]:r[t]+256*r[t+1]},n.prototype.read_uint32=function(t){var r=this.input;if(t+4>r.length)throw e("unexpected EOF","EBADDATA");return this.big_endian?16777216*r[t]+65536*r[t+1]+256*r[t+2]+r[t+3]:r[t]+256*r[t+1]+65536*r[t+2]+16777216*r[t+3]},n.prototype.is_subifd_link=function(t,e){return 0===t&&34665===e||0===t&&34853===e||34665===t&&40965===e},n.prototype.exif_format_length=function(t){switch(t){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}},n.prototype.exif_format_read=function(t,e){var r;switch(t){case 1:case 2:return this.input[e];case 6:return(r=this.input[e])|33554430*(128&r);case 3:return this.read_uint16(e);case 8:return(r=this.read_uint16(e))|131070*(32768&r);case 4:return this.read_uint32(e);case 9:return 0|this.read_uint32(e);default:return null}},n.prototype.scan_ifd=function(t,n,i){var a=this.read_uint16(n);n+=2;for(var o=0;othis.input.length)throw e("unexpected EOF","EBADDATA");for(var d=[],v=h,g=0;g0&&(this.ifds_to_read.push({id:s,offset:d[0]}),p=!0),!1===i({is_big_endian:this.big_endian,ifd:t,tag:s,format:l,count:u,entry_offset:n+this.start,data_length:f,data_offset:h+this.start,value:d,is_subifd_link:p}))return void(this.aborted=!0);n+=12}0===t&&this.ifds_to_read.push({id:1,offset:this.read_uint32(n)})},t.exports.ExifParser=n,t.exports.get_orientation=function(t){var e=0;try{return new n(t,0,t.length).each((function(t){if(0===t.ifd&&274===t.tag&&Array.isArray(t.value))return e=t.value[0],!1})),e}catch(t){return-1}}},76767:function(t,e,r){"use strict";var n=r(14847).n8,i=r(14847).Ag;function a(t,e){if(t.length<4+e)return null;var r=i(t,e);return t.length>4&15,i=15&t[4],a=t[5]>>4&15,o=n(t,6),l=8,u=0;ue.width||t.width===e.width&&t.height>e.height?t:e})),i=r.reduce((function(t,e){return t.height>e.height||t.height===e.height&&t.width>e.width?t:e})),n.width>i.height||n.width===i.height&&n.height>i.width?n:i),s=1;e.transforms.forEach((function(t){var e={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===t.type&&(s=0===t.value?r[s]:e[s=e[s=r[s]]]),"irot"===t.type)for(var n=0;n1&&(h.variants=f.variants),f.orientation&&(h.orientation=f.orientation),f.exif_location&&f.exif_location.offset+f.exif_location.length<=t.length){var p=a(t,f.exif_location.offset),d=t.slice(f.exif_location.offset+p+4,f.exif_location.offset+f.exif_location.length),v=s.get_orientation(d);v>0&&(h.orientation=v)}return h}}}}}}},2504:function(t,e,r){"use strict";var n=r(14847).eG,i=r(14847).OF,a=r(14847).mP,o=n("BM");t.exports=function(t){if(!(t.length<26)&&i(t,0,o))return{width:a(t,18),height:a(t,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function(t,e,r){"use strict";var n=r(14847).eG,i=r(14847).OF,a=r(14847).mP,o=n("GIF87a"),s=n("GIF89a");t.exports=function(t){if(!(t.length<10)&&(i(t,0,o)||i(t,0,s)))return{width:a(t,6),height:a(t,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function(t,e,r){"use strict";var n=r(14847).mP;t.exports=function(t){var e=n(t,0),r=n(t,2),i=n(t,4);if(0===e&&1===r&&i){for(var a=[],o={width:0,height:0},s=0;so.width||u>o.height)&&(o=c)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function(t,e,r){"use strict";var n=r(14847).n8,i=r(14847).eG,a=r(14847).OF,o=r(71371),s=i("Exif\0\0");t.exports=function(t){if(!(t.length<2)&&255===t[0]&&216===t[1]&&255===t[2])for(var e=2;;){for(;;){if(t.length-e<2)return;if(255===t[e++])break}for(var r,i,l=t[e++];255===l;)l=t[e++];if(208<=l&&l<=217||1===l)r=0;else{if(!(192<=l&&l<=254))return;if(t.length-e<2)return;r=n(t,e)-2,e+=2}if(217===l||218===l)return;if(225===l&&r>=10&&a(t,e,s)&&(i=o.get_orientation(t.slice(e+6,e+r))),r>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(t.length-e0&&(u.orientation=i),u}e+=r}}},6303:function(t,e,r){"use strict";var n=r(14847).eG,i=r(14847).OF,a=r(14847).Ag,o=n("‰PNG\r\n\n"),s=n("IHDR");t.exports=function(t){if(!(t.length<24)&&i(t,0,o)&&i(t,12,s))return{width:a(t,16),height:a(t,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function(t,e,r){"use strict";var n=r(14847).eG,i=r(14847).OF,a=r(14847).Ag,o=n("8BPS\0");t.exports=function(t){if(!(t.length<22)&&i(t,0,o))return{width:a(t,18),height:a(t,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function(t){"use strict";function e(t){return"number"==typeof t&&isFinite(t)&&t>0}var r=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,i=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,a=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,o=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,s=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function l(t){return s.test(t)?t.match(s)[0]:"px"}t.exports=function(t){if(function(t){var e,r=0,n=t.length;for(239===t[0]&&187===t[1]&&191===t[2]&&(r=3);r>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function h(t,e){return{width:1+(t[e+6]<<16|t[e+5]<<8|t[e+4]),height:1+(t[e+9]<t.length)){for(;e+8=10?r=r||c(t,e+8):"VP8L"===p&&d>=9?r=r||f(t,e+8):"VP8X"===p&&d>=10?r=r||h(t,e+8):"EXIF"===p&&(n=s.get_orientation(t.slice(e+8,e+8+d)),e=1/0),e+=8+d}else e++;if(r)return n>0&&(r.orientation=n),r}}}},91497:function(t,e,r){"use strict";t.exports={avif:r(24461),bmp:r(2504),gif:r(47342),ico:r(31355),jpeg:r(54261),png:r(6303),psd:r(38689),svg:r(6881),tiff:r(66278),webp:r(90784)}},33575:function(t,e,r){"use strict";var n=r(91497);t.exports=function(t){return function(t){for(var e=Object.keys(n),r=0;r1)for(var r=1;r1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map((function(t,u){var c=x[u];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{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||(x[u]=c={id:u,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},m,t)),a(c,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform float dashLength, pixelRatio, thickness, opacity, id, miterMode;\nuniform sampler2D dashTexture;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25;\n\tfloat dash = texture2D(dashTexture, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},y.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},y.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},y.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>y.precisionThreshold||e.scale[1]*e.viewport.height>y.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=y.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},y.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach((function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=s(t,{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"}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=a({},y.defaults,t)),null!=t.thickness&&(d.thickness=parseFloat(t.thickness)),null!=t.opacity&&(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(d.overlay=!!t.overlay,f=z}));(O=O.slice(0,R)).push(z)}for(var F=function(t){var e=k.slice(2*D,2*O[t]).concat(z?k.slice(2*z):[]),r=(d.hole||[]).map((function(e){return e-z+(O[t]-D)})),n=u(e,r);n=n.map((function(e){return e+D+(e+Dt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=f(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform bool constPointSize;\nuniform float pixelRatio;\nuniform vec2 paletteSize, scale, scaleFract, translate, translateFract;\nuniform sampler2D paletteTexture;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(paletteTexture,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),v&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}x.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},x.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},x.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(h):e.elements=o.elements(h)}var p=g.float32(t);return i({data:p,usage:"dynamic"}),a({data:g.fract32(t,p),usage:"dynamic"}),l({data:new Uint8Array(c),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var a=[],s=0,l=Math.min(e.length,r.count);s=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},x.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x,s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y,l.height),[a,n,o,i]}function p(t){if("number"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}t.exports=c,c.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){e.draw(),e.dirty=!0,e.planned=null}))):(this.draw(),this.dirty=!0,o((function(){e.dirty=!1}))),this)},c.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;nk))&&(s.lower||!(T>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function l(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[s(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[s(t.byteLength)>>2].push(t)}var r=o(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function u(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||$(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(i=s)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},l=0,c={uint8:5121,uint16:5123};e.oes_element_index_uint&&(c.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)l(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||$(t)||u(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=nt[t.usage]),"primitive"in t&&(n=st[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=c[t.type]),"length"in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&&5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else l(),f.primType=4,f.vertCount=0,f.type=5121;return s}var l=r.create(null,34963,!0),f=new i(l._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=f,s.subdata=function(t,e){return l.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){Q(s).forEach(o)}}}function y(t){for(var e=J.allocType(5123,t.length),r=0;r>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15>=i,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function C(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(ut).forEach((function(e){t+=ut[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;P.call(r);var a=L();return"number"==typeof t?M(a,0|t,"number"==typeof e?0|e:0|t):t?(O(r,t),S(a,t)):M(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,l(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,z(i),E(a,3553),I(r,3553),R(),C(a),o.profile&&(i.stats.size=A(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=X[i.internalformat],n.type=K[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new D(3553);return ut[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();return l(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,z(i),d(o,3553,e,r,a),R(),g(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,z(i);for(var l=0;i.mipmask>>l;++l){var u=a>>l,c=s>>l;if(!u||!c)break;t.texImage2D(3553,l,i.format,u,c,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=A(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,u){function f(t,e,r,n,i,a){var s,u=h.texInfo;for(P.call(u),s=0;6>s;++s)y[s]=L();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(y[0],t),S(y[1],e),S(y[2],r),S(y[3],n),S(y[4],i),S(y[5],a);else if(O(u,t),c(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)l(y[s],h),S(y[s],t[s]);else for(s=0;6>s;++s)S(y[s],t)}else for(t=0|t||1,s=0;6>s;++s)M(y[s],t,t);for(l(h,y[0]),h.mipmask=u.genMipmaps?(y[0].width<<1)-1:y[0].mipmask,h.internalformat=y[0].internalformat,f.width=y[0].width,f.height=y[0].height,z(h),s=0;6>s;++s)E(y[s],34069+s);for(I(u,34067),R(),o.profile&&(h.stats.size=A(h.internalformat,h.type,f.width,f.height,u.genMipmaps,!0)),f.format=X[h.internalformat],f.type=K[h.type],f.mag=rt[u.magFilter],f.min=nt[u.minFilter],f.wrapS=it[u.wrapS],f.wrapT=it[u.wrapT],s=0;6>s;++s)C(y[s]);return f}var h=new D(34067);ut[h.id]=h,a.cubeCount++;var y=Array(6);return f(e,r,n,i,s,u),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=v();return l(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,z(h),d(a,34069+t,r,n,i),R(),g(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,z(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return R(),o.profile&&(h.stats.size=A(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType="textureCube",f._texture=h,o.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;er;++r)if(0!=(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);I(e.texInfo,e.target)}))},refresh:function(){for(var e=0;ei;++i){for(u=0;ut;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){Q(k).forEach(g)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,Q(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),y(e)}))}})}function E(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function L(t,e,r,n,i,a,o){function s(){this.id=++f,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,h[this.id]=this,this.buffers=[]}var l=r.maxAttributes,c=Array(l);for(r=0;r=h.byteLength?l.subdata(h):(l.destroy(),r.buffers[s]=null)),r.buffers[s]||(l=r.buffers[s]=i.create(c,34962,!1,!0)),f.buffer=i.getBuffer(l),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,t[s]=1):i.getBuffer(c)?(f.buffer=i.getBuffer(c),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(c.buffer)?(f.buffer=i.getBuffer(c.buffer),f.size=0|(+c.size||f.buffer.dimension),f.normalized=!!c.normalized||!1,f.type="type"in c?rt[c.type]:f.buffer.dtype,f.offset=0|(c.offset||0),f.stride=0|(c.stride||0),f.divisor=0|(c.divisor||0),f.state=1):"x"in c&&(f.x=+c.x||0,f.y=+c.y||0,f.z=+c.z||0,f.w=+c.w||0,f.state=2)}for(l=0;lt&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);Q(u).forEach(e),u={},Q(c).forEach(e),c={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,f={},r.shaderCount=0},program:function(e,n,i,a){var o=f[n];o||(o=f[n]={});var p=o[e];if(p&&(p.refCount++,!a))return p;var d=new s(n,e);return r.shaderCount++,l(d,i,a),p||(o[e]=d),h.push(d),G(d,{destroy:function(){if(d.refCount--,0>=d.refCount){t.deleteProgram(d.program);var e=h.indexOf(d);h.splice(e,1),r.shaderCount--}0>=o[d.vertId].refCount&&(t.deleteShader(c[d.vertId]),delete c[d.vertId],delete f[d.fragId][d.vertId]),Object.keys(f[d.fragId]).length||(t.deleteShader(u[d.fragId]),delete u[d.fragId],delete f[d.fragId])}})},restore:function(){u={},c={};for(var t=0;t>>e|t<<32-e}function I(t,e){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}function D(t){return Array.prototype.slice.call(t)}function z(t){return D(t).join("")}function R(t){function e(){var t=[],e=[];return G((function(){t.push.apply(t,D(arguments))}),{def:function(){var r="v"+i++;return e.push(r),0>>4&15)+"0123456789abcdef".charAt(15&e);return r}(function(t){for(var e=Array(t.length>>2),r=0;r>5]|=(255&t.charCodeAt(r/8))<<24-r%32;var n,i,a,o,s,l,u,c,f,h,p,d=8*t.length;for(t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],r=Array(64),e[d>>5]|=128<<24-d%32,e[15+(d+64>>9<<4)]=d,c=0;cf;f++){var v;16>f?r[f]=e[f+c]:(h=f,p=I(p=O(p=r[f-2],17)^O(p,19)^p>>>10,r[f-7]),v=O(v=r[f-15],7)^O(v,18)^v>>>3,r[h]=I(I(p,v),r[f-16])),h=I(I(I(I(u,h=O(h=o,6)^O(h,11)^O(h,25)),o&s^~o&l),Mt[f]),r[f]),p=I(u=O(u=d,2)^O(u,13)^O(u,22),d&n^d&i^n&i),u=l,l=s,s=o,o=I(a,h),a=i,i=n,n=d,d=I(h,p)}t[0]=I(d,t[0]),t[1]=I(n,t[1]),t[2]=I(i,t[2]),t[3]=I(a,t[3]),t[4]=I(o,t[4]),t[5]=I(s,t[5]),t[6]=I(l,t[6]),t[7]=I(u,t[7])}for(e="",r=0;r<32*t.length;r+=8)e+=String.fromCharCode(t[r>>5]>>>24-r%32&255);return e}(function(t){for(var e,r,n="",i=-1;++i=e&&56320<=r&&57343>=r&&(e=65536+((1023&e)<<10)+(1023&r),i++),127>=e?n+=String.fromCharCode(e):2047>=e?n+=String.fromCharCode(192|e>>>6&31,128|63&e):65535>=e?n+=String.fromCharCode(224|e>>>12&15,128|e>>>6&63,128|63&e):2097151>=e&&(n+=String.fromCharCode(240|e>>>18&7,128|e>>>12&63,128|e>>>6&63,128|63&e));return n}(r))),n[e])?n[e].apply(null,o):(r=Function.apply(null,a.concat(r)),n&&(n[e]=r),r.apply(null,o))}}}function F(t){return Array.isArray(t)||$(t)||u(t)}function B(t){return t.sort((function(t,e){return"viewport"===t?-1:"viewport"===e?1:t"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",c,"=",a,".createStream(",34962,",",i,".buffer);","}else{",c,"=",a,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",c,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",a,".destroyStream(",c,");","}"),l}))})),o}function M(t,e,n,i,a){function s(t){var e=u[t];e&&(h[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[d,v,g,s],");")}p&&"null"!==p?m?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(c+".drawElements("+[d,g,y,v+"<<(("+y+"-5121)>>1)"]+");")}function e(){r(c+".drawArrays("+[d,v,g]+");")}p&&"null"!==p?m?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,u=t.shared,c=u.gl,f=u.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a),h.elementsActive&&a("if("+i+")"+c+".bindBuffer(34963,"+i+".buffer.buffer);")):(i=a.def(),a(i,"=",f,".","elements",";","if(",i,"){",c,".bindBuffer(",34963,",",i,".buffer.buffer);}","else if(",u.vao,".currentVAO){",i,"=",t.shared.elements+".getElements("+u.vao,".currentVAO.elements);",et?"":"if("+i+")"+c+".bindBuffer(34963,"+i+".buffer.buffer);","}")),i}(),d=i("primitive"),v=i("offset"),g=function(){var i=h.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,".","count"),i}();if("number"==typeof g){if(0===g)return}else r("if(",g,"){"),r.exit("}");Q&&(s=i("instances"),l=t.instancing);var y=p+".type",m=h.elements&&j(h.elements)&&!h.vaoActive;Q&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),a(),r("}else if(",s,"<0){"),o(),r("}")):a():o()}function H(t,e,r,n,i){return i=(e=_()).proc("body",i),Q&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function q(t,e,r,n){P(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),I(t,e,r,n.attributes,(function(){return!0}))),D(t,e,r,n.uniforms,(function(){return!0}),!1),z(t,e,e,r)}function Z(t,e,r,n){function i(){return!0}t.batchId="a1",P(t,e),I(t,e,r,n.attributes,i),D(t,e,r,n.uniforms,i,!1),z(t,e,e,r)}function W(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}P(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var u=t.scope(),c=t.scope();e(u.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",c,"}",u.exit),r.needsContext&&S(t,c,r.context),r.needsFramebuffer&&E(t,c,r.framebuffer),C(t,c,r.state,i),r.profile&&i(r.profile)&&O(t,c,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):u(t.shared.vao,".setVAO(",r.drawVAO.append(t,u),");"):u(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(u(t.shared.vao,".setVAO(null);"),I(t,u,r,n.attributes,a),I(t,c,r,n.attributes,i)),D(t,u,r,n.uniforms,a,!1),D(t,c,r,n.uniforms,i,!0),z(t,u,c,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,c),l=c.def(n,".id"),u=c.def(e,"[",l,"]"),c(t.shared.gl,".useProgram(",n,".program);","if(!",u,"){",u,"=",e,"[",l,"]=",t.link((function(e){return H(Z,t,r,e,2)})),"(",n,");}",u,".call(this,a0[",s,"],",s,");"))}function X(t,r){function n(e){var n=r.shader[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.shader,"."+e,n):i.set(a.shader,"."+e,t.link(n,{stable:!0})))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;if(S(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),B(Object.keys(r.state)).forEach((function(e){var n=r.state[e],o=n.append(t,i);m(o)?o.forEach((function(r,n){isNaN(r)?i.set(t.next[e],"["+n+"]",r):i.set(t.next[e],"["+n+"]",t.link(r,{stable:!0}))})):j(n)?i.set(a.next,"."+e,t.link(o,{stable:!0})):i.set(a.next,"."+e,o)})),O(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&(n=n.append(t,i),isNaN(n)?i.set(a.draw,"."+e,n):i.set(a.draw,"."+e,t.link(n),{stable:!0}))})),Object.keys(r.uniforms).forEach((function(n){var o=r.uniforms[n].append(t,i);Array.isArray(o)&&(o="["+o.map((function(e){return isNaN(e)?e:t.link(e,{stable:!0})}))+"]"),i.set(a.uniforms,"["+t.link(e.id(n),{stable:!0})+"]",o)})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new K).forEach((function(t){i.set(a,"."+t,n[t])}))})),r.scopeVAO){var s=r.scopeVAO.append(t,i);isNaN(s)?i.set(a.vao,".targetVAO",s):i.set(a.vao,".targetVAO",t.link(s,{stable:!0}))}n("vert"),n("frag"),0=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(c).forEach((function(e){t+=c[e].stats.size})),t}),{create:function(e,r){function o(e,r){var n=0,a=0,c=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(a=e.shape)[0],a=0|a[1]):("radius"in e&&(n=a=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(a=0|e.height)),"format"in e&&(c=s[e.format])):"number"==typeof e?(n=0|e,a="number"==typeof r?0|r:n):e||(n=a=1),n!==u.width||a!==u.height||c!==u.format)return o.width=u.width=n,o.height=u.height=a,u.format=c,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,c,n,a),i.profile&&(u.stats.size=wt[u.format]*u.width*u.height),o.format=l[u.format],o}var u=new a(t.createRenderbuffer());return c[u.id]=u,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===u.width&&a===u.height||(o.width=u.width=n,o.height=u.height=a,t.bindRenderbuffer(36161,u.renderbuffer),t.renderbufferStorage(36161,u.format,n,a),i.profile&&(u.stats.size=wt[u.format]*u.width*u.height)),o},o._reglType="renderbuffer",o._renderbuffer=u,i.profile&&(o.stats=u.stats),o.destroy=function(){u.decRef()},o},clear:function(){Q(c).forEach(o)},restore:function(){Q(c).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},kt=[];kt[6408]=4,kt[6407]=3;var At=[];At[5121]=1,At[5126]=4,At[36193]=2;var Mt=[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],St=["x","y","z","w"],Et="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Lt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Ct={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Pt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ot={cw:2304,ccw:2305},It=new N(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)T&&T.update(),et=null;else{et=W.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(O,null,0)}d.flush(),T&&T.update()}}function r(){!et&&0=J.length&&n()}}}}function c(){var t=V.viewport,e=V.scissor_box;t[0]=t[1]=e[0]=e[1]=0,O.viewportWidth=O.framebufferWidth=O.drawingBufferWidth=t[2]=e[2]=d.drawingBufferWidth,O.viewportHeight=O.framebufferHeight=O.drawingBufferHeight=t[3]=e[3]=d.drawingBufferHeight}function f(){O.tick+=1,O.time=p(),c(),U.procs.poll()}function h(){B.refresh(),c(),U.procs.refresh(),T&&T.update()}function p(){return(X()-k)/1e3}if(!(t=a(t)))return null;var d=t.gl,y=d.getContextAttributes();d.isContextLost();var m=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)rt(G({framebuffer:t.framebuffer.faces[e]},t),l);else rt(t,l);else l(0,t)},prop:Y.define.bind(null,1),context:Y.define.bind(null,2),this:Y.define.bind(null,3),draw:s({}),buffer:function(t){return D.create(t,34962,!1,!1)},elements:function(t){return z.create(t,!1)},texture:B.create2D,cube:B.createCube,renderbuffer:N.create,framebuffer:j.create,framebufferCube:j.createCube,vao:R.createVAO,attributes:y,frame:u,on:function(t,e){var r;switch(t){case"frame":return u(e);case"lost":r=$;break;case"restore":r=Q;break;case"destroy":r=tt}return r.push(e),{cancel:function(){for(var t=0;t2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,a,o,s,l;if("string"==typeof e&&(a="not ",e.substr(0,a.length)===a)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))o="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var u=("number"!=typeof l&&(l=0),l+".".length>(s=t).length||-1===s.indexOf(".",l)?"argument":"property");o='The "'.concat(t,'" ').concat(u," ").concat(i," ").concat(n(e,"type"))}return o+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},37865:function(t,e,r){"use strict";var n=r(90386),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var a=r(40410),o=r(37493);r(42018)(c,a);for(var s=i(o.prototype),l=0;l0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),n)s.endEmitted?w(t,new _):S(t,s,e,!0);else if(s.ended)w(t,new x);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?S(t,s,e,!1):O(t,s)):S(t,s,e,!1)}else n||(s.reading=!1,O(t,s));return!s.ended&&(s.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function C(t){var e=t._readableState;a("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(a("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(P,t))}function P(t){var e=t._readableState;a("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,F(t)}function O(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function z(t){a("readable nexttick read 0"),t.read(0)}function R(t,e){a("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),F(t),e.flowing&&!e.reading&&t.read(0)}function F(t){var e=t._readableState;for(a("flow",e.flowing);e.flowing&&null!==t.read(););}function B(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;a("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(j,e,t))}function j(t,e){if(a("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function U(t,e){for(var r=0,n=t.length;r=e.highWaterMark:e.length>0)||e.ended))return a("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):C(this),null;if(0===(t=L(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return a("need readable",i),(0===e.length||e.length-t0?B(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(t){w(this,new b("_read()"))},A.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,e);var s=e&&!1===e.end||t===i.stdout||t===i.stderr?v:l;function l(){a("onend"),t.end()}n.endEmitted?i.nextTick(s):r.once("end",s),t.on("unpipe",(function e(i,o){a("onunpipe"),i===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,a("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",u),t.removeListener("error",h),t.removeListener("unpipe",e),r.removeListener("end",l),r.removeListener("end",v),r.removeListener("data",f),c=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}));var u=function(t){return function(){var e=t._readableState;a("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,F(t))}}(r);t.on("drain",u);var c=!1;function f(e){a("ondata");var i=t.write(e);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==U(n.pipes,t))&&!c&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(e){a("onerror",e),v(),t.removeListener("error",h),0===o(t,"error")&&w(t,e)}function p(){t.removeListener("finish",d),v()}function d(){a("onfinish"),t.removeListener("close",p),v()}function v(){a("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(r):t._events.error=[r,t._events.error]:t.on(e,r)}(t,"error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),t},A.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?C(this):n.reading||i.nextTick(z,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(D,this),r},A.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(D,this),e},A.prototype.resume=function(){var t=this._readableState;return t.flowing||(a("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(R,t,e))}(this,t)),t.paused=!1,this},A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(a("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(t,e,r){r(new v("_write()"))},A.prototype._writev=null,A.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,P(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(t,e){e(t)}},68221:function(t,e,r){"use strict";var n,i=r(90386);function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(12726),s=Symbol("lastResolve"),l=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),p=Symbol("stream");function d(t,e){return{value:t,done:e}}function v(t){var e=t[s];if(null!==e){var r=t[p].read();null!==r&&(t[f]=null,t[s]=null,t[l]=null,e(d(r,!1)))}}function g(t){i.nextTick(v,t)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((a(n={get stream(){return this[p]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[c])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[u]?r(t[u]):e(d(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(n,this));else{var a=this[p].read();if(null!==a)return Promise.resolve(d(a,!1));r=new Promise(this[h])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),a(n,"return",(function(){var t=this;return new Promise((function(e,r){t[p].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),y);t.exports=function(t){var e,r=Object.create(m,(a(e={},p,{value:t,writable:!0}),a(e,s,{value:null,writable:!0}),a(e,l,{value:null,writable:!0}),a(e,u,{value:null,writable:!0}),a(e,c,{value:t._readableState.endEmitted,writable:!0}),a(e,h,{value:function(t,e){var n=r[p].read();n?(r[f]=null,r[s]=null,r[l]=null,t(d(n,!1))):(r[s]=t,r[l]=e)},writable:!0}),e));return r[f]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[l];return null!==e&&(r[f]=null,r[s]=null,r[l]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[l]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",g.bind(null,r)),r}},31125:function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,n,i=o.allocUnsafe(t>>>0),a=this.head,s=0;a;)e=a.data,r=i,n=s,o.prototype.copy.call(e,r,n),s+=a.data.length,a=a.next;return i}},{key:"consume",value:function(t,e){var r;return ti.length?i.length:t;if(a===i.length?n+=i:n+=i.slice(0,t),0==(t-=a)){a===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,a=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,a),0==(t-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,e}},{key:l,value:function(t,e){return s(this,function(t){for(var e=1;e0,(function(t){n||(n=t),t&&o.forEach(u),a||(o.forEach(u),i(n))}))}));return e.reduce(c)}},56306:function(t,e,r){"use strict";var n=r(74322).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var a=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return t.objectMode?16:16384}}},71405:function(t,e,r){t.exports=r(15398).EventEmitter},68019:function(t,e,r){"use strict";var n=r(71665).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.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 a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=l,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function l(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function c(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.s=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(i>0&&(t.lastNeed=i-1),i):--n=0?(i>0&&(t.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},90715:function(t,e,r){var n=r(32791),i=r(41633)("stream-parser");function a(t){i("initializing parser stream"),t._parserBytesLeft=0,t._parserBuffers=[],t._parserBuffered=0,t._parserState=-1,t._parserCallback=null,"function"==typeof t.push&&(t._parserOutput=t.push.bind(t)),t._parserInit=!0}function o(t,e){n(!this._parserCallback,'there is already a "callback" set!'),n(isFinite(t)&&t>0,'can only buffer a finite number of bytes > 0, got "'+t+'"'),this._parserInit||a(this),i("buffering %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=0}function s(t,e){n(!this._parserCallback,'there is already a "callback" set!'),n(t>0,'can only skip > 0 bytes, got "'+t+'"'),this._parserInit||a(this),i("skipping %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=1}function l(t,e){n(!this._parserCallback,'There is already a "callback" set!'),n(t>0,'can only pass through > 0 bytes, got "'+t+'"'),this._parserInit||a(this),i("passing through %o bytes",t),this._parserBytesLeft=t,this._parserCallback=e,this._parserState=2}function u(t,e,r){this._parserInit||a(this),i("write(%o bytes)",t.length),"function"==typeof e&&(r=e),h(this,t,null,r)}function c(t,e,r){this._parserInit||a(this),i("transform(%o bytes)",t.length),"function"!=typeof e&&(e=this._parserOutput),h(this,t,e,r)}function f(t,e,r,n){if(t._parserBytesLeft-=e.length,i("%o bytes left for stream piece",t._parserBytesLeft),0===t._parserState?(t._parserBuffers.push(e),t._parserBuffered+=e.length):2===t._parserState&&r(e),0!==t._parserBytesLeft)return n;var a=t._parserCallback;if(a&&0===t._parserState&&t._parserBuffers.length>1&&(e=Buffer.concat(t._parserBuffers,t._parserBuffered)),0!==t._parserState&&(e=null),t._parserCallback=null,t._parserBuffered=0,t._parserState=-1,t._parserBuffers.splice(0),a){var o=[];e&&o.push(e),r&&o.push(r);var s=a.length>o.length;s&&o.push(p(n));var l=a.apply(t,o);if(!s||n===l)return n}}t.exports=function(t){var e=t&&"function"==typeof t._transform,r=t&&"function"==typeof t._write;if(!e&&!r)throw new Error("must pass a Writable or Transform stream in");i("extending Parser into stream"),t._bytes=o,t._skipBytes=s,e&&(t._passthrough=l),e?t._transform=c:t._write=u};var h=p((function t(e,r,n,i){return e._parserBytesLeft<=0?i(new Error("got data but not currently parsing anything")):r.length<=e._parserBytesLeft?function(){return f(e,r,n,i)}:function(){var a=r.slice(0,e._parserBytesLeft);return f(e,a,n,(function(o){return o?i(o):r.length>a.length?function(){return t(e,r.slice(a.length),n,i)}:void 0}))}}));function p(t){return function(){for(var e=t.apply(this,arguments);"function"==typeof e;)e=e();return e}}},41633:function(t,e,r){var n=r(90386);function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(74469)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(i++,"%c"===t&&(a=i))})),t.splice(a,0,n)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())},74469:function(t,e,r){var n;function i(t){function r(){if(r.enabled){var t=r,i=+new Date,a=i-(n||i);t.diff=a,t.prev=n,t.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s0)return function(t){if(!((t=String(t)).length>100)){var a=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(a){var o=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"days":case"day":case"d":return o*i;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return o*r;case"seconds":case"second":case"secs":case"sec":case"s":return o*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(t);if("number"===l&&!1===isNaN(t))return o.long?a(s=t,i,"day")||a(s,n,"hour")||a(s,r,"minute")||a(s,e,"second")||s+" ms":function(t){return t>=i?Math.round(t/i)+"d":t>=n?Math.round(t/n)+"h":t>=r?Math.round(t/r)+"m":t>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},99011:function(t,e,r){"use strict";var n=r(88641);t.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","“”","«»"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s0;){e=u[u.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[v])}a[e]=d}else{if(n[e]===r[e]){var g=[],y=[],m=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,g.push(x),y.push(s[x]),m+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(g);var b=new Array(m);for(d=0;d1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};e.default=function(t){var e=t.px,r=t.py,s=t.cx,l=t.cy,u=t.rx,c=t.ry,f=t.xAxisRotation,h=void 0===f?0:f,p=t.largeArcFlag,d=void 0===p?0:p,v=t.sweepFlag,g=void 0===v?0:v,y=[];if(0===u||0===c)return[];var m=Math.sin(h*n/360),x=Math.cos(h*n/360),b=x*(e-s)/2+m*(r-l)/2,_=-m*(e-s)/2+x*(r-l)/2;if(0===b&&0===_)return[];u=Math.abs(u),c=Math.abs(c);var w=Math.pow(b,2)/Math.pow(u,2)+Math.pow(_,2)/Math.pow(c,2);w>1&&(u*=Math.sqrt(w),c*=Math.sqrt(w));var T=function(t,e,r,i,a,s,l,u,c,f,h,p){var d=Math.pow(a,2),v=Math.pow(s,2),g=Math.pow(h,2),y=Math.pow(p,2),m=d*v-d*y-v*g;m<0&&(m=0),m/=d*y+v*g;var x=(m=Math.sqrt(m)*(l===u?-1:1))*a/s*p,b=m*-s/a*h,_=f*x-c*b+(t+r)/2,w=c*x+f*b+(e+i)/2,T=(h-x)/a,k=(p-b)/s,A=(-h-x)/a,M=(-p-b)/s,S=o(1,0,T,k),E=o(T,k,A,M);return 0===u&&E>0&&(E-=n),1===u&&E<0&&(E+=n),[_,w,S,E]}(e,r,s,l,u,c,d,g,m,x,b,_),k=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}return r}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(T,4),A=k[0],M=k[1],S=k[2],E=k[3],L=Math.abs(E)/(n/4);Math.abs(1-L)<1e-7&&(L=1);var C=Math.max(Math.ceil(L),1);E/=C;for(var P=0;Pe[2]&&(e[2]=u[c+0]),u[c+1]>e[3]&&(e[3]=u[c+1]);return e}},29988:function(t,e,r){"use strict";t.exports=function(t){for(var e,r=[],o=0,s=0,l=0,u=0,c=null,f=null,h=0,p=0,d=0,v=t.length;d4?(o=g[g.length-4],s=g[g.length-3]):(o=h,s=p),r.push(g)}return r};var n=r(7095);function i(t,e,r,n){return["C",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},82019:function(t,e,r){"use strict";var n,i=r(1750),a=r(95616),o=r(31457),s=r(89546),l=r(44781),u=document.createElement("canvas"),c=u.getContext("2d");t.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");var r,f;e||(e={}),e.shape?(r=e.shape[0],f=e.shape[1]):(r=u.width=e.w||e.width||200,f=u.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),v=[r/(d[2]-d[0]),f/(d[3]-d[1])],g=Math.min(v[0]||0,v[1]||0)/2;if(c.fillStyle="black",c.fillRect(0,0,r,f),c.fillStyle="white",p&&("number"!=typeof p&&(p=1),c.strokeStyle=p>0?"white":"black",c.lineWidth=Math.abs(p)),c.translate(.5*r,.5*f),c.scale(g,g),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var y=new Path2D(t);c.fill(y),p&&c.stroke(y)}else{var m=a(t);o(c,m),c.fill(),p&&c.stroke()}return c.setTransform(1,0,0,1,0,0),l(c,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},84267:function(t,e,r){var n;!function(i){var a=/^\s+/,o=/\s+$/,s=0,l=i.round,u=i.min,c=i.max,f=i.random;function h(t,e){if(e=e||{},(t=t||"")instanceof h)return t;if(!(this instanceof h))return new h(t,e);var r=function(t){var e,r,n,s={r:0,g:0,b:0},l=1,f=null,h=null,p=null,d=!1,v=!1;return"string"==typeof t&&(t=function(t){t=t.replace(a,"").replace(o,"").toLowerCase();var e,r=!1;if(C[t])t=C[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=H.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=H.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=H.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=H.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=H.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=H.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=H.hex8.exec(t))?{r:z(e[1]),g:z(e[2]),b:z(e[3]),a:N(e[4]),format:r?"name":"hex8"}:(e=H.hex6.exec(t))?{r:z(e[1]),g:z(e[2]),b:z(e[3]),format:r?"name":"hex"}:(e=H.hex4.exec(t))?{r:z(e[1]+""+e[1]),g:z(e[2]+""+e[2]),b:z(e[3]+""+e[3]),a:N(e[4]+""+e[4]),format:r?"name":"hex8"}:!!(e=H.hex3.exec(t))&&{r:z(e[1]+""+e[1]),g:z(e[2]+""+e[2]),b:z(e[3]+""+e[3]),format:r?"name":"hex"}}(t)),"object"==typeof t&&(q(t.r)&&q(t.g)&&q(t.b)?(e=t.r,r=t.g,n=t.b,s={r:255*I(e,255),g:255*I(r,255),b:255*I(n,255)},d=!0,v="%"===String(t.r).substr(-1)?"prgb":"rgb"):q(t.h)&&q(t.s)&&q(t.v)?(f=F(t.s),h=F(t.v),s=function(t,e,r){t=6*I(t,360),e=I(e,100),r=I(r,100);var n=i.floor(t),a=t-n,o=r*(1-e),s=r*(1-a*e),l=r*(1-(1-a)*e),u=n%6;return{r:255*[r,s,o,o,l,r][u],g:255*[l,r,r,s,o,o][u],b:255*[o,o,l,r,r,s][u]}}(t.h,f,h),d=!0,v="hsv"):q(t.h)&&q(t.s)&&q(t.l)&&(f=F(t.s),p=F(t.l),s=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=I(t,360),e=I(e,100),r=I(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,f,p),d=!0,v="hsl"),t.hasOwnProperty("a")&&(l=t.a)),l=O(l),{ok:d,format:t.format||v,r:u(255,c(s.r,0)),g:u(255,c(s.g,0)),b:u(255,c(s.b,0)),a:l}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=l(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=l(this._r)),this._g<1&&(this._g=l(this._g)),this._b<1&&(this._b=l(this._b)),this._ok=r.ok,this._tc_id=s++}function p(t,e,r){t=I(t,255),e=I(e,255),r=I(r,255);var n,i,a=c(t,e,r),o=u(t,e,r),s=(a+o)/2;if(a==o)n=i=0;else{var l=a-o;switch(i=s>.5?l/(2-a-o):l/(a+o),a){case t:n=(e-r)/l+(e>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(h(n));return a}function L(t,e){e=e||6;for(var r=h(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(h({h:n,s:i,v:a})),a=(a+s)%1;return o}h.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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=O(t),this._roundA=l(100*this._a)/100,this},toHsv:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=d(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),n=l(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=p(this._r,this._g,this._b),e=l(360*t.h),r=l(100*t.s),n=l(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return v(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var a=[R(l(t).toString(16)),R(l(e).toString(16)),R(l(r).toString(16)),R(B(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:l(this._r),g:l(this._g),b:l(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+l(this._r)+", "+l(this._g)+", "+l(this._b)+")":"rgba("+l(this._r)+", "+l(this._g)+", "+l(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:l(100*I(this._r,255))+"%",g:l(100*I(this._g,255))+"%",b:l(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%)":"rgba("+l(100*I(this._r,255))+"%, "+l(100*I(this._g,255))+"%, "+l(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(P[v(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+g(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=h(t);r="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return h(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(y,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(T,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(E,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(L,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(A,arguments)},tetrad:function(){return this._applyCombination(M,arguments)}},h.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:F(t[n]));t=r}return h(t,e)},h.equals=function(t,e){return!(!t||!e)&&h(t).toRgbString()==h(e).toRgbString()},h.random=function(){return h.fromRatio({r:f(),g:f(),b:f()})},h.mix=function(t,e,r){r=0===r?0:r||50;var n=h(t).toRgb(),i=h(e).toRgb(),a=r/100;return h({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},h.readability=function(t,e){var r=h(t),n=h(e);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},h.isReadable=function(t,e,r){var n,i,a,o,s,l=h.readability(t,e);switch(i=!1,(a=r,"AA"!==(o=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(s=(a.size||"small").toLowerCase())&&"large"!==s&&(s="small"),n={level:o,size:s}).level+n.size){case"AAsmall":case"AAAlarge":i=l>=4.5;break;case"AAlarge":i=l>=3;break;case"AAAsmall":i=l>=7}return i},h.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;ul&&(l=n,s=h(e[u]));return h.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,h.mostReadable(t,["#fff","#000"],r))};var C=h.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"},P=h.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(C);function O(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=u(e,c(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function D(t){return u(1,c(0,t))}function z(t){return parseInt(t,16)}function R(t){return 1==t.length?"0"+t:""+t}function F(t){return t<=1&&(t=100*t+"%"),t}function B(t){return i.round(255*parseFloat(t)).toString(16)}function N(t){return z(t)/255}var j,U,V,H=(U="[\\s|\\(]+("+(j="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",V="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",{CSS_UNIT:new RegExp(j),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+V),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function q(t){return!!H.CSS_UNIT.exec(t)}t.exports?t.exports=h:void 0===(n=function(){return h}.call(e,r,e,t))||(t.exports=n)}(Math)},57060:function(t){"use strict";t.exports=r,t.exports.float32=t.exports.float=r,t.exports.fract32=t.exports.fract=function(t,e){if(t.length){if(t instanceof Float32Array)return new Float32Array(t.length);e instanceof Float32Array||(e=r(t));for(var n=0,i=e.length;n":(e.length>100&&(e=e.slice(0,99)+"…"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},47403:function(t,e,r){"use strict";var n=r(24582),i={object:!0,function:!0,undefined:!0};t.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},82527:function(t,e,r){"use strict";var n=r(69190),i=r(84985);t.exports=function(t){return i(t)?t:n(t,"%v is not a plain function",arguments[1])}},84985:function(t,e,r){"use strict";var n=r(73116),i=/^\s*class[\s{/}]/,a=Function.prototype.toString;t.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},24511:function(t,e,r){"use strict";var n=r(47403);t.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},9234:function(t,e,r){"use strict";var n=r(24582),i=r(47403),a=Object.prototype.toString;t.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===a)return null}try{return""+t}catch(t){return null}}},10424:function(t,e,r){"use strict";var n=r(69190),i=r(24582);t.exports=function(t){return i(t)?t:n(t,"Cannot use %v",arguments[1])}},24582:function(t){"use strict";t.exports=function(t){return null!=t}},58404:function(t,e,r){"use strict";var n=r(13547),i=r(12129),a=r(12856).Buffer;r.g.__TYPEDARRAY_POOL||(r.g.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,u=r.g.__TYPEDARRAY_POOL;u.UINT8C||(u.UINT8C=i([32,0])),u.BIGUINT64||(u.BIGUINT64=i([32,0])),u.BIGINT64||(u.BIGINT64=i([32,0])),u.BUFFER||(u.BUFFER=i([32,0]));var c=u.DATA,f=u.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);c[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=c[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function v(t){return new Uint16Array(p(2*t),0,t)}function g(t){return new Uint32Array(p(4*t),0,t)}function y(t){return new Int8Array(p(t),0,t)}function m(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function A(t){return new DataView(p(t),0,t)}function M(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}e.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);c[r].push(t)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(t){h(t.buffer)},e.freeArrayBuffer=h,e.freeBuffer=function(t){f[n.log2(t.length)].push(t)},e.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return d(t);case"uint16":return v(t);case"uint32":return g(t);case"int8":return y(t);case"int16":return m(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return k(t);case"biguint64":return T(t);case"buffer":return M(t);case"data":case"dataview":return A(t);default:return null}return null},e.mallocArrayBuffer=p,e.mallocUint8=d,e.mallocUint16=v,e.mallocUint32=g,e.mallocInt8=y,e.mallocInt16=m,e.mallocInt32=x,e.mallocFloat32=e.mallocFloat=b,e.mallocFloat64=e.mallocDouble=_,e.mallocUint8Clamped=w,e.mallocBigUint64=T,e.mallocBigInt64=k,e.mallocDataView=A,e.mallocBuffer=M,e.clearCache=function(){for(var t=0;t<32;++t)u.UINT8[t].length=0,u.UINT16[t].length=0,u.UINT32[t].length=0,u.INT8[t].length=0,u.INT16[t].length=0,u.INT32[t].length=0,u.FLOAT[t].length=0,u.DOUBLE[t].length=0,u.BIGUINT64[t].length=0,u.BIGINT64[t].length=0,u.UINT8C[t].length=0,c[t].length=0,f[t].length=0}},90448:function(t){var e=/[\'\"]/;t.exports=function(t){return t?(e.test(t.charAt(0))&&(t=t.substr(1)),e.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}},93447:function(t){"use strict";t.exports=function(t,e,r){Array.isArray(r)||(r=[].slice.call(arguments,2));for(var n=0,i=r.length;n=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),s=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),h(n,t,n.depth)}function c(t,e){var r=u.styles[e];return r?"["+u.colors[r][0]+"m"+t+"["+u.colors[r][1]+"m":t}function f(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&A(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return x(i)||(i=h(t,i,n)),i}var a=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(x(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):g(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}(t,r);if(a)return a;var o=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),k(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(r);if(0===o.length){if(A(r)){var l=r.name?": "+r.name:"";return t.stylize("[Function"+l+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(T(r))return t.stylize(Date.prototype.toString.call(r),"date");if(k(r))return p(r)}var u,c="",f=!1,w=["{","}"];return v(r)&&(f=!0,w=["[","]"]),A(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(c=" "+RegExp.prototype.toString.call(r)),T(r)&&(c=" "+Date.prototype.toUTCString.call(r)),k(r)&&(c=" "+p(r)),0!==o.length||f&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=f?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(u,c,w)):w[0]+c+w[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),C(n,i)||(o="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=y(r)?h(t,l.value,null):h(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").slice(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),b(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function v(t){return Array.isArray(t)}function g(t){return"boolean"==typeof t}function y(t){return null===t}function m(t){return"number"==typeof t}function x(t){return"string"==typeof t}function b(t){return void 0===t}function _(t){return w(t)&&"[object RegExp]"===M(t)}function w(t){return"object"==typeof t&&null!==t}function T(t){return w(t)&&"[object Date]"===M(t)}function k(t){return w(t)&&("[object Error]"===M(t)||t instanceof Error)}function A(t){return"function"==typeof t}function M(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!o[t])if(s.test(t)){var r=n.pid;o[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else o[t]=function(){};return o[t]},e.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"},e.types=r(4936),e.isArray=v,e.isBoolean=g,e.isNull=y,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=x,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=_,e.types.isRegExp=_,e.isObject=w,e.isDate=T,e.types.isDate=T,e.isError=k,e.types.isNativeError=k,e.isFunction=A,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(45920);var E=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(){var t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":");return[t.getDate(),E[t.getMonth()],e].join(" ")}function C(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",L(),e.format.apply(e,arguments))},e.inherits=r(42018),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(P&&t[P]){var e;if("function"!=typeof(e=t[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,P,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],a=0;a2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,u=s>>5&15,c=31&s;(i=a.newDate(l,u,c)).add(4-(i.dayOfWeek()||7),"d");var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if("object"==typeof t)o=t,a=e||{};else{var l;if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,a=n):(l=!!n,a={}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var u,c=f[o.year-f[0]],p=c>>13;u=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(v>>5&15)-1,(31&v)+s);return a.year=g.getFullYear(),a.month=1+g.getMonth(),a.day=g.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if("object"==typeof t)i=t,a=e||{};else{if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a={}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,u=new Date(o>>9&4095,(o>>5&15)-1,31&o),c=new Date(i.year,i.month-1,i.day);l=Math.round((c-u)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var v=d&1<<12-p?30:29;if(l>13;return!g||p=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=a},37715:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Ethiopian",jdEpoch:1724220.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},99384:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)||8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},43805:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},88874:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Julian",jdEpoch:1721423.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},83290:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.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(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).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(t){var e=o(8+(t-=this.jdEpoch)+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s(20+(t-=this.jdEpoch),20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},29108:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar;var o=n.instance("gregorian");i(a.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},55422:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,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(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var u=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(u)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(u,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+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>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(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var u=t-this.toJD(l,1,1)+1,c=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),f=t-this.toJD(l,c,1)+1;return this.newDate(l,c,f)}}),n.calendars.persian=a,n.calendars.jalali=a},31320:function(t,e,r){var n=r(63489),i=r(56131),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},51367:function(t,e,r){var n=r(63489),i=r(56131),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Thai",jdEpoch:1523098.5,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(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(e.year()),a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return t=this._t2gYear(i.year()),a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=this._t2gYear(i.year()),a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},21457:function(t,e,r){var n=r(63489),i=r(56131);function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;ar)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,u=e-o[r-1]+1;return this.newDate(s,l,u)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[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]},63489:function(t,e,r){var n=r(56131);function i(){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={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return"000000".substring(0,e-(t=""+t).length)+t}function s(){this.shortYearCutoff="+10"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}n(i.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(u.local.invalidDate||u.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,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(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(u.local.differentCalendars||u.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,u.local.invalidMonth||u.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,u.local.invalidYear||u.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.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(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,u.local.invalidDate||u.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);i=t.day(),"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[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;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,u.local.invalidDate||u.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-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(t,e,r){var n=this._validate(t,e,r,u.local.invalidDate||u.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(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var u=t.exports=new i;u.cdate=a,u.baseCalendar=s,u.calendars.gregorian=l},94338:function(t,e,r){var n=r(56131),i=r(63489);n(i.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"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s=(r=r||{}).dayNamesShort||this.local.dayNamesShort,l=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,c=r.monthNamesShort||this.local.monthNamesShort,f=r.monthNames||this.local.monthNames,h=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;_+n1}),p=function(t,e,r,n){var i=""+e;if(h(t,n))for(;i.length1},x=function(t,r){var n=m(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(A).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,A);return A+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"==typeof l){m("m");var t=l.call(b,e.substring(A));return A+=t.length,t}return x("m")},w=function(t,r,n,a){for(var o=m(t,a)?n:r,s=0;s-1){p=1,d=v;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}return f>-1?this.fromJD(f):this.newDate(h,p,d)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},69862:function(){},40964:function(){},72077:function(t,e,r){"use strict";var n=r(24696);t.exports=function(){return n(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],(function(t){return"function"==typeof r.g[t]}))}},40402:function(t){"use strict";t.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},83794:function(t){"use strict";t.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},96209:function(t){"use strict";t.exports=JSON.parse('["normal","italic","oblique"]')},15659:function(t){"use strict";t.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},38732:function(t){"use strict";t.exports=JSON.parse('["inherit","initial","unset"]')},41901:function(t){"use strict";t.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var a=e[n]={exports:{}};return t[n].call(a.exports,a,a.exports,r),a.exports}return r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,{a:e}),e},r.d=function(t,e){for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r(27909)}()})); \ No newline at end of file diff --git a/dash/html/A.py b/dash/html/A.py index aaf7d41388..99aa2f8a69 100644 --- a/dash/html/A.py +++ b/dash/html/A.py @@ -42,6 +42,10 @@ class A(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - download (string; optional): Indicates that the hyperlink is to be used for downloading a resource. @@ -138,6 +142,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, download=Component.UNDEFINED, href=Component.UNDEFINED, @@ -173,6 +178,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "download", "draggable", "hidden", @@ -205,6 +211,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "download", "draggable", "hidden", diff --git a/dash/html/Abbr.py b/dash/html/Abbr.py index 589065de68..ad1c10c853 100644 --- a/dash/html/Abbr.py +++ b/dash/html/Abbr.py @@ -42,6 +42,10 @@ class Abbr(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Acronym.py b/dash/html/Acronym.py index 816e9c64ee..4e819989e0 100644 --- a/dash/html/Acronym.py +++ b/dash/html/Acronym.py @@ -42,6 +42,10 @@ class Acronym(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Address.py b/dash/html/Address.py index 5332759b33..49260c3b45 100644 --- a/dash/html/Address.py +++ b/dash/html/Address.py @@ -42,6 +42,10 @@ class Address(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Area.py b/dash/html/Area.py index c39b50f271..2686c8cbb1 100644 --- a/dash/html/Area.py +++ b/dash/html/Area.py @@ -48,6 +48,10 @@ class Area(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - download (string; optional): Indicates that the hyperlink is to be used for downloading a resource. @@ -144,6 +148,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, alt=Component.UNDEFINED, coords=Component.UNDEFINED, @@ -183,6 +188,7 @@ def __init__( "coords", "data-*", "dir", + "disable_n_clicks", "download", "draggable", "hidden", @@ -217,6 +223,7 @@ def __init__( "coords", "data-*", "dir", + "disable_n_clicks", "download", "draggable", "hidden", diff --git a/dash/html/Article.py b/dash/html/Article.py index 0baf8aacf4..aea59ecd53 100644 --- a/dash/html/Article.py +++ b/dash/html/Article.py @@ -42,6 +42,10 @@ class Article(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Aside.py b/dash/html/Aside.py index c97b19c59f..e34e1ba6a2 100644 --- a/dash/html/Aside.py +++ b/dash/html/Aside.py @@ -42,6 +42,10 @@ class Aside(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Audio.py b/dash/html/Audio.py index e2dd81af89..dd9467654a 100644 --- a/dash/html/Audio.py +++ b/dash/html/Audio.py @@ -52,6 +52,10 @@ class Audio(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -135,6 +139,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, autoPlay=Component.UNDEFINED, controls=Component.UNDEFINED, @@ -172,6 +177,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -203,6 +209,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/B.py b/dash/html/B.py index c848c49d9b..2c9e98b826 100644 --- a/dash/html/B.py +++ b/dash/html/B.py @@ -42,6 +42,10 @@ class B(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Base.py b/dash/html/Base.py index 5754dbe7df..2d5905339b 100644 --- a/dash/html/Base.py +++ b/dash/html/Base.py @@ -42,6 +42,10 @@ class Base(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -118,6 +122,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, href=Component.UNDEFINED, target=Component.UNDEFINED, @@ -147,6 +152,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "href", @@ -173,6 +179,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "href", diff --git a/dash/html/Basefont.py b/dash/html/Basefont.py index a803425994..bd31b1aa44 100644 --- a/dash/html/Basefont.py +++ b/dash/html/Basefont.py @@ -46,6 +46,10 @@ class Basefont(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -114,6 +118,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -141,6 +146,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -165,6 +171,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Bdi.py b/dash/html/Bdi.py index 46e639101f..5817c99e78 100644 --- a/dash/html/Bdi.py +++ b/dash/html/Bdi.py @@ -42,6 +42,10 @@ class Bdi(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Bdo.py b/dash/html/Bdo.py index 937f316da2..8f25cf691f 100644 --- a/dash/html/Bdo.py +++ b/dash/html/Bdo.py @@ -42,6 +42,10 @@ class Bdo(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Big.py b/dash/html/Big.py index 098cf8b13c..5aecb5b886 100644 --- a/dash/html/Big.py +++ b/dash/html/Big.py @@ -42,6 +42,10 @@ class Big(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Blink.py b/dash/html/Blink.py index df01ece160..bf58161db4 100644 --- a/dash/html/Blink.py +++ b/dash/html/Blink.py @@ -46,6 +46,10 @@ class Blink(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -114,6 +118,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -141,6 +146,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -165,6 +171,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Blockquote.py b/dash/html/Blockquote.py index f6e7b79da7..2c4b466d1f 100644 --- a/dash/html/Blockquote.py +++ b/dash/html/Blockquote.py @@ -45,6 +45,10 @@ class Blockquote(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -113,6 +117,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, cite=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -167,6 +173,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Br.py b/dash/html/Br.py index 0edfcb098a..9b35c90724 100644 --- a/dash/html/Br.py +++ b/dash/html/Br.py @@ -42,6 +42,10 @@ class Br(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Button.py b/dash/html/Button.py index 723ee6b921..06e96aed33 100644 --- a/dash/html/Button.py +++ b/dash/html/Button.py @@ -45,6 +45,10 @@ class Button(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): Indicates whether the user can interact with the element. @@ -160,6 +164,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, autoFocus=Component.UNDEFINED, disabled=Component.UNDEFINED, @@ -199,6 +204,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", @@ -234,6 +240,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", diff --git a/dash/html/Canvas.py b/dash/html/Canvas.py index 44d4afec18..17f174d37d 100644 --- a/dash/html/Canvas.py +++ b/dash/html/Canvas.py @@ -42,6 +42,10 @@ class Canvas(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -122,6 +126,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, height=Component.UNDEFINED, width=Component.UNDEFINED, @@ -151,6 +156,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", @@ -177,6 +183,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", diff --git a/dash/html/Caption.py b/dash/html/Caption.py index a181d11b56..70a31c8365 100644 --- a/dash/html/Caption.py +++ b/dash/html/Caption.py @@ -42,6 +42,10 @@ class Caption(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Center.py b/dash/html/Center.py index 4049d29008..0fb000eddc 100644 --- a/dash/html/Center.py +++ b/dash/html/Center.py @@ -42,6 +42,10 @@ class Center(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Cite.py b/dash/html/Cite.py index 76e3613661..11daf45b3d 100644 --- a/dash/html/Cite.py +++ b/dash/html/Cite.py @@ -42,6 +42,10 @@ class Cite(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Code.py b/dash/html/Code.py index d1adc6d3f0..715f937e41 100644 --- a/dash/html/Code.py +++ b/dash/html/Code.py @@ -42,6 +42,10 @@ class Code(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Col.py b/dash/html/Col.py index b1811a5c6f..da6e3a37fc 100644 --- a/dash/html/Col.py +++ b/dash/html/Col.py @@ -42,6 +42,10 @@ class Col(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -112,6 +116,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, span=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -140,6 +145,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -165,6 +171,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Colgroup.py b/dash/html/Colgroup.py index d1bfc7be7c..2d7a1df1bf 100644 --- a/dash/html/Colgroup.py +++ b/dash/html/Colgroup.py @@ -42,6 +42,10 @@ class Colgroup(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -112,6 +116,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, span=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -140,6 +145,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -165,6 +171,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Content.py b/dash/html/Content.py index 3a9d51ee21..402a755739 100644 --- a/dash/html/Content.py +++ b/dash/html/Content.py @@ -42,6 +42,10 @@ class Content(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Data.py b/dash/html/Data.py index 8d45187988..e43f943f02 100644 --- a/dash/html/Data.py +++ b/dash/html/Data.py @@ -42,6 +42,10 @@ class Data(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -114,6 +118,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, value=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -167,6 +173,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Datalist.py b/dash/html/Datalist.py index 52778f5906..881c978a22 100644 --- a/dash/html/Datalist.py +++ b/dash/html/Datalist.py @@ -42,6 +42,10 @@ class Datalist(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Dd.py b/dash/html/Dd.py index cbb1f5f5b5..76266bed19 100644 --- a/dash/html/Dd.py +++ b/dash/html/Dd.py @@ -42,6 +42,10 @@ class Dd(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Del.py b/dash/html/Del.py index e7012b3017..ccc5767283 100644 --- a/dash/html/Del.py +++ b/dash/html/Del.py @@ -48,6 +48,10 @@ class Del(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -116,6 +120,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, cite=Component.UNDEFINED, dateTime=Component.UNDEFINED, @@ -147,6 +152,7 @@ def __init__( "data-*", "dateTime", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -173,6 +179,7 @@ def __init__( "data-*", "dateTime", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Details.py b/dash/html/Details.py index caec992747..cfd5554ecf 100644 --- a/dash/html/Details.py +++ b/dash/html/Details.py @@ -42,6 +42,10 @@ class Details(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -115,6 +119,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, open=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -143,6 +148,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -168,6 +174,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Dfn.py b/dash/html/Dfn.py index ed365d05b4..89a6a2d3b3 100644 --- a/dash/html/Dfn.py +++ b/dash/html/Dfn.py @@ -42,6 +42,10 @@ class Dfn(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Dialog.py b/dash/html/Dialog.py index 4f3535a179..0e96f8b12d 100644 --- a/dash/html/Dialog.py +++ b/dash/html/Dialog.py @@ -42,6 +42,10 @@ class Dialog(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -115,6 +119,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, open=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -143,6 +148,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -168,6 +174,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Div.py b/dash/html/Div.py index 994e1a5e2f..4eda389ef0 100644 --- a/dash/html/Div.py +++ b/dash/html/Div.py @@ -42,6 +42,10 @@ class Div(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Dl.py b/dash/html/Dl.py index a619faca9c..e21f91c22b 100644 --- a/dash/html/Dl.py +++ b/dash/html/Dl.py @@ -42,6 +42,10 @@ class Dl(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Dt.py b/dash/html/Dt.py index 3302342f10..d7a5a5171b 100644 --- a/dash/html/Dt.py +++ b/dash/html/Dt.py @@ -42,6 +42,10 @@ class Dt(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Em.py b/dash/html/Em.py index 814506632a..179ed017ae 100644 --- a/dash/html/Em.py +++ b/dash/html/Em.py @@ -42,6 +42,10 @@ class Em(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Embed.py b/dash/html/Embed.py index 3eeb09b11b..2b2f9cfe86 100644 --- a/dash/html/Embed.py +++ b/dash/html/Embed.py @@ -42,6 +42,10 @@ class Embed(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -128,6 +132,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, height=Component.UNDEFINED, src=Component.UNDEFINED, @@ -159,6 +164,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", @@ -187,6 +193,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", diff --git a/dash/html/Fieldset.py b/dash/html/Fieldset.py index 062759d5a3..e64ca8fba3 100644 --- a/dash/html/Fieldset.py +++ b/dash/html/Fieldset.py @@ -42,6 +42,10 @@ class Fieldset(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): Indicates whether the user can interact with the element. @@ -120,6 +124,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, disabled=Component.UNDEFINED, form=Component.UNDEFINED, @@ -150,6 +155,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", @@ -177,6 +183,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", diff --git a/dash/html/Figcaption.py b/dash/html/Figcaption.py index a63ada1524..02ab23a60f 100644 --- a/dash/html/Figcaption.py +++ b/dash/html/Figcaption.py @@ -42,6 +42,10 @@ class Figcaption(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Figure.py b/dash/html/Figure.py index cf888a3541..88cca31b63 100644 --- a/dash/html/Figure.py +++ b/dash/html/Figure.py @@ -42,6 +42,10 @@ class Figure(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Font.py b/dash/html/Font.py index b91acb16b1..197c004714 100644 --- a/dash/html/Font.py +++ b/dash/html/Font.py @@ -42,6 +42,10 @@ class Font(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Footer.py b/dash/html/Footer.py index ae0889e02e..fae3778115 100644 --- a/dash/html/Footer.py +++ b/dash/html/Footer.py @@ -42,6 +42,10 @@ class Footer(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Form.py b/dash/html/Form.py index 5aa71513db..9f07c40240 100644 --- a/dash/html/Form.py +++ b/dash/html/Form.py @@ -56,6 +56,10 @@ class Form(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -144,6 +148,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accept=Component.UNDEFINED, acceptCharset=Component.UNDEFINED, @@ -184,6 +189,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "encType", "hidden", @@ -217,6 +223,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "encType", "hidden", diff --git a/dash/html/Frame.py b/dash/html/Frame.py index 02f5d91ed3..9b04c54f8d 100644 --- a/dash/html/Frame.py +++ b/dash/html/Frame.py @@ -42,6 +42,10 @@ class Frame(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Frameset.py b/dash/html/Frameset.py index bd82c28b2e..a2ffa33d47 100644 --- a/dash/html/Frameset.py +++ b/dash/html/Frameset.py @@ -42,6 +42,10 @@ class Frameset(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/H1.py b/dash/html/H1.py index 1044cd5b5e..ed49dddaba 100644 --- a/dash/html/H1.py +++ b/dash/html/H1.py @@ -42,6 +42,10 @@ class H1(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/H2.py b/dash/html/H2.py index b564c860b2..9128658f98 100644 --- a/dash/html/H2.py +++ b/dash/html/H2.py @@ -42,6 +42,10 @@ class H2(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/H3.py b/dash/html/H3.py index fb8e216b45..c2adaed0bd 100644 --- a/dash/html/H3.py +++ b/dash/html/H3.py @@ -42,6 +42,10 @@ class H3(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/H4.py b/dash/html/H4.py index b47ddbc1fd..21d8a9ef58 100644 --- a/dash/html/H4.py +++ b/dash/html/H4.py @@ -42,6 +42,10 @@ class H4(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/H5.py b/dash/html/H5.py index f7bb2b49ca..cb1a1f4708 100644 --- a/dash/html/H5.py +++ b/dash/html/H5.py @@ -42,6 +42,10 @@ class H5(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/H6.py b/dash/html/H6.py index 03c6638350..673b29e4d1 100644 --- a/dash/html/H6.py +++ b/dash/html/H6.py @@ -42,6 +42,10 @@ class H6(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Header.py b/dash/html/Header.py index 7342dd532a..0b174cbb29 100644 --- a/dash/html/Header.py +++ b/dash/html/Header.py @@ -42,6 +42,10 @@ class Header(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Hgroup.py b/dash/html/Hgroup.py index 00ac89c6aa..588a5a5b2b 100644 --- a/dash/html/Hgroup.py +++ b/dash/html/Hgroup.py @@ -42,6 +42,10 @@ class Hgroup(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Hr.py b/dash/html/Hr.py index 8bbb0490fb..096631b306 100644 --- a/dash/html/Hr.py +++ b/dash/html/Hr.py @@ -42,6 +42,10 @@ class Hr(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/I.py b/dash/html/I.py index 4aeb5e6f03..02cf8d3fd7 100644 --- a/dash/html/I.py +++ b/dash/html/I.py @@ -42,6 +42,10 @@ class I(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Iframe.py b/dash/html/Iframe.py index 77cfe3c2af..290a175457 100644 --- a/dash/html/Iframe.py +++ b/dash/html/Iframe.py @@ -45,6 +45,10 @@ class Iframe(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -141,6 +145,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, allow=Component.UNDEFINED, height=Component.UNDEFINED, @@ -177,6 +182,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", @@ -209,6 +215,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", diff --git a/dash/html/Img.py b/dash/html/Img.py index 76417f16f1..557ceacd72 100644 --- a/dash/html/Img.py +++ b/dash/html/Img.py @@ -48,6 +48,10 @@ class Img(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -141,6 +145,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, alt=Component.UNDEFINED, crossOrigin=Component.UNDEFINED, @@ -179,6 +184,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", @@ -212,6 +218,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", diff --git a/dash/html/Ins.py b/dash/html/Ins.py index df1b0dc7e8..24fb92b96f 100644 --- a/dash/html/Ins.py +++ b/dash/html/Ins.py @@ -48,6 +48,10 @@ class Ins(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -116,6 +120,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, cite=Component.UNDEFINED, dateTime=Component.UNDEFINED, @@ -147,6 +152,7 @@ def __init__( "data-*", "dateTime", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -173,6 +179,7 @@ def __init__( "data-*", "dateTime", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Kbd.py b/dash/html/Kbd.py index 7e473c5fb0..46dbb25b85 100644 --- a/dash/html/Kbd.py +++ b/dash/html/Kbd.py @@ -42,6 +42,10 @@ class Kbd(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Keygen.py b/dash/html/Keygen.py index 15401e2d15..8ceee4e7ca 100644 --- a/dash/html/Keygen.py +++ b/dash/html/Keygen.py @@ -53,6 +53,10 @@ class Keygen(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): Indicates whether the user can interact with the element. @@ -134,6 +138,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, autoFocus=Component.UNDEFINED, challenge=Component.UNDEFINED, @@ -169,6 +174,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", @@ -199,6 +205,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", diff --git a/dash/html/Label.py b/dash/html/Label.py index 28193b1923..ff0141c779 100644 --- a/dash/html/Label.py +++ b/dash/html/Label.py @@ -42,6 +42,10 @@ class Label(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -116,6 +120,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, htmlFor=Component.UNDEFINED, form=Component.UNDEFINED, @@ -145,6 +150,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", @@ -171,6 +177,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", diff --git a/dash/html/Legend.py b/dash/html/Legend.py index d1d45a1257..e3af2fd89b 100644 --- a/dash/html/Legend.py +++ b/dash/html/Legend.py @@ -42,6 +42,10 @@ class Legend(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Li.py b/dash/html/Li.py index fb2a515f85..14230593c2 100644 --- a/dash/html/Li.py +++ b/dash/html/Li.py @@ -42,6 +42,10 @@ class Li(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -114,6 +118,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, value=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -167,6 +173,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Link.py b/dash/html/Link.py index 4251b933f9..99d7b246b1 100644 --- a/dash/html/Link.py +++ b/dash/html/Link.py @@ -45,6 +45,10 @@ class Link(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -139,6 +143,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, crossOrigin=Component.UNDEFINED, href=Component.UNDEFINED, @@ -176,6 +181,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "href", @@ -209,6 +215,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "href", diff --git a/dash/html/Main.py b/dash/html/Main.py index 3bf2b1d5c8..a4ffbcd22c 100644 --- a/dash/html/Main.py +++ b/dash/html/Main.py @@ -42,6 +42,10 @@ class Main(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/MapEl.py b/dash/html/MapEl.py index c1f081b0ae..1fff87e76f 100644 --- a/dash/html/MapEl.py +++ b/dash/html/MapEl.py @@ -42,6 +42,10 @@ class MapEl(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -114,6 +118,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, name=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -167,6 +173,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Mark.py b/dash/html/Mark.py index 7f10528a69..f37f1a163a 100644 --- a/dash/html/Mark.py +++ b/dash/html/Mark.py @@ -42,6 +42,10 @@ class Mark(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Marquee.py b/dash/html/Marquee.py index 5e2e63de59..aa77e53b15 100644 --- a/dash/html/Marquee.py +++ b/dash/html/Marquee.py @@ -46,6 +46,10 @@ class Marquee(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -118,6 +122,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, loop=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -146,6 +151,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -171,6 +177,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Meta.py b/dash/html/Meta.py index 53e4df4dc8..bc0784a5b8 100644 --- a/dash/html/Meta.py +++ b/dash/html/Meta.py @@ -54,6 +54,10 @@ class Meta(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -129,6 +133,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, charSet=Component.UNDEFINED, content=Component.UNDEFINED, @@ -162,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "httpEquiv", @@ -190,6 +196,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "httpEquiv", diff --git a/dash/html/Meter.py b/dash/html/Meter.py index f791153bb0..178385bf79 100644 --- a/dash/html/Meter.py +++ b/dash/html/Meter.py @@ -42,6 +42,10 @@ class Meter(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -132,6 +136,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, form=Component.UNDEFINED, high=Component.UNDEFINED, @@ -166,6 +171,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", @@ -197,6 +203,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", diff --git a/dash/html/Nav.py b/dash/html/Nav.py index f53dc2ced2..e1b4d43859 100644 --- a/dash/html/Nav.py +++ b/dash/html/Nav.py @@ -42,6 +42,10 @@ class Nav(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Nobr.py b/dash/html/Nobr.py index 3920be9e56..39cc6b598a 100644 --- a/dash/html/Nobr.py +++ b/dash/html/Nobr.py @@ -42,6 +42,10 @@ class Nobr(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Noscript.py b/dash/html/Noscript.py index 1e2f7d12be..afcd9e0ee0 100644 --- a/dash/html/Noscript.py +++ b/dash/html/Noscript.py @@ -42,6 +42,10 @@ class Noscript(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/ObjectEl.py b/dash/html/ObjectEl.py index bf9edf60b2..80636979a6 100644 --- a/dash/html/ObjectEl.py +++ b/dash/html/ObjectEl.py @@ -45,6 +45,10 @@ class ObjectEl(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -137,6 +141,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, data=Component.UNDEFINED, form=Component.UNDEFINED, @@ -172,6 +177,7 @@ def __init__( "data", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "height", @@ -203,6 +209,7 @@ def __init__( "data", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "height", diff --git a/dash/html/Ol.py b/dash/html/Ol.py index 8d3dd926ca..1ca02f792f 100644 --- a/dash/html/Ol.py +++ b/dash/html/Ol.py @@ -42,6 +42,10 @@ class Ol(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -120,6 +124,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, reversed=Component.UNDEFINED, start=Component.UNDEFINED, @@ -150,6 +155,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -177,6 +183,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Optgroup.py b/dash/html/Optgroup.py index ae64511034..c7a4ca17a1 100644 --- a/dash/html/Optgroup.py +++ b/dash/html/Optgroup.py @@ -42,6 +42,10 @@ class Optgroup(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): Indicates whether the user can interact with the element. @@ -116,6 +120,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, disabled=Component.UNDEFINED, label=Component.UNDEFINED, @@ -145,6 +150,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "hidden", @@ -171,6 +177,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "hidden", diff --git a/dash/html/Option.py b/dash/html/Option.py index 09681d7426..c4b6268a73 100644 --- a/dash/html/Option.py +++ b/dash/html/Option.py @@ -42,6 +42,10 @@ class Option(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): Indicates whether the user can interact with the element. @@ -123,6 +127,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, disabled=Component.UNDEFINED, label=Component.UNDEFINED, @@ -154,6 +159,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "hidden", @@ -182,6 +188,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "hidden", diff --git a/dash/html/Output.py b/dash/html/Output.py index baa61f8f3b..7e4ad95957 100644 --- a/dash/html/Output.py +++ b/dash/html/Output.py @@ -47,6 +47,10 @@ class Output(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -125,6 +129,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, htmlFor=Component.UNDEFINED, form=Component.UNDEFINED, @@ -155,6 +160,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", @@ -182,6 +188,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", diff --git a/dash/html/P.py b/dash/html/P.py index 77d1a70346..f0710ab389 100644 --- a/dash/html/P.py +++ b/dash/html/P.py @@ -42,6 +42,10 @@ class P(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Param.py b/dash/html/Param.py index 4372b327a7..1d5908d4ae 100644 --- a/dash/html/Param.py +++ b/dash/html/Param.py @@ -42,6 +42,10 @@ class Param(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -118,6 +122,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, name=Component.UNDEFINED, value=Component.UNDEFINED, @@ -147,6 +152,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -173,6 +179,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Picture.py b/dash/html/Picture.py index 305819aae5..b2dc5e7b18 100644 --- a/dash/html/Picture.py +++ b/dash/html/Picture.py @@ -42,6 +42,10 @@ class Picture(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Plaintext.py b/dash/html/Plaintext.py index a5b8857ca4..ced25402d0 100644 --- a/dash/html/Plaintext.py +++ b/dash/html/Plaintext.py @@ -48,6 +48,10 @@ class Plaintext(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -116,6 +120,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -143,6 +148,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -167,6 +173,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Pre.py b/dash/html/Pre.py index 06bc42331f..8ef07abaa8 100644 --- a/dash/html/Pre.py +++ b/dash/html/Pre.py @@ -42,6 +42,10 @@ class Pre(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Progress.py b/dash/html/Progress.py index e6735f0ddf..e071493f13 100644 --- a/dash/html/Progress.py +++ b/dash/html/Progress.py @@ -42,6 +42,10 @@ class Progress(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -120,6 +124,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, form=Component.UNDEFINED, max=Component.UNDEFINED, @@ -150,6 +155,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", @@ -177,6 +183,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "form", "hidden", diff --git a/dash/html/Q.py b/dash/html/Q.py index 6053938ff0..740387a8d9 100644 --- a/dash/html/Q.py +++ b/dash/html/Q.py @@ -45,6 +45,10 @@ class Q(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -113,6 +117,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, cite=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -167,6 +173,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Rb.py b/dash/html/Rb.py index 7f8bb0c285..042a5284ba 100644 --- a/dash/html/Rb.py +++ b/dash/html/Rb.py @@ -42,6 +42,10 @@ class Rb(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Rp.py b/dash/html/Rp.py index c35baec54a..5979f4cb7a 100644 --- a/dash/html/Rp.py +++ b/dash/html/Rp.py @@ -42,6 +42,10 @@ class Rp(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Rt.py b/dash/html/Rt.py index 4d15e393ef..6864aa2059 100644 --- a/dash/html/Rt.py +++ b/dash/html/Rt.py @@ -42,6 +42,10 @@ class Rt(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Rtc.py b/dash/html/Rtc.py index a7a7a191fe..a5a64c6506 100644 --- a/dash/html/Rtc.py +++ b/dash/html/Rtc.py @@ -42,6 +42,10 @@ class Rtc(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Ruby.py b/dash/html/Ruby.py index fcd5b8ee11..8fde573345 100644 --- a/dash/html/Ruby.py +++ b/dash/html/Ruby.py @@ -42,6 +42,10 @@ class Ruby(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/S.py b/dash/html/S.py index 6f5efcbd4c..1db2315067 100644 --- a/dash/html/S.py +++ b/dash/html/S.py @@ -42,6 +42,10 @@ class S(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Samp.py b/dash/html/Samp.py index f98950b8de..a55e015d24 100644 --- a/dash/html/Samp.py +++ b/dash/html/Samp.py @@ -42,6 +42,10 @@ class Samp(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Script.py b/dash/html/Script.py index a8505b9215..64ce2f8f1c 100644 --- a/dash/html/Script.py +++ b/dash/html/Script.py @@ -60,6 +60,10 @@ class Script(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -141,6 +145,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, charSet=Component.UNDEFINED, crossOrigin=Component.UNDEFINED, @@ -179,6 +184,7 @@ def __init__( "data-*", "defer", "dir", + "disable_n_clicks", "draggable", "hidden", "integrity", @@ -211,6 +217,7 @@ def __init__( "data-*", "defer", "dir", + "disable_n_clicks", "draggable", "hidden", "integrity", diff --git a/dash/html/Section.py b/dash/html/Section.py index 34fa0005a1..7e13a0c592 100644 --- a/dash/html/Section.py +++ b/dash/html/Section.py @@ -42,6 +42,10 @@ class Section(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Select.py b/dash/html/Select.py index e2bbdc0d71..189612757c 100644 --- a/dash/html/Select.py +++ b/dash/html/Select.py @@ -49,6 +49,10 @@ class Select(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): Indicates whether the user can interact with the element. @@ -139,6 +143,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, autoComplete=Component.UNDEFINED, autoFocus=Component.UNDEFINED, @@ -176,6 +181,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", @@ -208,6 +214,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", diff --git a/dash/html/Shadow.py b/dash/html/Shadow.py index de9cbf3721..4f9cb18c4d 100644 --- a/dash/html/Shadow.py +++ b/dash/html/Shadow.py @@ -47,6 +47,10 @@ class Shadow(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -115,6 +119,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -166,6 +172,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Slot.py b/dash/html/Slot.py index eca8750791..3f68cfa26a 100644 --- a/dash/html/Slot.py +++ b/dash/html/Slot.py @@ -42,6 +42,10 @@ class Slot(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Small.py b/dash/html/Small.py index fc6546e56e..a2afee3aa9 100644 --- a/dash/html/Small.py +++ b/dash/html/Small.py @@ -42,6 +42,10 @@ class Small(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Source.py b/dash/html/Source.py index d561913e1a..ad7c7777be 100644 --- a/dash/html/Source.py +++ b/dash/html/Source.py @@ -42,6 +42,10 @@ class Source(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -125,6 +129,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, media=Component.UNDEFINED, sizes=Component.UNDEFINED, @@ -157,6 +162,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -186,6 +192,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Spacer.py b/dash/html/Spacer.py index 92a46f53ef..ed96a41549 100644 --- a/dash/html/Spacer.py +++ b/dash/html/Spacer.py @@ -46,6 +46,10 @@ class Spacer(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -114,6 +118,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -141,6 +146,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -165,6 +171,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Span.py b/dash/html/Span.py index 4010935992..300f5dd9c4 100644 --- a/dash/html/Span.py +++ b/dash/html/Span.py @@ -42,6 +42,10 @@ class Span(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Strike.py b/dash/html/Strike.py index 8ee1835fc8..49fb7dd924 100644 --- a/dash/html/Strike.py +++ b/dash/html/Strike.py @@ -42,6 +42,10 @@ class Strike(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Strong.py b/dash/html/Strong.py index 94b48e2541..182d5ab472 100644 --- a/dash/html/Strong.py +++ b/dash/html/Strong.py @@ -42,6 +42,10 @@ class Strong(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Sub.py b/dash/html/Sub.py index da97fc238f..5b8dee86c0 100644 --- a/dash/html/Sub.py +++ b/dash/html/Sub.py @@ -42,6 +42,10 @@ class Sub(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Summary.py b/dash/html/Summary.py index 08cd4b839c..47a6a9c921 100644 --- a/dash/html/Summary.py +++ b/dash/html/Summary.py @@ -42,6 +42,10 @@ class Summary(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Sup.py b/dash/html/Sup.py index 958514cad6..6ae4050381 100644 --- a/dash/html/Sup.py +++ b/dash/html/Sup.py @@ -42,6 +42,10 @@ class Sup(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Table.py b/dash/html/Table.py index 15c22c9a69..e7c05d8077 100644 --- a/dash/html/Table.py +++ b/dash/html/Table.py @@ -42,6 +42,10 @@ class Table(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Tbody.py b/dash/html/Tbody.py index 970b20567e..6435a9d726 100644 --- a/dash/html/Tbody.py +++ b/dash/html/Tbody.py @@ -42,6 +42,10 @@ class Tbody(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Td.py b/dash/html/Td.py index 76e2860f6d..5e0f99c4a3 100644 --- a/dash/html/Td.py +++ b/dash/html/Td.py @@ -46,6 +46,10 @@ class Td(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -120,6 +124,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, colSpan=Component.UNDEFINED, headers=Component.UNDEFINED, @@ -151,6 +156,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "headers", "hidden", @@ -178,6 +184,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "headers", "hidden", diff --git a/dash/html/Template.py b/dash/html/Template.py index e92383a308..6b2d1c372d 100644 --- a/dash/html/Template.py +++ b/dash/html/Template.py @@ -42,6 +42,10 @@ class Template(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Textarea.py b/dash/html/Textarea.py index 687416a36c..1727431f71 100644 --- a/dash/html/Textarea.py +++ b/dash/html/Textarea.py @@ -52,6 +52,10 @@ class Textarea(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - disabled (a value equal to: 'disabled', 'DISABLED' | boolean; optional): Indicates whether the user can interact with the element. @@ -158,6 +162,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, autoComplete=Component.UNDEFINED, autoFocus=Component.UNDEFINED, @@ -202,6 +207,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", @@ -240,6 +246,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "disabled", "draggable", "form", diff --git a/dash/html/Tfoot.py b/dash/html/Tfoot.py index 9dbd695c98..364060a478 100644 --- a/dash/html/Tfoot.py +++ b/dash/html/Tfoot.py @@ -42,6 +42,10 @@ class Tfoot(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Th.py b/dash/html/Th.py index 2dfbdf3c00..ec05d489cf 100644 --- a/dash/html/Th.py +++ b/dash/html/Th.py @@ -46,6 +46,10 @@ class Th(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -124,6 +128,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, colSpan=Component.UNDEFINED, headers=Component.UNDEFINED, @@ -156,6 +161,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "headers", "hidden", @@ -184,6 +190,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "headers", "hidden", diff --git a/dash/html/Thead.py b/dash/html/Thead.py index 927cabb346..b2ea7646f8 100644 --- a/dash/html/Thead.py +++ b/dash/html/Thead.py @@ -42,6 +42,10 @@ class Thead(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Time.py b/dash/html/Time.py index ef4639f0ed..cdf81e839d 100644 --- a/dash/html/Time.py +++ b/dash/html/Time.py @@ -45,6 +45,10 @@ class Time(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -113,6 +117,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, dateTime=Component.UNDEFINED, accessKey=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "data-*", "dateTime", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -167,6 +173,7 @@ def __init__( "data-*", "dateTime", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Title.py b/dash/html/Title.py index 99dc29a528..d345b3fc1e 100644 --- a/dash/html/Title.py +++ b/dash/html/Title.py @@ -47,6 +47,10 @@ class Title(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -115,6 +119,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -142,6 +147,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -166,6 +172,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Tr.py b/dash/html/Tr.py index 7f1b8ad8b0..3b594466d2 100644 --- a/dash/html/Tr.py +++ b/dash/html/Tr.py @@ -42,6 +42,10 @@ class Tr(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Track.py b/dash/html/Track.py index 20404254d9..a30e6f2d53 100644 --- a/dash/html/Track.py +++ b/dash/html/Track.py @@ -46,6 +46,10 @@ class Track(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -125,6 +129,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, default=Component.UNDEFINED, kind=Component.UNDEFINED, @@ -158,6 +163,7 @@ def __init__( "data-*", "default", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -187,6 +193,7 @@ def __init__( "data-*", "default", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/U.py b/dash/html/U.py index 3f4efb3af7..88dfb3f2f4 100644 --- a/dash/html/U.py +++ b/dash/html/U.py @@ -42,6 +42,10 @@ class U(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Ul.py b/dash/html/Ul.py index ff106c44a7..b0133a6399 100644 --- a/dash/html/Ul.py +++ b/dash/html/Ul.py @@ -42,6 +42,10 @@ class Ul(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Var.py b/dash/html/Var.py index e28de23bc9..8f02178c62 100644 --- a/dash/html/Var.py +++ b/dash/html/Var.py @@ -42,6 +42,10 @@ class Var(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Video.py b/dash/html/Video.py index 6e1de8aed6..b9fafcdedc 100644 --- a/dash/html/Video.py +++ b/dash/html/Video.py @@ -52,6 +52,10 @@ class Video(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -151,6 +155,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, autoPlay=Component.UNDEFINED, controls=Component.UNDEFINED, @@ -191,6 +196,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", @@ -225,6 +231,7 @@ def __init__( "crossOrigin", "data-*", "dir", + "disable_n_clicks", "draggable", "height", "hidden", diff --git a/dash/html/Wbr.py b/dash/html/Wbr.py index f2ceb0e1c3..f21ae6d7eb 100644 --- a/dash/html/Wbr.py +++ b/dash/html/Wbr.py @@ -42,6 +42,10 @@ class Wbr(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/Xmp.py b/dash/html/Xmp.py index 1f64c9cc9a..c26d8479df 100644 --- a/dash/html/Xmp.py +++ b/dash/html/Xmp.py @@ -42,6 +42,10 @@ class Xmp(Component): Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left). + - disable_n_clicks (boolean; optional): + When True, this will disable the n_clicks prop. Use this to + remove event listeners that may interfere with screen readers. + - draggable (string; optional): Defines whether the element can be dragged. @@ -110,6 +114,7 @@ def __init__( id=Component.UNDEFINED, n_clicks=Component.UNDEFINED, n_clicks_timestamp=Component.UNDEFINED, + disable_n_clicks=Component.UNDEFINED, key=Component.UNDEFINED, accessKey=Component.UNDEFINED, className=Component.UNDEFINED, @@ -137,6 +142,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", @@ -161,6 +167,7 @@ def __init__( "contextMenu", "data-*", "dir", + "disable_n_clicks", "draggable", "hidden", "key", diff --git a/dash/html/dash_html_components.min.js b/dash/html/dash_html_components.min.js index d2769b8ac4..c695625b9c 100644 --- a/dash/html/dash_html_components.min.js +++ b/dash/html/dash_html_components.min.js @@ -1,2 +1,2 @@ -!function(){"use strict";var n={n:function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},d:function(t,e){for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o:function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r:function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})}},t={};n.r(t),n.d(t,{A:function(){return p},Abbr:function(){return m},Acronym:function(){return k},Address:function(){return O},Area:function(){return j},Article:function(){return T},Aside:function(){return I},Audio:function(){return M},B:function(){return S},Base:function(){return F},Basefont:function(){return R},Bdi:function(){return z},Bdo:function(){return W},Big:function(){return J},Blink:function(){return nn},Blockquote:function(){return sn},Br:function(){return on},Button:function(){return gn},Canvas:function(){return _n},Caption:function(){return bn},Center:function(){return hn},Cite:function(){return vn},Code:function(){return Dn},Col:function(){return wn},Colgroup:function(){return Nn},Content:function(){return Hn},Data:function(){return An},Datalist:function(){return Un},Dd:function(){return qn},Del:function(){return Qn},Details:function(){return Xn},Dfn:function(){return Zn},Dialog:function(){return tt},Div:function(){return st},Dl:function(){return ot},Dt:function(){return gt},Em:function(){return _t},Embed:function(){return bt},Fieldset:function(){return ht},Figcaption:function(){return vt},Figure:function(){return Dt},Font:function(){return wt},Footer:function(){return Nt},Form:function(){return Ht},Frame:function(){return At},Frameset:function(){return Ut},H1:function(){return qt},H2:function(){return Qt},H3:function(){return Xt},H4:function(){return Zt},H5:function(){return te},H6:function(){return se},Header:function(){return oe},Hgroup:function(){return ge},Hr:function(){return _e},I:function(){return be},Iframe:function(){return he},Img:function(){return ve},Ins:function(){return De},Kbd:function(){return we},Keygen:function(){return Ne},Label:function(){return He},Legend:function(){return Ae},Li:function(){return Ue},Link:function(){return qe},Main:function(){return Qe},MapEl:function(){return Xe},Mark:function(){return Ze},Marquee:function(){return ti},Meta:function(){return si},Meter:function(){return oi},Nav:function(){return gi},Nobr:function(){return _i},Noscript:function(){return bi},ObjectEl:function(){return hi},Ol:function(){return vi},Optgroup:function(){return Di},Option:function(){return wi},Output:function(){return Ni},P:function(){return Hi},Param:function(){return Ai},Picture:function(){return Ui},Plaintext:function(){return qi},Pre:function(){return Qi},Progress:function(){return Xi},Q:function(){return Zi},Rb:function(){return ts},Rp:function(){return ss},Rt:function(){return os},Rtc:function(){return gs},Ruby:function(){return _s},S:function(){return bs},Samp:function(){return hs},Script:function(){return vs},Section:function(){return Ds},Select:function(){return ws},Shadow:function(){return Ns},Slot:function(){return Hs},Small:function(){return As},Source:function(){return Us},Spacer:function(){return qs},Span:function(){return Qs},Strike:function(){return Xs},Strong:function(){return Zs},Sub:function(){return tr},Summary:function(){return sr},Sup:function(){return or},Table:function(){return gr},Tbody:function(){return _r},Td:function(){return br},Template:function(){return hr},Textarea:function(){return vr},Tfoot:function(){return Dr},Th:function(){return wr},Thead:function(){return Nr},Time:function(){return Hr},Title:function(){return Ar},Tr:function(){return Ur},Track:function(){return qr},U:function(){return Qr},Ul:function(){return Xr},Var:function(){return Zr},Video:function(){return ta},Wbr:function(){return sa},Xmp:function(){return oa}});var e=window.React,i=n.n(e),s=window.PropTypes,r=n.n(s);function a(n){return null!=n&&"object"==typeof n&&!0===n["@@functional/placeholder"]}function o(n){return function t(e){return 0===arguments.length||a(e)?t:n.apply(this,arguments)}}function c(n){return function t(e,i){switch(arguments.length){case 0:return t;case 1:return a(e)?t:o((function(t){return n(e,t)}));default:return a(e)&&a(i)?t:a(e)?o((function(t){return n(t,i)})):a(i)?o((function(t){return n(e,t)})):n(e,i)}}}Array.isArray,"undefined"!=typeof Symbol&&Symbol.iterator;Object.prototype.toString;Object.keys,Number.isInteger,"function"==typeof Object.is&&Object.is;Date.prototype.toISOString,"function"==typeof Object.assign&&Object.assign;var l=c((function(n,t){for(var e={},i={},s=0,r=n.length;s true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","import _isArrayLike from \"./_isArrayLike.js\";\nimport _xwrap from \"./_xwrap.js\";\nimport bind from \"../bind.js\";\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n idx += 1;\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n step = iter.next();\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nexport default function _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}","import _has from \"./_has.js\";\nvar toString = Object.prototype.toString;\n\nvar _isArguments =\n/*#__PURE__*/\nfunction () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\nimport _isArguments from \"./internal/_isArguments.js\"; // cover IE < 9 keys issues\n\nvar hasEnumBug = !\n/*#__PURE__*/\n{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug\n\nvar hasArgsEnumBug =\n/*#__PURE__*/\nfunction () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n};\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values, R.toPairs\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\n\n\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?\n/*#__PURE__*/\n_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) :\n/*#__PURE__*/\n_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n\n var prop, nIdx;\n var ks = [];\n\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n\n nIdx -= 1;\n }\n }\n\n return ks;\n});\nexport default keys;","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","/**\n * Polyfill from .\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nexport default _toISOString;","import _has from \"./_has.js\"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n\n while (idx < length) {\n var source = arguments[idx];\n\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n\n idx += 1;\n }\n\n return output;\n}\n\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _curry3 from \"./internal/_curry3.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _has from \"./internal/_has.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport _modify from \"./internal/_modify.js\";\n/**\n * Creates a shallow clone of the passed object by applying an `fn` function\n * to the value at the given path.\n *\n * The function will not be invoked, and the object will not change\n * if its corresponding path does not exist in the object.\n * All non-primitive properties are copied to the new object by reference.\n *\n * @func\n * @memberOf R\n * @since v0.28.0\n * @category Object\n * @sig [Idx] -> (v -> v) -> {k: v} -> {k: v}\n * @param {Array} path The path to be modified.\n * @param {Function} fn The function to apply to the path.\n * @param {Object} object The object to be transformed.\n * @return {Object} The transformed object.\n * @example\n *\n * const person = {name: 'James', address: { zipCode: '90216' }};\n * R.modifyPath(['address', 'zipCode'], R.reverse, person); //=> {name: 'James', address: { zipCode: '61209' }}\n *\n * // Can handle arrays too\n * const person = {name: 'James', addresses: [{ zipCode: '90216' }]};\n * R.modifyPath(['addresses', 0, 'zipCode'], R.reverse, person); //=> {name: 'James', addresses: [{ zipCode: '61209' }]}\n */\n\nvar modifyPath =\n/*#__PURE__*/\n_curry3(function modifyPath(path, fn, object) {\n if (!_isObject(object) && !_isArray(object) || path.length === 0) {\n return object;\n }\n\n var idx = path[0];\n\n if (!_has(idx, object)) {\n return object;\n }\n\n if (path.length === 1) {\n return _modify(idx, fn, object);\n }\n\n var val = modifyPath(Array.prototype.slice.call(path, 1), fn, object[idx]);\n\n if (val === object[idx]) {\n return object;\n }\n\n return _assoc(idx, val, object);\n});\n\nexport default modifyPath;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\n\nvar omit =\n/*#__PURE__*/\n_curry2(function omit(names, obj) {\n var result = {};\n var index = {};\n var idx = 0;\n var len = names.length;\n\n while (idx < len) {\n index[names[idx]] = 1;\n idx += 1;\n }\n\n for (var prop in obj) {\n if (!index.hasOwnProperty(prop)) {\n result[prop] = obj[prop];\n }\n }\n\n return result;\n});\n\nexport default omit;","import _curry1 from \"./internal/_curry1.js\";\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\n\nvar trim = !hasProtoTrim ||\n/*#__PURE__*/\nws.trim() || !\n/*#__PURE__*/\nzeroWidth.trim() ?\n/*#__PURE__*/\n_curry1(function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n}) :\n/*#__PURE__*/\n_curry1(function trim(str) {\n return str.trim();\n});\nexport default trim;","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * A is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a\n */\nconst A = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nA.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nA.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates that the hyperlink is to be used for downloading a resource.\n */\n 'download': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies the language of the linked resource.\n */\n 'hrefLang': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Specifies the relationship of the target object to the link object.\n */\n 'rel': PropTypes.string,\n\n /**\n *\n */\n 'shape': PropTypes.string,\n\n /**\n * Specifies where to open the linked document (in the case of an element) or where to display the response received (in the case of a
element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a
element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default A;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Abbr is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr\n */\nconst Abbr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nAbbr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAbbr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Abbr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Acronym is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/acronym\n */\nconst Acronym = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nAcronym.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAcronym.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Acronym;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Address is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address\n */\nconst Address = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nAddress.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAddress.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a
element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Address;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Area is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area\n */\nconst Area = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nArea.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nArea.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Alternative text in case an image can't be displayed.\n */\n 'alt': PropTypes.string,\n\n /**\n * A set of values specifying the coordinates of the hot-spot region.\n */\n 'coords': PropTypes.string,\n\n /**\n * Indicates that the hyperlink is to be used for downloading a resource.\n */\n 'download': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies the language of the linked resource.\n */\n 'hrefLang': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Specifies the relationship of the target object to the link object.\n */\n 'rel': PropTypes.string,\n\n /**\n *\n */\n 'shape': PropTypes.string,\n\n /**\n * Specifies where to open the linked document (in the case of an element) or where to display the response received (in the case of a element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Area;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Article is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article\n */\nconst Article = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nArticle.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nArticle.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a
element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Article;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Aside is a wrapper for the \n );\n};\n\nAside.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAside.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Aside;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Audio is a wrapper for the \n );\n};\n\nAudio.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAudio.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The audio or video should play as soon as possible.\n */\n 'autoPlay': PropTypes.oneOfType([\n PropTypes.oneOf(['autoPlay', 'autoplay', 'AUTOPLAY']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the browser should show playback controls to the user.\n */\n 'controls': PropTypes.oneOfType([\n PropTypes.oneOf(['controls', 'CONTROLS']),\n PropTypes.bool\n ]),\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Indicates whether the media should start playing from the start when it's finished.\n */\n 'loop': PropTypes.oneOfType([\n PropTypes.oneOf(['loop', 'LOOP']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the audio will be initially silenced on page load.\n */\n 'muted': PropTypes.oneOfType([\n PropTypes.oneOf(['muted', 'MUTED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the whole resource, parts of it or nothing should be preloaded.\n */\n 'preload': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Audio;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * B is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b\n */\nconst B = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nB.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nB.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default B;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Base is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base\n */\nconst Base = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nBase.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBase.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies where to open the linked document (in the case of an element) or where to display the response received (in the case of a element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Base;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Basefont is a wrapper for the HTML5 element.\n *\n * OBSOLETE: is included for completeness, but should be avoided\n * as it is only supported by Internet Explorer.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/basefont\n */\nconst Basefont = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nBasefont.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBasefont.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Basefont;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Bdi is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi\n */\nconst Bdi = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nBdi.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBdi.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Bdi;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Bdo is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo\n */\nconst Bdo = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nBdo.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBdo.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Bdo;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Big is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/big\n */\nconst Big = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nBig.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBig.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Big;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Blink is a wrapper for the HTML5 element.\n *\n * OBSOLETE: is included for completeness, but should be avoided\n * as it is not supported by any modern browsers.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blink\n */\nconst Blink = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nBlink.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBlink.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Blink;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Blockquote is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote\n */\nconst Blockquote = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nBlockquote.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBlockquote.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Blockquote;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Br is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br\n */\nconst Br = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nBr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Br;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Button is a wrapper for the \n );\n};\n\nButton.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nButton.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates the action of the element, overriding the action defined in the .\n */\n 'formAction': PropTypes.string,\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this attribute sets the encoding type to use during form submission. If this attribute is specified, it overrides the enctype attribute of the button's form owner.\n */\n 'formEncType': PropTypes.string,\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this attribute sets the submission method to use during form submission (GET, POST, etc.). If this attribute is specified, it overrides the method attribute of the button's form owner.\n */\n 'formMethod': PropTypes.string,\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the button's form owner.\n */\n 'formNoValidate': PropTypes.oneOfType([\n PropTypes.oneOf(['formNoValidate', 'formnovalidate', 'FORMNOVALIDATE']),\n PropTypes.bool\n ]),\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this attribute specifies the browsing context (for example, tab, window, or inline frame) in which to display the response that is received after submitting the form. If this attribute is specified, it overrides the target attribute of the button's form owner.\n */\n 'formTarget': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Button;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Canvas is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas\n */\nconst Canvas = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nCanvas.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCanvas.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as
, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as
, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Canvas;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Caption is a wrapper for the
\n );\n};\n\nCaption.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCaption.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Caption;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Center is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center\n */\nconst Center = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nCenter.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCenter.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Center;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Cite is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite\n */\nconst Cite = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nCite.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCite.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Cite;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Code is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code\n */\nconst Code = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nCode.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCode.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Code;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Col is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col\n */\nconst Col = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nCol.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCol.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n *\n */\n 'span': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Col;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Colgroup is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup\n */\nconst Colgroup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nColgroup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nColgroup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n *\n */\n 'span': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Colgroup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Content is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/content\n */\nconst Content = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nContent.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nContent.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Content;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Data is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data\n */\nconst Data = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nData.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nData.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Data;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Datalist is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist\n */\nconst Datalist = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nDatalist.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDatalist.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Datalist;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dd is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd\n */\nconst Dd = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nDd.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDd.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a
element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dd;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Del is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del\n */\nconst Del = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nDel.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDel.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Indicates the date and time associated with the element.\n */\n 'dateTime': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Del;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Details is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details\n */\nconst Details = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nDetails.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDetails.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the contents are currently visible (in the case of a
element) or whether the dialog is active and can be interacted with (in the case of a element).\n */\n 'open': PropTypes.oneOfType([\n PropTypes.oneOf(['open', 'OPEN']),\n PropTypes.bool\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Details;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dfn is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn\n */\nconst Dfn = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nDfn.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDfn.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dfn;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dialog is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog\n */\nconst Dialog = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nDialog.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDialog.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the contents are currently visible (in the case of a
element) or whether the dialog is active and can be interacted with (in the case of a element).\n */\n 'open': PropTypes.oneOfType([\n PropTypes.oneOf(['open', 'OPEN']),\n PropTypes.bool\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dialog;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Div is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div\n */\nconst Div = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nDiv.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDiv.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Div;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dl is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl\n */\nconst Dl = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nDl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dl;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dt is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt\n */\nconst Dt = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nDt.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDt.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dt;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Em is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em\n */\nconst Em = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nEm.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nEm.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Em;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Embed is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed\n */\nconst Embed = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nEmbed.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nEmbed.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as
, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as
, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Embed;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Fieldset is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset\n */\nconst Fieldset = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nFieldset.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFieldset.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Fieldset;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Figcaption is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption\n */\nconst Figcaption = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nFigcaption.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFigcaption.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Figcaption;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Figure is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure\n */\nconst Figure = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nFigure.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFigure.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Figure;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Font is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font\n */\nconst Font = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nFont.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFont.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Font;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Footer is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer\n */\nconst Footer = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nFooter.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFooter.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Footer;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Form is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form\n */\nconst Form = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nForm.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nForm.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * List of types the server accepts, typically a file type.\n */\n 'accept': PropTypes.string,\n\n /**\n * List of supported charsets.\n */\n 'acceptCharset': PropTypes.string,\n\n /**\n * The URI of a program that processes the information submitted via the form.\n */\n 'action': PropTypes.string,\n\n /**\n * Indicates whether controls in this form can by default have their values automatically completed by the browser.\n */\n 'autoComplete': PropTypes.string,\n\n /**\n * Defines the content type of the form data when the method is POST.\n */\n 'encType': PropTypes.string,\n\n /**\n * Defines which HTTP method to use when submitting the form. Can be GET (default) or POST.\n */\n 'method': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * This attribute indicates that the form shouldn't be validated when submitted.\n */\n 'noValidate': PropTypes.oneOfType([\n PropTypes.oneOf(['noValidate', 'novalidate', 'NOVALIDATE']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies where to open the linked document (in the case of an element) or where to display the response received (in the case of a
element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Form;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Frame is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frame\n */\nconst Frame = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nFrame.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFrame.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Frame;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Frameset is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frameset\n */\nconst Frameset = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nFrameset.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFrameset.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Frameset;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H1 is a wrapper for the

HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h1\n */\nconst H1 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n

\n );\n};\n\nH1.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH1.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H1;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H2 is a wrapper for the

HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h2\n */\nconst H2 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n

\n );\n};\n\nH2.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH2.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H2;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H3 is a wrapper for the

HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h3\n */\nconst H3 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n

\n );\n};\n\nH3.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH3.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H3;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H4 is a wrapper for the

HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h4\n */\nconst H4 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n

\n );\n};\n\nH4.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH4.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H4;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H5 is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h5\n */\nconst H5 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nH5.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH5.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H5;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H6 is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h6\n */\nconst H6 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nH6.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH6.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H6;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Header is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header\n */\nconst Header = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nHeader.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nHeader.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Header;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Hgroup is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup\n */\nconst Hgroup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
\n );\n};\n\nHgroup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nHgroup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Hgroup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Hr is a wrapper for the
HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr\n */\nconst Hr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nHr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nHr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Hr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * I is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i\n */\nconst I = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nI.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nI.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default I;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Iframe is a wrapper for the \n );\n};\n\nIframe.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nIframe.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies a feature-policy for the iframe.\n */\n 'allow': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as
, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Stops a document loaded in an iframe from using certain features (such as submitting forms or opening new windows).\n */\n 'sandbox': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n *\n */\n 'srcDoc': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as
, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Iframe;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Img is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\n */\nconst Img = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nImg.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nImg.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Alternative text in case an image can't be displayed.\n */\n 'alt': PropTypes.string,\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as
, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n *\n */\n 'sizes': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * One or more responsive image candidates.\n */\n 'srcSet': PropTypes.string,\n\n /**\n *\n */\n 'useMap': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as
, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Img;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ins is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins\n */\nconst Ins = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nIns.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nIns.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Indicates the date and time associated with the element.\n */\n 'dateTime': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ins;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Kbd is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd\n */\nconst Kbd = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nKbd.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nKbd.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Kbd;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Keygen is a wrapper for the HTML5 element.\n *\n * DEPRECATED: is included for completeness, but should be avoided\n * as it is not supported by all browsers and may be removed at any time from\n * those that do support it.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen\n */\nconst Keygen = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nKeygen.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nKeygen.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * A challenge string that is submitted along with the public key.\n */\n 'challenge': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Specifies the type of key generated.\n */\n 'keyType': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Keygen;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Label is a wrapper for the \n );\n};\n\nLabel.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLabel.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Describes elements which belongs to this one.\n */\n 'htmlFor': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Label;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Legend is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend\n */\nconst Legend = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nLegend.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLegend.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Legend;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Li is a wrapper for the
  • HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li\n */\nconst Li = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
  • \n );\n};\n\nLi.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLi.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Li;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Link is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link\n */\nconst Link = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nLink.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLink.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies the language of the linked resource.\n */\n 'hrefLang': PropTypes.string,\n\n /**\n * Specifies a Subresource Integrity value that allows browsers to verify what they fetch.\n */\n 'integrity': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Specifies the relationship of the target object to the link object.\n */\n 'rel': PropTypes.string,\n\n /**\n *\n */\n 'sizes': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Link;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Main is a wrapper for the
    HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main\n */\nconst Main = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
    \n );\n};\n\nMain.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMain.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Main;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * MapEl is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map\n */\nconst MapEl = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nMapEl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMapEl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default MapEl;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Mark is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark\n */\nconst Mark = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nMark.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMark.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Mark;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Marquee is a wrapper for the HTML5 element.\n *\n * DEPRECATED: is included for completeness, but should be avoided\n * as browsers may remove it at any time.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee\n */\nconst Marquee = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nMarquee.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMarquee.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the media should start playing from the start when it's finished.\n */\n 'loop': PropTypes.oneOfType([\n PropTypes.oneOf(['loop', 'LOOP']),\n PropTypes.bool\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Marquee;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Meta is a wrapper for the HTML5 element.\n *\n * CAUTION: is included for completeness, but generally will not behave\n * as expected since tags should be static HTML content in the of\n * the document. Dash components are dynamic content.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta\n */\nconst Meta = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nMeta.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMeta.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Declares the character encoding of the page or script.\n */\n 'charSet': PropTypes.string,\n\n /**\n * A value associated with http-equiv or name depending on the context.\n */\n 'content': PropTypes.string,\n\n /**\n * Defines a pragma directive.\n */\n 'httpEquiv': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Meta;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Meter is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter\n */\nconst Meter = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nMeter.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMeter.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates the lower bound of the upper range.\n */\n 'high': PropTypes.string,\n\n /**\n * Indicates the upper bound of the lower range.\n */\n 'low': PropTypes.string,\n\n /**\n * Indicates the maximum value allowed.\n */\n 'max': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates the minimum value allowed.\n */\n 'min': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates the optimal numeric value.\n */\n 'optimum': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Meter;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Nav is a wrapper for the \n );\n};\n\nNav.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nNav.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Nav;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Nobr is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nobr\n */\nconst Nobr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nNobr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nNobr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Nobr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Noscript is a wrapper for the \n );\n};\n\nNoscript.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nNoscript.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Noscript;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * ObjectEl is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object\n */\nconst ObjectEl = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nObjectEl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nObjectEl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies the URL of the resource.\n */\n 'data': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as
    , this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n *\n */\n 'useMap': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as
    , this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default ObjectEl;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ol is a wrapper for the
      HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol\n */\nconst Ol = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n
    \n );\n};\n\nOl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the list should be displayed in a descending order instead of an ascending order.\n */\n 'reversed': PropTypes.oneOfType([\n PropTypes.oneOf(['reversed', 'REVERSED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the first number if other than 1.\n */\n 'start': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ol;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Optgroup is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup\n */\nconst Optgroup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nOptgroup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOptgroup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies a user-readable title of the element.\n */\n 'label': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Optgroup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Option is a wrapper for the \n );\n};\n\nOption.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOption.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies a user-readable title of the element.\n */\n 'label': PropTypes.string,\n\n /**\n * Defines a value which will be selected on page load.\n */\n 'selected': PropTypes.oneOfType([\n PropTypes.oneOf(['selected', 'SELECTED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Option;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Output is a wrapper for the HTML5 element.\n *\n * CAUTION: is included for completeness, but its typical usage\n * requires the oninput attribute of the enclosing element, which\n * is not accessible to Dash.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output\n */\nconst Output = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nOutput.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOutput.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Describes elements which belongs to this one.\n */\n 'htmlFor': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Output;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * P is a wrapper for the

    HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p\n */\nconst P = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n

    \n );\n};\n\nP.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nP.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default P;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Param is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/param\n */\nconst Param = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nParam.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nParam.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Param;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Picture is a wrapper for the HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture\n */\nconst Picture = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n \n );\n};\n\nPicture.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nPicture.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Picture;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Plaintext is a wrapper for the HTML5 element.\n *\n * OBSOLETE: <plaintext> is included for completeness, but should be avoided\n * as browsers may remove it at any time, and its behavior when added\n * dynamically by Dash is not what it would be statically on page load.\n * Use <pre> or <code> instead.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/plaintext\n */\nconst Plaintext = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <plaintext\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </plaintext>\n );\n};\n\nPlaintext.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nPlaintext.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Plaintext;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Pre is a wrapper for the <pre> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre\n */\nconst Pre = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <pre\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </pre>\n );\n};\n\nPre.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nPre.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Pre;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Progress is a wrapper for the <progress> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress\n */\nconst Progress = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <progress\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </progress>\n );\n};\n\nProgress.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nProgress.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates the maximum value allowed.\n */\n 'max': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Progress;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Q is a wrapper for the <q> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q\n */\nconst Q = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <q\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </q>\n );\n};\n\nQ.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nQ.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Q;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rb is a wrapper for the <rb> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rb\n */\nconst Rb = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <rb\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rb>\n );\n};\n\nRb.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRb.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rb;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rp is a wrapper for the <rp> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp\n */\nconst Rp = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <rp\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rp>\n );\n};\n\nRp.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRp.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rp;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rt is a wrapper for the <rt> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt\n */\nconst Rt = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <rt\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rt>\n );\n};\n\nRt.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRt.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rt;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rtc is a wrapper for the <rtc> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rtc\n */\nconst Rtc = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <rtc\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rtc>\n );\n};\n\nRtc.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRtc.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rtc;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ruby is a wrapper for the <ruby> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby\n */\nconst Ruby = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <ruby\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </ruby>\n );\n};\n\nRuby.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRuby.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ruby;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * S is a wrapper for the <s> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s\n */\nconst S = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <s\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </s>\n );\n};\n\nS.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nS.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default S;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Samp is a wrapper for the <samp> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp\n */\nconst Samp = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <samp\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </samp>\n );\n};\n\nSamp.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSamp.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Samp;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Script is a wrapper for the <script> HTML5 element.\n *\n * CAUTION: <script> is included for completeness, but you cannot execute\n * JavaScript code by providing it to a <script> element. Use a clientside\n * callback for this purpose instead.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script\n */\nconst Script = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <script\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </script>\n );\n};\n\nScript.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nScript.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Executes the script asynchronously.\n */\n 'async': PropTypes.oneOfType([\n PropTypes.oneOf(['async', 'ASYNC']),\n PropTypes.bool\n ]),\n\n /**\n * Declares the character encoding of the page or script.\n */\n 'charSet': PropTypes.string,\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Indicates that the script should be executed after the page has been parsed.\n */\n 'defer': PropTypes.oneOfType([\n PropTypes.oneOf(['defer', 'DEFER']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies a Subresource Integrity value that allows browsers to verify what they fetch.\n */\n 'integrity': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Script;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Section is a wrapper for the <section> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section\n */\nconst Section = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <section\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </section>\n );\n};\n\nSection.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSection.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Section;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Select is a wrapper for the <select> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select\n */\nconst Select = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <select\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </select>\n );\n};\n\nSelect.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSelect.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether controls in this form can by default have their values automatically completed by the browser.\n */\n 'autoComplete': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates whether multiple values can be entered in an input of the type email or file.\n */\n 'multiple': PropTypes.oneOfType([\n PropTypes.oneOf(['multiple', 'MULTIPLE']),\n PropTypes.bool\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Indicates whether this element is required to fill out or not.\n */\n 'required': PropTypes.oneOfType([\n PropTypes.oneOf(['required', 'REQUIRED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the width of the element (in pixels). If the element's type attribute is text or password then it's the number of characters.\n */\n 'size': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Select;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Shadow is a wrapper for the <shadow> HTML5 element.\n *\n * DEPRECATED: <shadow> is included for completeness, but should be avoided\n * as it is not supported by all browsers and may be removed at any time from\n * those that do support it.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/shadow\n */\nconst Shadow = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <shadow\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </shadow>\n );\n};\n\nShadow.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nShadow.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Shadow;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Slot is a wrapper for the <slot> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot\n */\nconst Slot = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <slot\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </slot>\n );\n};\n\nSlot.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSlot.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Slot;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Small is a wrapper for the <small> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small\n */\nconst Small = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <small\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </small>\n );\n};\n\nSmall.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSmall.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Small;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Source is a wrapper for the <source> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source\n */\nconst Source = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <source\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </source>\n );\n};\n\nSource.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSource.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n *\n */\n 'sizes': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * One or more responsive image candidates.\n */\n 'srcSet': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Source;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Spacer is a wrapper for the <spacer> HTML5 element.\n *\n * OBSOLETE: <spacer> is included for completeness, but should be avoided\n * as it is not supported by any modern browsers.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/spacer\n */\nconst Spacer = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <spacer\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </spacer>\n );\n};\n\nSpacer.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSpacer.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Spacer;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Span is a wrapper for the <span> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span\n */\nconst Span = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <span\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </span>\n );\n};\n\nSpan.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSpan.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Span;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Strike is a wrapper for the <strike> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strike\n */\nconst Strike = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <strike\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </strike>\n );\n};\n\nStrike.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nStrike.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Strike;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Strong is a wrapper for the <strong> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong\n */\nconst Strong = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <strong\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </strong>\n );\n};\n\nStrong.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nStrong.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Strong;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Sub is a wrapper for the <sub> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub\n */\nconst Sub = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <sub\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </sub>\n );\n};\n\nSub.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSub.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Sub;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Summary is a wrapper for the <summary> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary\n */\nconst Summary = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <summary\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </summary>\n );\n};\n\nSummary.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSummary.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Summary;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Sup is a wrapper for the <sup> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup\n */\nconst Sup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <sup\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </sup>\n );\n};\n\nSup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Sup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Table is a wrapper for the <table> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table\n */\nconst Table = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <table\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </table>\n );\n};\n\nTable.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTable.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Table;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Tbody is a wrapper for the <tbody> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody\n */\nconst Tbody = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <tbody\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </tbody>\n );\n};\n\nTbody.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTbody.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Tbody;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Td is a wrapper for the <td> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td\n */\nconst Td = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <td\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </td>\n );\n};\n\nTd.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTd.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The colspan attribute defines the number of columns a cell should span.\n */\n 'colSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * IDs of the <th> elements which applies to this element.\n */\n 'headers': PropTypes.string,\n\n /**\n * Defines the number of rows a table cell should span over.\n */\n 'rowSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Td;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Template is a wrapper for the <template> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template\n */\nconst Template = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <template\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </template>\n );\n};\n\nTemplate.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTemplate.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Template;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Textarea is a wrapper for the <textarea> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea\n */\nconst Textarea = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <textarea\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </textarea>\n );\n};\n\nTextarea.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTextarea.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether controls in this form can by default have their values automatically completed by the browser.\n */\n 'autoComplete': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the number of columns in a textarea.\n */\n 'cols': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Provides a hint as to the type of data that might be entered by the user while editing the element or its contents. The attribute can be used with form controls (such as the value of textarea elements), or in elements in an editing host (e.g., using contenteditable attribute).\n */\n 'inputMode': PropTypes.string,\n\n /**\n * Defines the maximum number of characters allowed in the element.\n */\n 'maxLength': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Defines the minimum number of characters allowed in the element.\n */\n 'minLength': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Provides a hint to the user of what can be entered in the field.\n */\n 'placeholder': PropTypes.string,\n\n /**\n * Indicates whether the element can be edited.\n */\n 'readOnly': PropTypes.string,\n\n /**\n * Indicates whether this element is required to fill out or not.\n */\n 'required': PropTypes.oneOfType([\n PropTypes.oneOf(['required', 'REQUIRED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the number of rows in a text area.\n */\n 'rows': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates whether the text should be wrapped.\n */\n 'wrap': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Textarea;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Tfoot is a wrapper for the <tfoot> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot\n */\nconst Tfoot = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <tfoot\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </tfoot>\n );\n};\n\nTfoot.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTfoot.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Tfoot;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Th is a wrapper for the <th> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th\n */\nconst Th = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <th\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </th>\n );\n};\n\nTh.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTh.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The colspan attribute defines the number of columns a cell should span.\n */\n 'colSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * IDs of the <th> elements which applies to this element.\n */\n 'headers': PropTypes.string,\n\n /**\n * Defines the number of rows a table cell should span over.\n */\n 'rowSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Defines the cells that the header test (defined in the th element) relates to.\n */\n 'scope': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Th;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Thead is a wrapper for the <thead> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead\n */\nconst Thead = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <thead\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </thead>\n );\n};\n\nThead.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nThead.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Thead;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Time is a wrapper for the <time> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time\n */\nconst Time = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <time\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </time>\n );\n};\n\nTime.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTime.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates the date and time associated with the element.\n */\n 'dateTime': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Time;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Title is a wrapper for the <title> HTML5 element.\n *\n * CAUTION: <title> is included for completeness, but is not expected to\n * do anything outside of <head>. Dash components are always created in the\n * <body>.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title\n */\nconst Title = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <title\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </title>\n );\n};\n\nTitle.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTitle.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Title;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Tr is a wrapper for the <tr> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr\n */\nconst Tr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <tr\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </tr>\n );\n};\n\nTr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Tr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Track is a wrapper for the <track> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track\n */\nconst Track = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <track\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </track>\n );\n};\n\nTrack.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTrack.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates that the track should be enabled unless the user's preferences indicate something different.\n */\n 'default': PropTypes.oneOfType([\n PropTypes.oneOf(['default', 'DEFAULT']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies the kind of text track.\n */\n 'kind': PropTypes.string,\n\n /**\n * Specifies a user-readable title of the element.\n */\n 'label': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n *\n */\n 'srcLang': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Track;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * U is a wrapper for the <u> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u\n */\nconst U = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <u\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </u>\n );\n};\n\nU.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nU.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default U;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ul is a wrapper for the <ul> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul\n */\nconst Ul = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <ul\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </ul>\n );\n};\n\nUl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nUl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ul;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Var is a wrapper for the <var> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var\n */\nconst Var = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <var\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </var>\n );\n};\n\nVar.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nVar.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Var;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Video is a wrapper for the <video> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\n */\nconst Video = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <video\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </video>\n );\n};\n\nVideo.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nVideo.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The audio or video should play as soon as possible.\n */\n 'autoPlay': PropTypes.oneOfType([\n PropTypes.oneOf(['autoPlay', 'autoplay', 'AUTOPLAY']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the browser should show playback controls to the user.\n */\n 'controls': PropTypes.oneOfType([\n PropTypes.oneOf(['controls', 'CONTROLS']),\n PropTypes.bool\n ]),\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates whether the media should start playing from the start when it's finished.\n */\n 'loop': PropTypes.oneOfType([\n PropTypes.oneOf(['loop', 'LOOP']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the audio will be initially silenced on page load.\n */\n 'muted': PropTypes.oneOfType([\n PropTypes.oneOf(['muted', 'MUTED']),\n PropTypes.bool\n ]),\n\n /**\n * A URL indicating a poster frame to show until the user plays or seeks.\n */\n 'poster': PropTypes.string,\n\n /**\n * Indicates whether the whole resource, parts of it or nothing should be preloaded.\n */\n 'preload': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as <div>, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Video;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Wbr is a wrapper for the <wbr> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr\n */\nconst Wbr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <wbr\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </wbr>\n );\n};\n\nWbr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nWbr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Wbr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Xmp is a wrapper for the <xmp> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/xmp\n */\nconst Xmp = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n <xmp\n onClick={() => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n </xmp>\n );\n};\n\nXmp.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nXmp.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Xmp;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","_isPlaceholder","fn","f1","arguments","length","apply","this","f2","b","_b","_a","Array","isArray","iterator","toString","keys","Number","isInteger","is","Date","toISOString","assign","names","result","index","idx","len","String","trim","A","props","dataAttributes","loading_state","is_loading","onClick","setProps","n_clicks","n_clicks_timestamp","now","omit","children","defaultProps","propTypes","PropTypes","prop_name","component_name","Abbr","Acronym","Address","Area","Article","Aside","Audio","B","Base","Basefont","Bdi","Bdo","Big","Blink","Blockquote","Br","Button","Canvas","Caption","Center","Cite","Code","Col","Colgroup","Content","Data","Datalist","Dd","Del","Details","Dfn","Dialog","Div","Dl","Dt","Em","Embed","Fieldset","Figcaption","Figure","Font","Footer","Form","Frame","Frameset","H1","H2","H3","H4","H5","H6","Header","Hgroup","Hr","I","Iframe","Img","Ins","Kbd","Keygen","Label","Legend","Li","Link","Main","MapEl","Mark","Marquee","Meta","Meter","Nav","Nobr","Noscript","ObjectEl","Ol","Optgroup","Option","Output","P","Param","Picture","Plaintext","Pre","Progress","Q","Rb","Rp","Rt","Rtc","Ruby","S","Samp","Script","Section","Select","Shadow","Slot","Small","Source","Spacer","Span","Strike","Strong","Sub","Summary","Sup","Table","Tbody","Td","Template","Textarea","Tfoot","Th","Thead","Time","Title","Tr","Track","U","Ul","Var","Video","Wbr","Xmp"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"dash_html_components.min.js","mappings":"yBACA,IAAIA,EAAsB,CCA1BA,EAAwB,SAASC,GAChC,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,WAAa,OAAOF,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CACR,ECNAF,EAAwB,SAASM,EAASC,GACzC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,E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,IAAAA,MAGhB,U","sources":["webpack://dash_html_components/webpack/bootstrap","webpack://dash_html_components/webpack/runtime/compat get default export","webpack://dash_html_components/webpack/runtime/define property getters","webpack://dash_html_components/webpack/runtime/hasOwnProperty shorthand","webpack://dash_html_components/webpack/runtime/make namespace object","webpack://dash_html_components/external window \"React\"","webpack://dash_html_components/external window \"PropTypes\"","webpack://dash_html_components/./node_modules/ramda/es/internal/_isPlaceholder.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_curry1.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_curry2.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_isArray.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_reduce.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_isArguments.js","webpack://dash_html_components/./node_modules/ramda/es/keys.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_isInteger.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_objectIs.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_toISOString.js","webpack://dash_html_components/./node_modules/ramda/es/internal/_objectAssign.js","webpack://dash_html_components/./node_modules/ramda/es/modifyPath.js","webpack://dash_html_components/./node_modules/ramda/es/omit.js","webpack://dash_html_components/./node_modules/ramda/es/trim.js","webpack://dash_html_components/./src/components/A.react.js","webpack://dash_html_components/./src/components/Abbr.react.js","webpack://dash_html_components/./src/components/Acronym.react.js","webpack://dash_html_components/./src/components/Address.react.js","webpack://dash_html_components/./src/components/Area.react.js","webpack://dash_html_components/./src/components/Article.react.js","webpack://dash_html_components/./src/components/Aside.react.js","webpack://dash_html_components/./src/components/Audio.react.js","webpack://dash_html_components/./src/components/B.react.js","webpack://dash_html_components/./src/components/Base.react.js","webpack://dash_html_components/./src/components/Basefont.react.js","webpack://dash_html_components/./src/components/Bdi.react.js","webpack://dash_html_components/./src/components/Bdo.react.js","webpack://dash_html_components/./src/components/Big.react.js","webpack://dash_html_components/./src/components/Blink.react.js","webpack://dash_html_components/./src/components/Blockquote.react.js","webpack://dash_html_components/./src/components/Br.react.js","webpack://dash_html_components/./src/components/Button.react.js","webpack://dash_html_components/./src/components/Canvas.react.js","webpack://dash_html_components/./src/components/Caption.react.js","webpack://dash_html_components/./src/components/Center.react.js","webpack://dash_html_components/./src/components/Cite.react.js","webpack://dash_html_components/./src/components/Code.react.js","webpack://dash_html_components/./src/components/Col.react.js","webpack://dash_html_components/./src/components/Colgroup.react.js","webpack://dash_html_components/./src/components/Content.react.js","webpack://dash_html_components/./src/components/Data.react.js","webpack://dash_html_components/./src/components/Datalist.react.js","webpack://dash_html_components/./src/components/Dd.react.js","webpack://dash_html_components/./src/components/Del.react.js","webpack://dash_html_components/./src/components/Details.react.js","webpack://dash_html_components/./src/components/Dfn.react.js","webpack://dash_html_components/./src/components/Dialog.react.js","webpack://dash_html_components/./src/components/Div.react.js","webpack://dash_html_components/./src/components/Dl.react.js","webpack://dash_html_components/./src/components/Dt.react.js","webpack://dash_html_components/./src/components/Em.react.js","webpack://dash_html_components/./src/components/Embed.react.js","webpack://dash_html_components/./src/components/Fieldset.react.js","webpack://dash_html_components/./src/components/Figcaption.react.js","webpack://dash_html_components/./src/components/Figure.react.js","webpack://dash_html_components/./src/components/Font.react.js","webpack://dash_html_components/./src/components/Footer.react.js","webpack://dash_html_components/./src/components/Form.react.js","webpack://dash_html_components/./src/components/Frame.react.js","webpack://dash_html_components/./src/components/Frameset.react.js","webpack://dash_html_components/./src/components/H1.react.js","webpack://dash_html_components/./src/components/H2.react.js","webpack://dash_html_components/./src/components/H3.react.js","webpack://dash_html_components/./src/components/H4.react.js","webpack://dash_html_components/./src/components/H5.react.js","webpack://dash_html_components/./src/components/H6.react.js","webpack://dash_html_components/./src/components/Header.react.js","webpack://dash_html_components/./src/components/Hgroup.react.js","webpack://dash_html_components/./src/components/Hr.react.js","webpack://dash_html_components/./src/components/I.react.js","webpack://dash_html_components/./src/components/Iframe.react.js","webpack://dash_html_components/./src/components/Img.react.js","webpack://dash_html_components/./src/components/Ins.react.js","webpack://dash_html_components/./src/components/Kbd.react.js","webpack://dash_html_components/./src/components/Keygen.react.js","webpack://dash_html_components/./src/components/Label.react.js","webpack://dash_html_components/./src/components/Legend.react.js","webpack://dash_html_components/./src/components/Li.react.js","webpack://dash_html_components/./src/components/Link.react.js","webpack://dash_html_components/./src/components/Main.react.js","webpack://dash_html_components/./src/components/MapEl.react.js","webpack://dash_html_components/./src/components/Mark.react.js","webpack://dash_html_components/./src/components/Marquee.react.js","webpack://dash_html_components/./src/components/Meta.react.js","webpack://dash_html_components/./src/components/Meter.react.js","webpack://dash_html_components/./src/components/Nav.react.js","webpack://dash_html_components/./src/components/Nobr.react.js","webpack://dash_html_components/./src/components/Noscript.react.js","webpack://dash_html_components/./src/components/ObjectEl.react.js","webpack://dash_html_components/./src/components/Ol.react.js","webpack://dash_html_components/./src/components/Optgroup.react.js","webpack://dash_html_components/./src/components/Option.react.js","webpack://dash_html_components/./src/components/Output.react.js","webpack://dash_html_components/./src/components/P.react.js","webpack://dash_html_components/./src/components/Param.react.js","webpack://dash_html_components/./src/components/Picture.react.js","webpack://dash_html_components/./src/components/Plaintext.react.js","webpack://dash_html_components/./src/components/Pre.react.js","webpack://dash_html_components/./src/components/Progress.react.js","webpack://dash_html_components/./src/components/Q.react.js","webpack://dash_html_components/./src/components/Rb.react.js","webpack://dash_html_components/./src/components/Rp.react.js","webpack://dash_html_components/./src/components/Rt.react.js","webpack://dash_html_components/./src/components/Rtc.react.js","webpack://dash_html_components/./src/components/Ruby.react.js","webpack://dash_html_components/./src/components/S.react.js","webpack://dash_html_components/./src/components/Samp.react.js","webpack://dash_html_components/./src/components/Script.react.js","webpack://dash_html_components/./src/components/Section.react.js","webpack://dash_html_components/./src/components/Select.react.js","webpack://dash_html_components/./src/components/Shadow.react.js","webpack://dash_html_components/./src/components/Slot.react.js","webpack://dash_html_components/./src/components/Small.react.js","webpack://dash_html_components/./src/components/Source.react.js","webpack://dash_html_components/./src/components/Spacer.react.js","webpack://dash_html_components/./src/components/Span.react.js","webpack://dash_html_components/./src/components/Strike.react.js","webpack://dash_html_components/./src/components/Strong.react.js","webpack://dash_html_components/./src/components/Sub.react.js","webpack://dash_html_components/./src/components/Summary.react.js","webpack://dash_html_components/./src/components/Sup.react.js","webpack://dash_html_components/./src/components/Table.react.js","webpack://dash_html_components/./src/components/Tbody.react.js","webpack://dash_html_components/./src/components/Td.react.js","webpack://dash_html_components/./src/components/Template.react.js","webpack://dash_html_components/./src/components/Textarea.react.js","webpack://dash_html_components/./src/components/Tfoot.react.js","webpack://dash_html_components/./src/components/Th.react.js","webpack://dash_html_components/./src/components/Thead.react.js","webpack://dash_html_components/./src/components/Time.react.js","webpack://dash_html_components/./src/components/Title.react.js","webpack://dash_html_components/./src/components/Tr.react.js","webpack://dash_html_components/./src/components/Track.react.js","webpack://dash_html_components/./src/components/U.react.js","webpack://dash_html_components/./src/components/Ul.react.js","webpack://dash_html_components/./src/components/Var.react.js","webpack://dash_html_components/./src/components/Video.react.js","webpack://dash_html_components/./src/components/Wbr.react.js","webpack://dash_html_components/./src/components/Xmp.react.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"React\"];","var __WEBPACK_NAMESPACE_OBJECT__ = window[\"PropTypes\"];","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\n\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","import _isArrayLike from \"./_isArrayLike.js\";\nimport _xwrap from \"./_xwrap.js\";\nimport bind from \"../bind.js\";\n\nfunction _arrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n idx += 1;\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _iterableReduce(xf, acc, iter) {\n var step = iter.next();\n\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n\n step = iter.next();\n }\n\n return xf['@@transducer/result'](acc);\n}\n\nfunction _methodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\n\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nexport default function _reduce(fn, acc, list) {\n if (typeof fn === 'function') {\n fn = _xwrap(fn);\n }\n\n if (_isArrayLike(list)) {\n return _arrayReduce(fn, acc, list);\n }\n\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return _methodReduce(fn, acc, list, 'fantasy-land/reduce');\n }\n\n if (list[symIterator] != null) {\n return _iterableReduce(fn, acc, list[symIterator]());\n }\n\n if (typeof list.next === 'function') {\n return _iterableReduce(fn, acc, list);\n }\n\n if (typeof list.reduce === 'function') {\n return _methodReduce(fn, acc, list, 'reduce');\n }\n\n throw new TypeError('reduce: list must be array or iterable');\n}","import _has from \"./_has.js\";\nvar toString = Object.prototype.toString;\n\nvar _isArguments =\n/*#__PURE__*/\nfunction () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\nimport _isArguments from \"./internal/_isArguments.js\"; // cover IE < 9 keys issues\n\nvar hasEnumBug = !\n/*#__PURE__*/\n{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // Safari bug\n\nvar hasArgsEnumBug =\n/*#__PURE__*/\nfunction () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n\n idx += 1;\n }\n\n return false;\n};\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values, R.toPairs\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\n\n\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ?\n/*#__PURE__*/\n_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) :\n/*#__PURE__*/\n_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n\n var prop, nIdx;\n var ks = [];\n\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n\n nIdx -= 1;\n }\n }\n\n return ks;\n});\nexport default keys;","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","/**\n * Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\n\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\n\nexport default _toISOString;","import _has from \"./_has.js\"; // Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\n\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n\n while (idx < length) {\n var source = arguments[idx];\n\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n\n idx += 1;\n }\n\n return output;\n}\n\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _curry3 from \"./internal/_curry3.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _has from \"./internal/_has.js\";\nimport _assoc from \"./internal/_assoc.js\";\nimport _modify from \"./internal/_modify.js\";\n/**\n * Creates a shallow clone of the passed object by applying an `fn` function\n * to the value at the given path.\n *\n * The function will not be invoked, and the object will not change\n * if its corresponding path does not exist in the object.\n * All non-primitive properties are copied to the new object by reference.\n *\n * @func\n * @memberOf R\n * @since v0.28.0\n * @category Object\n * @sig [Idx] -> (v -> v) -> {k: v} -> {k: v}\n * @param {Array} path The path to be modified.\n * @param {Function} fn The function to apply to the path.\n * @param {Object} object The object to be transformed.\n * @return {Object} The transformed object.\n * @example\n *\n * const person = {name: 'James', address: { zipCode: '90216' }};\n * R.modifyPath(['address', 'zipCode'], R.reverse, person); //=> {name: 'James', address: { zipCode: '61209' }}\n *\n * // Can handle arrays too\n * const person = {name: 'James', addresses: [{ zipCode: '90216' }]};\n * R.modifyPath(['addresses', 0, 'zipCode'], R.reverse, person); //=> {name: 'James', addresses: [{ zipCode: '61209' }]}\n */\n\nvar modifyPath =\n/*#__PURE__*/\n_curry3(function modifyPath(path, fn, object) {\n if (!_isObject(object) && !_isArray(object) || path.length === 0) {\n return object;\n }\n\n var idx = path[0];\n\n if (!_has(idx, object)) {\n return object;\n }\n\n if (path.length === 1) {\n return _modify(idx, fn, object);\n }\n\n var val = modifyPath(Array.prototype.slice.call(path, 1), fn, object[idx]);\n\n if (val === object[idx]) {\n return object;\n }\n\n return _assoc(idx, val, object);\n});\n\nexport default modifyPath;","import _curry2 from \"./internal/_curry2.js\";\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\n\nvar omit =\n/*#__PURE__*/\n_curry2(function omit(names, obj) {\n var result = {};\n var index = {};\n var idx = 0;\n var len = names.length;\n\n while (idx < len) {\n index[names[idx]] = 1;\n idx += 1;\n }\n\n for (var prop in obj) {\n if (!index.hasOwnProperty(prop)) {\n result[prop] = obj[prop];\n }\n }\n\n return result;\n});\n\nexport default omit;","import _curry1 from \"./internal/_curry1.js\";\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\n\nvar trim = !hasProtoTrim ||\n/*#__PURE__*/\nws.trim() || !\n/*#__PURE__*/\nzeroWidth.trim() ?\n/*#__PURE__*/\n_curry1(function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n}) :\n/*#__PURE__*/\n_curry1(function trim(str) {\n return str.trim();\n});\nexport default trim;","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * A is a wrapper for the <a> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a\n */\nconst A = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <a\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </a>\n );\n};\n\nA.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nA.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates that the hyperlink is to be used for downloading a resource.\n */\n 'download': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies the language of the linked resource.\n */\n 'hrefLang': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Specifies the relationship of the target object to the link object.\n */\n 'rel': PropTypes.string,\n\n /**\n *\n */\n 'shape': PropTypes.string,\n\n /**\n * Specifies where to open the linked document (in the case of an <a> element) or where to display the response received (in the case of a <form> element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default A;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Abbr is a wrapper for the <abbr> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr\n */\nconst Abbr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <abbr\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </abbr>\n );\n};\n\nAbbr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAbbr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Abbr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Acronym is a wrapper for the <acronym> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/acronym\n */\nconst Acronym = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <acronym\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </acronym>\n );\n};\n\nAcronym.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAcronym.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Acronym;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Address is a wrapper for the <address> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/address\n */\nconst Address = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <address\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </address>\n );\n};\n\nAddress.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAddress.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Address;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Area is a wrapper for the <area> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/area\n */\nconst Area = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <area\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </area>\n );\n};\n\nArea.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nArea.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Alternative text in case an image can't be displayed.\n */\n 'alt': PropTypes.string,\n\n /**\n * A set of values specifying the coordinates of the hot-spot region.\n */\n 'coords': PropTypes.string,\n\n /**\n * Indicates that the hyperlink is to be used for downloading a resource.\n */\n 'download': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies the language of the linked resource.\n */\n 'hrefLang': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Specifies the relationship of the target object to the link object.\n */\n 'rel': PropTypes.string,\n\n /**\n *\n */\n 'shape': PropTypes.string,\n\n /**\n * Specifies where to open the linked document (in the case of an <a> element) or where to display the response received (in the case of a <form> element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Area;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Article is a wrapper for the <article> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/article\n */\nconst Article = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <article\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </article>\n );\n};\n\nArticle.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nArticle.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Article;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Aside is a wrapper for the <aside> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/aside\n */\nconst Aside = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <aside\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </aside>\n );\n};\n\nAside.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAside.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Aside;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Audio is a wrapper for the <audio> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio\n */\nconst Audio = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <audio\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </audio>\n );\n};\n\nAudio.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nAudio.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The audio or video should play as soon as possible.\n */\n 'autoPlay': PropTypes.oneOfType([\n PropTypes.oneOf(['autoPlay', 'autoplay', 'AUTOPLAY']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the browser should show playback controls to the user.\n */\n 'controls': PropTypes.oneOfType([\n PropTypes.oneOf(['controls', 'CONTROLS']),\n PropTypes.bool\n ]),\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Indicates whether the media should start playing from the start when it's finished.\n */\n 'loop': PropTypes.oneOfType([\n PropTypes.oneOf(['loop', 'LOOP']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the audio will be initially silenced on page load.\n */\n 'muted': PropTypes.oneOfType([\n PropTypes.oneOf(['muted', 'MUTED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the whole resource, parts of it or nothing should be preloaded.\n */\n 'preload': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Audio;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * B is a wrapper for the <b> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b\n */\nconst B = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <b\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </b>\n );\n};\n\nB.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nB.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default B;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Base is a wrapper for the <base> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base\n */\nconst Base = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <base\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </base>\n );\n};\n\nBase.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBase.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies where to open the linked document (in the case of an <a> element) or where to display the response received (in the case of a <form> element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Base;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Basefont is a wrapper for the <basefont> HTML5 element.\n *\n * OBSOLETE: <basefont> is included for completeness, but should be avoided\n * as it is only supported by Internet Explorer.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/basefont\n */\nconst Basefont = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <basefont\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </basefont>\n );\n};\n\nBasefont.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBasefont.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Basefont;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Bdi is a wrapper for the <bdi> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi\n */\nconst Bdi = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <bdi\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </bdi>\n );\n};\n\nBdi.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBdi.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Bdi;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Bdo is a wrapper for the <bdo> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdo\n */\nconst Bdo = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <bdo\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </bdo>\n );\n};\n\nBdo.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBdo.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Bdo;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Big is a wrapper for the <big> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/big\n */\nconst Big = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <big\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </big>\n );\n};\n\nBig.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBig.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Big;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Blink is a wrapper for the <blink> HTML5 element.\n *\n * OBSOLETE: <blink> is included for completeness, but should be avoided\n * as it is not supported by any modern browsers.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blink\n */\nconst Blink = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <blink\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </blink>\n );\n};\n\nBlink.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBlink.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Blink;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Blockquote is a wrapper for the <blockquote> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote\n */\nconst Blockquote = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <blockquote\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </blockquote>\n );\n};\n\nBlockquote.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBlockquote.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Blockquote;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Br is a wrapper for the <br> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br\n */\nconst Br = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <br\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </br>\n );\n};\n\nBr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nBr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Br;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Button is a wrapper for the <button> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button\n */\nconst Button = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <button\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </button>\n );\n};\n\nButton.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nButton.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates the action of the element, overriding the action defined in the <form>.\n */\n 'formAction': PropTypes.string,\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this attribute sets the encoding type to use during form submission. If this attribute is specified, it overrides the enctype attribute of the button's form owner.\n */\n 'formEncType': PropTypes.string,\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this attribute sets the submission method to use during form submission (GET, POST, etc.). If this attribute is specified, it overrides the method attribute of the button's form owner.\n */\n 'formMethod': PropTypes.string,\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the novalidate attribute of the button's form owner.\n */\n 'formNoValidate': PropTypes.oneOfType([\n PropTypes.oneOf(['formNoValidate', 'formnovalidate', 'FORMNOVALIDATE']),\n PropTypes.bool\n ]),\n\n /**\n * If the button/input is a submit button (type=\"submit\"), this attribute specifies the browsing context (for example, tab, window, or inline frame) in which to display the response that is received after submitting the form. If this attribute is specified, it overrides the target attribute of the button's form owner.\n */\n 'formTarget': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Button;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Canvas is a wrapper for the <canvas> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas\n */\nconst Canvas = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <canvas\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </canvas>\n );\n};\n\nCanvas.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCanvas.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as <div>, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Canvas;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Caption is a wrapper for the <caption> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n */\nconst Caption = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <caption\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </caption>\n );\n};\n\nCaption.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCaption.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Caption;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Center is a wrapper for the <center> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center\n */\nconst Center = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <center\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </center>\n );\n};\n\nCenter.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCenter.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Center;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Cite is a wrapper for the <cite> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/cite\n */\nconst Cite = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <cite\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </cite>\n );\n};\n\nCite.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCite.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Cite;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Code is a wrapper for the <code> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code\n */\nconst Code = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <code\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </code>\n );\n};\n\nCode.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCode.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Code;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Col is a wrapper for the <col> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col\n */\nconst Col = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <col\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </col>\n );\n};\n\nCol.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nCol.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n *\n */\n 'span': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Col;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Colgroup is a wrapper for the <colgroup> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup\n */\nconst Colgroup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <colgroup\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </colgroup>\n );\n};\n\nColgroup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nColgroup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n *\n */\n 'span': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Colgroup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Content is a wrapper for the <content> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/content\n */\nconst Content = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <content\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </content>\n );\n};\n\nContent.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nContent.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Content;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Data is a wrapper for the <data> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/data\n */\nconst Data = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <data\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </data>\n );\n};\n\nData.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nData.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Data;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Datalist is a wrapper for the <datalist> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist\n */\nconst Datalist = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <datalist\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </datalist>\n );\n};\n\nDatalist.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDatalist.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Datalist;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dd is a wrapper for the <dd> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dd\n */\nconst Dd = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <dd\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </dd>\n );\n};\n\nDd.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDd.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dd;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Del is a wrapper for the <del> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del\n */\nconst Del = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <del\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </del>\n );\n};\n\nDel.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDel.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Indicates the date and time associated with the element.\n */\n 'dateTime': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Del;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Details is a wrapper for the <details> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details\n */\nconst Details = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <details\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </details>\n );\n};\n\nDetails.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDetails.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the contents are currently visible (in the case of a <details> element) or whether the dialog is active and can be interacted with (in the case of a <dialog> element).\n */\n 'open': PropTypes.oneOfType([\n PropTypes.oneOf(['open', 'OPEN']),\n PropTypes.bool\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Details;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dfn is a wrapper for the <dfn> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dfn\n */\nconst Dfn = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <dfn\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </dfn>\n );\n};\n\nDfn.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDfn.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dfn;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dialog is a wrapper for the <dialog> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog\n */\nconst Dialog = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <dialog\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </dialog>\n );\n};\n\nDialog.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDialog.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the contents are currently visible (in the case of a <details> element) or whether the dialog is active and can be interacted with (in the case of a <dialog> element).\n */\n 'open': PropTypes.oneOfType([\n PropTypes.oneOf(['open', 'OPEN']),\n PropTypes.bool\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dialog;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Div is a wrapper for the <div> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div\n */\nconst Div = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <div\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </div>\n );\n};\n\nDiv.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDiv.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Div;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dl is a wrapper for the <dl> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl\n */\nconst Dl = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <dl\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </dl>\n );\n};\n\nDl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dl;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Dt is a wrapper for the <dt> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dt\n */\nconst Dt = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <dt\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </dt>\n );\n};\n\nDt.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nDt.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Dt;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Em is a wrapper for the <em> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em\n */\nconst Em = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <em\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </em>\n );\n};\n\nEm.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nEm.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Em;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Embed is a wrapper for the <embed> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed\n */\nconst Embed = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <embed\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </embed>\n );\n};\n\nEmbed.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nEmbed.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as <div>, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Embed;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Fieldset is a wrapper for the <fieldset> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset\n */\nconst Fieldset = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <fieldset\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </fieldset>\n );\n};\n\nFieldset.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFieldset.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Fieldset;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Figcaption is a wrapper for the <figcaption> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption\n */\nconst Figcaption = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <figcaption\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </figcaption>\n );\n};\n\nFigcaption.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFigcaption.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Figcaption;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Figure is a wrapper for the <figure> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure\n */\nconst Figure = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <figure\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </figure>\n );\n};\n\nFigure.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFigure.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Figure;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Font is a wrapper for the <font> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font\n */\nconst Font = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <font\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </font>\n );\n};\n\nFont.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFont.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Font;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Footer is a wrapper for the <footer> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer\n */\nconst Footer = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <footer\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </footer>\n );\n};\n\nFooter.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFooter.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Footer;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Form is a wrapper for the <form> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form\n */\nconst Form = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <form\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </form>\n );\n};\n\nForm.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nForm.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * List of types the server accepts, typically a file type.\n */\n 'accept': PropTypes.string,\n\n /**\n * List of supported charsets.\n */\n 'acceptCharset': PropTypes.string,\n\n /**\n * The URI of a program that processes the information submitted via the form.\n */\n 'action': PropTypes.string,\n\n /**\n * Indicates whether controls in this form can by default have their values automatically completed by the browser.\n */\n 'autoComplete': PropTypes.string,\n\n /**\n * Defines the content type of the form data when the method is POST.\n */\n 'encType': PropTypes.string,\n\n /**\n * Defines which HTTP method to use when submitting the form. Can be GET (default) or POST.\n */\n 'method': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * This attribute indicates that the form shouldn't be validated when submitted.\n */\n 'noValidate': PropTypes.oneOfType([\n PropTypes.oneOf(['noValidate', 'novalidate', 'NOVALIDATE']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies where to open the linked document (in the case of an <a> element) or where to display the response received (in the case of a <form> element)\n */\n 'target': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Form;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Frame is a wrapper for the <frame> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frame\n */\nconst Frame = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <frame\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </frame>\n );\n};\n\nFrame.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFrame.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Frame;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Frameset is a wrapper for the <frameset> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/frameset\n */\nconst Frameset = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <frameset\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </frameset>\n );\n};\n\nFrameset.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nFrameset.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Frameset;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H1 is a wrapper for the <h1> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h1\n */\nconst H1 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <h1\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </h1>\n );\n};\n\nH1.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH1.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H1;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H2 is a wrapper for the <h2> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h2\n */\nconst H2 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <h2\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </h2>\n );\n};\n\nH2.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH2.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H2;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H3 is a wrapper for the <h3> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h3\n */\nconst H3 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <h3\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </h3>\n );\n};\n\nH3.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH3.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H3;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H4 is a wrapper for the <h4> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h4\n */\nconst H4 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <h4\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </h4>\n );\n};\n\nH4.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH4.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H4;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H5 is a wrapper for the <h5> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h5\n */\nconst H5 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <h5\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </h5>\n );\n};\n\nH5.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH5.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H5;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * H6 is a wrapper for the <h6> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/h6\n */\nconst H6 = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <h6\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </h6>\n );\n};\n\nH6.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nH6.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default H6;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Header is a wrapper for the <header> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header\n */\nconst Header = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <header\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </header>\n );\n};\n\nHeader.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nHeader.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Header;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Hgroup is a wrapper for the <hgroup> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hgroup\n */\nconst Hgroup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <hgroup\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </hgroup>\n );\n};\n\nHgroup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nHgroup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Hgroup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Hr is a wrapper for the <hr> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr\n */\nconst Hr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <hr\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </hr>\n );\n};\n\nHr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nHr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Hr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * I is a wrapper for the <i> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i\n */\nconst I = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <i\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </i>\n );\n};\n\nI.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nI.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default I;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Iframe is a wrapper for the <iframe> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe\n */\nconst Iframe = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <iframe\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </iframe>\n );\n};\n\nIframe.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nIframe.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies a feature-policy for the iframe.\n */\n 'allow': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Stops a document loaded in an iframe from using certain features (such as submitting forms or opening new windows).\n */\n 'sandbox': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n *\n */\n 'srcDoc': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as <div>, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Iframe;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Img is a wrapper for the <img> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img\n */\nconst Img = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <img\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </img>\n );\n};\n\nImg.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nImg.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Alternative text in case an image can't be displayed.\n */\n 'alt': PropTypes.string,\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n *\n */\n 'sizes': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * One or more responsive image candidates.\n */\n 'srcSet': PropTypes.string,\n\n /**\n *\n */\n 'useMap': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as <div>, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Img;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ins is a wrapper for the <ins> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins\n */\nconst Ins = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <ins\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </ins>\n );\n};\n\nIns.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nIns.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Indicates the date and time associated with the element.\n */\n 'dateTime': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ins;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Kbd is a wrapper for the <kbd> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd\n */\nconst Kbd = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <kbd\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </kbd>\n );\n};\n\nKbd.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nKbd.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Kbd;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Keygen is a wrapper for the <keygen> HTML5 element.\n *\n * DEPRECATED: <keygen> is included for completeness, but should be avoided\n * as it is not supported by all browsers and may be removed at any time from\n * those that do support it.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen\n */\nconst Keygen = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <keygen\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </keygen>\n );\n};\n\nKeygen.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nKeygen.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * A challenge string that is submitted along with the public key.\n */\n 'challenge': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Specifies the type of key generated.\n */\n 'keyType': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Keygen;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Label is a wrapper for the <label> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label\n */\nconst Label = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <label\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </label>\n );\n};\n\nLabel.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLabel.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Describes elements which belongs to this one.\n */\n 'htmlFor': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Label;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Legend is a wrapper for the <legend> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend\n */\nconst Legend = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <legend\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </legend>\n );\n};\n\nLegend.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLegend.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Legend;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Li is a wrapper for the <li> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li\n */\nconst Li = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <li\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </li>\n );\n};\n\nLi.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLi.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Li;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Link is a wrapper for the <link> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link\n */\nconst Link = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <link\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </link>\n );\n};\n\nLink.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nLink.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * The URL of a linked resource.\n */\n 'href': PropTypes.string,\n\n /**\n * Specifies the language of the linked resource.\n */\n 'hrefLang': PropTypes.string,\n\n /**\n * Specifies a Subresource Integrity value that allows browsers to verify what they fetch.\n */\n 'integrity': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * Specifies the relationship of the target object to the link object.\n */\n 'rel': PropTypes.string,\n\n /**\n *\n */\n 'sizes': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Link;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Main is a wrapper for the <main> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/main\n */\nconst Main = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <main\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </main>\n );\n};\n\nMain.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMain.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Main;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * MapEl is a wrapper for the <map> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map\n */\nconst MapEl = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <map\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </map>\n );\n};\n\nMapEl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMapEl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default MapEl;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Mark is a wrapper for the <mark> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/mark\n */\nconst Mark = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <mark\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </mark>\n );\n};\n\nMark.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMark.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Mark;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Marquee is a wrapper for the <marquee> HTML5 element.\n *\n * DEPRECATED: <marquee> is included for completeness, but should be avoided\n * as browsers may remove it at any time.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee\n */\nconst Marquee = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <marquee\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </marquee>\n );\n};\n\nMarquee.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMarquee.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the media should start playing from the start when it's finished.\n */\n 'loop': PropTypes.oneOfType([\n PropTypes.oneOf(['loop', 'LOOP']),\n PropTypes.bool\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Marquee;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Meta is a wrapper for the <meta> HTML5 element.\n *\n * CAUTION: <meta> is included for completeness, but generally will not behave\n * as expected since <meta> tags should be static HTML content in the <head> of\n * the document. Dash components are dynamic <body> content.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta\n */\nconst Meta = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <meta\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </meta>\n );\n};\n\nMeta.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMeta.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Declares the character encoding of the page or script.\n */\n 'charSet': PropTypes.string,\n\n /**\n * A value associated with http-equiv or name depending on the context.\n */\n 'content': PropTypes.string,\n\n /**\n * Defines a pragma directive.\n */\n 'httpEquiv': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Meta;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Meter is a wrapper for the <meter> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter\n */\nconst Meter = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <meter\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </meter>\n );\n};\n\nMeter.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nMeter.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates the lower bound of the upper range.\n */\n 'high': PropTypes.string,\n\n /**\n * Indicates the upper bound of the lower range.\n */\n 'low': PropTypes.string,\n\n /**\n * Indicates the maximum value allowed.\n */\n 'max': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates the minimum value allowed.\n */\n 'min': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates the optimal numeric value.\n */\n 'optimum': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Meter;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Nav is a wrapper for the <nav> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav\n */\nconst Nav = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <nav\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </nav>\n );\n};\n\nNav.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nNav.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Nav;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Nobr is a wrapper for the <nobr> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nobr\n */\nconst Nobr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <nobr\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </nobr>\n );\n};\n\nNobr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nNobr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Nobr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Noscript is a wrapper for the <noscript> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/noscript\n */\nconst Noscript = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <noscript\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </noscript>\n );\n};\n\nNoscript.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nNoscript.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Noscript;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * ObjectEl is a wrapper for the <object> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object\n */\nconst ObjectEl = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <object\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </object>\n );\n};\n\nObjectEl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nObjectEl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies the URL of the resource.\n */\n 'data': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n *\n */\n 'useMap': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as <div>, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default ObjectEl;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ol is a wrapper for the <ol> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol\n */\nconst Ol = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <ol\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </ol>\n );\n};\n\nOl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the list should be displayed in a descending order instead of an ascending order.\n */\n 'reversed': PropTypes.oneOfType([\n PropTypes.oneOf(['reversed', 'REVERSED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the first number if other than 1.\n */\n 'start': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ol;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Optgroup is a wrapper for the <optgroup> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup\n */\nconst Optgroup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <optgroup\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </optgroup>\n );\n};\n\nOptgroup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOptgroup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies a user-readable title of the element.\n */\n 'label': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Optgroup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Option is a wrapper for the <option> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option\n */\nconst Option = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <option\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </option>\n );\n};\n\nOption.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOption.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies a user-readable title of the element.\n */\n 'label': PropTypes.string,\n\n /**\n * Defines a value which will be selected on page load.\n */\n 'selected': PropTypes.oneOfType([\n PropTypes.oneOf(['selected', 'SELECTED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Option;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Output is a wrapper for the <output> HTML5 element.\n *\n * CAUTION: <output> is included for completeness, but its typical usage\n * requires the oninput attribute of the enclosing <form> element, which\n * is not accessible to Dash.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output\n */\nconst Output = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <output\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </output>\n );\n};\n\nOutput.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nOutput.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Describes elements which belongs to this one.\n */\n 'htmlFor': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Output;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * P is a wrapper for the <p> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p\n */\nconst P = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <p\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </p>\n );\n};\n\nP.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nP.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default P;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Param is a wrapper for the <param> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/param\n */\nconst Param = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <param\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </param>\n );\n};\n\nParam.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nParam.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Param;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Picture is a wrapper for the <picture> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture\n */\nconst Picture = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <picture\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </picture>\n );\n};\n\nPicture.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nPicture.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Picture;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Plaintext is a wrapper for the <plaintext> HTML5 element.\n *\n * OBSOLETE: <plaintext> is included for completeness, but should be avoided\n * as browsers may remove it at any time, and its behavior when added\n * dynamically by Dash is not what it would be statically on page load.\n * Use <pre> or <code> instead.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/plaintext\n */\nconst Plaintext = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <plaintext\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </plaintext>\n );\n};\n\nPlaintext.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nPlaintext.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Plaintext;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Pre is a wrapper for the <pre> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre\n */\nconst Pre = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <pre\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </pre>\n );\n};\n\nPre.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nPre.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Pre;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Progress is a wrapper for the <progress> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress\n */\nconst Progress = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <progress\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </progress>\n );\n};\n\nProgress.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nProgress.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates the maximum value allowed.\n */\n 'max': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Defines a default value which will be displayed in the element on page load.\n */\n 'value': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Progress;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Q is a wrapper for the <q> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/q\n */\nconst Q = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <q\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </q>\n );\n};\n\nQ.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nQ.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Contains a URI which points to the source of the quote or change.\n */\n 'cite': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Q;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rb is a wrapper for the <rb> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rb\n */\nconst Rb = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <rb\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rb>\n );\n};\n\nRb.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRb.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rb;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rp is a wrapper for the <rp> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rp\n */\nconst Rp = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <rp\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rp>\n );\n};\n\nRp.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRp.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rp;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rt is a wrapper for the <rt> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rt\n */\nconst Rt = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <rt\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rt>\n );\n};\n\nRt.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRt.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rt;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Rtc is a wrapper for the <rtc> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/rtc\n */\nconst Rtc = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <rtc\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </rtc>\n );\n};\n\nRtc.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRtc.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Rtc;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ruby is a wrapper for the <ruby> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby\n */\nconst Ruby = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <ruby\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </ruby>\n );\n};\n\nRuby.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nRuby.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ruby;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * S is a wrapper for the <s> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s\n */\nconst S = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <s\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </s>\n );\n};\n\nS.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nS.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default S;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Samp is a wrapper for the <samp> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/samp\n */\nconst Samp = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <samp\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </samp>\n );\n};\n\nSamp.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSamp.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Samp;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Script is a wrapper for the <script> HTML5 element.\n *\n * CAUTION: <script> is included for completeness, but you cannot execute\n * JavaScript code by providing it to a <script> element. Use a clientside\n * callback for this purpose instead.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script\n */\nconst Script = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <script\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </script>\n );\n};\n\nScript.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nScript.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Executes the script asynchronously.\n */\n 'async': PropTypes.oneOfType([\n PropTypes.oneOf(['async', 'ASYNC']),\n PropTypes.bool\n ]),\n\n /**\n * Declares the character encoding of the page or script.\n */\n 'charSet': PropTypes.string,\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Indicates that the script should be executed after the page has been parsed.\n */\n 'defer': PropTypes.oneOfType([\n PropTypes.oneOf(['defer', 'DEFER']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies a Subresource Integrity value that allows browsers to verify what they fetch.\n */\n 'integrity': PropTypes.string,\n\n /**\n * Specifies which referrer is sent when fetching the resource.\n */\n 'referrerPolicy': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Script;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Section is a wrapper for the <section> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section\n */\nconst Section = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <section\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </section>\n );\n};\n\nSection.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSection.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Section;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Select is a wrapper for the <select> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select\n */\nconst Select = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <select\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </select>\n );\n};\n\nSelect.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSelect.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether controls in this form can by default have their values automatically completed by the browser.\n */\n 'autoComplete': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Indicates whether multiple values can be entered in an input of the type email or file.\n */\n 'multiple': PropTypes.oneOfType([\n PropTypes.oneOf(['multiple', 'MULTIPLE']),\n PropTypes.bool\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Indicates whether this element is required to fill out or not.\n */\n 'required': PropTypes.oneOfType([\n PropTypes.oneOf(['required', 'REQUIRED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the width of the element (in pixels). If the element's type attribute is text or password then it's the number of characters.\n */\n 'size': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Select;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Shadow is a wrapper for the <shadow> HTML5 element.\n *\n * DEPRECATED: <shadow> is included for completeness, but should be avoided\n * as it is not supported by all browsers and may be removed at any time from\n * those that do support it.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/shadow\n */\nconst Shadow = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <shadow\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </shadow>\n );\n};\n\nShadow.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nShadow.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Shadow;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Slot is a wrapper for the <slot> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/slot\n */\nconst Slot = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <slot\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </slot>\n );\n};\n\nSlot.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSlot.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Slot;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Small is a wrapper for the <small> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/small\n */\nconst Small = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <small\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </small>\n );\n};\n\nSmall.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSmall.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Small;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Source is a wrapper for the <source> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source\n */\nconst Source = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <source\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </source>\n );\n};\n\nSource.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSource.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Specifies a hint of the media for which the linked resource was designed.\n */\n 'media': PropTypes.string,\n\n /**\n *\n */\n 'sizes': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * One or more responsive image candidates.\n */\n 'srcSet': PropTypes.string,\n\n /**\n * Defines the type of the element.\n */\n 'type': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Source;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Spacer is a wrapper for the <spacer> HTML5 element.\n *\n * OBSOLETE: <spacer> is included for completeness, but should be avoided\n * as it is not supported by any modern browsers.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/spacer\n */\nconst Spacer = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <spacer\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </spacer>\n );\n};\n\nSpacer.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSpacer.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Spacer;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Span is a wrapper for the <span> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span\n */\nconst Span = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <span\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </span>\n );\n};\n\nSpan.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSpan.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Span;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Strike is a wrapper for the <strike> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strike\n */\nconst Strike = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <strike\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </strike>\n );\n};\n\nStrike.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nStrike.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Strike;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Strong is a wrapper for the <strong> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/strong\n */\nconst Strong = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <strong\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </strong>\n );\n};\n\nStrong.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nStrong.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Strong;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Sub is a wrapper for the <sub> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sub\n */\nconst Sub = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <sub\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </sub>\n );\n};\n\nSub.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSub.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Sub;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Summary is a wrapper for the <summary> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/summary\n */\nconst Summary = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <summary\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </summary>\n );\n};\n\nSummary.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSummary.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Summary;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Sup is a wrapper for the <sup> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/sup\n */\nconst Sup = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <sup\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </sup>\n );\n};\n\nSup.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nSup.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Sup;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Table is a wrapper for the <table> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table\n */\nconst Table = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <table\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </table>\n );\n};\n\nTable.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTable.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Table;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Tbody is a wrapper for the <tbody> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody\n */\nconst Tbody = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <tbody\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </tbody>\n );\n};\n\nTbody.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTbody.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Tbody;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Td is a wrapper for the <td> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td\n */\nconst Td = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <td\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </td>\n );\n};\n\nTd.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTd.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The colspan attribute defines the number of columns a cell should span.\n */\n 'colSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * IDs of the <th> elements which applies to this element.\n */\n 'headers': PropTypes.string,\n\n /**\n * Defines the number of rows a table cell should span over.\n */\n 'rowSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Td;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Template is a wrapper for the <template> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template\n */\nconst Template = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <template\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </template>\n );\n};\n\nTemplate.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTemplate.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Template;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Textarea is a wrapper for the <textarea> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea\n */\nconst Textarea = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <textarea\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </textarea>\n );\n};\n\nTextarea.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTextarea.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates whether controls in this form can by default have their values automatically completed by the browser.\n */\n 'autoComplete': PropTypes.string,\n\n /**\n * The element should be automatically focused after the page loaded.\n */\n 'autoFocus': PropTypes.oneOfType([\n PropTypes.oneOf(['autoFocus', 'autofocus', 'AUTOFOCUS']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the number of columns in a textarea.\n */\n 'cols': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates whether the user can interact with the element.\n */\n 'disabled': PropTypes.oneOfType([\n PropTypes.oneOf(['disabled', 'DISABLED']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates the form that is the owner of the element.\n */\n 'form': PropTypes.string,\n\n /**\n * Provides a hint as to the type of data that might be entered by the user while editing the element or its contents. The attribute can be used with form controls (such as the value of textarea elements), or in elements in an editing host (e.g., using contenteditable attribute).\n */\n 'inputMode': PropTypes.string,\n\n /**\n * Defines the maximum number of characters allowed in the element.\n */\n 'maxLength': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Defines the minimum number of characters allowed in the element.\n */\n 'minLength': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Name of the element. For example used by the server to identify the fields in form submits.\n */\n 'name': PropTypes.string,\n\n /**\n * Provides a hint to the user of what can be entered in the field.\n */\n 'placeholder': PropTypes.string,\n\n /**\n * Indicates whether the element can be edited.\n */\n 'readOnly': PropTypes.string,\n\n /**\n * Indicates whether this element is required to fill out or not.\n */\n 'required': PropTypes.oneOfType([\n PropTypes.oneOf(['required', 'REQUIRED']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the number of rows in a text area.\n */\n 'rows': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates whether the text should be wrapped.\n */\n 'wrap': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Textarea;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Tfoot is a wrapper for the <tfoot> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot\n */\nconst Tfoot = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <tfoot\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </tfoot>\n );\n};\n\nTfoot.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTfoot.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Tfoot;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Th is a wrapper for the <th> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th\n */\nconst Th = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <th\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </th>\n );\n};\n\nTh.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTh.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The colspan attribute defines the number of columns a cell should span.\n */\n 'colSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * IDs of the <th> elements which applies to this element.\n */\n 'headers': PropTypes.string,\n\n /**\n * Defines the number of rows a table cell should span over.\n */\n 'rowSpan': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Defines the cells that the header test (defined in the th element) relates to.\n */\n 'scope': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Th;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Thead is a wrapper for the <thead> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead\n */\nconst Thead = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <thead\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </thead>\n );\n};\n\nThead.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nThead.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Thead;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Time is a wrapper for the <time> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/time\n */\nconst Time = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <time\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </time>\n );\n};\n\nTime.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTime.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates the date and time associated with the element.\n */\n 'dateTime': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Time;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Title is a wrapper for the <title> HTML5 element.\n *\n * CAUTION: <title> is included for completeness, but is not expected to\n * do anything outside of <head>. Dash components are always created in the\n * <body>.\n *\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title\n */\nconst Title = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <title\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </title>\n );\n};\n\nTitle.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTitle.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Title;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Tr is a wrapper for the <tr> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr\n */\nconst Tr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <tr\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </tr>\n );\n};\n\nTr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Tr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Track is a wrapper for the <track> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/track\n */\nconst Track = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <track\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </track>\n );\n};\n\nTrack.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nTrack.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Indicates that the track should be enabled unless the user's preferences indicate something different.\n */\n 'default': PropTypes.oneOfType([\n PropTypes.oneOf(['default', 'DEFAULT']),\n PropTypes.bool\n ]),\n\n /**\n * Specifies the kind of text track.\n */\n 'kind': PropTypes.string,\n\n /**\n * Specifies a user-readable title of the element.\n */\n 'label': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n *\n */\n 'srcLang': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Track;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * U is a wrapper for the <u> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u\n */\nconst U = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <u\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </u>\n );\n};\n\nU.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nU.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default U;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Ul is a wrapper for the <ul> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul\n */\nconst Ul = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <ul\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </ul>\n );\n};\n\nUl.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nUl.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Ul;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Var is a wrapper for the <var> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var\n */\nconst Var = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <var\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </var>\n );\n};\n\nVar.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nVar.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Var;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Video is a wrapper for the <video> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video\n */\nconst Video = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <video\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </video>\n );\n};\n\nVideo.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nVideo.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * The audio or video should play as soon as possible.\n */\n 'autoPlay': PropTypes.oneOfType([\n PropTypes.oneOf(['autoPlay', 'autoplay', 'AUTOPLAY']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the browser should show playback controls to the user.\n */\n 'controls': PropTypes.oneOfType([\n PropTypes.oneOf(['controls', 'CONTROLS']),\n PropTypes.bool\n ]),\n\n /**\n * How the element handles cross-origin requests\n */\n 'crossOrigin': PropTypes.string,\n\n /**\n * Specifies the height of elements listed here. For all other elements, use the CSS height property. Note: In some instances, such as <div>, this is a legacy attribute, in which case the CSS height property should be used instead.\n */\n 'height': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Indicates whether the media should start playing from the start when it's finished.\n */\n 'loop': PropTypes.oneOfType([\n PropTypes.oneOf(['loop', 'LOOP']),\n PropTypes.bool\n ]),\n\n /**\n * Indicates whether the audio will be initially silenced on page load.\n */\n 'muted': PropTypes.oneOfType([\n PropTypes.oneOf(['muted', 'MUTED']),\n PropTypes.bool\n ]),\n\n /**\n * A URL indicating a poster frame to show until the user plays or seeks.\n */\n 'poster': PropTypes.string,\n\n /**\n * Indicates whether the whole resource, parts of it or nothing should be preloaded.\n */\n 'preload': PropTypes.string,\n\n /**\n * The URL of the embeddable content.\n */\n 'src': PropTypes.string,\n\n /**\n * For the elements listed here, this establishes the element's width. Note: For all other instances, such as <div>, this is a legacy attribute, in which case the CSS width property should be used instead.\n */\n 'width': PropTypes.oneOfType([\n PropTypes.string,\n PropTypes.number\n ]),\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Video;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Wbr is a wrapper for the <wbr> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/wbr\n */\nconst Wbr = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <wbr\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </wbr>\n );\n};\n\nWbr.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nWbr.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Wbr;\n","\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport {omit} from 'ramda';\n\n/**\n * Xmp is a wrapper for the <xmp> HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/xmp\n */\nconst Xmp = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n /* remove unnecessary onClick event listeners */\n const isStatic = props.disable_n_clicks || !props.id;\n return (\n <xmp\n {...(!isStatic && {onClick:\n () => props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps', 'disable_n_clicks'], props)}\n {...dataAttributes}\n >\n {props.children}\n </xmp>\n );\n};\n\nXmp.defaultProps = {\n n_clicks: 0,\n n_clicks_timestamp: -1,\n};\n\nXmp.propTypes = {\n /**\n * The ID of this component, used to identify dash components\n * in callbacks. The ID needs to be unique across all of the\n * components in an app.\n */\n 'id': PropTypes.string,\n\n /**\n * The children of this component\n */\n 'children': PropTypes.node,\n\n /**\n * An integer that represents the number of times\n * that this element has been clicked on.\n */\n 'n_clicks': PropTypes.number,\n\n /**\n * An integer that represents the time (in ms since 1970)\n * at which n_clicks changed. This can be used to tell\n * which button was changed most recently.\n */\n 'n_clicks_timestamp': PropTypes.number,\n\n /**\n * When True, this will disable the n_clicks prop. Use this to remove\n * event listeners that may interfere with screen readers.\n */\n 'disable_n_clicks': PropTypes.bool,\n\n /**\n * A unique identifier for the component, used to improve\n * performance by React.js while rendering components\n * See https://reactjs.org/docs/lists-and-keys.html for more info\n */\n 'key': PropTypes.string,\n\n /**\n * A wildcard data attribute\n */\n 'data-*': PropTypes.string,\n\n /**\n * A wildcard aria attribute\n */\n 'aria-*': PropTypes.string,\n\n /**\n * Keyboard shortcut to activate or add focus to the element.\n */\n 'accessKey': PropTypes.string,\n\n /**\n * Often used with CSS to style elements with common properties.\n */\n 'className': PropTypes.string,\n\n /**\n * Indicates whether the element's content is editable.\n */\n 'contentEditable': PropTypes.string,\n\n /**\n * Defines the ID of a <menu> element which will serve as the element's context menu.\n */\n 'contextMenu': PropTypes.string,\n\n /**\n * Defines the text direction. Allowed values are ltr (Left-To-Right) or rtl (Right-To-Left)\n */\n 'dir': PropTypes.string,\n\n /**\n * Defines whether the element can be dragged.\n */\n 'draggable': PropTypes.string,\n\n /**\n * Prevents rendering of given element, while keeping child elements, e.g. script elements, active.\n */\n 'hidden': PropTypes.oneOfType([\n PropTypes.oneOf(['hidden', 'HIDDEN']),\n PropTypes.bool\n ]),\n\n /**\n * Defines the language used in the element.\n */\n 'lang': PropTypes.string,\n\n /**\n * Defines an explicit role for an element for use by assistive technologies.\n */\n 'role': PropTypes.string,\n\n /**\n * Indicates whether spell checking is allowed for the element.\n */\n 'spellCheck': PropTypes.string,\n\n /**\n * Defines CSS styles which will override styles previously set.\n */\n 'style': PropTypes.object,\n\n /**\n * Overrides the browser's default tab order and follows the one specified instead.\n */\n 'tabIndex': PropTypes.string,\n\n /**\n * Text to be displayed in a tooltip when hovering over the element.\n */\n 'title': PropTypes.string,\n\n /**\n * Object that holds the loading state object coming from dash-renderer\n */\n 'loading_state': PropTypes.shape({\n /**\n * Determines if the component is loading or not\n */\n is_loading: PropTypes.bool,\n /**\n * Holds which property is loading\n */\n prop_name: PropTypes.string,\n /**\n * Holds the name of the component that is loading\n */\n component_name: PropTypes.string,\n }),\n\n /**\n * Dash-assigned callback that gets fired when the element is clicked.\n */\n 'setProps': PropTypes.func\n};\n\nexport default Xmp;\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","window","_isPlaceholder","fn","f1","arguments","length","apply","this","f2","b","_b","_a","Array","isArray","iterator","toString","keys","Number","isInteger","is","Date","toISOString","assign","names","result","index","idx","len","String","trim","A","props","dataAttributes","loading_state","is_loading","isStatic","disable_n_clicks","id","onClick","setProps","n_clicks","n_clicks_timestamp","now","omit","children","defaultProps","propTypes","PropTypes","prop_name","component_name","Abbr","Acronym","Address","Area","Article","Aside","Audio","B","Base","Basefont","Bdi","Bdo","Big","Blink","Blockquote","Br","Button","Canvas","Caption","Center","Cite","Code","Col","Colgroup","Content","Data","Datalist","Dd","Del","Details","Dfn","Dialog","Div","Dl","Dt","Em","Embed","Fieldset","Figcaption","Figure","Font","Footer","Form","Frame","Frameset","H1","H2","H3","H4","H5","H6","Header","Hgroup","Hr","I","Iframe","Img","Ins","Kbd","Keygen","Label","Legend","Li","Link","Main","MapEl","Mark","Marquee","Meta","Meter","Nav","Nobr","Noscript","ObjectEl","Ol","Optgroup","Option","Output","P","Param","Picture","Plaintext","Pre","Progress","Q","Rb","Rp","Rt","Rtc","Ruby","S","Samp","Script","Section","Select","Shadow","Slot","Small","Source","Spacer","Span","Strike","Strong","Sub","Summary","Sup","Table","Tbody","Td","Template","Textarea","Tfoot","Th","Thead","Time","Title","Tr","Track","U","Ul","Var","Video","Wbr","Xmp"],"sourceRoot":""} \ No newline at end of file diff --git a/dash/html/metadata.json b/dash/html/metadata.json index aaf9bd2a92..3cd639f88e 100644 --- a/dash/html/metadata.json +++ b/dash/html/metadata.json @@ -40,6 +40,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -300,6 +307,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -504,6 +518,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -708,6 +729,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -912,6 +940,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -1186,6 +1221,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -1390,6 +1432,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -1594,6 +1643,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -1923,6 +1979,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -2127,6 +2190,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -2345,6 +2415,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -2549,6 +2626,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -2753,6 +2837,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -2957,6 +3048,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -3161,6 +3259,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -3365,6 +3470,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -3576,6 +3688,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -3780,6 +3899,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -4123,6 +4249,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -4357,6 +4490,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -4561,6 +4701,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -4765,6 +4912,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -4969,6 +5123,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -5173,6 +5334,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -5384,6 +5552,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -5595,6 +5770,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -5799,6 +5981,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -6010,6 +6199,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -6214,6 +6410,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -6418,6 +6621,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -6636,6 +6846,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -6865,6 +7082,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -7069,6 +7293,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -7298,6 +7529,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -7502,6 +7740,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -7706,6 +7951,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -7910,6 +8162,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -8114,6 +8373,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -8362,6 +8628,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -8605,6 +8878,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -8809,6 +9089,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -9013,6 +9300,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -9217,6 +9511,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -9421,6 +9722,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -9710,6 +10018,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -9914,6 +10229,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -10118,6 +10440,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -10322,6 +10651,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -10526,6 +10862,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -10730,6 +11073,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -10934,6 +11284,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -11138,6 +11495,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -11342,6 +11706,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -11546,6 +11917,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -11750,6 +12128,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -11954,6 +12339,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -12158,6 +12550,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -12434,6 +12833,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -12717,6 +13123,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -12935,6 +13348,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -13139,6 +13559,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -13425,6 +13852,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -13643,6 +14077,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -13847,6 +14288,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -14058,6 +14506,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -14325,6 +14780,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -14529,6 +14991,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -14740,6 +15209,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -14944,6 +15420,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -15173,6 +15656,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -15405,6 +15895,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -15674,6 +16171,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -15878,6 +16382,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -16082,6 +16593,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -16286,6 +16804,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -16555,6 +17080,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -16798,6 +17330,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -17034,6 +17573,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -17302,6 +17848,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -17527,6 +18080,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -17731,6 +18291,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -17949,6 +18516,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -18153,6 +18727,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -18357,6 +18938,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -18561,6 +19149,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -18794,6 +19389,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -19005,6 +19607,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -19209,6 +19818,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -19413,6 +20029,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -19617,6 +20240,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -19821,6 +20451,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -20025,6 +20662,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -20229,6 +20873,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -20433,6 +21084,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -20729,6 +21387,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -20933,6 +21598,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -21277,6 +21949,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -21481,6 +22160,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -21685,6 +22371,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -21889,6 +22582,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -22128,6 +22828,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -22332,6 +23039,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -22536,6 +23250,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -22740,6 +23461,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -22944,6 +23672,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -23148,6 +23883,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -23352,6 +24094,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -23556,6 +24305,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -23760,6 +24516,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -23964,6 +24727,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -24205,6 +24975,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -24409,6 +25186,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -24801,6 +25585,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -25005,6 +25796,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -25253,6 +26051,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -25457,6 +26262,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -25668,6 +26480,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -25872,6 +26691,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -26076,6 +26902,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -26333,6 +27166,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -26537,6 +27377,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -26741,6 +27588,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -26945,6 +27799,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -27311,6 +28172,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" @@ -27515,6 +28383,13 @@ "computed": false } }, + "disable_n_clicks": { + "type": { + "name": "bool" + }, + "required": false, + "description": "When True, this will disable the n_clicks prop. Use this to remove\nevent listeners that may interfere with screen readers." + }, "key": { "type": { "name": "string" diff --git a/dash/html/package-info.json b/dash/html/package-info.json index 3a65587b36..808d28db80 100644 --- a/dash/html/package-info.json +++ b/dash/html/package-info.json @@ -1,6 +1,6 @@ { "name": "dash-html-components", - "version": "2.0.7", + "version": "2.0.8", "description": "Vanilla HTML components for Dash", "main": "lib/index.js", "repository": {
    HTML5 element.\n * For detailed attribute info see:\n * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption\n */\nconst Caption = (props) => {\n const dataAttributes = {};\n if(props.loading_state && props.loading_state.is_loading) {\n dataAttributes['data-dash-is-loading'] = true;\n }\n\n return (\n props.setProps({\n n_clicks: props.n_clicks + 1,\n n_clicks_timestamp: Date.now()\n })}\n {...omit(['n_clicks', 'n_clicks_timestamp', 'loading_state', 'setProps'], props)}\n {...dataAttributes}\n >\n {props.children}\n