jupyterlab 4.0.0a35__py3-none-any.whl → 4.0.0a36__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jupyterlab/_version.py +1 -1
- jupyterlab/extensions/pypi.py +3 -1
- jupyterlab/galata/@jupyterlab/galata-extension/build_log.json +110 -100
- jupyterlab/galata/@jupyterlab/galata-extension/package.json +14 -14
- jupyterlab/galata/@jupyterlab/galata-extension/static/{remoteEntry.4244c175131476dd62d7.js → remoteEntry.bad0ab5ce64f7f5c8312.js} +3 -3
- jupyterlab/node-version-check.js +0 -1
- jupyterlab/schemas/@jupyterlab/application-extension/package.json.orig +16 -16
- jupyterlab/schemas/@jupyterlab/apputils-extension/package.json.orig +21 -20
- jupyterlab/schemas/@jupyterlab/apputils-extension/sanitizer.json +6 -0
- jupyterlab/schemas/@jupyterlab/cell-toolbar-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/celltags-extension/package.json.orig +63 -0
- jupyterlab/schemas/@jupyterlab/celltags-extension/plugin.json +33 -0
- jupyterlab/schemas/@jupyterlab/codemirror-extension/package.json.orig +12 -12
- jupyterlab/schemas/@jupyterlab/completer-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/console-extension/package.json.orig +19 -19
- jupyterlab/schemas/@jupyterlab/csvviewer-extension/package.json.orig +13 -13
- jupyterlab/schemas/@jupyterlab/debugger-extension/package.json.orig +18 -18
- jupyterlab/schemas/@jupyterlab/docmanager-extension/package.json.orig +18 -18
- jupyterlab/schemas/@jupyterlab/documentsearch-extension/package.json.orig +8 -8
- jupyterlab/schemas/@jupyterlab/extensionmanager-extension/package.json.orig +8 -8
- jupyterlab/schemas/@jupyterlab/filebrowser-extension/package.json.orig +17 -17
- jupyterlab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +28 -27
- jupyterlab/schemas/@jupyterlab/help-extension/package.json.orig +13 -13
- jupyterlab/schemas/@jupyterlab/htmlviewer-extension/package.json.orig +10 -10
- jupyterlab/schemas/@jupyterlab/hub-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/imageviewer-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/inspector-extension/package.json.orig +10 -10
- jupyterlab/schemas/@jupyterlab/launcher-extension/package.json.orig +11 -11
- jupyterlab/schemas/@jupyterlab/logconsole-extension/package.json.orig +15 -15
- jupyterlab/schemas/@jupyterlab/lsp-extension/package.json.orig +11 -11
- jupyterlab/schemas/@jupyterlab/mainmenu-extension/package.json.orig +14 -14
- jupyterlab/schemas/@jupyterlab/markdownviewer-extension/package.json.orig +10 -10
- jupyterlab/schemas/@jupyterlab/metadataform-extension/package.json.orig +9 -9
- jupyterlab/schemas/@jupyterlab/notebook-extension/package.json.orig +44 -39
- jupyterlab/schemas/@jupyterlab/notebook-extension/tools.json +143 -0
- jupyterlab/schemas/@jupyterlab/notebook-extension/tracker.json +3 -3
- jupyterlab/schemas/@jupyterlab/running-extension/package.json.orig +14 -14
- jupyterlab/schemas/@jupyterlab/settingeditor-extension/package.json.orig +12 -12
- jupyterlab/schemas/@jupyterlab/shortcuts-extension/package.json.orig +14 -14
- jupyterlab/schemas/@jupyterlab/statusbar-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/terminal-extension/package.json.orig +14 -14
- jupyterlab/schemas/@jupyterlab/toc-extension/package.json.orig +7 -7
- jupyterlab/schemas/@jupyterlab/tooltip-extension/package.json.orig +15 -15
- jupyterlab/schemas/@jupyterlab/translation-extension/package.json.orig +7 -7
- jupyterlab/semver.py +1 -1
- jupyterlab/staging/package.json +153 -149
- jupyterlab/staging/yarn.lock +1965 -1938
- jupyterlab/static/{2091.bd1d16d1337fa22555ee.js → 2091.f770bddee64cc71cbb38.js} +2 -2
- jupyterlab/static/{2646.9f05e0771a4f037dca74.js → 2646.7f21306af05485d0bc39.js} +2 -2
- jupyterlab/static/2800.14c52357e80a857341c2.js +2 -0
- jupyterlab/static/2990.6dd42ddb50a872f3a914.js +2 -0
- jupyterlab/static/3547.f1596a95dc36296cdb06.js +2 -0
- jupyterlab/static/3783.d68dff3a9631f0665413.js +2 -0
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/383.f4744cd0de1e1c8920f2.js → jupyterlab/static/383.9b32cc3cdf831a212dbe.js +2 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/4008.4d194c49554e57f366c7.js → jupyterlab/static/4008.b915ce51b76e4eea444a.js +3 -3
- jupyterlab/static/{5070.c2c3872b77c88e1d2f6d.js → 4207.216305846d1afcde3718.js} +2 -2
- jupyterlab/static/4405.2a2632db9de9492d375b.js +2 -0
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/49.baf8c7be6d15f0d9608b.js → jupyterlab/static/49.ced85eba3bfd117cd00f.js +2 -2
- jupyterlab/static/4986.04c2fe2a543c02880ba9.js +2 -0
- jupyterlab/static/6888.7fab95080c34bfe2cfd0.js +2 -0
- jupyterlab/static/812.f31a0b0d1a5719e044c8.js +2 -0
- jupyterlab/static/{8302.360d573de8ff429363ad.js → 8302.9c4fa45b6f90d0c97e69.js} +2 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/8768.852fee3a754ef67f9529.js → jupyterlab/static/8768.a81e5b90356c6d3f905d.js +3 -3
- jupyterlab/static/8823.bff403d7f8fdfcc8e770.js +2 -0
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/9.b85eb270581c06f724c5.js → jupyterlab/static/9.16e9cdccbe815399d46d.js +2 -2
- jupyterlab/static/9065.c22fad1c8445f09b60ba.js +2 -0
- jupyterlab/static/build_log.json +116 -108
- jupyterlab/static/index.html +1 -1
- jupyterlab/static/jlab_core.96941e5e852fedd23450.js +2 -0
- jupyterlab/static/main.20e744f8e1918f54d90d.js +2 -0
- jupyterlab/static/package.json +153 -149
- jupyterlab/static/third-party-licenses.json +168 -174
- jupyterlab/tests/mock_packages/extension/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/consumer/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/provider/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/token/package.json +2 -2
- jupyterlab/tests/mock_packages/mimeextension/package.json +1 -1
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/package.json.orig +16 -16
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/package.json.orig +21 -20
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/sanitizer.json +6 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/cell-toolbar-extension/package.json.orig +7 -7
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/celltags-extension/package.json.orig +63 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/celltags-extension/plugin.json +33 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/codemirror-extension/package.json.orig +12 -12
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/completer-extension/package.json.orig +7 -7
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/package.json.orig +19 -19
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/package.json.orig +13 -13
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/debugger-extension/package.json.orig +18 -18
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/package.json.orig +18 -18
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/documentsearch-extension/package.json.orig +8 -8
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/extensionmanager-extension/package.json.orig +8 -8
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/package.json.orig +17 -17
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +83 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/package.json.orig +13 -13
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/htmlviewer-extension/package.json.orig +10 -10
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/hub-extension/package.json.orig +7 -7
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/imageviewer-extension/package.json.orig +7 -7
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/package.json.orig +10 -10
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/launcher-extension/package.json.orig +11 -11
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/logconsole-extension/package.json.orig +15 -15
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/lsp-extension/package.json.orig +11 -11
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/mainmenu-extension/package.json.orig +14 -14
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/markdownviewer-extension/package.json.orig +10 -10
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/metadataform-extension/package.json.orig +9 -9
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/package.json.orig +93 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tools.json +143 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json +3 -3
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/running-extension/package.json.orig +14 -14
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/package.json.orig +12 -12
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/shortcuts-extension/package.json.orig +14 -14
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/statusbar-extension/package.json.orig +7 -7
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/terminal-extension/package.json.orig +14 -14
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/toc-extension/package.json.orig +7 -7
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/package.json.orig +15 -15
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/translation-extension/package.json.orig +7 -7
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/2091.bd1d16d1337fa22555ee.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2091.f770bddee64cc71cbb38.js +2 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/2646.9f05e0771a4f037dca74.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2646.7f21306af05485d0bc39.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2800.14c52357e80a857341c2.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2990.6dd42ddb50a872f3a914.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/3547.f1596a95dc36296cdb06.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/3783.d68dff3a9631f0665413.js +2 -0
- jupyterlab/static/383.f4744cd0de1e1c8920f2.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/383.9b32cc3cdf831a212dbe.js +2 -2
- jupyterlab/static/4008.4d194c49554e57f366c7.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4008.b915ce51b76e4eea444a.js +3 -3
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/5070.c2c3872b77c88e1d2f6d.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4207.216305846d1afcde3718.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4405.2a2632db9de9492d375b.js +2 -0
- jupyterlab/static/49.baf8c7be6d15f0d9608b.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/49.ced85eba3bfd117cd00f.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4986.04c2fe2a543c02880ba9.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/6888.7fab95080c34bfe2cfd0.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/812.f31a0b0d1a5719e044c8.js +2 -0
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/8302.360d573de8ff429363ad.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8302.9c4fa45b6f90d0c97e69.js +2 -2
- jupyterlab/static/8768.852fee3a754ef67f9529.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8768.a81e5b90356c6d3f905d.js +3 -3
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8823.bff403d7f8fdfcc8e770.js +2 -0
- jupyterlab/static/9.b85eb270581c06f724c5.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/9.16e9cdccbe815399d46d.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/9065.c22fad1c8445f09b60ba.js +2 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/build_log.json +116 -108
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/index.html +1 -1
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/jlab_core.96941e5e852fedd23450.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/main.20e744f8e1918f54d90d.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/package.json +321 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/third-party-licenses.json +168 -174
- {jupyterlab-4.0.0a35.dist-info → jupyterlab-4.0.0a36.dist-info}/METADATA +4 -4
- {jupyterlab-4.0.0a35.dist-info → jupyterlab-4.0.0a36.dist-info}/RECORD +379 -371
- jupyterlab/static/2800.16d71ffa4e49ede65248.js +0 -2
- jupyterlab/static/2990.ae4cac57633852d78ace.js +0 -2
- jupyterlab/static/3547.d8386812970c3ca0cb33.js +0 -2
- jupyterlab/static/3783.75d5c774397d9db2a6ef.js +0 -2
- jupyterlab/static/4986.e578a4291819fec6d1c4.js +0 -2
- jupyterlab/static/6269.3431fb9d9d780c0af4e9.js +0 -2
- jupyterlab/static/6888.38cf56f2ba12dfb8ab0d.js +0 -2
- jupyterlab/static/812.da9b1205d52814f0e613.js +0 -2
- jupyterlab/static/8823.a0fc337e55dfe2e131ee.js +0 -2
- jupyterlab/static/jlab_core.f96460172813e60251da.js +0 -2
- jupyterlab/static/main.95c9685538cf2359800e.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +0 -82
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/package.json.orig +0 -88
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/2800.16d71ffa4e49ede65248.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/2990.ae4cac57633852d78ace.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/3547.d8386812970c3ca0cb33.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/3783.75d5c774397d9db2a6ef.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/4986.e578a4291819fec6d1c4.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/6269.3431fb9d9d780c0af4e9.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/6888.38cf56f2ba12dfb8ab0d.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/812.da9b1205d52814f0e613.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/8823.a0fc337e55dfe2e131ee.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/jlab_core.f96460172813e60251da.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/main.95c9685538cf2359800e.js +0 -2
- jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/package.json +0 -317
- /jupyterlab/static/{4008.4d194c49554e57f366c7.js.LICENSE.txt → 4008.b915ce51b76e4eea444a.js.LICENSE.txt} +0 -0
- /jupyterlab/static/{8768.852fee3a754ef67f9529.js.LICENSE.txt → 8768.a81e5b90356c6d3f905d.js.LICENSE.txt} +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/etc/jupyter/jupyter_notebook_config.d/jupyterlab.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/etc/jupyter/jupyter_server_config.d/jupyterlab.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/commands.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/context-menu.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/property-inspector.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/shell.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/top-bar.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/notification.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/palette.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/print.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/themes.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/workspaces.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/cell-toolbar-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/codemirror-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/completer-extension/manager.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/completer.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/foreign.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/tracker.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/csv.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/tsv.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/debugger-extension/main.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/download.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/documentsearch-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/extensionmanager-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/browser.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/download.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/open-browser-tab.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/open-with.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/widget.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/completer.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/about.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/jupyter-forum.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/launch-classic.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/htmlviewer-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/hub-extension/menu.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/imageviewer-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/consoles.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/inspector.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/notebooks.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/launcher-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/logconsole-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/lsp-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/mainmenu-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/markdownviewer-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/metadataform-extension/metadataforms.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/completer.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/export.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/panel.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/running-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/form-ui.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/shortcuts-extension/shortcuts.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/statusbar-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/terminal-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/toc-extension/registry.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/consoles.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/files.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/notebooks.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/translation-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1036.f6c57d1265adca83594e.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1036.f6c57d1265adca83594e.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1085.36072613d5461d9bc753.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1142.228652acc76ea404048d.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1168.6a7f50ce99d9120d558d.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1294.d1735230fc7e9a21e8ad.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1410.8dd0e390c69996cecb38.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1420.78e8c0a87a74a5c616ed.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1452.40a07727b78492442421.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1467.3ee02202fa11332e5b99.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1550.373973a4651e6d0cf8b8.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1581.41bb01f5d4047061f002.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1581.41bb01f5d4047061f002.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1608.cf6b65b59e4ff19b5622.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1716.9bf4d1620425b087fc9a.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1776.5218a3aec719d764977f.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1861.762ed9052ac12c338de6.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1903.73f4b592ee795a6b61ab.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1945.dd876fc4110972ab9979.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1954.8b80dffad1ab65f151b3.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1993.2f82b3bafd40aa9605d3.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2039.7b8fad64fe512bdd5632.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2090.7c57efa83d49c74accca.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2104.fcc8c0f01e052700b3b0.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2145.2ed879d424a6ee02d531.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2254.13d594629c684d67a6b2.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2295.cf513646f24b357692bc.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2320.24d37d8ae619f877e334.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2363.d86742077aed696694b9.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2459.33094feaa394e0b72837.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2485.2b62703ab935947006af.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2617.af93dca9ab5f243bf60e.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2829.d72b2ee221fa5ba98c38.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2857.008f1a1c91b1fa06999e.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2909.9a160a86a2172c389238.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/292.7c2a7b3af0bd14d7f49e.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2929.686155e4d274cfa9cd32.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2995.960715f713d01070e5a7.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3056.7ac8b30ccd5aad42e0c7.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3123.1df15835a1681fb411f4.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3127.0bd0b2da7c02c81dc7d7.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3306.19d86a7230d467f0a01a.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3308.49c993cd8597acb46935.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3528.c34d6dc8140ed3d19f4d.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3549.05e5283aa1815f6c0b86.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3601.92dd7c517619f0141013.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/373c04fd2418f5c77eea.eot +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/378.1bd75509552813ebea37.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3807.33034141b48b767e6974.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3923.7ffdf2670160c7be7da5.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3935.200aeb85f6884cbd976d.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3935.200aeb85f6884cbd976d.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3962.68d34fc6c9af390e95f2.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3f6d3488cf65374f6f67.woff +0 -0
- /jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/4008.4d194c49554e57f366c7.js.LICENSE.txt → /jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4008.b915ce51b76e4eea444a.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4017.7cf5c0f4ab2e2fe099f4.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4043.7d4235e5ef237743c246.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4139.640d2da69a839bbb23a1.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4155.784ca1752696680bf373.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4283.5ea107a9413cf350657d.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4291.7fc9442700a996c261cd.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4419.8d7204ceb62af06d8422.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4452.e12b3923387884215888.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4519.38b6c4e1bfad86478cf2.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4562.29166c568a222122f128.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4591.314ddb1d18112749d6d0.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/46.0fb036ed8ad4b2af0e5e.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4743.290178067fcbe2b935dd.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4878.9c8b7dff9f2aa987457d.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/489.2bb514a4f1aeca4522e4.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5041.8834f33c4d437bd3d845.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5157.3a8e834fbef3a8fc2b4f.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5201.43ed99b05a13cb751923.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5203.d020c43293395b5d5c55.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5331.af889dce3fae12a95db2.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5440.0f50e7c3df2baf685125.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5521.f65521bcfb0c479b5fba.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/581.67a15269b8e899ea2588.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5881.c7ae1a260275cb511eda.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5959.41c3dbb934f7aa83e2af.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6163.231924d17191f1a9a738.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6207.226a2fd91c0e203aee57.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6243.4fc871a5a7ffb2e327b4.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6267.d266ae2f83d17cb51279.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6359.3b09504ed85bb3f71967.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6443.31e269857ec0085f7934.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6532.31ea041feb9581e651bc.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6595.abbc5e7c2fb4b02cd772.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6815.c467fac9cf7db8d0e236.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6831.86709d4fba398c4eb414.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7080.0b3dcc246068147dc7a3.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7112.a59ee2cd442d601beeeb.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7173.f506f29f75a4ef3362ad.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/720.c0e1eda90fe360aee794.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7245.ba37c7df026eab813275.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7294.78897ca348581a9dae29.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7294.78897ca348581a9dae29.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7317.df1ecbfc7db0b063eedf.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7318.f2a3b81f6c31efdfa363.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7363.edc5172d0cfe93aa9ff3.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7384.921ddca683d28f988f4e.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7390.186ad933c12e960be502.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/745.bf57c40e3c4951b45c9e.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7451.e06be24e1fee9b2e4387.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7451.e06be24e1fee9b2e4387.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7473.2e5c4257832f1aaa2f7a.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7511.26a3826fcdb9c224c361.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7669.8e939de0670f120fce13.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7702.d3ddc7062e198eb6e938.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7730.7e3a9fb140d2d55a51fc.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7731.987cee17c2debd482054.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7763.bd770588e14bb53e5869.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7763.bd770588e14bb53e5869.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7823.94efbaadd84fc03f9d87.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7827.fee0cdeaf6e306bbef3d.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7848.e49d7a34ea52aebaf01b.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7877.dcf82bd8c368d9f16b51.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7887.313787ace9dbcea19b08.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/795.f94649e166b50e0e5c10.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/79d088064beb3826054f.eot +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8002.0b0117f4610a941dfe76.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8010.a24689afeaeab57102d3.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8012.29bb6d58445d67c859f8.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8285.629ddf7ab87c4102aee2.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/830.8410da9c86cd6835b3ea.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8319.5820120f3fd5db7531d6.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8347.299c1a8fba5fd34992e6.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8405.97a74ca186f6f332afe3.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8493.e3975ff82548a415fac5.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8498.160275f2a073c621d541.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8710.d0976e9e521791ab5b19.js +0 -0
- /jupyterlab-4.0.0a35.data/data/share/jupyter/lab/static/8768.852fee3a754ef67f9529.js.LICENSE.txt → /jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8768.a81e5b90356c6d3f905d.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8771.f48f4e16fcd5cc64f473.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8787.94119f9e3846afa58ae0.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8805.52c5236ced15d35e3286.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8875.8da7cb48fb402ac6f8a5.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8ea8791754915a898a31.woff2 +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9030.d0c99a0b0db0c7b0a0cb.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9055.3d9971cc90ec4423025c.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9109.fab4c4429f3212218a66.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9192.1a84f137ac27348644bf.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9222.f210f5553fdbc1bb5d74.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9265.f021a836a4f8c1e4f2f5.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9362.36daaf0799b79dc3e343.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9409.d6502e7a30f5163c83f6.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/942.cb7b08b587bc7a30269a.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9421.1ef475b30b23aab2395f.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9445.a6d51ef124feeae99757.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9621.9694856bdac57c707675.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9653.b1366d17fefa13259f3a.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9674eb1bd55047179038.svg +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9738.c078f05c0d7cb5bde4a9.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9747.56b3d4353668e791b7de.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9747.56b3d4353668e791b7de.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9834b82ad26e2a37583d.woff2 +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/a3b9817780214caf01e8.svg +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/af6397503fcefbd61397.ttf +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/be0a084962d8066884f7.svg +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/bootstrap.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/cb9e9e693192413cde2b.woff +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/cda59d6efffa685830fd.ttf +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/e4299464e7b012968eed.eot +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/e42a88444448ac3d6054.woff2 +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/e8711bbb871afd8e9dea.ttf +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/f9217f66874b0c01cd8c.woff +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/index.out.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/style.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/index.css +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/index.js +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-light-extension/index.css +0 -0
- {jupyterlab-4.0.0a35.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-light-extension/index.js +0 -0
- {jupyterlab-4.0.0a35.dist-info → jupyterlab-4.0.0a36.dist-info}/WHEEL +0 -0
- {jupyterlab-4.0.0a35.dist-info → jupyterlab-4.0.0a36.dist-info}/entry_points.txt +0 -0
- {jupyterlab-4.0.0a35.dist-info → jupyterlab-4.0.0a36.dist-info}/licenses/LICENSE +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[6269],{26269:(t,e,n)=>{n.r(e);n.d(e,{Bounds:()=>Yv,CanvasHandler:()=>dw,CanvasRenderer:()=>ww,DATE:()=>Re,DAY:()=>Ce,DAYOFYEAR:()=>Oe,Dataflow:()=>zs,Debug:()=>m.cG,Error:()=>m.jj,EventStream:()=>Io,Gradient:()=>My,GroupItem:()=>Gv,HOURS:()=>Ue,Handler:()=>jb,Info:()=>m.kI,Item:()=>Jv,MILLISECONDS:()=>qe,MINUTES:()=>$e,MONTH:()=>Ne,Marks:()=>Sb,MultiPulse:()=>ms,None:()=>m.Hq,Operator:()=>Oo,Parameters:()=>Do,Pulse:()=>fs,QUARTER:()=>Ae,RenderType:()=>Dk,Renderer:()=>Xb,ResourceLoader:()=>Vv,SECONDS:()=>Pe,SVGHandler:()=>Ew,SVGRenderer:()=>ok,SVGStringRenderer:()=>wk,Scenegraph:()=>Cb,TIME_UNITS:()=>Ie,Transform:()=>Cs,View:()=>cH,WEEK:()=>ze,Warn:()=>m.uU,YEAR:()=>De,accessor:()=>m.ZE,accessorFields:()=>m.Oj,accessorName:()=>m.el,array:()=>m.IX,ascending:()=>m.j2,bandwidthNRD:()=>ta,bin:()=>ea,bootstrapCI:()=>ra,boundClip:()=>Pk,boundContext:()=>v_,boundItem:()=>Eb,boundMark:()=>Db,boundStroke:()=>Qv,changeset:()=>Eo,clampRange:()=>m.l$,codegenExpression:()=>II.YP,compare:()=>m.qu,constant:()=>m.a9,cumulativeLogNormal:()=>ba,cumulativeNormal:()=>pa,cumulativeUniform:()=>Ta,dayofyear:()=>Be,debounce:()=>m.Ds,defaultLocale:()=>Nr,definition:()=>Us,densityLogNormal:()=>xa,densityNormal:()=>da,densityUniform:()=>Ea,domChild:()=>Pb,domClear:()=>qb,domCreate:()=>Ub,domFind:()=>$b,dotbin:()=>oa,error:()=>m.vU,expressionFunction:()=>oW,extend:()=>m.l7,extent:()=>m.We,extentIndex:()=>m.dI,falsy:()=>m.k,fastmap:()=>m.Xr,field:()=>m.EP,flush:()=>m.yl,font:()=>db,fontFamily:()=>hb,fontSize:()=>rb,format:()=>so,formatLocale:()=>br,formats:()=>ao,hasOwnProperty:()=>m.nr,id:()=>m.id,identity:()=>m.yR,inferType:()=>Kr,inferTypes:()=>Zr,ingest:()=>xo,inherits:()=>m.XW,inrange:()=>m.u5,interpolate:()=>Pg,interpolateColors:()=>Cg,interpolateRange:()=>Rg,intersect:()=>zk,intersectBoxLine:()=>A_,intersectPath:()=>S_,intersectPoint:()=>E_,intersectRule:()=>D_,isArray:()=>m.kJ,isBoolean:()=>m.jn,isDate:()=>m.J_,isFunction:()=>m.mf,isIterable:()=>m.TW,isNumber:()=>m.hj,isObject:()=>m.Kn,isRegExp:()=>m.Kj,isString:()=>m.HD,isTuple:()=>yo,key:()=>m.Jy,lerp:()=>m.t7,lineHeight:()=>ob,loader:()=>fo,locale:()=>Ar,logger:()=>m.kg,lruCache:()=>m.$m,markup:()=>Vw,merge:()=>m.TS,mergeConfig:()=>m.fE,multiLineOffset:()=>lb,one:()=>m.kX,pad:()=>m.vk,panLinear:()=>m.Dw,panLog:()=>m.mJ,panPow:()=>m.QA,panSymlog:()=>m.Zw,parse:()=>zV,parseExpression:()=>II.BJ,parseSelector:()=>mH.r,path:()=>of,pathCurves:()=>Ey,pathEqual:()=>Lk,pathParse:()=>Ry,pathRectangle:()=>sv,pathRender:()=>By,pathSymbols:()=>Vy,pathTrail:()=>av,peek:()=>m.fj,point:()=>Lb,projection:()=>qN,quantileLogNormal:()=>wa,quantileNormal:()=>ma,quantileUniform:()=>Da,quantiles:()=>Zs,quantizeInterpolator:()=>Og,quarter:()=>m.mS,quartiles:()=>Qs,random:()=>na,randomInteger:()=>la,randomKDE:()=>va,randomLCG:()=>aa,randomLogNormal:()=>ka,randomMixture:()=>Ma,randomNormal:()=>ya,randomUniform:()=>Aa,read:()=>uo,regressionExp:()=>$a,regressionLinear:()=>Oa,regressionLoess:()=>Xa,regressionLog:()=>Ua,regressionPoly:()=>Ia,regressionPow:()=>Pa,regressionQuad:()=>qa,renderModule:()=>Nk,repeat:()=>m.rx,resetDefaultLocale:()=>zr,resetSVGClipId:()=>Hv,resetSVGDefIds:()=>jk,responseType:()=>lo,runtimeContext:()=>$W,sampleCurve:()=>Ga,sampleLogNormal:()=>_a,sampleNormal:()=>ha,sampleUniform:()=>Sa,scale:()=>bg,sceneEqual:()=>Ik,sceneFromJSON:()=>zb,scenePickVisit:()=>F_,sceneToJSON:()=>Nb,sceneVisit:()=>L_,sceneZOrder:()=>I_,scheme:()=>Xg,serializeXML:()=>Kw,setRandom:()=>ia,span:()=>m.yP,splitAccessPath:()=>m._k,stringValue:()=>m.m8,textMetrics:()=>Zx,timeBin:()=>Ln,timeFloor:()=>cn,timeFormatLocale:()=>Tr,timeInterval:()=>gn,timeOffset:()=>_n,timeSequence:()=>wn,timeUnitSpecifier:()=>We,timeUnits:()=>Fe,toBoolean:()=>m.sw,toDate:()=>m.ZU,toNumber:()=>m.He,toSet:()=>m.Rg,toString:()=>m.BB,transform:()=>$s,transforms:()=>Os,truncate:()=>m.$G,truthy:()=>m.yb,tupleid:()=>vo,typeParsers:()=>Jr,utcFloor:()=>dn,utcInterval:()=>yn,utcOffset:()=>xn,utcSequence:()=>kn,utcdayofyear:()=>Ze,utcquarter:()=>m.N3,utcweek:()=>Qe,version:()=>RV,visitArray:()=>m.FP,week:()=>Ye,writeConfig:()=>m.iL,zero:()=>m.bM,zoomLinear:()=>m.ay,zoomLog:()=>m.dH,zoomPow:()=>m.mK,zoomSymlog:()=>m.bV});var i={};n.r(i);n.d(i,{aggregate:()=>vl,bin:()=>xl,collect:()=>wl,compare:()=>kl,countpattern:()=>Sl,cross:()=>Tl,density:()=>Ol,dotbin:()=>Fl,expression:()=>Wl,extent:()=>Hl,facet:()=>Yl,field:()=>Jl,filter:()=>Vl,flatten:()=>Kl,fold:()=>Zl,formula:()=>Ql,generate:()=>tu,impute:()=>iu,joinaggregate:()=>au,kde:()=>lu,key:()=>uu,load:()=>fu,lookup:()=>pu,multiextent:()=>mu,multivalues:()=>yu,params:()=>_u,pivot:()=>xu,prefacet:()=>Mu,project:()=>Su,proxy:()=>Tu,quantile:()=>Du,relay:()=>Nu,sample:()=>zu,sequence:()=>Ru,sieve:()=>Cu,subflow:()=>Bl,timeunit:()=>Ou,tupleindex:()=>$u,values:()=>Pu,window:()=>Hu});var r={};n.r(r);n.d(r,{interpolate:()=>dd,interpolateArray:()=>id,interpolateBasis:()=>Wh,interpolateBasisClosed:()=>Xh,interpolateCubehelix:()=>qm,interpolateCubehelixLong:()=>Im,interpolateDate:()=>od,interpolateDiscrete:()=>Op,interpolateHcl:()=>Mm,interpolateHclLong:()=>Sm,interpolateHsl:()=>Kp,interpolateHslLong:()=>Zp,interpolateHue:()=>Up,interpolateLab:()=>wm,interpolateNumber:()=>sd,interpolateNumberArray:()=>ed,interpolateObject:()=>ad,interpolateRgb:()=>Kh,interpolateRgbBasis:()=>Qh,interpolateRgbBasisClosed:()=>td,interpolateRound:()=>pd,interpolateString:()=>hd,interpolateTransformCss:()=>Wp,interpolateTransformSvg:()=>Xp,interpolateZoom:()=>Gp,piecewise:()=>gp,quantize:()=>Lm});var o={};n.r(o);n.d(o,{bound:()=>EM,identifier:()=>AM,mark:()=>zM,overlap:()=>CM,render:()=>FM,viewlayout:()=>yS});var s={};n.r(s);n.d(s,{axisticks:()=>wS,datajoin:()=>kS,encode:()=>ES,legendentries:()=>TS,linkpath:()=>RS,pie:()=>BS,scale:()=>KS,sortitems:()=>cE,stack:()=>mE});var a={};n.r(a);n.d(a,{contour:()=>pz,geojson:()=>vz,geopath:()=>_z,geopoint:()=>bz,geoshape:()=>wz,graticule:()=>Mz,heatmap:()=>Sz,isocontour:()=>ez,kde2d:()=>cz,projection:()=>Nz});var l={};n.r(l);n.d(l,{force:()=>iC});var u={};n.r(u);n.d(u,{nest:()=>YO,pack:()=>eU,partition:()=>iU,stratify:()=>rU,tree:()=>aU,treelinks:()=>lU,treemap:()=>fU});var c={};n.r(c);n.d(c,{label:()=>KU});var f={};n.r(f);n.d(f,{loess:()=>QU,regression:()=>n$});var h={};n.r(h);n.d(h,{voronoi:()=>aI});var d={};n.r(d);n.d(d,{wordcloud:()=>SI});var p={};n.r(p);n.d(p,{crossfilter:()=>PI,resolvefilter:()=>qI});var m=n(48823);var g={},y={},v=34,_=10,x=13;function b(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function w(t,e){var n=b(t);return function(i,r){return e(n(i),r,t)}}function k(t){var e=Object.create(null),n=[];t.forEach((function(t){for(var i in t){if(!(i in e)){n.push(e[i]=i)}}}));return n}function M(t,e){var n=t+"",i=n.length;return i<e?new Array(e-i+1).join(0)+n:n}function S(t){return t<0?"-"+M(-t,6):t>9999?"+"+M(t,6):M(t,4)}function E(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),i=t.getUTCSeconds(),r=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":S(t.getUTCFullYear(),4)+"-"+M(t.getUTCMonth()+1,2)+"-"+M(t.getUTCDate(),2)+(r?"T"+M(e,2)+":"+M(n,2)+":"+M(i,2)+"."+M(r,3)+"Z":i?"T"+M(e,2)+":"+M(n,2)+":"+M(i,2)+"Z":n||e?"T"+M(e,2)+":"+M(n,2)+"Z":"")}function T(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function i(t,e){var n,i,o=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?w(t,e):b(t)}));o.columns=i||[];return o}function r(t,e){var i=[],r=t.length,o=0,s=0,a,l=r<=0,u=false;if(t.charCodeAt(r-1)===_)--r;if(t.charCodeAt(r-1)===x)--r;function c(){if(l)return y;if(u)return u=false,g;var e,i=o,s;if(t.charCodeAt(i)===v){while(o++<r&&t.charCodeAt(o)!==v||t.charCodeAt(++o)===v);if((e=o)>=r)l=true;else if((s=t.charCodeAt(o++))===_)u=true;else if(s===x){u=true;if(t.charCodeAt(o)===_)++o}return t.slice(i+1,e-1).replace(/""/g,'"')}while(o<r){if((s=t.charCodeAt(e=o++))===_)u=true;else if(s===x){u=true;if(t.charCodeAt(o)===_)++o}else if(s!==n)continue;return t.slice(i,e)}return l=true,t.slice(i,r)}while((a=c())!==y){var f=[];while(a!==g&&a!==y)f.push(a),a=c();if(e&&(f=e(f,s++))==null)continue;i.push(f)}return i}function o(e,n){return e.map((function(e){return n.map((function(t){return c(e[t])})).join(t)}))}function s(e,n){if(n==null)n=k(e);return[n.map(c).join(t)].concat(o(e,n)).join("\n")}function a(t,e){if(e==null)e=k(t);return o(t,e).join("\n")}function l(t){return t.map(u).join("\n")}function u(e){return e.map(c).join(t)}function c(t){return t==null?"":t instanceof Date?E(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:i,parseRows:r,format:s,formatBody:a,formatRows:l,formatRow:u,formatValue:c}}function D(t,e){var n,i=t.length,r=i-e;while(r<--i)n=t[r],t[r++]=t[i],t[i]=n}function A(t){return t}function N(t){if(t==null)return A;var e,n,i=t.scale[0],r=t.scale[1],o=t.translate[0],s=t.translate[1];return function(t,a){if(!a)e=n=0;var l=2,u=t.length,c=new Array(u);c[0]=(e+=t[0])*i+o;c[1]=(n+=t[1])*r+s;while(l<u)c[l]=t[l],++l;return c}}function z(t,e){if(typeof e==="string")e=t.objects[e];return e.type==="GeometryCollection"?{type:"FeatureCollection",features:e.geometries.map((function(e){return R(t,e)}))}:R(t,e)}function R(t,e){var n=e.id,i=e.bbox,r=e.properties==null?{}:e.properties,o=C(t,e);return n==null&&i==null?{type:"Feature",properties:r,geometry:o}:i==null?{type:"Feature",id:n,properties:r,geometry:o}:{type:"Feature",id:n,bbox:i,properties:r,geometry:o}}function C(t,e){var n=N(t.transform),i=t.arcs;function r(t,e){if(e.length)e.pop();for(var r=i[t<0?~t:t],o=0,s=r.length;o<s;++o){e.push(n(r[o],o))}if(t<0)D(e,s)}function o(t){return n(t)}function s(t){var e=[];for(var n=0,i=t.length;n<i;++n)r(t[n],e);if(e.length<2)e.push(e[0]);return e}function a(t){var e=s(t);while(e.length<4)e.push(e[0]);return e}function l(t){return t.map(a)}function u(t){var e=t.type,n;switch(e){case"GeometryCollection":return{type:e,geometries:t.geometries.map(u)};case"Point":n=o(t.coordinates);break;case"MultiPoint":n=t.coordinates.map(o);break;case"LineString":n=s(t.arcs);break;case"MultiLineString":n=t.arcs.map(s);break;case"Polygon":n=l(t.arcs);break;case"MultiPolygon":n=t.arcs.map(l);break;default:return null}return{type:e,coordinates:n}}return u(e)}function O(t,e){var n={},i={},r={},o=[],s=-1;e.forEach((function(n,i){var r=t.arcs[n<0?~n:n],o;if(r.length<3&&!r[1][0]&&!r[1][1]){o=e[++s],e[s]=n,e[i]=o}}));e.forEach((function(t){var e=a(t),n=e[0],o=e[1],s,l;if(s=r[n]){delete r[s.end];s.push(t);s.end=o;if(l=i[o]){delete i[l.start];var u=l===s?s:s.concat(l);i[u.start=s.start]=r[u.end=l.end]=u}else{i[s.start]=r[s.end]=s}}else if(s=i[o]){delete i[s.start];s.unshift(t);s.start=n;if(l=r[n]){delete r[l.end];var c=l===s?s:l.concat(s);i[c.start=l.start]=r[c.end=s.end]=c}else{i[s.start]=r[s.end]=s}}else{s=[t];i[s.start=n]=r[s.end=o]=s}}));function a(e){var n=t.arcs[e<0?~e:e],i=n[0],r;if(t.transform)r=[0,0],n.forEach((function(t){r[0]+=t[0],r[1]+=t[1]}));else r=n[n.length-1];return e<0?[r,i]:[i,r]}function l(t,e){for(var i in t){var r=t[i];delete e[r.start];delete r.start;delete r.end;r.forEach((function(t){n[t<0?~t:t]=1}));o.push(r)}}l(r,i);l(i,r);e.forEach((function(t){if(!n[t<0?~t:t])o.push([t])}));return o}function U(t){return C(t,$.apply(this,arguments))}function $(t,e,n){var i,r,o;if(arguments.length>1)i=P(t,e,n);else for(r=0,i=new Array(o=t.arcs.length);r<o;++r)i[r]=r;return{type:"MultiLineString",arcs:O(t,i)}}function P(t,e,n){var i=[],r=[],o;function s(t){var e=t<0?~t:t;(r[e]||(r[e]=[])).push({i:t,g:o})}function a(t){t.forEach(s)}function l(t){t.forEach(a)}function u(t){t.forEach(l)}function c(t){switch(o=t,t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"LineString":a(t.arcs);break;case"MultiLineString":case"Polygon":l(t.arcs);break;case"MultiPolygon":u(t.arcs);break}}c(e);r.forEach(n==null?function(t){i.push(t[0].i)}:function(t){if(n(t[0].g,t[t.length-1].g))i.push(t[0].i)});return i}var q=Math.sqrt(50),I=Math.sqrt(10),L=Math.sqrt(2);function F(t,e,n){var i,r=-1,o,s,a;e=+e,t=+t,n=+n;if(t===e&&n>0)return[t];if(i=e<t)o=t,t=e,e=o;if((a=j(t,e,n))===0||!isFinite(a))return[];if(a>0){let n=Math.round(t/a),i=Math.round(e/a);if(n*a<t)++n;if(i*a>e)--i;s=new Array(o=i-n+1);while(++r<o)s[r]=(n+r)*a}else{a=-a;let n=Math.round(t*a),i=Math.round(e*a);if(n/a<t)++n;if(i/a>e)--i;s=new Array(o=i-n+1);while(++r<o)s[r]=(n+r)/a}if(i)s.reverse();return s}function j(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=q?10:o>=I?5:o>=L?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=q?10:o>=I?5:o>=L?2:1)}function W(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;if(o>=q)r*=10;else if(o>=I)r*=5;else if(o>=L)r*=2;return e<t?-r:r}var X=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function H(t){if(!(e=X.exec(t)))throw new Error("invalid format: "+t);var e;return new B({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]})}H.prototype=B.prototype;function B(t){this.fill=t.fill===undefined?" ":t.fill+"";this.align=t.align===undefined?">":t.align+"";this.sign=t.sign===undefined?"-":t.sign+"";this.symbol=t.symbol===undefined?"":t.symbol+"";this.zero=!!t.zero;this.width=t.width===undefined?undefined:+t.width;this.comma=!!t.comma;this.precision=t.precision===undefined?undefined:+t.precision;this.trim=!!t.trim;this.type=t.type===undefined?"":t.type+""}B.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===undefined?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===undefined?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Y(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function J(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function G(t){return t=J(Math.abs(t)),t?t[1]:NaN}function V(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(G(e)/3)))*3-G(Math.abs(t)))}function K(t,e){t=Math.abs(t),e=Math.abs(e)-t;return Math.max(0,G(e)-G(t))+1}function Z(t){return Math.max(0,-G(Math.abs(t)))}function Q(t,e){return function(n,i){var r=n.length,o=[],s=0,a=t[0],l=0;while(r>0&&a>0){if(l+a+1>i)a=Math.max(1,i-l);o.push(n.substring(r-=a,r+a));if((l+=a+1)>i)break;a=t[s=(s+1)%t.length]}return o.reverse().join(e)}}function tt(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}function et(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n){switch(t[n]){case".":i=r=n;break;case"0":if(i===0)i=n;r=n;break;default:if(!+t[n])break t;if(i>0)i=0;break}}return i>0?t.slice(0,i)+t.slice(r+1):t}var nt;function it(t,e){var n=J(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(nt=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+J(t,Math.max(0,e+o-1))[0]}function rt(t,e){var n=J(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const ot={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Y,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>rt(t*100,e),r:rt,s:it,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function st(t){return t}var at=Array.prototype.map,lt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ut(t){var e=t.grouping===undefined||t.thousands===undefined?st:Q(at.call(t.grouping,Number),t.thousands+""),n=t.currency===undefined?"":t.currency[0]+"",i=t.currency===undefined?"":t.currency[1]+"",r=t.decimal===undefined?".":t.decimal+"",o=t.numerals===undefined?st:tt(at.call(t.numerals,String)),s=t.percent===undefined?"%":t.percent+"",a=t.minus===undefined?"−":t.minus+"",l=t.nan===undefined?"NaN":t.nan+"";function u(t){t=H(t);var u=t.fill,c=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,m=t.comma,g=t.precision,y=t.trim,v=t.type;if(v==="n")m=true,v="g";else if(!ot[v])g===undefined&&(g=12),y=true,v="g";if(d||u==="0"&&c==="=")d=true,u="0",c="=";var _=h==="$"?n:h==="#"&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x=h==="$"?i:/[%p]/.test(v)?s:"";var b=ot[v],w=/[defgprs%]/.test(v);g=g===undefined?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g));function k(t){var n=_,i=x,s,h,k;if(v==="c"){i=b(t)+i;t=""}else{t=+t;var M=t<0||1/t<0;t=isNaN(t)?l:b(Math.abs(t),g);if(y)t=et(t);if(M&&+t===0&&f!=="+")M=false;n=(M?f==="("?f:a:f==="-"||f==="("?"":f)+n;i=(v==="s"?lt[8+nt/3]:"")+i+(M&&f==="("?")":"");if(w){s=-1,h=t.length;while(++s<h){if(k=t.charCodeAt(s),48>k||k>57){i=(k===46?r+t.slice(s+1):t.slice(s))+i;t=t.slice(0,s);break}}}}if(m&&!d)t=e(t,Infinity);var S=n.length+t.length+i.length,E=S<p?new Array(p-S+1).join(u):"";if(m&&d)t=e(E+t,E.length?p-i.length:Infinity),E="";switch(c){case"<":t=n+t+i+E;break;case"=":t=n+E+t+i;break;case"^":t=E.slice(0,S=E.length>>1)+n+t+i+E.slice(S);break;default:t=E+n+t+i;break}return o(t)}k.toString=function(){return t+""};return k}function c(t,e){var n=u((t=H(t),t.type="f",t)),i=Math.max(-8,Math.min(8,Math.floor(G(e)/3)))*3,r=Math.pow(10,-i),o=lt[8+i/3];return function(t){return n(r*t)+o}}return{format:u,formatPrefix:c}}var ct;var ft;var ht;dt({thousands:",",grouping:[3],currency:["$",""]});function dt(t){ct=ut(t);ft=ct.format;ht=ct.formatPrefix;return ct}const pt=new Date,mt=new Date;function gt(t,e,n,i){function r(e){return t(e=arguments.length===0?new Date:new Date(+e)),e}r.floor=e=>(t(e=new Date(+e)),e);r.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n);r.round=t=>{const e=r(t),n=r.ceil(t);return t-e<n-t?e:n};r.offset=(t,n)=>(e(t=new Date(+t),n==null?1:Math.floor(n)),t);r.range=(n,i,o)=>{const s=[];n=r.ceil(n);o=o==null?1:Math.floor(o);if(!(n<i)||!(o>0))return s;let a;do{s.push(a=new Date(+n)),e(n,o),t(n)}while(a<n&&n<i);return s};r.filter=n=>gt((e=>{if(e>=e)while(t(e),!n(e))e.setTime(e-1)}),((t,i)=>{if(t>=t){if(i<0)while(++i<=0){while(e(t,-1),!n(t)){}}else while(--i>=0){while(e(t,+1),!n(t)){}}}}));if(n){r.count=(e,i)=>{pt.setTime(+e),mt.setTime(+i);t(pt),t(mt);return Math.floor(n(pt,mt))};r.every=t=>{t=Math.floor(t);return!isFinite(t)||!(t>0)?null:!(t>1)?r:r.filter(i?e=>i(e)%t===0:e=>r.count(0,e)%t===0)}}return r}const yt=1e3;const vt=yt*60;const _t=vt*60;const xt=_t*24;const bt=xt*7;const wt=xt*30;const kt=xt*365;const Mt=gt((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*vt)/xt),(t=>t.getDate()-1));const St=Mt.range;const Et=gt((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/xt),(t=>t.getUTCDate()-1));const Tt=Et.range;const Dt=gt((t=>{t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e)}),((t,e)=>(e-t)/xt),(t=>Math.floor(t/xt)));const At=Dt.range;function Nt(t){return gt((e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7);e.setHours(0,0,0,0)}),((t,e)=>{t.setDate(t.getDate()+e*7)}),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*vt)/bt))}const zt=Nt(0);const Rt=Nt(1);const Ct=Nt(2);const Ot=Nt(3);const Ut=Nt(4);const $t=Nt(5);const Pt=Nt(6);const qt=zt.range;const It=Rt.range;const Lt=Ct.range;const Ft=Ot.range;const jt=Ut.range;const Wt=$t.range;const Xt=Pt.range;function Ht(t){return gt((e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7);e.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCDate(t.getUTCDate()+e*7)}),((t,e)=>(e-t)/bt))}const Bt=Ht(0);const Yt=Ht(1);const Jt=Ht(2);const Gt=Ht(3);const Vt=Ht(4);const Kt=Ht(5);const Zt=Ht(6);const Qt=Bt.range;const te=Yt.range;const ee=Jt.range;const ne=Gt.range;const ie=Vt.range;const re=Kt.range;const oe=Zt.range;const se=gt((t=>{t.setMonth(0,1);t.setHours(0,0,0,0)}),((t,e)=>{t.setFullYear(t.getFullYear()+e)}),((t,e)=>e.getFullYear()-t.getFullYear()),(t=>t.getFullYear()));se.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:gt((e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t);e.setMonth(0,1);e.setHours(0,0,0,0)}),((e,n)=>{e.setFullYear(e.getFullYear()+n*t)}));const ae=se.range;const le=gt((t=>{t.setUTCMonth(0,1);t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)}),((t,e)=>e.getUTCFullYear()-t.getUTCFullYear()),(t=>t.getUTCFullYear()));le.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:gt((e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t);e.setUTCMonth(0,1);e.setUTCHours(0,0,0,0)}),((e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}));const ue=le.range;const ce=gt((t=>{t.setDate(1);t.setHours(0,0,0,0)}),((t,e)=>{t.setMonth(t.getMonth()+e)}),((t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12),(t=>t.getMonth()));const fe=ce.range;const he=gt((t=>{t.setUTCDate(1);t.setUTCHours(0,0,0,0)}),((t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)}),((t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12),(t=>t.getUTCMonth()));const de=he.range;const pe=gt((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yt-t.getMinutes()*vt)}),((t,e)=>{t.setTime(+t+e*_t)}),((t,e)=>(e-t)/_t),(t=>t.getHours()));const me=pe.range;const ge=gt((t=>{t.setUTCMinutes(0,0,0)}),((t,e)=>{t.setTime(+t+e*_t)}),((t,e)=>(e-t)/_t),(t=>t.getUTCHours()));const ye=ge.range;const ve=gt((t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*yt)}),((t,e)=>{t.setTime(+t+e*vt)}),((t,e)=>(e-t)/vt),(t=>t.getMinutes()));const _e=ve.range;const xe=gt((t=>{t.setUTCSeconds(0,0)}),((t,e)=>{t.setTime(+t+e*vt)}),((t,e)=>(e-t)/vt),(t=>t.getUTCMinutes()));const be=xe.range;const we=gt((t=>{t.setTime(t-t.getMilliseconds())}),((t,e)=>{t.setTime(+t+e*yt)}),((t,e)=>(e-t)/yt),(t=>t.getUTCSeconds()));const ke=we.range;const Me=gt((()=>{}),((t,e)=>{t.setTime(+t+e)}),((t,e)=>e-t));Me.every=t=>{t=Math.floor(t);if(!isFinite(t)||!(t>0))return null;if(!(t>1))return Me;return gt((e=>{e.setTime(Math.floor(e/t)*t)}),((e,n)=>{e.setTime(+e+n*t)}),((e,n)=>(n-e)/t))};const Se=Me.range;function Ee(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Te(t){let e=t;let n=t;let i=t;if(t.length!==2){e=(e,n)=>t(e)-n;n=Ee;i=(e,n)=>Ee(t(e),n)}function r(t,e,r=0,o=t.length){if(r<o){if(n(e,e)!==0)return o;do{const n=r+o>>>1;if(i(t[n],e)<0)r=n+1;else o=n}while(r<o)}return r}function o(t,e,r=0,o=t.length){if(r<o){if(n(e,e)!==0)return o;do{const n=r+o>>>1;if(i(t[n],e)<=0)r=n+1;else o=n}while(r<o)}return r}function s(t,n,i=0,o=t.length){const s=r(t,n,i,o-1);return s>i&&e(t[s-1],n)>-e(t[s],n)?s-1:s}return{left:r,center:s,right:o}}const De="year";const Ae="quarter";const Ne="month";const ze="week";const Re="date";const Ce="day";const Oe="dayofyear";const Ue="hours";const $e="minutes";const Pe="seconds";const qe="milliseconds";const Ie=[De,Ae,Ne,ze,Re,Ce,Oe,Ue,$e,Pe,qe];const Le=Ie.reduce(((t,e,n)=>(t[e]=1+n,t)),{});function Fe(t){const e=(0,m.IX)(t).slice(),n={};if(!e.length)(0,m.vU)("Missing time unit.");e.forEach((t=>{if((0,m.nr)(Le,t)){n[t]=1}else{(0,m.vU)("Invalid time unit: ".concat(t,"."))}}));const i=(n[ze]||n[Ce]?1:0)+(n[Ae]||n[Ne]||n[Re]?1:0)+(n[Oe]?1:0);if(i>1){(0,m.vU)("Incompatible time units: ".concat(t))}e.sort(((t,e)=>Le[t]-Le[e]));return e}const je={[De]:"%Y ",[Ae]:"Q%q ",[Ne]:"%b ",[Re]:"%d ",[ze]:"W%U ",[Ce]:"%a ",[Oe]:"%j ",[Ue]:"%H:00",[$e]:"00:%M",[Pe]:":%S",[qe]:".%L",["".concat(De,"-").concat(Ne)]:"%Y-%m ",["".concat(De,"-").concat(Ne,"-").concat(Re)]:"%Y-%m-%d ",["".concat(Ue,"-").concat($e)]:"%H:%M"};function We(t,e){const n=(0,m.l7)({},je,e),i=Fe(t),r=i.length;let o="",s=0,a,l;for(s=0;s<r;){for(a=i.length;a>s;--a){l=i.slice(s,a).join("-");if(n[l]!=null){o+=n[l];s=a;break}}}return o.trim()}const Xe=new Date;function He(t){Xe.setFullYear(t);Xe.setMonth(0);Xe.setDate(1);Xe.setHours(0,0,0,0);return Xe}function Be(t){return Je(new Date(t))}function Ye(t){return Ge(new Date(t))}function Je(t){return Mt.count(He(t.getFullYear())-1,t)}function Ge(t){return zt.count(He(t.getFullYear())-1,t)}function Ve(t){return He(t).getDay()}function Ke(t,e,n,i,r,o,s){if(0<=t&&t<100){const a=new Date(-1,e,n,i,r,o,s);a.setFullYear(t);return a}return new Date(t,e,n,i,r,o,s)}function Ze(t){return tn(new Date(t))}function Qe(t){return en(new Date(t))}function tn(t){const e=Date.UTC(t.getUTCFullYear(),0,1);return Et.count(e-1,t)}function en(t){const e=Date.UTC(t.getUTCFullYear(),0,1);return Bt.count(e-1,t)}function nn(t){Xe.setTime(Date.UTC(t,0,1));return Xe.getUTCDay()}function rn(t,e,n,i,r,o,s){if(0<=t&&t<100){const t=new Date(Date.UTC(-1,e,n,i,r,o,s));t.setUTCFullYear(n.y);return t}return new Date(Date.UTC(t,e,n,i,r,o,s))}function on(t,e,n,i,r){const o=e||1,s=(0,m.fj)(t),a=(t,e,r)=>{r=r||t;return sn(n[r],i[r],t===s&&o,e)};const l=new Date,u=(0,m.Rg)(t),c=u[De]?a(De):(0,m.a9)(2012),f=u[Ne]?a(Ne):u[Ae]?a(Ae):m.bM,h=u[ze]&&u[Ce]?a(Ce,1,ze+Ce):u[ze]?a(ze,1):u[Ce]?a(Ce,1):u[Re]?a(Re,1):u[Oe]?a(Oe,1):m.kX,d=u[Ue]?a(Ue):m.bM,p=u[$e]?a($e):m.bM,g=u[Pe]?a(Pe):m.bM,y=u[qe]?a(qe):m.bM;return function(t){l.setTime(+t);const e=c(l);return r(e,f(l),h(l,e),d(l),p(l),g(l),y(l))}}function sn(t,e,n,i){const r=n<=1?t:i?(e,r)=>i+n*Math.floor((t(e,r)-i)/n):(e,i)=>n*Math.floor(t(e,i)/n);return e?(t,n)=>e(r(t,n),n):r}function an(t,e,n){return e+t*7-(n+6)%7}const ln={[De]:t=>t.getFullYear(),[Ae]:t=>Math.floor(t.getMonth()/3),[Ne]:t=>t.getMonth(),[Re]:t=>t.getDate(),[Ue]:t=>t.getHours(),[$e]:t=>t.getMinutes(),[Pe]:t=>t.getSeconds(),[qe]:t=>t.getMilliseconds(),[Oe]:t=>Je(t),[ze]:t=>Ge(t),[ze+Ce]:(t,e)=>an(Ge(t),t.getDay(),Ve(e)),[Ce]:(t,e)=>an(1,t.getDay(),Ve(e))};const un={[Ae]:t=>3*t,[ze]:(t,e)=>an(t,0,Ve(e))};function cn(t,e){return on(t,e||1,ln,un,Ke)}const fn={[De]:t=>t.getUTCFullYear(),[Ae]:t=>Math.floor(t.getUTCMonth()/3),[Ne]:t=>t.getUTCMonth(),[Re]:t=>t.getUTCDate(),[Ue]:t=>t.getUTCHours(),[$e]:t=>t.getUTCMinutes(),[Pe]:t=>t.getUTCSeconds(),[qe]:t=>t.getUTCMilliseconds(),[Oe]:t=>tn(t),[ze]:t=>en(t),[Ce]:(t,e)=>an(1,t.getUTCDay(),nn(e)),[ze+Ce]:(t,e)=>an(en(t),t.getUTCDay(),nn(e))};const hn={[Ae]:t=>3*t,[ze]:(t,e)=>an(t,0,nn(e))};function dn(t,e){return on(t,e||1,fn,hn,rn)}const pn={[De]:se,[Ae]:ce.every(3),[Ne]:ce,[ze]:zt,[Re]:Mt,[Ce]:Mt,[Oe]:Mt,[Ue]:pe,[$e]:ve,[Pe]:we,[qe]:Me};const mn={[De]:le,[Ae]:he.every(3),[Ne]:he,[ze]:Bt,[Re]:Et,[Ce]:Et,[Oe]:Et,[Ue]:ge,[$e]:xe,[Pe]:we,[qe]:Me};function gn(t){return pn[t]}function yn(t){return mn[t]}function vn(t,e,n){return t?t.offset(e,n):undefined}function _n(t,e,n){return vn(gn(t),e,n)}function xn(t,e,n){return vn(yn(t),e,n)}function bn(t,e,n,i){return t?t.range(e,n,i):undefined}function wn(t,e,n,i){return bn(gn(t),e,n,i)}function kn(t,e,n,i){return bn(yn(t),e,n,i)}const Mn=1e3,Sn=Mn*60,En=Sn*60,Tn=En*24,Dn=Tn*7,An=Tn*30,Nn=Tn*365;const zn=[De,Ne,Re,Ue,$e,Pe,qe],Rn=zn.slice(0,-1),Cn=Rn.slice(0,-1),On=Cn.slice(0,-1),Un=On.slice(0,-1),$n=[De,ze],Pn=[De,Ne],qn=[De];const In=[[Rn,1,Mn],[Rn,5,5*Mn],[Rn,15,15*Mn],[Rn,30,30*Mn],[Cn,1,Sn],[Cn,5,5*Sn],[Cn,15,15*Sn],[Cn,30,30*Sn],[On,1,En],[On,3,3*En],[On,6,6*En],[On,12,12*En],[Un,1,Tn],[$n,1,Dn],[Pn,1,An],[Pn,3,3*An],[qn,1,Nn]];function Ln(t){const e=t.extent,n=t.maxbins||40,i=Math.abs((0,m.yP)(e))/n;let r=Te((t=>t[2])).right(In,i),o,s;if(r===In.length){o=qn,s=W(e[0]/Nn,e[1]/Nn,n)}else if(r){r=In[i/In[r-1][2]<In[r][2]/i?r-1:r];o=r[0];s=r[1]}else{o=zn;s=Math.max(W(e[0],e[1],n),1)}return{units:o,step:s}}function Fn(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);e.setFullYear(t.y);return e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function jn(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));e.setUTCFullYear(t.y);return e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Wn(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Xn(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths;var u=Kn(r),c=Zn(r),f=Kn(o),h=Zn(o),d=Kn(s),p=Zn(s),m=Kn(a),g=Zn(a),y=Kn(l),v=Zn(l);var _={a:C,A:O,b:U,B:$,c:null,d:_i,e:_i,f:Mi,g:Ui,G:Pi,H:xi,I:bi,j:wi,L:ki,m:Si,M:Ei,p:P,q,Q:sr,s:ar,S:Ti,u:Di,U:Ai,V:zi,w:Ri,W:Ci,x:null,X:null,y:Oi,Y:$i,Z:qi,"%":or};var x={a:I,A:L,b:F,B:j,c:null,d:Ii,e:Ii,f:Xi,g:er,G:ir,H:Li,I:Fi,j:ji,L:Wi,m:Hi,M:Bi,p:W,q:X,Q:sr,s:ar,S:Yi,u:Ji,U:Gi,V:Ki,w:Zi,W:Qi,x:null,X:null,y:tr,Y:nr,Z:rr,"%":or};var b={a:E,A:T,b:D,B:A,c:N,d:ui,e:ui,f:mi,g:oi,G:ri,H:fi,I:fi,j:ci,L:pi,m:li,M:hi,p:S,q:ai,Q:yi,s:vi,S:di,u:ti,U:ei,V:ni,w:Qn,W:ii,x:z,X:R,y:oi,Y:ri,Z:si,"%":gi};_.x=w(n,_);_.X=w(i,_);_.c=w(e,_);x.x=w(n,x);x.X=w(i,x);x.c=w(e,x);function w(t,e){return function(n){var i=[],r=-1,o=0,s=t.length,a,l,u;if(!(n instanceof Date))n=new Date(+n);while(++r<s){if(t.charCodeAt(r)===37){i.push(t.slice(o,r));if((l=Hn[a=t.charAt(++r)])!=null)a=t.charAt(++r);else l=a==="e"?" ":"0";if(u=e[a])a=u(n,l);i.push(a);o=r+1}}i.push(t.slice(o,r));return i.join("")}}function k(t,e){return function(n){var i=Wn(1900,undefined,1),r=M(i,t,n+="",0),o,s;if(r!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(i.s*1e3+("L"in i?i.L:0));if(e&&!("Z"in i))i.Z=0;if("p"in i)i.H=i.H%12+i.p*12;if(i.m===undefined)i.m="q"in i?i.q:0;if("V"in i){if(i.V<1||i.V>53)return null;if(!("w"in i))i.w=1;if("Z"in i){o=jn(Wn(i.y,0,1)),s=o.getUTCDay();o=s>4||s===0?Yt.ceil(o):Yt(o);o=Et.offset(o,(i.V-1)*7);i.y=o.getUTCFullYear();i.m=o.getUTCMonth();i.d=o.getUTCDate()+(i.w+6)%7}else{o=Fn(Wn(i.y,0,1)),s=o.getDay();o=s>4||s===0?Rt.ceil(o):Rt(o);o=Mt.offset(o,(i.V-1)*7);i.y=o.getFullYear();i.m=o.getMonth();i.d=o.getDate()+(i.w+6)%7}}else if("W"in i||"U"in i){if(!("w"in i))i.w="u"in i?i.u%7:"W"in i?1:0;s="Z"in i?jn(Wn(i.y,0,1)).getUTCDay():Fn(Wn(i.y,0,1)).getDay();i.m=0;i.d="W"in i?(i.w+6)%7+i.W*7-(s+5)%7:i.w+i.U*7-(s+6)%7}if("Z"in i){i.H+=i.Z/100|0;i.M+=i.Z%100;return jn(i)}return Fn(i)}}function M(t,e,n,i){var r=0,o=e.length,s=n.length,a,l;while(r<o){if(i>=s)return-1;a=e.charCodeAt(r++);if(a===37){a=e.charAt(r++);l=b[a in Hn?e.charAt(r++):a];if(!l||(i=l(t,n,i))<0)return-1}else if(a!=n.charCodeAt(i++)){return-1}}return i}function S(t,e,n){var i=u.exec(e.slice(n));return i?(t.p=c.get(i[0].toLowerCase()),n+i[0].length):-1}function E(t,e,n){var i=d.exec(e.slice(n));return i?(t.w=p.get(i[0].toLowerCase()),n+i[0].length):-1}function T(t,e,n){var i=f.exec(e.slice(n));return i?(t.w=h.get(i[0].toLowerCase()),n+i[0].length):-1}function D(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=v.get(i[0].toLowerCase()),n+i[0].length):-1}function A(t,e,n){var i=m.exec(e.slice(n));return i?(t.m=g.get(i[0].toLowerCase()),n+i[0].length):-1}function N(t,n,i){return M(t,e,n,i)}function z(t,e,i){return M(t,n,e,i)}function R(t,e,n){return M(t,i,e,n)}function C(t){return s[t.getDay()]}function O(t){return o[t.getDay()]}function U(t){return l[t.getMonth()]}function $(t){return a[t.getMonth()]}function P(t){return r[+(t.getHours()>=12)]}function q(t){return 1+~~(t.getMonth()/3)}function I(t){return s[t.getUTCDay()]}function L(t){return o[t.getUTCDay()]}function F(t){return l[t.getUTCMonth()]}function j(t){return a[t.getUTCMonth()]}function W(t){return r[+(t.getUTCHours()>=12)]}function X(t){return 1+~~(t.getUTCMonth()/3)}return{format:function(t){var e=w(t+="",_);e.toString=function(){return t};return e},parse:function(t){var e=k(t+="",false);e.toString=function(){return t};return e},utcFormat:function(t){var e=w(t+="",x);e.toString=function(){return t};return e},utcParse:function(t){var e=k(t+="",true);e.toString=function(){return t};return e}}}var Hn={"-":"",_:" ",0:"0"},Bn=/^\s*\d+/,Yn=/^%/,Jn=/[\\^$*+?|[\]().{}]/g;function Gn(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Vn(t){return t.replace(Jn,"\\$&")}function Kn(t){return new RegExp("^(?:"+t.map(Vn).join("|")+")","i")}function Zn(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Qn(t,e,n){var i=Bn.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function ti(t,e,n){var i=Bn.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function ei(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function ni(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function ii(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function ri(t,e,n){var i=Bn.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function oi(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function si(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function ai(t,e,n){var i=Bn.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function li(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function ui(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function ci(t,e,n){var i=Bn.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function fi(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function hi(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function di(t,e,n){var i=Bn.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function pi(t,e,n){var i=Bn.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function mi(t,e,n){var i=Bn.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function gi(t,e,n){var i=Yn.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function yi(t,e,n){var i=Bn.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function vi(t,e,n){var i=Bn.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function _i(t,e){return Gn(t.getDate(),e,2)}function xi(t,e){return Gn(t.getHours(),e,2)}function bi(t,e){return Gn(t.getHours()%12||12,e,2)}function wi(t,e){return Gn(1+Mt.count(se(t),t),e,3)}function ki(t,e){return Gn(t.getMilliseconds(),e,3)}function Mi(t,e){return ki(t,e)+"000"}function Si(t,e){return Gn(t.getMonth()+1,e,2)}function Ei(t,e){return Gn(t.getMinutes(),e,2)}function Ti(t,e){return Gn(t.getSeconds(),e,2)}function Di(t){var e=t.getDay();return e===0?7:e}function Ai(t,e){return Gn(zt.count(se(t)-1,t),e,2)}function Ni(t){var e=t.getDay();return e>=4||e===0?Ut(t):Ut.ceil(t)}function zi(t,e){t=Ni(t);return Gn(Ut.count(se(t),t)+(se(t).getDay()===4),e,2)}function Ri(t){return t.getDay()}function Ci(t,e){return Gn(Rt.count(se(t)-1,t),e,2)}function Oi(t,e){return Gn(t.getFullYear()%100,e,2)}function Ui(t,e){t=Ni(t);return Gn(t.getFullYear()%100,e,2)}function $i(t,e){return Gn(t.getFullYear()%1e4,e,4)}function Pi(t,e){var n=t.getDay();t=n>=4||n===0?Ut(t):Ut.ceil(t);return Gn(t.getFullYear()%1e4,e,4)}function qi(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Gn(e/60|0,"0",2)+Gn(e%60,"0",2)}function Ii(t,e){return Gn(t.getUTCDate(),e,2)}function Li(t,e){return Gn(t.getUTCHours(),e,2)}function Fi(t,e){return Gn(t.getUTCHours()%12||12,e,2)}function ji(t,e){return Gn(1+Et.count(le(t),t),e,3)}function Wi(t,e){return Gn(t.getUTCMilliseconds(),e,3)}function Xi(t,e){return Wi(t,e)+"000"}function Hi(t,e){return Gn(t.getUTCMonth()+1,e,2)}function Bi(t,e){return Gn(t.getUTCMinutes(),e,2)}function Yi(t,e){return Gn(t.getUTCSeconds(),e,2)}function Ji(t){var e=t.getUTCDay();return e===0?7:e}function Gi(t,e){return Gn(Bt.count(le(t)-1,t),e,2)}function Vi(t){var e=t.getUTCDay();return e>=4||e===0?Vt(t):Vt.ceil(t)}function Ki(t,e){t=Vi(t);return Gn(Vt.count(le(t),t)+(le(t).getUTCDay()===4),e,2)}function Zi(t){return t.getUTCDay()}function Qi(t,e){return Gn(Yt.count(le(t)-1,t),e,2)}function tr(t,e){return Gn(t.getUTCFullYear()%100,e,2)}function er(t,e){t=Vi(t);return Gn(t.getUTCFullYear()%100,e,2)}function nr(t,e){return Gn(t.getUTCFullYear()%1e4,e,4)}function ir(t,e){var n=t.getUTCDay();t=n>=4||n===0?Vt(t):Vt.ceil(t);return Gn(t.getUTCFullYear()%1e4,e,4)}function rr(){return"+0000"}function or(){return"%"}function sr(t){return+t}function ar(t){return Math.floor(+t/1e3)}var lr;var ur;var cr;var fr;var hr;dr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dr(t){lr=Xn(t);ur=lr.format;cr=lr.parse;fr=lr.utcFormat;hr=lr.utcParse;return lr}function pr(t){const e={};return n=>e[n]||(e[n]=t(n))}function mr(t,e){return n=>{const i=t(n),r=i.indexOf(e);if(r<0)return i;let o=gr(i,r);const s=o<i.length?i.slice(o):"";while(--o>r)if(i[o]!=="0"){++o;break}return i.slice(0,o)+s}}function gr(t,e){let n=t.lastIndexOf("e"),i;if(n>0)return n;for(n=t.length;--n>e;){i=t.charCodeAt(n);if(i>=48&&i<=57)return n+1}}function yr(t){const e=pr(t.format),n=t.formatPrefix;return{format:e,formatPrefix:n,formatFloat(t){const n=H(t||",");if(n.precision==null){n.precision=12;switch(n.type){case"%":n.precision-=2;break;case"e":n.precision-=1;break}return mr(e(n),e(".1f")(1)[1])}else{return e(n)}},formatSpan(t,i,r,o){o=H(o==null?",f":o);const s=W(t,i,r),a=Math.max(Math.abs(t),Math.abs(i));let l;if(o.precision==null){switch(o.type){case"s":{if(!isNaN(l=V(s,a))){o.precision=l}return n(o,a)}case"":case"e":case"g":case"p":case"r":{if(!isNaN(l=K(s,a))){o.precision=l-(o.type==="e")}break}case"f":case"%":{if(!isNaN(l=Z(s))){o.precision=l-(o.type==="%")*2}break}}}return e(o)}}}let vr;_r();function _r(){return vr=yr({format:ft,formatPrefix:ht})}function xr(t){return yr(ut(t))}function br(t){return arguments.length?vr=xr(t):vr}function wr(t,e,n){n=n||{};if(!(0,m.Kn)(n)){(0,m.vU)("Invalid time multi-format specifier: ".concat(n))}const i=e(Pe),r=e($e),o=e(Ue),s=e(Re),a=e(ze),l=e(Ne),u=e(Ae),c=e(De),f=t(n[qe]||".%L"),h=t(n[Pe]||":%S"),d=t(n[$e]||"%I:%M"),p=t(n[Ue]||"%I %p"),g=t(n[Re]||n[Ce]||"%a %d"),y=t(n[ze]||"%b %d"),v=t(n[Ne]||"%B"),_=t(n[Ae]||"%B"),x=t(n[De]||"%Y");return t=>(i(t)<t?f:r(t)<t?h:o(t)<t?d:s(t)<t?p:l(t)<t?a(t)<t?g:y:c(t)<t?u(t)<t?v:_:x)(t)}function kr(t){const e=pr(t.format),n=pr(t.utcFormat);return{timeFormat:t=>(0,m.HD)(t)?e(t):wr(e,gn,t),utcFormat:t=>(0,m.HD)(t)?n(t):wr(n,yn,t),timeParse:pr(t.parse),utcParse:pr(t.utcParse)}}let Mr;Sr();function Sr(){return Mr=kr({format:ur,parse:cr,utcFormat:fr,utcParse:hr})}function Er(t){return kr(Xn(t))}function Tr(t){return arguments.length?Mr=Er(t):Mr}const Dr=(t,e)=>(0,m.l7)({},t,e);function Ar(t,e){const n=t?xr(t):br();const i=e?Er(e):Tr();return Dr(n,i)}function Nr(t,e){const n=arguments.length;if(n&&n!==2){(0,m.vU)("defaultLocale expects either zero or two arguments.")}return n?Dr(br(t),Tr(e)):Dr(br(),Tr())}function zr(){_r();Sr();return Nr()}const Rr=/^(data:|([A-Za-z]+:)?\/\/)/;const Cr=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;const Or=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;const Ur="file://";function $r(t,e){return n=>({options:n||{},sanitize:qr,load:Pr,fileAccess:!!e,file:Ir(e),http:Fr(t)})}async function Pr(t,e){const n=await this.sanitize(t,e),i=n.href;return n.localFile?this.file(i):this.http(i,e)}async function qr(t,e){e=(0,m.l7)({},this.options,e);const n=this.fileAccess,i={href:null};let r,o,s;const a=Cr.test(t.replace(Or,""));if(t==null||typeof t!=="string"||!a){(0,m.vU)("Sanitize failure, invalid URI: "+(0,m.m8)(t))}const l=Rr.test(t);if((s=e.baseURL)&&!l){if(!t.startsWith("/")&&!s.endsWith("/")){t="/"+t}t=s+t}o=(r=t.startsWith(Ur))||e.mode==="file"||e.mode!=="http"&&!l&&n;if(r){t=t.slice(Ur.length)}else if(t.startsWith("//")){if(e.defaultProtocol==="file"){t=t.slice(2);o=true}else{t=(e.defaultProtocol||"http")+":"+t}}Object.defineProperty(i,"localFile",{value:!!o});i.href=t;if(e.target){i.target=e.target+""}if(e.rel){i.rel=e.rel+""}if(e.context==="image"&&e.crossOrigin){i.crossOrigin=e.crossOrigin+""}return i}function Ir(t){return t?e=>new Promise(((n,i)=>{t.readFile(e,((t,e)=>{if(t)i(t);else n(e)}))})):Lr}async function Lr(){(0,m.vU)("No file system access.")}function Fr(t){return t?async function(e,n){const i=(0,m.l7)({},this.options.http,n),r=n&&n.response,o=await t(e,i);return!o.ok?(0,m.vU)(o.status+""+o.statusText):(0,m.mf)(o[r])?o[r]():o.text()}:jr}async function jr(){(0,m.vU)("No HTTP fetch method available.")}const Wr=t=>t!=null&&t===t;const Xr=t=>t==="true"||t==="false"||t===true||t===false;const Hr=t=>!Number.isNaN(Date.parse(t));const Br=t=>!Number.isNaN(+t)&&!(t instanceof Date);const Yr=t=>Br(t)&&Number.isInteger(+t);const Jr={boolean:m.sw,integer:m.He,number:m.He,date:m.ZU,string:m.BB,unknown:m.yR};const Gr=[Xr,Yr,Br,Hr];const Vr=["boolean","integer","number","date"];function Kr(t,e){if(!t||!t.length)return"unknown";const n=t.length,i=Gr.length,r=Gr.map(((t,e)=>e+1));for(let o=0,s=0,a,l;o<n;++o){l=e?t[o][e]:t[o];for(a=0;a<i;++a){if(r[a]&&Wr(l)&&!Gr[a](l)){r[a]=0;++s;if(s===Gr.length)return"string"}}}return Vr[r.reduce(((t,e)=>t===0?e:t),0)-1]}function Zr(t,e){return e.reduce(((e,n)=>{e[n]=Kr(t,n);return e}),{})}function Qr(t){const e=function(e,n){const i={delimiter:t};return to(e,n?(0,m.l7)(n,i):i)};e.responseType="text";return e}function to(t,e){if(e.header){t=e.header.map(m.m8).join(e.delimiter)+"\n"+t}return T(e.delimiter).parse(t+"")}to.responseType="text";function eo(t){return typeof Buffer==="function"&&(0,m.mf)(Buffer.isBuffer)?Buffer.isBuffer(t):false}function no(t,e){const n=e&&e.property?(0,m.EP)(e.property):m.yR;return(0,m.Kn)(t)&&!eo(t)?io(n(t),e):n(JSON.parse(t))}no.responseType="json";function io(t,e){if(!(0,m.kJ)(t)&&(0,m.TW)(t)){t=[...t]}return e&&e.copy?JSON.parse(JSON.stringify(t)):t}const ro={interior:(t,e)=>t!==e,exterior:(t,e)=>t===e};function oo(t,e){let n,i,r,o;t=no(t,e);if(e&&e.feature){n=z;r=e.feature}else if(e&&e.mesh){n=U;r=e.mesh;o=ro[e.filter]}else{(0,m.vU)("Missing TopoJSON feature or mesh parameter.")}i=(i=t.objects[r])?n(t,i,o):(0,m.vU)("Invalid TopoJSON object: "+r);return i&&i.features||[i]}oo.responseType="json";const so={dsv:to,csv:Qr(","),tsv:Qr("\t"),json:no,topojson:oo};function ao(t,e){if(arguments.length>1){so[t]=e;return this}else{return(0,m.nr)(so,t)?so[t]:null}}function lo(t){const e=ao(t);return e&&e.responseType||"text"}function uo(t,e,n,i){e=e||{};const r=ao(e.type||"json");if(!r)(0,m.vU)("Unknown data format type: "+e.type);t=r(t,e);if(e.parse)co(t,e.parse,n,i);if((0,m.nr)(t,"columns"))delete t.columns;return t}function co(t,e,n,i){if(!t.length)return;const r=Tr();n=n||r.timeParse;i=i||r.utcParse;let o=t.columns||Object.keys(t[0]),s,a,l,u,c,f;if(e==="auto")e=Zr(t,o);o=Object.keys(e);const h=o.map((t=>{const r=e[t];let o,s;if(r&&(r.startsWith("date:")||r.startsWith("utc:"))){o=r.split(/:(.+)?/,2);s=o[1];if(s[0]==="'"&&s[s.length-1]==="'"||s[0]==='"'&&s[s.length-1]==='"'){s=s.slice(1,-1)}const t=o[0]==="utc"?i:n;return t(s)}if(!Jr[r]){throw Error("Illegal format pattern: "+t+":"+r)}return Jr[r]}));for(l=0,c=t.length,f=o.length;l<c;++l){s=t[l];for(u=0;u<f;++u){a=o[u];s[a]=h[u](s[a])}}}const fo=$r(typeof fetch!=="undefined"&&fetch,null);function ho(t){const e=t||m.yR,n=[],i={};n.add=t=>{const r=e(t);if(!i[r]){i[r]=1;n.push(t)}return n};n.remove=t=>{const r=e(t);if(i[r]){i[r]=0;const e=n.indexOf(t);if(e>=0)n.splice(e,1)}return n};return n}async function po(t,e){try{await e(t)}catch(n){t.error(n)}}const mo=Symbol("vega_id");let go=1;function yo(t){return!!(t&&vo(t))}function vo(t){return t[mo]}function _o(t,e){t[mo]=e;return t}function xo(t){const e=t===Object(t)?t:{data:t};return vo(e)?e:_o(e,go++)}function bo(t){return wo(t,xo({}))}function wo(t,e){for(const n in t)e[n]=t[n];return e}function ko(t,e){return _o(e,vo(t))}function Mo(t,e){return!t?null:e?(n,i)=>t(n,i)||vo(e(n))-vo(e(i)):(e,n)=>t(e,n)||vo(e)-vo(n)}function So(t){return t&&t.constructor===Eo}function Eo(){const t=[],e=[],n=[],i=[],r=[];let o=null,s=false;return{constructor:Eo,insert(e){const n=(0,m.IX)(e),i=n.length;for(let r=0;r<i;++r)t.push(n[r]);return this},remove(t){const n=(0,m.mf)(t)?i:e,r=(0,m.IX)(t),o=r.length;for(let e=0;e<o;++e)n.push(r[e]);return this},modify(t,e,i){const o={field:e,value:(0,m.a9)(i)};if((0,m.mf)(t)){o.filter=t;r.push(o)}else{o.tuple=t;n.push(o)}return this},encode(t,e){if((0,m.mf)(t))r.push({filter:t,field:e});else n.push({tuple:t,field:e});return this},clean(t){o=t;return this},reflow(){s=true;return this},pulse(a,l){const u={},c={};let f,h,d,p,m,g;for(f=0,h=l.length;f<h;++f){u[vo(l[f])]=1}for(f=0,h=e.length;f<h;++f){m=e[f];u[vo(m)]=-1}for(f=0,h=i.length;f<h;++f){p=i[f];l.forEach((t=>{if(p(t))u[vo(t)]=-1}))}for(f=0,h=t.length;f<h;++f){m=t[f];g=vo(m);if(u[g]){u[g]=1}else{a.add.push(xo(t[f]))}}for(f=0,h=l.length;f<h;++f){m=l[f];if(u[vo(m)]<0)a.rem.push(m)}function y(t,e,n){if(n){t[e]=n(t)}else{a.encode=e}if(!s)c[vo(t)]=t}for(f=0,h=n.length;f<h;++f){d=n[f];m=d.tuple;p=d.field;g=u[vo(m)];if(g>0){y(m,p,d.value);a.modifies(p)}}for(f=0,h=r.length;f<h;++f){d=r[f];p=d.filter;l.forEach((t=>{if(p(t)&&u[vo(t)]>0){y(t,d.field,d.value)}}));a.modifies(d.field)}if(s){a.mod=e.length||i.length?l.filter((t=>u[vo(t)]>0)):l.slice()}else{for(g in c)a.mod.push(c[g])}if(o||o==null&&(e.length||i.length)){a.clean(true)}return a}}}const To="_:mod:_";function Do(){Object.defineProperty(this,To,{writable:true,value:{}})}Do.prototype={set(t,e,n,i){const r=this,o=r[t],s=r[To];if(e!=null&&e>=0){if(o[e]!==n||i){o[e]=n;s[e+":"+t]=-1;s[t]=-1}}else if(o!==n||i){r[t]=n;s[t]=(0,m.kJ)(n)?1+n.length:-1}return r},modified(t,e){const n=this[To];if(!arguments.length){for(const t in n){if(n[t])return true}return false}else if((0,m.kJ)(t)){for(let e=0;e<t.length;++e){if(n[t[e]])return true}return false}return e!=null&&e>=0?e+1<n[t]||!!n[e+":"+t]:!!n[t]},clear(){this[To]={};return this}};let Ao=0;const No="pulse",zo=new Do;const Ro=1,Co=2;function Oo(t,e,n,i){this.id=++Ao;this.value=t;this.stamp=-1;this.rank=-1;this.qrank=-1;this.flags=0;if(e){this._update=e}if(n)this.parameters(n,i)}function Uo(t){return function(e){const n=this.flags;if(arguments.length===0)return!!(n&t);this.flags=e?n|t:n&~t;return this}}Oo.prototype={targets(){return this._targets||(this._targets=ho(m.id))},set(t){if(this.value!==t){this.value=t;return 1}else{return 0}},skip:Uo(Ro),modified:Uo(Co),parameters(t,e,n){e=e!==false;const i=this._argval=this._argval||new Do,r=this._argops=this._argops||[],o=[];let s,a,l,u;const c=(t,n,s)=>{if(s instanceof Oo){if(s!==this){if(e)s.targets().add(this);o.push(s)}r.push({op:s,name:t,index:n})}else{i.set(t,n,s)}};for(s in t){a=t[s];if(s===No){(0,m.IX)(a).forEach((t=>{if(!(t instanceof Oo)){(0,m.vU)("Pulse parameters must be operator instances.")}else if(t!==this){t.targets().add(this);o.push(t)}}));this.source=a}else if((0,m.kJ)(a)){i.set(s,-1,Array(l=a.length));for(u=0;u<l;++u)c(s,u,a[u])}else{c(s,-1,a)}}this.marshall().clear();if(n)r.initonly=true;return o},marshall(t){const e=this._argval||zo,n=this._argops;let i,r,o,s;if(n){const a=n.length;for(r=0;r<a;++r){i=n[r];o=i.op;s=o.modified()&&o.stamp===t;e.set(i.name,i.index,o.value,s)}if(n.initonly){for(r=0;r<a;++r){i=n[r];i.op.targets().remove(this)}this._argops=null;this._update=null}}return e},detach(){const t=this._argops;let e,n,i,r;if(t){for(e=0,n=t.length;e<n;++e){i=t[e];r=i.op;if(r._targets){r._targets.remove(this)}}}this.pulse=null;this.source=null},evaluate(t){const e=this._update;if(e){const n=this.marshall(t.stamp),i=e.call(this,n,t);n.clear();if(i!==this.value){this.value=i}else if(!this.modified()){return t.StopPropagation}}},run(t){if(t.stamp<this.stamp)return t.StopPropagation;let e;if(this.skip()){this.skip(false);e=0}else{e=this.evaluate(t)}return this.pulse=e||t}};function $o(t,e,n,i){let r=1,o;if(t instanceof Oo){o=t}else if(t&&t.prototype instanceof Oo){o=new t}else if((0,m.mf)(t)){o=new Oo(null,t)}else{r=0;o=new Oo(t,e)}this.rank(o);if(r){i=n;n=e}if(n)this.connect(o,o.parameters(n,i));this.touch(o);return o}function Po(t,e){const n=t.rank,i=e.length;for(let r=0;r<i;++r){if(n<e[r].rank){this.rerank(t);return}}}let qo=0;function Io(t,e,n){this.id=++qo;this.value=null;if(n)this.receive=n;if(t)this._filter=t;if(e)this._apply=e}function Lo(t,e,n){return new Io(t,e,n)}Io.prototype={_filter:m.yb,_apply:m.yR,targets(){return this._targets||(this._targets=ho(m.id))},consume(t){if(!arguments.length)return!!this._consume;this._consume=!!t;return this},receive(t){if(this._filter(t)){const e=this.value=this._apply(t),n=this._targets,i=n?n.length:0;for(let t=0;t<i;++t)n[t].receive(e);if(this._consume){t.preventDefault();t.stopPropagation()}}},filter(t){const e=Lo(t);this.targets().add(e);return e},apply(t){const e=Lo(null,t);this.targets().add(e);return e},merge(){const t=Lo();this.targets().add(t);for(let e=0,n=arguments.length;e<n;++e){arguments[e].targets().add(t)}return t},throttle(t){let e=-1;return this.filter((()=>{const n=Date.now();if(n-e>t){e=n;return 1}else{return 0}}))},debounce(t){const e=Lo();this.targets().add(Lo(null,null,(0,m.Ds)(t,(t=>{const n=t.dataflow;e.receive(t);if(n&&n.run)n.run()}))));return e},between(t,e){let n=false;t.targets().add(Lo(null,null,(()=>n=true)));e.targets().add(Lo(null,null,(()=>n=false)));return this.filter((()=>n))},detach(){this._filter=m.yb;this._targets=null}};function Fo(t,e,n,i){const r=this,o=Lo(n,i),s=function(t){t.dataflow=r;try{o.receive(t)}catch(e){r.error(e)}finally{r.run()}};let a;if(typeof t==="string"&&typeof document!=="undefined"){a=document.querySelectorAll(t)}else{a=(0,m.IX)(t)}const l=a.length;for(let u=0;u<l;++u){a[u].addEventListener(e,s)}return o}function jo(t,e){const n=this.locale();return uo(t,e,n.timeParse,n.utcParse)}function Wo(t,e,n){e=this.parse(e,n);return this.pulse(t,this.changeset().insert(e))}async function Xo(t,e){const n=this;let i=0,r;try{r=await n.loader().load(t,{context:"dataflow",response:lo(e&&e.type)});try{r=n.parse(r,e)}catch(o){i=-2;n.warn("Data ingestion failed",t,o)}}catch(o){i=-1;n.warn("Loading failed",t,o)}return{data:r,status:i}}async function Ho(t,e,n){const i=this,r=i._pending||Bo(i);r.requests+=1;const o=await i.request(e,n);i.pulse(t,i.changeset().remove(m.yb).insert(o.data||[]));r.done();return o}function Bo(t){let e;const n=new Promise((t=>e=t));n.requests=0;n.done=()=>{if(--n.requests===0){t._pending=null;e(t)}};return t._pending=n}const Yo={skip:true};function Jo(t,e,n,i,r){const o=t instanceof Oo?Vo:Go;o(this,t,e,n,i,r);return this}function Go(t,e,n,i,r,o){const s=(0,m.l7)({},o,Yo);let a,l;if(!(0,m.mf)(n))n=(0,m.a9)(n);if(i===undefined){a=e=>t.touch(n(e))}else if((0,m.mf)(i)){l=new Oo(null,i,r,false);a=e=>{l.evaluate(e);const i=n(e),r=l.value;So(r)?t.pulse(i,r,o):t.update(i,r,s)}}else{a=e=>t.update(n(e),i,s)}e.apply(a)}function Vo(t,e,n,i,r,o){if(i===undefined){e.targets().add(n)}else{const s=o||{},a=new Oo(null,Ko(n,i),r,false);a.modified(s.force);a.rank=e.rank;e.targets().add(a);if(n){a.skip(true);a.value=n.value;a.targets().add(n);t.connect(n,[a])}}}function Ko(t,e){e=(0,m.mf)(e)?e:(0,m.a9)(e);return t?function(n,i){const r=e(n,i);if(!t.skip()){t.skip(r!==this.value).value=r}return r}:e}function Zo(t){t.rank=++this._rank}function Qo(t){const e=[t];let n,i,r;while(e.length){this.rank(n=e.pop());if(i=n._targets){for(r=i.length;--r>=0;){e.push(n=i[r]);if(n===t)(0,m.vU)("Cycle detected in dataflow graph.")}}}}const ts={};const es=1<<0,ns=1<<1,is=1<<2,rs=es|ns,os=es|is,ss=es|ns|is,as=1<<3,ls=1<<4,us=1<<5,cs=1<<6;function fs(t,e,n){this.dataflow=t;this.stamp=e==null?-1:e;this.add=[];this.rem=[];this.mod=[];this.fields=null;this.encode=n||null}function hs(t,e){const n=[];(0,m.FP)(t,e,(t=>n.push(t)));return n}function ds(t,e){const n={};t.visit(e,(t=>{n[vo(t)]=1}));return t=>n[vo(t)]?null:t}function ps(t,e){return t?(n,i)=>t(n,i)&&e(n,i):e}fs.prototype={StopPropagation:ts,ADD:es,REM:ns,MOD:is,ADD_REM:rs,ADD_MOD:os,ALL:ss,REFLOW:as,SOURCE:ls,NO_SOURCE:us,NO_FIELDS:cs,fork(t){return new fs(this.dataflow).init(this,t)},clone(){const t=this.fork(ss);t.add=t.add.slice();t.rem=t.rem.slice();t.mod=t.mod.slice();if(t.source)t.source=t.source.slice();return t.materialize(ss|ls)},addAll(){let t=this;const e=!t.source||t.add===t.rem||!t.rem.length&&t.source.length===t.add.length;if(e){return t}else{t=new fs(this.dataflow).init(this);t.add=t.source;t.rem=[];return t}},init(t,e){const n=this;n.stamp=t.stamp;n.encode=t.encode;if(t.fields&&!(e&cs)){n.fields=t.fields}if(e&es){n.addF=t.addF;n.add=t.add}else{n.addF=null;n.add=[]}if(e&ns){n.remF=t.remF;n.rem=t.rem}else{n.remF=null;n.rem=[]}if(e&is){n.modF=t.modF;n.mod=t.mod}else{n.modF=null;n.mod=[]}if(e&us){n.srcF=null;n.source=null}else{n.srcF=t.srcF;n.source=t.source;if(t.cleans)n.cleans=t.cleans}return n},runAfter(t){this.dataflow.runAfter(t)},changed(t){const e=t||ss;return e&es&&this.add.length||e&ns&&this.rem.length||e&is&&this.mod.length},reflow(t){if(t)return this.fork(ss).reflow();const e=this.add.length,n=this.source&&this.source.length;if(n&&n!==e){this.mod=this.source;if(e)this.filter(is,ds(this,es))}return this},clean(t){if(arguments.length){this.cleans=!!t;return this}else{return this.cleans}},modifies(t){const e=this.fields||(this.fields={});if((0,m.kJ)(t)){t.forEach((t=>e[t]=true))}else{e[t]=true}return this},modified(t,e){const n=this.fields;return!((e||this.mod.length)&&n)?false:!arguments.length?!!n:(0,m.kJ)(t)?t.some((t=>n[t])):n[t]},filter(t,e){const n=this;if(t&es)n.addF=ps(n.addF,e);if(t&ns)n.remF=ps(n.remF,e);if(t&is)n.modF=ps(n.modF,e);if(t&ls)n.srcF=ps(n.srcF,e);return n},materialize(t){t=t||ss;const e=this;if(t&es&&e.addF){e.add=hs(e.add,e.addF);e.addF=null}if(t&ns&&e.remF){e.rem=hs(e.rem,e.remF);e.remF=null}if(t&is&&e.modF){e.mod=hs(e.mod,e.modF);e.modF=null}if(t&ls&&e.srcF){e.source=e.source.filter(e.srcF);e.srcF=null}return e},visit(t,e){const n=this,i=e;if(t&ls){(0,m.FP)(n.source,n.srcF,i);return n}if(t&es)(0,m.FP)(n.add,n.addF,i);if(t&ns)(0,m.FP)(n.rem,n.remF,i);if(t&is)(0,m.FP)(n.mod,n.modF,i);const r=n.source;if(t&as&&r){const t=n.add.length+n.mod.length;if(t===r.length);else if(t){(0,m.FP)(r,ds(n,os),i)}else{(0,m.FP)(r,n.srcF,i)}}return n}};function ms(t,e,n,i){const r=this,o=n.length;let s=0;this.dataflow=t;this.stamp=e;this.fields=null;this.encode=i||null;this.pulses=n;for(let a=0;a<o;++a){const t=n[a];if(t.stamp!==e)continue;if(t.fields){const e=r.fields||(r.fields={});for(const n in t.fields){e[n]=1}}if(t.changed(r.ADD))s|=r.ADD;if(t.changed(r.REM))s|=r.REM;if(t.changed(r.MOD))s|=r.MOD}this.changes=s}(0,m.XW)(ms,fs,{fork(t){const e=new fs(this.dataflow).init(this,t&this.NO_FIELDS);if(t!==undefined){if(t&e.ADD)this.visit(e.ADD,(t=>e.add.push(t)));if(t&e.REM)this.visit(e.REM,(t=>e.rem.push(t)));if(t&e.MOD)this.visit(e.MOD,(t=>e.mod.push(t)))}return e},changed(t){return this.changes&t},modified(t){const e=this,n=e.fields;return!(n&&e.changes&e.MOD)?0:(0,m.kJ)(t)?t.some((t=>n[t])):n[t]},filter(){(0,m.vU)("MultiPulse does not support filtering.")},materialize(){(0,m.vU)("MultiPulse does not support materialization.")},visit(t,e){const n=this,i=n.pulses,r=i.length;let o=0;if(t&n.SOURCE){for(;o<r;++o){i[o].visit(t,e)}}else{for(;o<r;++o){if(i[o].stamp===n.stamp){i[o].visit(t,e)}}}return n}});async function gs(t,e,n){const i=this,r=[];if(i._pulse)return xs(i);if(i._pending)await i._pending;if(e)await po(i,e);if(!i._touched.length){i.debug("Dataflow invoked, but nothing to do.");return i}const o=++i._clock;i._pulse=new fs(i,o,t);i._touched.forEach((t=>i._enqueue(t,true)));i._touched=ho(m.id);let s=0,a,l,u;try{while(i._heap.size()>0){a=i._heap.pop();if(a.rank!==a.qrank){i._enqueue(a,true);continue}l=a.run(i._getPulse(a,t));if(l.then){l=await l}else if(l.async){r.push(l.async);l=ts}if(l!==ts){if(a._targets)a._targets.forEach((t=>i._enqueue(t)))}++s}}catch(c){i._heap.clear();u=c}i._input={};i._pulse=null;i.debug(`Pulse ${o}: ${s} operators`);if(u){i._postrun=[];i.error(u)}if(i._postrun.length){const t=i._postrun.sort(((t,e)=>e.priority-t.priority));i._postrun=[];for(let e=0;e<t.length;++e){await po(i,t[e].callback)}}if(n)await po(i,n);if(r.length){Promise.all(r).then((t=>i.runAsync(null,(()=>{t.forEach((t=>{try{t(i)}catch(c){i.error(c)}}))}))))}return i}async function ys(t,e,n){while(this._running)await this._running;const i=()=>this._running=null;(this._running=this.evaluate(t,e,n)).then(i,i);return this._running}function vs(t,e,n){return this._pulse?xs(this):(this.evaluate(t,e,n),this)}function _s(t,e,n){if(this._pulse||e){this._postrun.push({priority:n||0,callback:t})}else{try{t(this)}catch(i){this.error(i)}}}function xs(t){t.error("Dataflow already running. Use runAsync() to chain invocations.");return t}function bs(t,e){const n=t.stamp<this._clock;if(n)t.stamp=this._clock;if(n||e){t.qrank=t.rank;this._heap.push(t)}}function ws(t,e){const n=t.source,i=this._clock;return n&&(0,m.kJ)(n)?new ms(this,i,n.map((t=>t.pulse)),e):this._input[t.id]||ks(this._pulse,n&&n.pulse)}function ks(t,e){if(e&&e.stamp===t.stamp){return e}t=t.fork();if(e&&e!==ts){t.source=e.source}return t}const Ms={skip:false,force:false};function Ss(t,e){const n=e||Ms;if(this._pulse){this._enqueue(t)}else{this._touched.add(t)}if(n.skip)t.skip(true);return this}function Es(t,e,n){const i=n||Ms;if(t.set(e)||i.force){this.touch(t,i)}return this}function Ts(t,e,n){this.touch(t,n||Ms);const i=new fs(this,this._clock+(this._pulse?0:1)),r=t.pulse&&t.pulse.source||[];i.target=t;this._input[t.id]=e.pulse(i,r);return this}function Ds(t){let e=[];return{clear:()=>e=[],size:()=>e.length,peek:()=>e[0],push:n=>{e.push(n);return As(e,0,e.length-1,t)},pop:()=>{const n=e.pop();let i;if(e.length){i=e[0];e[0]=n;Ns(e,0,t)}else{i=n}return i}}}function As(t,e,n,i){let r,o;const s=t[n];while(n>e){o=n-1>>1;r=t[o];if(i(s,r)<0){t[n]=r;n=o;continue}break}return t[n]=s}function Ns(t,e,n){const i=e,r=t.length,o=t[e];let s=(e<<1)+1,a;while(s<r){a=s+1;if(a<r&&n(t[s],t[a])>=0){s=a}t[e]=t[s];e=s;s=(e<<1)+1}t[e]=o;return As(t,i,e,n)}function zs(){this.logger((0,m.kg)());this.logLevel(m.jj);this._clock=0;this._rank=0;this._locale=Nr();try{this._loader=fo()}catch(t){}this._touched=ho(m.id);this._input={};this._pulse=null;this._heap=Ds(((t,e)=>t.qrank-e.qrank));this._postrun=[]}function Rs(t){return function(){return this._log[t].apply(this,arguments)}}zs.prototype={stamp(){return this._clock},loader(t){if(arguments.length){this._loader=t;return this}else{return this._loader}},locale(t){if(arguments.length){this._locale=t;return this}else{return this._locale}},logger(t){if(arguments.length){this._log=t;return this}else{return this._log}},error:Rs("error"),warn:Rs("warn"),info:Rs("info"),debug:Rs("debug"),logLevel:Rs("level"),cleanThreshold:1e4,add:$o,connect:Po,rank:Zo,rerank:Qo,pulse:Ts,touch:Ss,update:Es,changeset:Eo,ingest:Wo,parse:jo,preload:Ho,request:Xo,events:Fo,on:Jo,evaluate:gs,run:vs,runAsync:ys,runAfter:_s,_enqueue:bs,_getPulse:ws};function Cs(t,e){Oo.call(this,t,null,e)}(0,m.XW)(Cs,Oo,{run(t){if(t.stamp<this.stamp)return t.StopPropagation;let e;if(this.skip()){this.skip(false)}else{e=this.evaluate(t)}e=e||t;if(e.then){e=e.then((t=>this.pulse=t))}else if(e!==t.StopPropagation){this.pulse=e}return e},evaluate(t){const e=this.marshall(t.stamp),n=this.transform(e,t);e.clear();return n},transform(){}});const Os={};function Us(t){const e=$s(t);return e&&e.Definition||null}function $s(t){t=t&&t.toLowerCase();return(0,m.nr)(Os,t)?Os[t]:null}function Ps(t,e){let n;if(e===undefined){for(const e of t){if(e!=null&&(n<e||n===undefined&&e>=e)){n=e}}}else{let i=-1;for(let r of t){if((r=e(r,++i,t))!=null&&(n<r||n===undefined&&r>=r)){n=r}}}return n}function qs(t,e){let n;if(e===undefined){for(const e of t){if(e!=null&&(n>e||n===undefined&&e>=e)){n=e}}}else{let i=-1;for(let r of t){if((r=e(r,++i,t))!=null&&(n>r||n===undefined&&r>=r)){n=r}}}return n}function Is(t,...e){if(typeof t[Symbol.iterator]!=="function")throw new TypeError("values is not iterable");t=Array.from(t);let[n]=e;if(n&&n.length!==2||e.length>1){const i=Uint32Array.from(t,((t,e)=>e));if(e.length>1){e=e.map((e=>t.map(e)));i.sort(((t,n)=>{for(const i of e){const e=Fs(i[t],i[n]);if(e)return e}}))}else{n=t.map(n);i.sort(((t,e)=>Fs(n[t],n[e])))}return permute(t,i)}return t.sort(Ls(n))}function Ls(t=Ee){if(t===Ee)return Fs;if(typeof t!=="function")throw new TypeError("compare is not a function");return(e,n)=>{const i=t(e,n);if(i||i===0)return i;return(t(n,n)===0)-(t(e,e)===0)}}function Fs(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function js(t,e,n=0,i=t.length-1,r){r=r===undefined?Fs:Ls(r);while(i>n){if(i-n>600){const o=i-n+1;const s=e-n+1;const a=Math.log(o);const l=.5*Math.exp(2*a/3);const u=.5*Math.sqrt(a*l*(o-l)/o)*(s-o/2<0?-1:1);const c=Math.max(n,Math.floor(e-s*l/o+u));const f=Math.min(i,Math.floor(e+(o-s)*l/o+u));js(t,e,c,f,r)}const o=t[e];let s=n;let a=i;Ws(t,n,e);if(r(t[i],o)>0)Ws(t,n,i);while(s<a){Ws(t,s,a),++s,--a;while(r(t[s],o)<0)++s;while(r(t[a],o)>0)--a}if(r(t[n],o)===0)Ws(t,n,a);else++a,Ws(t,a,i);if(a<=e)n=a+1;if(e<=a)i=a-1}return t}function Ws(t,e,n){const i=t[e];t[e]=t[n];t[n]=i}function Xs(t){return t===null?NaN:+t}function*Hs(t,e){if(e===undefined){for(let e of t){if(e!=null&&(e=+e)>=e){yield e}}}else{let n=-1;for(let i of t){if((i=e(i,++n,t))!=null&&(i=+i)>=i){yield i}}}}function Bs(t,e,n){t=Float64Array.from(Hs(t,n));if(!(i=t.length))return;if((e=+e)<=0||i<2)return qs(t);if(e>=1)return Ps(t);var i,r=(i-1)*e,o=Math.floor(r),s=Ps(js(t,o).subarray(0,o+1)),a=qs(t.subarray(o+1));return s+(a-s)*(r-o)}function Ys(t,e,n=Xs){if(!(i=t.length))return;if((e=+e)<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}function Js(t,e){let n=0;let i;let r=0;let o=0;if(e===undefined){for(let e of t){if(e!=null&&(e=+e)>=e){i=e-r;r+=i/++n;o+=i*(e-r)}}}else{let s=-1;for(let a of t){if((a=e(a,++s,t))!=null&&(a=+a)>=a){i=a-r;r+=i/++n;o+=i*(a-r)}}}if(n>1)return o/(n-1)}function Gs(t,e){const n=Js(t,e);return n?Math.sqrt(n):n}function Vs(t,e){return Bs(t,.5,e)}function*Ks(t,e){if(e==null){for(let e of t){if(e!=null&&e!==""&&(e=+e)>=e){yield e}}}else{let n=-1;for(let i of t){i=e(i,++n,t);if(i!=null&&i!==""&&(i=+i)>=i){yield i}}}}function Zs(t,e,n){const i=Float64Array.from(Ks(t,n));i.sort(Ee);return e.map((t=>Ys(i,t)))}function Qs(t,e){return Zs(t,[.25,.5,.75],e)}function ta(t,e){const n=t.length,i=Gs(t,e),r=Qs(t,e),o=(r[2]-r[0])/1.34,s=Math.min(i,o)||i||Math.abs(r[0])||1;return 1.06*s*Math.pow(n,-.2)}function ea(t){const e=t.maxbins||20,n=t.base||10,i=Math.log(n),r=t.divide||[5,2];let o=t.extent[0],s=t.extent[1],a,l,u,c,f,h;const d=t.span||s-o||Math.abs(o)||1;if(t.step){a=t.step}else if(t.steps){c=d/e;for(f=0,h=t.steps.length;f<h&&t.steps[f]<c;++f);a=t.steps[Math.max(0,f-1)]}else{l=Math.ceil(Math.log(e)/i);u=t.minstep||0;a=Math.max(u,Math.pow(n,Math.round(Math.log(d)/i)-l));while(Math.ceil(d/a)>e){a*=n}for(f=0,h=r.length;f<h;++f){c=a/r[f];if(c>=u&&d/c<=e)a=c}}c=Math.log(a);const p=c>=0?0:~~(-c/i)+1,m=Math.pow(n,-p-1);if(t.nice||t.nice===undefined){c=Math.floor(o/a+m)*a;o=o<c?c-a:c;s=Math.ceil(s/a)*a}return{start:o,stop:s===o?o+a:s,step:a}}var na=Math.random;function ia(t){na=t}function ra(t,e,n,i){if(!t.length)return[undefined,undefined];const r=Float64Array.from(Ks(t,i)),o=r.length,s=e;let a,l,u,c;for(u=0,c=Array(s);u<s;++u){for(a=0,l=0;l<o;++l){a+=r[~~(na()*o)]}c[u]=a/o}c.sort(Ee);return[Bs(c,n/2),Bs(c,1-n/2)]}function oa(t,e,n,i){i=i||(t=>t);const r=t.length,o=new Float64Array(r);let s=0,a=1,l=i(t[0]),u=l,c=l+e,f;for(;a<r;++a){f=i(t[a]);if(f>=c){u=(l+u)/2;for(;s<a;++s)o[s]=u;c=f+e;l=f}u=f}u=(l+u)/2;for(;s<a;++s)o[s]=u;return n?sa(o,e+e/4):o}function sa(t,e){const n=t.length;let i=0,r=1,o,s;while(t[i]===t[r])++r;while(r<n){o=r+1;while(t[r]===t[o])++o;if(t[r]-t[r-1]<e){s=r+(i+o-r-r>>1);while(s<r)t[s++]=t[r];while(s>r)t[s--]=t[i]}i=r;r=o}return t}function aa(t){return function(){t=(1103515245*t+12345)%2147483647;return t/2147483647}}function la(t,e){if(e==null){e=t;t=0}let n,i,r;const o={min(t){if(arguments.length){n=t||0;r=i-n;return o}else{return n}},max(t){if(arguments.length){i=t||0;r=i-n;return o}else{return i}},sample(){return n+Math.floor(r*na())},pdf(t){return t===Math.floor(t)&&t>=n&&t<i?1/r:0},cdf(t){const e=Math.floor(t);return e<n?0:e>=i?1:(e-n+1)/r},icdf(t){return t>=0&&t<=1?n-1+Math.floor(t*r):NaN}};return o.min(t).max(e)}const ua=Math.sqrt(2*Math.PI);const ca=Math.SQRT2;let fa=NaN;function ha(t,e){t=t||0;e=e==null?1:e;let n=0,i=0,r,o;if(fa===fa){n=fa;fa=NaN}else{do{n=na()*2-1;i=na()*2-1;r=n*n+i*i}while(r===0||r>1);o=Math.sqrt(-2*Math.log(r)/r);n*=o;fa=i*o}return t+n*e}function da(t,e,n){n=n==null?1:n;const i=(t-(e||0))/n;return Math.exp(-.5*i*i)/(n*ua)}function pa(t,e,n){e=e||0;n=n==null?1:n;const i=(t-e)/n,r=Math.abs(i);let o;if(r>37){o=0}else{const t=Math.exp(-r*r/2);let e;if(r<7.07106781186547){e=.0352624965998911*r+.700383064443688;e=e*r+6.37396220353165;e=e*r+33.912866078383;e=e*r+112.079291497871;e=e*r+221.213596169931;e=e*r+220.206867912376;o=t*e;e=.0883883476483184*r+1.75566716318264;e=e*r+16.064177579207;e=e*r+86.7807322029461;e=e*r+296.564248779674;e=e*r+637.333633378831;e=e*r+793.826512519948;e=e*r+440.413735824752;o=o/e}else{e=r+.65;e=r+4/e;e=r+3/e;e=r+2/e;e=r+1/e;o=t/e/2.506628274631}}return i>0?1-o:o}function ma(t,e,n){if(t<0||t>1)return NaN;return(e||0)+(n==null?1:n)*ca*ga(2*t-1)}function ga(t){let e=-Math.log((1-t)*(1+t)),n;if(e<6.25){e-=3.125;n=-364441206401782e-35;n=-16850591381820166e-35+n*e;n=128584807152564e-32+n*e;n=11157877678025181e-33+n*e;n=-1333171662854621e-31+n*e;n=20972767875968562e-33+n*e;n=6637638134358324e-30+n*e;n=-4054566272975207e-29+n*e;n=-8151934197605472e-29+n*e;n=26335093153082323e-28+n*e;n=-12975133253453532e-27+n*e;n=-5415412054294628e-26+n*e;n=1.0512122733215323e-9+n*e;n=-4.112633980346984e-9+n*e;n=-2.9070369957882005e-8+n*e;n=4.2347877827932404e-7+n*e;n=-13654692000834679e-22+n*e;n=-13882523362786469e-21+n*e;n=.00018673420803405714+n*e;n=-.000740702534166267+n*e;n=-.006033670871430149+n*e;n=.24015818242558962+n*e;n=1.6536545626831027+n*e}else if(e<16){e=Math.sqrt(e)-3.25;n=2.2137376921775787e-9;n=9.075656193888539e-8+n*e;n=-2.7517406297064545e-7+n*e;n=1.8239629214389228e-8+n*e;n=15027403968909828e-22+n*e;n=-4013867526981546e-21+n*e;n=29234449089955446e-22+n*e;n=12475304481671779e-21+n*e;n=-47318229009055734e-21+n*e;n=6828485145957318e-20+n*e;n=24031110387097894e-21+n*e;n=-.0003550375203628475+n*e;n=.0009532893797373805+n*e;n=-.0016882755560235047+n*e;n=.002491442096107851+n*e;n=-.003751208507569241+n*e;n=.005370914553590064+n*e;n=1.0052589676941592+n*e;n=3.0838856104922208+n*e}else if(Number.isFinite(e)){e=Math.sqrt(e)-5;n=-27109920616438573e-27;n=-2.555641816996525e-10+n*e;n=1.5076572693500548e-9+n*e;n=-3.789465440126737e-9+n*e;n=7.61570120807834e-9+n*e;n=-1.496002662714924e-8+n*e;n=2.914795345090108e-8+n*e;n=-6.771199775845234e-8+n*e;n=2.2900482228026655e-7+n*e;n=-9.9298272942317e-7+n*e;n=4526062597223154e-21+n*e;n=-1968177810553167e-20+n*e;n=7599527703001776e-20+n*e;n=-.00021503011930044477+n*e;n=-.00013871931833623122+n*e;n=1.0103004648645344+n*e;n=4.849906401408584+n*e}else{n=Infinity}return n*t}function ya(t,e){let n,i;const r={mean(t){if(arguments.length){n=t||0;return r}else{return n}},stdev(t){if(arguments.length){i=t==null?1:t;return r}else{return i}},sample:()=>ha(n,i),pdf:t=>da(t,n,i),cdf:t=>pa(t,n,i),icdf:t=>ma(t,n,i)};return r.mean(t).stdev(e)}function va(t,e){const n=ya();let i=0;const r={data(n){if(arguments.length){t=n;i=n?n.length:0;return r.bandwidth(e)}else{return t}},bandwidth(n){if(!arguments.length)return e;e=n;if(!e&&t)e=ta(t);return r},sample(){return t[~~(na()*i)]+e*n.sample()},pdf(r){let o=0,s=0;for(;s<i;++s){o+=n.pdf((r-t[s])/e)}return o/e/i},cdf(r){let o=0,s=0;for(;s<i;++s){o+=n.cdf((r-t[s])/e)}return o/i},icdf(){throw Error("KDE icdf not supported.")}};return r.data(t)}function _a(t,e){t=t||0;e=e==null?1:e;return Math.exp(t+ha()*e)}function xa(t,e,n){if(t<=0)return 0;e=e||0;n=n==null?1:n;const i=(Math.log(t)-e)/n;return Math.exp(-.5*i*i)/(n*ua*t)}function ba(t,e,n){return pa(Math.log(t),e,n)}function wa(t,e,n){return Math.exp(ma(t,e,n))}function ka(t,e){let n,i;const r={mean(t){if(arguments.length){n=t||0;return r}else{return n}},stdev(t){if(arguments.length){i=t==null?1:t;return r}else{return i}},sample:()=>_a(n,i),pdf:t=>xa(t,n,i),cdf:t=>ba(t,n,i),icdf:t=>wa(t,n,i)};return r.mean(t).stdev(e)}function Ma(t,e){let n=0,i;function r(t){const e=[];let i=0,r;for(r=0;r<n;++r){i+=e[r]=t[r]==null?1:+t[r]}for(r=0;r<n;++r){e[r]/=i}return e}const o={weights(t){if(arguments.length){i=r(e=t||[]);return o}return e},distributions(i){if(arguments.length){if(i){n=i.length;t=i}else{n=0;t=[]}return o.weights(e)}return t},sample(){const e=na();let r=t[n-1],o=i[0],s=0;for(;s<n-1;o+=i[++s]){if(e<o){r=t[s];break}}return r.sample()},pdf(e){let r=0,o=0;for(;o<n;++o){r+=i[o]*t[o].pdf(e)}return r},cdf(e){let r=0,o=0;for(;o<n;++o){r+=i[o]*t[o].cdf(e)}return r},icdf(){throw Error("Mixture icdf not supported.")}};return o.distributions(t).weights(e)}function Sa(t,e){if(e==null){e=t==null?1:t;t=0}return t+(e-t)*na()}function Ea(t,e,n){if(n==null){n=e==null?1:e;e=0}return t>=e&&t<=n?1/(n-e):0}function Ta(t,e,n){if(n==null){n=e==null?1:e;e=0}return t<e?0:t>n?1:(t-e)/(n-e)}function Da(t,e,n){if(n==null){n=e==null?1:e;e=0}return t>=0&&t<=1?e+t*(n-e):NaN}function Aa(t,e){let n,i;const r={min(t){if(arguments.length){n=t||0;return r}else{return n}},max(t){if(arguments.length){i=t==null?1:t;return r}else{return i}},sample:()=>Sa(n,i),pdf:t=>Ea(t,n,i),cdf:t=>Ta(t,n,i),icdf:t=>Da(t,n,i)};if(e==null){e=t==null?1:t;t=0}return r.min(t).max(e)}function Na(t,e,n,i){const r=i-t*t,o=Math.abs(r)<1e-24?0:(n-t*e)/r,s=e-o*t;return[s,o]}function za(t,e,n,i){t=t.filter((t=>{let i=e(t),r=n(t);return i!=null&&(i=+i)>=i&&r!=null&&(r=+r)>=r}));if(i){t.sort(((t,n)=>e(t)-e(n)))}const r=t.length,o=new Float64Array(r),s=new Float64Array(r);let a=0,l=0,u=0,c,f,h;for(h of t){o[a]=c=+e(h);s[a]=f=+n(h);++a;l+=(c-l)/a;u+=(f-u)/a}for(a=0;a<r;++a){o[a]-=l;s[a]-=u}return[o,s,l,u]}function Ra(t,e,n,i){let r=-1,o,s;for(const a of t){o=e(a);s=n(a);if(o!=null&&(o=+o)>=o&&s!=null&&(s=+s)>=s){i(o,s,++r)}}}function Ca(t,e,n,i,r){let o=0,s=0;Ra(t,e,n,((t,e)=>{const n=e-r(t),a=e-i;o+=n*n;s+=a*a}));return 1-o/s}function Oa(t,e,n){let i=0,r=0,o=0,s=0,a=0;Ra(t,e,n,((t,e)=>{++a;i+=(t-i)/a;r+=(e-r)/a;o+=(t*e-o)/a;s+=(t*t-s)/a}));const l=Na(i,r,o,s),u=t=>l[0]+l[1]*t;return{coef:l,predict:u,rSquared:Ca(t,e,n,r,u)}}function Ua(t,e,n){let i=0,r=0,o=0,s=0,a=0;Ra(t,e,n,((t,e)=>{++a;t=Math.log(t);i+=(t-i)/a;r+=(e-r)/a;o+=(t*e-o)/a;s+=(t*t-s)/a}));const l=Na(i,r,o,s),u=t=>l[0]+l[1]*Math.log(t);return{coef:l,predict:u,rSquared:Ca(t,e,n,r,u)}}function $a(t,e,n){const[i,r,o,s]=za(t,e,n);let a=0,l=0,u=0,c=0,f=0,h,d,p;Ra(t,e,n,((t,e)=>{h=i[f++];d=Math.log(e);p=h*e;a+=(e*d-a)/f;l+=(p-l)/f;u+=(p*d-u)/f;c+=(h*p-c)/f}));const[m,g]=Na(l/s,a/s,u/s,c/s),y=t=>Math.exp(m+g*(t-o));return{coef:[Math.exp(m-g*o),g],predict:y,rSquared:Ca(t,e,n,s,y)}}function Pa(t,e,n){let i=0,r=0,o=0,s=0,a=0,l=0;Ra(t,e,n,((t,e)=>{const n=Math.log(t),u=Math.log(e);++l;i+=(n-i)/l;r+=(u-r)/l;o+=(n*u-o)/l;s+=(n*n-s)/l;a+=(e-a)/l}));const u=Na(i,r,o,s),c=t=>u[0]*Math.pow(t,u[1]);u[0]=Math.exp(u[0]);return{coef:u,predict:c,rSquared:Ca(t,e,n,a,c)}}function qa(t,e,n){const[i,r,o,s]=za(t,e,n),a=i.length;let l=0,u=0,c=0,f=0,h=0,d,p,m,g;for(d=0;d<a;){p=i[d];m=r[d++];g=p*p;l+=(g-l)/d;u+=(g*p-u)/d;c+=(g*g-c)/d;f+=(p*m-f)/d;h+=(g*m-h)/d}const y=c-l*l,v=l*y-u*u,_=(h*l-f*u)/v,x=(f*y-h*u)/v,b=-_*l,w=t=>{t=t-o;return _*t*t+x*t+b+s};return{coef:[b-x*o+_*o*o+s,x-2*_*o,_],predict:w,rSquared:Ca(t,e,n,s,w)}}function Ia(t,e,n,i){if(i===1)return Oa(t,e,n);if(i===2)return qa(t,e,n);const[r,o,s,a]=za(t,e,n),l=r.length,u=[],c=[],f=i+1;let h,d,p,m,g;for(h=0;h<f;++h){for(p=0,m=0;p<l;++p){m+=Math.pow(r[p],h)*o[p]}u.push(m);g=new Float64Array(f);for(d=0;d<f;++d){for(p=0,m=0;p<l;++p){m+=Math.pow(r[p],h+d)}g[d]=m}c.push(g)}c.push(u);const y=Fa(c),v=t=>{t-=s;let e=a+y[0]+y[1]*t+y[2]*t*t;for(h=3;h<f;++h)e+=y[h]*Math.pow(t,h);return e};return{coef:La(f,y,-s,a),predict:v,rSquared:Ca(t,e,n,a,v)}}function La(t,e,n,i){const r=Array(t);let o,s,a,l;for(o=0;o<t;++o)r[o]=0;for(o=t-1;o>=0;--o){a=e[o];l=1;r[o]+=a;for(s=1;s<=o;++s){l*=(o+1-s)/s;r[o-s]+=a*Math.pow(n,s)*l}}r[0]+=i;return r}function Fa(t){const e=t.length-1,n=[];let i,r,o,s,a;for(i=0;i<e;++i){s=i;for(r=i+1;r<e;++r){if(Math.abs(t[i][r])>Math.abs(t[i][s])){s=r}}for(o=i;o<e+1;++o){a=t[o][i];t[o][i]=t[o][s];t[o][s]=a}for(r=i+1;r<e;++r){for(o=e;o>=i;o--){t[o][r]-=t[o][i]*t[i][r]/t[i][i]}}}for(r=e-1;r>=0;--r){a=0;for(o=r+1;o<e;++o){a+=t[o][r]*n[o]}n[r]=(t[e][r]-a)/t[r][r]}return n}const ja=2,Wa=1e-12;function Xa(t,e,n,i){const[r,o,s,a]=za(t,e,n,true),l=r.length,u=Math.max(2,~~(i*l)),c=new Float64Array(l),f=new Float64Array(l),h=new Float64Array(l).fill(1);for(let d=-1;++d<=ja;){const t=[0,u-1];for(let n=0;n<l;++n){const e=r[n],i=t[0],s=t[1],a=e-r[i]>r[s]-e?i:s;let l=0,u=0,d=0,p=0,m=0;const g=1/Math.abs(r[a]-e||1);for(let t=i;t<=s;++t){const n=r[t],i=o[t],s=Ha(Math.abs(e-n)*g)*h[t],a=n*s;l+=s;u+=a;d+=i*s;p+=i*a;m+=n*a}const[y,v]=Na(u/l,d/l,p/l,m/l);c[n]=y+v*e;f[n]=Math.abs(o[n]-c[n]);Ba(r,n+1,t)}if(d===ja){break}const e=Vs(f);if(Math.abs(e)<Wa)break;for(let n=0,i,r;n<l;++n){i=f[n]/(6*e);h[n]=i>=1?Wa:(r=1-i*i)*r}}return Ya(r,c,s,a)}function Ha(t){return(t=1-t*t*t)*t*t}function Ba(t,e,n){const i=t[e];let r=n[0],o=n[1]+1;if(o>=t.length)return;while(e>r&&t[o]-i<=i-t[r]){n[0]=++r;n[1]=o;++o}}function Ya(t,e,n,i){const r=t.length,o=[];let s=0,a=0,l=[],u;for(;s<r;++s){u=t[s]+n;if(l[0]===u){l[1]+=(e[s]-l[1])/++a}else{a=0;l[1]+=i;l=[u,e[s]];o.push(l)}}l[1]+=i;return o}const Ja=.5*Math.PI/180;function Ga(t,e,n,i){n=n||25;i=Math.max(n,i||200);const r=e=>[e,t(e)],o=e[0],s=e[1],a=s-o,l=a/i,u=[r(o)],c=[];if(n===i){for(let t=1;t<i;++t){u.push(r(o+t/n*a))}u.push(r(s));return u}else{c.push(r(s));for(let t=n;--t>0;){c.push(r(o+t/n*a))}}let f=u[0];let h=c[c.length-1];const d=1/a;const p=Va(f[1],c);while(h){const t=r((f[0]+h[0])/2);const e=t[0]-f[0]>=l;if(e&&Ka(f,t,h,d,p)>Ja){c.push(t)}else{f=h;u.push(h);c.pop()}h=c[c.length-1]}return u}function Va(t,e){let n=t;let i=t;const r=e.length;for(let o=0;o<r;++o){const t=e[o][1];if(t<n)n=t;if(t>i)i=t}return 1/(i-n)}function Ka(t,e,n,i,r){const o=Math.atan2(r*(n[1]-t[1]),i*(n[0]-t[0])),s=Math.atan2(r*(e[1]-t[1]),i*(e[0]-t[0]));return Math.abs(o-s)}function Za(t,e){let n=0;let i=0;if(e===undefined){for(let e of t){if(e!=null&&(e=+e)>=e){++n,i+=e}}}else{let r=-1;for(let o of t){if((o=e(o,++r,t))!=null&&(o=+o)>=o){++n,i+=o}}}if(n)return i/n}function Qa(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);while(++i<r){o[i]=t+i*n}return o}function tl(t){return e=>{const n=t.length;let i=1,r=String(t[0](e));for(;i<n;++i){r+="|"+t[i](e)}return r}}function el(t){return!t||!t.length?function(){return""}:t.length===1?t[0]:tl(t)}function nl(t,e,n){return n||t+(!e?"":"_"+e)}const il=()=>{};const rl={init:il,add:il,rem:il,idx:0};const ol={values:{init:t=>t.cell.store=true,value:t=>t.cell.data.values(),idx:-1},count:{value:t=>t.cell.num},__count__:{value:t=>t.missing+t.valid},missing:{value:t=>t.missing},valid:{value:t=>t.valid},sum:{init:t=>t.sum=0,value:t=>t.sum,add:(t,e)=>t.sum+=+e,rem:(t,e)=>t.sum-=e},product:{init:t=>t.product=1,value:t=>t.valid?t.product:undefined,add:(t,e)=>t.product*=e,rem:(t,e)=>t.product/=e},mean:{init:t=>t.mean=0,value:t=>t.valid?t.mean:undefined,add:(t,e)=>(t.mean_d=e-t.mean,t.mean+=t.mean_d/t.valid),rem:(t,e)=>(t.mean_d=e-t.mean,t.mean-=t.valid?t.mean_d/t.valid:t.mean)},average:{value:t=>t.valid?t.mean:undefined,req:["mean"],idx:1},variance:{init:t=>t.dev=0,value:t=>t.valid>1?t.dev/(t.valid-1):undefined,add:(t,e)=>t.dev+=t.mean_d*(e-t.mean),rem:(t,e)=>t.dev-=t.mean_d*(e-t.mean),req:["mean"],idx:1},variancep:{value:t=>t.valid>1?t.dev/t.valid:undefined,req:["variance"],idx:2},stdev:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid-1)):undefined,req:["variance"],idx:2},stdevp:{value:t=>t.valid>1?Math.sqrt(t.dev/t.valid):undefined,req:["variance"],idx:2},stderr:{value:t=>t.valid>1?Math.sqrt(t.dev/(t.valid*(t.valid-1))):undefined,req:["variance"],idx:2},distinct:{value:t=>t.cell.data.distinct(t.get),req:["values"],idx:3},ci0:{value:t=>t.cell.data.ci0(t.get),req:["values"],idx:3},ci1:{value:t=>t.cell.data.ci1(t.get),req:["values"],idx:3},median:{value:t=>t.cell.data.q2(t.get),req:["values"],idx:3},q1:{value:t=>t.cell.data.q1(t.get),req:["values"],idx:3},q3:{value:t=>t.cell.data.q3(t.get),req:["values"],idx:3},min:{init:t=>t.min=undefined,value:t=>t.min=Number.isNaN(t.min)?t.cell.data.min(t.get):t.min,add:(t,e)=>{if(e<t.min||t.min===undefined)t.min=e},rem:(t,e)=>{if(e<=t.min)t.min=NaN},req:["values"],idx:4},max:{init:t=>t.max=undefined,value:t=>t.max=Number.isNaN(t.max)?t.cell.data.max(t.get):t.max,add:(t,e)=>{if(e>t.max||t.max===undefined)t.max=e},rem:(t,e)=>{if(e>=t.max)t.max=NaN},req:["values"],idx:4},argmin:{init:t=>t.argmin=undefined,value:t=>t.argmin||t.cell.data.argmin(t.get),add:(t,e,n)=>{if(e<t.min)t.argmin=n},rem:(t,e)=>{if(e<=t.min)t.argmin=undefined},req:["min","values"],idx:3},argmax:{init:t=>t.argmax=undefined,value:t=>t.argmax||t.cell.data.argmax(t.get),add:(t,e,n)=>{if(e>t.max)t.argmax=n},rem:(t,e)=>{if(e>=t.max)t.argmax=undefined},req:["max","values"],idx:3}};const sl=Object.keys(ol);function al(t,e){return n=>(0,m.l7)({name:t,out:n||t},rl,e)}sl.forEach((t=>{ol[t]=al(t,ol[t])}));function ll(t,e){return ol[t](e)}function ul(t,e){return t.idx-e.idx}function cl(t){const e={};t.forEach((t=>e[t.name]=t));const n=t=>{if(!t.req)return;t.req.forEach((t=>{if(!e[t])n(e[t]=ol[t]())}))};t.forEach(n);return Object.values(e).sort(ul)}function fl(){this.valid=0;this.missing=0;this._ops.forEach((t=>t.init(this)))}function hl(t,e){if(t==null||t===""){++this.missing;return}if(t!==t)return;++this.valid;this._ops.forEach((n=>n.add(this,t,e)))}function dl(t,e){if(t==null||t===""){--this.missing;return}if(t!==t)return;--this.valid;this._ops.forEach((n=>n.rem(this,t,e)))}function pl(t){this._out.forEach((e=>t[e.out]=e.value(this)));return t}function ml(t,e){const n=e||m.yR,i=cl(t),r=t.slice().sort(ul);function o(t){this._ops=i;this._out=r;this.cell=t;this.init()}o.prototype.init=fl;o.prototype.add=hl;o.prototype.rem=dl;o.prototype.set=pl;o.prototype.get=n;o.fields=t.map((t=>t.out));return o}function gl(t){this._key=t?(0,m.EP)(t):vo;this.reset()}const yl=gl.prototype;yl.reset=function(){this._add=[];this._rem=[];this._ext=null;this._get=null;this._q=null};yl.add=function(t){this._add.push(t)};yl.rem=function(t){this._rem.push(t)};yl.values=function(){this._get=null;if(this._rem.length===0)return this._add;const t=this._add,e=this._rem,n=this._key,i=t.length,r=e.length,o=Array(i-r),s={};let a,l,u;for(a=0;a<r;++a){s[n(e[a])]=1}for(a=0,l=0;a<i;++a){if(s[n(u=t[a])]){s[n(u)]=0}else{o[l++]=u}}this._rem=[];return this._add=o};yl.distinct=function(t){const e=this.values(),n={};let i=e.length,r=0,o;while(--i>=0){o=t(e[i])+"";if(!(0,m.nr)(n,o)){n[o]=1;++r}}return r};yl.extent=function(t){if(this._get!==t||!this._ext){const e=this.values(),n=(0,m.dI)(e,t);this._ext=[e[n[0]],e[n[1]]];this._get=t}return this._ext};yl.argmin=function(t){return this.extent(t)[0]||{}};yl.argmax=function(t){return this.extent(t)[1]||{}};yl.min=function(t){const e=this.extent(t)[0];return e!=null?t(e):undefined};yl.max=function(t){const e=this.extent(t)[1];return e!=null?t(e):undefined};yl.quartile=function(t){if(this._get!==t||!this._q){this._q=Qs(this.values(),t);this._get=t}return this._q};yl.q1=function(t){return this.quartile(t)[0]};yl.q2=function(t){return this.quartile(t)[1]};yl.q3=function(t){return this.quartile(t)[2]};yl.ci=function(t){if(this._get!==t||!this._ci){this._ci=ra(this.values(),1e3,.05,t);this._get=t}return this._ci};yl.ci0=function(t){return this.ci(t)[0]};yl.ci1=function(t){return this.ci(t)[1]};function vl(t){Cs.call(this,null,t);this._adds=[];this._mods=[];this._alen=0;this._mlen=0;this._drop=true;this._cross=false;this._dims=[];this._dnames=[];this._measures=[];this._countOnly=false;this._counts=null;this._prev=null;this._inputs=null;this._outputs=null}vl.Definition={type:"Aggregate",metadata:{generates:true,changes:true},params:[{name:"groupby",type:"field",array:true},{name:"ops",type:"enum",array:true,values:sl},{name:"fields",type:"field",null:true,array:true},{name:"as",type:"string",null:true,array:true},{name:"drop",type:"boolean",default:true},{name:"cross",type:"boolean",default:false},{name:"key",type:"field"}]};(0,m.XW)(vl,Cs,{transform(t,e){const n=this,i=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=t.modified();n.stamp=i.stamp;if(n.value&&(r||e.modified(n._inputs,true))){n._prev=n.value;n.value=r?n.init(t):{};e.visit(e.SOURCE,(t=>n.add(t)))}else{n.value=n.value||n.init(t);e.visit(e.REM,(t=>n.rem(t)));e.visit(e.ADD,(t=>n.add(t)))}i.modifies(n._outputs);n._drop=t.drop!==false;if(t.cross&&n._dims.length>1){n._drop=false;n.cross()}if(e.clean()&&n._drop){i.clean(true).runAfter((()=>this.clean()))}return n.changes(i)},cross(){const t=this,e=t.value,n=t._dnames,i=n.map((()=>({}))),r=n.length;function o(t){let e,o,s,a;for(e in t){s=t[e].tuple;for(o=0;o<r;++o){i[o][a=s[n[o]]]=a}}}o(t._prev);o(e);function s(o,a,l){const u=n[l],c=i[l++];for(const n in c){const i=o?o+"|"+n:n;a[u]=c[n];if(l<r)s(i,a,l);else if(!e[i])t.cell(i,a)}}s("",{},0)},init(t){const e=this._inputs=[],n=this._outputs=[],i={};function r(t){const n=(0,m.IX)((0,m.Oj)(t)),r=n.length;let o=0,s;for(;o<r;++o){if(!i[s=n[o]]){i[s]=1;e.push(s)}}}this._dims=(0,m.IX)(t.groupby);this._dnames=this._dims.map((t=>{const e=(0,m.el)(t);r(t);n.push(e);return e}));this.cellkey=t.key?t.key:el(this._dims);this._countOnly=true;this._counts=[];this._measures=[];const o=t.fields||[null],s=t.ops||["count"],a=t.as||[],l=o.length,u={};let c,f,h,d,p,g;if(l!==s.length){(0,m.vU)("Unmatched number of fields and aggregate ops.")}for(g=0;g<l;++g){c=o[g];f=s[g];if(c==null&&f!=="count"){(0,m.vU)("Null aggregate field specified.")}d=(0,m.el)(c);p=nl(f,d,a[g]);n.push(p);if(f==="count"){this._counts.push(p);continue}h=u[d];if(!h){r(c);h=u[d]=[];h.field=c;this._measures.push(h)}if(f!=="count")this._countOnly=false;h.push(ll(f,p))}this._measures=this._measures.map((t=>ml(t,t.field)));return{}},cellkey:el(),cell(t,e){let n=this.value[t];if(!n){n=this.value[t]=this.newcell(t,e);this._adds[this._alen++]=n}else if(n.num===0&&this._drop&&n.stamp<this.stamp){n.stamp=this.stamp;this._adds[this._alen++]=n}else if(n.stamp<this.stamp){n.stamp=this.stamp;this._mods[this._mlen++]=n}return n},newcell(t,e){const n={key:t,num:0,agg:null,tuple:this.newtuple(e,this._prev&&this._prev[t]),stamp:this.stamp,store:false};if(!this._countOnly){const t=this._measures,e=t.length;n.agg=Array(e);for(let i=0;i<e;++i){n.agg[i]=new t[i](n)}}if(n.store){n.data=new gl}return n},newtuple(t,e){const n=this._dnames,i=this._dims,r=i.length,o={};for(let s=0;s<r;++s){o[n[s]]=i[s](t)}return e?ko(e.tuple,o):xo(o)},clean(){const t=this.value;for(const e in t){if(t[e].num===0){delete t[e]}}},add(t){const e=this.cellkey(t),n=this.cell(e,t);n.num+=1;if(this._countOnly)return;if(n.store)n.data.add(t);const i=n.agg;for(let r=0,o=i.length;r<o;++r){i[r].add(i[r].get(t),t)}},rem(t){const e=this.cellkey(t),n=this.cell(e,t);n.num-=1;if(this._countOnly)return;if(n.store)n.data.rem(t);const i=n.agg;for(let r=0,o=i.length;r<o;++r){i[r].rem(i[r].get(t),t)}},celltuple(t){const e=t.tuple,n=this._counts;if(t.store){t.data.values()}for(let i=0,r=n.length;i<r;++i){e[n[i]]=t.num}if(!this._countOnly){const n=t.agg;for(let t=0,i=n.length;t<i;++t){n[t].set(e)}}return e},changes(t){const e=this._adds,n=this._mods,i=this._prev,r=this._drop,o=t.add,s=t.rem,a=t.mod;let l,u,c,f;if(i)for(u in i){l=i[u];if(!r||l.num)s.push(l.tuple)}for(c=0,f=this._alen;c<f;++c){o.push(this.celltuple(e[c]));e[c]=null}for(c=0,f=this._mlen;c<f;++c){l=n[c];(l.num===0&&r?s:a).push(this.celltuple(l));n[c]=null}this._alen=this._mlen=0;this._prev=null;return t}});const _l=1e-14;function xl(t){Cs.call(this,null,t)}xl.Definition={type:"Bin",metadata:{modifies:true},params:[{name:"field",type:"field",required:true},{name:"interval",type:"boolean",default:true},{name:"anchor",type:"number"},{name:"maxbins",type:"number",default:20},{name:"base",type:"number",default:10},{name:"divide",type:"number",array:true,default:[5,2]},{name:"extent",type:"number",array:true,length:2,required:true},{name:"span",type:"number"},{name:"step",type:"number"},{name:"steps",type:"number",array:true},{name:"minstep",type:"number",default:0},{name:"nice",type:"boolean",default:true},{name:"name",type:"string"},{name:"as",type:"string",array:true,length:2,default:["bin0","bin1"]}]};(0,m.XW)(xl,Cs,{transform(t,e){const n=t.interval!==false,i=this._bins(t),r=i.start,o=i.step,s=t.as||["bin0","bin1"],a=s[0],l=s[1];let u;if(t.modified()){e=e.reflow(true);u=e.SOURCE}else{u=e.modified((0,m.Oj)(t.field))?e.ADD_MOD:e.ADD}e.visit(u,n?t=>{const e=i(t);t[a]=e;t[l]=e==null?null:r+o*(1+(e-r)/o)}:t=>t[a]=i(t));return e.modifies(n?s:a)},_bins(t){if(this.value&&!t.modified()){return this.value}const e=t.field,n=ea(t),i=n.step;let r=n.start,o=r+Math.ceil((n.stop-r)/i)*i,s,a;if((s=t.anchor)!=null){a=s-(r+i*Math.floor((s-r)/i));r+=a;o+=a}const l=function(t){let n=(0,m.He)(e(t));return n==null?null:n<r?-Infinity:n>o?+Infinity:(n=Math.max(r,Math.min(n,o-i)),r+i*Math.floor(_l+(n-r)/i))};l.start=r;l.stop=n.stop;l.step=i;return this.value=(0,m.ZE)(l,(0,m.Oj)(e),t.name||"bin_"+(0,m.el)(e))}});function bl(t,e,n){const i=t;let r=e||[],o=n||[],s={},a=0;return{add:t=>o.push(t),remove:t=>s[i(t)]=++a,size:()=>r.length,data:(t,e)=>{if(a){r=r.filter((t=>!s[i(t)]));s={};a=0}if(e&&t){r.sort(t)}if(o.length){r=t?(0,m.TS)(t,r,o.sort(t)):r.concat(o);o=[]}return r}}}function wl(t){Cs.call(this,[],t)}wl.Definition={type:"Collect",metadata:{source:true},params:[{name:"sort",type:"compare"}]};(0,m.XW)(wl,Cs,{transform(t,e){const n=e.fork(e.ALL),i=bl(vo,this.value,n.materialize(n.ADD).add),r=t.sort,o=e.changed()||r&&(t.modified("sort")||e.modified(r.fields));n.visit(n.REM,i.remove);this.modified(o);this.value=n.source=i.data(Mo(r),o);if(e.source&&e.source.root){this.value.root=e.source.root}return n}});function kl(t){Oo.call(this,null,Ml,t)}(0,m.XW)(kl,Oo);function Ml(t){return this.value&&!t.modified()?this.value:(0,m.qu)(t.fields,t.orders)}function Sl(t){Cs.call(this,null,t)}Sl.Definition={type:"CountPattern",metadata:{generates:true,changes:true},params:[{name:"field",type:"field",required:true},{name:"case",type:"enum",values:["upper","lower","mixed"],default:"mixed"},{name:"pattern",type:"string",default:'[\\w"]+'},{name:"stopwords",type:"string",default:""},{name:"as",type:"string",array:true,length:2,default:["text","count"]}]};function El(t,e,n){switch(e){case"upper":t=t.toUpperCase();break;case"lower":t=t.toLowerCase();break}return t.match(n)}(0,m.XW)(Sl,Cs,{transform(t,e){const n=e=>n=>{var i=El(a(n),t.case,o)||[],r;for(var l=0,u=i.length;l<u;++l){if(!s.test(r=i[l]))e(r)}};const i=this._parameterCheck(t,e),r=this._counts,o=this._match,s=this._stop,a=t.field,l=t.as||["text","count"],u=n((t=>r[t]=1+(r[t]||0))),c=n((t=>r[t]-=1));if(i){e.visit(e.SOURCE,u)}else{e.visit(e.ADD,u);e.visit(e.REM,c)}return this._finish(e,l)},_parameterCheck(t,e){let n=false;if(t.modified("stopwords")||!this._stop){this._stop=new RegExp("^"+(t.stopwords||"")+"$","i");n=true}if(t.modified("pattern")||!this._match){this._match=new RegExp(t.pattern||"[\\w']+","g");n=true}if(t.modified("field")||e.modified(t.field.fields)){n=true}if(n)this._counts={};return n},_finish(t,e){const n=this._counts,i=this._tuples||(this._tuples={}),r=e[0],o=e[1],s=t.fork(t.NO_SOURCE|t.NO_FIELDS);let a,l,u;for(a in n){l=i[a];u=n[a]||0;if(!l&&u){i[a]=l=xo({});l[r]=a;l[o]=u;s.add.push(l)}else if(u===0){if(l)s.rem.push(l);n[a]=null;i[a]=null}else if(l[o]!==u){l[o]=u;s.mod.push(l)}}return s.modifies(e)}});function Tl(t){Cs.call(this,null,t)}Tl.Definition={type:"Cross",metadata:{generates:true},params:[{name:"filter",type:"expr"},{name:"as",type:"string",array:true,length:2,default:["a","b"]}]};(0,m.XW)(Tl,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE),i=t.as||["a","b"],r=i[0],o=i[1],s=!this.value||e.changed(e.ADD_REM)||t.modified("as")||t.modified("filter");let a=this.value;if(s){if(a)n.rem=a;a=e.materialize(e.SOURCE).source;n.add=this.value=Dl(a,r,o,t.filter||m.yb)}else{n.mod=a}n.source=this.value;return n.modifies(i)}});function Dl(t,e,n,i){var r=[],o={},s=t.length,a=0,l,u;for(;a<s;++a){o[e]=u=t[a];for(l=0;l<s;++l){o[n]=t[l];if(i(o)){r.push(xo(o));o={};o[e]=u}}}return r}const Al={kde:va,mixture:Ma,normal:ya,lognormal:ka,uniform:Aa};const Nl="distributions",zl="function",Rl="field";function Cl(t,e){const n=t[zl];if(!(0,m.nr)(Al,n)){(0,m.vU)("Unknown distribution function: "+n)}const i=Al[n]();for(const r in t){if(r===Rl){i.data((t.from||e()).map(t[r]))}else if(r===Nl){i[r](t[r].map((t=>Cl(t,e))))}else if(typeof i[r]===zl){i[r](t[r])}}return i}function Ol(t){Cs.call(this,null,t)}const Ul=[{key:{function:"normal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"lognormal"},params:[{name:"mean",type:"number",default:0},{name:"stdev",type:"number",default:1}]},{key:{function:"uniform"},params:[{name:"min",type:"number",default:0},{name:"max",type:"number",default:1}]},{key:{function:"kde"},params:[{name:"field",type:"field",required:true},{name:"from",type:"data"},{name:"bandwidth",type:"number",default:0}]}];const $l={key:{function:"mixture"},params:[{name:"distributions",type:"param",array:true,params:Ul},{name:"weights",type:"number",array:true}]};Ol.Definition={type:"Density",metadata:{generates:true},params:[{name:"extent",type:"number",array:true,length:2},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"method",type:"string",default:"pdf",values:["pdf","cdf"]},{name:"distribution",type:"param",params:Ul.concat($l)},{name:"as",type:"string",array:true,default:["value","density"]}]};(0,m.XW)(Ol,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){const i=Cl(t.distribution,Pl(e)),r=t.steps||t.minsteps||25,o=t.steps||t.maxsteps||200;let s=t.method||"pdf";if(s!=="pdf"&&s!=="cdf"){(0,m.vU)("Invalid density method: "+s)}if(!t.extent&&!i.data){(0,m.vU)("Missing density extent parameter.")}s=i[s];const a=t.as||["value","density"],l=t.extent||(0,m.We)(i.data()),u=Ga(s,l,r,o).map((t=>{const e={};e[a[0]]=t[0];e[a[1]]=t[1];return xo(e)}));if(this.value)n.rem=this.value;this.value=n.add=n.source=u}return n}});function Pl(t){return()=>t.materialize(t.SOURCE).source}function ql(t,e){if(!t)return null;return t.map(((t,n)=>e[n]||(0,m.el)(t)))}function Il(t,e,n){const i=[],r=t=>t(l);let o,s,a,l,u,c;if(e==null){i.push(t.map(n))}else{for(o={},s=0,a=t.length;s<a;++s){l=t[s];u=e.map(r);c=o[u];if(!c){o[u]=c=[];c.dims=u;i.push(c)}c.push(n(l))}}return i}const Ll="bin";function Fl(t){Cs.call(this,null,t)}Fl.Definition={type:"DotBin",metadata:{modifies:true},params:[{name:"field",type:"field",required:true},{name:"groupby",type:"field",array:true},{name:"step",type:"number"},{name:"smooth",type:"boolean",default:false},{name:"as",type:"string",default:Ll}]};const jl=(t,e)=>(0,m.yP)((0,m.We)(t,e))/30;(0,m.XW)(Fl,Cs,{transform(t,e){if(this.value&&!(t.modified()||e.changed())){return e}const n=e.materialize(e.SOURCE).source,i=Il(e.source,t.groupby,m.yR),r=t.smooth||false,o=t.field,s=t.step||jl(n,o),a=Mo(((t,e)=>o(t)-o(e))),l=t.as||Ll,u=i.length;let c=Infinity,f=-Infinity,h=0,d;for(;h<u;++h){const t=i[h].sort(a);d=-1;for(const e of oa(t,s,r,o)){if(e<c)c=e;if(e>f)f=e;t[++d][l]=e}}this.value={start:c,stop:f,step:s};return e.reflow(true).modifies(l)}});function Wl(t){Oo.call(this,null,Xl,t);this.modified(true)}(0,m.XW)(Wl,Oo);function Xl(t){const e=t.expr;return this.value&&!t.modified("expr")?this.value:(0,m.ZE)((n=>e(n,t)),(0,m.Oj)(e),(0,m.el)(e))}function Hl(t){Cs.call(this,[undefined,undefined],t)}Hl.Definition={type:"Extent",metadata:{},params:[{name:"field",type:"field",required:true}]};(0,m.XW)(Hl,Cs,{transform(t,e){const n=this.value,i=t.field,r=e.changed()||e.modified(i.fields)||t.modified("field");let o=n[0],s=n[1];if(r||o==null){o=+Infinity;s=-Infinity}e.visit(r?e.SOURCE:e.ADD,(t=>{const e=(0,m.He)(i(t));if(e!=null){if(e<o)o=e;if(e>s)s=e}}));if(!Number.isFinite(o)||!Number.isFinite(s)){let t=(0,m.el)(i);if(t)t=' for field "'.concat(t,'"');e.dataflow.warn("Infinite extent".concat(t,": [").concat(o,", ").concat(s,"]"));o=s=undefined}this.value=[o,s]}});function Bl(t,e){Oo.call(this,t);this.parent=e;this.count=0}(0,m.XW)(Bl,Oo,{connect(t){this.detachSubflow=t.detachSubflow;this.targets().add(t);return t.source=this},add(t){this.count+=1;this.value.add.push(t)},rem(t){this.count-=1;this.value.rem.push(t)},mod(t){this.value.mod.push(t)},init(t){this.value.init(t,t.NO_SOURCE)},evaluate(){return this.value}});function Yl(t){Cs.call(this,{},t);this._keys=(0,m.Xr)();const e=this._targets=[];e.active=0;e.forEach=t=>{for(let n=0,i=e.active;n<i;++n){t(e[n],n,e)}}}(0,m.XW)(Yl,Cs,{activate(t){this._targets[this._targets.active++]=t},subflow(t,e,n,i){const r=this.value;let o=(0,m.nr)(r,t)&&r[t],s,a;if(!o){a=i||(a=this._group[t])&&a.tuple;s=n.dataflow;o=new Bl(n.fork(n.NO_SOURCE),this);s.add(o).connect(e(s,t,a));r[t]=o;this.activate(o)}else if(o.value.stamp<n.stamp){o.init(n);this.activate(o)}return o},clean(){const t=this.value;let e=0;for(const n in t){if(t[n].count===0){const i=t[n].detachSubflow;if(i)i();delete t[n];++e}}if(e){const t=this._targets.filter((t=>t&&t.count>0));this.initTargets(t)}},initTargets(t){const e=this._targets,n=e.length,i=t?t.length:0;let r=0;for(;r<i;++r){e[r]=t[r]}for(;r<n&&e[r]!=null;++r){e[r]=null}e.active=i},transform(t,e){const n=e.dataflow,i=t.key,r=t.subflow,o=this._keys,s=t.modified("key"),a=t=>this.subflow(t,r,e);this._group=t.group||{};this.initTargets();e.visit(e.REM,(t=>{const e=vo(t),n=o.get(e);if(n!==undefined){o.delete(e);a(n).rem(t)}}));e.visit(e.ADD,(t=>{const e=i(t);o.set(vo(t),e);a(e).add(t)}));if(s||e.modified(i.fields)){e.visit(e.MOD,(t=>{const e=vo(t),n=o.get(e),r=i(t);if(n===r){a(r).mod(t)}else{o.set(e,r);a(n).rem(t);a(r).add(t)}}))}else if(e.changed(e.MOD)){e.visit(e.MOD,(t=>{a(o.get(vo(t))).mod(t)}))}if(s){e.visit(e.REFLOW,(t=>{const e=vo(t),n=o.get(e),r=i(t);if(n!==r){o.set(e,r);a(n).rem(t);a(r).add(t)}}))}if(e.clean()){n.runAfter((()=>{this.clean();o.clean()}))}else if(o.empty>n.cleanThreshold){n.runAfter(o.clean)}return e}});function Jl(t){Oo.call(this,null,Gl,t)}(0,m.XW)(Jl,Oo);function Gl(t){return this.value&&!t.modified()?this.value:(0,m.kJ)(t.name)?(0,m.IX)(t.name).map((t=>(0,m.EP)(t))):(0,m.EP)(t.name,t.as)}function Vl(t){Cs.call(this,(0,m.Xr)(),t)}Vl.Definition={type:"Filter",metadata:{changes:true},params:[{name:"expr",type:"expr",required:true}]};(0,m.XW)(Vl,Cs,{transform(t,e){const n=e.dataflow,i=this.value,r=e.fork(),o=r.add,s=r.rem,a=r.mod,l=t.expr;let u=true;e.visit(e.REM,(t=>{const e=vo(t);if(!i.has(e))s.push(t);else i.delete(e)}));e.visit(e.ADD,(e=>{if(l(e,t))o.push(e);else i.set(vo(e),1)}));function c(e){const n=vo(e),r=l(e,t),c=i.get(n);if(r&&c){i.delete(n);o.push(e)}else if(!r&&!c){i.set(n,1);s.push(e)}else if(u&&r&&!c){a.push(e)}}e.visit(e.MOD,c);if(t.modified()){u=false;e.visit(e.REFLOW,c)}if(i.empty>n.cleanThreshold)n.runAfter(i.clean);return r}});function Kl(t){Cs.call(this,[],t)}Kl.Definition={type:"Flatten",metadata:{generates:true},params:[{name:"fields",type:"field",array:true,required:true},{name:"index",type:"string"},{name:"as",type:"string",array:true}]};(0,m.XW)(Kl,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE),i=t.fields,r=ql(i,t.as||[]),o=t.index||null,s=r.length;n.rem=this.value;e.visit(e.SOURCE,(t=>{const e=i.map((e=>e(t))),a=e.reduce(((t,e)=>Math.max(t,e.length)),0);let l=0,u,c,f;for(;l<a;++l){c=bo(t);for(u=0;u<s;++u){c[r[u]]=(f=e[u][l])==null?null:f}if(o){c[o]=l}n.add.push(c)}}));this.value=n.source=n.add;if(o)n.modifies(o);return n.modifies(r)}});function Zl(t){Cs.call(this,[],t)}Zl.Definition={type:"Fold",metadata:{generates:true},params:[{name:"fields",type:"field",array:true,required:true},{name:"as",type:"string",array:true,length:2,default:["key","value"]}]};(0,m.XW)(Zl,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE),i=t.fields,r=i.map(m.el),o=t.as||["key","value"],s=o[0],a=o[1],l=i.length;n.rem=this.value;e.visit(e.SOURCE,(t=>{for(let e=0,o;e<l;++e){o=bo(t);o[s]=r[e];o[a]=i[e](t);n.add.push(o)}}));this.value=n.source=n.add;return n.modifies(o)}});function Ql(t){Cs.call(this,null,t)}Ql.Definition={type:"Formula",metadata:{modifies:true},params:[{name:"expr",type:"expr",required:true},{name:"as",type:"string",required:true},{name:"initonly",type:"boolean"}]};(0,m.XW)(Ql,Cs,{transform(t,e){const n=t.expr,i=t.as,r=t.modified(),o=t.initonly?e.ADD:r?e.SOURCE:e.modified(n.fields)||e.modified(i)?e.ADD_MOD:e.ADD;if(r){e=e.materialize().reflow(true)}if(!t.initonly){e.modifies(i)}return e.visit(o,(e=>e[i]=n(e,t)))}});function tu(t){Cs.call(this,[],t)}(0,m.XW)(tu,Cs,{transform(t,e){const n=e.fork(e.ALL),i=t.generator;let r=this.value,o=t.size-r.length,s,a,l;if(o>0){for(s=[];--o>=0;){s.push(l=xo(i(t)));r.push(l)}n.add=n.add.length?n.materialize(n.ADD).add.concat(s):s}else{a=r.slice(0,-o);n.rem=n.rem.length?n.materialize(n.REM).rem.concat(a):a;r=r.slice(-o)}n.source=this.value=r;return n}});const eu={value:"value",median:Vs,mean:Za,min:qs,max:Ps};const nu=[];function iu(t){Cs.call(this,[],t)}iu.Definition={type:"Impute",metadata:{changes:true},params:[{name:"field",type:"field",required:true},{name:"key",type:"field",required:true},{name:"keyvals",array:true},{name:"groupby",type:"field",array:true},{name:"method",type:"enum",default:"value",values:["value","mean","median","max","min"]},{name:"value",default:0}]};function ru(t){var e=t.method||eu.value,n;if(eu[e]==null){(0,m.vU)("Unrecognized imputation method: "+e)}else if(e===eu.value){n=t.value!==undefined?t.value:0;return()=>n}else{return eu[e]}}function ou(t){const e=t.field;return t=>t?e(t):NaN}(0,m.XW)(iu,Cs,{transform(t,e){var n=e.fork(e.ALL),i=ru(t),r=ou(t),o=(0,m.el)(t.field),s=(0,m.el)(t.key),a=(t.groupby||[]).map(m.el),l=su(e.source,t.groupby,t.key,t.keyvals),u=[],c=this.value,f=l.domain.length,h,d,p,g,y,v,_,x,b,w;for(y=0,x=l.length;y<x;++y){h=l[y];p=h.values;d=NaN;for(_=0;_<f;++_){if(h[_]!=null)continue;g=l.domain[_];w={_impute:true};for(v=0,b=p.length;v<b;++v)w[a[v]]=p[v];w[s]=g;w[o]=Number.isNaN(d)?d=i(h,r):d;u.push(xo(w))}}if(u.length)n.add=n.materialize(n.ADD).add.concat(u);if(c.length)n.rem=n.materialize(n.REM).rem.concat(c);this.value=u;return n}});function su(t,e,n,i){var r=t=>t(g),o=[],s=i?i.slice():[],a={},l={},u,c,f,h,d,p,m,g;s.forEach(((t,e)=>a[t]=e+1));for(h=0,m=t.length;h<m;++h){g=t[h];p=n(g);d=a[p]||(a[p]=s.push(p));c=(u=e?e.map(r):nu)+"";if(!(f=l[c])){f=l[c]=[];o.push(f);f.values=u}f[d-1]=g}o.domain=s;return o}function au(t){vl.call(this,t)}au.Definition={type:"JoinAggregate",metadata:{modifies:true},params:[{name:"groupby",type:"field",array:true},{name:"fields",type:"field",null:true,array:true},{name:"ops",type:"enum",array:true,values:sl},{name:"as",type:"string",null:true,array:true},{name:"key",type:"field"}]};(0,m.XW)(au,vl,{transform(t,e){const n=this,i=t.modified();let r;if(n.value&&(i||e.modified(n._inputs,true))){r=n.value=i?n.init(t):{};e.visit(e.SOURCE,(t=>n.add(t)))}else{r=n.value=n.value||this.init(t);e.visit(e.REM,(t=>n.rem(t)));e.visit(e.ADD,(t=>n.add(t)))}n.changes();e.visit(e.SOURCE,(t=>{(0,m.l7)(t,r[n.cellkey(t)].tuple)}));return e.reflow(i).modifies(this._outputs)},changes(){const t=this._adds,e=this._mods;let n,i;for(n=0,i=this._alen;n<i;++n){this.celltuple(t[n]);t[n]=null}for(n=0,i=this._mlen;n<i;++n){this.celltuple(e[n]);e[n]=null}this._alen=this._mlen=0}});function lu(t){Cs.call(this,null,t)}lu.Definition={type:"KDE",metadata:{generates:true},params:[{name:"groupby",type:"field",array:true},{name:"field",type:"field",required:true},{name:"cumulative",type:"boolean",default:false},{name:"counts",type:"boolean",default:false},{name:"bandwidth",type:"number",default:0},{name:"extent",type:"number",array:true,length:2},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"steps",type:"number"},{name:"minsteps",type:"number",default:25},{name:"maxsteps",type:"number",default:200},{name:"as",type:"string",array:true,default:["value","density"]}]};(0,m.XW)(lu,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){const i=e.materialize(e.SOURCE).source,r=Il(i,t.groupby,t.field),o=(t.groupby||[]).map(m.el),s=t.bandwidth,a=t.cumulative?"cdf":"pdf",l=t.as||["value","density"],u=[];let c=t.extent,f=t.steps||t.minsteps||25,h=t.steps||t.maxsteps||200;if(a!=="pdf"&&a!=="cdf"){(0,m.vU)("Invalid density method: "+a)}if(t.resolve==="shared"){if(!c)c=(0,m.We)(i,t.field);f=h=t.steps||h}r.forEach((e=>{const n=va(e,s)[a],i=t.counts?e.length:1,r=c||(0,m.We)(e);Ga(n,r,f,h).forEach((t=>{const n={};for(let i=0;i<o.length;++i){n[o[i]]=e.dims[i]}n[l[0]]=t[0];n[l[1]]=t[1]*i;u.push(xo(n))}))}));if(this.value)n.rem=this.value;this.value=n.add=n.source=u}return n}});function uu(t){Oo.call(this,null,cu,t)}(0,m.XW)(uu,Oo);function cu(t){return this.value&&!t.modified()?this.value:(0,m.Jy)(t.fields,t.flat)}function fu(t){Cs.call(this,[],t);this._pending=null}(0,m.XW)(fu,Cs,{transform(t,e){const n=e.dataflow;if(this._pending){return du(this,e,this._pending)}if(hu(t))return e.StopPropagation;if(t.values){return du(this,e,n.parse(t.values,t.format))}else if(t.async){const e=n.request(t.url,t.format).then((t=>{this._pending=(0,m.IX)(t.data);return t=>t.touch(this)}));return{async:e}}else{return n.request(t.url,t.format).then((t=>du(this,e,(0,m.IX)(t.data))))}}});function hu(t){return t.modified("async")&&!(t.modified("values")||t.modified("url")||t.modified("format"))}function du(t,e,n){n.forEach(xo);const i=e.fork(e.NO_FIELDS&e.NO_SOURCE);i.rem=t.value;t.value=i.source=i.add=n;t._pending=null;if(i.rem.length)i.clean(true);return i}function pu(t){Cs.call(this,{},t)}pu.Definition={type:"Lookup",metadata:{modifies:true},params:[{name:"index",type:"index",params:[{name:"from",type:"data",required:true},{name:"key",type:"field",required:true}]},{name:"values",type:"field",array:true},{name:"fields",type:"field",array:true,required:true},{name:"as",type:"string",array:true},{name:"default",default:null}]};(0,m.XW)(pu,Cs,{transform(t,e){const n=t.fields,i=t.index,r=t.values,o=t.default==null?null:t.default,s=t.modified(),a=n.length;let l=s?e.SOURCE:e.ADD,u=e,c=t.as,f,h,d;if(r){h=r.length;if(a>1&&!c){(0,m.vU)('Multi-field lookup requires explicit "as" parameter.')}if(c&&c.length!==a*h){(0,m.vU)('The "as" parameter has too few output field names.')}c=c||r.map(m.el);f=function(t){for(var e=0,s=0,l,u;e<a;++e){u=i.get(n[e](t));if(u==null)for(l=0;l<h;++l,++s)t[c[s]]=o;else for(l=0;l<h;++l,++s)t[c[s]]=r[l](u)}}}else{if(!c){(0,m.vU)("Missing output field names.")}f=function(t){for(var e=0,r;e<a;++e){r=i.get(n[e](t));t[c[e]]=r==null?o:r}}}if(s){u=e.reflow(true)}else{d=n.some((t=>e.modified(t.fields)));l|=d?e.MOD:0}e.visit(l,f);return u.modifies(c)}});function mu(t){Oo.call(this,null,gu,t)}(0,m.XW)(mu,Oo);function gu(t){if(this.value&&!t.modified()){return this.value}const e=t.extents,n=e.length;let i=+Infinity,r=-Infinity,o,s;for(o=0;o<n;++o){s=e[o];if(s[0]<i)i=s[0];if(s[1]>r)r=s[1]}return[i,r]}function yu(t){Oo.call(this,null,vu,t)}(0,m.XW)(yu,Oo);function vu(t){return this.value&&!t.modified()?this.value:t.values.reduce(((t,e)=>t.concat(e)),[])}function _u(t){Cs.call(this,null,t)}(0,m.XW)(_u,Cs,{transform(t,e){this.modified(t.modified());this.value=t;return e.fork(e.NO_SOURCE|e.NO_FIELDS)}});function xu(t){vl.call(this,t)}xu.Definition={type:"Pivot",metadata:{generates:true,changes:true},params:[{name:"groupby",type:"field",array:true},{name:"field",type:"field",required:true},{name:"value",type:"field",required:true},{name:"op",type:"enum",values:sl,default:"sum"},{name:"limit",type:"number",default:0},{name:"key",type:"field"}]};(0,m.XW)(xu,vl,{_transform:vl.prototype.transform,transform(t,e){return this._transform(bu(t,e),e)}});function bu(t,e){const n=t.field,i=t.value,r=(t.op==="count"?"__count__":t.op)||"sum",o=(0,m.Oj)(n).concat((0,m.Oj)(i)),s=ku(n,t.limit||0,e);if(e.changed())t.set("__pivot__",null,null,true);return{key:t.key,groupby:t.groupby,ops:s.map((()=>r)),fields:s.map((t=>wu(t,n,i,o))),as:s.map((t=>t+"")),modified:t.modified.bind(t)}}function wu(t,e,n,i){return(0,m.ZE)((i=>e(i)===t?n(i):NaN),i,t+"")}function ku(t,e,n){const i={},r=[];n.visit(n.SOURCE,(e=>{const n=t(e);if(!i[n]){i[n]=1;r.push(n)}}));r.sort(m.j2);return e?r.slice(0,e):r}function Mu(t){Yl.call(this,t)}(0,m.XW)(Mu,Yl,{transform(t,e){const n=t.subflow,i=t.field,r=t=>this.subflow(vo(t),n,e,t);if(t.modified("field")||i&&e.modified((0,m.Oj)(i))){(0,m.vU)("PreFacet does not support field modification.")}this.initTargets();if(i){e.visit(e.MOD,(t=>{const e=r(t);i(t).forEach((t=>e.mod(t)))}));e.visit(e.ADD,(t=>{const e=r(t);i(t).forEach((t=>e.add(xo(t))))}));e.visit(e.REM,(t=>{const e=r(t);i(t).forEach((t=>e.rem(t)))}))}else{e.visit(e.MOD,(t=>r(t).mod(t)));e.visit(e.ADD,(t=>r(t).add(t)));e.visit(e.REM,(t=>r(t).rem(t)))}if(e.clean()){e.runAfter((()=>this.clean()))}return e}});function Su(t){Cs.call(this,null,t)}Su.Definition={type:"Project",metadata:{generates:true,changes:true},params:[{name:"fields",type:"field",array:true},{name:"as",type:"string",null:true,array:true}]};(0,m.XW)(Su,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE),i=t.fields,r=ql(t.fields,t.as||[]),o=i?(t,e)=>Eu(t,e,i,r):wo;let s;if(this.value){s=this.value}else{e=e.addAll();s=this.value={}}e.visit(e.REM,(t=>{const e=vo(t);n.rem.push(s[e]);s[e]=null}));e.visit(e.ADD,(t=>{const e=o(t,xo({}));s[vo(t)]=e;n.add.push(e)}));e.visit(e.MOD,(t=>{n.mod.push(o(t,s[vo(t)]))}));return n}});function Eu(t,e,n,i){for(let r=0,o=n.length;r<o;++r){e[i[r]]=n[r](t)}return e}function Tu(t){Cs.call(this,null,t)}(0,m.XW)(Tu,Cs,{transform(t,e){this.value=t.value;return t.modified("value")?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation}});function Du(t){Cs.call(this,null,t)}Du.Definition={type:"Quantile",metadata:{generates:true,changes:true},params:[{name:"groupby",type:"field",array:true},{name:"field",type:"field",required:true},{name:"probs",type:"number",array:true},{name:"step",type:"number",default:.01},{name:"as",type:"string",array:true,default:["prob","value"]}]};const Au=1e-14;(0,m.XW)(Du,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=t.as||["prob","value"];if(this.value&&!t.modified()&&!e.changed()){n.source=this.value;return n}const r=e.materialize(e.SOURCE).source,o=Il(r,t.groupby,t.field),s=(t.groupby||[]).map(m.el),a=[],l=t.step||.01,u=t.probs||Qa(l/2,1-Au,l),c=u.length;o.forEach((t=>{const e=Zs(t,u);for(let n=0;n<c;++n){const r={};for(let e=0;e<s.length;++e){r[s[e]]=t.dims[e]}r[i[0]]=u[n];r[i[1]]=e[n];a.push(xo(r))}}));if(this.value)n.rem=this.value;this.value=n.add=n.source=a;return n}});function Nu(t){Cs.call(this,null,t)}(0,m.XW)(Nu,Cs,{transform(t,e){let n,i;if(this.value){i=this.value}else{n=e=e.addAll();i=this.value={}}if(t.derive){n=e.fork(e.NO_SOURCE);e.visit(e.REM,(t=>{const e=vo(t);n.rem.push(i[e]);i[e]=null}));e.visit(e.ADD,(t=>{const e=bo(t);i[vo(t)]=e;n.add.push(e)}));e.visit(e.MOD,(t=>{const e=i[vo(t)];for(const i in t){e[i]=t[i];n.modifies(i)}n.mod.push(e)}))}return n}});function zu(t){Cs.call(this,[],t);this.count=0}zu.Definition={type:"Sample",metadata:{},params:[{name:"size",type:"number",default:1e3}]};(0,m.XW)(zu,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE),i=t.modified("size"),r=t.size,o=this.value.reduce(((t,e)=>(t[vo(e)]=1,t)),{});let s=this.value,a=this.count,l=0;function u(t){let e,i;if(s.length<r){s.push(t)}else{i=~~((a+1)*na());if(i<s.length&&i>=l){e=s[i];if(o[vo(e)])n.rem.push(e);s[i]=t}}++a}if(e.rem.length){e.visit(e.REM,(t=>{const e=vo(t);if(o[e]){o[e]=-1;n.rem.push(t)}--a}));s=s.filter((t=>o[vo(t)]!==-1))}if((e.rem.length||i)&&s.length<r&&e.source){l=a=s.length;e.visit(e.SOURCE,(t=>{if(!o[vo(t)])u(t)}));l=-1}if(i&&s.length>r){const t=s.length-r;for(let e=0;e<t;++e){o[vo(s[e])]=-1;n.rem.push(s[e])}s=s.slice(t)}if(e.mod.length){e.visit(e.MOD,(t=>{if(o[vo(t)])n.mod.push(t)}))}if(e.add.length){e.visit(e.ADD,u)}if(e.add.length||l<0){n.add=s.filter((t=>!o[vo(t)]))}this.count=a;this.value=n.source=s;return n}});function Ru(t){Cs.call(this,null,t)}Ru.Definition={type:"Sequence",metadata:{generates:true,changes:true},params:[{name:"start",type:"number",required:true},{name:"stop",type:"number",required:true},{name:"step",type:"number",default:1},{name:"as",type:"string",default:"data"}]};(0,m.XW)(Ru,Cs,{transform(t,e){if(this.value&&!t.modified())return;const n=e.materialize().fork(e.MOD),i=t.as||"data";n.rem=this.value?e.rem.concat(this.value):e.rem;this.value=Qa(t.start,t.stop,t.step||1).map((t=>{const e={};e[i]=t;return xo(e)}));n.add=e.add.concat(this.value);return n}});function Cu(t){Cs.call(this,null,t);this.modified(true)}(0,m.XW)(Cu,Cs,{transform(t,e){this.value=e.source;return e.changed()?e.fork(e.NO_SOURCE|e.NO_FIELDS):e.StopPropagation}});function Ou(t){Cs.call(this,null,t)}const Uu=["unit0","unit1"];Ou.Definition={type:"TimeUnit",metadata:{modifies:true},params:[{name:"field",type:"field",required:true},{name:"interval",type:"boolean",default:true},{name:"units",type:"enum",values:Ie,array:true},{name:"step",type:"number",default:1},{name:"maxbins",type:"number",default:40},{name:"extent",type:"date",array:true},{name:"timezone",type:"enum",default:"local",values:["local","utc"]},{name:"as",type:"string",array:true,length:2,default:Uu}]};(0,m.XW)(Ou,Cs,{transform(t,e){const n=t.field,i=t.interval!==false,r=t.timezone==="utc",o=this._floor(t,e),s=(r?yn:gn)(o.unit).offset,a=t.as||Uu,l=a[0],u=a[1],c=o.step;let f=o.start||Infinity,h=o.stop||-Infinity,d=e.ADD;if(t.modified()||e.changed(e.REM)||e.modified((0,m.Oj)(n))){e=e.reflow(true);d=e.SOURCE;f=Infinity;h=-Infinity}e.visit(d,(t=>{const e=n(t);let r,a;if(e==null){t[l]=null;if(i)t[u]=null}else{t[l]=r=a=o(e);if(i)t[u]=a=s(r,c);if(r<f)f=r;if(a>h)h=a}}));o.start=f;o.stop=h;return e.modifies(i?a:l)},_floor(t,e){const n=t.timezone==="utc";const{units:i,step:r}=t.units?{units:t.units,step:t.step||1}:Ln({extent:t.extent||(0,m.We)(e.materialize(e.SOURCE).source,t.field),maxbins:t.maxbins});const o=Fe(i),s=this.value||{},a=(n?dn:cn)(o,r);a.unit=(0,m.fj)(o);a.units=o;a.step=r;a.start=s.start;a.stop=s.stop;return this.value=a}});function $u(t){Cs.call(this,(0,m.Xr)(),t)}(0,m.XW)($u,Cs,{transform(t,e){const n=e.dataflow,i=t.field,r=this.value,o=t=>r.set(i(t),t);let s=true;if(t.modified("field")||e.modified(i.fields)){r.clear();e.visit(e.SOURCE,o)}else if(e.changed()){e.visit(e.REM,(t=>r.delete(i(t))));e.visit(e.ADD,o)}else{s=false}this.modified(s);if(r.empty>n.cleanThreshold)n.runAfter(r.clean);return e.fork()}});function Pu(t){Cs.call(this,null,t)}(0,m.XW)(Pu,Cs,{transform(t,e){const n=!this.value||t.modified("field")||t.modified("sort")||e.changed()||t.sort&&e.modified(t.sort.fields);if(n){this.value=(t.sort?e.source.slice().sort(Mo(t.sort)):e.source).map(t.field)}}});function qu(t,e,n,i){const r=Iu[t](e,n);return{init:r.init||m.bM,update:function(t,e){e[i]=r.next(t)}}}const Iu={row_number:function(){return{next:t=>t.index+1}},rank:function(){let t;return{init:()=>t=1,next:e=>{const n=e.index,i=e.data;return n&&e.compare(i[n-1],i[n])?t=n+1:t}}},dense_rank:function(){let t;return{init:()=>t=1,next:e=>{const n=e.index,i=e.data;return n&&e.compare(i[n-1],i[n])?++t:t}}},percent_rank:function(){const t=Iu.rank(),e=t.next;return{init:t.init,next:t=>(e(t)-1)/(t.data.length-1)}},cume_dist:function(){let t;return{init:()=>t=0,next:e=>{const n=e.data,i=e.compare;let r=e.index;if(t<r){while(r+1<n.length&&!i(n[r],n[r+1]))++r;t=r}return(1+t)/n.length}}},ntile:function(t,e){e=+e;if(!(e>0))(0,m.vU)("ntile num must be greater than zero.");const n=Iu.cume_dist(),i=n.next;return{init:n.init,next:t=>Math.ceil(e*i(t))}},lag:function(t,e){e=+e||1;return{next:n=>{const i=n.index-e;return i>=0?t(n.data[i]):null}}},lead:function(t,e){e=+e||1;return{next:n=>{const i=n.index+e,r=n.data;return i<r.length?t(r[i]):null}}},first_value:function(t){return{next:e=>t(e.data[e.i0])}},last_value:function(t){return{next:e=>t(e.data[e.i1-1])}},nth_value:function(t,e){e=+e;if(!(e>0))(0,m.vU)("nth_value nth must be greater than zero.");return{next:n=>{const i=n.i0+(e-1);return i<n.i1?t(n.data[i]):null}}},prev_value:function(t){let e;return{init:()=>e=null,next:n=>{const i=t(n.data[n.index]);return i!=null?e=i:e}}},next_value:function(t){let e,n;return{init:()=>(e=null,n=-1),next:i=>{const r=i.data;return i.index<=n?e:(n=Lu(t,r,i.index))<0?(n=r.length,e=null):e=t(r[n])}}}};function Lu(t,e,n){for(let i=e.length;n<i;++n){const i=t(e[n]);if(i!=null)return n}return-1}const Fu=Object.keys(Iu);function ju(t){const e=(0,m.IX)(t.ops),n=(0,m.IX)(t.fields),i=(0,m.IX)(t.params),r=(0,m.IX)(t.as),o=this.outputs=[],s=this.windows=[],a={},l={},u=[],c=[];let f=true;function h(t){(0,m.IX)((0,m.Oj)(t)).forEach((t=>a[t]=1))}h(t.sort);e.forEach(((t,e)=>{const a=n[e],d=(0,m.el)(a),p=nl(t,d,r[e]);h(a);o.push(p);if((0,m.nr)(Iu,t)){s.push(qu(t,n[e],i[e],p))}else{if(a==null&&t!=="count"){(0,m.vU)("Null aggregate field specified.")}if(t==="count"){u.push(p);return}f=false;let e=l[d];if(!e){e=l[d]=[];e.field=a;c.push(e)}e.push(ll(t,p))}}));if(u.length||c.length){this.cell=Xu(c,u,f)}this.inputs=Object.keys(a)}const Wu=ju.prototype;Wu.init=function(){this.windows.forEach((t=>t.init()));if(this.cell)this.cell.init()};Wu.update=function(t,e){const n=this.cell,i=this.windows,r=t.data,o=i&&i.length;let s;if(n){for(s=t.p0;s<t.i0;++s)n.rem(r[s]);for(s=t.p1;s<t.i1;++s)n.add(r[s]);n.set(e)}for(s=0;s<o;++s)i[s].update(t,e)};function Xu(t,e,n){t=t.map((t=>ml(t,t.field)));const i={num:0,agg:null,store:false,count:e};if(!n){var r=t.length,o=i.agg=Array(r),s=0;for(;s<r;++s)o[s]=new t[s](i)}if(i.store){var a=i.data=new gl}i.add=function(t){i.num+=1;if(n)return;if(a)a.add(t);for(let e=0;e<r;++e){o[e].add(o[e].get(t),t)}};i.rem=function(t){i.num-=1;if(n)return;if(a)a.rem(t);for(let e=0;e<r;++e){o[e].rem(o[e].get(t),t)}};i.set=function(t){let r,s;if(a)a.values();for(r=0,s=e.length;r<s;++r)t[e[r]]=i.num;if(!n)for(r=0,s=o.length;r<s;++r)o[r].set(t)};i.init=function(){i.num=0;if(a)a.reset();for(let t=0;t<r;++t)o[t].init()};return i}function Hu(t){Cs.call(this,{},t);this._mlen=0;this._mods=[]}Hu.Definition={type:"Window",metadata:{modifies:true},params:[{name:"sort",type:"compare"},{name:"groupby",type:"field",array:true},{name:"ops",type:"enum",array:true,values:Fu.concat(sl)},{name:"params",type:"number",null:true,array:true},{name:"fields",type:"field",null:true,array:true},{name:"as",type:"string",null:true,array:true},{name:"frame",type:"number",null:true,array:true,length:2,default:[null,0]},{name:"ignorePeers",type:"boolean",default:false}]};(0,m.XW)(Hu,Cs,{transform(t,e){this.stamp=e.stamp;const n=t.modified(),i=Mo(t.sort),r=el(t.groupby),o=t=>this.group(r(t));let s=this.state;if(!s||n){s=this.state=new ju(t)}if(n||e.modified(s.inputs)){this.value={};e.visit(e.SOURCE,(t=>o(t).add(t)))}else{e.visit(e.REM,(t=>o(t).remove(t)));e.visit(e.ADD,(t=>o(t).add(t)))}for(let a=0,l=this._mlen;a<l;++a){Bu(this._mods[a],s,i,t)}this._mlen=0;this._mods=[];return e.reflow(n).modifies(s.outputs)},group(t){let e=this.value[t];if(!e){e=this.value[t]=bl(vo);e.stamp=-1}if(e.stamp<this.stamp){e.stamp=this.stamp;this._mods[this._mlen++]=e}return e}});function Bu(t,e,n,i){const r=i.sort,o=r&&!i.ignorePeers,s=i.frame||[null,0],a=t.data(n),l=a.length,u=o?Te(r):null,c={i0:0,i1:0,p0:0,p1:0,index:0,data:a,compare:r||(0,m.a9)(-1)};e.init();for(let f=0;f<l;++f){Yu(c,s,f,l);if(o)Ju(c,u);e.update(c,a[f])}}function Yu(t,e,n,i){t.p0=t.i0;t.p1=t.i1;t.i0=e[0]==null?0:Math.max(0,n-Math.abs(e[0]));t.i1=e[1]==null?i:Math.min(i,n+Math.abs(e[1])+1);t.index=n}function Ju(t,e){const n=t.i0,i=t.i1-1,r=t.compare,o=t.data,s=o.length-1;if(n>0&&!r(o[n],o[n-1]))t.i0=e.left(o,o[n]);if(i<s&&!r(o[i],o[i+1]))t.i1=e.right(o,o[i])}function Gu(t,e,n){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+n)/6)}function Vu(t){this._context=t}Vu.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:Gu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,e){t=+t,e=+e;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;this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Gu(this,t,e);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=e}};function Ku(t){return new Vu(t)}function Zu(){}function Qu(t){this._context=t}Qu.prototype={areaStart:Zu,areaEnd:Zu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2);this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3);this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3);this._context.closePath();break}case 3:{this.point(this._x2,this._y2);this.point(this._x3,this._y3);this.point(this._x4,this._y4);break}}},point:function(t,e){t=+t,e=+e;switch(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:Gu(this,t,e);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=e}};function tc(t){return new Qu(t)}function ec(t){this._context=t}ec.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,e){t=+t,e=+e;switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Gu(this,t,e);break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=e}};function nc(t){return new ec(t)}function ic(t,e){this._basis=new Vu(t);this._beta=e}ic.prototype={lineStart:function(){this._x=[];this._y=[];this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0){var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,a=-1,l;while(++a<=n){l=a/n;this._basis.point(this._beta*t[a]+(1-this._beta)*(i+l*o),this._beta*e[a]+(1-this._beta)*(r+l*s))}}this._x=this._y=null;this._basis.lineEnd()},point:function(t,e){this._x.push(+t);this._y.push(+e)}};const rc=function t(e){function n(t){return e===1?new Vu(t):new ic(t,e)}n.beta=function(e){return t(+e)};return n}(.85);function oc(t,e,n){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-n),t._x2,t._y2)}function sc(t,e){this._context=t;this._k=(1-e)/6}sc.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:oc(this,this._x1,this._y1);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,e){t=+t,e=+e;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;this._x1=t,this._y1=e;break;case 2:this._point=3;default:oc(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=e}};const ac=function t(e){function n(t){return new sc(t,e)}n.tension=function(e){return t(+e)};return n}(0);function lc(t,e){this._context=t;this._k=(1-e)/6}lc.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,e){t=+t,e=+e;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:oc(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=e}};const uc=function t(e){function n(t){return new lc(t,e)}n.tension=function(e){return t(+e)};return n}(0);function cc(t,e){this._context=t;this._k=(1-e)/6}cc.prototype={areaStart:Zu,areaEnd:Zu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(t,e){t=+t,e=+e;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:oc(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=e}};const fc=function t(e){function n(t){return new cc(t,e)}n.tension=function(e){return t(+e)};return n}(0);const hc=Math.abs;const dc=Math.atan2;const pc=Math.cos;const mc=Math.max;const gc=Math.min;const yc=Math.sin;const vc=Math.sqrt;const _c=1e-12;const xc=Math.PI;const bc=xc/2;const wc=2*xc;function kc(t){return t>1?0:t<-1?xc:Math.acos(t)}function Mc(t){return t>=1?bc:t<=-1?-bc:Math.asin(t)}function Sc(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>_c){var a=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);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l;r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>_c){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/c;s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/c}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function Ec(t,e){this._context=t;this._alpha=e}Ec.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,e){t=+t,e=+e;if(this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Sc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Tc=function t(e){function n(t){return e?new Ec(t,e):new sc(t,0)}n.alpha=function(e){return t(+e)};return n}(.5);function Dc(t,e){this._context=t;this._alpha=e}Dc.prototype={areaStart:Zu,areaEnd:Zu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN;this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3);this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3);this._context.closePath();break}case 3:{this.point(this._x3,this._y3);this.point(this._x4,this._y4);this.point(this._x5,this._y5);break}}},point:function(t,e){t=+t,e=+e;if(this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Sc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ac=function t(e){function n(t){return e?new Dc(t,e):new cc(t,0)}n.alpha=function(e){return t(+e)};return n}(.5);function Nc(t,e){this._context=t;this._alpha=e}Nc.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(){if(this._line||this._line!==0&&this._point===3)this._context.closePath();this._line=1-this._line},point:function(t,e){t=+t,e=+e;if(this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,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:Sc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a;this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a;this._x0=this._x1,this._x1=this._x2,this._x2=t;this._y0=this._y1,this._y1=this._y2,this._y2=e}};const zc=function t(e){function n(t){return e?new Nc(t,e):new lc(t,0)}n.alpha=function(e){return t(+e)};return n}(.5);function Rc(t){this._context=t}Rc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,e){t=+t,e=+e;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;default:this._context.lineTo(t,e);break}}};function Cc(t){return new Rc(t)}function Oc(t){this._context=t}Oc.prototype={areaStart:Zu,areaEnd:Zu,lineStart:function(){this._point=0},lineEnd:function(){if(this._point)this._context.closePath()},point:function(t,e){t=+t,e=+e;if(this._point)this._context.lineTo(t,e);else this._point=1,this._context.moveTo(t,e)}};function Uc(t){return new Oc(t)}function $c(t){return t<0?-1:1}function Pc(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return($c(o)+$c(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function qc(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ic(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function Lc(t){this._context=t}Lc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN;this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ic(this,this._t0,qc(this,this._t0));break}if(this._line||this._line!==0&&this._point===1)this._context.closePath();this._line=1-this._line},point:function(t,e){var n=NaN;t=+t,e=+e;if(t===this._x1&&e===this._y1)return;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;Ic(this,qc(this,n=Pc(this,t,e)),n);break;default:Ic(this,this._t0,n=Pc(this,t,e));break}this._x0=this._x1,this._x1=t;this._y0=this._y1,this._y1=e;this._t0=n}};function Fc(t){this._context=new jc(t)}(Fc.prototype=Object.create(Lc.prototype)).point=function(t,e){Lc.prototype.point.call(this,e,t)};function jc(t){this._context=t}jc.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function Wc(t){return new Lc(t)}function Xc(t){return new Fc(t)}function Hc(t){this._context=t}Hc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[];this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n){this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]);if(n===2){this._context.lineTo(t[1],e[1])}else{var i=Bc(t),r=Bc(e);for(var o=0,s=1;s<n;++o,++s){this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s])}}}if(this._line||this._line!==0&&n===1)this._context.closePath();this._line=1-this._line;this._x=this._y=null},point:function(t,e){this._x.push(+t);this._y.push(+e)}};function Bc(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);r[0]=0,o[0]=2,s[0]=t[0]+2*t[1];for(e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n];for(e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];r[n-1]=s[n-1]/o[n-1];for(e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];o[n-1]=(t[n]+r[n-1])/2;for(e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function Yc(t){return new Hc(t)}function Jc(t,e){this._context=t;this._t=e}Jc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN;this._point=0},lineEnd:function(){if(0<this._t&&this._t<1&&this._point===2)this._context.lineTo(this._x,this._y);if(this._line||this._line!==0&&this._point===1)this._context.closePath();if(this._line>=0)this._t=1-this._t,this._line=1-this._line},point:function(t,e){t=+t,e=+e;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;default:{if(this._t<=0){this._context.lineTo(this._x,e);this._context.lineTo(t,e)}else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y);this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function Gc(t){return new Jc(t,.5)}function Vc(t){return new Jc(t,0)}function Kc(t){return new Jc(t,1)}const Zc=Math.PI,Qc=2*Zc,tf=1e-6,ef=Qc-tf;function nf(){this._x0=this._y0=this._x1=this._y1=null;this._=""}function rf(){return new nf}nf.prototype=rf.prototype={constructor:nf,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){if(this._x1!==null){this._x1=this._x0,this._y1=this._y0;this._+="Z"}},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,e,n,i,r){t=+t,e=+e,n=+n,i=+i,r=+r;var o=this._x1,s=this._y1,a=n-t,l=i-e,u=o-t,c=s-e,f=u*u+c*c;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null){this._+="M"+(this._x1=t)+","+(this._y1=e)}else if(!(f>tf));else if(!(Math.abs(c*a-l*u)>tf)||!r){this._+="L"+(this._x1=t)+","+(this._y1=e)}else{var h=n-o,d=i-s,p=a*a+l*l,m=h*h+d*d,g=Math.sqrt(p),y=Math.sqrt(f),v=r*Math.tan((Zc-Math.acos((p+f-m)/(2*g*y)))/2),_=v/y,x=v/g;if(Math.abs(_-1)>tf){this._+="L"+(t+_*u)+","+(e+_*c)}this._+="A"+r+","+r+",0,0,"+ +(c*h>u*d)+","+(this._x1=t+x*a)+","+(this._y1=e+x*l)}},arc:function(t,e,n,i,r,o){t=+t,e=+e,n=+n,o=!!o;var s=n*Math.cos(i),a=n*Math.sin(i),l=t+s,u=e+a,c=1^o,f=o?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);if(this._x1===null){this._+="M"+l+","+u}else if(Math.abs(this._x1-l)>tf||Math.abs(this._y1-u)>tf){this._+="L"+l+","+u}if(!n)return;if(f<0)f=f%Qc+Qc;if(f>ef){this._+="A"+n+","+n+",0,1,"+c+","+(t-s)+","+(e-a)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u)}else if(f>tf){this._+="A"+n+","+n+",0,"+ +(f>=Zc)+","+c+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))}},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};const of=rf;function sf(t){return function e(){return t}}function af(t){return t.innerRadius}function lf(t){return t.outerRadius}function uf(t){return t.startAngle}function cf(t){return t.endAngle}function ff(t){return t&&t.padAngle}function hf(t,e,n,i,r,o,s,a){var l=n-t,u=i-e,c=s-r,f=a-o,h=f*l-c*u;if(h*h<_c)return;h=(c*(e-o)-f*(t-r))/h;return[t+h*l,e+h*u]}function df(t,e,n,i,r,o,s){var a=t-n,l=e-i,u=(s?o:-o)/vc(a*a+l*l),c=u*l,f=-u*a,h=t+c,d=e+f,p=n+c,m=i+f,g=(h+p)/2,y=(d+m)/2,v=p-h,_=m-d,x=v*v+_*_,b=r-o,w=h*m-p*d,k=(_<0?-1:1)*vc(mc(0,b*b*x-w*w)),M=(w*_-v*k)/x,S=(-w*v-_*k)/x,E=(w*_+v*k)/x,T=(-w*v+_*k)/x,D=M-g,A=S-y,N=E-g,z=T-y;if(D*D+A*A>N*N+z*z)M=E,S=T;return{cx:M,cy:S,x01:-c,y01:-f,x11:M*(r/b-1),y11:S*(r/b-1)}}function pf(){var t=af,e=lf,n=sf(0),i=null,r=uf,o=cf,s=ff,a=null;function l(){var l,u,c=+t.apply(this,arguments),f=+e.apply(this,arguments),h=r.apply(this,arguments)-bc,d=o.apply(this,arguments)-bc,p=hc(d-h),m=d>h;if(!a)a=l=of();if(f<c)u=f,f=c,c=u;if(!(f>_c))a.moveTo(0,0);else if(p>wc-_c){a.moveTo(f*pc(h),f*yc(h));a.arc(0,0,f,h,d,!m);if(c>_c){a.moveTo(c*pc(d),c*yc(d));a.arc(0,0,c,d,h,m)}}else{var g=h,y=d,v=h,_=d,x=p,b=p,w=s.apply(this,arguments)/2,k=w>_c&&(i?+i.apply(this,arguments):vc(c*c+f*f)),M=gc(hc(f-c)/2,+n.apply(this,arguments)),S=M,E=M,T,D;if(k>_c){var A=Mc(k/c*yc(w)),N=Mc(k/f*yc(w));if((x-=A*2)>_c)A*=m?1:-1,v+=A,_-=A;else x=0,v=_=(h+d)/2;if((b-=N*2)>_c)N*=m?1:-1,g+=N,y-=N;else b=0,g=y=(h+d)/2}var z=f*pc(g),R=f*yc(g),C=c*pc(_),O=c*yc(_);if(M>_c){var U=f*pc(y),$=f*yc(y),P=c*pc(v),q=c*yc(v),I;if(p<xc&&(I=hf(z,R,P,q,U,$,C,O))){var L=z-I[0],F=R-I[1],j=U-I[0],W=$-I[1],X=1/yc(kc((L*j+F*W)/(vc(L*L+F*F)*vc(j*j+W*W)))/2),H=vc(I[0]*I[0]+I[1]*I[1]);S=gc(M,(c-H)/(X-1));E=gc(M,(f-H)/(X+1))}}if(!(b>_c))a.moveTo(z,R);else if(E>_c){T=df(P,q,z,R,f,E,m);D=df(U,$,C,O,f,E,m);a.moveTo(T.cx+T.x01,T.cy+T.y01);if(E<M)a.arc(T.cx,T.cy,E,dc(T.y01,T.x01),dc(D.y01,D.x01),!m);else{a.arc(T.cx,T.cy,E,dc(T.y01,T.x01),dc(T.y11,T.x11),!m);a.arc(0,0,f,dc(T.cy+T.y11,T.cx+T.x11),dc(D.cy+D.y11,D.cx+D.x11),!m);a.arc(D.cx,D.cy,E,dc(D.y11,D.x11),dc(D.y01,D.x01),!m)}}else a.moveTo(z,R),a.arc(0,0,f,g,y,!m);if(!(c>_c)||!(x>_c))a.lineTo(C,O);else if(S>_c){T=df(C,O,U,$,c,-S,m);D=df(z,R,P,q,c,-S,m);a.lineTo(T.cx+T.x01,T.cy+T.y01);if(S<M)a.arc(T.cx,T.cy,S,dc(T.y01,T.x01),dc(D.y01,D.x01),!m);else{a.arc(T.cx,T.cy,S,dc(T.y01,T.x01),dc(T.y11,T.x11),!m);a.arc(0,0,c,dc(T.cy+T.y11,T.cx+T.x11),dc(D.cy+D.y11,D.cx+D.x11),m);a.arc(D.cx,D.cy,S,dc(D.y11,D.x11),dc(D.y01,D.x01),!m)}}else a.arc(0,0,c,_,v,m)}a.closePath();if(l)return a=null,l+""||null}l.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-xc/2;return[pc(i)*n,yc(i)*n]};l.innerRadius=function(e){return arguments.length?(t=typeof e==="function"?e:sf(+e),l):t};l.outerRadius=function(t){return arguments.length?(e=typeof t==="function"?t:sf(+t),l):e};l.cornerRadius=function(t){return arguments.length?(n=typeof t==="function"?t:sf(+t),l):n};l.padRadius=function(t){return arguments.length?(i=t==null?null:typeof t==="function"?t:sf(+t),l):i};l.startAngle=function(t){return arguments.length?(r=typeof t==="function"?t:sf(+t),l):r};l.endAngle=function(t){return arguments.length?(o=typeof t==="function"?t:sf(+t),l):o};l.padAngle=function(t){return arguments.length?(s=typeof t==="function"?t:sf(+t),l):s};l.context=function(t){return arguments.length?(a=t==null?null:t,l):a};return l}var mf=Array.prototype.slice;function gf(t){return typeof t==="object"&&"length"in t?t:Array.from(t)}function yf(t){return t[0]}function vf(t){return t[1]}function _f(t,e){var n=sf(true),i=null,r=Cc,o=null;t=typeof t==="function"?t:t===undefined?yf:sf(t);e=typeof e==="function"?e:e===undefined?vf:sf(e);function s(s){var a,l=(s=gf(s)).length,u,c=false,f;if(i==null)o=r(f=of());for(a=0;a<=l;++a){if(!(a<l&&n(u=s[a],a,s))===c){if(c=!c)o.lineStart();else o.lineEnd()}if(c)o.point(+t(u,a,s),+e(u,a,s))}if(f)return o=null,f+""||null}s.x=function(e){return arguments.length?(t=typeof e==="function"?e:sf(+e),s):t};s.y=function(t){return arguments.length?(e=typeof t==="function"?t:sf(+t),s):e};s.defined=function(t){return arguments.length?(n=typeof t==="function"?t:sf(!!t),s):n};s.curve=function(t){return arguments.length?(r=t,i!=null&&(o=r(i)),s):r};s.context=function(t){return arguments.length?(t==null?i=o=null:o=r(i=t),s):i};return s}function xf(t,e,n){var i=null,r=sf(true),o=null,s=Cc,a=null;t=typeof t==="function"?t:t===undefined?yf:sf(+t);e=typeof e==="function"?e:e===undefined?sf(0):sf(+e);n=typeof n==="function"?n:n===undefined?vf:sf(+n);function l(l){var u,c,f,h=(l=gf(l)).length,d,p=false,m,g=new Array(h),y=new Array(h);if(o==null)a=s(m=of());for(u=0;u<=h;++u){if(!(u<h&&r(d=l[u],u,l))===p){if(p=!p){c=u;a.areaStart();a.lineStart()}else{a.lineEnd();a.lineStart();for(f=u-1;f>=c;--f){a.point(g[f],y[f])}a.lineEnd();a.areaEnd()}}if(p){g[u]=+t(d,u,l),y[u]=+e(d,u,l);a.point(i?+i(d,u,l):g[u],n?+n(d,u,l):y[u])}}if(m)return a=null,m+""||null}function u(){return _f().defined(r).curve(s).context(o)}l.x=function(e){return arguments.length?(t=typeof e==="function"?e:sf(+e),i=null,l):t};l.x0=function(e){return arguments.length?(t=typeof e==="function"?e:sf(+e),l):t};l.x1=function(t){return arguments.length?(i=t==null?null:typeof t==="function"?t:sf(+t),l):i};l.y=function(t){return arguments.length?(e=typeof t==="function"?t:sf(+t),n=null,l):e};l.y0=function(t){return arguments.length?(e=typeof t==="function"?t:sf(+t),l):e};l.y1=function(t){return arguments.length?(n=t==null?null:typeof t==="function"?t:sf(+t),l):n};l.lineX0=l.lineY0=function(){return u().x(t).y(e)};l.lineY1=function(){return u().x(t).y(n)};l.lineX1=function(){return u().x(i).y(e)};l.defined=function(t){return arguments.length?(r=typeof t==="function"?t:sf(!!t),l):r};l.curve=function(t){return arguments.length?(s=t,o!=null&&(a=s(o)),l):s};l.context=function(t){return arguments.length?(t==null?o=a=null:a=s(o=t),l):o};return l}const bf=vc(3);const wf={draw(t,e){const n=vc(e+gc(e/28,.75))*.59436;const i=n/2;const r=i*bf;t.moveTo(0,n);t.lineTo(0,-n);t.moveTo(-r,-i);t.lineTo(r,i);t.moveTo(-r,i);t.lineTo(r,-i)}};const kf={draw(t,e){const n=vc(e/xc);t.moveTo(n,0);t.arc(0,0,n,0,wc)}};const Mf={draw(t,e){const n=vc(e/5)/2;t.moveTo(-3*n,-n);t.lineTo(-n,-n);t.lineTo(-n,-3*n);t.lineTo(n,-3*n);t.lineTo(n,-n);t.lineTo(3*n,-n);t.lineTo(3*n,n);t.lineTo(n,n);t.lineTo(n,3*n);t.lineTo(-n,3*n);t.lineTo(-n,n);t.lineTo(-3*n,n);t.closePath()}};const Sf=vc(1/3);const Ef=Sf*2;const Tf={draw(t,e){const n=vc(e/Ef);const i=n*Sf;t.moveTo(0,-n);t.lineTo(i,0);t.lineTo(0,n);t.lineTo(-i,0);t.closePath()}};const Df={draw(t,e){const n=vc(e)*.62625;t.moveTo(0,-n);t.lineTo(n,0);t.lineTo(0,n);t.lineTo(-n,0);t.closePath()}};const Af={draw(t,e){const n=vc(e-gc(e/7,2))*.87559;t.moveTo(-n,0);t.lineTo(n,0);t.moveTo(0,n);t.lineTo(0,-n)}};const Nf={draw(t,e){const n=vc(e);const i=-n/2;t.rect(i,i,n,n)}};const zf={draw(t,e){const n=vc(e)*.4431;t.moveTo(n,n);t.lineTo(n,-n);t.lineTo(-n,-n);t.lineTo(-n,n);t.closePath()}};const Rf=.8908130915292852;const Cf=yc(xc/10)/yc(7*xc/10);const Of=yc(wc/10)*Cf;const Uf=-pc(wc/10)*Cf;const $f={draw(t,e){const n=vc(e*Rf);const i=Of*n;const r=Uf*n;t.moveTo(0,-n);t.lineTo(i,r);for(let o=1;o<5;++o){const e=wc*o/5;const s=pc(e);const a=yc(e);t.lineTo(a*n,-s*n);t.lineTo(s*i-a*r,a*i+s*r)}t.closePath()}};const Pf=vc(3);const qf={draw(t,e){const n=-vc(e/(Pf*3));t.moveTo(0,n*2);t.lineTo(-Pf*n,-n);t.lineTo(Pf*n,-n);t.closePath()}};const If=vc(3);const Lf={draw(t,e){const n=vc(e)*.6824;const i=n/2;const r=n*If/2;t.moveTo(0,-n);t.lineTo(r,i);t.lineTo(-r,i);t.closePath()}};const Ff=-.5;const jf=vc(3)/2;const Wf=1/vc(12);const Xf=(Wf/2+1)*3;const Hf={draw(t,e){const n=vc(e/Xf);const i=n/2,r=n*Wf;const o=i,s=n*Wf+n;const a=-o,l=s;t.moveTo(i,r);t.lineTo(o,s);t.lineTo(a,l);t.lineTo(Ff*i-jf*r,jf*i+Ff*r);t.lineTo(Ff*o-jf*s,jf*o+Ff*s);t.lineTo(Ff*a-jf*l,jf*a+Ff*l);t.lineTo(Ff*i+jf*r,Ff*r-jf*i);t.lineTo(Ff*o+jf*s,Ff*s-jf*o);t.lineTo(Ff*a+jf*l,Ff*l-jf*a);t.closePath()}};const Bf={draw(t,e){const n=vc(e-gc(e/6,1.7))*.6189;t.moveTo(-n,-n);t.lineTo(n,n);t.moveTo(-n,n);t.lineTo(n,-n)}};const Yf=[kf,Mf,Tf,Nf,$f,qf,Hf];const Jf=[kf,Af,Bf,Lf,wf,zf,Df];function Gf(t,e){let n=null;t=typeof t==="function"?t:sf(t||kf);e=typeof e==="function"?e:sf(e===undefined?64:+e);function i(){let i;if(!n)n=i=of();t.apply(this,arguments).draw(n,+e.apply(this,arguments));if(i)return n=null,i+""||null}i.type=function(e){return arguments.length?(t=typeof e==="function"?e:sf(e),i):t};i.size=function(t){return arguments.length?(e=typeof t==="function"?t:sf(+t),i):e};i.context=function(t){return arguments.length?(n=t==null?null:t,i):n};return i}function Vf(t,e){if(typeof document!=="undefined"&&document.createElement){const n=document.createElement("canvas");if(n&&n.getContext){n.width=t;n.height=e;return n}}return null}const Kf=()=>typeof Image!=="undefined"?Image:null;const Zf=Te(Ee);const Qf=Zf.right;const th=Zf.left;const eh=Te(Xs).center;const nh=Qf;function ih(t,e,n){t.prototype=e.prototype=n;n.constructor=t}function rh(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function oh(){}var sh=.7;var ah=1/sh;var lh="\\s*([+-]?\\d+)\\s*",uh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ch="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fh=/^#([0-9a-f]{3,8})$/,hh=new RegExp(`^rgb\\(${lh},${lh},${lh}\\)$`),dh=new RegExp(`^rgb\\(${ch},${ch},${ch}\\)$`),ph=new RegExp(`^rgba\\(${lh},${lh},${lh},${uh}\\)$`),mh=new RegExp(`^rgba\\(${ch},${ch},${ch},${uh}\\)$`),gh=new RegExp(`^hsl\\(${uh},${ch},${ch}\\)$`),yh=new RegExp(`^hsla\\(${uh},${ch},${ch},${uh}\\)$`);var vh={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};ih(oh,kh,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:_h,formatHex:_h,formatHex8:xh,formatHsl:bh,formatRgb:wh,toString:wh});function _h(){return this.rgb().formatHex()}function xh(){return this.rgb().formatHex8()}function bh(){return $h(this).formatHsl()}function wh(){return this.rgb().formatRgb()}function kh(t){var e,n;t=(t+"").trim().toLowerCase();return(e=fh.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Mh(e):n===3?new Dh(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Sh(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Sh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=hh.exec(t))?new Dh(e[1],e[2],e[3],1):(e=dh.exec(t))?new Dh(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=ph.exec(t))?Sh(e[1],e[2],e[3],e[4]):(e=mh.exec(t))?Sh(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=gh.exec(t))?Uh(e[1],e[2]/100,e[3]/100,1):(e=yh.exec(t))?Uh(e[1],e[2]/100,e[3]/100,e[4]):vh.hasOwnProperty(t)?Mh(vh[t]):t==="transparent"?new Dh(NaN,NaN,NaN,0):null}function Mh(t){return new Dh(t>>16&255,t>>8&255,t&255,1)}function Sh(t,e,n,i){if(i<=0)t=e=n=NaN;return new Dh(t,e,n,i)}function Eh(t){if(!(t instanceof oh))t=kh(t);if(!t)return new Dh;t=t.rgb();return new Dh(t.r,t.g,t.b,t.opacity)}function Th(t,e,n,i){return arguments.length===1?Eh(t):new Dh(t,e,n,i==null?1:i)}function Dh(t,e,n,i){this.r=+t;this.g=+e;this.b=+n;this.opacity=+i}ih(Dh,Th,rh(oh,{brighter(t){t=t==null?ah:Math.pow(ah,t);return new Dh(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){t=t==null?sh:Math.pow(sh,t);return new Dh(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Dh(Ch(this.r),Ch(this.g),Ch(this.b),Rh(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&(-.5<=this.g&&this.g<255.5)&&(-.5<=this.b&&this.b<255.5)&&(0<=this.opacity&&this.opacity<=1)},hex:Ah,formatHex:Ah,formatHex8:Nh,formatRgb:zh,toString:zh}));function Ah(){return`#${Oh(this.r)}${Oh(this.g)}${Oh(this.b)}`}function Nh(){return`#${Oh(this.r)}${Oh(this.g)}${Oh(this.b)}${Oh((isNaN(this.opacity)?1:this.opacity)*255)}`}function zh(){const t=Rh(this.opacity);return`${t===1?"rgb(":"rgba("}${Ch(this.r)}, ${Ch(this.g)}, ${Ch(this.b)}${t===1?")":`, ${t})`}`}function Rh(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ch(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Oh(t){t=Ch(t);return(t<16?"0":"")+t.toString(16)}function Uh(t,e,n,i){if(i<=0)t=e=n=NaN;else if(n<=0||n>=1)t=e=NaN;else if(e<=0)t=NaN;return new qh(t,e,n,i)}function $h(t){if(t instanceof qh)return new qh(t.h,t.s,t.l,t.opacity);if(!(t instanceof oh))t=kh(t);if(!t)return new qh;if(t instanceof qh)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;if(a){if(e===o)s=(n-i)/a+(n<i)*6;else if(n===o)s=(i-e)/a+2;else s=(e-n)/a+4;a/=l<.5?o+r:2-o-r;s*=60}else{a=l>0&&l<1?0:s}return new qh(s,a,l,t.opacity)}function Ph(t,e,n,i){return arguments.length===1?$h(t):new qh(t,e,n,i==null?1:i)}function qh(t,e,n,i){this.h=+t;this.s=+e;this.l=+n;this.opacity=+i}ih(qh,Ph,rh(oh,{brighter(t){t=t==null?ah:Math.pow(ah,t);return new qh(this.h,this.s,this.l*t,this.opacity)},darker(t){t=t==null?sh:Math.pow(sh,t);return new qh(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new Dh(Fh(t>=240?t-240:t+120,r,i),Fh(t,r,i),Fh(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new qh(Ih(this.h),Lh(this.s),Lh(this.l),Rh(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&(0<=this.l&&this.l<=1)&&(0<=this.opacity&&this.opacity<=1)},formatHsl(){const t=Rh(this.opacity);return`${t===1?"hsl(":"hsla("}${Ih(this.h)}, ${Lh(this.s)*100}%, ${Lh(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ih(t){t=(t||0)%360;return t<0?t+360:t}function Lh(t){return Math.max(0,Math.min(1,t||0))}function Fh(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function jh(t,e,n,i,r){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*i+s*r)/6}function Wh(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),r=t[i],o=t[i+1],s=i>0?t[i-1]:2*r-o,a=i<e-1?t[i+2]:2*o-r;return jh((n-i/e)*e,s,r,o,a)}}function Xh(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),r=t[(i+e-1)%e],o=t[i%e],s=t[(i+1)%e],a=t[(i+2)%e];return jh((n-i/e)*e,r,o,s,a)}}const Hh=t=>()=>t;function Bh(t,e){return function(n){return t+n*e}}function Yh(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Jh(t,e){var n=e-t;return n?Bh(t,n>180||n<-180?n-360*Math.round(n/360):n):Hh(isNaN(t)?e:t)}function Gh(t){return(t=+t)===1?Vh:function(e,n){return n-e?Yh(e,n,t):Hh(isNaN(e)?n:e)}}function Vh(t,e){var n=e-t;return n?Bh(t,n):Hh(isNaN(t)?e:t)}const Kh=function t(e){var n=Gh(e);function i(t,e){var i=n((t=Th(t)).r,(e=Th(e)).r),r=n(t.g,e.g),o=n(t.b,e.b),s=Vh(t.opacity,e.opacity);return function(e){t.r=i(e);t.g=r(e);t.b=o(e);t.opacity=s(e);return t+""}}i.gamma=t;return i}(1);function Zh(t){return function(e){var n=e.length,i=new Array(n),r=new Array(n),o=new Array(n),s,a;for(s=0;s<n;++s){a=Th(e[s]);i[s]=a.r||0;r[s]=a.g||0;o[s]=a.b||0}i=t(i);r=t(r);o=t(o);a.opacity=1;return function(t){a.r=i(t);a.g=r(t);a.b=o(t);return a+""}}}var Qh=Zh(Wh);var td=Zh(Xh);function ed(t,e){if(!e)e=[];var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function nd(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function id(t,e){return(nd(e)?ed:rd)(t,e)}function rd(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=dd(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(t){for(s=0;s<i;++s)o[s]=r[s](t);return o}}function od(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function sd(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ad(t,e){var n={},i={},r;if(t===null||typeof t!=="object")t={};if(e===null||typeof e!=="object")e={};for(r in e){if(r in t){n[r]=dd(t[r],e[r])}else{i[r]=e[r]}}return function(t){for(r in n)i[r]=n[r](t);return i}}var ld=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ud=new RegExp(ld.source,"g");function cd(t){return function(){return t}}function fd(t){return function(e){return t(e)+""}}function hd(t,e){var n=ld.lastIndex=ud.lastIndex=0,i,r,o,s=-1,a=[],l=[];t=t+"",e=e+"";while((i=ld.exec(t))&&(r=ud.exec(e))){if((o=r.index)>n){o=e.slice(n,o);if(a[s])a[s]+=o;else a[++s]=o}if((i=i[0])===(r=r[0])){if(a[s])a[s]+=r;else a[++s]=r}else{a[++s]=null;l.push({i:s,x:sd(i,r)})}n=ud.lastIndex}if(n<e.length){o=e.slice(n);if(a[s])a[s]+=o;else a[++s]=o}return a.length<2?l[0]?fd(l[0].x):cd(e):(e=l.length,function(t){for(var n=0,i;n<e;++n)a[(i=l[n]).i]=i.x(t);return a.join("")})}function dd(t,e){var n=typeof e,i;return e==null||n==="boolean"?Hh(e):(n==="number"?sd:n==="string"?(i=kh(e))?(e=i,Kh):hd:e instanceof kh?Kh:e instanceof Date?od:nd(e)?ed:Array.isArray(e)?rd:typeof e.valueOf!=="function"&&typeof e.toString!=="function"||isNaN(e)?ad:sd)(t,e)}function pd(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function md(t){return function(){return t}}function gd(t){return+t}var yd=[0,1];function vd(t){return t}function _d(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:md(isNaN(e)?NaN:.5)}function xd(t,e){var n;if(t>e)n=t,t=e,e=n;return function(n){return Math.max(t,Math.min(e,n))}}function bd(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];if(r<i)i=_d(r,i),o=n(s,o);else i=_d(i,r),o=n(o,s);return function(t){return o(i(t))}}function wd(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;if(t[i]<t[0]){t=t.slice().reverse();e=e.slice().reverse()}while(++s<i){r[s]=_d(t[s],t[s+1]);o[s]=n(e[s],e[s+1])}return function(e){var n=nh(t,e,1,i)-1;return o[n](r[n](e))}}function kd(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Md(){var t=yd,e=yd,n=dd,i,r,o,s=vd,a,l,u;function c(){var n=Math.min(t.length,e.length);if(s!==vd)s=xd(t[0],t[n-1]);a=n>2?wd:bd;l=u=null;return f}function f(r){return r==null||isNaN(r=+r)?o:(l||(l=a(t.map(i),e,n)))(i(s(r)))}f.invert=function(n){return s(r((u||(u=a(e,t.map(i),sd)))(n)))};f.domain=function(e){return arguments.length?(t=Array.from(e,gd),c()):t.slice()};f.range=function(t){return arguments.length?(e=Array.from(t),c()):e.slice()};f.rangeRound=function(t){return e=Array.from(t),n=pd,c()};f.clamp=function(t){return arguments.length?(s=t?true:vd,c()):s!==vd};f.interpolate=function(t){return arguments.length?(n=t,c()):n};f.unknown=function(t){return arguments.length?(o=t,f):o};return function(t,e){i=t,r=e;return c()}}function Sd(){return Md()(vd,vd)}function Ed(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function Td(t,e){switch(arguments.length){case 0:break;case 1:{if(typeof t==="function")this.interpolator(t);else this.range(t);break}default:{this.domain(t);if(typeof e==="function")this.interpolator(e);else this.range(e);break}}return this}function Dd(t,e,n,i){var r=W(t,e,n),o;i=H(i==null?",f":i);switch(i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));if(i.precision==null&&!isNaN(o=V(r,s)))i.precision=o;return ht(i,s)}case"":case"e":case"g":case"p":case"r":{if(i.precision==null&&!isNaN(o=K(r,Math.max(Math.abs(t),Math.abs(e)))))i.precision=o-(i.type==="e");break}case"f":case"%":{if(i.precision==null&&!isNaN(o=Z(r)))i.precision=o-(i.type==="%")*2;break}}return ft(i)}function Ad(t){var e=t.domain;t.ticks=function(t){var n=e();return F(n[0],n[n.length-1],t==null?10:t)};t.tickFormat=function(t,n){var i=e();return Dd(i[0],i[i.length-1],t==null?10:t,n)};t.nice=function(n){if(n==null)n=10;var i=e();var r=0;var o=i.length-1;var s=i[r];var a=i[o];var l;var u;var c=10;if(a<s){u=s,s=a,a=u;u=r,r=o,o=u}while(c-- >0){u=j(s,a,n);if(u===l){i[r]=s;i[o]=a;return e(i)}else if(u>0){s=Math.floor(s/u)*u;a=Math.ceil(a/u)*u}else if(u<0){s=Math.ceil(s*u)/u;a=Math.floor(a*u)/u}else{break}l=u}return t};return t}function Nd(){var t=Sd();t.copy=function(){return kd(t,Nd())};Ed.apply(t,arguments);return Ad(t)}function zd(t){var e;function n(t){return t==null||isNaN(t=+t)?e:t}n.invert=n;n.domain=n.range=function(e){return arguments.length?(t=Array.from(e,gd),n):t.slice()};n.unknown=function(t){return arguments.length?(e=t,n):e};n.copy=function(){return zd(t).unknown(e)};t=arguments.length?Array.from(t,gd):[0,1];return Ad(n)}function Rd(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;if(o<r){s=n,n=i,i=s;s=r,r=o,o=s}t[n]=e.floor(r);t[i]=e.ceil(o);return t}function Cd(t){return Math.log(t)}function Od(t){return Math.exp(t)}function Ud(t){return-Math.log(-t)}function $d(t){return-Math.exp(-t)}function Pd(t){return isFinite(t)?+("1e"+t):t<0?0:t}function qd(t){return t===10?Pd:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Id(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Ld(t){return(e,n)=>-t(-e,n)}function Fd(t){const e=t(Cd,Od);const n=e.domain;let i=10;let r;let o;function s(){r=Id(i),o=qd(i);if(n()[0]<0){r=Ld(r),o=Ld(o);t(Ud,$d)}else{t(Cd,Od)}return e}e.base=function(t){return arguments.length?(i=+t,s()):i};e.domain=function(t){return arguments.length?(n(t),s()):n()};e.ticks=t=>{const e=n();let s=e[0];let a=e[e.length-1];const l=a<s;if(l)[s,a]=[a,s];let u=r(s);let c=r(a);let f;let h;const d=t==null?10:+t;let p=[];if(!(i%1)&&c-u<d){u=Math.floor(u),c=Math.ceil(c);if(s>0)for(;u<=c;++u){for(f=1;f<i;++f){h=u<0?f/o(-u):f*o(u);if(h<s)continue;if(h>a)break;p.push(h)}}else for(;u<=c;++u){for(f=i-1;f>=1;--f){h=u>0?f/o(-u):f*o(u);if(h<s)continue;if(h>a)break;p.push(h)}}if(p.length*2<d)p=F(s,a,d)}else{p=F(u,c,Math.min(c-u,d)).map(o)}return l?p.reverse():p};e.tickFormat=(t,n)=>{if(t==null)t=10;if(n==null)n=i===10?"s":",";if(typeof n!=="function"){if(!(i%1)&&(n=H(n)).precision==null)n.trim=true;n=ft(n)}if(t===Infinity)return n;const s=Math.max(1,i*t/e.ticks().length);return t=>{let e=t/o(Math.round(r(t)));if(e*i<i-.5)e*=i;return e<=s?n(t):""}};e.nice=()=>n(Rd(n(),{floor:t=>o(Math.floor(r(t))),ceil:t=>o(Math.ceil(r(t)))}));return e}function jd(){const t=Fd(Md()).domain([1,10]);t.copy=()=>kd(t,jd()).base(t.base());Ed.apply(t,arguments);return t}function Wd(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Xd(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Hd(t){return t<0?-t*t:t*t}function Bd(t){var e=t(vd,vd),n=1;function i(){return n===1?t(vd,vd):n===.5?t(Xd,Hd):t(Wd(n),Wd(1/n))}e.exponent=function(t){return arguments.length?(n=+t,i()):n};return Ad(e)}function Yd(){var t=Bd(Md());t.copy=function(){return kd(t,Yd()).exponent(t.exponent())};Ed.apply(t,arguments);return t}function Jd(){return Yd.apply(null,arguments).exponent(.5)}function Gd(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Vd(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Kd(t){var e=1,n=t(Gd(e),Vd(e));n.constant=function(n){return arguments.length?t(Gd(e=+n),Vd(e)):e};return Ad(n)}function Zd(){var t=Kd(Md());t.copy=function(){return kd(t,Zd()).constant(t.constant())};return Ed.apply(t,arguments)}function Qd(t,e,n,i,r,o){const s=[[we,1,yt],[we,5,5*yt],[we,15,15*yt],[we,30,30*yt],[o,1,vt],[o,5,5*vt],[o,15,15*vt],[o,30,30*vt],[r,1,_t],[r,3,3*_t],[r,6,6*_t],[r,12,12*_t],[i,1,xt],[i,2,2*xt],[n,1,bt],[e,1,wt],[e,3,3*wt],[t,1,kt]];function a(t,e,n){const i=e<t;if(i)[t,e]=[e,t];const r=n&&typeof n.range==="function"?n:l(t,e,n);const o=r?r.range(t,+e+1):[];return i?o.reverse():o}function l(e,n,i){const r=Math.abs(n-e)/i;const o=Te((([,,t])=>t)).right(s,r);if(o===s.length)return t.every(W(e/kt,n/kt,i));if(o===0)return Me.every(Math.max(W(e,n,i),1));const[a,l]=s[r/s[o-1][2]<s[o][2]/r?o-1:o];return a.every(l)}return[a,l]}const[tp,ep]=Qd(le,he,Bt,Dt,ge,xe);const[np,ip]=Qd(se,ce,zt,Mt,pe,ve);function rp(t){return new Date(t)}function op(t){return t instanceof Date?+t:+new Date(+t)}function sp(t,e,n,i,r,o,s,a,l,u){var c=Sd(),f=c.invert,h=c.domain;var d=u(".%L"),p=u(":%S"),m=u("%I:%M"),g=u("%I %p"),y=u("%a %d"),v=u("%b %d"),_=u("%B"),x=u("%Y");function b(t){return(l(t)<t?d:a(t)<t?p:s(t)<t?m:o(t)<t?g:i(t)<t?r(t)<t?y:v:n(t)<t?_:x)(t)}c.invert=function(t){return new Date(f(t))};c.domain=function(t){return arguments.length?h(Array.from(t,op)):h().map(rp)};c.ticks=function(e){var n=h();return t(n[0],n[n.length-1],e==null?10:e)};c.tickFormat=function(t,e){return e==null?b:u(e)};c.nice=function(t){var n=h();if(!t||typeof t.range!=="function")t=e(n[0],n[n.length-1],t==null?10:t);return t?h(Rd(n,t)):c};c.copy=function(){return kd(c,sp(t,e,n,i,r,o,s,a,l,u))};return c}function ap(){return Ed.apply(sp(np,ip,se,ce,zt,Mt,pe,ve,we,ur).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function lp(){return Ed.apply(sp(tp,ep,le,he,Bt,Et,ge,xe,we,fr).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function up(){var t=0,e=1,n,i,r,o,s=vd,a=false,l;function u(t){return t==null||isNaN(t=+t)?l:s(r===0?.5:(t=(o(t)-n)*r,a?Math.max(0,Math.min(1,t)):t))}u.domain=function(s){return arguments.length?([t,e]=s,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),u):[t,e]};u.clamp=function(t){return arguments.length?(a=!!t,u):a};u.interpolator=function(t){return arguments.length?(s=t,u):s};function c(t){return function(e){var n,i;return arguments.length?([n,i]=e,s=t(n,i),u):[s(0),s(1)]}}u.range=c(dd);u.rangeRound=c(pd);u.unknown=function(t){return arguments.length?(l=t,u):l};return function(s){o=s,n=s(t),i=s(e),r=n===i?0:1/(i-n);return u}}function cp(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function fp(){var t=Ad(up()(vd));t.copy=function(){return cp(t,fp())};return Td.apply(t,arguments)}function hp(){var t=Fd(up()).domain([1,10]);t.copy=function(){return cp(t,hp()).base(t.base())};return Td.apply(t,arguments)}function dp(){var t=Kd(up());t.copy=function(){return cp(t,dp()).constant(t.constant())};return Td.apply(t,arguments)}function pp(){var t=Bd(up());t.copy=function(){return cp(t,pp()).exponent(t.exponent())};return Td.apply(t,arguments)}function mp(){return pp.apply(null,arguments).exponent(.5)}function gp(t,e){if(e===undefined)e=t,t=dd;var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);while(n<i)o[n]=t(r,r=e[++n]);return function(t){var e=Math.max(0,Math.min(i-1,Math.floor(t*=i)));return o[e](t-e)}}function yp(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,u=vd,c,f=false,h;function d(t){return isNaN(t=+t)?h:(t=.5+((t=+c(t))-o)*(i*t<i*o?a:l),u(f?Math.max(0,Math.min(1,t)):t))}d.domain=function(u){return arguments.length?([t,e,n]=u,r=c(t=+t),o=c(e=+e),s=c(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d):[t,e,n]};d.clamp=function(t){return arguments.length?(f=!!t,d):f};d.interpolator=function(t){return arguments.length?(u=t,d):u};function p(t){return function(e){var n,i,r;return arguments.length?([n,i,r]=e,u=gp(t,[n,i,r]),d):[u(0),u(.5),u(1)]}}d.range=p(dd);d.rangeRound=p(pd);d.unknown=function(t){return arguments.length?(h=t,d):h};return function(u){c=u,r=u(t),o=u(e),s=u(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1;return d}}function vp(){var t=Ad(yp()(vd));t.copy=function(){return cp(t,vp())};return Td.apply(t,arguments)}function _p(){var t=Fd(yp()).domain([.1,1,10]);t.copy=function(){return cp(t,_p()).base(t.base())};return Td.apply(t,arguments)}function xp(){var t=Kd(yp());t.copy=function(){return cp(t,xp()).constant(t.constant())};return Td.apply(t,arguments)}function bp(){var t=Bd(yp());t.copy=function(){return cp(t,bp()).exponent(t.exponent())};return Td.apply(t,arguments)}function wp(){return bp.apply(null,arguments).exponent(.5)}function kp(){var t=[],e=[],n=[],i;function r(){var i=0,r=Math.max(1,e.length);n=new Array(r-1);while(++i<r)n[i-1]=Ys(t,i/r);return o}function o(t){return t==null||isNaN(t=+t)?i:e[nh(n,t)]}o.invertExtent=function(i){var r=e.indexOf(i);return r<0?[NaN,NaN]:[r>0?n[r-1]:t[0],r<n.length?n[r]:t[t.length-1]]};o.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)if(n!=null&&!isNaN(n=+n))t.push(n);t.sort(Ee);return r()};o.range=function(t){return arguments.length?(e=Array.from(t),r()):e.slice()};o.unknown=function(t){return arguments.length?(i=t,o):i};o.quantiles=function(){return n.slice()};o.copy=function(){return kp().domain(t).range(e).unknown(i)};return Ed.apply(o,arguments)}function Mp(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(t){return t!=null&&t<=t?r[nh(i,t,0,n)]:o}function a(){var r=-1;i=new Array(n);while(++r<n)i[r]=((r+1)*e-(r-n)*t)/(n+1);return s}s.domain=function(n){return arguments.length?([t,e]=n,t=+t,e=+e,a()):[t,e]};s.range=function(t){return arguments.length?(n=(r=Array.from(t)).length-1,a()):r.slice()};s.invertExtent=function(o){var s=r.indexOf(o);return s<0?[NaN,NaN]:s<1?[t,i[0]]:s>=n?[i[n-1],e]:[i[s-1],i[s]]};s.unknown=function(t){return arguments.length?(o=t,s):s};s.thresholds=function(){return i.slice()};s.copy=function(){return Mp().domain([t,e]).range(r).unknown(o)};return Ed.apply(Ad(s),arguments)}function Sp(){var t=[.5],e=[0,1],n,i=1;function r(r){return r!=null&&r<=r?e[nh(t,r,0,i)]:n}r.domain=function(n){return arguments.length?(t=Array.from(n),i=Math.min(t.length,e.length-1),r):t.slice()};r.range=function(n){return arguments.length?(e=Array.from(n),i=Math.min(t.length,e.length-1),r):e.slice()};r.invertExtent=function(n){var i=e.indexOf(n);return[t[i-1],t[i]]};r.unknown=function(t){return arguments.length?(n=t,r):n};r.copy=function(){return Sp().domain(t).range(e).unknown(n)};return Ed.apply(r,arguments)}class Ep extends Map{constructor(t,e=zp){super();Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}});if(t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Dp(this,t))}has(t){return super.has(Dp(this,t))}set(t,e){return super.set(Ap(this,t),e)}delete(t){return super.delete(Np(this,t))}}class Tp extends Set{constructor(t,e=zp){super();Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}});if(t!=null)for(const n of t)this.add(n)}has(t){return super.has(Dp(this,t))}add(t){return super.add(Ap(this,t))}delete(t){return super.delete(Np(this,t))}}function Dp({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function Ap({_intern:t,_key:e},n){const i=e(n);if(t.has(i))return t.get(i);t.set(i,n);return n}function Np({_intern:t,_key:e},n){const i=e(n);if(t.has(i)){n=t.get(i);t.delete(i)}return n}function zp(t){return t!==null&&typeof t==="object"?t.valueOf():t}const Rp=Symbol("implicit");function Cp(){var t=new Ep,e=[],n=[],i=Rp;function r(r){let o=t.get(r);if(o===undefined){if(i!==Rp)return i;t.set(r,o=e.push(r)-1)}return n[o%n.length]}r.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Ep;for(const i of n){if(t.has(i))continue;t.set(i,e.push(i)-1)}return r};r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()};r.unknown=function(t){return arguments.length?(i=t,r):i};r.copy=function(){return Cp(e,n).unknown(i)};Ed.apply(r,arguments);return r}function Op(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Up(t,e){var n=Jh(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}var $p=180/Math.PI;var Pp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qp(t,e,n,i,r,o){var s,a,l;if(s=Math.sqrt(t*t+e*e))t/=s,e/=s;if(l=t*n+e*i)n-=t*l,i-=e*l;if(a=Math.sqrt(n*n+i*i))n/=a,i/=a,l/=a;if(t*i<e*n)t=-t,e=-e,l=-l,s=-s;return{translateX:r,translateY:o,rotate:Math.atan2(e,t)*$p,skewX:Math.atan(l)*$p,scaleX:s,scaleY:a}}var Ip;function Lp(t){const e=new(typeof DOMMatrix==="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Pp:qp(e.a,e.b,e.c,e.d,e.e,e.f)}function Fp(t){if(t==null)return Pp;if(!Ip)Ip=document.createElementNS("http://www.w3.org/2000/svg","g");Ip.setAttribute("transform",t);if(!(t=Ip.transform.baseVal.consolidate()))return Pp;t=t.matrix;return qp(t.a,t.b,t.c,t.d,t.e,t.f)}function jp(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}function o(t,i,r,o,s,a){if(t!==r||i!==o){var l=s.push("translate(",null,e,null,n);a.push({i:l-4,x:sd(t,r)},{i:l-2,x:sd(i,o)})}else if(r||o){s.push("translate("+r+e+o+n)}}function s(t,e,n,o){if(t!==e){if(t-e>180)e+=360;else if(e-t>180)t+=360;o.push({i:n.push(r(n)+"rotate(",null,i)-2,x:sd(t,e)})}else if(e){n.push(r(n)+"rotate("+e+i)}}function a(t,e,n,o){if(t!==e){o.push({i:n.push(r(n)+"skewX(",null,i)-2,x:sd(t,e)})}else if(e){n.push(r(n)+"skewX("+e+i)}}function l(t,e,n,i,o,s){if(t!==n||e!==i){var a=o.push(r(o)+"scale(",null,",",null,")");s.push({i:a-4,x:sd(t,n)},{i:a-2,x:sd(e,i)})}else if(n!==1||i!==1){o.push(r(o)+"scale("+n+","+i+")")}}return function(e,n){var i=[],r=[];e=t(e),n=t(n);o(e.translateX,e.translateY,n.translateX,n.translateY,i,r);s(e.rotate,n.rotate,i,r);a(e.skewX,n.skewX,i,r);l(e.scaleX,e.scaleY,n.scaleX,n.scaleY,i,r);e=n=null;return function(t){var e=-1,n=r.length,o;while(++e<n)i[(o=r[e]).i]=o.x(t);return i.join("")}}}var Wp=jp(Lp,"px, ","px)","deg)");var Xp=jp(Fp,", ",")",")");var Hp=1e-12;function Bp(t){return((t=Math.exp(t))+1/t)/2}function Yp(t){return((t=Math.exp(t))-1/t)/2}function Jp(t){return((t=Math.exp(2*t))-1)/(t+1)}const Gp=function t(e,n,i){function r(t,r){var o=t[0],s=t[1],a=t[2],l=r[0],u=r[1],c=r[2],f=l-o,h=u-s,d=f*f+h*h,p,m;if(d<Hp){m=Math.log(c/a)/e;p=function(t){return[o+t*f,s+t*h,a*Math.exp(e*t*m)]}}else{var g=Math.sqrt(d),y=(c*c-a*a+i*d)/(2*a*n*g),v=(c*c-a*a-i*d)/(2*c*n*g),_=Math.log(Math.sqrt(y*y+1)-y),x=Math.log(Math.sqrt(v*v+1)-v);m=(x-_)/e;p=function(t){var i=t*m,r=Bp(_),l=a/(n*g)*(r*Jp(e*i+_)-Yp(_));return[o+l*f,s+l*h,a*r/Bp(e*i+_)]}}p.duration=m*1e3*e/Math.SQRT2;return p}r.rho=function(e){var n=Math.max(.001,+e),i=n*n,r=i*i;return t(n,i,r)};return r}(Math.SQRT2,2,4);function Vp(t){return function(e,n){var i=t((e=Ph(e)).h,(n=Ph(n)).h),r=Vh(e.s,n.s),o=Vh(e.l,n.l),s=Vh(e.opacity,n.opacity);return function(t){e.h=i(t);e.s=r(t);e.l=o(t);e.opacity=s(t);return e+""}}}const Kp=Vp(Jh);var Zp=Vp(Vh);const Qp=Math.PI/180;const tm=180/Math.PI;const em=18,nm=.96422,im=1,rm=.82521,om=4/29,sm=6/29,am=3*sm*sm,lm=sm*sm*sm;function um(t){if(t instanceof hm)return new hm(t.l,t.a,t.b,t.opacity);if(t instanceof xm)return bm(t);if(!(t instanceof Dh))t=Eh(t);var e=gm(t.r),n=gm(t.g),i=gm(t.b),r=dm((.2225045*e+.7168786*n+.0606169*i)/im),o,s;if(e===n&&n===i)o=s=r;else{o=dm((.4360747*e+.3850649*n+.1430804*i)/nm);s=dm((.0139322*e+.0971045*n+.7141733*i)/rm)}return new hm(116*r-16,500*(o-r),200*(r-s),t.opacity)}function cm(t,e){return new hm(t,0,0,e==null?1:e)}function fm(t,e,n,i){return arguments.length===1?um(t):new hm(t,e,n,i==null?1:i)}function hm(t,e,n,i){this.l=+t;this.a=+e;this.b=+n;this.opacity=+i}ih(hm,fm,rh(oh,{brighter(t){return new hm(this.l+em*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new hm(this.l-em*(t==null?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;e=nm*pm(e);t=im*pm(t);n=rm*pm(n);return new Dh(mm(3.1338561*e-1.6168667*t-.4906146*n),mm(-.9787684*e+1.9161415*t+.033454*n),mm(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function dm(t){return t>lm?Math.pow(t,1/3):t/am+om}function pm(t){return t>sm?t*t*t:am*(t-om)}function mm(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function gm(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ym(t){if(t instanceof xm)return new xm(t.h,t.c,t.l,t.opacity);if(!(t instanceof hm))t=um(t);if(t.a===0&&t.b===0)return new xm(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*tm;return new xm(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function vm(t,e,n,i){return arguments.length===1?ym(t):new xm(n,e,t,i==null?1:i)}function _m(t,e,n,i){return arguments.length===1?ym(t):new xm(t,e,n,i==null?1:i)}function xm(t,e,n,i){this.h=+t;this.c=+e;this.l=+n;this.opacity=+i}function bm(t){if(isNaN(t.h))return new hm(t.l,0,0,t.opacity);var e=t.h*Qp;return new hm(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}ih(xm,_m,rh(oh,{brighter(t){return new xm(this.h,this.c,this.l+em*(t==null?1:t),this.opacity)},darker(t){return new xm(this.h,this.c,this.l-em*(t==null?1:t),this.opacity)},rgb(){return bm(this).rgb()}}));function wm(t,e){var n=Vh((t=fm(t)).l,(e=fm(e)).l),i=Vh(t.a,e.a),r=Vh(t.b,e.b),o=Vh(t.opacity,e.opacity);return function(e){t.l=n(e);t.a=i(e);t.b=r(e);t.opacity=o(e);return t+""}}function km(t){return function(e,n){var i=t((e=_m(e)).h,(n=_m(n)).h),r=Vh(e.c,n.c),o=Vh(e.l,n.l),s=Vh(e.opacity,n.opacity);return function(t){e.h=i(t);e.c=r(t);e.l=o(t);e.opacity=s(t);return e+""}}}const Mm=km(Jh);var Sm=km(Vh);var Em=-.14861,Tm=+1.78277,Dm=-.29227,Am=-.90649,Nm=+1.97294,zm=Nm*Am,Rm=Nm*Tm,Cm=Tm*Dm-Am*Em;function Om(t){if(t instanceof $m)return new $m(t.h,t.s,t.l,t.opacity);if(!(t instanceof Dh))t=Eh(t);var e=t.r/255,n=t.g/255,i=t.b/255,r=(Cm*i+zm*e-Rm*n)/(Cm+zm-Rm),o=i-r,s=(Nm*(n-r)-Dm*o)/Am,a=Math.sqrt(s*s+o*o)/(Nm*r*(1-r)),l=a?Math.atan2(s,o)*tm-120:NaN;return new $m(l<0?l+360:l,a,r,t.opacity)}function Um(t,e,n,i){return arguments.length===1?Om(t):new $m(t,e,n,i==null?1:i)}function $m(t,e,n,i){this.h=+t;this.s=+e;this.l=+n;this.opacity=+i}ih($m,Um,rh(oh,{brighter(t){t=t==null?ah:Math.pow(ah,t);return new $m(this.h,this.s,this.l*t,this.opacity)},darker(t){t=t==null?sh:Math.pow(sh,t);return new $m(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Qp,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),i=Math.cos(t),r=Math.sin(t);return new Dh(255*(e+n*(Em*i+Tm*r)),255*(e+n*(Dm*i+Am*r)),255*(e+n*(Nm*i)),this.opacity)}}));function Pm(t){return function e(n){n=+n;function i(e,i){var r=t((e=Um(e)).h,(i=Um(i)).h),o=Vh(e.s,i.s),s=Vh(e.l,i.l),a=Vh(e.opacity,i.opacity);return function(t){e.h=r(t);e.s=o(t);e.l=s(Math.pow(t,n));e.opacity=a(t);return e+""}}i.gamma=e;return i}(1)}const qm=Pm(Jh);var Im=Pm(Vh);function Lm(t,e){var n=new Array(e);for(var i=0;i<e;++i)n[i]=t(i/(e-1));return n}function Fm(t,e,n){const i=t-e+n*2;return t?i>0?i:1:0}const jm="identity";const Wm="linear";const Xm="log";const Hm="pow";const Bm="sqrt";const Ym="symlog";const Jm="time";const Gm="utc";const Vm="sequential";const Km="diverging";const Zm="quantile";const Qm="quantize";const tg="threshold";const eg="ordinal";const ng="point";const ig="band";const rg="bin-ordinal";const og="continuous";const sg="discrete";const ag="discretizing";const lg="interpolating";const ug="temporal";function cg(t){return function(e){let n=e[0],i=e[1],r;if(i<n){r=n;n=i;i=r}return[t.invert(n),t.invert(i)]}}function fg(t){return function(e){const n=t.range();let i=e[0],r=e[1],o=-1,s,a,l,u;if(r<i){a=i;i=r;r=a}for(l=0,u=n.length;l<u;++l){if(n[l]>=i&&n[l]<=r){if(o<0)o=l;s=l}}if(o<0)return undefined;i=t.invertExtent(n[o]);r=t.invertExtent(n[s]);return[i[0]===undefined?i[1]:i[0],r[1]===undefined?r[0]:r[1]]}}function hg(){const t=Cp().unknown(undefined),e=t.domain,n=t.range;let i=[0,1],r,o,s=false,a=0,l=0,u=.5;delete t.unknown;function c(){const t=e().length,c=i[1]<i[0],f=i[1-c],h=Fm(t,a,l);let d=i[c-0];r=(f-d)/(h||1);if(s){r=Math.floor(r)}d+=(f-d-r*(t-a))*u;o=r*(1-a);if(s){d=Math.round(d);o=Math.round(o)}const p=Qa(t).map((t=>d+r*t));return n(c?p.reverse():p)}t.domain=function(t){if(arguments.length){e(t);return c()}else{return e()}};t.range=function(t){if(arguments.length){i=[+t[0],+t[1]];return c()}else{return i.slice()}};t.rangeRound=function(t){i=[+t[0],+t[1]];s=true;return c()};t.bandwidth=function(){return o};t.step=function(){return r};t.round=function(t){if(arguments.length){s=!!t;return c()}else{return s}};t.padding=function(t){if(arguments.length){l=Math.max(0,Math.min(1,t));a=l;return c()}else{return a}};t.paddingInner=function(t){if(arguments.length){a=Math.max(0,Math.min(1,t));return c()}else{return a}};t.paddingOuter=function(t){if(arguments.length){l=Math.max(0,Math.min(1,t));return c()}else{return l}};t.align=function(t){if(arguments.length){u=Math.max(0,Math.min(1,t));return c()}else{return u}};t.invertRange=function(t){if(t[0]==null||t[1]==null)return;const r=i[1]<i[0],s=r?n().reverse():n(),a=s.length-1;let l=+t[0],u=+t[1],c,f,h;if(l!==l||u!==u)return;if(u<l){h=l;l=u;u=h}if(u<s[0]||l>i[1-r])return;c=Math.max(0,Qf(s,l)-1);f=l===u?c:Qf(s,u)-1;if(l-s[c]>o+1e-10)++c;if(r){h=c;c=a-f;f=a-h}return c>f?undefined:e().slice(c,f+1)};t.invert=function(e){const n=t.invertRange([e,e]);return n?n[0]:n};t.copy=function(){return hg().domain(e()).range(i).round(s).paddingInner(a).paddingOuter(l).align(u)};return c()}function dg(t){const e=t.copy;t.padding=t.paddingOuter;delete t.paddingInner;t.copy=function(){return dg(e())};return t}function pg(){return dg(hg().paddingInner(1))}var mg=Array.prototype.map;function gg(t){return mg.call(t,m.He)}const yg=Array.prototype.slice;function vg(){let t=[],e=[];function n(n){return n==null||n!==n?undefined:e[(nh(t,n)-1)%e.length]}n.domain=function(e){if(arguments.length){t=gg(e);return n}else{return t.slice()}};n.range=function(t){if(arguments.length){e=yg.call(t);return n}else{return e.slice()}};n.tickFormat=function(e,n){return Dd(t[0],(0,m.fj)(t),e==null?10:e,n)};n.copy=function(){return vg().domain(n.domain()).range(n.range())};return n}const _g={};function xg(t,e,n){const i=function n(){const i=e();if(!i.invertRange){i.invertRange=i.invert?cg(i):i.invertExtent?fg(i):undefined}i.type=t;return i};i.metadata=(0,m.Rg)((0,m.IX)(n));return i}function bg(t,e,n){if(arguments.length>1){_g[t]=xg(t,e,n);return this}else{return wg(t)?_g[t]:undefined}}bg(jm,zd);bg(Wm,Nd,og);bg(Xm,jd,[og,Xm]);bg(Hm,Yd,og);bg(Bm,Jd,og);bg(Ym,Zd,og);bg(Jm,ap,[og,ug]);bg(Gm,lp,[og,ug]);bg(Vm,fp,[og,lg]);bg("".concat(Vm,"-").concat(Wm),fp,[og,lg]);bg("".concat(Vm,"-").concat(Xm),hp,[og,lg,Xm]);bg("".concat(Vm,"-").concat(Hm),pp,[og,lg]);bg("".concat(Vm,"-").concat(Bm),mp,[og,lg]);bg("".concat(Vm,"-").concat(Ym),dp,[og,lg]);bg("".concat(Km,"-").concat(Wm),vp,[og,lg]);bg("".concat(Km,"-").concat(Xm),_p,[og,lg,Xm]);bg("".concat(Km,"-").concat(Hm),bp,[og,lg]);bg("".concat(Km,"-").concat(Bm),wp,[og,lg]);bg("".concat(Km,"-").concat(Ym),xp,[og,lg]);bg(Zm,kp,[ag,Zm]);bg(Qm,Mp,ag);bg(tg,Sp,ag);bg(rg,vg,[sg,ag]);bg(eg,Cp,sg);bg(ig,hg,sg);bg(ng,pg,sg);function wg(t){return(0,m.nr)(_g,t)}function kg(t,e){const n=_g[t];return n&&n.metadata[e]}function Mg(t){return kg(t,og)}function Sg(t){return kg(t,sg)}function Eg(t){return kg(t,ag)}function Tg(t){return kg(t,Xm)}function Dg(t){return kg(t,ug)}function Ag(t){return kg(t,lg)}function Ng(t){return kg(t,Zm)}const zg=["clamp","base","constant","exponent"];function Rg(t,e){const n=e[0],i=(0,m.fj)(e)-n;return function(e){return t(n+e*i)}}function Cg(t,e,n){return gp(Pg(e||"rgb",n),t)}function Og(t,e){const n=new Array(e),i=e+1;for(let r=0;r<e;)n[r]=t(++r/i);return n}function Ug(t){const e=t.type,n=t.copy();n.type=e;return n}function $g(t,e,n){const i=n-e;let r,o,s;if(!i||!Number.isFinite(i)){return(0,m.a9)(.5)}else{r=(o=t.type).indexOf("-");o=r<0?o:o.slice(r+1);s=bg(o)().domain([e,n]).range([0,1]);zg.forEach((e=>t[e]?s[e](t[e]()):0));return s}}function Pg(t,e){const n=r[qg(t)];return e!=null&&n&&n.gamma?n.gamma(e):n}function qg(t){return"interpolate"+t.toLowerCase().split("-").map((t=>t[0].toUpperCase()+t.slice(1))).join("")}const Ig={blues:"cfe1f2bed8eca8cee58fc1de74b2d75ba3cf4592c63181bd206fb2125ca40a4a90",greens:"d3eecdc0e6baabdda594d3917bc77d60ba6c46ab5e329a512089430e7735036429",greys:"e2e2e2d4d4d4c4c4c4b1b1b19d9d9d8888887575756262624d4d4d3535351e1e1e",oranges:"fdd8b3fdc998fdb87bfda55efc9244f87f2cf06b18e4580bd14904b93d029f3303",purples:"e2e1efd4d4e8c4c5e0b4b3d6a3a0cc928ec3827cb97566ae684ea25c3696501f8c",reds:"fdc9b4fcb49afc9e80fc8767fa7051f6573fec3f2fdc2a25c81b1db21218970b13",blueGreen:"d5efedc1e8e0a7ddd18bd2be70c6a958ba9144ad77319c5d2089460e7736036429",bluePurple:"ccddecbad0e4a8c2dd9ab0d4919cc98d85be8b6db28a55a6873c99822287730f71",greenBlue:"d3eecec5e8c3b1e1bb9bd8bb82cec269c2ca51b2cd3c9fc7288abd1675b10b60a1",orangeRed:"fddcaffdcf9bfdc18afdad77fb9562f67d53ee6545e24932d32d1ebf130da70403",purpleBlue:"dbdaebc8cee4b1c3de97b7d87bacd15b9fc93a90c01e7fb70b70ab056199045281",purpleBlueGreen:"dbd8eac8cee4b0c3de93b7d872acd1549fc83892bb1c88a3097f8702736b016353",purpleRed:"dcc9e2d3b3d7ce9eccd186c0da6bb2e14da0e23189d91e6fc61159ab07498f023a",redPurple:"fccfccfcbec0faa9b8f98faff571a5ec539ddb3695c41b8aa908808d0179700174",yellowGreen:"e4f4acd1eca0b9e2949ed68880c97c62bb6e47aa5e3297502083440e723b036034",yellowOrangeBrown:"feeaa1fedd84fecc63feb746fca031f68921eb7215db5e0bc54c05ab3d038f3204",yellowOrangeRed:"fee087fed16ffebd59fea849fd903efc7335f9522bee3423de1b20ca0b22af0225",blueOrange:"134b852f78b35da2cb9dcae1d2e5eff2f0ebfce0bafbbf74e8932fc5690d994a07",brownBlueGreen:"704108a0651ac79548e3c78af3e6c6eef1eac9e9e48ed1c74da79e187a72025147",purpleGreen:"5b1667834792a67fb6c9aed3e6d6e8eff0efd9efd5aedda971bb75368e490e5e29",purpleOrange:"4114696647968f83b7b9b4d6dadbebf3eeeafce0bafbbf74e8932fc5690d994a07",redBlue:"8c0d25bf363adf745ef4ae91fbdbc9f2efeed2e5ef9dcae15da2cb2f78b3134b85",redGrey:"8c0d25bf363adf745ef4ae91fcdccbfaf4f1e2e2e2c0c0c0969696646464343434",yellowGreenBlue:"eff9bddbf1b4bde5b594d5b969c5be45b4c22c9ec02182b82163aa23479c1c3185",redYellowBlue:"a50026d4322cf16e43fcac64fedd90faf8c1dcf1ecabd6e875abd04a74b4313695",redYellowGreen:"a50026d4322cf16e43fcac63fedd8df9f7aed7ee8ea4d86e64bc6122964f006837",pinkYellowGreen:"8e0152c0267edd72adf0b3d6faddedf5f3efe1f2cab6de8780bb474f9125276419",spectral:"9e0142d13c4bf0704afcac63fedd8dfbf8b0e0f3a1a9dda269bda94288b55e4fa2",viridis:"440154470e61481a6c482575472f7d443a834144873d4e8a39568c35608d31688e2d708e2a788e27818e23888e21918d1f988b1fa08822a8842ab07f35b77943bf7154c56866cc5d7ad1518fd744a5db36bcdf27d2e21be9e51afde725",magma:"0000040404130b0924150e3720114b2c11603b0f704a107957157e651a80721f817f24828c29819a2e80a8327db6377ac43c75d1426fde4968e95462f1605df76f5cfa7f5efc8f65fe9f6dfeaf78febf84fece91fddea0fcedaffcfdbf",inferno:"0000040403130c0826170c3b240c4f330a5f420a68500d6c5d126e6b176e781c6d86216b932667a12b62ae305cbb3755c73e4cd24644dd513ae65c30ed6925f3771af8850ffb9506fca50afcb519fac62df6d645f2e661f3f484fcffa4",plasma:"0d088723069033059742039d5002a25d01a66a00a87801a88405a7900da49c179ea72198b12a90ba3488c33d80cb4779d35171da5a69e16462e76e5bed7953f2834cf68f44fa9a3dfca636fdb32ffec029fcce25f9dc24f5ea27f0f921",cividis:"00205100235800265d002961012b65042e670831690d346b11366c16396d1c3c6e213f6e26426e2c456e31476e374a6e3c4d6e42506e47536d4c566d51586e555b6e5a5e6e5e616e62646f66676f6a6a706e6d717270717573727976737c79747f7c75827f758682768985778c8877908b78938e789691789a94789e9778a19b78a59e77a9a177aea575b2a874b6ab73bbaf71c0b26fc5b66dc9b96acebd68d3c065d8c462ddc85fe2cb5ce7cf58ebd355f0d652f3da4ff7de4cfae249fce647",rainbow:"6e40aa883eb1a43db3bf3cafd83fa4ee4395fe4b83ff576eff6659ff7847ff8c38f3a130e2b72fcfcc36bee044aff05b8ff4576ff65b52f6673af27828ea8d1ddfa319d0b81cbecb23abd82f96e03d82e14c6edb5a5dd0664dbf6e40aa",sinebow:"ff4040fc582af47218e78d0bd5a703bfbf00a7d5038de70b72f41858fc2a40ff402afc5818f4720be78d03d5a700bfbf03a7d50b8de71872f42a58fc4040ff582afc7218f48d0be7a703d5bf00bfd503a7e70b8df41872fc2a58ff4040",turbo:"23171b32204a3e2a71453493493eae4b49c54a53d7485ee44569ee4074f53c7ff8378af93295f72e9ff42ba9ef28b3e926bce125c5d925cdcf27d5c629dcbc2de3b232e9a738ee9d3ff39347f68950f9805afc7765fd6e70fe667cfd5e88fc5795fb51a1f84badf545b9f140c5ec3cd0e637dae034e4d931ecd12ef4c92bfac029ffb626ffad24ffa223ff9821ff8d1fff821dff771cfd6c1af76118f05616e84b14df4111d5380fcb2f0dc0260ab61f07ac1805a313029b0f00950c00910b00",browns:"eedbbdecca96e9b97ae4a865dc9856d18954c7784cc0673fb85536ad44339f3632",tealBlues:"bce4d89dd3d181c3cb65b3c245a2b9368fae347da0306a932c5985",teals:"bbdfdfa2d4d58ac9c975bcbb61b0af4da5a43799982b8b8c1e7f7f127273006667",warmGreys:"dcd4d0cec5c1c0b8b4b3aaa7a59c9998908c8b827f7e7673726866665c5a59504e",goldGreen:"f4d166d5ca60b6c35c98bb597cb25760a6564b9c533f8f4f33834a257740146c36",goldOrange:"f4d166f8be5cf8aa4cf5983bf3852aef701be2621fd65322c54923b142239e3a26",goldRed:"f4d166f6be59f9aa51fc964ef6834bee734ae56249db5247cf4244c43141b71d3e",lightGreyRed:"efe9e6e1dad7d5cbc8c8bdb9bbaea9cd967ddc7b43e15f19df4011dc000b",lightGreyTeal:"e4eaead6dcddc8ced2b7c2c7a6b4bc64b0bf22a6c32295c11f85be1876bc",lightMulti:"e0f1f2c4e9d0b0de9fd0e181f6e072f6c053f3993ef77440ef4a3c",lightOrange:"f2e7daf7d5baf9c499fab184fa9c73f68967ef7860e8645bde515bd43d5b",lightTealBlue:"e3e9e0c0dccf9aceca7abfc859afc0389fb9328dad2f7ca0276b95255988",darkBlue:"3232322d46681a5c930074af008cbf05a7ce25c0dd38daed50f3faffffff",darkGold:"3c3c3c584b37725e348c7631ae8b2bcfa424ecc31ef9de30fff184ffffff",darkGreen:"3a3a3a215748006f4d048942489e4276b340a6c63dd2d836ffeb2cffffaa",darkMulti:"3737371f5287197d8c29a86995ce3fffe800ffffff",darkRed:"3434347036339e3c38cc4037e75d1eec8620eeab29f0ce32ffeb2c"};const Lg={category10:"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf",category20:"1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5",category20b:"393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6",category20c:"3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9",tableau10:"4c78a8f58518e4575672b7b254a24beeca3bb279a2ff9da69d755dbab0ac",tableau20:"4c78a89ecae9f58518ffbf7954a24b88d27ab79a20f2cf5b43989483bcb6e45756ff9d9879706ebab0acd67195fcbfd2b279a2d6a5c99e765fd8b5a5",accent:"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666",dark2:"1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666",paired:"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928",pastel1:"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2",pastel2:"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc",set1:"e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999",set2:"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3",set3:"8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"};function Fg(t){const e=t.length/6|0,n=new Array(e);for(let i=0;i<e;){n[i]="#"+t.slice(i*6,++i*6)}return n}function jg(t,e){for(const n in t)Xg(n,e(t[n]))}const Wg={};jg(Lg,Fg);jg(Ig,(t=>Cg(Fg(t))));function Xg(t,e){t=t&&t.toLowerCase();if(arguments.length>1){Wg[t]=e;return this}else{return Wg[t]}}const Hg="symbol";const Bg="discrete";const Yg="gradient";const Jg=t=>(0,m.kJ)(t)?t.map((t=>String(t))):String(t);const Gg=(t,e)=>t[1]-e[1];const Vg=(t,e)=>e[1]-t[1];function Kg(t,e,n){let i;if((0,m.hj)(e)){if(t.bins){e=Math.max(e,t.bins.length)}if(n!=null){e=Math.min(e,Math.floor((0,m.yP)(t.domain())/n||1))}}if((0,m.Kn)(e)){i=e.step;e=e.interval}if((0,m.HD)(e)){e=t.type===Jm?gn(e):t.type==Gm?yn(e):(0,m.vU)("Only time and utc scales accept interval strings.");if(i)e=e.every(i)}return e}function Zg(t,e,n){let i=t.range(),r=i[0],o=(0,m.fj)(i),s=Gg;if(r>o){i=o;o=r;r=i;s=Vg}r=Math.floor(r);o=Math.ceil(o);e=e.map((e=>[e,t(e)])).filter((t=>r<=t[1]&&t[1]<=o)).sort(s).map((t=>t[0]));if(n>0&&e.length>1){const t=[e[0],(0,m.fj)(e)];while(e.length>n&&e.length>=3){e=e.filter(((t,e)=>!(e%2)))}if(e.length<3){e=t}}return e}function Qg(t,e){return t.bins?Zg(t,t.bins):t.ticks?t.ticks(e):t.domain()}function ty(t,e,n,i,r,o){const s=e.type;let a=Jg;if(s===Jm||r===Jm){a=t.timeFormat(i)}else if(s===Gm||r===Gm){a=t.utcFormat(i)}else if(Tg(s)){const r=t.formatFloat(i);if(o||e.bins){a=r}else{const t=ey(e,n,false);a=e=>t(e)?r(e):""}}else if(e.tickFormat){const r=e.domain();a=t.formatSpan(r[0],r[r.length-1],n,i)}else if(i){a=t.format(i)}return a}function ey(t,e,n){const i=Qg(t,e),r=t.base(),o=Math.log(r),s=Math.max(1,r*e/i.length);const a=t=>{let e=t/Math.pow(r,Math.round(Math.log(t)/o));if(e*r<r-.5)e*=r;return e<=s};return n?i.filter(a):a}const ny={[Zm]:"quantiles",[Qm]:"thresholds",[tg]:"domain"};const iy={[Zm]:"quantiles",[Qm]:"domain"};function ry(t,e){return t.bins?ay(t.bins):t.type===Xm?ey(t,e,true):ny[t.type]?sy(t[ny[t.type]]()):Qg(t,e)}function oy(t,e,n){const i=e[iy[e.type]](),r=i.length;let o=r>1?i[1]-i[0]:i[0],s;for(s=1;s<r;++s){o=Math.min(o,i[s]-i[s-1])}return t.formatSpan(0,o,3*10,n)}function sy(t){const e=[-Infinity].concat(t);e.max=+Infinity;return e}function ay(t){const e=t.slice(0,-1);e.max=(0,m.fj)(t);return e}const ly=t=>ny[t.type]||t.bins;function uy(t,e,n,i,r,o,s){const a=iy[e.type]&&o!==Jm&&o!==Gm?oy(t,e,r):ty(t,e,n,r,o,s);return i===Hg&&ly(e)?cy(a):i===Bg?hy(a):dy(a)}const cy=t=>(e,n,i)=>{const r=fy(i[n+1],fy(i.max,+Infinity)),o=py(e,t),s=py(r,t);return o&&s?o+" – "+s:s?"< "+s:"≥ "+o};const fy=(t,e)=>t!=null?t:e;const hy=t=>(e,n)=>n?t(e):null;const dy=t=>e=>t(e);const py=(t,e)=>Number.isFinite(t)?e(t):null;function my(t){const e=t.domain(),n=e.length-1;let i=+e[0],r=+(0,m.fj)(e),o=r-i;if(t.type===tg){const t=n?o/n:.1;i-=t;r+=t;o=r-i}return t=>(t-i)/o}function gy(t,e,n,i){const r=i||e.type;if((0,m.HD)(n)&&Dg(r)){n=n.replace(/%a/g,"%A").replace(/%b/g,"%B")}return!n&&r===Jm?t.timeFormat("%A, %d %B %Y, %X"):!n&&r===Gm?t.utcFormat("%A, %d %B %Y, %X UTC"):uy(t,e,5,null,n,i,true)}function yy(t,e,n){n=n||{};const i=Math.max(3,n.maxlen||7),r=gy(t,e,n.format,n.formatType);if(Eg(e.type)){const t=ry(e).slice(1).map(r),n=t.length;return"".concat(n," boundar").concat(n===1?"y":"ies",": ").concat(t.join(", "))}else if(Sg(e.type)){const t=e.domain(),n=t.length,o=n>i?t.slice(0,i-2).map(r).join(", ")+", ending with "+t.slice(-1).map(r):t.map(r).join(", ");return"".concat(n," value").concat(n===1?"":"s",": ").concat(o)}else{const t=e.domain();return"values from ".concat(r(t[0])," to ").concat(r((0,m.fj)(t)))}}let vy=0;function _y(){vy=0}const xy="p_";function by(t){return t&&t.gradient}function wy(t,e,n){const i=t.gradient;let r=t.id,o=i==="radial"?xy:"";if(!r){r=t.id="gradient_"+vy++;if(i==="radial"){t.x1=ky(t.x1,.5);t.y1=ky(t.y1,.5);t.r1=ky(t.r1,0);t.x2=ky(t.x2,.5);t.y2=ky(t.y2,.5);t.r2=ky(t.r2,.5);o=xy}else{t.x1=ky(t.x1,0);t.y1=ky(t.y1,0);t.x2=ky(t.x2,1);t.y2=ky(t.y2,0)}}e[r]=t;return"url("+(n||"")+"#"+o+r+")"}function ky(t,e){return t!=null?t:e}function My(t,e){var n=[],i;return i={gradient:"linear",x1:t?t[0]:0,y1:t?t[1]:0,x2:e?e[0]:1,y2:e?e[1]:0,stops:n,stop:function(t,e){n.push({offset:t,color:e});return i}}}const Sy={basis:{curve:Ku},"basis-closed":{curve:tc},"basis-open":{curve:nc},bundle:{curve:rc,tension:"beta",value:.85},cardinal:{curve:ac,tension:"tension",value:0},"cardinal-open":{curve:uc,tension:"tension",value:0},"cardinal-closed":{curve:fc,tension:"tension",value:0},"catmull-rom":{curve:Tc,tension:"alpha",value:.5},"catmull-rom-closed":{curve:Ac,tension:"alpha",value:.5},"catmull-rom-open":{curve:zc,tension:"alpha",value:.5},linear:{curve:Cc},"linear-closed":{curve:Uc},monotone:{horizontal:Xc,vertical:Wc},natural:{curve:Yc},step:{curve:Gc},"step-after":{curve:Kc},"step-before":{curve:Vc}};function Ey(t,e,n){var i=(0,m.nr)(Sy,t)&&Sy[t],r=null;if(i){r=i.curve||i[e||"vertical"];if(i.tension&&n!=null){r=r[i.tension](n)}}return r}const Ty={m:2,l:2,h:1,v:1,z:0,c:6,s:4,q:4,t:2,a:7};const Dy=/[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi;const Ay=/^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/;const Ny=/^((\s+,?\s*)|(,\s*))/;const zy=/^[01]/;function Ry(t){const e=[];const n=t.match(Dy)||[];n.forEach((t=>{let n=t[0];const i=n.toLowerCase();const r=Ty[i];const o=Cy(i,r,t.slice(1).trim());const s=o.length;if(s<r||s&&s%r!==0){throw Error("Invalid SVG path, incorrect parameter count")}e.push([n,...o.slice(0,r)]);if(s===r){return}if(i==="m"){n=n==="M"?"L":"l"}for(let a=r;a<s;a+=r){e.push([n,...o.slice(a,a+r)])}}));return e}function Cy(t,e,n){const i=[];for(let r=0;e&&r<n.length;){for(let o=0;o<e;++o){const e=t==="a"&&(o===3||o===4)?zy:Ay;const s=n.slice(r).match(e);if(s===null){throw Error("Invalid SVG path, incorrect parameter type")}r+=s[0].length;i.push(+s[0]);const a=n.slice(r).match(Ny);if(a!==null){r+=a[0].length}}}return i}const Oy=Math.PI/180;const Uy=1e-14;const $y=Math.PI/2;const Py=Math.PI*2;const qy=Math.sqrt(3)/2;var Iy={};var Ly={};var Fy=[].join;function jy(t,e,n,i,r,o,s,a,l){const u=Fy.call(arguments);if(Iy[u]){return Iy[u]}const c=s*Oy;const f=Math.sin(c);const h=Math.cos(c);n=Math.abs(n);i=Math.abs(i);const d=h*(a-t)*.5+f*(l-e)*.5;const p=h*(l-e)*.5-f*(a-t)*.5;let m=d*d/(n*n)+p*p/(i*i);if(m>1){m=Math.sqrt(m);n*=m;i*=m}const g=h/n;const y=f/n;const v=-f/i;const _=h/i;const x=g*a+y*l;const b=v*a+_*l;const w=g*t+y*e;const k=v*t+_*e;const M=(w-x)*(w-x)+(k-b)*(k-b);let S=1/M-.25;if(S<0)S=0;let E=Math.sqrt(S);if(o==r)E=-E;const T=.5*(x+w)-E*(k-b);const D=.5*(b+k)+E*(w-x);const A=Math.atan2(b-D,x-T);const N=Math.atan2(k-D,w-T);let z=N-A;if(z<0&&o===1){z+=Py}else if(z>0&&o===0){z-=Py}const R=Math.ceil(Math.abs(z/($y+.001)));const C=[];for(let O=0;O<R;++O){const t=A+O*z/R;const e=A+(O+1)*z/R;C[O]=[T,D,t,e,n,i,f,h]}return Iy[u]=C}function Wy(t){const e=Fy.call(t);if(Ly[e]){return Ly[e]}var n=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],u=t[7];const c=u*s;const f=-l*a;const h=l*s;const d=u*a;const p=Math.cos(r);const m=Math.sin(r);const g=Math.cos(o);const y=Math.sin(o);const v=.5*(o-r);const _=Math.sin(v*.5);const x=8/3*_*_/Math.sin(v);const b=n+p-x*m;const w=i+m+x*p;const k=n+g;const M=i+y;const S=k+x*y;const E=M-x*g;return Ly[e]=[c*b+f*w,h*b+d*w,c*S+f*E,h*S+d*E,c*k+f*M,h*k+d*M]}const Xy=["l",0,0,0,0,0,0,0];function Hy(t,e,n){const i=Xy[0]=t[0];if(i==="a"||i==="A"){Xy[1]=e*t[1];Xy[2]=n*t[2];Xy[3]=t[3];Xy[4]=t[4];Xy[5]=t[5];Xy[6]=e*t[6];Xy[7]=n*t[7]}else if(i==="h"||i==="H"){Xy[1]=e*t[1]}else if(i==="v"||i==="V"){Xy[1]=n*t[1]}else{for(var r=1,o=t.length;r<o;++r){Xy[r]=(r%2==1?e:n)*t[r]}}return Xy}function By(t,e,n,i,r,o){var s,a=null,l=0,u=0,c=0,f=0,h,d,p,m,g=0,y=0;if(n==null)n=0;if(i==null)i=0;if(r==null)r=1;if(o==null)o=r;if(t.beginPath)t.beginPath();for(var v=0,_=e.length;v<_;++v){s=e[v];if(r!==1||o!==1){s=Hy(s,r,o)}switch(s[0]){case"l":l+=s[1];u+=s[2];t.lineTo(l+n,u+i);break;case"L":l=s[1];u=s[2];t.lineTo(l+n,u+i);break;case"h":l+=s[1];t.lineTo(l+n,u+i);break;case"H":l=s[1];t.lineTo(l+n,u+i);break;case"v":u+=s[1];t.lineTo(l+n,u+i);break;case"V":u=s[1];t.lineTo(l+n,u+i);break;case"m":l+=s[1];u+=s[2];g=l;y=u;t.moveTo(l+n,u+i);break;case"M":l=s[1];u=s[2];g=l;y=u;t.moveTo(l+n,u+i);break;case"c":h=l+s[5];d=u+s[6];c=l+s[3];f=u+s[4];t.bezierCurveTo(l+s[1]+n,u+s[2]+i,c+n,f+i,h+n,d+i);l=h;u=d;break;case"C":l=s[5];u=s[6];c=s[3];f=s[4];t.bezierCurveTo(s[1]+n,s[2]+i,c+n,f+i,l+n,u+i);break;case"s":h=l+s[3];d=u+s[4];c=2*l-c;f=2*u-f;t.bezierCurveTo(c+n,f+i,l+s[1]+n,u+s[2]+i,h+n,d+i);c=l+s[1];f=u+s[2];l=h;u=d;break;case"S":h=s[3];d=s[4];c=2*l-c;f=2*u-f;t.bezierCurveTo(c+n,f+i,s[1]+n,s[2]+i,h+n,d+i);l=h;u=d;c=s[1];f=s[2];break;case"q":h=l+s[3];d=u+s[4];c=l+s[1];f=u+s[2];t.quadraticCurveTo(c+n,f+i,h+n,d+i);l=h;u=d;break;case"Q":h=s[3];d=s[4];t.quadraticCurveTo(s[1]+n,s[2]+i,h+n,d+i);l=h;u=d;c=s[1];f=s[2];break;case"t":h=l+s[1];d=u+s[2];if(a[0].match(/[QqTt]/)===null){c=l;f=u}else if(a[0]==="t"){c=2*l-p;f=2*u-m}else if(a[0]==="q"){c=2*l-c;f=2*u-f}p=c;m=f;t.quadraticCurveTo(c+n,f+i,h+n,d+i);l=h;u=d;c=l+s[1];f=u+s[2];break;case"T":h=s[1];d=s[2];c=2*l-c;f=2*u-f;t.quadraticCurveTo(c+n,f+i,h+n,d+i);l=h;u=d;break;case"a":Yy(t,l+n,u+i,[s[1],s[2],s[3],s[4],s[5],s[6]+l+n,s[7]+u+i]);l+=s[6];u+=s[7];break;case"A":Yy(t,l+n,u+i,[s[1],s[2],s[3],s[4],s[5],s[6]+n,s[7]+i]);l=s[6];u=s[7];break;case"z":case"Z":l=g;u=y;t.closePath();break}a=s}}function Yy(t,e,n,i){const r=jy(i[5],i[6],i[0],i[1],i[3],i[4],i[2],e,n);for(let o=0;o<r.length;++o){const e=Wy(r[o]);t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5])}}const Jy=.5773502691896257;const Gy={circle:{draw:function(t,e){const n=Math.sqrt(e)/2;t.moveTo(n,0);t.arc(0,0,n,0,Py)}},cross:{draw:function(t,e){var n=Math.sqrt(e)/2,i=n/2.5;t.moveTo(-n,-i);t.lineTo(-n,i);t.lineTo(-i,i);t.lineTo(-i,n);t.lineTo(i,n);t.lineTo(i,i);t.lineTo(n,i);t.lineTo(n,-i);t.lineTo(i,-i);t.lineTo(i,-n);t.lineTo(-i,-n);t.lineTo(-i,-i);t.closePath()}},diamond:{draw:function(t,e){const n=Math.sqrt(e)/2;t.moveTo(-n,0);t.lineTo(0,-n);t.lineTo(n,0);t.lineTo(0,n);t.closePath()}},square:{draw:function(t,e){var n=Math.sqrt(e),i=-n/2;t.rect(i,i,n,n)}},arrow:{draw:function(t,e){var n=Math.sqrt(e)/2,i=n/7,r=n/2.5,o=n/8;t.moveTo(-i,n);t.lineTo(i,n);t.lineTo(i,-o);t.lineTo(r,-o);t.lineTo(0,-n);t.lineTo(-r,-o);t.lineTo(-i,-o);t.closePath()}},wedge:{draw:function(t,e){var n=Math.sqrt(e)/2,i=qy*n,r=i-n*Jy,o=n/4;t.moveTo(0,-i-r);t.lineTo(-o,i-r);t.lineTo(o,i-r);t.closePath()}},triangle:{draw:function(t,e){var n=Math.sqrt(e)/2,i=qy*n,r=i-n*Jy;t.moveTo(0,-i-r);t.lineTo(-n,i-r);t.lineTo(n,i-r);t.closePath()}},"triangle-up":{draw:function(t,e){var n=Math.sqrt(e)/2,i=qy*n;t.moveTo(0,-i);t.lineTo(-n,i);t.lineTo(n,i);t.closePath()}},"triangle-down":{draw:function(t,e){var n=Math.sqrt(e)/2,i=qy*n;t.moveTo(0,i);t.lineTo(-n,-i);t.lineTo(n,-i);t.closePath()}},"triangle-right":{draw:function(t,e){var n=Math.sqrt(e)/2,i=qy*n;t.moveTo(i,0);t.lineTo(-i,-n);t.lineTo(-i,n);t.closePath()}},"triangle-left":{draw:function(t,e){var n=Math.sqrt(e)/2,i=qy*n;t.moveTo(-i,0);t.lineTo(i,-n);t.lineTo(i,n);t.closePath()}},stroke:{draw:function(t,e){const n=Math.sqrt(e)/2;t.moveTo(-n,0);t.lineTo(n,0)}}};function Vy(t){return(0,m.nr)(Gy,t)?Gy[t]:Zy(t)}var Ky={};function Zy(t){if(!(0,m.nr)(Ky,t)){const e=Ry(t);Ky[t]={draw:function(t,n){By(t,e,0,0,Math.sqrt(n)/2)}}}return Ky[t]}const Qy=.448084975506;function tv(t){return t.x}function ev(t){return t.y}function nv(t){return t.width}function iv(t){return t.height}function rv(t){return typeof t==="function"?t:()=>+t}function ov(t,e,n){return Math.max(e,Math.min(t,n))}function sv(){var t=tv,e=ev,n=nv,i=iv,r=rv(0),o=r,s=r,a=r,l=null;function u(u,c,f){var h,d=c!=null?c:+t.call(this,u),p=f!=null?f:+e.call(this,u),m=+n.call(this,u),g=+i.call(this,u),y=Math.min(m,g)/2,v=ov(+r.call(this,u),0,y),_=ov(+o.call(this,u),0,y),x=ov(+s.call(this,u),0,y),b=ov(+a.call(this,u),0,y);if(!l)l=h=of();if(v<=0&&_<=0&&x<=0&&b<=0){l.rect(d,p,m,g)}else{var w=d+m,k=p+g;l.moveTo(d+v,p);l.lineTo(w-_,p);l.bezierCurveTo(w-Qy*_,p,w,p+Qy*_,w,p+_);l.lineTo(w,k-b);l.bezierCurveTo(w,k-Qy*b,w-Qy*b,k,w-b,k);l.lineTo(d+x,k);l.bezierCurveTo(d+Qy*x,k,d,k-Qy*x,d,k-x);l.lineTo(d,p+v);l.bezierCurveTo(d,p+Qy*v,d+Qy*v,p,d+v,p);l.closePath()}if(h){l=null;return h+""||null}}u.x=function(e){if(arguments.length){t=rv(e);return u}else{return t}};u.y=function(t){if(arguments.length){e=rv(t);return u}else{return e}};u.width=function(t){if(arguments.length){n=rv(t);return u}else{return n}};u.height=function(t){if(arguments.length){i=rv(t);return u}else{return i}};u.cornerRadius=function(t,e,n,i){if(arguments.length){r=rv(t);o=e!=null?rv(e):r;a=n!=null?rv(n):r;s=i!=null?rv(i):o;return u}else{return r}};u.context=function(t){if(arguments.length){l=t==null?null:t;return u}else{return l}};return u}function av(){var t,e,n,i,r=null,o,s,a,l;function u(t,e,n){const i=n/2;if(o){var u=a-e,c=t-s;if(u||c){var f=Math.sqrt(u*u+c*c),h=(u/=f)*l,d=(c/=f)*l,p=Math.atan2(c,u);r.moveTo(s-h,a-d);r.lineTo(t-u*i,e-c*i);r.arc(t,e,i,p-Math.PI,p);r.lineTo(s+h,a+d);r.arc(s,a,l,p,p+Math.PI)}else{r.arc(t,e,i,0,Py)}r.closePath()}else{o=1}s=t;a=e;l=i}function c(s){var a,l=s.length,c,f=false,h;if(r==null)r=h=of();for(a=0;a<=l;++a){if(!(a<l&&i(c=s[a],a,s))===f){if(f=!f)o=0}if(f)u(+t(c,a,s),+e(c,a,s),+n(c,a,s))}if(h){r=null;return h+""||null}}c.x=function(e){if(arguments.length){t=e;return c}else{return t}};c.y=function(t){if(arguments.length){e=t;return c}else{return e}};c.size=function(t){if(arguments.length){n=t;return c}else{return n}};c.defined=function(t){if(arguments.length){i=t;return c}else{return i}};c.context=function(t){if(arguments.length){if(t==null){r=null}else{r=t}return c}else{return r}};return c}function lv(t,e){return t!=null?t:e}const uv=t=>t.x||0,cv=t=>t.y||0,fv=t=>t.width||0,hv=t=>t.height||0,dv=t=>(t.x||0)+(t.width||0),pv=t=>(t.y||0)+(t.height||0),mv=t=>t.startAngle||0,gv=t=>t.endAngle||0,yv=t=>t.padAngle||0,vv=t=>t.innerRadius||0,_v=t=>t.outerRadius||0,xv=t=>t.cornerRadius||0,bv=t=>lv(t.cornerRadiusTopLeft,t.cornerRadius)||0,wv=t=>lv(t.cornerRadiusTopRight,t.cornerRadius)||0,kv=t=>lv(t.cornerRadiusBottomRight,t.cornerRadius)||0,Mv=t=>lv(t.cornerRadiusBottomLeft,t.cornerRadius)||0,Sv=t=>lv(t.size,64),Ev=t=>t.size||1,Tv=t=>!(t.defined===false),Dv=t=>Vy(t.shape||"circle");const Av=pf().startAngle(mv).endAngle(gv).padAngle(yv).innerRadius(vv).outerRadius(_v).cornerRadius(xv),Nv=xf().x(uv).y1(cv).y0(pv).defined(Tv),zv=xf().y(cv).x1(uv).x0(dv).defined(Tv),Rv=_f().x(uv).y(cv).defined(Tv),Cv=sv().x(uv).y(cv).width(fv).height(hv).cornerRadius(bv,wv,kv,Mv),Ov=Gf().type(Dv).size(Sv),Uv=av().x(uv).y(cv).defined(Tv).size(Ev);function $v(t){return t.cornerRadius||t.cornerRadiusTopLeft||t.cornerRadiusTopRight||t.cornerRadiusBottomRight||t.cornerRadiusBottomLeft}function Pv(t,e){return Av.context(t)(e)}function qv(t,e){const n=e[0],i=n.interpolate||"linear";return(n.orient==="horizontal"?zv:Nv).curve(Ey(i,n.orient,n.tension)).context(t)(e)}function Iv(t,e){const n=e[0],i=n.interpolate||"linear";return Rv.curve(Ey(i,n.orient,n.tension)).context(t)(e)}function Lv(t,e,n,i){return Cv.context(t)(e,n,i)}function Fv(t,e){return(e.mark.shape||e.shape).context(t)(e)}function jv(t,e){return Ov.context(t)(e)}function Wv(t,e){return Uv.context(t)(e)}var Xv=1;function Hv(){Xv=1}function Bv(t,e,n){var i=e.clip,r=t._defs,o=e.clip_id||(e.clip_id="clip"+Xv++),s=r.clipping[o]||(r.clipping[o]={id:o});if((0,m.mf)(i)){s.path=i(null)}else if($v(n)){s.path=Lv(null,n,0,0)}else{s.width=n.width||0;s.height=n.height||0}return"url(#"+o+")"}function Yv(t){this.clear();if(t)this.union(t)}Yv.prototype={clone(){return new Yv(this)},clear(){this.x1=+Number.MAX_VALUE;this.y1=+Number.MAX_VALUE;this.x2=-Number.MAX_VALUE;this.y2=-Number.MAX_VALUE;return this},empty(){return this.x1===+Number.MAX_VALUE&&this.y1===+Number.MAX_VALUE&&this.x2===-Number.MAX_VALUE&&this.y2===-Number.MAX_VALUE},equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2},set(t,e,n,i){if(n<t){this.x2=t;this.x1=n}else{this.x1=t;this.x2=n}if(i<e){this.y2=e;this.y1=i}else{this.y1=e;this.y2=i}return this},add(t,e){if(t<this.x1)this.x1=t;if(e<this.y1)this.y1=e;if(t>this.x2)this.x2=t;if(e>this.y2)this.y2=e;return this},expand(t){this.x1-=t;this.y1-=t;this.x2+=t;this.y2+=t;return this},round(){this.x1=Math.floor(this.x1);this.y1=Math.floor(this.y1);this.x2=Math.ceil(this.x2);this.y2=Math.ceil(this.y2);return this},scale(t){this.x1*=t;this.y1*=t;this.x2*=t;this.y2*=t;return this},translate(t,e){this.x1+=t;this.x2+=t;this.y1+=e;this.y2+=e;return this},rotate(t,e,n){const i=this.rotatedPoints(t,e,n);return this.clear().add(i[0],i[1]).add(i[2],i[3]).add(i[4],i[5]).add(i[6],i[7])},rotatedPoints(t,e,n){var{x1:i,y1:r,x2:o,y2:s}=this,a=Math.cos(t),l=Math.sin(t),u=e-e*a+n*l,c=n-e*l-n*a;return[a*i-l*r+u,l*i+a*r+c,a*i-l*s+u,l*i+a*s+c,a*o-l*r+u,l*o+a*r+c,a*o-l*s+u,l*o+a*s+c]},union(t){if(t.x1<this.x1)this.x1=t.x1;if(t.y1<this.y1)this.y1=t.y1;if(t.x2>this.x2)this.x2=t.x2;if(t.y2>this.y2)this.y2=t.y2;return this},intersect(t){if(t.x1>this.x1)this.x1=t.x1;if(t.y1>this.y1)this.y1=t.y1;if(t.x2<this.x2)this.x2=t.x2;if(t.y2<this.y2)this.y2=t.y2;return this},encloses(t){return t&&this.x1<=t.x1&&this.x2>=t.x2&&this.y1<=t.y1&&this.y2>=t.y2},alignsWith(t){return t&&(this.x1==t.x1||this.x2==t.x2||this.y1==t.y1||this.y2==t.y2)},intersects(t){return t&&!(this.x2<t.x1||this.x1>t.x2||this.y2<t.y1||this.y1>t.y2)},contains(t,e){return!(t<this.x1||t>this.x2||e<this.y1||e>this.y2)},width(){return this.x2-this.x1},height(){return this.y2-this.y1}};function Jv(t){this.mark=t;this.bounds=this.bounds||new Yv}function Gv(t){Jv.call(this,t);this.items=this.items||[]}(0,m.XW)(Gv,Jv);function Vv(t){this._pending=0;this._loader=t||fo()}function Kv(t){t._pending+=1}function Zv(t){t._pending-=1}Vv.prototype={pending(){return this._pending},sanitizeURL(t){const e=this;Kv(e);return e._loader.sanitize(t,{context:"href"}).then((t=>{Zv(e);return t})).catch((()=>{Zv(e);return null}))},loadImage(t){const e=this,n=Kf();Kv(e);return e._loader.sanitize(t,{context:"image"}).then((t=>{const i=t.href;if(!i||!n)throw{url:i};const r=new n;const o=(0,m.nr)(t,"crossOrigin")?t.crossOrigin:"anonymous";if(o!=null)r.crossOrigin=o;r.onload=()=>Zv(e);r.onerror=()=>Zv(e);r.src=i;return r})).catch((t=>{Zv(e);return{complete:false,width:0,height:0,src:t&&t.url||""}}))},ready(){const t=this;return new Promise((e=>{function n(i){if(!t.pending())e(i);else setTimeout((()=>{n(true)}),10)}n(false)}))}};function Qv(t,e,n){if(e.stroke&&e.opacity!==0&&e.strokeOpacity!==0){const i=e.strokeWidth!=null?+e.strokeWidth:1;t.expand(i+(n?t_(e,i):0))}return t}function t_(t,e){return t.strokeJoin&&t.strokeJoin!=="miter"?0:e}const e_=Py-1e-8;let n_,i_,r_,o_,s_,a_,l_,u_;const c_=(t,e)=>n_.add(t,e);const f_=(t,e)=>c_(i_=t,r_=e);const h_=t=>c_(t,n_.y1);const d_=t=>c_(n_.x1,t);const p_=(t,e)=>s_*t+l_*e;const m_=(t,e)=>a_*t+u_*e;const g_=(t,e)=>c_(p_(t,e),m_(t,e));const y_=(t,e)=>f_(p_(t,e),m_(t,e));function v_(t,e){n_=t;if(e){o_=e*Oy;s_=u_=Math.cos(o_);a_=Math.sin(o_);l_=-a_}else{s_=u_=1;o_=a_=l_=0}return __}const __={beginPath(){},closePath(){},moveTo:y_,lineTo:y_,rect(t,e,n,i){if(o_){g_(t+n,e);g_(t+n,e+i);g_(t,e+i);y_(t,e)}else{c_(t+n,e+i);f_(t,e)}},quadraticCurveTo(t,e,n,i){const r=p_(t,e),o=m_(t,e),s=p_(n,i),a=m_(n,i);x_(i_,r,s,h_);x_(r_,o,a,d_);f_(s,a)},bezierCurveTo(t,e,n,i,r,o){const s=p_(t,e),a=m_(t,e),l=p_(n,i),u=m_(n,i),c=p_(r,o),f=m_(r,o);b_(i_,s,l,c,h_);b_(r_,a,u,f,d_);f_(c,f)},arc(t,e,n,i,r,o){i+=o_;r+=o_;i_=n*Math.cos(r)+t;r_=n*Math.sin(r)+e;if(Math.abs(r-i)>e_){c_(t-n,e-n);c_(t+n,e+n)}else{const s=i=>c_(n*Math.cos(i)+t,n*Math.sin(i)+e);let a,l;s(i);s(r);if(r!==i){i=i%Py;if(i<0)i+=Py;r=r%Py;if(r<0)r+=Py;if(r<i){o=!o;a=i;i=r;r=a}if(o){r-=Py;a=i-i%$y;for(l=0;l<4&&a>r;++l,a-=$y)s(a)}else{a=i-i%$y+$y;for(l=0;l<4&&a<r;++l,a=a+$y)s(a)}}}}};function x_(t,e,n,i){const r=(t-e)/(t+n-2*e);if(0<r&&r<1)i(t+(e-t)*r)}function b_(t,e,n,i,r){const o=i-t+3*e-3*n,s=t+n-2*e,a=t-e;let l=0,u=0,c;if(Math.abs(o)>Uy){c=s*s+a*o;if(c>=0){c=Math.sqrt(c);l=(-s+c)/o;u=(-s-c)/o}}else{l=.5*a/s}if(0<l&&l<1)r(w_(l,t,e,n,i));if(0<u&&u<1)r(w_(u,t,e,n,i))}function w_(t,e,n,i,r){const o=1-t,s=o*o,a=t*t;return s*o*e+3*s*t*n+3*o*a*i+a*t*r}var k_=(k_=Vf(1,1))?k_.getContext("2d"):null;const M_=new Yv;function S_(t){return function(e,n){if(!k_)return true;t(k_,e);M_.clear().union(e.bounds).intersect(n).round();const{x1:i,y1:r,x2:o,y2:s}=M_;for(let t=r;t<=s;++t){for(let e=i;e<=o;++e){if(k_.isPointInPath(e,t)){return true}}}return false}}function E_(t,e){return e.contains(t.x||0,t.y||0)}function T_(t,e){const n=t.x||0,i=t.y||0,r=t.width||0,o=t.height||0;return e.intersects(M_.set(n,i,n+r,i+o))}function D_(t,e){const n=t.x||0,i=t.y||0,r=t.x2!=null?t.x2:n,o=t.y2!=null?t.y2:i;return A_(e,n,i,r,o)}function A_(t,e,n,i,r){const{x1:o,y1:s,x2:a,y2:l}=t,u=i-e,c=r-n;let f=0,h=1,d,p,m,g;for(g=0;g<4;++g){if(g===0){d=-u;p=-(o-e)}if(g===1){d=u;p=a-e}if(g===2){d=-c;p=-(s-n)}if(g===3){d=c;p=l-n}if(Math.abs(d)<1e-10&&p<0)return false;m=p/d;if(d<0){if(m>h)return false;else if(m>f)f=m}else if(d>0){if(m<f)return false;else if(m<h)h=m}}return true}function N_(t,e){t.globalCompositeOperation=e.blend||"source-over"}function z_(t,e){return t==null?e:t}function R_(t,e){const n=e.length;for(let i=0;i<n;++i){t.addColorStop(e[i].offset,e[i].color)}return t}function C_(t,e,n){const i=n.width(),r=n.height();let o;if(e.gradient==="radial"){o=t.createRadialGradient(n.x1+z_(e.x1,.5)*i,n.y1+z_(e.y1,.5)*r,Math.max(i,r)*z_(e.r1,0),n.x1+z_(e.x2,.5)*i,n.y1+z_(e.y2,.5)*r,Math.max(i,r)*z_(e.r2,.5))}else{const s=z_(e.x1,0),a=z_(e.y1,0),l=z_(e.x2,1),u=z_(e.y2,0);if(s===l||a===u||i===r){o=t.createLinearGradient(n.x1+s*i,n.y1+a*r,n.x1+l*i,n.y1+u*r)}else{const n=Vf(Math.ceil(i),Math.ceil(r)),o=n.getContext("2d");o.scale(i,r);o.fillStyle=R_(o.createLinearGradient(s,a,l,u),e.stops);o.fillRect(0,0,i,r);return t.createPattern(n,"no-repeat")}}return R_(o,e.stops)}function O_(t,e,n){return by(n)?C_(t,n,e.bounds):n}function U_(t,e,n){n*=e.fillOpacity==null?1:e.fillOpacity;if(n>0){t.globalAlpha=n;t.fillStyle=O_(t,e,e.fill);return true}else{return false}}var $_=[];function P_(t,e,n){var i=(i=e.strokeWidth)!=null?i:1;if(i<=0)return false;n*=e.strokeOpacity==null?1:e.strokeOpacity;if(n>0){t.globalAlpha=n;t.strokeStyle=O_(t,e,e.stroke);t.lineWidth=i;t.lineCap=e.strokeCap||"butt";t.lineJoin=e.strokeJoin||"miter";t.miterLimit=e.strokeMiterLimit||10;if(t.setLineDash){t.setLineDash(e.strokeDash||$_);t.lineDashOffset=e.strokeDashOffset||0}return true}else{return false}}function q_(t,e){return t.zindex-e.zindex||t.index-e.index}function I_(t){if(!t.zdirty)return t.zitems;var e=t.items,n=[],i,r,o;for(r=0,o=e.length;r<o;++r){i=e[r];i.index=r;if(i.zindex)n.push(i)}t.zdirty=false;return t.zitems=n.sort(q_)}function L_(t,e){var n=t.items,i,r;if(!n||!n.length)return;const o=I_(t);if(o&&o.length){for(i=0,r=n.length;i<r;++i){if(!n[i].zindex)e(n[i])}n=o}for(i=0,r=n.length;i<r;++i){e(n[i])}}function F_(t,e){var n=t.items,i,r;if(!n||!n.length)return null;const o=I_(t);if(o&&o.length)n=o;for(r=n.length;--r>=0;){if(i=e(n[r]))return i}if(n===o){for(n=t.items,r=n.length;--r>=0;){if(!n[r].zindex){if(i=e(n[r]))return i}}}return null}function j_(t){return function(e,n,i){L_(n,(n=>{if(!i||i.intersects(n.bounds)){X_(t,e,n,n)}}))}}function W_(t){return function(e,n,i){if(n.items.length&&(!i||i.intersects(n.bounds))){X_(t,e,n.items[0],n.items)}}}function X_(t,e,n,i){var r=n.opacity==null?1:n.opacity;if(r===0)return;if(t(e,i))return;N_(e,n);if(n.fill&&U_(e,n,r)){e.fill()}if(n.stroke&&P_(e,n,r)){e.stroke()}}function H_(t){t=t||m.yb;return function(e,n,i,r,o,s){i*=e.pixelRatio;r*=e.pixelRatio;return F_(n,(n=>{const a=n.bounds;if(a&&!a.contains(o,s)||!a)return;if(t(e,n,i,r,o,s))return n}))}}function B_(t,e){return function(n,i,r,o){var s=Array.isArray(i)?i[0]:i,a=e==null?s.fill:e,l=s.stroke&&n.isPointInStroke,u,c;if(l){u=s.strokeWidth;c=s.strokeCap;n.lineWidth=u!=null?u:1;n.lineCap=c!=null?c:"butt"}return t(n,i)?false:a&&n.isPointInPath(r,o)||l&&n.isPointInStroke(r,o)}}function Y_(t){return H_(B_(t))}function J_(t,e){return"translate("+t+","+e+")"}function G_(t){return"rotate("+t+")"}function V_(t,e){return"scale("+t+","+e+")"}function K_(t){return J_(t.x||0,t.y||0)}function Z_(t){return J_(t.x||0,t.y||0)+(t.angle?" "+G_(t.angle):"")}function Q_(t){return J_(t.x||0,t.y||0)+(t.angle?" "+G_(t.angle):"")+(t.scaleX||t.scaleY?" "+V_(t.scaleX||1,t.scaleY||1):"")}function tx(t,e,n){function i(t,n){t("transform",Z_(n));t("d",e(null,n))}function r(t,n){e(v_(t,n.angle),n);return Qv(t,n).translate(n.x||0,n.y||0)}function o(t,n){var i=n.x||0,r=n.y||0,o=n.angle||0;t.translate(i,r);if(o)t.rotate(o*=Oy);t.beginPath();e(t,n);if(o)t.rotate(-o);t.translate(-i,-r)}return{type:t,tag:"path",nested:false,attr:i,bound:r,draw:j_(o),pick:Y_(o),isect:n||S_(o)}}var ex=tx("arc",Pv);function nx(t,e){var n=t[0].orient==="horizontal"?e[1]:e[0],i=t[0].orient==="horizontal"?"y":"x",r=t.length,o=+Infinity,s,a;while(--r>=0){if(t[r].defined===false)continue;a=Math.abs(t[r][i]-n);if(a<o){o=a;s=t[r]}}return s}function ix(t,e){var n=Math.pow(t[0].strokeWidth||1,2),i=t.length,r,o,s;while(--i>=0){if(t[i].defined===false)continue;r=t[i].x-e[0];o=t[i].y-e[1];s=r*r+o*o;if(s<n)return t[i]}return null}function rx(t,e){var n=t.length,i,r,o;while(--n>=0){if(t[n].defined===false)continue;i=t[n].x-e[0];r=t[n].y-e[1];o=i*i+r*r;i=t[n].size||1;if(o<i*i)return t[n]}return null}function ox(t,e,n){function i(t,n){var i=n.mark.items;if(i.length)t("d",e(null,i))}function r(t,n){var i=n.items;if(i.length===0){return t}else{e(v_(t),i);return Qv(t,i[0])}}function o(t,n){t.beginPath();e(t,n)}const s=B_(o);function a(t,e,n,i,r,o){var a=e.items,l=e.bounds;if(!a||!a.length||l&&!l.contains(r,o)){return null}n*=t.pixelRatio;i*=t.pixelRatio;return s(t,a,n,i)?a[0]:null}return{type:t,tag:"path",nested:true,attr:i,bound:r,draw:W_(o),pick:a,isect:E_,tip:n}}var sx=ox("area",qv,nx);function ax(t,e){var n=e.clip;t.save();if((0,m.mf)(n)){t.beginPath();n(t);t.clip()}else{lx(t,e.group)}}function lx(t,e){t.beginPath();$v(e)?Lv(t,e,0,0):t.rect(0,0,e.width||0,e.height||0);t.clip()}function ux(t){const e=z_(t.strokeWidth,1);return t.strokeOffset!=null?t.strokeOffset:t.stroke&&e>.5&&e<1.5?.5-Math.abs(e-1):0}function cx(t,e){t("transform",K_(e))}function fx(t,e){const n=ux(e);t("d",Lv(null,e,n,n))}function hx(t,e){t("class","background");t("aria-hidden",true);fx(t,e)}function dx(t,e){t("class","foreground");t("aria-hidden",true);if(e.strokeForeground){fx(t,e)}else{t("d","")}}function px(t,e,n){const i=e.clip?Bv(n,e,e):null;t("clip-path",i)}function mx(t,e){if(!e.clip&&e.items){const n=e.items,i=n.length;for(let e=0;e<i;++e){t.union(n[e].bounds)}}if((e.clip||e.width||e.height)&&!e.noBound){t.add(0,0).add(e.width||0,e.height||0)}Qv(t,e);return t.translate(e.x||0,e.y||0)}function gx(t,e,n,i){const r=ux(e);t.beginPath();Lv(t,e,(n||0)+r,(i||0)+r)}const yx=B_(gx);const vx=B_(gx,false);const _x=B_(gx,true);function xx(t,e,n){L_(e,(e=>{const i=e.x||0,r=e.y||0,o=e.strokeForeground,s=e.opacity==null?1:e.opacity;if((e.stroke||e.fill)&&s){gx(t,e,i,r);N_(t,e);if(e.fill&&U_(t,e,s)){t.fill()}if(e.stroke&&!o&&P_(t,e,s)){t.stroke()}}t.save();t.translate(i,r);if(e.clip)lx(t,e);if(n)n.translate(-i,-r);L_(e,(e=>{this.draw(t,e,n)}));if(n)n.translate(i,r);t.restore();if(o&&e.stroke&&s){gx(t,e,i,r);N_(t,e);if(P_(t,e,s)){t.stroke()}}}))}function bx(t,e,n,i,r,o){if(e.bounds&&!e.bounds.contains(r,o)||!e.items){return null}const s=n*t.pixelRatio,a=i*t.pixelRatio;return F_(e,(l=>{let u,c,f;const h=l.bounds;if(h&&!h.contains(r,o))return;c=l.x||0;f=l.y||0;const d=c+(l.width||0),p=f+(l.height||0),m=l.clip;if(m&&(r<c||r>d||o<f||o>p))return;t.save();t.translate(c,f);c=r-c;f=o-f;if(m&&$v(l)&&!_x(t,l,s,a)){t.restore();return null}const g=l.strokeForeground,y=e.interactive!==false;if(y&&g&&l.stroke&&vx(t,l,s,a)){t.restore();return l}u=F_(l,(t=>wx(t,c,f)?this.pick(t,n,i,c,f):null));if(!u&&y&&(l.fill||!g&&l.stroke)&&yx(t,l,s,a)){u=l}t.restore();return u||null}))}function wx(t,e,n){return(t.interactive!==false||t.marktype==="group")&&t.bounds&&t.bounds.contains(e,n)}var kx={type:"group",tag:"g",nested:false,attr:cx,bound:mx,draw:xx,pick:bx,isect:T_,content:px,background:hx,foreground:dx};var Mx={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"};function Sx(t,e){var n=t.image;if(!n||t.url&&t.url!==n.url){n={complete:false,width:0,height:0};e.loadImage(t.url).then((e=>{t.image=e;t.image.url=t.url}))}return n}function Ex(t,e){return t.width!=null?t.width:!e||!e.width?0:t.aspect!==false&&t.height?t.height*e.width/e.height:e.width}function Tx(t,e){return t.height!=null?t.height:!e||!e.height?0:t.aspect!==false&&t.width?t.width*e.height/e.width:e.height}function Dx(t,e){return t==="center"?e/2:t==="right"?e:0}function Ax(t,e){return t==="middle"?e/2:t==="bottom"?e:0}function Nx(t,e,n){const i=Sx(e,n),r=Ex(e,i),o=Tx(e,i),s=(e.x||0)-Dx(e.align,r),a=(e.y||0)-Ax(e.baseline,o),l=!i.src&&i.toDataURL?i.toDataURL():i.src||"";t("href",l,Mx["xmlns:xlink"],"xlink:href");t("transform",J_(s,a));t("width",r);t("height",o);t("preserveAspectRatio",e.aspect===false?"none":"xMidYMid")}function zx(t,e){const n=e.image,i=Ex(e,n),r=Tx(e,n),o=(e.x||0)-Dx(e.align,i),s=(e.y||0)-Ax(e.baseline,r);return t.set(o,s,o+i,s+r)}function Rx(t,e,n){L_(e,(e=>{if(n&&!n.intersects(e.bounds))return;const i=Sx(e,this);let r=Ex(e,i);let o=Tx(e,i);if(r===0||o===0)return;let s=(e.x||0)-Dx(e.align,r),a=(e.y||0)-Ax(e.baseline,o),l,u,c,f;if(e.aspect!==false){u=i.width/i.height;c=e.width/e.height;if(u===u&&c===c&&u!==c){if(c<u){f=r/u;a+=(o-f)/2;o=f}else{f=o*u;s+=(r-f)/2;r=f}}}if(i.complete||i.toDataURL){N_(t,e);t.globalAlpha=(l=e.opacity)!=null?l:1;t.imageSmoothingEnabled=e.smooth!==false;t.drawImage(i,s,a,r,o)}}))}var Cx={type:"image",tag:"image",nested:false,attr:Nx,bound:zx,draw:Rx,pick:H_(),isect:m.yb,get:Sx,xOffset:Dx,yOffset:Ax};var Ox=ox("line",Iv,ix);function Ux(t,e){var n=e.scaleX||1,i=e.scaleY||1;if(n!==1||i!==1){t("vector-effect","non-scaling-stroke")}t("transform",Q_(e));t("d",e.path)}function $x(t,e){var n=e.path;if(n==null)return true;var i=e.x||0,r=e.y||0,o=e.scaleX||1,s=e.scaleY||1,a=(e.angle||0)*Oy,l=e.pathCache;if(!l||l.path!==n){(e.pathCache=l=Ry(n)).path=n}if(a&&t.rotate&&t.translate){t.translate(i,r);t.rotate(a);By(t,l,0,0,o,s);t.rotate(-a);t.translate(-i,-r)}else{By(t,l,i,r,o,s)}}function Px(t,e){return $x(v_(t,e.angle),e)?t.set(0,0,0,0):Qv(t,e,true)}var qx={type:"path",tag:"path",nested:false,attr:Ux,bound:Px,draw:j_($x),pick:Y_($x),isect:S_($x)};function Ix(t,e){t("d",Lv(null,e))}function Lx(t,e){var n,i;return Qv(t.set(n=e.x||0,i=e.y||0,n+e.width||0,i+e.height||0),e)}function Fx(t,e){t.beginPath();Lv(t,e)}var jx={type:"rect",tag:"path",nested:false,attr:Ix,bound:Lx,draw:j_(Fx),pick:Y_(Fx),isect:T_};function Wx(t,e){t("transform",K_(e));t("x2",e.x2!=null?e.x2-(e.x||0):0);t("y2",e.y2!=null?e.y2-(e.y||0):0)}function Xx(t,e){var n,i;return Qv(t.set(n=e.x||0,i=e.y||0,e.x2!=null?e.x2:n,e.y2!=null?e.y2:i),e)}function Hx(t,e,n){var i,r,o,s;if(e.stroke&&P_(t,e,n)){i=e.x||0;r=e.y||0;o=e.x2!=null?e.x2:i;s=e.y2!=null?e.y2:r;t.beginPath();t.moveTo(i,r);t.lineTo(o,s);return true}return false}function Bx(t,e,n){L_(e,(e=>{if(n&&!n.intersects(e.bounds))return;var i=e.opacity==null?1:e.opacity;if(i&&Hx(t,e,i)){N_(t,e);t.stroke()}}))}function Yx(t,e,n,i){if(!t.isPointInStroke)return false;return Hx(t,e,1)&&t.isPointInStroke(n,i)}var Jx={type:"rule",tag:"line",nested:false,attr:Wx,bound:Xx,draw:Bx,pick:H_(Yx),isect:D_};var Gx=tx("shape",Fv);var Vx=tx("symbol",jv,E_);const Kx=(0,m.$m)();var Zx={height:rb,measureWidth:nb,estimateWidth:tb,width:tb,canvas:Qx};Qx(true);function Qx(t){Zx.width=t&&k_?nb:tb}function tb(t,e){return eb(ub(t,e),rb(t))}function eb(t,e){return~~(.8*t.length*e)}function nb(t,e){return rb(t)<=0||!(e=ub(t,e))?0:ib(e,db(t))}function ib(t,e){const n="(".concat(e,") ").concat(t);let i=Kx.get(n);if(i===undefined){k_.font=e;i=k_.measureText(t).width;Kx.set(n,i)}return i}function rb(t){return t.fontSize!=null?+t.fontSize||0:11}function ob(t){return t.lineHeight!=null?t.lineHeight:rb(t)+2}function sb(t){return(0,m.kJ)(t)?t.length>1?t:t[0]:t}function ab(t){return sb(t.lineBreak&&t.text&&!(0,m.kJ)(t.text)?t.text.split(t.lineBreak):t.text)}function lb(t){const e=ab(t);return((0,m.kJ)(e)?e.length-1:0)*ob(t)}function ub(t,e){const n=e==null?"":(e+"").trim();return t.limit>0&&n.length?fb(t,n):n}function cb(t){if(Zx.width===nb){const e=db(t);return t=>ib(t,e)}else{const e=rb(t);return t=>eb(t,e)}}function fb(t,e){var n=+t.limit,i=cb(t);if(i(e)<n)return e;var r=t.ellipsis||"…",o=t.dir==="rtl",s=0,a=e.length,l;n-=i(r);if(o){while(s<a){l=s+a>>>1;if(i(e.slice(l))>n)s=l+1;else a=l}return r+e.slice(s)}else{while(s<a){l=1+(s+a>>>1);if(i(e.slice(0,l))<n)s=l;else a=l-1}return e.slice(0,s)+r}}function hb(t,e){var n=t.font;return(e&&n?String(n).replace(/"/g,"'"):n)||"sans-serif"}function db(t,e){return""+(t.fontStyle?t.fontStyle+" ":"")+(t.fontVariant?t.fontVariant+" ":"")+(t.fontWeight?t.fontWeight+" ":"")+rb(t)+"px "+hb(t,e)}function pb(t){var e=t.baseline,n=rb(t);return Math.round(e==="top"?.79*n:e==="middle"?.3*n:e==="bottom"?-.21*n:e==="line-top"?.29*n+.5*ob(t):e==="line-bottom"?.29*n-.5*ob(t):0)}const mb={left:"start",center:"middle",right:"end"};const gb=new Yv;function yb(t){var e=t.x||0,n=t.y||0,i=t.radius||0,r;if(i){r=(t.theta||0)-$y;e+=i*Math.cos(r);n+=i*Math.sin(r)}gb.x1=e;gb.y1=n;return gb}function vb(t,e){var n=e.dx||0,i=(e.dy||0)+pb(e),r=yb(e),o=r.x1,s=r.y1,a=e.angle||0,l;t("text-anchor",mb[e.align]||"start");if(a){l=J_(o,s)+" "+G_(a);if(n||i)l+=" "+J_(n,i)}else{l=J_(o+n,s+i)}t("transform",l)}function _b(t,e,n){var i=Zx.height(e),r=e.align,o=yb(e),s=o.x1,a=o.y1,l=e.dx||0,u=(e.dy||0)+pb(e)-Math.round(.8*i),c=ab(e),f;if((0,m.kJ)(c)){i+=ob(e)*(c.length-1);f=c.reduce(((t,n)=>Math.max(t,Zx.width(e,n))),0)}else{f=Zx.width(e,c)}if(r==="center"){l-=f/2}else if(r==="right"){l-=f}else;t.set(l+=s,u+=a,l+f,u+i);if(e.angle&&!n){t.rotate(e.angle*Oy,s,a)}else if(n===2){return t.rotatedPoints(e.angle*Oy,s,a)}return t}function xb(t,e,n){L_(e,(e=>{var i=e.opacity==null?1:e.opacity,r,o,s,a,l,u,c;if(n&&!n.intersects(e.bounds)||i===0||e.fontSize<=0||e.text==null||e.text.length===0)return;t.font=db(e);t.textAlign=e.align||"left";r=yb(e);o=r.x1,s=r.y1;if(e.angle){t.save();t.translate(o,s);t.rotate(e.angle*Oy);o=s=0}o+=e.dx||0;s+=(e.dy||0)+pb(e);u=ab(e);N_(t,e);if((0,m.kJ)(u)){l=ob(e);for(a=0;a<u.length;++a){c=ub(e,u[a]);if(e.fill&&U_(t,e,i)){t.fillText(c,o,s)}if(e.stroke&&P_(t,e,i)){t.strokeText(c,o,s)}s+=l}}else{c=ub(e,u);if(e.fill&&U_(t,e,i)){t.fillText(c,o,s)}if(e.stroke&&P_(t,e,i)){t.strokeText(c,o,s)}}if(e.angle)t.restore()}))}function bb(t,e,n,i,r,o){if(e.fontSize<=0)return false;if(!e.angle)return true;var s=yb(e),a=s.x1,l=s.y1,u=_b(gb,e,1),c=-e.angle*Oy,f=Math.cos(c),h=Math.sin(c),d=f*r-h*o+(a-f*a+h*l),p=h*r+f*o+(l-h*a-f*l);return u.contains(d,p)}function wb(t,e){const n=_b(gb,t,2);return A_(e,n[0],n[1],n[2],n[3])||A_(e,n[0],n[1],n[4],n[5])||A_(e,n[4],n[5],n[6],n[7])||A_(e,n[2],n[3],n[6],n[7])}var kb={type:"text",tag:"text",nested:false,attr:vb,bound:_b,draw:xb,pick:H_(bb),isect:wb};var Mb=ox("trail",Wv,rx);var Sb={arc:ex,area:sx,group:kx,image:Cx,line:Ox,path:qx,rect:jx,rule:Jx,shape:Gx,symbol:Vx,text:kb,trail:Mb};function Eb(t,e,n){var i=Sb[t.mark.marktype],r=e||i.bound;if(i.nested)t=t.mark;return r(t.bounds||(t.bounds=new Yv),t,n)}var Tb={mark:null};function Db(t,e,n){var i=Sb[t.marktype],r=i.bound,o=t.items,s=o&&o.length,a,l,u,c;if(i.nested){if(s){u=o[0]}else{Tb.mark=t;u=Tb}c=Eb(u,r,n);e=e&&e.union(c)||c;return e}e=e||t.bounds&&t.bounds.clear()||new Yv;if(s){for(a=0,l=o.length;a<l;++a){e.union(Eb(o[a],r,n))}}return t.bounds=e}const Ab=["marktype","name","role","interactive","clip","items","zindex","x","y","width","height","align","baseline","fill","fillOpacity","opacity","blend","stroke","strokeOpacity","strokeWidth","strokeCap","strokeDash","strokeDashOffset","strokeForeground","strokeOffset","startAngle","endAngle","innerRadius","outerRadius","cornerRadius","padAngle","cornerRadiusTopLeft","cornerRadiusTopRight","cornerRadiusBottomLeft","cornerRadiusBottomRight","interpolate","tension","orient","defined","url","aspect","smooth","path","scaleX","scaleY","x2","y2","size","shape","text","angle","theta","radius","dir","dx","dy","ellipsis","limit","lineBreak","lineHeight","font","fontSize","fontWeight","fontStyle","fontVariant","description","aria","ariaRole","ariaRoleDescription"];function Nb(t,e){return JSON.stringify(t,Ab,e)}function zb(t){const e=typeof t==="string"?JSON.parse(t):t;return Rb(e)}function Rb(t){var e=t.marktype,n=t.items,i,r,o;if(n){for(r=0,o=n.length;r<o;++r){i=e?"mark":"group";n[r][i]=t;if(n[r].zindex)n[r][i].zdirty=true;if("group"===(e||i))Rb(n[r])}}if(e)Db(t);return t}function Cb(t){if(arguments.length){this.root=zb(t)}else{this.root=Ob({marktype:"group",name:"root",role:"frame"});this.root.items=[new Gv(this.root)]}}Cb.prototype={toJSON(t){return Nb(this.root,t||0)},mark(t,e,n){e=e||this.root.items[0];const i=Ob(t,e);e.items[n]=i;if(i.zindex)i.group.zdirty=true;return i}};function Ob(t,e){const n={bounds:new Yv,clip:!!t.clip,group:e,interactive:t.interactive===false?false:true,items:[],marktype:t.marktype,name:t.name||undefined,role:t.role||undefined,zindex:t.zindex||0};if(t.aria!=null){n.aria=t.aria}if(t.description){n.description=t.description}return n}function Ub(t,e,n){if(!t&&typeof document!=="undefined"&&document.createElement){t=document}return t?n?t.createElementNS(n,e):t.createElement(e):null}function $b(t,e){e=e.toLowerCase();var n=t.childNodes,i=0,r=n.length;for(;i<r;++i)if(n[i].tagName.toLowerCase()===e){return n[i]}}function Pb(t,e,n,i){var r=t.childNodes[e],o;if(!r||r.tagName.toLowerCase()!==n.toLowerCase()){o=r||null;r=Ub(t.ownerDocument,n,i);t.insertBefore(r,o)}return r}function qb(t,e){var n=t.childNodes,i=n.length;while(i>e)t.removeChild(n[--i]);return t}function Ib(t){return"mark-"+t.marktype+(t.role?" role-"+t.role:"")+(t.name?" "+t.name:"")}function Lb(t,e){const n=e.getBoundingClientRect();return[t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0)]}function Fb(t,e,n,i){var r=t&&t.mark,o,s;if(r&&(o=Sb[r.marktype]).tip){s=Lb(e,n);s[0]-=i[0];s[1]-=i[1];while(t=t.mark.group){s[0]-=t.x||0;s[1]-=t.y||0}t=o.tip(r.items,s)}return t}function jb(t,e){this._active=null;this._handlers={};this._loader=t||fo();this._tooltip=e||Wb}function Wb(t,e,n,i){t.element().setAttribute("title",i||"")}jb.prototype={initialize(t,e,n){this._el=t;this._obj=n||null;return this.origin(e)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},origin(t){if(arguments.length){this._origin=t||[0,0];return this}else{return this._origin.slice()}},scene(t){if(!arguments.length)return this._scene;this._scene=t;return this},on(){},off(){},_handlerIndex(t,e,n){for(let i=t?t.length:0;--i>=0;){if(t[i].type===e&&(!n||t[i].handler===n)){return i}}return-1},handlers(t){const e=this._handlers,n=[];if(t){n.push(...e[this.eventName(t)])}else{for(const t in e){n.push(...e[t])}}return n},eventName(t){const e=t.indexOf(".");return e<0?t:t.slice(0,e)},handleHref(t,e,n){this._loader.sanitize(n,{context:"href"}).then((e=>{const n=new MouseEvent(t.type,t),i=Ub(null,"a");for(const t in e)i.setAttribute(t,e[t]);i.dispatchEvent(n)})).catch((()=>{}))},handleTooltip(t,e,n){if(e&&e.tooltip!=null){e=Fb(e,t,this.canvas(),this._origin);const i=n&&e&&e.tooltip||null;this._tooltip.call(this._obj,this,t,e,i)}},getItemBoundingClientRect(t){const e=this.canvas();if(!e)return;const n=e.getBoundingClientRect(),i=this._origin,r=t.bounds,o=r.width(),s=r.height();let a=r.x1+i[0]+n.left,l=r.y1+i[1]+n.top;while(t.mark&&(t=t.mark.group)){a+=t.x||0;l+=t.y||0}return{x:a,y:l,width:o,height:s,left:a,top:l,right:a+o,bottom:l+s}}};function Xb(t){this._el=null;this._bgcolor=null;this._loader=new Vv(t)}Xb.prototype={initialize(t,e,n,i,r){this._el=t;return this.resize(e,n,i,r)},element(){return this._el},canvas(){return this._el&&this._el.firstChild},background(t){if(arguments.length===0)return this._bgcolor;this._bgcolor=t;return this},resize(t,e,n,i){this._width=t;this._height=e;this._origin=n||[0,0];this._scale=i||1;return this},dirty(){},render(t){const e=this;e._call=function(){e._render(t)};e._call();e._call=null;return e},_render(){},renderAsync(t){const e=this.render(t);return this._ready?this._ready.then((()=>e)):Promise.resolve(e)},_load(t,e){var n=this,i=n._loader[t](e);if(!n._ready){const t=n._call;n._ready=n._loader.ready().then((e=>{if(e)t();n._ready=null}))}return i},sanitizeURL(t){return this._load("sanitizeURL",t)},loadImage(t){return this._load("loadImage",t)}};const Hb="keydown";const Bb="keypress";const Yb="keyup";const Jb="dragenter";const Gb="dragleave";const Vb="dragover";const Kb="mousedown";const Zb="mouseup";const Qb="mousemove";const tw="mouseout";const ew="mouseover";const nw="click";const iw="dblclick";const rw="wheel";const ow="mousewheel";const sw="touchstart";const aw="touchmove";const lw="touchend";const uw=[Hb,Bb,Yb,Jb,Gb,Vb,Kb,Zb,Qb,tw,ew,nw,iw,rw,ow,sw,aw,lw];const cw=Qb;const fw=tw;const hw=nw;function dw(t,e){jb.call(this,t,e);this._down=null;this._touch=null;this._first=true;this._events={}}const pw=t=>t===sw||t===aw||t===lw?[sw,aw,lw]:[t];function mw(t,e){pw(e).forEach((e=>gw(t,e)))}function gw(t,e){const n=t.canvas();if(n&&!t._events[e]){t._events[e]=1;n.addEventListener(e,t[e]?n=>t[e](n):n=>t.fire(e,n))}}function yw(t,e,n){return function(i){const r=this._active,o=this.pickEvent(i);if(o===r){this.fire(t,i)}else{if(!r||!r.exit){this.fire(n,i)}this._active=o;this.fire(e,i);this.fire(t,i)}}}function vw(t){return function(e){this.fire(t,e);this._active=null}}(0,m.XW)(dw,jb,{initialize(t,e,n){this._canvas=t&&$b(t,"canvas");[nw,Kb,Qb,tw,Gb].forEach((t=>mw(this,t)));return jb.prototype.initialize.call(this,t,e,n)},canvas(){return this._canvas},context(){return this._canvas.getContext("2d")},events:uw,DOMMouseScroll(t){this.fire(ow,t)},mousemove:yw(Qb,ew,tw),dragover:yw(Vb,Jb,Gb),mouseout:vw(tw),dragleave:vw(Gb),mousedown(t){this._down=this._active;this.fire(Kb,t)},click(t){if(this._down===this._active){this.fire(nw,t);this._down=null}},touchstart(t){this._touch=this.pickEvent(t.changedTouches[0]);if(this._first){this._active=this._touch;this._first=false}this.fire(sw,t,true)},touchmove(t){this.fire(aw,t,true)},touchend(t){this.fire(lw,t,true);this._touch=null},fire(t,e,n){const i=n?this._touch:this._active,r=this._handlers[t];e.vegaType=t;if(t===hw&&i&&i.href){this.handleHref(e,i,i.href)}else if(t===cw||t===fw){this.handleTooltip(e,i,t!==fw)}if(r){for(let t=0,n=r.length;t<n;++t){r[t].handler.call(this._obj,e,i)}}},on(t,e){const n=this.eventName(t),i=this._handlers,r=this._handlerIndex(i[n],t,e);if(r<0){mw(this,t);(i[n]||(i[n]=[])).push({type:t,handler:e})}return this},off(t,e){const n=this.eventName(t),i=this._handlers[n],r=this._handlerIndex(i,t,e);if(r>=0){i.splice(r,1)}return this},pickEvent(t){const e=Lb(t,this._canvas),n=this._origin;return this.pick(this._scene,e[0],e[1],e[0]-n[0],e[1]-n[1])},pick(t,e,n,i,r){const o=this.context(),s=Sb[t.marktype];return s.pick.call(this,o,t,e,n,i,r)}});function _w(){return typeof window!=="undefined"?window.devicePixelRatio||1:1}var xw=_w();function bw(t,e,n,i,r,o){const s=typeof HTMLElement!=="undefined"&&t instanceof HTMLElement&&t.parentNode!=null,a=t.getContext("2d"),l=s?xw:r;t.width=e*l;t.height=n*l;for(const u in o){a[u]=o[u]}if(s&&l!==1){t.style.width=e+"px";t.style.height=n+"px"}a.pixelRatio=l;a.setTransform(l,0,0,l,l*i[0],l*i[1]);return t}function ww(t){Xb.call(this,t);this._options={};this._redraw=false;this._dirty=new Yv;this._tempb=new Yv}const kw=Xb.prototype;const Mw=(t,e,n)=>(new Yv).set(0,0,e,n).translate(-t[0],-t[1]);function Sw(t,e,n){e.expand(1).round();if(t.pixelRatio%1){e.scale(t.pixelRatio).round().scale(1/t.pixelRatio)}e.translate(-(n[0]%1),-(n[1]%1));t.beginPath();t.rect(e.x1,e.y1,e.width(),e.height());t.clip();return e}(0,m.XW)(ww,Xb,{initialize(t,e,n,i,r,o){this._options=o||{};this._canvas=this._options.externalContext?null:Vf(1,1,this._options.type);if(t&&this._canvas){qb(t,0).appendChild(this._canvas);this._canvas.setAttribute("class","marks")}return kw.initialize.call(this,t,e,n,i,r)},resize(t,e,n,i){kw.resize.call(this,t,e,n,i);if(this._canvas){bw(this._canvas,this._width,this._height,this._origin,this._scale,this._options.context)}else{const t=this._options.externalContext;if(!t)(0,m.vU)("CanvasRenderer is missing a valid canvas or context");t.scale(this._scale,this._scale);t.translate(this._origin[0],this._origin[1])}this._redraw=true;return this},canvas(){return this._canvas},context(){return this._options.externalContext||(this._canvas?this._canvas.getContext("2d"):null)},dirty(t){const e=this._tempb.clear().union(t.bounds);let n=t.mark.group;while(n){e.translate(n.x||0,n.y||0);n=n.mark.group}this._dirty.union(e)},_render(t){const e=this.context(),n=this._origin,i=this._width,r=this._height,o=this._dirty,s=Mw(n,i,r);e.save();const a=this._redraw||o.empty()?(this._redraw=false,s.expand(1)):Sw(e,s.intersect(o),n);this.clear(-n[0],-n[1],i,r);this.draw(e,t,a);e.restore();o.clear();return this},draw(t,e,n){const i=Sb[e.marktype];if(e.clip)ax(t,e);i.draw.call(this,t,e,n);if(e.clip)t.restore()},clear(t,e,n,i){const r=this._options,o=this.context();if(r.type!=="pdf"&&!r.externalContext){o.clearRect(t,e,n,i)}if(this._bgcolor!=null){o.fillStyle=this._bgcolor;o.fillRect(t,e,n,i)}}});function Ew(t,e){jb.call(this,t,e);const n=this;n._hrefHandler=Tw(n,((t,e)=>{if(e&&e.href)n.handleHref(t,e,e.href)}));n._tooltipHandler=Tw(n,((t,e)=>{n.handleTooltip(t,e,t.type!==fw)}))}const Tw=(t,e)=>n=>{let i=n.target.__data__;i=Array.isArray(i)?i[0]:i;n.vegaType=n.type;e.call(t._obj,n,i)};(0,m.XW)(Ew,jb,{initialize(t,e,n){let i=this._svg;if(i){i.removeEventListener(hw,this._hrefHandler);i.removeEventListener(cw,this._tooltipHandler);i.removeEventListener(fw,this._tooltipHandler)}this._svg=i=t&&$b(t,"svg");if(i){i.addEventListener(hw,this._hrefHandler);i.addEventListener(cw,this._tooltipHandler);i.addEventListener(fw,this._tooltipHandler)}return jb.prototype.initialize.call(this,t,e,n)},canvas(){return this._svg},on(t,e){const n=this.eventName(t),i=this._handlers,r=this._handlerIndex(i[n],t,e);if(r<0){const r={type:t,handler:e,listener:Tw(this,e)};(i[n]||(i[n]=[])).push(r);if(this._svg){this._svg.addEventListener(n,r.listener)}}return this},off(t,e){const n=this.eventName(t),i=this._handlers[n],r=this._handlerIndex(i,t,e);if(r>=0){if(this._svg){this._svg.removeEventListener(n,i[r].listener)}i.splice(r,1)}return this}});const Dw="aria-hidden";const Aw="aria-label";const Nw="role";const zw="aria-roledescription";const Rw="graphics-object";const Cw="graphics-symbol";const Ow=(t,e,n)=>({[Nw]:t,[zw]:e,[Aw]:n||undefined});const Uw=(0,m.Rg)(["axis-domain","axis-grid","axis-label","axis-tick","axis-title","legend-band","legend-entry","legend-gradient","legend-label","legend-title","legend-symbol","title"]);const $w={axis:{desc:"axis",caption:Ww},legend:{desc:"legend",caption:Xw},"title-text":{desc:"title",caption:t=>"Title text '".concat(jw(t),"'")},"title-subtitle":{desc:"subtitle",caption:t=>"Subtitle text '".concat(jw(t),"'")}};const Pw={ariaRole:Nw,ariaRoleDescription:zw,description:Aw};function qw(t,e){const n=e.aria===false;t(Dw,n||undefined);if(n||e.description==null){for(const e in Pw){t(Pw[e],undefined)}}else{const n=e.mark.marktype;t(Aw,e.description);t(Nw,e.ariaRole||(n==="group"?Rw:Cw));t(zw,e.ariaRoleDescription||"".concat(n," mark"))}}function Iw(t){return t.aria===false?{[Dw]:true}:Uw[t.role]?null:$w[t.role]?Fw(t,$w[t.role]):Lw(t)}function Lw(t){const e=t.marktype;const n=e==="group"||e==="text"||t.items.some((t=>t.description!=null&&t.aria!==false));return Ow(n?Rw:Cw,"".concat(e," mark container"),t.description)}function Fw(t,e){try{const n=t.items[0],i=e.caption||(()=>"");return Ow(e.role||Cw,e.desc,n.description||i(n))}catch(n){return null}}function jw(t){return(0,m.IX)(t.text).join(" ")}function Ww(t){const e=t.datum,n=t.orient,i=e.title?Hw(t):null,r=t.context,o=r.scales[e.scale].value,s=r.dataflow.locale(),a=o.type,l=n==="left"||n==="right"?"Y":"X";return"".concat(l,"-axis")+(i?" titled '".concat(i,"'"):"")+" for a ".concat(Sg(a)?"discrete":a," scale")+" with ".concat(yy(s,o,t))}function Xw(t){const e=t.datum,n=e.title?Hw(t):null,i="".concat(e.type||""," legend").trim(),r=e.scales,o=Object.keys(r),s=t.context,a=s.scales[r[o[0]]].value,l=s.dataflow.locale();return Yw(i)+(n?" titled '".concat(n,"'"):"")+" for ".concat(Bw(o))+" with ".concat(yy(l,a,t))}function Hw(t){try{return(0,m.IX)((0,m.fj)(t.items).items[0].text).join(" ")}catch(e){return null}}function Bw(t){t=t.map((t=>t+(t==="fill"||t==="stroke"?" color":"")));return t.length<2?t[0]:t.slice(0,-1).join(", ")+" and "+(0,m.fj)(t)}function Yw(t){return t.length?t[0].toUpperCase()+t.slice(1):t}const Jw=t=>(t+"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">");const Gw=t=>Jw(t).replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
");function Vw(){let t="",e="",n="";const i=[],r=()=>e=n="",o=o=>{if(e){t+="".concat(e,">").concat(n);r()}i.push(o)},s=(t,n)=>{if(n!=null)e+=" ".concat(t,'="').concat(Gw(n),'"');return a},a={open(t){o(t);e="<"+t;for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++){i[r-1]=arguments[r]}for(const e of i){for(const t in e)s(t,e[t])}return a},close(){const o=i.pop();if(e){t+=e+(n?">".concat(n,"</").concat(o,">"):"/>")}else{t+="</".concat(o,">")}r();return a},attr:s,text:t=>(n+=Jw(t),a),toString:()=>t};return a}const Kw=t=>Zw(Vw(),t)+"";function Zw(t,e){t.open(e.tagName);if(e.hasAttributes()){const n=e.attributes,i=n.length;for(let e=0;e<i;++e){t.attr(n[e].name,n[e].value)}}if(e.hasChildNodes()){const n=e.childNodes;for(const e of n){e.nodeType===3?t.text(e.nodeValue):Zw(t,e)}}return t.close()}const Qw={fill:"fill",fillOpacity:"fill-opacity",stroke:"stroke",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",strokeCap:"stroke-linecap",strokeJoin:"stroke-linejoin",strokeDash:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeMiterLimit:"stroke-miterlimit",opacity:"opacity"};const tk={blend:"mix-blend-mode"};const ek={fill:"none","stroke-miterlimit":10};const nk=0,ik="http://www.w3.org/2000/xmlns/",rk=Mx.xmlns;function ok(t){Xb.call(this,t);this._dirtyID=0;this._dirty=[];this._svg=null;this._root=null;this._defs=null}const sk=Xb.prototype;(0,m.XW)(ok,Xb,{initialize(t,e,n,i,r){this._defs={};this._clearDefs();if(t){this._svg=Pb(t,0,"svg",rk);this._svg.setAttributeNS(ik,"xmlns",rk);this._svg.setAttributeNS(ik,"xmlns:xlink",Mx["xmlns:xlink"]);this._svg.setAttribute("version",Mx["version"]);this._svg.setAttribute("class","marks");qb(t,1);this._root=Pb(this._svg,nk,"g",rk);vk(this._root,ek);qb(this._svg,nk+1)}this.background(this._bgcolor);return sk.initialize.call(this,t,e,n,i,r)},background(t){if(arguments.length&&this._svg){this._svg.style.setProperty("background-color",t)}return sk.background.apply(this,arguments)},resize(t,e,n,i){sk.resize.call(this,t,e,n,i);if(this._svg){vk(this._svg,{width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 ".concat(this._width," ").concat(this._height)});this._root.setAttribute("transform","translate(".concat(this._origin,")"))}this._dirty=[];return this},canvas(){return this._svg},svg(){const t=this._svg,e=this._bgcolor;if(!t)return null;let n;if(e){t.removeAttribute("style");n=Pb(t,nk,"rect",rk);vk(n,{width:this._width,height:this._height,fill:e})}const i=Kw(t);if(e){t.removeChild(n);this._svg.style.setProperty("background-color",e)}return i},_render(t){if(this._dirtyCheck()){if(this._dirtyAll)this._clearDefs();this.mark(this._root,t);qb(this._root,1)}this.defs();this._dirty=[];++this._dirtyID;return this},dirty(t){if(t.dirty!==this._dirtyID){t.dirty=this._dirtyID;this._dirty.push(t)}},isDirty(t){return this._dirtyAll||!t._svg||!t._svg.ownerSVGElement||t.dirty===this._dirtyID},_dirtyCheck(){this._dirtyAll=true;const t=this._dirty;if(!t.length||!this._dirtyID)return true;const e=++this._dirtyID;let n,i,r,o,s,a,l;for(s=0,a=t.length;s<a;++s){n=t[s];i=n.mark;if(i.marktype!==r){r=i.marktype;o=Sb[r]}if(i.zdirty&&i.dirty!==e){this._dirtyAll=false;ak(n,e);i.items.forEach((t=>{t.dirty=e}))}if(i.zdirty)continue;if(n.exit){if(o.nested&&i.items.length){l=i.items[0];if(l._svg)this._update(o,l._svg,l)}else if(n._svg){l=n._svg.parentNode;if(l)l.removeChild(n._svg)}n._svg=null;continue}n=o.nested?i.items[0]:n;if(n._update===e)continue;if(!n._svg||!n._svg.ownerSVGElement){this._dirtyAll=false;ak(n,e)}else{this._update(o,n._svg,n)}n._update=e}return!this._dirtyAll},mark(t,e,n){if(!this.isDirty(e)){return e._svg}const i=this._svg,r=Sb[e.marktype],o=e.interactive===false?"none":null,s=r.tag==="g";const a=fk(e,t,n,"g",i);a.setAttribute("class",Ib(e));const l=Iw(e);for(const h in l)_k(a,h,l[h]);if(!s){_k(a,"pointer-events",o)}_k(a,"clip-path",e.clip?Bv(this,e,e.group):null);let u=null,c=0;const f=t=>{const e=this.isDirty(t),n=fk(t,a,u,r.tag,i);if(e){this._update(r,n,t);if(s)ck(this,n,t)}u=n;++c};if(r.nested){if(e.items.length)f(e.items[0])}else{L_(e,f)}qb(a,c);return a},_update(t,e,n){dk=e;pk=e.__values__;qw(gk,n);t.attr(gk,n,this);const i=mk[t.type];if(i)i.call(this,t,e,n);if(dk)this.style(dk,n)},style(t,e){if(e==null)return;for(const n in Qw){let i=n==="font"?hb(e):e[n];if(i===pk[n])continue;const r=Qw[n];if(i==null){t.removeAttribute(r)}else{if(by(i)){i=wy(i,this._defs.gradient,bk())}t.setAttribute(r,i+"")}pk[n]=i}for(const n in tk){yk(t,tk[n],e[n])}},defs(){const t=this._svg,e=this._defs;let n=e.el,i=0;for(const r in e.gradient){if(!n)e.el=n=Pb(t,nk+1,"defs",rk);i=lk(n,e.gradient[r],i)}for(const r in e.clipping){if(!n)e.el=n=Pb(t,nk+1,"defs",rk);i=uk(n,e.clipping[r],i)}if(n){i===0?(t.removeChild(n),e.el=null):qb(n,i)}},_clearDefs(){const t=this._defs;t.gradient={};t.clipping={}}});function ak(t,e){for(;t&&t.dirty!==e;t=t.mark.group){t.dirty=e;if(t.mark&&t.mark.dirty!==e){t.mark.dirty=e}else return}}function lk(t,e,n){let i,r,o;if(e.gradient==="radial"){let i=Pb(t,n++,"pattern",rk);vk(i,{id:xy+e.id,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"});i=Pb(i,0,"rect",rk);vk(i,{width:1,height:1,fill:"url(".concat(bk(),"#").concat(e.id,")")});t=Pb(t,n++,"radialGradient",rk);vk(t,{id:e.id,fx:e.x1,fy:e.y1,fr:e.r1,cx:e.x2,cy:e.y2,r:e.r2})}else{t=Pb(t,n++,"linearGradient",rk);vk(t,{id:e.id,x1:e.x1,x2:e.x2,y1:e.y1,y2:e.y2})}for(i=0,r=e.stops.length;i<r;++i){o=Pb(t,i,"stop",rk);o.setAttribute("offset",e.stops[i].offset);o.setAttribute("stop-color",e.stops[i].color)}qb(t,i);return n}function uk(t,e,n){let i;t=Pb(t,n,"clipPath",rk);t.setAttribute("id",e.id);if(e.path){i=Pb(t,0,"path",rk);i.setAttribute("d",e.path)}else{i=Pb(t,0,"rect",rk);vk(i,{x:0,y:0,width:e.width,height:e.height})}qb(t,1);return n+1}function ck(t,e,n){e=e.lastChild.previousSibling;let i,r=0;L_(n,(n=>{i=t.mark(e,n,i);++r}));qb(e,1+r)}function fk(t,e,n,i,r){let o=t._svg,s;if(!o){s=e.ownerDocument;o=Ub(s,i,rk);t._svg=o;if(t.mark){o.__data__=t;o.__values__={fill:"default"};if(i==="g"){const e=Ub(s,"path",rk);o.appendChild(e);e.__data__=t;const n=Ub(s,"g",rk);o.appendChild(n);n.__data__=t;const i=Ub(s,"path",rk);o.appendChild(i);i.__data__=t;i.__values__={fill:"default"}}}}if(o.ownerSVGElement!==r||hk(o,n)){e.insertBefore(o,n?n.nextSibling:e.firstChild)}return o}function hk(t,e){return t.parentNode&&t.parentNode.childNodes.length>1&&t.previousSibling!=e}let dk=null,pk=null;const mk={group(t,e,n){const i=dk=e.childNodes[2];pk=i.__values__;t.foreground(gk,n,this);pk=e.__values__;dk=e.childNodes[1];t.content(gk,n,this);const r=dk=e.childNodes[0];t.background(gk,n,this);const o=n.mark.interactive===false?"none":null;if(o!==pk.events){_k(i,"pointer-events",o);_k(r,"pointer-events",o);pk.events=o}if(n.strokeForeground&&n.stroke){const t=n.fill;_k(i,"display",null);this.style(r,n);_k(r,"stroke",null);if(t)n.fill=null;pk=i.__values__;this.style(i,n);if(t)n.fill=t;dk=null}else{_k(i,"display","none")}},image(t,e,n){if(n.smooth===false){yk(e,"image-rendering","optimizeSpeed");yk(e,"image-rendering","pixelated")}else{yk(e,"image-rendering",null)}},text(t,e,n){const i=ab(n);let r,o,s,a;if((0,m.kJ)(i)){o=i.map((t=>ub(n,t)));r=o.join("\n");if(r!==pk.text){qb(e,0);s=e.ownerDocument;a=ob(n);o.forEach(((t,i)=>{const r=Ub(s,"tspan",rk);r.__data__=n;r.textContent=t;if(i){r.setAttribute("x",0);r.setAttribute("dy",a)}e.appendChild(r)}));pk.text=r}}else{o=ub(n,i);if(o!==pk.text){e.textContent=o;pk.text=o}}_k(e,"font-family",hb(n));_k(e,"font-size",rb(n)+"px");_k(e,"font-style",n.fontStyle);_k(e,"font-variant",n.fontVariant);_k(e,"font-weight",n.fontWeight)}};function gk(t,e,n){if(e===pk[t])return;if(n){xk(dk,t,e,n)}else{_k(dk,t,e)}pk[t]=e}function yk(t,e,n){if(n!==pk[e]){if(n==null){t.style.removeProperty(e)}else{t.style.setProperty(e,n+"")}pk[e]=n}}function vk(t,e){for(const n in e){_k(t,n,e[n])}}function _k(t,e,n){if(n!=null){t.setAttribute(e,n)}else{t.removeAttribute(e)}}function xk(t,e,n,i){if(n!=null){t.setAttributeNS(i,e,n)}else{t.removeAttributeNS(i,e)}}function bk(){let t;return typeof window==="undefined"?"":(t=window.location).hash?t.href.slice(0,-t.hash.length):t.href}function wk(t){Xb.call(this,t);this._text=null;this._defs={gradient:{},clipping:{}}}(0,m.XW)(wk,Xb,{svg(){return this._text},_render(t){const e=Vw();e.open("svg",(0,m.l7)({},Mx,{class:"marks",width:this._width*this._scale,height:this._height*this._scale,viewBox:"0 0 ".concat(this._width," ").concat(this._height)}));const n=this._bgcolor;if(n&&n!=="transparent"&&n!=="none"){e.open("rect",{width:this._width,height:this._height,fill:n}).close()}e.open("g",ek,{transform:"translate("+this._origin+")"});this.mark(e,t);e.close();this.defs(e);this._text=e.close()+"";return this},mark(t,e){const n=Sb[e.marktype],i=n.tag,r=[qw,n.attr];t.open("g",{class:Ib(e),"clip-path":e.clip?Bv(this,e,e.group):null},Iw(e),{"pointer-events":i!=="g"&&e.interactive===false?"none":null});const o=o=>{const s=this.href(o);if(s)t.open("a",s);t.open(i,this.attr(e,o,r,i!=="g"?i:null));if(i==="text"){const e=ab(o);if((0,m.kJ)(e)){const n={x:0,dy:ob(o)};for(let i=0;i<e.length;++i){t.open("tspan",i?n:null).text(ub(o,e[i])).close()}}else{t.text(ub(o,e))}}else if(i==="g"){const i=o.strokeForeground,r=o.fill,s=o.stroke;if(i&&s){o.stroke=null}t.open("path",this.attr(e,o,n.background,"bgrect")).close();t.open("g",this.attr(e,o,n.content));L_(o,(e=>this.mark(t,e)));t.close();if(i&&s){if(r)o.fill=null;o.stroke=s;t.open("path",this.attr(e,o,n.foreground,"bgrect")).close();if(r)o.fill=r}else{t.open("path",this.attr(e,o,n.foreground,"bgfore")).close()}}t.close();if(s)t.close()};if(n.nested){if(e.items&&e.items.length)o(e.items[0])}else{L_(e,o)}return t.close()},href(t){const e=t.href;let n;if(e){if(n=this._hrefs&&this._hrefs[e]){return n}else{this.sanitizeURL(e).then((t=>{t["xlink:href"]=t.href;t.href=null;(this._hrefs||(this._hrefs={}))[e]=t}))}}return null},attr(t,e,n,i){const r={},o=(t,e,n,i)=>{r[i||t]=e};if(Array.isArray(n)){n.forEach((t=>t(o,e,this)))}else{n(o,e,this)}if(i){kk(r,e,t,i,this._defs)}return r},defs(t){const e=this._defs.gradient,n=this._defs.clipping,i=Object.keys(e).length+Object.keys(n).length;if(i===0)return;t.open("defs");for(const r in e){const n=e[r],i=n.stops;if(n.gradient==="radial"){t.open("pattern",{id:xy+r,viewBox:"0,0,1,1",width:"100%",height:"100%",preserveAspectRatio:"xMidYMid slice"});t.open("rect",{width:"1",height:"1",fill:"url(#"+r+")"}).close();t.close();t.open("radialGradient",{id:r,fx:n.x1,fy:n.y1,fr:n.r1,cx:n.x2,cy:n.y2,r:n.r2})}else{t.open("linearGradient",{id:r,x1:n.x1,x2:n.x2,y1:n.y1,y2:n.y2})}for(let e=0;e<i.length;++e){t.open("stop",{offset:i[e].offset,"stop-color":i[e].color}).close()}t.close()}for(const r in n){const e=n[r];t.open("clipPath",{id:r});if(e.path){t.open("path",{d:e.path}).close()}else{t.open("rect",{x:0,y:0,width:e.width,height:e.height}).close()}t.close()}t.close()}});function kk(t,e,n,i,r){let o;if(e==null)return t;if(i==="bgrect"&&n.interactive===false){t["pointer-events"]="none"}if(i==="bgfore"){if(n.interactive===false){t["pointer-events"]="none"}t.display="none";if(e.fill!==null)return t}if(i==="image"&&e.smooth===false){o=["image-rendering: optimizeSpeed;","image-rendering: pixelated;"]}if(i==="text"){t["font-family"]=hb(e);t["font-size"]=rb(e)+"px";t["font-style"]=e.fontStyle;t["font-variant"]=e.fontVariant;t["font-weight"]=e.fontWeight}for(const s in Qw){let n=e[s];const i=Qw[s];if(n==="transparent"&&(i==="fill"||i==="stroke"));else if(n!=null){if(by(n)){n=wy(n,r.gradient,"")}t[i]=n}}for(const s in tk){const t=e[s];if(t!=null){o=o||[];o.push("".concat(tk[s],": ").concat(t,";"))}}if(o){t.style=o.join(" ")}return t}const Mk="canvas";const Sk="png";const Ek="svg";const Tk="none";const Dk={Canvas:Mk,PNG:Sk,SVG:Ek,None:Tk};const Ak={};Ak[Mk]=Ak[Sk]={renderer:ww,headless:ww,handler:dw};Ak[Ek]={renderer:ok,headless:wk,handler:Ew};Ak[Tk]={};function Nk(t,e){t=String(t||"").toLowerCase();if(arguments.length>1){Ak[t]=e;return this}else{return Ak[t]}}function zk(t,e,n){const i=[],r=(new Yv).union(e),o=t.marktype;return o?Rk(t,r,n,i):o==="group"?Ok(t,r,n,i):(0,m.vU)("Intersect scene must be mark node or group item.")}function Rk(t,e,n,i){if(Ck(t,e,n)){const r=t.items,o=t.marktype,s=r.length;let a=0;if(o==="group"){for(;a<s;++a){Ok(r[a],e,n,i)}}else{for(const t=Sb[o].isect;a<s;++a){const n=r[a];if(Uk(n,e,t))i.push(n)}}}return i}function Ck(t,e,n){return t.bounds&&e.intersects(t.bounds)&&(t.marktype==="group"||t.interactive!==false&&(!n||n(t)))}function Ok(t,e,n,i){if(n&&n(t.mark)&&Uk(t,e,Sb.group.isect)){i.push(t)}const r=t.items,o=r&&r.length;if(o){const s=t.x||0,a=t.y||0;e.translate(-s,-a);for(let t=0;t<o;++t){Rk(r[t],e,n,i)}e.translate(s,a)}return i}function Uk(t,e,n){const i=t.bounds;return e.encloses(i)||e.intersects(i)&&n(t,e)}const $k=new Yv;function Pk(t){const e=t.clip;if((0,m.mf)(e)){e(v_($k.clear()))}else if(e){$k.set(0,0,t.group.width,t.group.height)}else return;t.bounds.intersect($k)}const qk=1e-9;function Ik(t,e,n){return t===e?true:n==="path"?Lk(t,e):t instanceof Date&&e instanceof Date?+t===+e:(0,m.hj)(t)&&(0,m.hj)(e)?Math.abs(t-e)<=qk:!t||!e||!(0,m.Kn)(t)&&!(0,m.Kn)(e)?t==e:Fk(t,e)}function Lk(t,e){return Ik(Ry(t),Ry(e))}function Fk(t,e){var n=Object.keys(t),i=Object.keys(e),r,o;if(n.length!==i.length)return false;n.sort();i.sort();for(o=n.length-1;o>=0;o--){if(n[o]!=i[o])return false}for(o=n.length-1;o>=0;o--){r=n[o];if(!Ik(t[r],e[r],r))return false}return typeof t===typeof e}function jk(){Hv();_y()}const Wk="top";const Xk="left";const Hk="right";const Bk="bottom";const Yk="top-left";const Jk="top-right";const Gk="bottom-left";const Vk="bottom-right";const Kk="start";const Zk="middle";const Qk="end";const tM="x";const eM="y";const nM="group";const iM="axis";const rM="title";const oM="frame";const sM="scope";const aM="legend";const lM="row-header";const uM="row-footer";const cM="row-title";const fM="column-header";const hM="column-footer";const dM="column-title";const pM="padding";const mM="symbol";const gM="fit";const yM="fit-x";const vM="fit-y";const _M="pad";const xM="none";const bM="all";const wM="each";const kM="flush";const MM="column";const SM="row";function EM(t){Cs.call(this,null,t)}(0,m.XW)(EM,Cs,{transform(t,e){const n=e.dataflow,i=t.mark,r=i.marktype,o=Sb[r],s=o.bound;let a=i.bounds,l;if(o.nested){if(i.items.length)n.dirty(i.items[0]);a=TM(i,s);i.items.forEach((t=>{t.bounds.clear().union(a)}))}else if(r===nM||t.modified()){e.visit(e.MOD,(t=>n.dirty(t)));a.clear();i.items.forEach((t=>a.union(TM(t,s))));switch(i.role){case iM:case aM:case rM:e.reflow()}}else{l=e.changed(e.REM);e.visit(e.ADD,(t=>{a.union(TM(t,s))}));e.visit(e.MOD,(t=>{l=l||a.alignsWith(t.bounds);n.dirty(t);a.union(TM(t,s))}));if(l){a.clear();i.items.forEach((t=>a.union(t.bounds)))}}Pk(i);return e.modifies("bounds")}});function TM(t,e,n){return e(t.bounds.clear(),t,n)}const DM=":vega_identifier:";function AM(t){Cs.call(this,0,t)}AM.Definition={type:"Identifier",metadata:{modifies:true},params:[{name:"as",type:"string",required:true}]};(0,m.XW)(AM,Cs,{transform(t,e){const n=NM(e.dataflow),i=t.as;let r=n.value;e.visit(e.ADD,(t=>t[i]=t[i]||++r));n.set(this.value=r);return e}});function NM(t){return t._signals[DM]||(t._signals[DM]=t.add(0))}function zM(t){Cs.call(this,null,t)}(0,m.XW)(zM,Cs,{transform(t,e){let n=this.value;if(!n){n=e.dataflow.scenegraph().mark(t.markdef,RM(t),t.index);n.group.context=t.context;if(!t.context.group)t.context.group=n.group;n.source=this.source;n.clip=t.clip;n.interactive=t.interactive;this.value=n}const i=n.marktype===nM?Gv:Jv;e.visit(e.ADD,(t=>i.call(t,n)));if(t.modified("clip")||t.modified("interactive")){n.clip=t.clip;n.interactive=!!t.interactive;n.zdirty=true;e.reflow()}n.items=e.source;return e}});function RM(t){const e=t.groups,n=t.parent;return e&&e.size===1?e.get(Object.keys(e.object)[0]):e&&n?e.lookup(n):null}function CM(t){Cs.call(this,null,t)}const OM={parity:t=>t.filter(((t,e)=>e%2?t.opacity=0:1)),greedy:(t,e)=>{let n;return t.filter(((t,i)=>!i||!UM(n.bounds,t.bounds,e)?(n=t,1):t.opacity=0))}};const UM=(t,e,n)=>n>Math.max(e.x1-t.x2,t.x1-e.x2,e.y1-t.y2,t.y1-e.y2);const $M=(t,e)=>{for(var n=1,i=t.length,r=t[0].bounds,o;n<i;r=o,++n){if(UM(r,o=t[n].bounds,e))return true}};const PM=t=>{const e=t.bounds;return e.width()>1&&e.height()>1};const qM=(t,e,n)=>{var i=t.range(),r=new Yv;if(e===Wk||e===Bk){r.set(i[0],-Infinity,i[1],+Infinity)}else{r.set(-Infinity,i[0],+Infinity,i[1])}r.expand(n||1);return t=>r.encloses(t.bounds)};const IM=t=>{t.forEach((t=>t.opacity=1));return t};const LM=(t,e)=>t.reflow(e.modified()).modifies("opacity");(0,m.XW)(CM,Cs,{transform(t,e){const n=OM[t.method]||OM.parity,i=t.separation||0;let r=e.materialize(e.SOURCE).source,o,s;if(!r||!r.length)return;if(!t.method){if(t.modified("method")){IM(r);e=LM(e,t)}return e}r=r.filter(PM);if(!r.length)return;if(t.sort){r=r.slice().sort(t.sort)}o=IM(r);e=LM(e,t);if(o.length>=3&&$M(o,i)){do{o=n(o,i)}while(o.length>=3&&$M(o,i));if(o.length<3&&!(0,m.fj)(r).opacity){if(o.length>1)(0,m.fj)(o).opacity=0;(0,m.fj)(r).opacity=1}}if(t.boundScale&&t.boundTolerance>=0){s=qM(t.boundScale,t.boundOrient,+t.boundTolerance);r.forEach((t=>{if(!s(t))t.opacity=0}))}const a=o[0].mark.bounds.clear();r.forEach((t=>{if(t.opacity)a.union(t.bounds)}));return e}});function FM(t){Cs.call(this,null,t)}(0,m.XW)(FM,Cs,{transform(t,e){const n=e.dataflow;e.visit(e.ALL,(t=>n.dirty(t)));if(e.fields&&e.fields["zindex"]){const t=e.source&&e.source[0];if(t)t.mark.zdirty=true}}});const jM=new Yv;function WM(t,e,n){return t[e]===n?0:(t[e]=n,1)}function XM(t){var e=t.items[0].orient;return e===Xk||e===Hk}function HM(t){let e=+t.grid;return[t.ticks?e++:-1,t.labels?e++:-1,e+ +t.domain]}function BM(t,e,n,i){var r=e.items[0],o=r.datum,s=r.translate!=null?r.translate:.5,a=r.orient,l=HM(o),u=r.range,c=r.offset,f=r.position,h=r.minExtent,d=r.maxExtent,p=o.title&&r.items[l[2]].items[0],m=r.titlePadding,g=r.bounds,y=p&&lb(p),v=0,_=0,x,b;jM.clear().union(g);g.clear();if((x=l[0])>-1)g.union(r.items[x].bounds);if((x=l[1])>-1)g.union(r.items[x].bounds);switch(a){case Wk:v=f||0;_=-c;b=Math.max(h,Math.min(d,-g.y1));g.add(0,-b).add(u,0);if(p)YM(t,p,b,m,y,0,-1,g);break;case Xk:v=-c;_=f||0;b=Math.max(h,Math.min(d,-g.x1));g.add(-b,0).add(0,u);if(p)YM(t,p,b,m,y,1,-1,g);break;case Hk:v=n+c;_=f||0;b=Math.max(h,Math.min(d,g.x2));g.add(0,0).add(b,u);if(p)YM(t,p,b,m,y,1,1,g);break;case Bk:v=f||0;_=i+c;b=Math.max(h,Math.min(d,g.y2));g.add(0,0).add(u,b);if(p)YM(t,p,b,m,0,0,1,g);break;default:v=r.x;_=r.y}Qv(g.translate(v,_),r);if(WM(r,"x",v+s)|WM(r,"y",_+s)){r.bounds=jM;t.dirty(r);r.bounds=g;t.dirty(r)}return r.mark.bounds.clear().union(g)}function YM(t,e,n,i,r,o,s,a){const l=e.bounds;if(e.auto){const a=s*(n+r+i);let u=0,c=0;t.dirty(e);o?u=(e.x||0)-(e.x=a):c=(e.y||0)-(e.y=a);e.mark.bounds.clear().union(l.translate(-u,-c));t.dirty(e)}a.union(l)}const JM=(t,e)=>Math.floor(Math.min(t,e));const GM=(t,e)=>Math.ceil(Math.max(t,e));function VM(t){var e=t.items,n=e.length,i=0,r,o;const s={marks:[],rowheaders:[],rowfooters:[],colheaders:[],colfooters:[],rowtitle:null,coltitle:null};for(;i<n;++i){r=e[i];o=r.items;if(r.marktype===nM){switch(r.role){case iM:case aM:case rM:break;case lM:s.rowheaders.push(...o);break;case uM:s.rowfooters.push(...o);break;case fM:s.colheaders.push(...o);break;case hM:s.colfooters.push(...o);break;case cM:s.rowtitle=o[0];break;case dM:s.coltitle=o[0];break;default:s.marks.push(...o)}}}return s}function KM(t){return(new Yv).set(0,0,t.width||0,t.height||0)}function ZM(t){const e=t.bounds.clone();return e.empty()?e.set(0,0,0,0):e.translate(-(t.x||0),-(t.y||0))}function QM(t,e,n){const i=(0,m.Kn)(t)?t[e]:t;return i!=null?i:n!==undefined?n:0}function tS(t){return t<0?Math.ceil(-t):0}function eS(t,e,n){var i=!n.nodirty,r=n.bounds===kM?KM:ZM,o=jM.set(0,0,0,0),s=QM(n.align,MM),a=QM(n.align,SM),l=QM(n.padding,MM),u=QM(n.padding,SM),c=n.columns||e.length,f=c<=0?1:Math.ceil(e.length/c),h=e.length,d=Array(h),p=Array(c),m=0,g=Array(h),y=Array(f),v=0,_=Array(h),x=Array(h),b=Array(h),w,k,M,S,E,T,D,A,N,z,R;for(k=0;k<c;++k)p[k]=0;for(k=0;k<f;++k)y[k]=0;for(k=0;k<h;++k){T=e[k];E=b[k]=r(T);T.x=T.x||0;_[k]=0;T.y=T.y||0;x[k]=0;M=k%c;S=~~(k/c);m=Math.max(m,D=Math.ceil(E.x2));v=Math.max(v,A=Math.ceil(E.y2));p[M]=Math.max(p[M],D);y[S]=Math.max(y[S],A);d[k]=l+tS(E.x1);g[k]=u+tS(E.y1);if(i)t.dirty(e[k])}for(k=0;k<h;++k){if(k%c===0)d[k]=0;if(k<c)g[k]=0}if(s===wM){for(M=1;M<c;++M){for(R=0,k=M;k<h;k+=c){if(R<d[k])R=d[k]}for(k=M;k<h;k+=c){d[k]=R+p[M-1]}}}else if(s===bM){for(R=0,k=0;k<h;++k){if(k%c&&R<d[k])R=d[k]}for(k=0;k<h;++k){if(k%c)d[k]=R+m}}else{for(s=false,M=1;M<c;++M){for(k=M;k<h;k+=c){d[k]+=p[M-1]}}}if(a===wM){for(S=1;S<f;++S){for(R=0,k=S*c,w=k+c;k<w;++k){if(R<g[k])R=g[k]}for(k=S*c;k<w;++k){g[k]=R+y[S-1]}}}else if(a===bM){for(R=0,k=c;k<h;++k){if(R<g[k])R=g[k]}for(k=c;k<h;++k){g[k]=R+v}}else{for(a=false,S=1;S<f;++S){for(k=S*c,w=k+c;k<w;++k){g[k]+=y[S-1]}}}for(N=0,k=0;k<h;++k){N=d[k]+(k%c?N:0);_[k]+=N-e[k].x}for(M=0;M<c;++M){for(z=0,k=M;k<h;k+=c){z+=g[k];x[k]+=z-e[k].y}}if(s&&QM(n.center,MM)&&f>1){for(k=0;k<h;++k){E=s===bM?m:p[k%c];N=E-b[k].x2-e[k].x-_[k];if(N>0)_[k]+=N/2}}if(a&&QM(n.center,SM)&&c!==1){for(k=0;k<h;++k){E=a===bM?v:y[~~(k/c)];z=E-b[k].y2-e[k].y-x[k];if(z>0)x[k]+=z/2}}for(k=0;k<h;++k){o.union(b[k].translate(_[k],x[k]))}N=QM(n.anchor,tM);z=QM(n.anchor,eM);switch(QM(n.anchor,MM)){case Qk:N-=o.width();break;case Zk:N-=o.width()/2}switch(QM(n.anchor,SM)){case Qk:z-=o.height();break;case Zk:z-=o.height()/2}N=Math.round(N);z=Math.round(z);o.clear();for(k=0;k<h;++k){e[k].mark.bounds.clear()}for(k=0;k<h;++k){T=e[k];T.x+=_[k]+=N;T.y+=x[k]+=z;o.union(T.mark.bounds.union(T.bounds.translate(_[k],x[k])));if(i)t.dirty(T)}return o}function nS(t,e,n){var i=VM(e),r=i.marks,o=n.bounds===kM?iS:rS,s=n.offset,a=n.columns||r.length,l=a<=0?1:Math.ceil(r.length/a),u=l*a,c,f,h,d,p,m,g;const y=eS(t,r,n);if(y.empty())y.set(0,0,0,0);if(i.rowheaders){m=QM(n.headerBand,SM,null);c=oS(t,i.rowheaders,r,a,l,-QM(s,"rowHeader"),JM,0,o,"x1",0,a,1,m)}if(i.colheaders){m=QM(n.headerBand,MM,null);f=oS(t,i.colheaders,r,a,a,-QM(s,"columnHeader"),JM,1,o,"y1",0,1,a,m)}if(i.rowfooters){m=QM(n.footerBand,SM,null);h=oS(t,i.rowfooters,r,a,l,QM(s,"rowFooter"),GM,0,o,"x2",a-1,a,1,m)}if(i.colfooters){m=QM(n.footerBand,MM,null);d=oS(t,i.colfooters,r,a,a,QM(s,"columnFooter"),GM,1,o,"y2",u-a,1,a,m)}if(i.rowtitle){p=QM(n.titleAnchor,SM);g=QM(s,"rowTitle");g=p===Qk?h+g:c-g;m=QM(n.titleBand,SM,.5);sS(t,i.rowtitle,g,0,y,m)}if(i.coltitle){p=QM(n.titleAnchor,MM);g=QM(s,"columnTitle");g=p===Qk?d+g:f-g;m=QM(n.titleBand,MM,.5);sS(t,i.coltitle,g,1,y,m)}}function iS(t,e){return e==="x1"?t.x||0:e==="y1"?t.y||0:e==="x2"?(t.x||0)+(t.width||0):e==="y2"?(t.y||0)+(t.height||0):undefined}function rS(t,e){return t.bounds[e]}function oS(t,e,n,i,r,o,s,a,l,u,c,f,h,d){var p=n.length,m=0,g=0,y,v,_,x,b,w,k,M,S;if(!p)return m;for(y=c;y<p;y+=f){if(n[y])m=s(m,l(n[y],u))}if(!e.length)return m;if(e.length>r){t.warn("Grid headers exceed limit: "+r);e=e.slice(0,r)}m+=o;for(v=0,x=e.length;v<x;++v){t.dirty(e[v]);e[v].mark.bounds.clear()}for(y=c,v=0,x=e.length;v<x;++v,y+=f){w=e[v];b=w.mark.bounds;for(_=y;_>=0&&(k=n[_])==null;_-=h);if(a){M=d==null?k.x:Math.round(k.bounds.x1+d*k.bounds.width());S=m}else{M=m;S=d==null?k.y:Math.round(k.bounds.y1+d*k.bounds.height())}b.union(w.bounds.translate(M-(w.x||0),S-(w.y||0)));w.x=M;w.y=S;t.dirty(w);g=s(g,b[u])}return g}function sS(t,e,n,i,r,o){if(!e)return;t.dirty(e);var s=n,a=n;i?s=Math.round(r.x1+o*r.width()):a=Math.round(r.y1+o*r.height());e.bounds.translate(s-(e.x||0),a-(e.y||0));e.mark.bounds.clear().union(e.bounds);e.x=s;e.y=a;t.dirty(e)}function aS(t,e){const n=t[e]||{};return(e,i)=>n[e]!=null?n[e]:t[e]!=null?t[e]:i}function lS(t,e){let n=-Infinity;t.forEach((t=>{if(t.offset!=null)n=Math.max(n,t.offset)}));return n>-Infinity?n:e}function uS(t,e,n,i,r,o,s){const a=aS(n,e),l=lS(t,a("offset",0)),u=a("anchor",Kk),c=u===Qk?1:u===Zk?.5:0;const f={align:wM,bounds:a("bounds",kM),columns:a("direction")==="vertical"?1:t.length,padding:a("margin",8),center:a("center"),nodirty:true};switch(e){case Xk:f.anchor={x:Math.floor(i.x1)-l,column:Qk,y:c*(s||i.height()+2*i.y1),row:u};break;case Hk:f.anchor={x:Math.ceil(i.x2)+l,y:c*(s||i.height()+2*i.y1),row:u};break;case Wk:f.anchor={y:Math.floor(r.y1)-l,row:Qk,x:c*(o||r.width()+2*r.x1),column:u};break;case Bk:f.anchor={y:Math.ceil(r.y2)+l,x:c*(o||r.width()+2*r.x1),column:u};break;case Yk:f.anchor={x:l,y:l};break;case Jk:f.anchor={x:o-l,y:l,column:Qk};break;case Gk:f.anchor={x:l,y:s-l,row:Qk};break;case Vk:f.anchor={x:o-l,y:s-l,column:Qk,row:Qk};break}return f}function cS(t,e){var n=e.items[0],i=n.datum,r=n.orient,o=n.bounds,s=n.x,a=n.y,l,u;n._bounds?n._bounds.clear().union(o):n._bounds=o.clone();o.clear();hS(t,n,n.items[0].items[0]);o=fS(n,o);l=2*n.padding;u=2*n.padding;if(!o.empty()){l=Math.ceil(o.width()+l);u=Math.ceil(o.height()+u)}if(i.type===mM){mS(n.items[0].items[0].items[0].items)}if(r!==xM){n.x=s=0;n.y=a=0}n.width=l;n.height=u;Qv(o.set(s,a,s+l,a+u),n);n.mark.bounds.clear().union(o);return n}function fS(t,e){t.items.forEach((t=>e.union(t.bounds)));e.x1=t.padding;e.y1=t.padding;return e}function hS(t,e,n){var i=e.padding,r=i-n.x,o=i-n.y;if(!e.datum.title){if(r||o)pS(t,n,r,o)}else{var s=e.items[1].items[0],a=s.anchor,l=e.titlePadding||0,u=i-s.x,c=i-s.y;switch(s.orient){case Xk:r+=Math.ceil(s.bounds.width())+l;break;case Hk:case Bk:break;default:o+=s.bounds.height()+l}if(r||o)pS(t,n,r,o);switch(s.orient){case Xk:c+=dS(e,n,s,a,1,1);break;case Hk:u+=dS(e,n,s,Qk,0,0)+l;c+=dS(e,n,s,a,1,1);break;case Bk:u+=dS(e,n,s,a,0,0);c+=dS(e,n,s,Qk,-1,0,1)+l;break;default:u+=dS(e,n,s,a,0,0)}if(u||c)pS(t,s,u,c);if((u=Math.round(s.bounds.x1-i))<0){pS(t,n,-u,0);pS(t,s,-u,0)}}}function dS(t,e,n,i,r,o,s){const a=t.datum.type!=="symbol",l=n.datum.vgrad,u=a&&(o||!l)&&!s?e.items[0]:e,c=u.bounds[r?"y2":"x2"]-t.padding,f=l&&o?c:0,h=l&&o?0:c,d=r<=0?0:lb(n);return Math.round(i===Kk?f:i===Qk?h-d:.5*(c-d))}function pS(t,e,n,i){e.x+=n;e.y+=i;e.bounds.translate(n,i);e.mark.bounds.translate(n,i);t.dirty(e)}function mS(t){const e=t.reduce(((t,e)=>{t[e.column]=Math.max(e.bounds.x2-e.x,t[e.column]||0);return t}),{});t.forEach((t=>{t.width=e[t.column];t.height=t.bounds.y2-t.y}))}function gS(t,e,n,i,r){var o=e.items[0],s=o.frame,a=o.orient,l=o.anchor,u=o.offset,c=o.padding,f=o.items[0].items[0],h=o.items[1]&&o.items[1].items[0],d=a===Xk||a===Hk?i:n,p=0,m=0,g=0,y=0,v=0,_;if(s!==nM){a===Xk?(p=r.y2,d=r.y1):a===Hk?(p=r.y1,d=r.y2):(p=r.x1,d=r.x2)}else if(a===Xk){p=i,d=0}_=l===Kk?p:l===Qk?d:(p+d)/2;if(h&&h.text){switch(a){case Wk:case Bk:v=f.bounds.height()+c;break;case Xk:y=f.bounds.width()+c;break;case Hk:y=-f.bounds.width()-c;break}jM.clear().union(h.bounds);jM.translate(y-(h.x||0),v-(h.y||0));if(WM(h,"x",y)|WM(h,"y",v)){t.dirty(h);h.bounds.clear().union(jM);h.mark.bounds.clear().union(jM);t.dirty(h)}jM.clear().union(h.bounds)}else{jM.clear()}jM.union(f.bounds);switch(a){case Wk:m=_;g=r.y1-jM.height()-u;break;case Xk:m=r.x1-jM.width()-u;g=_;break;case Hk:m=r.x2+jM.width()+u;g=_;break;case Bk:m=_;g=r.y2+u;break;default:m=o.x;g=o.y}if(WM(o,"x",m)|WM(o,"y",g)){jM.translate(m,g);t.dirty(o);o.bounds.clear().union(jM);e.bounds.clear().union(jM);t.dirty(o)}return o.bounds}function yS(t){Cs.call(this,null,t)}(0,m.XW)(yS,Cs,{transform(t,e){const n=e.dataflow;t.mark.items.forEach((e=>{if(t.layout)nS(n,e,t.layout);_S(n,e,t)}));return vS(t.mark.group)?e.reflow():e}});function vS(t){return t&&t.mark.role!=="legend-entry"}function _S(t,e,n){var i=e.items,r=Math.max(0,e.width||0),o=Math.max(0,e.height||0),s=(new Yv).set(0,0,r,o),a=s.clone(),l=s.clone(),u=[],c,f,h,d,p,m;for(p=0,m=i.length;p<m;++p){f=i[p];switch(f.role){case iM:d=XM(f)?a:l;d.union(BM(t,f,r,o));break;case rM:c=f;break;case aM:u.push(cS(t,f));break;case oM:case sM:case lM:case uM:case cM:case fM:case hM:case dM:a.union(f.bounds);l.union(f.bounds);break;default:s.union(f.bounds)}}if(u.length){const e={};u.forEach((t=>{h=t.orient||Hk;if(h!==xM)(e[h]||(e[h]=[])).push(t)}));for(const i in e){const s=e[i];eS(t,s,uS(s,i,n.legends,a,l,r,o))}u.forEach((e=>{const i=e.bounds;if(!i.equals(e._bounds)){e.bounds=e._bounds;t.dirty(e);e.bounds=i;t.dirty(e)}if(n.autosize&&n.autosize.type===gM){switch(e.orient){case Xk:case Hk:s.add(i.x1,0).add(i.x2,0);break;case Wk:case Bk:s.add(0,i.y1).add(0,i.y2)}}else{s.union(i)}}))}s.union(a).union(l);if(c){s.union(gS(t,c,r,o,s))}if(e.clip){s.set(0,0,e.width||0,e.height||0)}xS(t,e,s,n)}function xS(t,e,n,i){const r=i.autosize||{},o=r.type;if(t._autosize<1||!o)return;let s=t._width,a=t._height,l=Math.max(0,e.width||0),u=Math.max(0,Math.ceil(-n.x1)),c=Math.max(0,e.height||0),f=Math.max(0,Math.ceil(-n.y1));const h=Math.max(0,Math.ceil(n.x2-l)),d=Math.max(0,Math.ceil(n.y2-c));if(r.contains===pM){const e=t.padding();s-=e.left+e.right;a-=e.top+e.bottom}if(o===xM){u=0;f=0;l=s;c=a}else if(o===gM){l=Math.max(0,s-u-h);c=Math.max(0,a-f-d)}else if(o===yM){l=Math.max(0,s-u-h);a=c+f+d}else if(o===vM){s=l+u+h;c=Math.max(0,a-f-d)}else if(o===_M){s=l+u+h;a=c+f+d}t._resizeView(s,a,l,c,[u,f],r.resize)}function bS(t,e){let n=0;if(e===undefined){for(let e of t){if(e=+e){n+=e}}}else{let i=-1;for(let r of t){if(r=+e(r,++i,t)){n+=r}}}return n}function wS(t){Cs.call(this,null,t)}(0,m.XW)(wS,Cs,{transform(t,e){if(this.value&&!t.modified()){return e.StopPropagation}var n=e.dataflow.locale(),i=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=this.value,o=t.scale,s=t.count==null?t.values?t.values.length:10:t.count,a=Kg(o,s,t.minstep),l=t.format||ty(n,o,a,t.formatSpecifier,t.formatType,!!t.values),u=t.values?Zg(o,t.values,a):Qg(o,a);if(r)i.rem=r;r=u.map(((t,e)=>xo({index:e/(u.length-1||1),value:t,label:l(t)})));if(t.extra&&r.length){r.push(xo({index:-1,extra:{value:r[0].value},label:""}))}i.source=r;i.add=r;this.value=r;return i}});function kS(t){Cs.call(this,null,t)}function MS(){return xo({})}function SS(t){const e=(0,m.Xr)().test((t=>t.exit));e.lookup=n=>e.get(t(n));return e}(0,m.XW)(kS,Cs,{transform(t,e){var n=e.dataflow,i=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=t.item||MS,o=t.key||vo,s=this.value;if((0,m.kJ)(i.encode)){i.encode=null}if(s&&(t.modified("key")||e.modified(o))){(0,m.vU)("DataJoin does not support modified key function or fields.")}if(!s){e=e.addAll();this.value=s=SS(o)}e.visit(e.ADD,(t=>{const e=o(t);let n=s.get(e);if(n){if(n.exit){s.empty--;i.add.push(n)}else{i.mod.push(n)}}else{n=r(t);s.set(e,n);i.add.push(n)}n.datum=t;n.exit=false}));e.visit(e.MOD,(t=>{const e=o(t),n=s.get(e);if(n){n.datum=t;i.mod.push(n)}}));e.visit(e.REM,(t=>{const e=o(t),n=s.get(e);if(t===n.datum&&!n.exit){i.rem.push(n);n.exit=true;++s.empty}}));if(e.changed(e.ADD_MOD))i.modifies("datum");if(e.clean()||t.clean&&s.empty>n.cleanThreshold){n.runAfter(s.clean)}return i}});function ES(t){Cs.call(this,null,t)}(0,m.XW)(ES,Cs,{transform(t,e){var n=e.fork(e.ADD_REM),i=t.mod||false,r=t.encoders,o=e.encode;if((0,m.kJ)(o)){if(n.changed()||o.every((t=>r[t]))){o=o[0];n.encode=null}else{return e.StopPropagation}}var s=o==="enter",a=r.update||m.k,l=r.enter||m.k,u=r.exit||m.k,c=(o&&!s?r[o]:a)||m.k;if(e.changed(e.ADD)){e.visit(e.ADD,(e=>{l(e,t);a(e,t)}));n.modifies(l.output);n.modifies(a.output);if(c!==m.k&&c!==a){e.visit(e.ADD,(e=>{c(e,t)}));n.modifies(c.output)}}if(e.changed(e.REM)&&u!==m.k){e.visit(e.REM,(e=>{u(e,t)}));n.modifies(u.output)}if(s||c!==m.k){const r=e.MOD|(t.modified()?e.REFLOW:0);if(s){e.visit(r,(e=>{const r=l(e,t)||i;if(c(e,t)||r)n.mod.push(e)}));if(n.mod.length)n.modifies(l.output)}else{e.visit(r,(e=>{if(c(e,t)||i)n.mod.push(e)}))}if(n.mod.length)n.modifies(c.output)}return n.changed()?n:e.StopPropagation}});function TS(t){Cs.call(this,[],t)}(0,m.XW)(TS,Cs,{transform(t,e){if(this.value!=null&&!t.modified()){return e.StopPropagation}var n=e.dataflow.locale(),i=e.fork(e.NO_SOURCE|e.NO_FIELDS),r=this.value,o=t.type||Hg,s=t.scale,a=+t.limit,l=Kg(s,t.count==null?5:t.count,t.minstep),u=!!t.values||o===Hg,c=t.format||uy(n,s,l,o,t.formatSpecifier,t.formatType,u),f=t.values||ry(s,l),h,d,p,g,y;if(r)i.rem=r;if(o===Hg){if(a&&f.length>a){e.dataflow.warn("Symbol legend count exceeds limit, filtering items.");r=f.slice(0,a-1);y=true}else{r=f}if((0,m.mf)(p=t.size)){if(!t.values&&s(r[0])===0){r=r.slice(1)}g=r.reduce(((e,n)=>Math.max(e,p(n,t))),0)}else{p=(0,m.a9)(g=p||8)}r=r.map(((e,n)=>xo({index:n,label:c(e,n,r),value:e,offset:g,size:p(e,t)})));if(y){y=f[r.length];r.push(xo({index:r.length,label:"…".concat(f.length-r.length," entries"),value:y,offset:g,size:p(y,t)}))}}else if(o===Yg){h=s.domain(),d=$g(s,h[0],(0,m.fj)(h));if(f.length<3&&!t.values&&h[0]!==(0,m.fj)(h)){f=[h[0],(0,m.fj)(h)]}r=f.map(((t,e)=>xo({index:e,label:c(t,e,f),value:t,perc:d(t)})))}else{p=f.length-1;d=my(s);r=f.map(((t,e)=>xo({index:e,label:c(t,e,f),value:t,perc:e?d(t):0,perc2:e===p?1:d(f[e+1])})))}i.source=r;i.add=r;this.value=r;return i}});const DS=t=>t.source.x;const AS=t=>t.source.y;const NS=t=>t.target.x;const zS=t=>t.target.y;function RS(t){Cs.call(this,{},t)}RS.Definition={type:"LinkPath",metadata:{modifies:true},params:[{name:"sourceX",type:"field",default:"source.x"},{name:"sourceY",type:"field",default:"source.y"},{name:"targetX",type:"field",default:"target.x"},{name:"targetY",type:"field",default:"target.y"},{name:"orient",type:"enum",default:"vertical",values:["horizontal","vertical","radial"]},{name:"shape",type:"enum",default:"line",values:["line","arc","curve","diagonal","orthogonal"]},{name:"require",type:"signal"},{name:"as",type:"string",default:"path"}]};(0,m.XW)(RS,Cs,{transform(t,e){var n=t.sourceX||DS,i=t.sourceY||AS,r=t.targetX||NS,o=t.targetY||zS,s=t.as||"path",a=t.orient||"vertical",l=t.shape||"line",u=HS.get(l+"-"+a)||HS.get(l);if(!u){(0,m.vU)("LinkPath unsupported type: "+t.shape+(t.orient?"-"+t.orient:""))}e.visit(e.SOURCE,(t=>{t[s]=u(n(t),i(t),r(t),o(t))}));return e.reflow(t.modified()).modifies(s)}});const CS=(t,e,n,i)=>"M"+t+","+e+"L"+n+","+i;const OS=(t,e,n,i)=>CS(e*Math.cos(t),e*Math.sin(t),i*Math.cos(n),i*Math.sin(n));const US=(t,e,n,i)=>{var r=n-t,o=i-e,s=Math.sqrt(r*r+o*o)/2,a=180*Math.atan2(o,r)/Math.PI;return"M"+t+","+e+"A"+s+","+s+" "+a+" 0 1"+" "+n+","+i};const $S=(t,e,n,i)=>US(e*Math.cos(t),e*Math.sin(t),i*Math.cos(n),i*Math.sin(n));const PS=(t,e,n,i)=>{const r=n-t,o=i-e,s=.2*(r+o),a=.2*(o-r);return"M"+t+","+e+"C"+(t+s)+","+(e+a)+" "+(n+a)+","+(i-s)+" "+n+","+i};const qS=(t,e,n,i)=>PS(e*Math.cos(t),e*Math.sin(t),i*Math.cos(n),i*Math.sin(n));const IS=(t,e,n,i)=>"M"+t+","+e+"V"+i+"H"+n;const LS=(t,e,n,i)=>"M"+t+","+e+"H"+n+"V"+i;const FS=(t,e,n,i)=>{const r=Math.cos(t),o=Math.sin(t),s=Math.cos(n),a=Math.sin(n),l=Math.abs(n-t)>Math.PI?n<=t:n>t;return"M"+e*r+","+e*o+"A"+e+","+e+" 0 0,"+(l?1:0)+" "+e*s+","+e*a+"L"+i*s+","+i*a};const jS=(t,e,n,i)=>{const r=(t+n)/2;return"M"+t+","+e+"C"+r+","+e+" "+r+","+i+" "+n+","+i};const WS=(t,e,n,i)=>{const r=(e+i)/2;return"M"+t+","+e+"C"+t+","+r+" "+n+","+r+" "+n+","+i};const XS=(t,e,n,i)=>{const r=Math.cos(t),o=Math.sin(t),s=Math.cos(n),a=Math.sin(n),l=(e+i)/2;return"M"+e*r+","+e*o+"C"+l*r+","+l*o+" "+l*s+","+l*a+" "+i*s+","+i*a};const HS=(0,m.Xr)({line:CS,"line-radial":OS,arc:US,"arc-radial":$S,curve:PS,"curve-radial":qS,"orthogonal-horizontal":IS,"orthogonal-vertical":LS,"orthogonal-radial":FS,"diagonal-horizontal":jS,"diagonal-vertical":WS,"diagonal-radial":XS});function BS(t){Cs.call(this,null,t)}BS.Definition={type:"Pie",metadata:{modifies:true},params:[{name:"field",type:"field"},{name:"startAngle",type:"number",default:0},{name:"endAngle",type:"number",default:6.283185307179586},{name:"sort",type:"boolean",default:false},{name:"as",type:"string",array:true,length:2,default:["startAngle","endAngle"]}]};(0,m.XW)(BS,Cs,{transform(t,e){var n=t.as||["startAngle","endAngle"],i=n[0],r=n[1],o=t.field||m.kX,s=t.startAngle||0,a=t.endAngle!=null?t.endAngle:2*Math.PI,l=e.source,u=l.map(o),c=u.length,f=s,h=(a-s)/bS(u),d=Qa(c),p,g,y;if(t.sort){d.sort(((t,e)=>u[t]-u[e]))}for(p=0;p<c;++p){y=u[d[p]];g=l[d[p]];g[i]=f;g[r]=f+=y*h}this.value=u;return e.reflow(t.modified()).modifies(n)}});const YS=5;function JS(t){const e=t.type;return!t.bins&&(e===Wm||e===Hm||e===Bm)}function GS(t){return Mg(t)&&t!==Vm}const VS=(0,m.Rg)(["set","modified","clear","type","scheme","schemeExtent","schemeCount","domain","domainMin","domainMid","domainMax","domainRaw","domainImplicit","nice","zero","bins","range","rangeStep","round","reverse","interpolate","interpolateGamma"]);function KS(t){Cs.call(this,null,t);this.modified(true)}(0,m.XW)(KS,Cs,{transform(t,e){var n=e.dataflow,i=this.value,r=ZS(t);if(!i||r!==i.type){this.value=i=bg(r)()}for(r in t)if(!VS[r]){if(r==="padding"&&GS(i.type))continue;(0,m.mf)(i[r])?i[r](t[r]):n.warn("Unsupported scale property: "+r)}oE(i,t,rE(i,t,tE(i,t,n)));return e.fork(e.NO_SOURCE|e.NO_FIELDS)}});function ZS(t){var e=t.type,n="",i;if(e===Vm)return Vm+"-"+Wm;if(QS(t)){i=t.rawDomain?t.rawDomain.length:t.domain?t.domain.length+ +(t.domainMid!=null):0;n=i===2?Vm+"-":i===3?Km+"-":""}return(n+e||Wm).toLowerCase()}function QS(t){const e=t.type;return Mg(e)&&e!==Jm&&e!==Gm&&(t.scheme||t.range&&t.range.length&&t.range.every(m.HD))}function tE(t,e,n){const i=eE(t,e.domainRaw,n);if(i>-1)return i;var r=e.domain,o=t.type,s=e.zero||e.zero===undefined&&JS(t),a,l;if(!r)return 0;if(GS(o)&&e.padding&&r[0]!==(0,m.fj)(r)){r=nE(o,r,e.range,e.padding,e.exponent,e.constant)}if(s||e.domainMin!=null||e.domainMax!=null||e.domainMid!=null){a=(r=r.slice()).length-1||1;if(s){if(r[0]>0)r[0]=0;if(r[a]<0)r[a]=0}if(e.domainMin!=null)r[0]=e.domainMin;if(e.domainMax!=null)r[a]=e.domainMax;if(e.domainMid!=null){l=e.domainMid;const t=l>r[a]?a+1:l<r[0]?0:a;if(t!==a)n.warn("Scale domainMid exceeds domain min or max.",l);r.splice(t,0,l)}}t.domain(iE(o,r,n));if(o===eg){t.unknown(e.domainImplicit?Rp:undefined)}if(e.nice&&t.nice){t.nice(e.nice!==true&&Kg(t,e.nice)||null)}return r.length}function eE(t,e,n){if(e){t.domain(iE(t.type,e,n));return e.length}else{return-1}}function nE(t,e,n,i,r,o){var s=Math.abs((0,m.fj)(n)-n[0]),a=s/(s-2*i),l=t===Xm?(0,m.dH)(e,null,a):t===Bm?(0,m.mK)(e,null,a,.5):t===Hm?(0,m.mK)(e,null,a,r||1):t===Ym?(0,m.bV)(e,null,a,o||1):(0,m.ay)(e,null,a);e=e.slice();e[0]=l[0];e[e.length-1]=l[1];return e}function iE(t,e,n){if(Tg(t)){var i=Math.abs(e.reduce(((t,e)=>t+(e<0?-1:e>0?1:0)),0));if(i!==e.length){n.warn("Log scale domain includes zero: "+(0,m.m8)(e))}}return e}function rE(t,e,n){let i=e.bins;if(i&&!(0,m.kJ)(i)){const e=t.domain(),n=e[0],r=(0,m.fj)(e),o=i.step;let s=i.start==null?n:i.start,a=i.stop==null?r:i.stop;if(!o)(0,m.vU)("Scale bins parameter missing step property.");if(s<n)s=o*Math.ceil(n/o);if(a>r)a=o*Math.floor(r/o);i=Qa(s,a+o/2,o)}if(i){t.bins=i}else if(t.bins){delete t.bins}if(t.type===rg){if(!i){t.bins=t.domain()}else if(!e.domain&&!e.domainRaw){t.domain(i);n=i.length}}return n}function oE(t,e,n){var i=t.type,r=e.round||false,o=e.range;if(e.rangeStep!=null){o=sE(i,e,n)}else if(e.scheme){o=aE(i,e,n);if((0,m.mf)(o)){if(t.interpolator){return t.interpolator(o)}else{(0,m.vU)("Scale type ".concat(i," does not support interpolating color schemes."))}}}if(o&&Ag(i)){return t.interpolator(Cg(uE(o,e.reverse),e.interpolate,e.interpolateGamma))}if(o&&e.interpolate&&t.interpolate){t.interpolate(Pg(e.interpolate,e.interpolateGamma))}else if((0,m.mf)(t.round)){t.round(r)}else if((0,m.mf)(t.rangeRound)){t.interpolate(r?pd:dd)}if(o)t.range(uE(o,e.reverse))}function sE(t,e,n){if(t!==ig&&t!==ng){(0,m.vU)("Only band and point scales support rangeStep.")}var i=(e.paddingOuter!=null?e.paddingOuter:e.padding)||0,r=t===ng?1:(e.paddingInner!=null?e.paddingInner:e.padding)||0;return[0,e.rangeStep*Fm(n,r,i)]}function aE(t,e,n){var i=e.schemeExtent,r,o;if((0,m.kJ)(e.scheme)){o=Cg(e.scheme,e.interpolate,e.interpolateGamma)}else{r=e.scheme.toLowerCase();o=Xg(r);if(!o)(0,m.vU)("Unrecognized scheme name: ".concat(e.scheme))}n=t===tg?n+1:t===rg?n-1:t===Zm||t===Qm?+e.schemeCount||YS:n;return Ag(t)?lE(o,i,e.reverse):(0,m.mf)(o)?Og(lE(o,i),n):t===eg?o:o.slice(0,n)}function lE(t,e,n){return(0,m.mf)(t)&&(e||n)?Rg(t,uE(e||[0,1],n)):t}function uE(t,e){return e?t.slice().reverse():t}function cE(t){Cs.call(this,null,t)}(0,m.XW)(cE,Cs,{transform(t,e){const n=t.modified("sort")||e.changed(e.ADD)||e.modified(t.sort.fields)||e.modified("datum");if(n)e.source.sort(Mo(t.sort));this.modified(n);return e}});const fE="zero",hE="center",dE="normalize",pE=["y0","y1"];function mE(t){Cs.call(this,null,t)}mE.Definition={type:"Stack",metadata:{modifies:true},params:[{name:"field",type:"field"},{name:"groupby",type:"field",array:true},{name:"sort",type:"compare"},{name:"offset",type:"enum",default:fE,values:[fE,hE,dE]},{name:"as",type:"string",array:true,length:2,default:pE}]};(0,m.XW)(mE,Cs,{transform(t,e){var n=t.as||pE,i=n[0],r=n[1],o=Mo(t.sort),s=t.field||m.kX,a=t.offset===hE?gE:t.offset===dE?yE:vE,l,u,c,f;l=_E(e.source,t.groupby,o,s);for(u=0,c=l.length,f=l.max;u<c;++u){a(l[u],f,s,i,r)}return e.reflow(t.modified()).modifies(n)}});function gE(t,e,n,i,r){var o=(e-t.sum)/2,s=t.length,a=0,l;for(;a<s;++a){l=t[a];l[i]=o;l[r]=o+=Math.abs(n(l))}}function yE(t,e,n,i,r){var o=1/t.sum,s=0,a=t.length,l=0,u=0,c;for(;l<a;++l){c=t[l];c[i]=s;c[r]=s=o*(u+=Math.abs(n(c)))}}function vE(t,e,n,i,r){var o=0,s=0,a=t.length,l=0,u,c;for(;l<a;++l){c=t[l];u=+n(c);if(u<0){c[i]=s;c[r]=s+=u}else{c[i]=o;c[r]=o+=u}}}function _E(t,e,n,i){var r=[],o=t=>t(c),s,a,l,u,c,f,h,d,p;if(e==null){r.push(t.slice())}else{for(s={},a=0,l=t.length;a<l;++a){c=t[a];f=e.map(o);h=s[f];if(!h){s[f]=h=[];r.push(h)}h.push(c)}}for(f=0,p=0,u=r.length;f<u;++f){h=r[f];for(a=0,d=0,l=h.length;a<l;++a){d+=Math.abs(i(h[a]))}h.sum=d;if(d>p)p=d;if(n)h.sort(n)}r.max=p;return r}const xE=t=>t;function bE(t,e){if(t&&kE.hasOwnProperty(t.type)){kE[t.type](t,e)}}var wE={Feature:function(t,e){bE(t.geometry,e)},FeatureCollection:function(t,e){var n=t.features,i=-1,r=n.length;while(++i<r)bE(n[i].geometry,e)}};var kE={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates;e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){var n=t.coordinates,i=-1,r=n.length;while(++i<r)t=n[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){ME(t.coordinates,e,0)},MultiLineString:function(t,e){var n=t.coordinates,i=-1,r=n.length;while(++i<r)ME(n[i],e,0)},Polygon:function(t,e){SE(t.coordinates,e)},MultiPolygon:function(t,e){var n=t.coordinates,i=-1,r=n.length;while(++i<r)SE(n[i],e)},GeometryCollection:function(t,e){var n=t.geometries,i=-1,r=n.length;while(++i<r)bE(n[i],e)}};function ME(t,e,n){var i=-1,r=t.length-n,o;e.lineStart();while(++i<r)o=t[i],e.point(o[0],o[1],o[2]);e.lineEnd()}function SE(t,e){var n=-1,i=t.length;e.polygonStart();while(++n<i)ME(t[n],e,1);e.polygonEnd()}function EE(t,e){if(t&&wE.hasOwnProperty(t.type)){wE[t.type](t,e)}else{bE(t,e)}}class TE{constructor(){this._partials=new Float64Array(32);this._n=0}add(t){const e=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const r=e[i],o=t+r,s=Math.abs(t)<Math.abs(r)?t-(o-r):r-(o-t);if(s)e[n++]=s;t=o}e[n]=t;this._n=n+1;return this}valueOf(){const t=this._partials;let e=this._n,n,i,r,o=0;if(e>0){o=t[--e];while(e>0){n=o;i=t[--e];o=n+i;r=i-(o-n);if(r)break}if(e>0&&(r<0&&t[e-1]<0||r>0&&t[e-1]>0)){i=r*2;n=o+i;if(i==n-o)o=n}}return o}}function DE(t,e){const n=new TE;if(e===undefined){for(let e of t){if(e=+e){n.add(e)}}}else{let i=-1;for(let r of t){if(r=+e(r,++i,t)){n.add(r)}}}return+n}function AE(t,e){const n=new TE;let i=-1;return Float64Array.from(t,e===undefined?t=>n.add(+t||0):r=>n.add(+e(r,++i,t)||0))}var NE=1e-6;var zE=1e-12;var RE=Math.PI;var CE=RE/2;var OE=RE/4;var UE=RE*2;var $E=180/RE;var PE=RE/180;var qE=Math.abs;var IE=Math.atan;var LE=Math.atan2;var FE=Math.cos;var jE=Math.ceil;var WE=Math.exp;var XE=Math.floor;var HE=Math.hypot;var BE=Math.log;var YE=Math.pow;var JE=Math.sin;var GE=Math.sign||function(t){return t>0?1:t<0?-1:0};var VE=Math.sqrt;var KE=Math.tan;function ZE(t){return t>1?0:t<-1?RE:Math.acos(t)}function QE(t){return t>1?CE:t<-1?-CE:Math.asin(t)}function tT(t){return(t=JE(t/2))*t}function eT(){}var nT=new TE,iT=new TE,rT,oT,sT,aT;var lT={point:eT,lineStart:eT,lineEnd:eT,polygonStart:function(){lT.lineStart=uT;lT.lineEnd=hT},polygonEnd:function(){lT.lineStart=lT.lineEnd=lT.point=eT;nT.add(qE(iT));iT=new TE},result:function(){var t=nT/2;nT=new TE;return t}};function uT(){lT.point=cT}function cT(t,e){lT.point=fT;rT=sT=t,oT=aT=e}function fT(t,e){iT.add(aT*t-sT*e);sT=t,aT=e}function hT(){fT(rT,oT)}const dT=lT;var pT=Infinity,mT=pT,gT=-pT,yT=gT;var vT={point:_T,lineStart:eT,lineEnd:eT,polygonStart:eT,polygonEnd:eT,result:function(){var t=[[pT,mT],[gT,yT]];gT=yT=-(mT=pT=Infinity);return t}};function _T(t,e){if(t<pT)pT=t;if(t>gT)gT=t;if(e<mT)mT=e;if(e>yT)yT=e}const xT=vT;var bT=0,wT=0,kT=0,MT=0,ST=0,ET=0,TT=0,DT=0,AT=0,NT,zT,RT,CT;var OT={point:UT,lineStart:$T,lineEnd:IT,polygonStart:function(){OT.lineStart=LT;OT.lineEnd=FT},polygonEnd:function(){OT.point=UT;OT.lineStart=$T;OT.lineEnd=IT},result:function(){var t=AT?[TT/AT,DT/AT]:ET?[MT/ET,ST/ET]:kT?[bT/kT,wT/kT]:[NaN,NaN];bT=wT=kT=MT=ST=ET=TT=DT=AT=0;return t}};function UT(t,e){bT+=t;wT+=e;++kT}function $T(){OT.point=PT}function PT(t,e){OT.point=qT;UT(RT=t,CT=e)}function qT(t,e){var n=t-RT,i=e-CT,r=VE(n*n+i*i);MT+=r*(RT+t)/2;ST+=r*(CT+e)/2;ET+=r;UT(RT=t,CT=e)}function IT(){OT.point=UT}function LT(){OT.point=jT}function FT(){WT(NT,zT)}function jT(t,e){OT.point=WT;UT(NT=RT=t,zT=CT=e)}function WT(t,e){var n=t-RT,i=e-CT,r=VE(n*n+i*i);MT+=r*(RT+t)/2;ST+=r*(CT+e)/2;ET+=r;r=CT*t-RT*e;TT+=r*(RT+t);DT+=r*(CT+e);AT+=r*3;UT(RT=t,CT=e)}const XT=OT;function HT(t){this._context=t}HT.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(){if(this._line===0)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,UE);break}}},result:eT};var BT=new TE,YT,JT,GT,VT,KT;var ZT={point:eT,lineStart:function(){ZT.point=QT},lineEnd:function(){if(YT)tD(JT,GT);ZT.point=eT},polygonStart:function(){YT=true},polygonEnd:function(){YT=null},result:function(){var t=+BT;BT=new TE;return t}};function QT(t,e){ZT.point=tD;JT=VT=t,GT=KT=e}function tD(t,e){VT-=t,KT-=e;BT.add(VE(VT*VT+KT*KT));VT=t,KT=e}const eD=ZT;function nD(){this._string=[]}nD.prototype={_radius:4.5,_circle:iD(4.5),pointRadius:function(t){if((t=+t)!==this._radius)this._radius=t,this._circle=null;return this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){if(this._line===0)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:{if(this._circle==null)this._circle=iD(this._radius);this._string.push("M",t,",",e,this._circle);break}}},result:function(){if(this._string.length){var t=this._string.join("");this._string=[];return t}else{return null}}};function iD(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function rD(t,e){var n=4.5,i,r;function o(t){if(t){if(typeof n==="function")r.pointRadius(+n.apply(this,arguments));EE(t,i(r))}return r.result()}o.area=function(t){EE(t,i(dT));return dT.result()};o.measure=function(t){EE(t,i(eD));return eD.result()};o.bounds=function(t){EE(t,i(xT));return xT.result()};o.centroid=function(t){EE(t,i(XT));return XT.result()};o.projection=function(e){return arguments.length?(i=e==null?(t=null,xE):(t=e).stream,o):t};o.context=function(t){if(!arguments.length)return e;r=t==null?(e=null,new nD):new HT(e=t);if(typeof n!=="function")r.pointRadius(n);return o};o.pointRadius=function(t){if(!arguments.length)return n;n=typeof t==="function"?t:(r.pointRadius(+t),+t);return o};return o.projection(t).context(e)}function oD(){var t=[],e;return{point:function(t,n,i){e.push([t,n,i])},lineStart:function(){t.push(e=[])},lineEnd:eT,rejoin:function(){if(t.length>1)t.push(t.pop().concat(t.shift()))},result:function(){var n=t;t=[];e=null;return n}}}function sD(t,e){return qE(t[0]-e[0])<NE&&qE(t[1]-e[1])<NE}function aD(t,e,n,i){this.x=t;this.z=e;this.o=n;this.e=i;this.v=false;this.n=this.p=null}function lD(t,e,n,i,r){var o=[],s=[],a,l;t.forEach((function(t){if((e=t.length-1)<=0)return;var e,n=t[0],i=t[e],l;if(sD(n,i)){if(!n[2]&&!i[2]){r.lineStart();for(a=0;a<e;++a)r.point((n=t[a])[0],n[1]);r.lineEnd();return}i[0]+=2*NE}o.push(l=new aD(n,t,null,true));s.push(l.o=new aD(n,null,l,false));o.push(l=new aD(i,t,null,false));s.push(l.o=new aD(i,null,l,true))}));if(!o.length)return;s.sort(e);uD(o);uD(s);for(a=0,l=s.length;a<l;++a){s[a].e=n=!n}var u=o[0],c,f;while(1){var h=u,d=true;while(h.v)if((h=h.n)===u)return;c=h.z;r.lineStart();do{h.v=h.o.v=true;if(h.e){if(d){for(a=0,l=c.length;a<l;++a)r.point((f=c[a])[0],f[1])}else{i(h.x,h.n.x,1,r)}h=h.n}else{if(d){c=h.p.z;for(a=c.length-1;a>=0;--a)r.point((f=c[a])[0],f[1])}else{i(h.x,h.p.x,-1,r)}h=h.p}h=h.o;c=h.z;d=!d}while(!h.v);r.lineEnd()}}function uD(t){if(!(e=t.length))return;var e,n=0,i=t[0],r;while(++n<e){i.n=r=t[n];r.p=i;i=r}i.n=r=t[0];r.p=i}function cD(t){return[LE(t[1],t[0]),QE(t[2])]}function fD(t){var e=t[0],n=t[1],i=FE(n);return[i*FE(e),i*JE(e),JE(n)]}function hD(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function dD(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 pD(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function mD(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function gD(t){var e=VE(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function yD(t){return qE(t[0])<=RE?t[0]:GE(t[0])*((qE(t[0])+RE)%UE-RE)}function vD(t,e){var n=yD(e),i=e[1],r=JE(i),o=[JE(n),-FE(n),0],s=0,a=0;var l=new TE;if(r===1)i=CE+NE;else if(r===-1)i=-CE-NE;for(var u=0,c=t.length;u<c;++u){if(!(h=(f=t[u]).length))continue;var f,h,d=f[h-1],p=yD(d),m=d[1]/2+OE,g=JE(m),y=FE(m);for(var v=0;v<h;++v,p=x,g=w,y=k,d=_){var _=f[v],x=yD(_),b=_[1]/2+OE,w=JE(b),k=FE(b),M=x-p,S=M>=0?1:-1,E=S*M,T=E>RE,D=g*w;l.add(LE(D*S*JE(E),y*k+D*FE(E)));s+=T?M+S*UE:M;if(T^p>=n^x>=n){var A=dD(fD(d),fD(_));gD(A);var N=dD(o,A);gD(N);var z=(T^M>=0?-1:1)*QE(N[2]);if(i>z||i===z&&(A[0]||A[1])){a+=T^M>=0?1:-1}}}}return(s<-NE||s<NE&&l<-zE)^a&1}function*_D(t){for(const e of t){yield*e}}function xD(t){return Array.from(_D(t))}function bD(t,e,n,i){return function(r){var o=e(r),s=oD(),a=e(s),l=false,u,c,f;var h={point:d,lineStart:m,lineEnd:g,polygonStart:function(){h.point=y;h.lineStart=v;h.lineEnd=_;c=[];u=[]},polygonEnd:function(){h.point=d;h.lineStart=m;h.lineEnd=g;c=xD(c);var t=vD(u,i);if(c.length){if(!l)r.polygonStart(),l=true;lD(c,kD,t,n,r)}else if(t){if(!l)r.polygonStart(),l=true;r.lineStart();n(null,null,1,r);r.lineEnd()}if(l)r.polygonEnd(),l=false;c=u=null},sphere:function(){r.polygonStart();r.lineStart();n(null,null,1,r);r.lineEnd();r.polygonEnd()}};function d(e,n){if(t(e,n))r.point(e,n)}function p(t,e){o.point(t,e)}function m(){h.point=p;o.lineStart()}function g(){h.point=d;o.lineEnd()}function y(t,e){f.push([t,e]);a.point(t,e)}function v(){a.lineStart();f=[]}function _(){y(f[0][0],f[0][1]);a.lineEnd();var t=a.clean(),e=s.result(),n,i=e.length,o,h,d;f.pop();u.push(f);f=null;if(!i)return;if(t&1){h=e[0];if((o=h.length-1)>0){if(!l)r.polygonStart(),l=true;r.lineStart();for(n=0;n<o;++n)r.point((d=h[n])[0],d[1]);r.lineEnd()}return}if(i>1&&t&2)e.push(e.pop().concat(e.shift()));c.push(e.filter(wD))}return h}}function wD(t){return t.length>1}function kD(t,e){return((t=t.x)[0]<0?t[1]-CE-NE:CE-t[1])-((e=e.x)[0]<0?e[1]-CE-NE:CE-e[1])}const MD=bD((function(){return true}),SD,TD,[-RE,-CE]);function SD(t){var e=NaN,n=NaN,i=NaN,r;return{lineStart:function(){t.lineStart();r=1},point:function(o,s){var a=o>0?RE:-RE,l=qE(o-e);if(qE(l-RE)<NE){t.point(e,n=(n+s)/2>0?CE:-CE);t.point(i,n);t.lineEnd();t.lineStart();t.point(a,n);t.point(o,n);r=0}else if(i!==a&&l>=RE){if(qE(e-i)<NE)e-=i*NE;if(qE(o-a)<NE)o-=a*NE;n=ED(e,n,o,s);t.point(i,n);t.lineEnd();t.lineStart();t.point(a,n);r=0}t.point(e=o,n=s);i=a},lineEnd:function(){t.lineEnd();e=n=NaN},clean:function(){return 2-r}}}function ED(t,e,n,i){var r,o,s=JE(t-n);return qE(s)>NE?IE((JE(e)*(o=FE(i))*JE(n)-JE(i)*(r=FE(e))*JE(t))/(r*o*s)):(e+i)/2}function TD(t,e,n,i){var r;if(t==null){r=n*CE;i.point(-RE,r);i.point(0,r);i.point(RE,r);i.point(RE,0);i.point(RE,-r);i.point(0,-r);i.point(-RE,-r);i.point(-RE,0);i.point(-RE,r)}else if(qE(t[0]-e[0])>NE){var o=t[0]<e[0]?RE:-RE;r=n*o/2;i.point(-o,r);i.point(0,r);i.point(o,r)}else{i.point(e[0],e[1])}}function DD(t,e,n,i,r,o){if(!n)return;var s=FE(e),a=JE(e),l=i*n;if(r==null){r=e+i*UE;o=e-l/2}else{r=AD(s,r);o=AD(s,o);if(i>0?r<o:r>o)r+=i*UE}for(var u,c=r;i>0?c>o:c<o;c-=l){u=cD([s,-a*FE(c),-a*JE(c)]);t.point(u[0],u[1])}}function AD(t,e){e=fD(e),e[0]-=t;gD(e);var n=ZE(-e[1]);return((-e[2]<0?-n:n)+UE-NE)%UE}function ND(){var t=constant([0,0]),e=constant(90),n=constant(6),i,r,o={point:s};function s(t,e){i.push(t=r(t,e));t[0]*=degrees,t[1]*=degrees}function a(){var s=t.apply(this,arguments),a=e.apply(this,arguments)*radians,l=n.apply(this,arguments)*radians;i=[];r=rotateRadians(-s[0]*radians,-s[1]*radians,0).invert;DD(o,a,l,1);s={type:"Polygon",coordinates:[i]};i=r=null;return s}a.center=function(e){return arguments.length?(t=typeof e==="function"?e:constant([+e[0],+e[1]]),a):t};a.radius=function(t){return arguments.length?(e=typeof t==="function"?t:constant(+t),a):e};a.precision=function(t){return arguments.length?(n=typeof t==="function"?t:constant(+t),a):n};return a}function zD(t){var e=FE(t),n=6*PE,i=e>0,r=qE(e)>NE;function o(e,i,r,o){DD(o,t,n,r,e,i)}function s(t,n){return FE(t)*FE(n)>e}function a(t){var e,n,o,a,c;return{lineStart:function(){a=o=false;c=1},point:function(f,h){var d=[f,h],p,m=s(f,h),g=i?m?0:u(f,h):m?u(f+(f<0?RE:-RE),h):0;if(!e&&(a=o=m))t.lineStart();if(m!==o){p=l(e,d);if(!p||sD(e,p)||sD(d,p))d[2]=1}if(m!==o){c=0;if(m){t.lineStart();p=l(d,e);t.point(p[0],p[1])}else{p=l(e,d);t.point(p[0],p[1],2);t.lineEnd()}e=p}else if(r&&e&&i^m){var y;if(!(g&n)&&(y=l(d,e,true))){c=0;if(i){t.lineStart();t.point(y[0][0],y[0][1]);t.point(y[1][0],y[1][1]);t.lineEnd()}else{t.point(y[1][0],y[1][1]);t.lineEnd();t.lineStart();t.point(y[0][0],y[0][1],3)}}}if(m&&(!e||!sD(e,d))){t.point(d[0],d[1])}e=d,o=m,n=g},lineEnd:function(){if(o)t.lineEnd();e=null},clean:function(){return c|(a&&o)<<1}}}function l(t,n,i){var r=fD(t),o=fD(n);var s=[1,0,0],a=dD(r,o),l=hD(a,a),u=a[0],c=l-u*u;if(!c)return!i&&t;var f=e*l/c,h=-e*u/c,d=dD(s,a),p=mD(s,f),m=mD(a,h);pD(p,m);var g=d,y=hD(p,g),v=hD(g,g),_=y*y-v*(hD(p,p)-1);if(_<0)return;var x=VE(_),b=mD(g,(-y-x)/v);pD(b,p);b=cD(b);if(!i)return b;var w=t[0],k=n[0],M=t[1],S=n[1],E;if(k<w)E=w,w=k,k=E;var T=k-w,D=qE(T-RE)<NE,A=D||T<NE;if(!D&&S<M)E=M,M=S,S=E;if(A?D?M+S>0^b[1]<(qE(b[0]-w)<NE?M:S):M<=b[1]&&b[1]<=S:T>RE^(w<=b[0]&&b[0]<=k)){var N=mD(g,(-y+x)/v);pD(N,p);return[b,cD(N)]}}function u(e,n){var r=i?t:RE-t,o=0;if(e<-r)o|=1;else if(e>r)o|=2;if(n<-r)o|=4;else if(n>r)o|=8;return o}return bD(s,a,o,i?[0,-t]:[-RE,t-RE])}function RD(t,e,n,i,r,o){var s=t[0],a=t[1],l=e[0],u=e[1],c=0,f=1,h=l-s,d=u-a,p;p=n-s;if(!h&&p>0)return;p/=h;if(h<0){if(p<c)return;if(p<f)f=p}else if(h>0){if(p>f)return;if(p>c)c=p}p=r-s;if(!h&&p<0)return;p/=h;if(h<0){if(p>f)return;if(p>c)c=p}else if(h>0){if(p<c)return;if(p<f)f=p}p=i-a;if(!d&&p>0)return;p/=d;if(d<0){if(p<c)return;if(p<f)f=p}else if(d>0){if(p>f)return;if(p>c)c=p}p=o-a;if(!d&&p<0)return;p/=d;if(d<0){if(p>f)return;if(p>c)c=p}else if(d>0){if(p<c)return;if(p<f)f=p}if(c>0)t[0]=s+c*h,t[1]=a+c*d;if(f<1)e[0]=s+f*h,e[1]=a+f*d;return true}var CD=1e9,OD=-CD;function UD(t,e,n,i){function r(r,o){return t<=r&&r<=n&&e<=o&&o<=i}function o(r,o,a,u){var c=0,f=0;if(r==null||(c=s(r,a))!==(f=s(o,a))||l(r,o)<0^a>0){do{u.point(c===0||c===3?t:n,c>1?i:e)}while((c=(c+a+4)%4)!==f)}else{u.point(o[0],o[1])}}function s(i,r){return qE(i[0]-t)<NE?r>0?0:3:qE(i[0]-n)<NE?r>0?2:1:qE(i[1]-e)<NE?r>0?1:0:r>0?3:2}function a(t,e){return l(t.x,e.x)}function l(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:n===0?e[1]-t[1]:n===1?t[0]-e[0]:n===2?t[1]-e[1]:e[0]-t[0]}return function(s){var l=s,u=oD(),c,f,h,d,p,m,g,y,v,_,x;var b={point:w,lineStart:E,lineEnd:T,polygonStart:M,polygonEnd:S};function w(t,e){if(r(t,e))l.point(t,e)}function k(){var e=0;for(var n=0,r=f.length;n<r;++n){for(var o=f[n],s=1,a=o.length,l=o[0],u,c,h=l[0],d=l[1];s<a;++s){u=h,c=d,l=o[s],h=l[0],d=l[1];if(c<=i){if(d>i&&(h-u)*(i-c)>(d-c)*(t-u))++e}else{if(d<=i&&(h-u)*(i-c)<(d-c)*(t-u))--e}}}return e}function M(){l=u,c=[],f=[],x=true}function S(){var t=k(),e=x&&t,n=(c=xD(c)).length;if(e||n){s.polygonStart();if(e){s.lineStart();o(null,null,1,s);s.lineEnd()}if(n){lD(c,a,t,o,s)}s.polygonEnd()}l=s,c=f=h=null}function E(){b.point=D;if(f)f.push(h=[]);_=true;v=false;g=y=NaN}function T(){if(c){D(d,p);if(m&&v)u.rejoin();c.push(u.result())}b.point=w;if(v)l.lineEnd()}function D(o,s){var a=r(o,s);if(f)h.push([o,s]);if(_){d=o,p=s,m=a;_=false;if(a){l.lineStart();l.point(o,s)}}else{if(a&&v)l.point(o,s);else{var u=[g=Math.max(OD,Math.min(CD,g)),y=Math.max(OD,Math.min(CD,y))],c=[o=Math.max(OD,Math.min(CD,o)),s=Math.max(OD,Math.min(CD,s))];if(RD(u,c,t,e,n,i)){if(!v){l.lineStart();l.point(u[0],u[1])}l.point(c[0],c[1]);if(!a)l.lineEnd();x=false}else if(a){l.lineStart();l.point(o,s);x=false}}}g=o,y=s,v=a}return b}}function $D(t,e){function n(n,i){return n=t(n,i),e(n[0],n[1])}if(t.invert&&e.invert)n.invert=function(n,i){return n=e.invert(n,i),n&&t.invert(n[0],n[1])};return n}function PD(t,e){return[qE(t)>RE?t+Math.round(-t/UE)*UE:t,e]}PD.invert=PD;function qD(t,e,n){return(t%=UE)?e||n?$D(LD(t),FD(e,n)):LD(t):e||n?FD(e,n):PD}function ID(t){return function(e,n){return e+=t,[e>RE?e-UE:e<-RE?e+UE:e,n]}}function LD(t){var e=ID(t);e.invert=ID(-t);return e}function FD(t,e){var n=FE(t),i=JE(t),r=FE(e),o=JE(e);function s(t,e){var s=FE(e),a=FE(t)*s,l=JE(t)*s,u=JE(e),c=u*n+a*i;return[LE(l*r-c*o,a*n-u*i),QE(c*r+l*o)]}s.invert=function(t,e){var s=FE(e),a=FE(t)*s,l=JE(t)*s,u=JE(e),c=u*r-l*o;return[LE(l*r+u*o,a*n+c*i),QE(c*n-a*i)]};return s}function jD(t){t=qD(t[0]*PE,t[1]*PE,t.length>2?t[2]*PE:0);function e(e){e=t(e[0]*PE,e[1]*PE);return e[0]*=$E,e[1]*=$E,e}e.invert=function(e){e=t.invert(e[0]*PE,e[1]*PE);return e[0]*=$E,e[1]*=$E,e};return e}function WD(t){return{stream:XD(t)}}function XD(t){return function(e){var n=new HD;for(var i in t)n[i]=t[i];n.stream=e;return n}}function HD(){}HD.prototype={constructor:HD,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()}};function BD(t,e,n){var i=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]);if(i!=null)t.clipExtent(null);EE(n,t.stream(xT));e(xT.result());if(i!=null)t.clipExtent(i);return t}function YD(t,e,n){return BD(t,(function(n){var i=e[1][0]-e[0][0],r=e[1][1]-e[0][1],o=Math.min(i/(n[1][0]-n[0][0]),r/(n[1][1]-n[0][1])),s=+e[0][0]+(i-o*(n[1][0]+n[0][0]))/2,a=+e[0][1]+(r-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([s,a])}),n)}function JD(t,e,n){return YD(t,[[0,0],e],n)}function GD(t,e,n){return BD(t,(function(n){var i=+e,r=i/(n[1][0]-n[0][0]),o=(i-r*(n[1][0]+n[0][0]))/2,s=-r*n[0][1];t.scale(150*r).translate([o,s])}),n)}function VD(t,e,n){return BD(t,(function(n){var i=+e,r=i/(n[1][1]-n[0][1]),o=-r*n[0][0],s=(i-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([o,s])}),n)}var KD=16,ZD=FE(30*PE);function QD(t,e){return+e?eA(t,e):tA(t)}function tA(t){return XD({point:function(e,n){e=t(e,n);this.stream.point(e[0],e[1])}})}function eA(t,e){function n(i,r,o,s,a,l,u,c,f,h,d,p,m,g){var y=u-i,v=c-r,_=y*y+v*v;if(_>4*e&&m--){var x=s+h,b=a+d,w=l+p,k=VE(x*x+b*b+w*w),M=QE(w/=k),S=qE(qE(w)-1)<NE||qE(o-f)<NE?(o+f)/2:LE(b,x),E=t(S,M),T=E[0],D=E[1],A=T-i,N=D-r,z=v*A-y*N;if(z*z/_>e||qE((y*A+v*N)/_-.5)>.3||s*h+a*d+l*p<ZD){n(i,r,o,s,a,l,T,D,S,x/=k,b/=k,w,m,g);g.point(T,D);n(T,D,S,x,b,w,u,c,f,h,d,p,m,g)}}}return function(e){var i,r,o,s,a,l,u,c,f,h,d,p;var m={point:g,lineStart:y,lineEnd:_,polygonStart:function(){e.polygonStart();m.lineStart=x},polygonEnd:function(){e.polygonEnd();m.lineStart=y}};function g(n,i){n=t(n,i);e.point(n[0],n[1])}function y(){c=NaN;m.point=v;e.lineStart()}function v(i,r){var o=fD([i,r]),s=t(i,r);n(c,f,u,h,d,p,c=s[0],f=s[1],u=i,h=o[0],d=o[1],p=o[2],KD,e);e.point(c,f)}function _(){m.point=g;e.lineEnd()}function x(){y();m.point=b;m.lineEnd=w}function b(t,e){v(i=t,e),r=c,o=f,s=h,a=d,l=p;m.point=v}function w(){n(c,f,u,h,d,p,r,o,i,s,a,l,KD,e);m.lineEnd=_;_()}return m}}var nA=XD({point:function(t,e){this.stream.point(t*PE,e*PE)}});function iA(t){return XD({point:function(e,n){var i=t(e,n);return this.stream.point(i[0],i[1])}})}function rA(t,e,n,i,r){function o(o,s){o*=i;s*=r;return[e+t*o,n-t*s]}o.invert=function(o,s){return[(o-e)/t*i,(n-s)/t*r]};return o}function oA(t,e,n,i,r,o){if(!o)return rA(t,e,n,i,r);var s=FE(o),a=JE(o),l=s*t,u=a*t,c=s/t,f=a/t,h=(a*n-s*e)/t,d=(a*e+s*n)/t;function p(t,o){t*=i;o*=r;return[l*t-u*o+e,n-u*t-l*o]}p.invert=function(t,e){return[i*(c*t-f*e+h),r*(d-f*t-c*e)]};return p}function sA(t){return aA((function(){return t}))()}function aA(t){var e,n=150,i=480,r=250,o=0,s=0,a=0,l=0,u=0,c,f=0,h=1,d=1,p=null,m=MD,g=null,y,v,_,x=xE,b=.5,w,k,M,S,E;function T(t){return M(t[0]*PE,t[1]*PE)}function D(t){t=M.invert(t[0],t[1]);return t&&[t[0]*$E,t[1]*$E]}T.stream=function(t){return S&&E===t?S:S=nA(iA(c)(m(w(x(E=t)))))};T.preclip=function(t){return arguments.length?(m=t,p=undefined,N()):m};T.postclip=function(t){return arguments.length?(x=t,g=y=v=_=null,N()):x};T.clipAngle=function(t){return arguments.length?(m=+t?zD(p=t*PE):(p=null,MD),N()):p*$E};T.clipExtent=function(t){return arguments.length?(x=t==null?(g=y=v=_=null,xE):UD(g=+t[0][0],y=+t[0][1],v=+t[1][0],_=+t[1][1]),N()):g==null?null:[[g,y],[v,_]]};T.scale=function(t){return arguments.length?(n=+t,A()):n};T.translate=function(t){return arguments.length?(i=+t[0],r=+t[1],A()):[i,r]};T.center=function(t){return arguments.length?(o=t[0]%360*PE,s=t[1]%360*PE,A()):[o*$E,s*$E]};T.rotate=function(t){return arguments.length?(a=t[0]%360*PE,l=t[1]%360*PE,u=t.length>2?t[2]%360*PE:0,A()):[a*$E,l*$E,u*$E]};T.angle=function(t){return arguments.length?(f=t%360*PE,A()):f*$E};T.reflectX=function(t){return arguments.length?(h=t?-1:1,A()):h<0};T.reflectY=function(t){return arguments.length?(d=t?-1:1,A()):d<0};T.precision=function(t){return arguments.length?(w=QD(k,b=t*t),N()):VE(b)};T.fitExtent=function(t,e){return YD(T,t,e)};T.fitSize=function(t,e){return JD(T,t,e)};T.fitWidth=function(t,e){return GD(T,t,e)};T.fitHeight=function(t,e){return VD(T,t,e)};function A(){var t=oA(n,0,0,h,d,f).apply(null,e(o,s)),p=oA(n,i-t[0],r-t[1],h,d,f);c=qD(a,l,u);k=$D(e,p);M=$D(c,k);w=QD(k,b);return N()}function N(){S=E=null;return T}return function(){e=t.apply(this,arguments);T.invert=e.invert&&D;return A()}}function lA(t){var e=0,n=RE/3,i=aA(t),r=i(e,n);r.parallels=function(t){return arguments.length?i(e=t[0]*PE,n=t[1]*PE):[e*$E,n*$E]};return r}function uA(t){var e=FE(t);function n(t,n){return[t*e,JE(n)/e]}n.invert=function(t,n){return[t/e,QE(n*e)]};return n}function cA(t,e){var n=JE(t),i=(n+JE(e))/2;if(qE(i)<NE)return uA(t);var r=1+n*(2*i-n),o=VE(r)/i;function s(t,e){var n=VE(r-2*i*JE(e))/i;return[n*JE(t*=i),o-n*FE(t)]}s.invert=function(t,e){var n=o-e,s=LE(t,qE(n))*GE(n);if(n*i<0)s-=RE*GE(t)*GE(n);return[s/i,QE((r-(t*t+n*n)*i*i)/(2*i))]};return s}function fA(){return lA(cA).scale(155.424).center([0,33.6442])}function hA(){return fA().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function dA(t){var e=t.length;return{point:function(n,i){var r=-1;while(++r<e)t[r].point(n,i)},sphere:function(){var n=-1;while(++n<e)t[n].sphere()},lineStart:function(){var n=-1;while(++n<e)t[n].lineStart()},lineEnd:function(){var n=-1;while(++n<e)t[n].lineEnd()},polygonStart:function(){var n=-1;while(++n<e)t[n].polygonStart()},polygonEnd:function(){var n=-1;while(++n<e)t[n].polygonEnd()}}}function pA(){var t,e,n=hA(),i,r=fA().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,s=fA().rotate([157,0]).center([-3,19.9]).parallels([8,18]),a,l,u={point:function(t,e){l=[t,e]}};function c(t){var e=t[0],n=t[1];return l=null,(i.point(e,n),l)||(o.point(e,n),l)||(a.point(e,n),l)}c.invert=function(t){var e=n.scale(),i=n.translate(),o=(t[0]-i[0])/e,a=(t[1]-i[1])/e;return(a>=.12&&a<.234&&o>=-.425&&o<-.214?r:a>=.166&&a<.234&&o>=-.214&&o<-.115?s:n).invert(t)};c.stream=function(i){return t&&e===i?t:t=dA([n.stream(e=i),r.stream(i),s.stream(i)])};c.precision=function(t){if(!arguments.length)return n.precision();n.precision(t),r.precision(t),s.precision(t);return f()};c.scale=function(t){if(!arguments.length)return n.scale();n.scale(t),r.scale(t*.35),s.scale(t);return c.translate(n.translate())};c.translate=function(t){if(!arguments.length)return n.translate();var e=n.scale(),l=+t[0],c=+t[1];i=n.translate(t).clipExtent([[l-.455*e,c-.238*e],[l+.455*e,c+.238*e]]).stream(u);o=r.translate([l-.307*e,c+.201*e]).clipExtent([[l-.425*e+NE,c+.12*e+NE],[l-.214*e-NE,c+.234*e-NE]]).stream(u);a=s.translate([l-.205*e,c+.212*e]).clipExtent([[l-.214*e+NE,c+.166*e+NE],[l-.115*e-NE,c+.234*e-NE]]).stream(u);return f()};c.fitExtent=function(t,e){return YD(c,t,e)};c.fitSize=function(t,e){return JD(c,t,e)};c.fitWidth=function(t,e){return GD(c,t,e)};c.fitHeight=function(t,e){return VD(c,t,e)};function f(){t=e=null;return c}return c.scale(1070)}function mA(t){return function(e,n){var i=FE(e),r=FE(n),o=t(i*r);if(o===Infinity)return[2,0];return[o*r*JE(e),o*JE(n)]}}function gA(t){return function(e,n){var i=VE(e*e+n*n),r=t(i),o=JE(r),s=FE(r);return[LE(e*o,i*s),QE(i&&n*o/i)]}}var yA=mA((function(t){return VE(2/(1+t))}));yA.invert=gA((function(t){return 2*QE(t/2)}));function vA(){return sA(yA).scale(124.75).clipAngle(180-.001)}var _A=mA((function(t){return(t=ZE(t))&&t/JE(t)}));_A.invert=gA((function(t){return t}));function xA(){return sA(_A).scale(79.4188).clipAngle(180-.001)}function bA(t,e){return[t,BE(KE((CE+e)/2))]}bA.invert=function(t,e){return[t,2*IE(WE(e))-CE]};function wA(){return kA(bA).scale(961/UE)}function kA(t){var e=sA(t),n=e.center,i=e.scale,r=e.translate,o=e.clipExtent,s=null,a,l,u;e.scale=function(t){return arguments.length?(i(t),c()):i()};e.translate=function(t){return arguments.length?(r(t),c()):r()};e.center=function(t){return arguments.length?(n(t),c()):n()};e.clipExtent=function(t){return arguments.length?(t==null?s=a=l=u=null:(s=+t[0][0],a=+t[0][1],l=+t[1][0],u=+t[1][1]),c()):s==null?null:[[s,a],[l,u]]};function c(){var n=RE*i(),r=e(jD(e.rotate()).invert([0,0]));return o(s==null?[[r[0]-n,r[1]-n],[r[0]+n,r[1]+n]]:t===bA?[[Math.max(r[0]-n,s),a],[Math.min(r[0]+n,l),u]]:[[s,Math.max(r[1]-n,a)],[l,Math.min(r[1]+n,u)]])}return c()}function MA(t){return KE((CE+t)/2)}function SA(t,e){var n=FE(t),i=t===e?JE(t):BE(n/FE(e))/BE(MA(e)/MA(t)),r=n*YE(MA(t),i)/i;if(!i)return bA;function o(t,e){if(r>0){if(e<-CE+NE)e=-CE+NE}else{if(e>CE-NE)e=CE-NE}var n=r/YE(MA(e),i);return[n*JE(i*t),r-n*FE(i*t)]}o.invert=function(t,e){var n=r-e,o=GE(i)*VE(t*t+n*n),s=LE(t,qE(n))*GE(n);if(n*i<0)s-=RE*GE(t)*GE(n);return[s/i,2*IE(YE(r/o,1/i))-CE]};return o}function EA(){return lA(SA).scale(109.5).parallels([30,30])}function TA(t,e){return[t,e]}TA.invert=TA;function DA(){return sA(TA).scale(152.63)}function AA(t,e){var n=FE(t),i=t===e?JE(t):(n-FE(e))/(e-t),r=n/i+t;if(qE(i)<NE)return TA;function o(t,e){var n=r-e,o=i*t;return[n*JE(o),r-n*FE(o)]}o.invert=function(t,e){var n=r-e,o=LE(t,qE(n))*GE(n);if(n*i<0)o-=RE*GE(t)*GE(n);return[o/i,r-GE(i)*VE(t*t+n*n)]};return o}function NA(){return lA(AA).scale(131.154).center([0,13.9389])}var zA=1.340264,RA=-.081106,CA=893e-6,OA=.003796,UA=VE(3)/2,$A=12;function PA(t,e){var n=QE(UA*JE(e)),i=n*n,r=i*i*i;return[t*FE(n)/(UA*(zA+3*RA*i+r*(7*CA+9*OA*i))),n*(zA+RA*i+r*(CA+OA*i))]}PA.invert=function(t,e){var n=e,i=n*n,r=i*i*i;for(var o=0,s,a,l;o<$A;++o){a=n*(zA+RA*i+r*(CA+OA*i))-e;l=zA+3*RA*i+r*(7*CA+9*OA*i);n-=s=a/l,i=n*n,r=i*i*i;if(qE(s)<zE)break}return[UA*t*(zA+3*RA*i+r*(7*CA+9*OA*i))/FE(n),QE(JE(n)/UA)]};function qA(){return sA(PA).scale(177.158)}function IA(t,e){var n=FE(e),i=FE(t)*n;return[n*JE(t)/i,JE(e)/i]}IA.invert=gA(IE);function LA(){return sA(IA).scale(144.049).clipAngle(60)}function FA(){var t=1,e=0,n=0,i=1,r=1,o=0,s,a,l=null,u,c,f,h=1,d=1,p=XD({point:function(t,e){var n=_([t,e]);this.stream.point(n[0],n[1])}}),m=xE,g,y;function v(){h=t*i;d=t*r;g=y=null;return _}function _(t){var i=t[0]*h,r=t[1]*d;if(o){var l=r*s-i*a;i=i*s+r*a;r=l}return[i+e,r+n]}_.invert=function(t){var i=t[0]-e,r=t[1]-n;if(o){var l=r*s+i*a;i=i*s-r*a;r=l}return[i/h,r/d]};_.stream=function(t){return g&&y===t?g:g=p(m(y=t))};_.postclip=function(t){return arguments.length?(m=t,l=u=c=f=null,v()):m};_.clipExtent=function(t){return arguments.length?(m=t==null?(l=u=c=f=null,xE):UD(l=+t[0][0],u=+t[0][1],c=+t[1][0],f=+t[1][1]),v()):l==null?null:[[l,u],[c,f]]};_.scale=function(e){return arguments.length?(t=+e,v()):t};_.translate=function(t){return arguments.length?(e=+t[0],n=+t[1],v()):[e,n]};_.angle=function(t){return arguments.length?(o=t%360*PE,a=JE(o),s=FE(o),v()):o*$E};_.reflectX=function(t){return arguments.length?(i=t?-1:1,v()):i<0};_.reflectY=function(t){return arguments.length?(r=t?-1:1,v()):r<0};_.fitExtent=function(t,e){return YD(_,t,e)};_.fitSize=function(t,e){return JD(_,t,e)};_.fitWidth=function(t,e){return GD(_,t,e)};_.fitHeight=function(t,e){return VD(_,t,e)};return _}function jA(t,e){var n=e*e,i=n*n;return[t*(.8707-.131979*n+i*(-.013791+i*(.003971*n-.001529*i))),e*(1.007226+n*(.015085+i*(-.044475+.028874*n-.005916*i)))]}jA.invert=function(t,e){var n=e,i=25,r;do{var o=n*n,s=o*o;n-=r=(n*(1.007226+o*(.015085+s*(-.044475+.028874*o-.005916*s)))-e)/(1.007226+o*(.015085*3+s*(-.044475*7+.028874*9*o-.005916*11*s)))}while(qE(r)>NE&&--i>0);return[t/(.8707+(o=n*n)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),n]};function WA(){return sA(jA).scale(175.295)}function XA(t,e){return[FE(e)*JE(t),JE(e)]}XA.invert=gA(QE);function HA(){return sA(XA).scale(249.5).clipAngle(90+NE)}function BA(t,e){var n=FE(e),i=1+FE(t)*n;return[n*JE(t)/i,JE(e)/i]}BA.invert=gA((function(t){return 2*IE(t)}));function YA(){return sA(BA).scale(250).clipAngle(142)}function JA(t,e){return[BE(KE((CE+e)/2)),-t]}JA.invert=function(t,e){return[-e,2*IE(WE(t))-CE]};function GA(){var t=kA(JA),e=t.center,n=t.rotate;t.center=function(t){return arguments.length?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])};t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])};return n([0,0,90]).scale(159.155)}var VA=Math.abs;var KA=Math.atan;var ZA=Math.atan2;var QA=Math.ceil;var tN=Math.cos;var eN=Math.exp;var nN=Math.floor;var iN=Math.log;var rN=Math.max;var oN=Math.min;var sN=Math.pow;var aN=Math.round;var lN=Math.sign||function(t){return t>0?1:t<0?-1:0};var uN=Math.sin;var cN=Math.tan;var fN=1e-6;var hN=1e-12;var dN=Math.PI;var pN=dN/2;var mN=dN/4;var gN=Math.SQRT1_2;var yN=SN(2);var vN=SN(dN);var _N=dN*2;var xN=180/dN;var bN=dN/180;function wN(t){return t?t/Math.sin(t):1}function kN(t){return t>1?pN:t<-1?-pN:Math.asin(t)}function MN(t){return t>1?0:t<-1?dN:Math.acos(t)}function SN(t){return t>0?Math.sqrt(t):0}function EN(t){t=eN(2*t);return(t-1)/(t+1)}function TN(t){return(eN(t)-eN(-t))/2}function DN(t){return(eN(t)+eN(-t))/2}function AN(t){return iN(t+SN(t*t+1))}function NN(t){return iN(t+SN(t*t-1))}function zN(t,e){var n=t*uN(e),i=30,r;do{e-=r=(e+uN(e)-n)/(1+tN(e))}while(VA(r)>fN&&--i>0);return e/2}function RN(t,e,n){function i(i,r){return[t*i*tN(r=zN(n,r)),e*uN(r)]}i.invert=function(i,r){return r=kN(r/e),[i/(t*tN(r)),kN((2*r+uN(2*r))/n)]};return i}var CN=RN(yN/pN,yN,dN);function ON(){return sA(CN).scale(169.529)}const UN=rD();const $N=["clipAngle","clipExtent","scale","translate","center","rotate","parallels","precision","reflectX","reflectY","coefficient","distance","fraction","lobes","parallel","radius","ratio","spacing","tilt"];function PN(t,e){return function n(){const i=e();i.type=t;i.path=rD().projection(i);i.copy=i.copy||function(){const t=n();$N.forEach((e=>{if(i[e])t[e](i[e]())}));t.path.pointRadius(i.path.pointRadius());return t};return i}}function qN(t,e){if(!t||typeof t!=="string"){throw new Error("Projection type must be a name string.")}t=t.toLowerCase();if(arguments.length>1){LN[t]=PN(t,e);return this}else{return LN[t]||null}}function IN(t){return t&&t.path||UN}const LN={albers:hA,albersusa:pA,azimuthalequalarea:vA,azimuthalequidistant:xA,conicconformal:EA,conicequalarea:fA,conicequidistant:NA,equalEarth:qA,equirectangular:DA,gnomonic:LA,identity:FA,mercator:wA,mollweide:ON,naturalEarth1:WA,orthographic:HA,stereographic:YA,transversemercator:GA};for(const CV in LN){qN(CV,LN[CV])}function FN(t,e,n){var i=Qa(t,e-NE,n).concat(e);return function(t){return i.map((function(e){return[t,e]}))}}function jN(t,e,n){var i=Qa(t,e-NE,n).concat(e);return function(t){return i.map((function(e){return[e,t]}))}}function WN(){var t,e,n,i,r,o,s,a,l=10,u=l,c=90,f=360,h,d,p,m,g=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return Qa(jE(i/c)*c,n,c).map(p).concat(Qa(jE(a/f)*f,s,f).map(m)).concat(Qa(jE(e/l)*l,t,l).filter((function(t){return qE(t%c)>NE})).map(h)).concat(Qa(jE(o/u)*u,r,u).filter((function(t){return qE(t%f)>NE})).map(d))}y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))};y.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(m(s).slice(1),p(n).reverse().slice(1),m(a).reverse().slice(1))]}};y.extent=function(t){if(!arguments.length)return y.extentMinor();return y.extentMajor(t).extentMinor(t)};y.extentMajor=function(t){if(!arguments.length)return[[i,a],[n,s]];i=+t[0][0],n=+t[1][0];a=+t[0][1],s=+t[1][1];if(i>n)t=i,i=n,n=t;if(a>s)t=a,a=s,s=t;return y.precision(g)};y.extentMinor=function(n){if(!arguments.length)return[[e,o],[t,r]];e=+n[0][0],t=+n[1][0];o=+n[0][1],r=+n[1][1];if(e>t)n=e,e=t,t=n;if(o>r)n=o,o=r,r=n;return y.precision(g)};y.step=function(t){if(!arguments.length)return y.stepMinor();return y.stepMajor(t).stepMinor(t)};y.stepMajor=function(t){if(!arguments.length)return[c,f];c=+t[0],f=+t[1];return y};y.stepMinor=function(t){if(!arguments.length)return[l,u];l=+t[0],u=+t[1];return y};y.precision=function(l){if(!arguments.length)return g;g=+l;h=FN(o,r,90);d=jN(e,t,g);p=FN(a,s,90);m=jN(i,n,g);return y};return y.extentMajor([[-180,-90+NE],[180,90-NE]]).extentMinor([[-180,-80-NE],[180,80+NE]])}function XN(){return WN()()}function HN(){}const BN=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function YN(){var t=1,e=1,n=a;function i(t,e){return e.map((e=>r(t,e)))}function r(t,e){var i=[],r=[];o(t,e,(o=>{n(o,t,e);if(JN(o)>0)i.push([o]);else r.push(o)}));r.forEach((t=>{for(var e=0,n=i.length,r;e<n;++e){if(GN((r=i[e])[0],t)!==-1){r.push(t);return}}}));return{type:"MultiPolygon",value:e,coordinates:i}}function o(n,i,r){var o=new Array,a=new Array,l,u,c,f,h,d;l=u=-1;f=n[0]>=i;BN[f<<1].forEach(p);while(++l<t-1){c=f,f=n[l+1]>=i;BN[c|f<<1].forEach(p)}BN[f<<0].forEach(p);while(++u<e-1){l=-1;f=n[u*t+t]>=i;h=n[u*t]>=i;BN[f<<1|h<<2].forEach(p);while(++l<t-1){c=f,f=n[u*t+t+l+1]>=i;d=h,h=n[u*t+l+1]>=i;BN[c|f<<1|h<<2|d<<3].forEach(p)}BN[f|h<<3].forEach(p)}l=-1;h=n[u*t]>=i;BN[h<<2].forEach(p);while(++l<t-1){d=h,h=n[u*t+l+1]>=i;BN[h<<2|d<<3].forEach(p)}BN[h<<3].forEach(p);function p(t){var e=[t[0][0]+l,t[0][1]+u],n=[t[1][0]+l,t[1][1]+u],i=s(e),c=s(n),f,h;if(f=a[i]){if(h=o[c]){delete a[f.end];delete o[h.start];if(f===h){f.ring.push(n);r(f.ring)}else{o[f.start]=a[h.end]={start:f.start,end:h.end,ring:f.ring.concat(h.ring)}}}else{delete a[f.end];f.ring.push(n);a[f.end=c]=f}}else if(f=o[c]){if(h=a[i]){delete o[f.start];delete a[h.end];if(f===h){f.ring.push(n);r(f.ring)}else{o[h.start]=a[f.end]={start:h.start,end:f.end,ring:h.ring.concat(f.ring)}}}else{delete o[f.start];f.ring.unshift(e);o[f.start=i]=f}}else{o[i]=a[c]={start:i,end:c,ring:[e,n]}}}}function s(e){return e[0]*2+e[1]*(t+1)*4}function a(n,i,r){n.forEach((n=>{var o=n[0],s=n[1],a=o|0,l=s|0,u,c=i[l*t+a];if(o>0&&o<t&&a===o){u=i[l*t+a-1];n[0]=o+(r-u)/(c-u)-.5}if(s>0&&s<e&&l===s){u=i[(l-1)*t+a];n[1]=s+(r-u)/(c-u)-.5}}))}i.contour=r;i.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),o=Math.floor(n[1]);if(!(r>=0&&o>=0))(0,m.vU)("invalid size");return t=r,e=o,i};i.smooth=function(t){return arguments.length?(n=t?a:HN,i):n===a};return i}function JN(t){var e=0,n=t.length,i=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];while(++e<n)i+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return i}function GN(t,e){var n=-1,i=e.length,r;while(++n<i)if(r=VN(t,e[n]))return r;return 0}function VN(t,e){var n=e[0],i=e[1],r=-1;for(var o=0,s=t.length,a=s-1;o<s;a=o++){var l=t[o],u=l[0],c=l[1],f=t[a],h=f[0],d=f[1];if(KN(l,f,e))return 0;if(c>i!==d>i&&n<(h-u)*(i-c)/(d-c)+u)r=-r}return r}function KN(t,e,n){var i;return ZN(t,e,n)&&QN(t[i=+(t[0]===e[0])],n[i],e[i])}function ZN(t,e,n){return(e[0]-t[0])*(n[1]-t[1])===(n[0]-t[0])*(e[1]-t[1])}function QN(t,e,n){return t<=e&&e<=n||n<=e&&e<=t}function tz(t,e,n){return function(i){var r=(0,m.We)(i),o=n?Math.min(r[0],0):r[0],s=r[1],a=s-o,l=e?W(o,s,t):a/(t+1);return Qa(o+l,s,l)}}function ez(t){Cs.call(this,null,t)}ez.Definition={type:"Isocontour",metadata:{generates:true},params:[{name:"field",type:"field"},{name:"thresholds",type:"number",array:true},{name:"levels",type:"number"},{name:"nice",type:"boolean",default:false},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"zero",type:"boolean",default:true},{name:"smooth",type:"boolean",default:true},{name:"scale",type:"number",expr:true},{name:"translate",type:"number",array:true,expr:true},{name:"as",type:"string",null:true,default:"contour"}]};(0,m.XW)(ez,Cs,{transform(t,e){if(this.value&&!e.changed()&&!t.modified()){return e.StopPropagation}var n=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=e.materialize(e.SOURCE).source,r=t.field||m.yR,o=YN().smooth(t.smooth!==false),s=t.thresholds||nz(i,r,t),a=t.as===null?null:t.as||"contour",l=[];i.forEach((e=>{const n=r(e);const i=o.size([n.width,n.height])(n.values,(0,m.kJ)(s)?s:s(n.values));iz(i,n,e,t);i.forEach((t=>{l.push(wo(e,xo(a!=null?{[a]:t}:t)))}))}));if(this.value)n.rem=this.value;this.value=n.source=n.add=l;return n}});function nz(t,e,n){const i=tz(n.levels||10,n.nice,n.zero!==false);return n.resolve!=="shared"?i:i(t.map((t=>Ps(e(t).values))))}function iz(t,e,n,i){let r=i.scale||e.scale,o=i.translate||e.translate;if((0,m.mf)(r))r=r(n,i);if((0,m.mf)(o))o=o(n,i);if((r===1||r==null)&&!o)return;const s=((0,m.hj)(r)?r:r[0])||1,a=((0,m.hj)(r)?r:r[1])||1,l=o&&o[0]||0,u=o&&o[1]||0;t.forEach(rz(e,s,a,l,u))}function rz(t,e,n,i,r){const o=t.x1||0,s=t.y1||0,a=e*n<0;function l(t){t.forEach(u)}function u(t){if(a)t.reverse();t.forEach(c)}function c(t){t[0]=(t[0]-o)*e+i;t[1]=(t[1]-s)*n+r}return function(t){t.coordinates.forEach(l);return t}}function oz(t,e,n){const i=t>=0?t:ta(e,n);return Math.round((Math.sqrt(4*i*i+1)-1)/2)}function sz(t){return(0,m.mf)(t)?t:(0,m.a9)(+t)}function az(){var t=t=>t[0],e=t=>t[1],n=m.kX,i=[-1,-1],r=960,o=500,s=2;function a(a,l){const u=oz(i[0],a,t)>>s,c=oz(i[1],a,e)>>s,f=u?u+2:0,h=c?c+2:0,d=2*f+(r>>s),p=2*h+(o>>s),m=new Float32Array(d*p),g=new Float32Array(d*p);let y=m;a.forEach((i=>{const r=f+(+t(i)>>s),o=h+(+e(i)>>s);if(r>=0&&r<d&&o>=0&&o<p){m[r+o*d]+=+n(i)}}));if(u>0&&c>0){lz(d,p,m,g,u);uz(d,p,g,m,c);lz(d,p,m,g,u);uz(d,p,g,m,c);lz(d,p,m,g,u);uz(d,p,g,m,c)}else if(u>0){lz(d,p,m,g,u);lz(d,p,g,m,u);lz(d,p,m,g,u);y=g}else if(c>0){uz(d,p,m,g,c);uz(d,p,g,m,c);uz(d,p,m,g,c);y=g}const v=l?Math.pow(2,-2*s):1/bS(y);for(let t=0,e=d*p;t<e;++t)y[t]*=v;return{values:y,scale:1<<s,width:d,height:p,x1:f,y1:h,x2:f+(r>>s),y2:h+(o>>s)}}a.x=function(e){return arguments.length?(t=sz(e),a):t};a.y=function(t){return arguments.length?(e=sz(t),a):e};a.weight=function(t){return arguments.length?(n=sz(t),a):n};a.size=function(t){if(!arguments.length)return[r,o];var e=+t[0],n=+t[1];if(!(e>=0&&n>=0))(0,m.vU)("invalid size");return r=e,o=n,a};a.cellSize=function(t){if(!arguments.length)return 1<<s;if(!((t=+t)>=1))(0,m.vU)("invalid cell size");s=Math.floor(Math.log(t)/Math.LN2);return a};a.bandwidth=function(t){if(!arguments.length)return i;t=(0,m.IX)(t);if(t.length===1)t=[+t[0],+t[0]];if(t.length!==2)(0,m.vU)("invalid bandwidth");return i=t,a};return a}function lz(t,e,n,i,r){const o=(r<<1)+1;for(let s=0;s<e;++s){for(let e=0,a=0;e<t+r;++e){if(e<t){a+=n[e+s*t]}if(e>=r){if(e>=o){a-=n[e-o+s*t]}i[e-r+s*t]=a/Math.min(e+1,t-1+o-e,o)}}}}function uz(t,e,n,i,r){const o=(r<<1)+1;for(let s=0;s<t;++s){for(let a=0,l=0;a<e+r;++a){if(a<e){l+=n[s+a*t]}if(a>=r){if(a>=o){l-=n[s+(a-o)*t]}i[s+(a-r)*t]=l/Math.min(a+1,e-1+o-a,o)}}}}function cz(t){Cs.call(this,null,t)}cz.Definition={type:"KDE2D",metadata:{generates:true},params:[{name:"size",type:"number",array:true,length:2,required:true},{name:"x",type:"field",required:true},{name:"y",type:"field",required:true},{name:"weight",type:"field"},{name:"groupby",type:"field",array:true},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number",array:true,length:2},{name:"counts",type:"boolean",default:false},{name:"as",type:"string",default:"grid"}]};const fz=["x","y","weight","size","cellSize","bandwidth"];function hz(t,e){fz.forEach((n=>e[n]!=null?t[n](e[n]):0));return t}(0,m.XW)(cz,Cs,{transform(t,e){if(this.value&&!e.changed()&&!t.modified())return e.StopPropagation;var n=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=e.materialize(e.SOURCE).source,r=dz(i,t.groupby),o=(t.groupby||[]).map(m.el),s=hz(az(),t),a=t.as||"grid",l=[];function u(t,e){for(let n=0;n<o.length;++n)t[o[n]]=e[n];return t}l=r.map((e=>xo(u({[a]:s(e,t.counts)},e.dims))));if(this.value)n.rem=this.value;this.value=n.source=n.add=l;return n}});function dz(t,e){var n=[],i=t=>t(a),r,o,s,a,l,u;if(e==null){n.push(t)}else{for(r={},o=0,s=t.length;o<s;++o){a=t[o];l=e.map(i);u=r[l];if(!u){r[l]=u=[];u.dims=l;n.push(u)}u.push(a)}}return n}function pz(t){Cs.call(this,null,t)}pz.Definition={type:"Contour",metadata:{generates:true},params:[{name:"size",type:"number",array:true,length:2,required:true},{name:"values",type:"number",array:true},{name:"x",type:"field"},{name:"y",type:"field"},{name:"weight",type:"field"},{name:"cellSize",type:"number"},{name:"bandwidth",type:"number"},{name:"count",type:"number"},{name:"nice",type:"boolean",default:false},{name:"thresholds",type:"number",array:true},{name:"smooth",type:"boolean",default:true}]};(0,m.XW)(pz,Cs,{transform(t,e){if(this.value&&!e.changed()&&!t.modified()){return e.StopPropagation}var n=e.fork(e.NO_SOURCE|e.NO_FIELDS),i=YN().smooth(t.smooth!==false),r=t.values,o=t.thresholds||tz(t.count||10,t.nice,!!r),s=t.size,a,l;if(!r){r=e.materialize(e.SOURCE).source;a=hz(az(),t)(r,true);l=rz(a,a.scale||1,a.scale||1,0,0);s=[a.width,a.height];r=a.values}o=(0,m.kJ)(o)?o:o(r);r=i.size(s)(r,o);if(l)r.forEach(l);if(this.value)n.rem=this.value;this.value=n.source=n.add=(r||[]).map(xo);return n}});const mz="Feature";const gz="FeatureCollection";const yz="MultiPoint";function vz(t){Cs.call(this,null,t)}vz.Definition={type:"GeoJSON",metadata:{},params:[{name:"fields",type:"field",array:true,length:2},{name:"geojson",type:"field"}]};(0,m.XW)(vz,Cs,{transform(t,e){var n=this._features,i=this._points,r=t.fields,o=r&&r[0],s=r&&r[1],a=t.geojson||!r&&m.yR,l=e.ADD,u;u=t.modified()||e.changed(e.REM)||e.modified((0,m.Oj)(a))||o&&e.modified((0,m.Oj)(o))||s&&e.modified((0,m.Oj)(s));if(!this.value||u){l=e.SOURCE;this._features=n=[];this._points=i=[]}if(a){e.visit(l,(t=>n.push(a(t))))}if(o&&s){e.visit(l,(t=>{var e=o(t),n=s(t);if(e!=null&&n!=null&&(e=+e)===e&&(n=+n)===n){i.push([e,n])}}));n=n.concat({type:mz,geometry:{type:yz,coordinates:i}})}this.value={type:gz,features:n}}});function _z(t){Cs.call(this,null,t)}_z.Definition={type:"GeoPath",metadata:{modifies:true},params:[{name:"projection",type:"projection"},{name:"field",type:"field"},{name:"pointRadius",type:"number",expr:true},{name:"as",type:"string",default:"path"}]};(0,m.XW)(_z,Cs,{transform(t,e){var n=e.fork(e.ALL),i=this.value,r=t.field||m.yR,o=t.as||"path",s=n.SOURCE;if(!i||t.modified()){this.value=i=IN(t.projection);n.materialize().reflow()}else{s=r===m.yR||e.modified(r.fields)?n.ADD_MOD:n.ADD}const a=xz(i,t.pointRadius);n.visit(s,(t=>t[o]=i(r(t))));i.pointRadius(a);return n.modifies(o)}});function xz(t,e){const n=t.pointRadius();t.context(null);if(e!=null){t.pointRadius(e)}return n}function bz(t){Cs.call(this,null,t)}bz.Definition={type:"GeoPoint",metadata:{modifies:true},params:[{name:"projection",type:"projection",required:true},{name:"fields",type:"field",array:true,required:true,length:2},{name:"as",type:"string",array:true,length:2,default:["x","y"]}]};(0,m.XW)(bz,Cs,{transform(t,e){var n=t.projection,i=t.fields[0],r=t.fields[1],o=t.as||["x","y"],s=o[0],a=o[1],l;function u(t){const e=n([i(t),r(t)]);if(e){t[s]=e[0];t[a]=e[1]}else{t[s]=undefined;t[a]=undefined}}if(t.modified()){e=e.materialize().reflow(true).visit(e.SOURCE,u)}else{l=e.modified(i.fields)||e.modified(r.fields);e.visit(l?e.ADD_MOD:e.ADD,u)}return e.modifies(o)}});function wz(t){Cs.call(this,null,t)}wz.Definition={type:"GeoShape",metadata:{modifies:true,nomod:true},params:[{name:"projection",type:"projection"},{name:"field",type:"field",default:"datum"},{name:"pointRadius",type:"number",expr:true},{name:"as",type:"string",default:"shape"}]};(0,m.XW)(wz,Cs,{transform(t,e){var n=e.fork(e.ALL),i=this.value,r=t.as||"shape",o=n.ADD;if(!i||t.modified()){this.value=i=kz(IN(t.projection),t.field||(0,m.EP)("datum"),t.pointRadius);n.materialize().reflow();o=n.SOURCE}n.visit(o,(t=>t[r]=i));return n.modifies(r)}});function kz(t,e,n){const i=n==null?n=>t(e(n)):i=>{var r=t.pointRadius(),o=t.pointRadius(n)(e(i));t.pointRadius(r);return o};i.context=e=>{t.context(e);return i};return i}function Mz(t){Cs.call(this,[],t);this.generator=WN()}Mz.Definition={type:"Graticule",metadata:{changes:true,generates:true},params:[{name:"extent",type:"array",array:true,length:2,content:{type:"number",array:true,length:2}},{name:"extentMajor",type:"array",array:true,length:2,content:{type:"number",array:true,length:2}},{name:"extentMinor",type:"array",array:true,length:2,content:{type:"number",array:true,length:2}},{name:"step",type:"number",array:true,length:2},{name:"stepMajor",type:"number",array:true,length:2,default:[90,360]},{name:"stepMinor",type:"number",array:true,length:2,default:[10,10]},{name:"precision",type:"number",default:2.5}]};(0,m.XW)(Mz,Cs,{transform(t,e){var n=this.value,i=this.generator,r;if(!n.length||t.modified()){for(const e in t){if((0,m.mf)(i[e])){i[e](t[e])}}}r=i();if(n.length){e.mod.push(ko(n[0],r))}else{e.add.push(xo(r))}n[0]=r;return e}});function Sz(t){Cs.call(this,null,t)}Sz.Definition={type:"heatmap",metadata:{modifies:true},params:[{name:"field",type:"field"},{name:"color",type:"string",expr:true},{name:"opacity",type:"number",expr:true},{name:"resolve",type:"enum",values:["shared","independent"],default:"independent"},{name:"as",type:"string",default:"image"}]};(0,m.XW)(Sz,Cs,{transform(t,e){if(!e.changed()&&!t.modified()){return e.StopPropagation}var n=e.materialize(e.SOURCE).source,i=t.resolve==="shared",r=t.field||m.yR,o=Tz(t.opacity,t),s=Ez(t.color,t),a=t.as||"image",l={$x:0,$y:0,$value:0,$max:i?Ps(n.map((t=>Ps(r(t).values)))):0};n.forEach((t=>{const e=r(t);const n=(0,m.l7)({},t,l);if(!i)n.$max=Ps(e.values||[]);t[a]=Az(e,n,s.dep?s:(0,m.a9)(s(n)),o.dep?o:(0,m.a9)(o(n)))}));return e.reflow(true).modifies(a)}});function Ez(t,e){let n;if((0,m.mf)(t)){n=n=>Th(t(n,e));n.dep=Dz(t)}else{n=(0,m.a9)(Th(t||"#888"))}return n}function Tz(t,e){let n;if((0,m.mf)(t)){n=n=>t(n,e);n.dep=Dz(t)}else if(t){n=(0,m.a9)(t)}else{n=t=>t.$value/t.$max||0;n.dep=true}return n}function Dz(t){if(!(0,m.mf)(t))return false;const e=(0,m.Rg)((0,m.Oj)(t));return e.$x||e.$y||e.$value||e.$max}function Az(t,e,n,i){const r=t.width,o=t.height,s=t.x1||0,a=t.y1||0,l=t.x2||r,u=t.y2||o,c=t.values,f=c?t=>c[t]:m.bM,h=Vf(l-s,u-a),d=h.getContext("2d"),p=d.getImageData(0,0,l-s,u-a),g=p.data;for(let m=a,y=0;m<u;++m){e.$y=m-a;for(let t=s,o=m*r;t<l;++t,y+=4){e.$x=t-s;e.$value=f(t+o);const r=n(e);g[y+0]=r.r;g[y+1]=r.g;g[y+2]=r.b;g[y+3]=~~(255*i(e))}}d.putImageData(p,0,0);return h}function Nz(t){Cs.call(this,null,t);this.modified(true)}(0,m.XW)(Nz,Cs,{transform(t,e){let n=this.value;if(!n||t.modified("type")){this.value=n=Rz(t.type);$N.forEach((e=>{if(t[e]!=null)Cz(n,e,t[e])}))}else{$N.forEach((e=>{if(t.modified(e))Cz(n,e,t[e])}))}if(t.pointRadius!=null)n.path.pointRadius(t.pointRadius);if(t.fit)zz(n,t);return e.fork(e.NO_SOURCE|e.NO_FIELDS)}});function zz(t,e){const n=Oz(e.fit);e.extent?t.fitExtent(e.extent,n):e.size?t.fitSize(e.size,n):0}function Rz(t){const e=qN((t||"mercator").toLowerCase());if(!e)(0,m.vU)("Unrecognized projection type: "+t);return e()}function Cz(t,e,n){if((0,m.mf)(t[e]))t[e](n)}function Oz(t){t=(0,m.IX)(t);return t.length===1?t[0]:{type:gz,features:t.reduce(((t,e)=>t.concat(Uz(e))),[])}}function Uz(t){return t.type===gz?t.features:(0,m.IX)(t).filter((t=>t!=null)).map((t=>t.type===mz?t:{type:mz,geometry:t}))}function $z(t,e){var n,i=1;if(t==null)t=0;if(e==null)e=0;function r(){var r,o=n.length,s,a=0,l=0;for(r=0;r<o;++r){s=n[r],a+=s.x,l+=s.y}for(a=(a/o-t)*i,l=(l/o-e)*i,r=0;r<o;++r){s=n[r],s.x-=a,s.y-=l}}r.initialize=function(t){n=t};r.x=function(e){return arguments.length?(t=+e,r):t};r.y=function(t){return arguments.length?(e=+t,r):e};r.strength=function(t){return arguments.length?(i=+t,r):i};return r}function Pz(t){const e=+this._x.call(null,t),n=+this._y.call(null,t);return qz(this.cover(e,n),e,n,t)}function qz(t,e,n,i){if(isNaN(e)||isNaN(n))return t;var r,o=t._root,s={data:i},a=t._x0,l=t._y0,u=t._x1,c=t._y1,f,h,d,p,m,g,y,v;if(!o)return t._root=s,t;while(o.length){if(m=e>=(f=(a+u)/2))a=f;else u=f;if(g=n>=(h=(l+c)/2))l=h;else c=h;if(r=o,!(o=o[y=g<<1|m]))return r[y]=s,t}d=+t._x.call(null,o.data);p=+t._y.call(null,o.data);if(e===d&&n===p)return s.next=o,r?r[y]=s:t._root=s,t;do{r=r?r[y]=new Array(4):t._root=new Array(4);if(m=e>=(f=(a+u)/2))a=f;else u=f;if(g=n>=(h=(l+c)/2))l=h;else c=h}while((y=g<<1|m)===(v=(p>=h)<<1|d>=f));return r[v]=o,r[y]=s,t}function Iz(t){var e,n,i=t.length,r,o,s=new Array(i),a=new Array(i),l=Infinity,u=Infinity,c=-Infinity,f=-Infinity;for(n=0;n<i;++n){if(isNaN(r=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e)))continue;s[n]=r;a[n]=o;if(r<l)l=r;if(r>c)c=r;if(o<u)u=o;if(o>f)f=o}if(l>c||u>f)return this;this.cover(l,u).cover(c,f);for(n=0;n<i;++n){qz(this,s[n],a[n],t[n])}return this}function Lz(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,r=this._x1,o=this._y1;if(isNaN(n)){r=(n=Math.floor(t))+1;o=(i=Math.floor(e))+1}else{var s=r-n||1,a=this._root,l,u;while(n>t||t>=r||i>e||e>=o){u=(e<i)<<1|t<n;l=new Array(4),l[u]=a,a=l,s*=2;switch(u){case 0:r=n+s,o=i+s;break;case 1:n=r-s,o=i+s;break;case 2:r=n+s,i=o-s;break;case 3:n=r-s,i=o-s;break}}if(this._root&&this._root.length)this._root=a}this._x0=n;this._y0=i;this._x1=r;this._y1=o;return this}function Fz(){var t=[];this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}));return t}function jz(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?undefined:[[this._x0,this._y0],[this._x1,this._y1]]}function Wz(t,e,n,i,r){this.node=t;this.x0=e;this.y0=n;this.x1=i;this.y1=r}function Xz(t,e,n){var i,r=this._x0,o=this._y0,s,a,l,u,c=this._x1,f=this._y1,h=[],d=this._root,p,m;if(d)h.push(new Wz(d,r,o,c,f));if(n==null)n=Infinity;else{r=t-n,o=e-n;c=t+n,f=e+n;n*=n}while(p=h.pop()){if(!(d=p.node)||(s=p.x0)>c||(a=p.y0)>f||(l=p.x1)<r||(u=p.y1)<o)continue;if(d.length){var g=(s+l)/2,y=(a+u)/2;h.push(new Wz(d[3],g,y,l,u),new Wz(d[2],s,y,g,u),new Wz(d[1],g,a,l,y),new Wz(d[0],s,a,g,y));if(m=(e>=y)<<1|t>=g){p=h[h.length-1];h[h.length-1]=h[h.length-1-m];h[h.length-1-m]=p}}else{var v=t-+this._x.call(null,d.data),_=e-+this._y.call(null,d.data),x=v*v+_*_;if(x<n){var b=Math.sqrt(n=x);r=t-b,o=e-b;c=t+b,f=e+b;i=d.data}}}return i}function Hz(t){if(isNaN(c=+this._x.call(null,t))||isNaN(f=+this._y.call(null,t)))return this;var e,n=this._root,i,r,o,s=this._x0,a=this._y0,l=this._x1,u=this._y1,c,f,h,d,p,m,g,y;if(!n)return this;if(n.length)while(true){if(p=c>=(h=(s+l)/2))s=h;else l=h;if(m=f>=(d=(a+u)/2))a=d;else u=d;if(!(e=n,n=n[g=m<<1|p]))return this;if(!n.length)break;if(e[g+1&3]||e[g+2&3]||e[g+3&3])i=e,y=g}while(n.data!==t)if(!(r=n,n=n.next))return this;if(o=n.next)delete n.next;if(r)return o?r.next=o:delete r.next,this;if(!e)return this._root=o,this;o?e[g]=o:delete e[g];if((n=e[0]||e[1]||e[2]||e[3])&&n===(e[3]||e[2]||e[1]||e[0])&&!n.length){if(i)i[y]=n;else this._root=n}return this}function Bz(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this}function Yz(){return this._root}function Jz(){var t=0;this.visit((function(e){if(!e.length)do{++t}while(e=e.next)}));return t}function Gz(t){var e=[],n,i=this._root,r,o,s,a,l;if(i)e.push(new Wz(i,this._x0,this._y0,this._x1,this._y1));while(n=e.pop()){if(!t(i=n.node,o=n.x0,s=n.y0,a=n.x1,l=n.y1)&&i.length){var u=(o+a)/2,c=(s+l)/2;if(r=i[3])e.push(new Wz(r,u,c,a,l));if(r=i[2])e.push(new Wz(r,o,c,u,l));if(r=i[1])e.push(new Wz(r,u,s,a,c));if(r=i[0])e.push(new Wz(r,o,s,u,c))}}return this}function Vz(t){var e=[],n=[],i;if(this._root)e.push(new Wz(this._root,this._x0,this._y0,this._x1,this._y1));while(i=e.pop()){var r=i.node;if(r.length){var o,s=i.x0,a=i.y0,l=i.x1,u=i.y1,c=(s+l)/2,f=(a+u)/2;if(o=r[0])e.push(new Wz(o,s,a,c,f));if(o=r[1])e.push(new Wz(o,c,a,l,f));if(o=r[2])e.push(new Wz(o,s,f,c,u));if(o=r[3])e.push(new Wz(o,c,f,l,u))}n.push(i)}while(i=n.pop()){t(i.node,i.x0,i.y0,i.x1,i.y1)}return this}function Kz(t){return t[0]}function Zz(t){return arguments.length?(this._x=t,this):this._x}function Qz(t){return t[1]}function tR(t){return arguments.length?(this._y=t,this):this._y}function eR(t,e,n){var i=new nR(e==null?Kz:e,n==null?Qz:n,NaN,NaN,NaN,NaN);return t==null?i:i.addAll(t)}function nR(t,e,n,i,r,o){this._x=t;this._y=e;this._x0=n;this._y0=i;this._x1=r;this._y1=o;this._root=undefined}function iR(t){var e={data:t.data},n=e;while(t=t.next)n=n.next={data:t.data};return e}var rR=eR.prototype=nR.prototype;rR.copy=function(){var t=new nR(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,n,i;if(!e)return t;if(!e.length)return t._root=iR(e),t;n=[{source:e,target:t._root=new Array(4)}];while(e=n.pop()){for(var r=0;r<4;++r){if(i=e.source[r]){if(i.length)n.push({source:i,target:e.target[r]=new Array(4)});else e.target[r]=iR(i)}}}return t};rR.add=Pz;rR.addAll=Iz;rR.cover=Lz;rR.data=Fz;rR.extent=jz;rR.find=Xz;rR.remove=Hz;rR.removeAll=Bz;rR.root=Yz;rR.size=Jz;rR.visit=Gz;rR.visitAfter=Vz;rR.x=Zz;rR.y=tR;function oR(t){return function(){return t}}function sR(t){return(t()-.5)*1e-6}function aR(t){return t.x+t.vx}function lR(t){return t.y+t.vy}function uR(t){var e,n,i,r=1,o=1;if(typeof t!=="function")t=oR(t==null?1:+t);function s(){var t,s=e.length,l,u,c,f,h,d;for(var p=0;p<o;++p){l=eR(e,aR,lR).visitAfter(a);for(t=0;t<s;++t){u=e[t];h=n[u.index],d=h*h;c=u.x+u.vx;f=u.y+u.vy;l.visit(m)}}function m(t,e,n,o,s){var a=t.data,l=t.r,p=h+l;if(a){if(a.index>u.index){var m=c-a.x-a.vx,g=f-a.y-a.vy,y=m*m+g*g;if(y<p*p){if(m===0)m=sR(i),y+=m*m;if(g===0)g=sR(i),y+=g*g;y=(p-(y=Math.sqrt(y)))/y*r;u.vx+=(m*=y)*(p=(l*=l)/(d+l));u.vy+=(g*=y)*p;a.vx-=m*(p=1-p);a.vy-=g*p}}return}return e>c+p||o<c-p||n>f+p||s<f-p}}function a(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e){if(t[e]&&t[e].r>t.r){t.r=t[e].r}}}function l(){if(!e)return;var i,r=e.length,o;n=new Array(r);for(i=0;i<r;++i)o=e[i],n[o.index]=+t(o,i,e)}s.initialize=function(t,n){e=t;i=n;l()};s.iterations=function(t){return arguments.length?(o=+t,s):o};s.strength=function(t){return arguments.length?(r=+t,s):r};s.radius=function(e){return arguments.length?(t=typeof e==="function"?e:oR(+e),l(),s):t};return s}var cR={value:()=>{}};function fR(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new hR(n)}function hR(t){this._=t}function dR(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",i=t.indexOf(".");if(i>=0)n=t.slice(i+1),t=t.slice(0,i);if(t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}hR.prototype=fR.prototype={constructor:hR,on:function(t,e){var n=this._,i=dR(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){while(++o<s)if((r=(t=i[o]).type)&&(r=pR(n[r],t.name)))return r;return}if(e!=null&&typeof e!=="function")throw new Error("invalid callback: "+e);while(++o<s){if(r=(t=i[o]).type)n[r]=mR(n[r],t.name,e);else if(e==null)for(r in n)n[r]=mR(n[r],t.name,null)}return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new hR(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function pR(t,e){for(var n=0,i=t.length,r;n<i;++n){if((r=t[n]).name===e){return r.value}}}function mR(t,e,n){for(var i=0,r=t.length;i<r;++i){if(t[i].name===e){t[i]=cR,t=t.slice(0,i).concat(t.slice(i+1));break}}if(n!=null)t.push({name:e,value:n});return t}const gR=fR;var yR=0,vR=0,_R=0,xR=1e3,bR,wR,kR=0,MR=0,SR=0,ER=typeof performance==="object"&&performance.now?performance:Date,TR=typeof window==="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function DR(){return MR||(TR(AR),MR=ER.now()+SR)}function AR(){MR=0}function NR(){this._call=this._time=this._next=null}NR.prototype=zR.prototype={constructor:NR,restart:function(t,e,n){if(typeof t!=="function")throw new TypeError("callback is not a function");n=(n==null?DR():+n)+(e==null?0:+e);if(!this._next&&wR!==this){if(wR)wR._next=this;else bR=this;wR=this}this._call=t;this._time=n;$R()},stop:function(){if(this._call){this._call=null;this._time=Infinity;$R()}}};function zR(t,e,n){var i=new NR;i.restart(t,e,n);return i}function RR(){DR();++yR;var t=bR,e;while(t){if((e=MR-t._time)>=0)t._call.call(undefined,e);t=t._next}--yR}function CR(){MR=(kR=ER.now())+SR;yR=vR=0;try{RR()}finally{yR=0;UR();MR=0}}function OR(){var t=ER.now(),e=t-kR;if(e>xR)SR-=e,kR=t}function UR(){var t,e=bR,n,i=Infinity;while(e){if(e._call){if(i>e._time)i=e._time;t=e,e=e._next}else{n=e._next,e._next=null;e=t?t._next=n:bR=n}}wR=t;$R(i)}function $R(t){if(yR)return;if(vR)vR=clearTimeout(vR);var e=t-MR;if(e>24){if(t<Infinity)vR=setTimeout(CR,t-ER.now()-SR);if(_R)_R=clearInterval(_R)}else{if(!_R)kR=ER.now(),_R=setInterval(OR,xR);yR=1,TR(CR)}}const PR=1664525;const qR=1013904223;const IR=4294967296;function LR(){let t=1;return()=>(t=(PR*t+qR)%IR)/IR}function FR(t){return t.x}function jR(t){return t.y}var WR=10,XR=Math.PI*(3-Math.sqrt(5));function HR(t){var e,n=1,i=.001,r=1-Math.pow(i,1/300),o=0,s=.6,a=new Map,l=zR(f),u=gR("tick","end"),c=LR();if(t==null)t=[];function f(){h();u.call("tick",e);if(n<i){l.stop();u.call("end",e)}}function h(i){var l,u=t.length,c;if(i===undefined)i=1;for(var f=0;f<i;++f){n+=(o-n)*r;a.forEach((function(t){t(n)}));for(l=0;l<u;++l){c=t[l];if(c.fx==null)c.x+=c.vx*=s;else c.x=c.fx,c.vx=0;if(c.fy==null)c.y+=c.vy*=s;else c.y=c.fy,c.vy=0}}return e}function d(){for(var e=0,n=t.length,i;e<n;++e){i=t[e],i.index=e;if(i.fx!=null)i.x=i.fx;if(i.fy!=null)i.y=i.fy;if(isNaN(i.x)||isNaN(i.y)){var r=WR*Math.sqrt(.5+e),o=e*XR;i.x=r*Math.cos(o);i.y=r*Math.sin(o)}if(isNaN(i.vx)||isNaN(i.vy)){i.vx=i.vy=0}}}function p(e){if(e.initialize)e.initialize(t,c);return e}d();return e={tick:h,restart:function(){return l.restart(f),e},stop:function(){return l.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),a.forEach(p),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(i=+t,e):i},alphaDecay:function(t){return arguments.length?(r=+t,e):+r},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(s=1-t,e):1-s},randomSource:function(t){return arguments.length?(c=t,a.forEach(p),e):c},force:function(t,n){return arguments.length>1?(n==null?a.delete(t):a.set(t,p(n)),e):a.get(t)},find:function(e,n,i){var r=0,o=t.length,s,a,l,u,c;if(i==null)i=Infinity;else i*=i;for(r=0;r<o;++r){u=t[r];s=e-u.x;a=n-u.y;l=s*s+a*a;if(l<i)c=u,i=l}return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}}function BR(){var t,e,n,i,r=oR(-30),o,s=1,a=Infinity,l=.81;function u(n){var r,o=t.length,s=eR(t,FR,jR).visitAfter(f);for(i=n,r=0;r<o;++r)e=t[r],s.visit(h)}function c(){if(!t)return;var e,n=t.length,i;o=new Array(n);for(e=0;e<n;++e)i=t[e],o[i.index]=+r(i,e,t)}function f(t){var e=0,n,i,r=0,s,a,l;if(t.length){for(s=a=l=0;l<4;++l){if((n=t[l])&&(i=Math.abs(n.value))){e+=n.value,r+=i,s+=i*n.x,a+=i*n.y}}t.x=s/r;t.y=a/r}else{n=t;n.x=n.data.x;n.y=n.data.y;do{e+=o[n.data.index]}while(n=n.next)}t.value=e}function h(t,r,u,c){if(!t.value)return true;var f=t.x-e.x,h=t.y-e.y,d=c-r,p=f*f+h*h;if(d*d/l<p){if(p<a){if(f===0)f=sR(n),p+=f*f;if(h===0)h=sR(n),p+=h*h;if(p<s)p=Math.sqrt(s*p);e.vx+=f*t.value*i/p;e.vy+=h*t.value*i/p}return true}else if(t.length||p>=a)return;if(t.data!==e||t.next){if(f===0)f=sR(n),p+=f*f;if(h===0)h=sR(n),p+=h*h;if(p<s)p=Math.sqrt(s*p)}do{if(t.data!==e){d=o[t.data.index]*i/p;e.vx+=f*d;e.vy+=h*d}}while(t=t.next)}u.initialize=function(e,i){t=e;n=i;c()};u.strength=function(t){return arguments.length?(r=typeof t==="function"?t:oR(+t),c(),u):r};u.distanceMin=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)};u.distanceMax=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)};u.theta=function(t){return arguments.length?(l=t*t,u):Math.sqrt(l)};return u}function YR(t){return t.index}function JR(t,e){var n=t.get(e);if(!n)throw new Error("node not found: "+e);return n}function GR(t){var e=YR,n=f,i,r=oR(30),o,s,a,l,u,c=1;if(t==null)t=[];function f(t){return 1/Math.min(a[t.source.index],a[t.target.index])}function h(e){for(var n=0,r=t.length;n<c;++n){for(var s=0,a,f,h,d,p,m,g;s<r;++s){a=t[s],f=a.source,h=a.target;d=h.x+h.vx-f.x-f.vx||sR(u);p=h.y+h.vy-f.y-f.vy||sR(u);m=Math.sqrt(d*d+p*p);m=(m-o[s])/m*e*i[s];d*=m,p*=m;h.vx-=d*(g=l[s]);h.vy-=p*g;f.vx+=d*(g=1-g);f.vy+=p*g}}}function d(){if(!s)return;var n,r=s.length,u=t.length,c=new Map(s.map(((t,n)=>[e(t,n,s),t]))),f;for(n=0,a=new Array(r);n<u;++n){f=t[n],f.index=n;if(typeof f.source!=="object")f.source=JR(c,f.source);if(typeof f.target!=="object")f.target=JR(c,f.target);a[f.source.index]=(a[f.source.index]||0)+1;a[f.target.index]=(a[f.target.index]||0)+1}for(n=0,l=new Array(u);n<u;++n){f=t[n],l[n]=a[f.source.index]/(a[f.source.index]+a[f.target.index])}i=new Array(u),p();o=new Array(u),m()}function p(){if(!s)return;for(var e=0,r=t.length;e<r;++e){i[e]=+n(t[e],e,t)}}function m(){if(!s)return;for(var e=0,n=t.length;e<n;++e){o[e]=+r(t[e],e,t)}}h.initialize=function(t,e){s=t;u=e;d()};h.links=function(e){return arguments.length?(t=e,d(),h):t};h.id=function(t){return arguments.length?(e=t,h):e};h.iterations=function(t){return arguments.length?(c=+t,h):c};h.strength=function(t){return arguments.length?(n=typeof t==="function"?t:oR(+t),p(),h):n};h.distance=function(t){return arguments.length?(r=typeof t==="function"?t:oR(+t),m(),h):r};return h}function VR(t){var e=oR(.1),n,i,r;if(typeof t!=="function")t=oR(t==null?0:+t);function o(t){for(var e=0,o=n.length,s;e<o;++e){s=n[e],s.vx+=(r[e]-s.x)*i[e]*t}}function s(){if(!n)return;var o,s=n.length;i=new Array(s);r=new Array(s);for(o=0;o<s;++o){i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}o.initialize=function(t){n=t;s()};o.strength=function(t){return arguments.length?(e=typeof t==="function"?t:oR(+t),s(),o):e};o.x=function(e){return arguments.length?(t=typeof e==="function"?e:oR(+e),s(),o):t};return o}function KR(t){var e=oR(.1),n,i,r;if(typeof t!=="function")t=oR(t==null?0:+t);function o(t){for(var e=0,o=n.length,s;e<o;++e){s=n[e],s.vy+=(r[e]-s.y)*i[e]*t}}function s(){if(!n)return;var o,s=n.length;i=new Array(s);r=new Array(s);for(o=0;o<s;++o){i[o]=isNaN(r[o]=+t(n[o],o,n))?0:+e(n[o],o,n)}}o.initialize=function(t){n=t;s()};o.strength=function(t){return arguments.length?(e=typeof t==="function"?t:oR(+t),s(),o):e};o.y=function(e){return arguments.length?(t=typeof e==="function"?e:oR(+e),s(),o):t};return o}const ZR={center:$z,collide:uR,nbody:BR,link:GR,x:VR,y:KR};const QR="forces",tC=["alpha","alphaMin","alphaTarget","velocityDecay","forces"],eC=["static","iterations"],nC=["x","y","vx","vy"];function iC(t){Cs.call(this,null,t)}iC.Definition={type:"Force",metadata:{modifies:true},params:[{name:"static",type:"boolean",default:false},{name:"restart",type:"boolean",default:false},{name:"iterations",type:"number",default:300},{name:"alpha",type:"number",default:1},{name:"alphaMin",type:"number",default:.001},{name:"alphaTarget",type:"number",default:0},{name:"velocityDecay",type:"number",default:.4},{name:"forces",type:"param",array:true,params:[{key:{force:"center"},params:[{name:"x",type:"number",default:0},{name:"y",type:"number",default:0}]},{key:{force:"collide"},params:[{name:"radius",type:"number",expr:true},{name:"strength",type:"number",default:.7},{name:"iterations",type:"number",default:1}]},{key:{force:"nbody"},params:[{name:"strength",type:"number",default:-30},{name:"theta",type:"number",default:.9},{name:"distanceMin",type:"number",default:1},{name:"distanceMax",type:"number"}]},{key:{force:"link"},params:[{name:"links",type:"data"},{name:"id",type:"field"},{name:"distance",type:"number",default:30,expr:true},{name:"strength",type:"number",expr:true},{name:"iterations",type:"number",default:1}]},{key:{force:"x"},params:[{name:"strength",type:"number",default:.1},{name:"x",type:"field"}]},{key:{force:"y"},params:[{name:"strength",type:"number",default:.1},{name:"y",type:"field"}]}]},{name:"as",type:"string",array:true,modify:false,default:nC}]};(0,m.XW)(iC,Cs,{transform(t,e){var n=this.value,i=e.changed(e.ADD_REM),r=t.modified(tC),o=t.iterations||300;if(!n){this.value=n=oC(e.source,t);n.on("tick",rC(e.dataflow,this));if(!t.static){i=true;n.tick()}e.modifies("index")}else{if(i){e.modifies("index");n.nodes(e.source)}if(r||e.changed(e.MOD)){sC(n,t,0,e)}}if(r||i||t.modified(eC)||e.changed()&&t.restart){n.alpha(Math.max(n.alpha(),t.alpha||1)).alphaDecay(1-Math.pow(n.alphaMin(),1/o));if(t.static){for(n.stop();--o>=0;)n.tick()}else{if(n.stopped())n.restart();if(!i)return e.StopPropagation}}return this.finish(t,e)},finish(t,e){const n=e.dataflow;for(let a=this._argops,l=0,u=a.length,c;l<u;++l){c=a[l];if(c.name!==QR||c.op._argval.force!=="link"){continue}for(var i=c.op._argops,r=0,o=i.length,s;r<o;++r){if(i[r].name==="links"&&(s=i[r].op.source)){n.pulse(s,n.changeset().reflow());break}}}return e.reflow(t.modified()).modifies(nC)}});function rC(t,e){return()=>t.touch(e).run()}function oC(t,e){const n=HR(t),i=n.stop,r=n.restart;let o=false;n.stopped=()=>o;n.restart=()=>(o=false,r());n.stop=()=>(o=true,i());return sC(n,e,true).on("end",(()=>o=true))}function sC(t,e,n,i){var r=(0,m.IX)(e.forces),o,s,a,l;for(o=0,s=tC.length;o<s;++o){a=tC[o];if(a!==QR&&e.modified(a))t[a](e[a])}for(o=0,s=r.length;o<s;++o){l=QR+o;a=n||e.modified(QR,o)?lC(r[o]):i&&aC(r[o],i)?t.force(l):null;if(a)t.force(l,a)}for(s=t.numForces||0;o<s;++o){t.force(QR+o,null)}t.numForces=r.length;return t}function aC(t,e){var n,i;for(n in t){if((0,m.mf)(i=t[n])&&e.modified((0,m.Oj)(i)))return 1}return 0}function lC(t){var e,n;if(!(0,m.nr)(ZR,t.force)){(0,m.vU)("Unrecognized force: "+t.force)}e=ZR[t.force]();for(n in t){if((0,m.mf)(e[n]))uC(e[n],t[n],t)}return e}function uC(t,e,n){t((0,m.mf)(e)?t=>e(t,n):e)}function cC(t){var e=0,n=t.children,i=n&&n.length;if(!i)e=1;else while(--i>=0)e+=n[i].value;t.value=e}function fC(){return this.eachAfter(cC)}function hC(t,e){let n=-1;for(const i of this){t.call(e,i,++n,this)}return this}function dC(t,e){var n=this,i=[n],r,o,s=-1;while(n=i.pop()){t.call(e,n,++s,this);if(r=n.children){for(o=r.length-1;o>=0;--o){i.push(r[o])}}}return this}function pC(t,e){var n=this,i=[n],r=[],o,s,a,l=-1;while(n=i.pop()){r.push(n);if(o=n.children){for(s=0,a=o.length;s<a;++s){i.push(o[s])}}}while(n=r.pop()){t.call(e,n,++l,this)}return this}function mC(t,e){let n=-1;for(const i of this){if(t.call(e,i,++n,this)){return i}}}function gC(t){return this.eachAfter((function(e){var n=+t(e.data)||0,i=e.children,r=i&&i.length;while(--r>=0)n+=i[r].value;e.value=n}))}function yC(t){return this.eachBefore((function(e){if(e.children){e.children.sort(t)}}))}function vC(t){var e=this,n=_C(e,t),i=[e];while(e!==n){e=e.parent;i.push(e)}var r=i.length;while(t!==n){i.splice(r,0,t);t=t.parent}return i}function _C(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;t=n.pop();e=i.pop();while(t===e){r=t;t=n.pop();e=i.pop()}return r}function xC(){var t=this,e=[t];while(t=t.parent){e.push(t)}return e}function bC(){return Array.from(this)}function wC(){var t=[];this.eachBefore((function(e){if(!e.children){t.push(e)}}));return t}function kC(){var t=this,e=[];t.each((function(n){if(n!==t){e.push({source:n.parent,target:n})}}));return e}function*MC(){var t=this,e,n=[t],i,r,o;do{e=n.reverse(),n=[];while(t=e.pop()){yield t;if(i=t.children){for(r=0,o=i.length;r<o;++r){n.push(i[r])}}}}while(n.length)}function SC(t,e){if(t instanceof Map){t=[undefined,t];if(e===undefined)e=DC}else if(e===undefined){e=TC}var n=new zC(t),i,r=[n],o,s,a,l;while(i=r.pop()){if((s=e(i.data))&&(l=(s=Array.from(s)).length)){i.children=s;for(a=l-1;a>=0;--a){r.push(o=s[a]=new zC(s[a]));o.parent=i;o.depth=i.depth+1}}}return n.eachBefore(NC)}function EC(){return SC(this).eachBefore(AC)}function TC(t){return t.children}function DC(t){return Array.isArray(t)?t[1]:null}function AC(t){if(t.data.value!==undefined)t.value=t.data.value;t.data=t.data.data}function NC(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function zC(t){this.data=t;this.depth=this.height=0;this.parent=null}zC.prototype=SC.prototype={constructor:zC,count:fC,each:hC,eachAfter:pC,eachBefore:dC,find:mC,sum:gC,sort:yC,path:vC,ancestors:xC,descendants:bC,leaves:wC,links:kC,copy:EC,[Symbol.iterator]:MC};function RC(t){return t==null?null:CC(t)}function CC(t){if(typeof t!=="function")throw new Error;return t}function OC(){return 0}function UC(t){return function(){return t}}const $C=1664525;const PC=1013904223;const qC=4294967296;function IC(){let t=1;return()=>(t=($C*t+PC)%qC)/qC}function LC(t){return typeof t==="object"&&"length"in t?t:Array.from(t)}function FC(t,e){let n=t.length,i,r;while(n){r=e()*n--|0;i=t[n];t[n]=t[r];t[r]=i}return t}function jC(t){return WC(t,lcg())}function WC(t,e){var n=0,i=(t=FC(Array.from(t),e)).length,r=[],o,s;while(n<i){o=t[n];if(s&&BC(s,o))++n;else s=JC(r=XC(r,o)),n=0}return s}function XC(t,e){var n,i;if(YC(e,t))return[e];for(n=0;n<t.length;++n){if(HC(e,t[n])&&YC(VC(t[n],e),t)){return[t[n],e]}}for(n=0;n<t.length-1;++n){for(i=n+1;i<t.length;++i){if(HC(VC(t[n],t[i]),e)&&HC(VC(t[n],e),t[i])&&HC(VC(t[i],e),t[n])&&YC(KC(t[n],t[i],e),t)){return[t[n],t[i],e]}}}throw new Error}function HC(t,e){var n=t.r-e.r,i=e.x-t.x,r=e.y-t.y;return n<0||n*n<i*i+r*r}function BC(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,i=e.x-t.x,r=e.y-t.y;return n>0&&n*n>i*i+r*r}function YC(t,e){for(var n=0;n<e.length;++n){if(!BC(t,e[n])){return false}}return true}function JC(t){switch(t.length){case 1:return GC(t[0]);case 2:return VC(t[0],t[1]);case 3:return KC(t[0],t[1],t[2])}}function GC(t){return{x:t.x,y:t.y,r:t.r}}function VC(t,e){var n=t.x,i=t.y,r=t.r,o=e.x,s=e.y,a=e.r,l=o-n,u=s-i,c=a-r,f=Math.sqrt(l*l+u*u);return{x:(n+o+l/f*c)/2,y:(i+s+u/f*c)/2,r:(f+r+a)/2}}function KC(t,e,n){var i=t.x,r=t.y,o=t.r,s=e.x,a=e.y,l=e.r,u=n.x,c=n.y,f=n.r,h=i-s,d=i-u,p=r-a,m=r-c,g=l-o,y=f-o,v=i*i+r*r-o*o,_=v-s*s-a*a+l*l,x=v-u*u-c*c+f*f,b=d*p-h*m,w=(p*x-m*_)/(b*2)-i,k=(m*g-p*y)/b,M=(d*_-h*x)/(b*2)-r,S=(h*y-d*g)/b,E=k*k+S*S-1,T=2*(o+w*k+M*S),D=w*w+M*M-o*o,A=-(Math.abs(E)>1e-6?(T+Math.sqrt(T*T-4*E*D))/(2*E):D/T);return{x:i+w+k*A,y:r+M+S*A,r:A}}function ZC(t,e,n){var i=t.x-e.x,r,o,s=t.y-e.y,a,l,u=i*i+s*s;if(u){o=e.r+n.r,o*=o;l=t.r+n.r,l*=l;if(o>l){r=(u+l-o)/(2*u);a=Math.sqrt(Math.max(0,l/u-r*r));n.x=t.x-r*i-a*s;n.y=t.y-r*s+a*i}else{r=(u+o-l)/(2*u);a=Math.sqrt(Math.max(0,o/u-r*r));n.x=e.x+r*i-a*s;n.y=e.y+r*s+a*i}}else{n.x=e.x+n.r;n.y=e.y}}function QC(t,e){var n=t.r+e.r-1e-6,i=e.x-t.x,r=e.y-t.y;return n>0&&n*n>i*i+r*r}function tO(t){var e=t._,n=t.next._,i=e.r+n.r,r=(e.x*n.r+n.x*e.r)/i,o=(e.y*n.r+n.y*e.r)/i;return r*r+o*o}function eO(t){this._=t;this.next=null;this.previous=null}function nO(t,e){if(!(o=(t=LC(t)).length))return 0;var n,i,r,o,s,a,l,u,c,f,h;n=t[0],n.x=0,n.y=0;if(!(o>1))return n.r;i=t[1],n.x=-i.r,i.x=n.r,i.y=0;if(!(o>2))return n.r+i.r;ZC(i,n,r=t[2]);n=new eO(n),i=new eO(i),r=new eO(r);n.next=r.previous=i;i.next=n.previous=r;r.next=i.previous=n;t:for(l=3;l<o;++l){ZC(n._,i._,r=t[l]),r=new eO(r);u=i.next,c=n.previous,f=i._.r,h=n._.r;do{if(f<=h){if(QC(u._,r._)){i=u,n.next=i,i.previous=n,--l;continue t}f+=u._.r,u=u.next}else{if(QC(c._,r._)){n=c,n.next=i,i.previous=n,--l;continue t}h+=c._.r,c=c.previous}}while(u!==c.next);r.previous=n,r.next=i,n.next=i.previous=i=r;s=tO(n);while((r=r.next)!==i){if((a=tO(r))<s){n=r,s=a}}i=n.next}n=[i._],r=i;while((r=r.next)!==i)n.push(r._);r=WC(n,e);for(l=0;l<o;++l)n=t[l],n.x-=r.x,n.y-=r.y;return r.r}function iO(t){nO(t,lcg());return t}function rO(t){return Math.sqrt(t.value)}function oO(){var t=null,e=1,n=1,i=OC;function r(r){const o=IC();r.x=e/2,r.y=n/2;if(t){r.eachBefore(sO(t)).eachAfter(aO(i,.5,o)).eachBefore(lO(1))}else{r.eachBefore(sO(rO)).eachAfter(aO(OC,1,o)).eachAfter(aO(i,r.r/Math.min(e,n),o)).eachBefore(lO(Math.min(e,n)/(2*r.r)))}return r}r.radius=function(e){return arguments.length?(t=RC(e),r):t};r.size=function(t){return arguments.length?(e=+t[0],n=+t[1],r):[e,n]};r.padding=function(t){return arguments.length?(i=typeof t==="function"?t:UC(+t),r):i};return r}function sO(t){return function(e){if(!e.children){e.r=Math.max(0,+t(e)||0)}}}function aO(t,e,n){return function(i){if(r=i.children){var r,o,s=r.length,a=t(i)*e||0,l;if(a)for(o=0;o<s;++o)r[o].r+=a;l=nO(r,n);if(a)for(o=0;o<s;++o)r[o].r-=a;i.r=l+a}}}function lO(t){return function(e){var n=e.parent;e.r*=t;if(n){e.x=n.x+t*e.x;e.y=n.y+t*e.y}}}function uO(t){t.x0=Math.round(t.x0);t.y0=Math.round(t.y0);t.x1=Math.round(t.x1);t.y1=Math.round(t.y1)}function cO(t,e,n,i,r){var o=t.children,s,a=-1,l=o.length,u=t.value&&(i-e)/t.value;while(++a<l){s=o[a],s.y0=n,s.y1=r;s.x0=e,s.x1=e+=s.value*u}}function fO(){var t=1,e=1,n=0,i=false;function r(r){var s=r.height+1;r.x0=r.y0=n;r.x1=t;r.y1=e/s;r.eachBefore(o(e,s));if(i)r.eachBefore(uO);return r}function o(t,e){return function(i){if(i.children){cO(i,i.x0,t*(i.depth+1)/e,i.x1,t*(i.depth+2)/e)}var r=i.x0,o=i.y0,s=i.x1-n,a=i.y1-n;if(s<r)r=s=(r+s)/2;if(a<o)o=a=(o+a)/2;i.x0=r;i.y0=o;i.x1=s;i.y1=a}}r.round=function(t){return arguments.length?(i=!!t,r):i};r.size=function(n){return arguments.length?(t=+n[0],e=+n[1],r):[t,e]};r.padding=function(t){return arguments.length?(n=+t,r):n};return r}var hO={depth:-1},dO={},pO={};function mO(t){return t.id}function gO(t){return t.parentId}function yO(){var t=mO,e=gO,n;function i(i){var r=Array.from(i),o=t,s=e,a,l,u,c,f,h,d,p,m=new Map;if(n!=null){const t=r.map(((t,e)=>vO(n(t,e,i))));const e=t.map(_O);const a=new Set(t).add("");for(const n of e){if(!a.has(n)){a.add(n);t.push(n);e.push(_O(n));r.push(pO)}}o=(e,n)=>t[n];s=(t,n)=>e[n]}for(u=0,a=r.length;u<a;++u){l=r[u],h=r[u]=new zC(l);if((d=o(l,u,i))!=null&&(d+="")){p=h.id=d;m.set(p,m.has(p)?dO:h)}if((d=s(l,u,i))!=null&&(d+="")){h.parent=d}}for(u=0;u<a;++u){h=r[u];if(d=h.parent){f=m.get(d);if(!f)throw new Error("missing: "+d);if(f===dO)throw new Error("ambiguous: "+d);if(f.children)f.children.push(h);else f.children=[h];h.parent=f}else{if(c)throw new Error("multiple roots");c=h}}if(!c)throw new Error("no root");if(n!=null){while(c.data===pO&&c.children.length===1){c=c.children[0],--a}for(let t=r.length-1;t>=0;--t){h=r[t];if(h.data!==pO)break;h.data=null}}c.parent=hO;c.eachBefore((function(t){t.depth=t.parent.depth+1;--a})).eachBefore(NC);c.parent=null;if(a>0)throw new Error("cycle");return c}i.id=function(e){return arguments.length?(t=RC(e),i):t};i.parentId=function(t){return arguments.length?(e=RC(t),i):e};i.path=function(t){return arguments.length?(n=RC(t),i):n};return i}function vO(t){t=`${t}`;let e=t.length;if(xO(t,e-1)&&!xO(t,e-2))t=t.slice(0,-1);return t[0]==="/"?t:`/${t}`}function _O(t){let e=t.length;if(e<2)return"";while(--e>1)if(xO(t,e))break;return t.slice(0,e)}function xO(t,e){if(t[e]==="/"){let n=0;while(e>0&&t[--e]==="\\")++n;if((n&1)===0)return true}return false}function bO(t,e){return t.parent===e.parent?1:2}function wO(t){var e=t.children;return e?e[0]:t.t}function kO(t){var e=t.children;return e?e[e.length-1]:t.t}function MO(t,e,n){var i=n/(e.i-t.i);e.c-=i;e.s+=n;t.c+=i;e.z+=n;e.m+=n}function SO(t){var e=0,n=0,i=t.children,r=i.length,o;while(--r>=0){o=i[r];o.z+=e;o.m+=e;e+=o.s+(n+=o.c)}}function EO(t,e,n){return t.a.parent===e.parent?t.a:n}function TO(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}TO.prototype=Object.create(zC.prototype);function DO(t){var e=new TO(t,0),n,i=[e],r,o,s,a;while(n=i.pop()){if(o=n._.children){n.children=new Array(a=o.length);for(s=a-1;s>=0;--s){i.push(r=n.children[s]=new TO(o[s],s));r.parent=n}}}(e.parent=new TO(null,0)).children=[e];return e}function AO(){var t=bO,e=1,n=1,i=null;function r(r){var a=DO(r);a.eachAfter(o),a.parent.m=-a.z;a.eachBefore(s);if(i)r.eachBefore(l);else{var u=r,c=r,f=r;r.eachBefore((function(t){if(t.x<u.x)u=t;if(t.x>c.x)c=t;if(t.depth>f.depth)f=t}));var h=u===c?1:t(u,c)/2,d=h-u.x,p=e/(c.x+h+d),m=n/(f.depth||1);r.eachBefore((function(t){t.x=(t.x+d)*p;t.y=t.depth*m}))}return r}function o(e){var n=e.children,i=e.parent.children,r=e.i?i[e.i-1]:null;if(n){SO(e);var o=(n[0].z+n[n.length-1].z)/2;if(r){e.z=r.z+t(e._,r._);e.m=e.z-o}else{e.z=o}}else if(r){e.z=r.z+t(e._,r._)}e.parent.A=a(e,r,e.parent.A||i[0])}function s(t){t._.x=t.z+t.parent.m;t.m+=t.parent.m}function a(e,n,i){if(n){var r=e,o=e,s=n,a=r.parent.children[0],l=r.m,u=o.m,c=s.m,f=a.m,h;while(s=kO(s),r=wO(r),s&&r){a=wO(a);o=kO(o);o.a=e;h=s.z+c-r.z-l+t(s._,r._);if(h>0){MO(EO(s,e,i),e,h);l+=h;u+=h}c+=s.m;l+=r.m;f+=a.m;u+=o.m}if(s&&!kO(o)){o.t=s;o.m+=c-u}if(r&&!wO(a)){a.t=r;a.m+=l-f;i=e}}return i}function l(t){t.x*=e;t.y=t.depth*n}r.separation=function(e){return arguments.length?(t=e,r):t};r.size=function(t){return arguments.length?(i=false,e=+t[0],n=+t[1],r):i?null:[e,n]};r.nodeSize=function(t){return arguments.length?(i=true,e=+t[0],n=+t[1],r):i?[e,n]:null};return r}function NO(t,e){return t.parent===e.parent?1:2}function zO(t){return t.reduce(RO,0)/t.length}function RO(t,e){return t+e.x}function CO(t){return 1+t.reduce(OO,0)}function OO(t,e){return Math.max(t,e.y)}function UO(t){var e;while(e=t.children)t=e[0];return t}function $O(t){var e;while(e=t.children)t=e[e.length-1];return t}function PO(){var t=NO,e=1,n=1,i=false;function r(r){var o,s=0;r.eachAfter((function(e){var n=e.children;if(n){e.x=zO(n);e.y=CO(n)}else{e.x=o?s+=t(e,o):0;e.y=0;o=e}}));var a=UO(r),l=$O(r),u=a.x-t(a,l)/2,c=l.x+t(l,a)/2;return r.eachAfter(i?function(t){t.x=(t.x-r.x)*e;t.y=(r.y-t.y)*n}:function(t){t.x=(t.x-u)/(c-u)*e;t.y=(1-(r.y?t.y/r.y:1))*n})}r.separation=function(e){return arguments.length?(t=e,r):t};r.size=function(t){return arguments.length?(i=false,e=+t[0],n=+t[1],r):i?null:[e,n]};r.nodeSize=function(t){return arguments.length?(i=true,e=+t[0],n=+t[1],r):i?[e,n]:null};return r}function qO(t,e,n,i,r){var o=t.children,s,a=o.length,l,u=new Array(a+1);for(u[0]=l=s=0;s<a;++s){u[s+1]=l+=o[s].value}c(0,a,t.value,e,n,i,r);function c(t,e,n,i,r,s,a){if(t>=e-1){var l=o[t];l.x0=i,l.y0=r;l.x1=s,l.y1=a;return}var f=u[t],h=n/2+f,d=t+1,p=e-1;while(d<p){var m=d+p>>>1;if(u[m]<h)d=m+1;else p=m}if(h-u[d-1]<u[d]-h&&t+1<d)--d;var g=u[d]-f,y=n-g;if(s-i>a-r){var v=n?(i*y+s*g)/n:s;c(t,d,g,i,r,v,a);c(d,e,y,v,r,s,a)}else{var _=n?(r*y+a*g)/n:a;c(t,d,g,i,r,s,_);c(d,e,y,i,_,s,a)}}}function IO(t,e,n,i,r){var o=t.children,s,a=-1,l=o.length,u=t.value&&(r-n)/t.value;while(++a<l){s=o[a],s.x0=e,s.x1=i;s.y0=n,s.y1=n+=s.value*u}}function LO(t,e,n,i,r){(t.depth&1?IO:cO)(t,e,n,i,r)}var FO=(1+Math.sqrt(5))/2;function jO(t,e,n,i,r,o){var s=[],a=e.children,l,u,c=0,f=0,h=a.length,d,p,m=e.value,g,y,v,_,x,b,w;while(c<h){d=r-n,p=o-i;do{g=a[f++].value}while(!g&&f<h);y=v=g;b=Math.max(p/d,d/p)/(m*t);w=g*g*b;x=Math.max(v/w,w/y);for(;f<h;++f){g+=u=a[f].value;if(u<y)y=u;if(u>v)v=u;w=g*g*b;_=Math.max(v/w,w/y);if(_>x){g-=u;break}x=_}s.push(l={value:g,dice:d<p,children:a.slice(c,f)});if(l.dice)cO(l,n,i,r,m?i+=p*g/m:o);else IO(l,n,i,m?n+=d*g/m:r,o);m-=g,c=f}return s}const WO=function t(e){function n(t,n,i,r,o){jO(e,t,n,i,r,o)}n.ratio=function(e){return t((e=+e)>1?e:1)};return n}(FO);const XO=function t(e){function n(t,n,i,r,o){if((s=t._squarify)&&s.ratio===e){var s,a,l,u,c=-1,f,h=s.length,d=t.value;while(++c<h){a=s[c],l=a.children;for(u=a.value=0,f=l.length;u<f;++u)a.value+=l[u].value;if(a.dice)cO(a,n,i,r,d?i+=(o-i)*a.value/d:o);else IO(a,n,i,d?n+=(r-n)*a.value/d:r,o);d-=a.value}}else{t._squarify=s=jO(e,t,n,i,r,o);s.ratio=e}}n.ratio=function(e){return t((e=+e)>1?e:1)};return n}(FO);function HO(){var t=WO,e=false,n=1,i=1,r=[0],o=OC,s=OC,a=OC,l=OC,u=OC;function c(t){t.x0=t.y0=0;t.x1=n;t.y1=i;t.eachBefore(f);r=[0];if(e)t.eachBefore(uO);return t}function f(e){var n=r[e.depth],i=e.x0+n,c=e.y0+n,f=e.x1-n,h=e.y1-n;if(f<i)i=f=(i+f)/2;if(h<c)c=h=(c+h)/2;e.x0=i;e.y0=c;e.x1=f;e.y1=h;if(e.children){n=r[e.depth+1]=o(e)/2;i+=u(e)-n;c+=s(e)-n;f-=a(e)-n;h-=l(e)-n;if(f<i)i=f=(i+f)/2;if(h<c)c=h=(c+h)/2;t(e,i,c,f,h)}}c.round=function(t){return arguments.length?(e=!!t,c):e};c.size=function(t){return arguments.length?(n=+t[0],i=+t[1],c):[n,i]};c.tile=function(e){return arguments.length?(t=CC(e),c):t};c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()};c.paddingInner=function(t){return arguments.length?(o=typeof t==="function"?t:UC(+t),c):o};c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()};c.paddingTop=function(t){return arguments.length?(s=typeof t==="function"?t:UC(+t),c):s};c.paddingRight=function(t){return arguments.length?(a=typeof t==="function"?t:UC(+t),c):a};c.paddingBottom=function(t){return arguments.length?(l=typeof t==="function"?t:UC(+t),c):l};c.paddingLeft=function(t){return arguments.length?(u=typeof t==="function"?t:UC(+t),c):u};return c}function BO(t,e,n){const i={};t.each((t=>{const r=t.data;if(n(r))i[e(r)]=t}));t.lookup=i;return t}function YO(t){Cs.call(this,null,t)}YO.Definition={type:"Nest",metadata:{treesource:true,changes:true},params:[{name:"keys",type:"field",array:true},{name:"generate",type:"boolean"}]};const JO=t=>t.values;(0,m.XW)(YO,Cs,{transform(t,e){if(!e.source){(0,m.vU)("Nest transform requires an upstream data source.")}var n=t.generate,i=t.modified(),r=e.clone(),o=this.value;if(!o||i||e.changed()){if(o){o.each((t=>{if(t.children&&yo(t.data)){r.rem.push(t.data)}}))}this.value=o=SC({values:(0,m.IX)(t.keys).reduce(((t,e)=>{t.key(e);return t}),GO()).entries(r.source)},JO);if(n){o.each((t=>{if(t.children){t=xo(t.data);r.add.push(t);r.source.push(t)}}))}BO(o,vo,vo)}r.source.root=o;return r}});function GO(){const t=[],e={entries:t=>i(n(t,0),0),key:n=>(t.push(n),e)};function n(e,i){if(i>=t.length){return e}const r=e.length,o=t[i++],s={},a={};let l=-1,u,c,f;while(++l<r){u=o(c=e[l])+"";if(f=s[u]){f.push(c)}else{s[u]=[c]}}for(u in s){a[u]=n(s[u],i)}return a}function i(e,n){if(++n>t.length)return e;const r=[];for(const t in e){r.push({key:t,values:i(e[t],n)})}return r}return e}function VO(t){Cs.call(this,null,t)}const KO=(t,e)=>t.parent===e.parent?1:2;(0,m.XW)(VO,Cs,{transform(t,e){if(!e.source||!e.source.root){(0,m.vU)(this.constructor.name+" transform requires a backing tree data source.")}const n=this.layout(t.method),i=this.fields,r=e.source.root,o=t.as||i;if(t.field)r.sum(t.field);else r.count();if(t.sort)r.sort(Mo(t.sort,(t=>t.data)));ZO(n,this.params,t);if(n.separation){n.separation(t.separation!==false?KO:m.kX)}try{this.value=n(r)}catch(s){(0,m.vU)(s)}r.each((t=>QO(t,i,o)));return e.reflow(t.modified()).modifies(o).modifies("leaf")}});function ZO(t,e,n){for(let i,r=0,o=e.length;r<o;++r){i=e[r];if(i in n)t[i](n[i])}}function QO(t,e,n){const i=t.data,r=e.length-1;for(let o=0;o<r;++o){i[n[o]]=t[e[o]]}i[n[r]]=t.children?t.children.length:0}const tU=["x","y","r","depth","children"];function eU(t){VO.call(this,t)}eU.Definition={type:"Pack",metadata:{tree:true,modifies:true},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"radius",type:"field",default:null},{name:"size",type:"number",array:true,length:2},{name:"as",type:"string",array:true,length:tU.length,default:tU}]};(0,m.XW)(eU,VO,{layout:oO,params:["radius","size","padding"],fields:tU});const nU=["x0","y0","x1","y1","depth","children"];function iU(t){VO.call(this,t)}iU.Definition={type:"Partition",metadata:{tree:true,modifies:true},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"padding",type:"number",default:0},{name:"round",type:"boolean",default:false},{name:"size",type:"number",array:true,length:2},{name:"as",type:"string",array:true,length:nU.length,default:nU}]};(0,m.XW)(iU,VO,{layout:fO,params:["size","round","padding"],fields:nU});function rU(t){Cs.call(this,null,t)}rU.Definition={type:"Stratify",metadata:{treesource:true},params:[{name:"key",type:"field",required:true},{name:"parentKey",type:"field",required:true}]};(0,m.XW)(rU,Cs,{transform(t,e){if(!e.source){(0,m.vU)("Stratify transform requires an upstream data source.")}let n=this.value;const i=t.modified(),r=e.fork(e.ALL).materialize(e.SOURCE),o=!n||i||e.changed(e.ADD_REM)||e.modified(t.key.fields)||e.modified(t.parentKey.fields);r.source=r.source.slice();if(o){n=r.source.length?BO(yO().id(t.key).parentId(t.parentKey)(r.source),t.key,m.yb):BO(yO()([{}]),t.key,t.key)}r.source.root=this.value=n;return r}});const oU={tidy:AO,cluster:PO};const sU=["x","y","depth","children"];function aU(t){VO.call(this,t)}aU.Definition={type:"Tree",metadata:{tree:true,modifies:true},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"tidy",values:["tidy","cluster"]},{name:"size",type:"number",array:true,length:2},{name:"nodeSize",type:"number",array:true,length:2},{name:"separation",type:"boolean",default:true},{name:"as",type:"string",array:true,length:sU.length,default:sU}]};(0,m.XW)(aU,VO,{layout(t){const e=t||"tidy";if((0,m.nr)(oU,e))return oU[e]();else(0,m.vU)("Unrecognized Tree layout method: "+e)},params:["size","nodeSize"],fields:sU});function lU(t){Cs.call(this,[],t)}lU.Definition={type:"TreeLinks",metadata:{tree:true,generates:true,changes:true},params:[]};(0,m.XW)(lU,Cs,{transform(t,e){const n=this.value,i=e.source&&e.source.root,r=e.fork(e.NO_SOURCE),o={};if(!i)(0,m.vU)("TreeLinks transform requires a tree data source.");if(e.changed(e.ADD_REM)){r.rem=n;e.visit(e.SOURCE,(t=>o[vo(t)]=1));i.each((t=>{const e=t.data,n=t.parent&&t.parent.data;if(n&&o[vo(e)]&&o[vo(n)]){r.add.push(xo({source:n,target:e}))}}));this.value=r.add}else if(e.changed(e.MOD)){e.visit(e.MOD,(t=>o[vo(t)]=1));n.forEach((t=>{if(o[vo(t.source)]||o[vo(t.target)]){r.mod.push(t)}}))}return r}});const uU={binary:qO,dice:cO,slice:IO,slicedice:LO,squarify:WO,resquarify:XO};const cU=["x0","y0","x1","y1","depth","children"];function fU(t){VO.call(this,t)}fU.Definition={type:"Treemap",metadata:{tree:true,modifies:true},params:[{name:"field",type:"field"},{name:"sort",type:"compare"},{name:"method",type:"enum",default:"squarify",values:["squarify","resquarify","binary","dice","slice","slicedice"]},{name:"padding",type:"number",default:0},{name:"paddingInner",type:"number",default:0},{name:"paddingOuter",type:"number",default:0},{name:"paddingTop",type:"number",default:0},{name:"paddingRight",type:"number",default:0},{name:"paddingBottom",type:"number",default:0},{name:"paddingLeft",type:"number",default:0},{name:"ratio",type:"number",default:1.618033988749895},{name:"round",type:"boolean",default:false},{name:"size",type:"number",array:true,length:2},{name:"as",type:"string",array:true,length:cU.length,default:cU}]};(0,m.XW)(fU,VO,{layout(){const t=HO();t.ratio=e=>{const n=t.tile();if(n.ratio)t.tile(n.ratio(e))};t.method=e=>{if((0,m.nr)(uU,e))t.tile(uU[e]);else(0,m.vU)("Unrecognized Treemap layout method: "+e)};return t},params:["method","ratio","size","round","padding","paddingInner","paddingOuter","paddingTop","paddingRight","paddingBottom","paddingLeft"],fields:cU});const hU=4278190080;function dU(t,e){const n=t.bitmap();(e||[]).forEach((e=>n.set(t(e.boundary[0]),t(e.boundary[3]))));return[n,undefined]}function pU(t,e,n,i,r){const o=t.width,s=t.height,a=i||r,l=Vf(o,s).getContext("2d"),u=Vf(o,s).getContext("2d"),c=a&&Vf(o,s).getContext("2d");n.forEach((t=>gU(l,t,false)));gU(u,e,false);if(a){gU(c,e,true)}const f=mU(l,o,s),h=mU(u,o,s),d=a&&mU(c,o,s),p=t.bitmap(),m=a&&t.bitmap();let g,y,v,_,x,b,w,k;for(y=0;y<s;++y){for(g=0;g<o;++g){x=y*o+g;b=f[x]&hU;k=h[x]&hU;w=a&&d[x]&hU;if(b||w||k){v=t(g);_=t(y);if(!r&&(b||k))p.set(v,_);if(a&&(b||w))m.set(v,_)}}}return[p,m]}function mU(t,e,n){return new Uint32Array(t.getImageData(0,0,e,n).data.buffer)}function gU(t,e,n){if(!e.length)return;const i=e[0].mark.marktype;if(i==="group"){e.forEach((e=>{e.items.forEach((e=>gU(t,e.items,n)))}))}else{Sb[i].draw(t,{items:n?e.map(yU):e})}}function yU(t){const e=wo(t,{});if(e.stroke&&e.strokeOpacity!==0||e.fill&&e.fillOpacity!==0){return{...e,strokeOpacity:1,stroke:"#000",fillOpacity:0}}return e}const vU=5,_U=31,xU=32,bU=new Uint32Array(xU+1),wU=new Uint32Array(xU+1);wU[0]=0;bU[0]=~wU[0];for(let CV=1;CV<=xU;++CV){wU[CV]=wU[CV-1]<<1|1;bU[CV]=~wU[CV]}function kU(t,e){const n=new Uint32Array(~~((t*e+xU)/xU));function i(t,e){n[t]|=e}function r(t,e){n[t]&=e}return{array:n,get:(e,i)=>{const r=i*t+e;return n[r>>>vU]&1<<(r&_U)},set:(e,n)=>{const r=n*t+e;i(r>>>vU,1<<(r&_U))},clear:(e,n)=>{const i=n*t+e;r(i>>>vU,~(1<<(i&_U)))},getRange:(e,i,r,o)=>{let s=o,a,l,u,c;for(;s>=i;--s){a=s*t+e;l=s*t+r;u=a>>>vU;c=l>>>vU;if(u===c){if(n[u]&bU[a&_U]&wU[(l&_U)+1]){return true}}else{if(n[u]&bU[a&_U])return true;if(n[c]&wU[(l&_U)+1])return true;for(let t=u+1;t<c;++t){if(n[t])return true}}}return false},setRange:(e,n,r,o)=>{let s,a,l,u,c;for(;n<=o;++n){s=n*t+e;a=n*t+r;l=s>>>vU;u=a>>>vU;if(l===u){i(l,bU[s&_U]&wU[(a&_U)+1])}else{i(l,bU[s&_U]);i(u,wU[(a&_U)+1]);for(c=l+1;c<u;++c)i(c,4294967295)}}},clearRange:(e,n,i,o)=>{let s,a,l,u,c;for(;n<=o;++n){s=n*t+e;a=n*t+i;l=s>>>vU;u=a>>>vU;if(l===u){r(l,wU[s&_U]|bU[(a&_U)+1])}else{r(l,wU[s&_U]);r(u,bU[(a&_U)+1]);for(c=l+1;c<u;++c)r(c,0)}}},outOfBounds:(n,i,r,o)=>n<0||i<0||o>=e||r>=t}}function MU(t,e,n){const i=Math.max(1,Math.sqrt(t*e/1e6)),r=~~((t+2*n+i)/i),o=~~((e+2*n+i)/i),s=t=>~~((t+n)/i);s.invert=t=>t*i-n;s.bitmap=()=>kU(r,o);s.ratio=i;s.padding=n;s.width=t;s.height=e;return s}function SU(t,e,n,i){const r=t.width,o=t.height;return function(t){const e=t.datum.datum.items[i].items,n=e.length,s=t.datum.fontSize,a=Zx.width(t.datum,t.datum.text);let l=0,u,c,f,h,d,p,m;for(let i=0;i<n;++i){u=e[i].x;f=e[i].y;c=e[i].x2===undefined?u:e[i].x2;h=e[i].y2===undefined?f:e[i].y2;d=(u+c)/2;p=(f+h)/2;m=Math.abs(c-u+h-f);if(m>=l){l=m;t.x=d;t.y=p}}d=a/2;p=s/2;u=t.x-d;c=t.x+d;f=t.y-p;h=t.y+p;t.align="center";if(u<0&&c<=r){t.align="left"}else if(0<=u&&r<c){t.align="right"}t.baseline="middle";if(f<0&&h<=o){t.baseline="top"}else if(0<=f&&o<h){t.baseline="bottom"}return true}}function EU(t,e,n,i,r,o){let s=n/2;return t-s<0||t+s>r||e-(s=i/2)<0||e+s>o}function TU(t,e,n,i,r,o,s,a){const l=r*o/(i*2),u=t(e-l),c=t(e+l),f=t(n-(o=o/2)),h=t(n+o);return s.outOfBounds(u,f,c,h)||s.getRange(u,f,c,h)||a&&a.getRange(u,f,c,h)}function DU(t,e,n,i){const r=t.width,o=t.height,s=e[0],a=e[1];function l(e,n,i,l,u){const c=t.invert(e),f=t.invert(n);let h=i,d=o,p;if(!EU(c,f,l,u,r,o)&&!TU(t,c,f,u,l,h,s,a)&&!TU(t,c,f,u,l,u,s,null)){while(d-h>=1){p=(h+d)/2;if(TU(t,c,f,u,l,p,s,a)){d=p}else{h=p}}if(h>i){return[c,f,h,true]}}}return function(e){const a=e.datum.datum.items[i].items,u=a.length,c=e.datum.fontSize,f=Zx.width(e.datum,e.datum.text);let h=n?c:0,d=false,p=false,m=0,g,y,v,_,x,b,w,k,M,S,E,T,D,A,N,z,R;for(let i=0;i<u;++i){g=a[i].x;v=a[i].y;y=a[i].x2===undefined?g:a[i].x2;_=a[i].y2===undefined?v:a[i].y2;if(g>y){R=g;g=y;y=R}if(v>_){R=v;v=_;_=R}M=t(g);E=t(y);S=~~((M+E)/2);T=t(v);A=t(_);D=~~((T+A)/2);for(w=S;w>=M;--w){for(k=D;k>=T;--k){z=l(w,k,h,f,c);if(z){[e.x,e.y,h,d]=z}}}for(w=S;w<=E;++w){for(k=D;k<=A;++k){z=l(w,k,h,f,c);if(z){[e.x,e.y,h,d]=z}}}if(!d&&!n){N=Math.abs(y-g+_-v);x=(g+y)/2;b=(v+_)/2;if(N>=m&&!EU(x,b,f,c,r,o)&&!TU(t,x,b,c,f,c,s,null)){m=N;e.x=x;e.y=b;p=true}}}if(d||p){x=f/2;b=c/2;s.setRange(t(e.x-x),t(e.y-b),t(e.x+x),t(e.y+b));e.align="center";e.baseline="middle";return true}else{return false}}}const AU=[-1,-1,1,1];const NU=[-1,1,-1,1];function zU(t,e,n,i){const r=t.width,o=t.height,s=e[0],a=e[1],l=t.bitmap();return function(e){const u=e.datum.datum.items[i].items,c=u.length,f=e.datum.fontSize,h=Zx.width(e.datum,e.datum.text),d=[];let p=n?f:0,m=false,g=false,y=0,v,_,x,b,w,k,M,S,E,T,D,A;for(let i=0;i<c;++i){v=u[i].x;x=u[i].y;_=u[i].x2===undefined?v:u[i].x2;b=u[i].y2===undefined?x:u[i].y2;d.push([t((v+_)/2),t((x+b)/2)]);while(d.length){[M,S]=d.pop();if(s.get(M,S)||a.get(M,S)||l.get(M,S))continue;l.set(M,S);for(let t=0;t<4;++t){w=M+AU[t];k=S+NU[t];if(!l.outOfBounds(w,k,w,k))d.push([w,k])}w=t.invert(M);k=t.invert(S);E=p;T=o;if(!EU(w,k,h,f,r,o)&&!TU(t,w,k,f,h,E,s,a)&&!TU(t,w,k,f,h,f,s,null)){while(T-E>=1){D=(E+T)/2;if(TU(t,w,k,f,h,D,s,a)){T=D}else{E=D}}if(E>p){e.x=w;e.y=k;p=E;m=true}}}if(!m&&!n){A=Math.abs(_-v+b-x);w=(v+_)/2;k=(x+b)/2;if(A>=y&&!EU(w,k,h,f,r,o)&&!TU(t,w,k,f,h,f,s,null)){y=A;e.x=w;e.y=k;g=true}}}if(m||g){w=h/2;k=f/2;s.setRange(t(e.x-w),t(e.y-k),t(e.x+w),t(e.y+k));e.align="center";e.baseline="middle";return true}else{return false}}}const RU=["right","center","left"],CU=["bottom","middle","top"];function OU(t,e,n,i){const r=t.width,o=t.height,s=e[0],a=e[1],l=i.length;return function(e){var u;const c=e.boundary,f=e.datum.fontSize;if(c[2]<0||c[5]<0||c[0]>r||c[3]>o){return false}let h=(u=e.textWidth)!==null&&u!==void 0?u:0,d,p,m,g,y,v,_,x,b,w,k,M,S,E,T;for(let r=0;r<l;++r){d=(n[r]&3)-1;p=(n[r]>>>2&3)-1;m=d===0&&p===0||i[r]<0;g=d&&p?Math.SQRT1_2:1;y=i[r]<0?-1:1;v=c[1+d]+i[r]*d*g;k=c[4+p]+y*f*p/2+i[r]*p*g;x=k-f/2;b=k+f/2;M=t(v);E=t(x);T=t(b);if(!h){if(!UU(M,M,E,T,s,a,v,v,x,b,c,m)){continue}else{h=Zx.width(e.datum,e.datum.text)}}w=v+y*h*d/2;v=w-h/2;_=w+h/2;M=t(v);S=t(_);if(UU(M,S,E,T,s,a,v,_,x,b,c,m)){e.x=!d?w:d*y<0?_:v;e.y=!p?k:p*y<0?b:x;e.align=RU[d*y+1];e.baseline=CU[p*y+1];s.setRange(M,E,S,T);return true}}return false}}function UU(t,e,n,i,r,o,s,a,l,u,c,f){return!(r.outOfBounds(t,n,e,i)||(f&&o||r).getRange(t,n,e,i))}const $U=0,PU=4,qU=8,IU=0,LU=1,FU=2;const jU={"top-left":$U+IU,top:$U+LU,"top-right":$U+FU,left:PU+IU,middle:PU+LU,right:PU+FU,"bottom-left":qU+IU,bottom:qU+LU,"bottom-right":qU+FU};const WU={naive:SU,"reduced-search":DU,floodfill:zU};function XU(t,e,n,i,r,o,s,a,l,u,c){if(!t.length)return t;const f=Math.max(i.length,r.length),h=HU(i,f),d=BU(r,f),p=YU(t[0].datum),m=p==="group"&&t[0].datum.items[l].marktype,g=m==="area",y=JU(p,m,a,l),v=u===null||u===Infinity,_=g&&c==="naive";let x=-1,b=-1;const w=t.map((t=>{const e=v?Zx.width(t,t.text):undefined;x=Math.max(x,e);b=Math.max(b,t.fontSize);return{datum:t,opacity:0,x:undefined,y:undefined,align:undefined,baseline:undefined,boundary:y(t),textWidth:e}}));u=u===null||u===Infinity?Math.max(x,b)+Math.max(...i):u;const k=MU(e[0],e[1],u);let M;if(!_){if(n){w.sort(((t,e)=>n(t.datum,e.datum)))}let e=false;for(let t=0;t<d.length&&!e;++t){e=d[t]===5||h[t]<0}const i=(p&&s||g)&&t.map((t=>t.datum));M=o.length||i?pU(k,i||[],o,e,g):dU(k,s&&w)}const S=g?WU[c](k,M,s,l):OU(k,M,d,h);w.forEach((t=>t.opacity=+S(t)));return w}function HU(t,e){const n=new Float64Array(e),i=t.length;for(let r=0;r<i;++r)n[r]=t[r]||0;for(let r=i;r<e;++r)n[r]=n[i-1];return n}function BU(t,e){const n=new Int8Array(e),i=t.length;for(let r=0;r<i;++r)n[r]|=jU[t[r]];for(let r=i;r<e;++r)n[r]=n[i-1];return n}function YU(t){return t&&t.mark&&t.mark.marktype}function JU(t,e,n,i){const r=t=>[t.x,t.x,t.x,t.y,t.y,t.y];if(!t){return r}else if(t==="line"||t==="area"){return t=>r(t.datum)}else if(e==="line"){return t=>{const e=t.datum.items[i].items;return r(e.length?e[n==="start"?0:e.length-1]:{x:NaN,y:NaN})}}else{return t=>{const e=t.datum.bounds;return[e.x1,(e.x1+e.x2)/2,e.x2,e.y1,(e.y1+e.y2)/2,e.y2]}}}const GU=["x","y","opacity","align","baseline"];const VU=["top-left","left","bottom-left","top","bottom","top-right","right","bottom-right"];function KU(t){Cs.call(this,null,t)}KU.Definition={type:"Label",metadata:{modifies:true},params:[{name:"size",type:"number",array:true,length:2,required:true},{name:"sort",type:"compare"},{name:"anchor",type:"string",array:true,default:VU},{name:"offset",type:"number",array:true,default:[1]},{name:"padding",type:"number",default:0,null:true},{name:"lineAnchor",type:"string",values:["start","end"],default:"end"},{name:"markIndex",type:"number",default:0},{name:"avoidBaseMark",type:"boolean",default:true},{name:"avoidMarks",type:"data",array:true},{name:"method",type:"string",default:"naive"},{name:"as",type:"string",array:true,length:GU.length,default:GU}]};(0,m.XW)(KU,Cs,{transform(t,e){function n(n){const i=t[n];return(0,m.mf)(i)&&e.modified(i.fields)}const i=t.modified();if(!(i||e.changed(e.ADD_REM)||n("sort")))return;if(!t.size||t.size.length!==2){(0,m.vU)("Size parameter should be specified as a [width, height] array.")}const r=t.as||GU;XU(e.materialize(e.SOURCE).source||[],t.size,t.sort,(0,m.IX)(t.offset==null?1:t.offset),(0,m.IX)(t.anchor||VU),t.avoidMarks||[],t.avoidBaseMark!==false,t.lineAnchor||"end",t.markIndex||0,t.padding===undefined?0:t.padding,t.method||"naive").forEach((t=>{const e=t.datum;e[r[0]]=t.x;e[r[1]]=t.y;e[r[2]]=t.opacity;e[r[3]]=t.align;e[r[4]]=t.baseline}));return e.reflow(i).modifies(r)}});function ZU(t,e){var n=[],i=function(t){return t(a)},r,o,s,a,l,u;if(e==null){n.push(t)}else{for(r={},o=0,s=t.length;o<s;++o){a=t[o];l=e.map(i);u=r[l];if(!u){r[l]=u=[];u.dims=l;n.push(u)}u.push(a)}}return n}function QU(t){Cs.call(this,null,t)}QU.Definition={type:"Loess",metadata:{generates:true},params:[{name:"x",type:"field",required:true},{name:"y",type:"field",required:true},{name:"groupby",type:"field",array:true},{name:"bandwidth",type:"number",default:.3},{name:"as",type:"string",array:true}]};(0,m.XW)(QU,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){const i=e.materialize(e.SOURCE).source,r=ZU(i,t.groupby),o=(t.groupby||[]).map(m.el),s=o.length,a=t.as||[(0,m.el)(t.x),(0,m.el)(t.y)],l=[];r.forEach((e=>{Xa(e,t.x,t.y,t.bandwidth||.3).forEach((t=>{const n={};for(let i=0;i<s;++i){n[o[i]]=e.dims[i]}n[a[0]]=t[0];n[a[1]]=t[1];l.push(xo(n))}))}));if(this.value)n.rem=this.value;this.value=n.add=n.source=l}return n}});const t$={linear:Oa,log:Ua,exp:$a,pow:Pa,quad:qa,poly:Ia};const e$=(t,e)=>t==="poly"?e:t==="quad"?2:1;function n$(t){Cs.call(this,null,t)}n$.Definition={type:"Regression",metadata:{generates:true},params:[{name:"x",type:"field",required:true},{name:"y",type:"field",required:true},{name:"groupby",type:"field",array:true},{name:"method",type:"string",default:"linear",values:Object.keys(t$)},{name:"order",type:"number",default:3},{name:"extent",type:"number",array:true,length:2},{name:"params",type:"boolean",default:false},{name:"as",type:"string",array:true}]};(0,m.XW)(n$,Cs,{transform(t,e){const n=e.fork(e.NO_SOURCE|e.NO_FIELDS);if(!this.value||e.changed()||t.modified()){const i=e.materialize(e.SOURCE).source,r=ZU(i,t.groupby),o=(t.groupby||[]).map(m.el),s=t.method||"linear",a=t.order||3,l=e$(s,a),u=t.as||[(0,m.el)(t.x),(0,m.el)(t.y)],c=t$[s],f=[];let h=t.extent;if(!(0,m.nr)(t$,s)){(0,m.vU)("Invalid regression method: "+s)}if(h!=null){if(s==="log"&&h[0]<=0){e.dataflow.warn("Ignoring extent with values <= 0 for log regression.");h=null}}r.forEach((n=>{const i=n.length;if(i<=l){e.dataflow.warn("Skipping regression with more parameters than data points.");return}const r=c(n,t.x,t.y,a);if(t.params){f.push(xo({keys:n.dims,coef:r.coef,rSquared:r.rSquared}));return}const d=h||(0,m.We)(n,t.x),p=t=>{const e={};for(let i=0;i<o.length;++i){e[o[i]]=n.dims[i]}e[u[0]]=t[0];e[u[1]]=t[1];f.push(xo(e))};if(s==="linear"){d.forEach((t=>p([t,r.predict(t)])))}else{Ga(r.predict,d,25,200).forEach(p)}}));if(this.value)n.rem=this.value;this.value=n.add=n.source=f}return n}});const i$=11102230246251565e-32;const r$=134217729;const o$=(3+8*i$)*i$;function s$(t,e,n,i,r){let o,s,a,l;let u=e[0];let c=i[0];let f=0;let h=0;if(c>u===c>-u){o=u;u=e[++f]}else{o=c;c=i[++h]}let d=0;if(f<t&&h<n){if(c>u===c>-u){s=u+o;a=o-(s-u);u=e[++f]}else{s=c+o;a=o-(s-c);c=i[++h]}o=s;if(a!==0){r[d++]=a}while(f<t&&h<n){if(c>u===c>-u){s=o+u;l=s-o;a=o-(s-l)+(u-l);u=e[++f]}else{s=o+c;l=s-o;a=o-(s-l)+(c-l);c=i[++h]}o=s;if(a!==0){r[d++]=a}}}while(f<t){s=o+u;l=s-o;a=o-(s-l)+(u-l);u=e[++f];o=s;if(a!==0){r[d++]=a}}while(h<n){s=o+c;l=s-o;a=o-(s-l)+(c-l);c=i[++h];o=s;if(a!==0){r[d++]=a}}if(o!==0||d===0){r[d++]=o}return d}function a$(t,e,n,i,r,o,s,a){return s$(s$(t,e,n,i,s),s,r,o,a)}function l$(t,e,n,i){let r,o,s,a,l;let u,c,f,h,d,p;c=r$*n;d=c-(c-n);p=n-d;let m=e[0];r=m*n;c=r$*m;f=c-(c-m);h=m-f;s=h*p-(r-f*d-h*d-f*p);let g=0;if(s!==0){i[g++]=s}for(let y=1;y<t;y++){m=e[y];a=m*n;c=r$*m;f=c-(c-m);h=m-f;l=h*p-(a-f*d-h*d-f*p);o=r+l;u=o-r;s=r-(o-u)+(l-u);if(s!==0){i[g++]=s}r=a+o;s=o-(r-a);if(s!==0){i[g++]=s}}if(r!==0||g===0){i[g++]=r}return g}function u$(t,e){for(let n=0;n<t;n++)e[n]=-e[n];return t}function c$(t,e){let n=e[0];for(let i=1;i<t;i++)n+=e[i];return n}function f$(t){return new Float64Array(t)}const h$=(3+16*i$)*i$;const d$=(2+12*i$)*i$;const p$=(9+64*i$)*i$*i$;const m$=f$(4);const g$=f$(8);const y$=f$(12);const v$=f$(16);const _$=f$(4);function x$(t,e,n,i,r,o,s){let a,l,u,c;let f,h,d,p,m,g,y,v,_,x,b,w,k,M;const S=t-r;const E=n-r;const T=e-o;const D=i-o;x=S*D;h=r$*S;d=h-(h-S);p=S-d;h=r$*D;m=h-(h-D);g=D-m;b=p*g-(x-d*m-p*m-d*g);w=T*E;h=r$*T;d=h-(h-T);p=T-d;h=r$*E;m=h-(h-E);g=E-m;k=p*g-(w-d*m-p*m-d*g);y=b-k;f=b-y;m$[0]=b-(y+f)+(f-k);v=x+y;f=v-x;_=x-(v-f)+(y-f);y=_-w;f=_-y;m$[1]=_-(y+f)+(f-w);M=v+y;f=M-v;m$[2]=v-(M-f)+(y-f);m$[3]=M;let A=c$(4,m$);let N=d$*s;if(A>=N||-A>=N){return A}f=t-S;a=t-(S+f)+(f-r);f=n-E;u=n-(E+f)+(f-r);f=e-T;l=e-(T+f)+(f-o);f=i-D;c=i-(D+f)+(f-o);if(a===0&&l===0&&u===0&&c===0){return A}N=p$*s+o$*Math.abs(A);A+=S*c+D*a-(T*u+E*l);if(A>=N||-A>=N)return A;x=a*D;h=r$*a;d=h-(h-a);p=a-d;h=r$*D;m=h-(h-D);g=D-m;b=p*g-(x-d*m-p*m-d*g);w=l*E;h=r$*l;d=h-(h-l);p=l-d;h=r$*E;m=h-(h-E);g=E-m;k=p*g-(w-d*m-p*m-d*g);y=b-k;f=b-y;_$[0]=b-(y+f)+(f-k);v=x+y;f=v-x;_=x-(v-f)+(y-f);y=_-w;f=_-y;_$[1]=_-(y+f)+(f-w);M=v+y;f=M-v;_$[2]=v-(M-f)+(y-f);_$[3]=M;const z=s$(4,m$,4,_$,g$);x=S*c;h=r$*S;d=h-(h-S);p=S-d;h=r$*c;m=h-(h-c);g=c-m;b=p*g-(x-d*m-p*m-d*g);w=T*u;h=r$*T;d=h-(h-T);p=T-d;h=r$*u;m=h-(h-u);g=u-m;k=p*g-(w-d*m-p*m-d*g);y=b-k;f=b-y;_$[0]=b-(y+f)+(f-k);v=x+y;f=v-x;_=x-(v-f)+(y-f);y=_-w;f=_-y;_$[1]=_-(y+f)+(f-w);M=v+y;f=M-v;_$[2]=v-(M-f)+(y-f);_$[3]=M;const R=s$(z,g$,4,_$,y$);x=a*c;h=r$*a;d=h-(h-a);p=a-d;h=r$*c;m=h-(h-c);g=c-m;b=p*g-(x-d*m-p*m-d*g);w=l*u;h=r$*l;d=h-(h-l);p=l-d;h=r$*u;m=h-(h-u);g=u-m;k=p*g-(w-d*m-p*m-d*g);y=b-k;f=b-y;_$[0]=b-(y+f)+(f-k);v=x+y;f=v-x;_=x-(v-f)+(y-f);y=_-w;f=_-y;_$[1]=_-(y+f)+(f-w);M=v+y;f=M-v;_$[2]=v-(M-f)+(y-f);_$[3]=M;const C=s$(R,y$,4,_$,v$);return v$[C-1]}function b$(t,e,n,i,r,o){const s=(e-o)*(n-r);const a=(t-r)*(i-o);const l=s-a;if(s===0||a===0||s>0!==a>0)return l;const u=Math.abs(s+a);if(Math.abs(l)>=h$*u)return l;return-x$(t,e,n,i,r,o,u)}function w$(t,e,n,i,r,o){return(e-o)*(n-r)-(t-r)*(i-o)}const k$=(7+56*i$)*i$;const M$=(3+28*i$)*i$;const S$=(26+288*i$)*i$*i$;const E$=f$(4);const T$=f$(4);const D$=f$(4);const A$=f$(4);const N$=f$(4);const z$=f$(4);const R$=f$(4);const C$=f$(4);const O$=f$(4);const U$=f$(8);const $$=f$(8);const P$=f$(8);const q$=f$(4);const I$=f$(8);const L$=f$(8);const F$=f$(8);const j$=f$(12);let W$=f$(192);let X$=f$(192);function H$(t,e,n){t=sum(t,W$,e,n,X$);const i=W$;W$=X$;X$=i;return t}function B$(t,e,n,i,r,o,s,a){let l,u,c,f,h,d,p,m,g,y,v,_,x,b,w,k;if(t===0){if(e===0){s[0]=0;a[0]=0;return 1}else{k=-e;v=k*n;u=splitter*k;c=u-(u-k);f=k-c;u=splitter*n;h=u-(u-n);d=n-h;s[0]=f*d-(v-c*h-f*h-c*d);s[1]=v;v=e*r;u=splitter*e;c=u-(u-e);f=e-c;u=splitter*r;h=u-(u-r);d=r-h;a[0]=f*d-(v-c*h-f*h-c*d);a[1]=v;return 2}}else{if(e===0){v=t*i;u=splitter*t;c=u-(u-t);f=t-c;u=splitter*i;h=u-(u-i);d=i-h;s[0]=f*d-(v-c*h-f*h-c*d);s[1]=v;k=-t;v=k*o;u=splitter*k;c=u-(u-k);f=k-c;u=splitter*o;h=u-(u-o);d=o-h;a[0]=f*d-(v-c*h-f*h-c*d);a[1]=v;return 2}else{v=t*i;u=splitter*t;c=u-(u-t);f=t-c;u=splitter*i;h=u-(u-i);d=i-h;_=f*d-(v-c*h-f*h-c*d);x=e*n;u=splitter*e;c=u-(u-e);f=e-c;u=splitter*n;h=u-(u-n);d=n-h;b=f*d-(x-c*h-f*h-c*d);p=_-b;l=_-p;s[0]=_-(p+l)+(l-b);m=v+p;l=m-v;y=v-(m-l)+(p-l);p=y-x;l=y-p;s[1]=y-(p+l)+(l-x);w=m+p;l=w-m;s[2]=m-(w-l)+(p-l);s[3]=w;v=e*r;u=splitter*e;c=u-(u-e);f=e-c;u=splitter*r;h=u-(u-r);d=r-h;_=f*d-(v-c*h-f*h-c*d);x=t*o;u=splitter*t;c=u-(u-t);f=t-c;u=splitter*o;h=u-(u-o);d=o-h;b=f*d-(x-c*h-f*h-c*d);p=_-b;l=_-p;a[0]=_-(p+l)+(l-b);m=v+p;l=m-v;y=v-(m-l)+(p-l);p=y-x;l=y-p;a[1]=y-(p+l)+(l-x);w=m+p;l=w-m;a[2]=m-(w-l)+(p-l);a[3]=w;return 4}}}function Y$(t,e,n,i,r){let o,s,a,l,u,c,f,h,d,p,m,g,y;m=e*n;s=splitter*e;a=s-(s-e);l=e-a;s=splitter*n;u=s-(s-n);c=n-u;g=l*c-(m-a*u-l*u-a*c);s=splitter*i;u=s-(s-i);c=i-u;f=g*i;s=splitter*g;a=s-(s-g);l=g-a;q$[0]=l*c-(f-a*u-l*u-a*c);h=m*i;s=splitter*m;a=s-(s-m);l=m-a;p=l*c-(h-a*u-l*u-a*c);d=f+p;o=d-f;q$[1]=f-(d-o)+(p-o);y=h+d;q$[2]=d-(y-h);q$[3]=y;t=H$(t,4,q$);if(r!==0){s=splitter*r;u=s-(s-r);c=r-u;f=g*r;s=splitter*g;a=s-(s-g);l=g-a;q$[0]=l*c-(f-a*u-l*u-a*c);h=m*r;s=splitter*m;a=s-(s-m);l=m-a;p=l*c-(h-a*u-l*u-a*c);d=f+p;o=d-f;q$[1]=f-(d-o)+(p-o);y=h+d;q$[2]=d-(y-h);q$[3]=y;t=H$(t,4,q$)}return t}function J$(t,e,n,i,r,o,s,a,l,u,c,f,h){let d;let p,m,g;let y,v,_;let x,b,w;let k,M,S,E,T,D,A,N,z,R,C,O,U,$,P;const q=t-u;const I=i-u;const L=s-u;const F=e-c;const j=r-c;const W=a-c;const X=n-f;const H=o-f;const B=l-f;C=I*W;M=splitter*I;S=M-(M-I);E=I-S;M=splitter*W;T=M-(M-W);D=W-T;O=E*D-(C-S*T-E*T-S*D);U=L*j;M=splitter*L;S=M-(M-L);E=L-S;M=splitter*j;T=M-(M-j);D=j-T;$=E*D-(U-S*T-E*T-S*D);A=O-$;k=O-A;E$[0]=O-(A+k)+(k-$);N=C+A;k=N-C;R=C-(N-k)+(A-k);A=R-U;k=R-A;E$[1]=R-(A+k)+(k-U);P=N+A;k=P-N;E$[2]=N-(P-k)+(A-k);E$[3]=P;C=L*F;M=splitter*L;S=M-(M-L);E=L-S;M=splitter*F;T=M-(M-F);D=F-T;O=E*D-(C-S*T-E*T-S*D);U=q*W;M=splitter*q;S=M-(M-q);E=q-S;M=splitter*W;T=M-(M-W);D=W-T;$=E*D-(U-S*T-E*T-S*D);A=O-$;k=O-A;T$[0]=O-(A+k)+(k-$);N=C+A;k=N-C;R=C-(N-k)+(A-k);A=R-U;k=R-A;T$[1]=R-(A+k)+(k-U);P=N+A;k=P-N;T$[2]=N-(P-k)+(A-k);T$[3]=P;C=q*j;M=splitter*q;S=M-(M-q);E=q-S;M=splitter*j;T=M-(M-j);D=j-T;O=E*D-(C-S*T-E*T-S*D);U=I*F;M=splitter*I;S=M-(M-I);E=I-S;M=splitter*F;T=M-(M-F);D=F-T;$=E*D-(U-S*T-E*T-S*D);A=O-$;k=O-A;D$[0]=O-(A+k)+(k-$);N=C+A;k=N-C;R=C-(N-k)+(A-k);A=R-U;k=R-A;D$[1]=R-(A+k)+(k-U);P=N+A;k=P-N;D$[2]=N-(P-k)+(A-k);D$[3]=P;d=sum(sum(scale(4,E$,X,I$),I$,scale(4,T$,H,L$),L$,F$),F$,scale(4,D$,B,I$),I$,W$);let Y=estimate(d,W$);let J=M$*h;if(Y>=J||-Y>=J){return Y}k=t-q;p=t-(q+k)+(k-u);k=i-I;m=i-(I+k)+(k-u);k=s-L;g=s-(L+k)+(k-u);k=e-F;y=e-(F+k)+(k-c);k=r-j;v=r-(j+k)+(k-c);k=a-W;_=a-(W+k)+(k-c);k=n-X;x=n-(X+k)+(k-f);k=o-H;b=o-(H+k)+(k-f);k=l-B;w=l-(B+k)+(k-f);if(p===0&&m===0&&g===0&&y===0&&v===0&&_===0&&x===0&&b===0&&w===0){return Y}J=S$*h+resulterrbound*Math.abs(Y);Y+=X*(I*_+W*m-(j*g+L*v))+x*(I*W-j*L)+H*(L*y+F*g-(W*p+q*_))+b*(L*F-W*q)+B*(q*v+j*p-(F*m+I*y))+w*(q*j-F*I);if(Y>=J||-Y>=J){return Y}const G=B$(p,y,I,j,L,W,A$,N$);const V=B$(m,v,L,W,q,F,z$,R$);const K=B$(g,_,q,F,I,j,C$,O$);const Z=sum(V,z$,K,O$,U$);d=H$(d,scale(Z,U$,X,F$),F$);const Q=sum(K,C$,G,N$,$$);d=H$(d,scale(Q,$$,H,F$),F$);const tt=sum(G,A$,V,R$,P$);d=H$(d,scale(tt,P$,B,F$),F$);if(x!==0){d=H$(d,scale(4,E$,x,j$),j$);d=H$(d,scale(Z,U$,x,F$),F$)}if(b!==0){d=H$(d,scale(4,T$,b,j$),j$);d=H$(d,scale(Q,$$,b,F$),F$)}if(w!==0){d=H$(d,scale(4,D$,w,j$),j$);d=H$(d,scale(tt,P$,w,F$),F$)}if(p!==0){if(v!==0){d=Y$(d,p,v,B,w)}if(_!==0){d=Y$(d,-p,_,H,b)}}if(m!==0){if(_!==0){d=Y$(d,m,_,X,x)}if(y!==0){d=Y$(d,-m,y,B,w)}}if(g!==0){if(y!==0){d=Y$(d,g,y,H,b)}if(v!==0){d=Y$(d,-g,v,X,x)}}return W$[d-1]}function G$(t,e,n,i,r,o,s,a,l,u,c,f){const h=t-u;const d=i-u;const p=s-u;const m=e-c;const g=r-c;const y=a-c;const v=n-f;const _=o-f;const x=l-f;const b=d*y;const w=p*g;const k=p*m;const M=h*y;const S=h*g;const E=d*m;const T=v*(b-w)+_*(k-M)+x*(S-E);const D=(Math.abs(b)+Math.abs(w))*Math.abs(v)+(Math.abs(k)+Math.abs(M))*Math.abs(_)+(Math.abs(S)+Math.abs(E))*Math.abs(x);const A=k$*D;if(T>A||-T>A){return T}return J$(t,e,n,i,r,o,s,a,l,u,c,f,D)}function V$(t,e,n,i,r,o,s,a,l,u,c,f){const h=t-u;const d=i-u;const p=s-u;const m=e-c;const g=r-c;const y=a-c;const v=n-f;const _=o-f;const x=l-f;return h*(g*x-_*y)+d*(y*v-x*m)+p*(m*_-v*g)}const K$=(10+96*i$)*i$;const Z$=(4+48*i$)*i$;const Q$=(44+576*i$)*i$*i$;const tP=f$(4);const eP=f$(4);const nP=f$(4);const iP=f$(4);const rP=f$(4);const oP=f$(4);const sP=f$(4);const aP=f$(4);const lP=f$(8);const uP=f$(8);const cP=f$(8);const fP=f$(8);const hP=f$(8);const dP=f$(8);const pP=f$(8);const mP=f$(8);const gP=f$(8);const yP=f$(4);const vP=f$(4);const _P=f$(4);const xP=f$(8);const bP=f$(16);const wP=f$(16);const kP=f$(16);const MP=f$(32);const SP=f$(32);const EP=f$(48);const TP=f$(64);let DP=f$(1152);let AP=f$(1152);function NP(t,e,n){t=sum(t,DP,e,n,AP);const i=DP;DP=AP;AP=i;return t}function zP(t,e,n,i,r,o,s,a,l){let u;let c,f,h,d,p,m;let g,y,v,_,x,b;let w,k,M;let S,E,T;let D,A;let N,z,R,C,O,U,$,P,q,I,L,F,j,W;const X=t-s;const H=n-s;const B=r-s;const Y=e-a;const J=i-a;const G=o-a;I=H*G;z=splitter*H;R=z-(z-H);C=H-R;z=splitter*G;O=z-(z-G);U=G-O;L=C*U-(I-R*O-C*O-R*U);F=B*J;z=splitter*B;R=z-(z-B);C=B-R;z=splitter*J;O=z-(z-J);U=J-O;j=C*U-(F-R*O-C*O-R*U);$=L-j;N=L-$;tP[0]=L-($+N)+(N-j);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q-F;N=q-$;tP[1]=q-($+N)+(N-F);W=P+$;N=W-P;tP[2]=P-(W-N)+($-N);tP[3]=W;I=B*Y;z=splitter*B;R=z-(z-B);C=B-R;z=splitter*Y;O=z-(z-Y);U=Y-O;L=C*U-(I-R*O-C*O-R*U);F=X*G;z=splitter*X;R=z-(z-X);C=X-R;z=splitter*G;O=z-(z-G);U=G-O;j=C*U-(F-R*O-C*O-R*U);$=L-j;N=L-$;eP[0]=L-($+N)+(N-j);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q-F;N=q-$;eP[1]=q-($+N)+(N-F);W=P+$;N=W-P;eP[2]=P-(W-N)+($-N);eP[3]=W;I=X*J;z=splitter*X;R=z-(z-X);C=X-R;z=splitter*J;O=z-(z-J);U=J-O;L=C*U-(I-R*O-C*O-R*U);F=H*Y;z=splitter*H;R=z-(z-H);C=H-R;z=splitter*Y;O=z-(z-Y);U=Y-O;j=C*U-(F-R*O-C*O-R*U);$=L-j;N=L-$;nP[0]=L-($+N)+(N-j);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q-F;N=q-$;nP[1]=q-($+N)+(N-F);W=P+$;N=W-P;nP[2]=P-(W-N)+($-N);nP[3]=W;u=sum(sum(sum(scale(scale(4,tP,X,xP),xP,X,bP),bP,scale(scale(4,tP,Y,xP),xP,Y,wP),wP,MP),MP,sum(scale(scale(4,eP,H,xP),xP,H,bP),bP,scale(scale(4,eP,J,xP),xP,J,wP),wP,SP),SP,TP),TP,sum(scale(scale(4,nP,B,xP),xP,B,bP),bP,scale(scale(4,nP,G,xP),xP,G,wP),wP,MP),MP,DP);let V=estimate(u,DP);let K=Z$*l;if(V>=K||-V>=K){return V}N=t-X;c=t-(X+N)+(N-s);N=e-Y;d=e-(Y+N)+(N-a);N=n-H;f=n-(H+N)+(N-s);N=i-J;p=i-(J+N)+(N-a);N=r-B;h=r-(B+N)+(N-s);N=o-G;m=o-(G+N)+(N-a);if(c===0&&f===0&&h===0&&d===0&&p===0&&m===0){return V}K=Q$*l+resulterrbound*Math.abs(V);V+=(X*X+Y*Y)*(H*m+G*f-(J*h+B*p))+2*(X*c+Y*d)*(H*G-J*B)+((H*H+J*J)*(B*d+Y*h-(G*c+X*m))+2*(H*f+J*p)*(B*Y-G*X))+((B*B+G*G)*(X*p+J*c-(Y*f+H*d))+2*(B*h+G*m)*(X*J-Y*H));if(V>=K||-V>=K){return V}if(f!==0||p!==0||h!==0||m!==0){I=X*X;z=splitter*X;R=z-(z-X);C=X-R;L=C*C-(I-R*R-(R+R)*C);F=Y*Y;z=splitter*Y;R=z-(z-Y);C=Y-R;j=C*C-(F-R*R-(R+R)*C);$=L+j;N=$-L;iP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;iP[1]=q-($-N)+(F-N);W=P+$;N=W-P;iP[2]=P-(W-N)+($-N);iP[3]=W}if(h!==0||m!==0||c!==0||d!==0){I=H*H;z=splitter*H;R=z-(z-H);C=H-R;L=C*C-(I-R*R-(R+R)*C);F=J*J;z=splitter*J;R=z-(z-J);C=J-R;j=C*C-(F-R*R-(R+R)*C);$=L+j;N=$-L;rP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;rP[1]=q-($-N)+(F-N);W=P+$;N=W-P;rP[2]=P-(W-N)+($-N);rP[3]=W}if(c!==0||d!==0||f!==0||p!==0){I=B*B;z=splitter*B;R=z-(z-B);C=B-R;L=C*C-(I-R*R-(R+R)*C);F=G*G;z=splitter*G;R=z-(z-G);C=G-R;j=C*C-(F-R*R-(R+R)*C);$=L+j;N=$-L;oP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;oP[1]=q-($-N)+(F-N);W=P+$;N=W-P;oP[2]=P-(W-N)+($-N);oP[3]=W}if(c!==0){g=scale(4,tP,c,lP);u=NP(u,sum_three(scale(g,lP,2*X,bP),bP,scale(scale(4,oP,c,xP),xP,J,wP),wP,scale(scale(4,rP,c,xP),xP,-G,kP),kP,MP,EP),EP)}if(d!==0){y=scale(4,tP,d,uP);u=NP(u,sum_three(scale(y,uP,2*Y,bP),bP,scale(scale(4,rP,d,xP),xP,B,wP),wP,scale(scale(4,oP,d,xP),xP,-H,kP),kP,MP,EP),EP)}if(f!==0){v=scale(4,eP,f,cP);u=NP(u,sum_three(scale(v,cP,2*H,bP),bP,scale(scale(4,iP,f,xP),xP,G,wP),wP,scale(scale(4,oP,f,xP),xP,-Y,kP),kP,MP,EP),EP)}if(p!==0){_=scale(4,eP,p,fP);u=NP(u,sum_three(scale(_,fP,2*J,bP),bP,scale(scale(4,oP,p,xP),xP,X,wP),wP,scale(scale(4,iP,p,xP),xP,-B,kP),kP,MP,EP),EP)}if(h!==0){x=scale(4,nP,h,hP);u=NP(u,sum_three(scale(x,hP,2*B,bP),bP,scale(scale(4,rP,h,xP),xP,Y,wP),wP,scale(scale(4,iP,h,xP),xP,-J,kP),kP,MP,EP),EP)}if(m!==0){b=scale(4,nP,m,dP);u=NP(u,sum_three(scale(b,dP,2*G,bP),bP,scale(scale(4,iP,m,xP),xP,H,wP),wP,scale(scale(4,rP,m,xP),xP,-X,kP),kP,MP,EP),EP)}if(c!==0||d!==0){if(f!==0||p!==0||h!==0||m!==0){I=f*G;z=splitter*f;R=z-(z-f);C=f-R;z=splitter*G;O=z-(z-G);U=G-O;L=C*U-(I-R*O-C*O-R*U);F=H*m;z=splitter*H;R=z-(z-H);C=H-R;z=splitter*m;O=z-(z-m);U=m-O;j=C*U-(F-R*O-C*O-R*U);$=L+j;N=$-L;sP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;sP[1]=q-($-N)+(F-N);W=P+$;N=W-P;sP[2]=P-(W-N)+($-N);sP[3]=W;I=h*-J;z=splitter*h;R=z-(z-h);C=h-R;z=splitter*-J;O=z-(z- -J);U=-J-O;L=C*U-(I-R*O-C*O-R*U);F=B*-p;z=splitter*B;R=z-(z-B);C=B-R;z=splitter*-p;O=z-(z- -p);U=-p-O;j=C*U-(F-R*O-C*O-R*U);$=L+j;N=$-L;aP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;aP[1]=q-($-N)+(F-N);W=P+$;N=W-P;aP[2]=P-(W-N)+($-N);aP[3]=W;k=sum(4,sP,4,aP,mP);I=f*m;z=splitter*f;R=z-(z-f);C=f-R;z=splitter*m;O=z-(z-m);U=m-O;L=C*U-(I-R*O-C*O-R*U);F=h*p;z=splitter*h;R=z-(z-h);C=h-R;z=splitter*p;O=z-(z-p);U=p-O;j=C*U-(F-R*O-C*O-R*U);$=L-j;N=L-$;vP[0]=L-($+N)+(N-j);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q-F;N=q-$;vP[1]=q-($+N)+(N-F);W=P+$;N=W-P;vP[2]=P-(W-N)+($-N);vP[3]=W;E=4}else{mP[0]=0;k=1;vP[0]=0;E=1}if(c!==0){const t=scale(k,mP,c,kP);u=NP(u,sum(scale(g,lP,c,bP),bP,scale(t,kP,2*X,MP),MP,EP),EP);const e=scale(E,vP,c,xP);u=NP(u,sum_three(scale(e,xP,2*X,bP),bP,scale(e,xP,c,wP),wP,scale(t,kP,c,MP),MP,SP,TP),TP);if(p!==0){u=NP(u,scale(scale(4,oP,c,xP),xP,p,bP),bP)}if(m!==0){u=NP(u,scale(scale(4,rP,-c,xP),xP,m,bP),bP)}}if(d!==0){const t=scale(k,mP,d,kP);u=NP(u,sum(scale(y,uP,d,bP),bP,scale(t,kP,2*Y,MP),MP,EP),EP);const e=scale(E,vP,d,xP);u=NP(u,sum_three(scale(e,xP,2*Y,bP),bP,scale(e,xP,d,wP),wP,scale(t,kP,d,MP),MP,SP,TP),TP)}}if(f!==0||p!==0){if(h!==0||m!==0||c!==0||d!==0){I=h*Y;z=splitter*h;R=z-(z-h);C=h-R;z=splitter*Y;O=z-(z-Y);U=Y-O;L=C*U-(I-R*O-C*O-R*U);F=B*d;z=splitter*B;R=z-(z-B);C=B-R;z=splitter*d;O=z-(z-d);U=d-O;j=C*U-(F-R*O-C*O-R*U);$=L+j;N=$-L;sP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;sP[1]=q-($-N)+(F-N);W=P+$;N=W-P;sP[2]=P-(W-N)+($-N);sP[3]=W;D=-G;A=-m;I=c*D;z=splitter*c;R=z-(z-c);C=c-R;z=splitter*D;O=z-(z-D);U=D-O;L=C*U-(I-R*O-C*O-R*U);F=X*A;z=splitter*X;R=z-(z-X);C=X-R;z=splitter*A;O=z-(z-A);U=A-O;j=C*U-(F-R*O-C*O-R*U);$=L+j;N=$-L;aP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;aP[1]=q-($-N)+(F-N);W=P+$;N=W-P;aP[2]=P-(W-N)+($-N);aP[3]=W;M=sum(4,sP,4,aP,gP);I=h*d;z=splitter*h;R=z-(z-h);C=h-R;z=splitter*d;O=z-(z-d);U=d-O;L=C*U-(I-R*O-C*O-R*U);F=c*m;z=splitter*c;R=z-(z-c);C=c-R;z=splitter*m;O=z-(z-m);U=m-O;j=C*U-(F-R*O-C*O-R*U);$=L-j;N=L-$;_P[0]=L-($+N)+(N-j);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q-F;N=q-$;_P[1]=q-($+N)+(N-F);W=P+$;N=W-P;_P[2]=P-(W-N)+($-N);_P[3]=W;T=4}else{gP[0]=0;M=1;_P[0]=0;T=1}if(f!==0){const t=scale(M,gP,f,kP);u=NP(u,sum(scale(v,cP,f,bP),bP,scale(t,kP,2*H,MP),MP,EP),EP);const e=scale(T,_P,f,xP);u=NP(u,sum_three(scale(e,xP,2*H,bP),bP,scale(e,xP,f,wP),wP,scale(t,kP,f,MP),MP,SP,TP),TP);if(m!==0){u=NP(u,scale(scale(4,iP,f,xP),xP,m,bP),bP)}if(d!==0){u=NP(u,scale(scale(4,oP,-f,xP),xP,d,bP),bP)}}if(p!==0){const t=scale(M,gP,p,kP);u=NP(u,sum(scale(_,fP,p,bP),bP,scale(t,kP,2*J,MP),MP,EP),EP);const e=scale(T,_P,p,xP);u=NP(u,sum_three(scale(e,xP,2*J,bP),bP,scale(e,xP,p,wP),wP,scale(t,kP,p,MP),MP,SP,TP),TP)}}if(h!==0||m!==0){if(c!==0||d!==0||f!==0||p!==0){I=c*J;z=splitter*c;R=z-(z-c);C=c-R;z=splitter*J;O=z-(z-J);U=J-O;L=C*U-(I-R*O-C*O-R*U);F=X*p;z=splitter*X;R=z-(z-X);C=X-R;z=splitter*p;O=z-(z-p);U=p-O;j=C*U-(F-R*O-C*O-R*U);$=L+j;N=$-L;sP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;sP[1]=q-($-N)+(F-N);W=P+$;N=W-P;sP[2]=P-(W-N)+($-N);sP[3]=W;D=-Y;A=-d;I=f*D;z=splitter*f;R=z-(z-f);C=f-R;z=splitter*D;O=z-(z-D);U=D-O;L=C*U-(I-R*O-C*O-R*U);F=H*A;z=splitter*H;R=z-(z-H);C=H-R;z=splitter*A;O=z-(z-A);U=A-O;j=C*U-(F-R*O-C*O-R*U);$=L+j;N=$-L;aP[0]=L-($-N)+(j-N);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q+F;N=$-q;aP[1]=q-($-N)+(F-N);W=P+$;N=W-P;aP[2]=P-(W-N)+($-N);aP[3]=W;w=sum(4,sP,4,aP,pP);I=c*p;z=splitter*c;R=z-(z-c);C=c-R;z=splitter*p;O=z-(z-p);U=p-O;L=C*U-(I-R*O-C*O-R*U);F=f*d;z=splitter*f;R=z-(z-f);C=f-R;z=splitter*d;O=z-(z-d);U=d-O;j=C*U-(F-R*O-C*O-R*U);$=L-j;N=L-$;yP[0]=L-($+N)+(N-j);P=I+$;N=P-I;q=I-(P-N)+($-N);$=q-F;N=q-$;yP[1]=q-($+N)+(N-F);W=P+$;N=W-P;yP[2]=P-(W-N)+($-N);yP[3]=W;S=4}else{pP[0]=0;w=1;yP[0]=0;S=1}if(h!==0){const t=scale(w,pP,h,kP);u=NP(u,sum(scale(x,hP,h,bP),bP,scale(t,kP,2*B,MP),MP,EP),EP);const e=scale(S,yP,h,xP);u=NP(u,sum_three(scale(e,xP,2*B,bP),bP,scale(e,xP,h,wP),wP,scale(t,kP,h,MP),MP,SP,TP),TP);if(d!==0){u=NP(u,scale(scale(4,rP,h,xP),xP,d,bP),bP)}if(p!==0){u=NP(u,scale(scale(4,iP,-h,xP),xP,p,bP),bP)}}if(m!==0){const t=scale(w,pP,m,kP);u=NP(u,sum(scale(b,dP,m,bP),bP,scale(t,kP,2*G,MP),MP,EP),EP);const e=scale(S,yP,m,xP);u=NP(u,sum_three(scale(e,xP,2*G,bP),bP,scale(e,xP,m,wP),wP,scale(t,kP,m,MP),MP,SP,TP),TP)}}return DP[u-1]}function RP(t,e,n,i,r,o,s,a){const l=t-s;const u=n-s;const c=r-s;const f=e-a;const h=i-a;const d=o-a;const p=u*d;const m=c*h;const g=l*l+f*f;const y=c*f;const v=l*d;const _=u*u+h*h;const x=l*h;const b=u*f;const w=c*c+d*d;const k=g*(p-m)+_*(y-v)+w*(x-b);const M=(Math.abs(p)+Math.abs(m))*g+(Math.abs(y)+Math.abs(v))*_+(Math.abs(x)+Math.abs(b))*w;const S=K$*M;if(k>S||-k>S){return k}return zP(t,e,n,i,r,o,s,a,M)}function CP(t,e,n,i,r,o,s,a){const l=t-s;const u=e-a;const c=n-s;const f=i-a;const h=r-s;const d=o-a;const p=l*f-c*u;const m=c*d-h*f;const g=h*u-l*d;const y=l*l+u*u;const v=c*c+f*f;const _=h*h+d*d;return y*m+v*g+_*p}const OP=(16+224*i$)*i$;const UP=(5+72*i$)*i$;const $P=(71+1408*i$)*i$*i$;const PP=f$(4);const qP=f$(4);const IP=f$(4);const LP=f$(4);const FP=f$(4);const jP=f$(4);const WP=f$(4);const XP=f$(4);const HP=f$(4);const BP=f$(4);const YP=f$(24);const JP=f$(24);const GP=f$(24);const VP=f$(24);const KP=f$(24);const ZP=f$(24);const QP=f$(24);const tq=f$(24);const eq=f$(24);const nq=f$(24);const iq=f$(1152);const rq=f$(1152);const oq=f$(1152);const sq=f$(1152);const aq=f$(1152);const lq=f$(2304);const uq=f$(2304);const cq=f$(3456);const fq=f$(5760);const hq=f$(8);const dq=f$(8);const pq=f$(8);const mq=f$(16);const gq=f$(24);const yq=f$(48);const vq=f$(48);const _q=f$(96);const xq=f$(192);const bq=f$(384);const wq=f$(384);const kq=f$(384);const Mq=f$(768);function Sq(t,e,n,i,r,o,s){return sum_three(scale(4,t,i,hq),hq,scale(4,e,r,dq),dq,scale(4,n,o,pq),pq,mq,s)}function Eq(t,e,n,i,r,o,s,a,l,u,c,f){const h=sum(sum(t,e,n,i,yq),yq,negate(sum(r,o,s,a,vq),vq),vq,_q);return sum_three(scale(scale(h,_q,l,xq),xq,l,bq),bq,scale(scale(h,_q,u,xq),xq,u,wq),wq,scale(scale(h,_q,c,xq),xq,c,kq),kq,Mq,f)}function Tq(t,e,n,i,r,o,s,a,l,u,c,f,h,d,p){let m,g,y,v,_,x,b,w,k,M,S,E,T,D;M=t*r;g=splitter*t;y=g-(g-t);v=t-y;g=splitter*r;_=g-(g-r);x=r-_;S=v*x-(M-y*_-v*_-y*x);E=i*e;g=splitter*i;y=g-(g-i);v=i-y;g=splitter*e;_=g-(g-e);x=e-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;PP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;PP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;PP[2]=w-(D-m)+(b-m);PP[3]=D;M=i*a;g=splitter*i;y=g-(g-i);v=i-y;g=splitter*a;_=g-(g-a);x=a-_;S=v*x-(M-y*_-v*_-y*x);E=s*r;g=splitter*s;y=g-(g-s);v=s-y;g=splitter*r;_=g-(g-r);x=r-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;qP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;qP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;qP[2]=w-(D-m)+(b-m);qP[3]=D;M=s*c;g=splitter*s;y=g-(g-s);v=s-y;g=splitter*c;_=g-(g-c);x=c-_;S=v*x-(M-y*_-v*_-y*x);E=u*a;g=splitter*u;y=g-(g-u);v=u-y;g=splitter*a;_=g-(g-a);x=a-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;IP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;IP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;IP[2]=w-(D-m)+(b-m);IP[3]=D;M=u*d;g=splitter*u;y=g-(g-u);v=u-y;g=splitter*d;_=g-(g-d);x=d-_;S=v*x-(M-y*_-v*_-y*x);E=h*c;g=splitter*h;y=g-(g-h);v=h-y;g=splitter*c;_=g-(g-c);x=c-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;LP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;LP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;LP[2]=w-(D-m)+(b-m);LP[3]=D;M=h*e;g=splitter*h;y=g-(g-h);v=h-y;g=splitter*e;_=g-(g-e);x=e-_;S=v*x-(M-y*_-v*_-y*x);E=t*d;g=splitter*t;y=g-(g-t);v=t-y;g=splitter*d;_=g-(g-d);x=d-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;FP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;FP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;FP[2]=w-(D-m)+(b-m);FP[3]=D;M=t*a;g=splitter*t;y=g-(g-t);v=t-y;g=splitter*a;_=g-(g-a);x=a-_;S=v*x-(M-y*_-v*_-y*x);E=s*e;g=splitter*s;y=g-(g-s);v=s-y;g=splitter*e;_=g-(g-e);x=e-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;jP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;jP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;jP[2]=w-(D-m)+(b-m);jP[3]=D;M=i*c;g=splitter*i;y=g-(g-i);v=i-y;g=splitter*c;_=g-(g-c);x=c-_;S=v*x-(M-y*_-v*_-y*x);E=u*r;g=splitter*u;y=g-(g-u);v=u-y;g=splitter*r;_=g-(g-r);x=r-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;WP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;WP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;WP[2]=w-(D-m)+(b-m);WP[3]=D;M=s*d;g=splitter*s;y=g-(g-s);v=s-y;g=splitter*d;_=g-(g-d);x=d-_;S=v*x-(M-y*_-v*_-y*x);E=h*a;g=splitter*h;y=g-(g-h);v=h-y;g=splitter*a;_=g-(g-a);x=a-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;XP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;XP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;XP[2]=w-(D-m)+(b-m);XP[3]=D;M=u*e;g=splitter*u;y=g-(g-u);v=u-y;g=splitter*e;_=g-(g-e);x=e-_;S=v*x-(M-y*_-v*_-y*x);E=t*c;g=splitter*t;y=g-(g-t);v=t-y;g=splitter*c;_=g-(g-c);x=c-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;HP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;HP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;HP[2]=w-(D-m)+(b-m);HP[3]=D;M=h*r;g=splitter*h;y=g-(g-h);v=h-y;g=splitter*r;_=g-(g-r);x=r-_;S=v*x-(M-y*_-v*_-y*x);E=i*d;g=splitter*i;y=g-(g-i);v=i-y;g=splitter*d;_=g-(g-d);x=d-_;T=v*x-(E-y*_-v*_-y*x);b=S-T;m=S-b;BP[0]=S-(b+m)+(m-T);w=M+b;m=w-M;k=M-(w-m)+(b-m);b=k-E;m=k-b;BP[1]=k-(b+m)+(m-E);D=w+b;m=D-w;BP[2]=w-(D-m)+(b-m);BP[3]=D;const A=Sq(PP,qP,jP,l,n,-o,YP);const N=Sq(qP,IP,WP,f,o,-l,JP);const z=Sq(IP,LP,XP,p,l,-f,GP);const R=Sq(LP,FP,HP,n,f,-p,VP);const C=Sq(FP,PP,BP,o,p,-n,KP);const O=Sq(PP,WP,HP,f,n,o,ZP);const U=Sq(qP,XP,BP,p,o,l,QP);const $=Sq(IP,HP,jP,n,l,f,tq);const P=Sq(LP,BP,WP,o,f,p,eq);const q=Sq(FP,jP,XP,l,p,n,nq);const I=sum_three(Eq(z,GP,U,QP,P,eq,N,JP,t,e,n,iq),iq,Eq(R,VP,$,tq,q,nq,z,GP,i,r,o,rq),rq,sum_three(Eq(C,KP,P,eq,O,ZP,R,VP,s,a,l,oq),oq,Eq(A,YP,q,nq,U,QP,C,KP,u,c,f,sq),sq,Eq(N,JP,O,ZP,$,tq,A,YP,h,d,p,aq),aq,uq,cq),cq,lq,fq);return fq[I-1]}const Dq=f$(96);const Aq=f$(96);const Nq=f$(96);const zq=f$(1152);function Rq(t,e,n,i,r,o,s,a,l,u){const c=Sq(t,e,n,i,r,o,gq);return sum_three(scale(scale(c,gq,s,yq),yq,s,Dq),Dq,scale(scale(c,gq,a,yq),yq,a,Aq),Aq,scale(scale(c,gq,l,yq),yq,l,Nq),Nq,xq,u)}function Cq(t,e,n,i,r,o,s,a,l,u,c,f,h,d,p,m){let g,y,v,_,x,b;let w,k,M,S;let E,T,D,A;let N,z,R,C;let O,U,$,P,q,I,L,F,j,W,X,H,B;const Y=t-h;const J=i-h;const G=s-h;const V=u-h;const K=e-d;const Z=r-d;const Q=a-d;const tt=c-d;const et=n-p;const nt=o-p;const it=l-p;const rt=f-p;W=Y*Z;U=splitter*Y;$=U-(U-Y);P=Y-$;U=splitter*Z;q=U-(U-Z);I=Z-q;X=P*I-(W-$*q-P*q-$*I);H=J*K;U=splitter*J;$=U-(U-J);P=J-$;U=splitter*K;q=U-(U-K);I=K-q;B=P*I-(H-$*q-P*q-$*I);L=X-B;O=X-L;PP[0]=X-(L+O)+(O-B);F=W+L;O=F-W;j=W-(F-O)+(L-O);L=j-H;O=j-L;PP[1]=j-(L+O)+(O-H);g=F+L;O=g-F;PP[2]=F-(g-O)+(L-O);PP[3]=g;W=J*Q;U=splitter*J;$=U-(U-J);P=J-$;U=splitter*Q;q=U-(U-Q);I=Q-q;X=P*I-(W-$*q-P*q-$*I);H=G*Z;U=splitter*G;$=U-(U-G);P=G-$;U=splitter*Z;q=U-(U-Z);I=Z-q;B=P*I-(H-$*q-P*q-$*I);L=X-B;O=X-L;qP[0]=X-(L+O)+(O-B);F=W+L;O=F-W;j=W-(F-O)+(L-O);L=j-H;O=j-L;qP[1]=j-(L+O)+(O-H);y=F+L;O=y-F;qP[2]=F-(y-O)+(L-O);qP[3]=y;W=G*tt;U=splitter*G;$=U-(U-G);P=G-$;U=splitter*tt;q=U-(U-tt);I=tt-q;X=P*I-(W-$*q-P*q-$*I);H=V*Q;U=splitter*V;$=U-(U-V);P=V-$;U=splitter*Q;q=U-(U-Q);I=Q-q;B=P*I-(H-$*q-P*q-$*I);L=X-B;O=X-L;IP[0]=X-(L+O)+(O-B);F=W+L;O=F-W;j=W-(F-O)+(L-O);L=j-H;O=j-L;IP[1]=j-(L+O)+(O-H);v=F+L;O=v-F;IP[2]=F-(v-O)+(L-O);IP[3]=v;W=V*K;U=splitter*V;$=U-(U-V);P=V-$;U=splitter*K;q=U-(U-K);I=K-q;X=P*I-(W-$*q-P*q-$*I);H=Y*tt;U=splitter*Y;$=U-(U-Y);P=Y-$;U=splitter*tt;q=U-(U-tt);I=tt-q;B=P*I-(H-$*q-P*q-$*I);L=X-B;O=X-L;HP[0]=X-(L+O)+(O-B);F=W+L;O=F-W;j=W-(F-O)+(L-O);L=j-H;O=j-L;HP[1]=j-(L+O)+(O-H);_=F+L;O=_-F;HP[2]=F-(_-O)+(L-O);HP[3]=_;W=Y*Q;U=splitter*Y;$=U-(U-Y);P=Y-$;U=splitter*Q;q=U-(U-Q);I=Q-q;X=P*I-(W-$*q-P*q-$*I);H=G*K;U=splitter*G;$=U-(U-G);P=G-$;U=splitter*K;q=U-(U-K);I=K-q;B=P*I-(H-$*q-P*q-$*I);L=X-B;O=X-L;jP[0]=X-(L+O)+(O-B);F=W+L;O=F-W;j=W-(F-O)+(L-O);L=j-H;O=j-L;jP[1]=j-(L+O)+(O-H);x=F+L;O=x-F;jP[2]=F-(x-O)+(L-O);jP[3]=x;W=J*tt;U=splitter*J;$=U-(U-J);P=J-$;U=splitter*tt;q=U-(U-tt);I=tt-q;X=P*I-(W-$*q-P*q-$*I);H=V*Z;U=splitter*V;$=U-(U-V);P=V-$;U=splitter*Z;q=U-(U-Z);I=Z-q;B=P*I-(H-$*q-P*q-$*I);L=X-B;O=X-L;WP[0]=X-(L+O)+(O-B);F=W+L;O=F-W;j=W-(F-O)+(L-O);L=j-H;O=j-L;WP[1]=j-(L+O)+(O-H);b=F+L;O=b-F;WP[2]=F-(b-O)+(L-O);WP[3]=b;const ot=sum(sum(negate(Rq(qP,IP,WP,rt,nt,-it,Y,K,et,iq),iq),iq,Rq(IP,HP,jP,et,it,rt,J,Z,nt,rq),rq,lq),lq,sum(negate(Rq(HP,PP,WP,nt,rt,et,G,Q,it,oq),oq),oq,Rq(PP,qP,jP,it,et,-nt,V,tt,rt,sq),sq,uq),uq,zq);let st=estimate(ot,zq);let at=UP*m;if(st>=at||-st>=at){return st}O=t-Y;w=t-(Y+O)+(O-h);O=e-K;E=e-(K+O)+(O-d);O=n-et;N=n-(et+O)+(O-p);O=i-J;k=i-(J+O)+(O-h);O=r-Z;T=r-(Z+O)+(O-d);O=o-nt;z=o-(nt+O)+(O-p);O=s-G;M=s-(G+O)+(O-h);O=a-Q;D=a-(Q+O)+(O-d);O=l-it;R=l-(it+O)+(O-p);O=u-V;S=u-(V+O)+(O-h);O=c-tt;A=c-(tt+O)+(O-d);O=f-rt;C=f-(rt+O)+(O-p);if(w===0&&E===0&&N===0&&k===0&&T===0&&z===0&&M===0&&D===0&&R===0&&S===0&&A===0&&C===0){return st}at=$P*m+resulterrbound*Math.abs(st);const lt=Y*T+Z*w-(K*k+J*E);const ut=J*D+Q*k-(Z*M+G*T);const ct=G*A+tt*M-(Q*S+V*D);const ft=V*E+K*S-(tt*w+Y*A);const ht=Y*D+Q*w-(K*M+G*E);const dt=J*A+tt*k-(Z*S+V*T);st+=(J*J+Z*Z+nt*nt)*(it*ft+rt*ht+et*ct+(R*_+C*x+N*v))+(V*V+tt*tt+rt*rt)*(et*ut-nt*ht+it*lt+(N*y-z*x+R*g))-((Y*Y+K*K+et*et)*(nt*ct-it*dt+rt*ut+(z*v-R*b+C*y))+(G*G+Q*Q+it*it)*(rt*lt+et*dt+nt*ft+(C*g+N*b+z*_)))+2*((J*k+Z*T+nt*z)*(it*_+rt*x+et*v)+(V*S+tt*A+rt*C)*(et*y-nt*x+it*g)-((Y*w+K*E+et*N)*(nt*v-it*b+rt*y)+(G*M+Q*D+it*R)*(rt*g+et*b+nt*_)));if(st>=at||-st>=at){return st}return Tq(t,e,n,i,r,o,s,a,l,u,c,f,h,d,p)}function Oq(t,e,n,i,r,o,s,a,l,u,c,f,h,d,p){const m=t-h;const g=i-h;const y=s-h;const v=u-h;const _=e-d;const x=r-d;const b=a-d;const w=c-d;const k=n-p;const M=o-p;const S=l-p;const E=f-p;const T=m*x;const D=g*_;const A=T-D;const N=g*b;const z=y*x;const R=N-z;const C=y*w;const O=v*b;const U=C-O;const $=v*_;const P=m*w;const q=$-P;const I=m*b;const L=y*_;const F=I-L;const j=g*w;const W=v*x;const X=j-W;const H=k*R-M*F+S*A;const B=M*U-S*X+E*R;const Y=S*q+E*F+k*U;const J=E*A+k*X+M*q;const G=m*m+_*_+k*k;const V=g*g+x*x+M*M;const K=y*y+b*b+S*S;const Z=v*v+w*w+E*E;const Q=K*J-Z*H+(G*B-V*Y);const tt=Math.abs(k);const et=Math.abs(M);const nt=Math.abs(S);const it=Math.abs(E);const rt=Math.abs(T);const ot=Math.abs(D);const st=Math.abs(N);const at=Math.abs(z);const lt=Math.abs(C);const ut=Math.abs(O);const ct=Math.abs($);const ft=Math.abs(P);const ht=Math.abs(I);const dt=Math.abs(L);const pt=Math.abs(j);const mt=Math.abs(W);const gt=((lt+ut)*et+(mt+pt)*nt+(st+at)*it)*G+((ct+ft)*nt+(ht+dt)*it+(lt+ut)*tt)*V+((rt+ot)*it+(pt+mt)*tt+(ct+ft)*et)*K+((st+at)*tt+(dt+ht)*et+(rt+ot)*nt)*Z;const yt=OP*gt;if(Q>yt||-Q>yt){return Q}return-Cq(t,e,n,i,r,o,s,a,l,u,c,f,h,d,p,gt)}function Uq(t,e,n,i,r,o,s,a,l,u,c,f,h,d,p){const m=t-h;const g=i-h;const y=s-h;const v=u-h;const _=e-d;const x=r-d;const b=a-d;const w=c-d;const k=n-p;const M=o-p;const S=l-p;const E=f-p;const T=m*x-g*_;const D=g*b-y*x;const A=y*w-v*b;const N=v*_-m*w;const z=m*b-y*_;const R=g*w-v*x;const C=k*D-M*z+S*T;const O=M*A-S*R+E*D;const U=S*N+E*z+k*A;const $=E*T+k*R+M*N;const P=m*m+_*_+k*k;const q=g*g+x*x+M*M;const I=y*y+b*b+S*S;const L=v*v+w*w+E*E;return I*$-L*C+(P*O-q*U)}const $q=Math.pow(2,-52);const Pq=new Uint32Array(512);class qq{static from(t,e=Bq,n=Yq){const i=t.length;const r=new Float64Array(i*2);for(let o=0;o<i;o++){const i=t[o];r[2*o]=e(i);r[2*o+1]=n(i)}return new qq(r)}constructor(t){const e=t.length>>1;if(e>0&&typeof t[0]!=="number")throw new Error("Expected coords to contain numbers.");this.coords=t;const n=Math.max(2*e-5,0);this._triangles=new Uint32Array(n*3);this._halfedges=new Int32Array(n*3);this._hashSize=Math.ceil(Math.sqrt(e));this._hullPrev=new Uint32Array(e);this._hullNext=new Uint32Array(e);this._hullTri=new Uint32Array(e);this._hullHash=new Int32Array(this._hashSize).fill(-1);this._ids=new Uint32Array(e);this._dists=new Float64Array(e);this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:i,_hullHash:r}=this;const o=t.length>>1;let s=Infinity;let a=Infinity;let l=-Infinity;let u=-Infinity;for(let S=0;S<o;S++){const e=t[2*S];const n=t[2*S+1];if(e<s)s=e;if(n<a)a=n;if(e>l)l=e;if(n>u)u=n;this._ids[S]=S}const c=(s+l)/2;const f=(a+u)/2;let h=Infinity;let d,p,m;for(let S=0;S<o;S++){const e=Lq(c,f,t[2*S],t[2*S+1]);if(e<h){d=S;h=e}}const g=t[2*d];const y=t[2*d+1];h=Infinity;for(let S=0;S<o;S++){if(S===d)continue;const e=Lq(g,y,t[2*S],t[2*S+1]);if(e<h&&e>0){p=S;h=e}}let v=t[2*p];let _=t[2*p+1];let x=Infinity;for(let S=0;S<o;S++){if(S===d||S===p)continue;const e=jq(g,y,v,_,t[2*S],t[2*S+1]);if(e<x){m=S;x=e}}let b=t[2*m];let w=t[2*m+1];if(x===Infinity){for(let i=0;i<o;i++){this._dists[i]=t[2*i]-t[0]||t[2*i+1]-t[1]}Xq(this._ids,this._dists,0,o-1);const e=new Uint32Array(o);let n=0;for(let t=0,i=-Infinity;t<o;t++){const r=this._ids[t];if(this._dists[r]>i){e[n++]=r;i=this._dists[r]}}this.hull=e.subarray(0,n);this.triangles=new Uint32Array(0);this.halfedges=new Uint32Array(0);return}if(b$(g,y,v,_,b,w)<0){const t=p;const e=v;const n=_;p=m;v=b;_=w;m=t;b=e;w=n}const k=Wq(g,y,v,_,b,w);this._cx=k.x;this._cy=k.y;for(let S=0;S<o;S++){this._dists[S]=Lq(t[2*S],t[2*S+1],k.x,k.y)}Xq(this._ids,this._dists,0,o-1);this._hullStart=d;let M=3;n[d]=e[m]=p;n[p]=e[d]=m;n[m]=e[p]=d;i[d]=0;i[p]=1;i[m]=2;r.fill(-1);r[this._hashKey(g,y)]=d;r[this._hashKey(v,_)]=p;r[this._hashKey(b,w)]=m;this.trianglesLen=0;this._addTriangle(d,p,m,-1,-1,-1);for(let S=0,E,T;S<this._ids.length;S++){const o=this._ids[S];const s=t[2*o];const a=t[2*o+1];if(S>0&&Math.abs(s-E)<=$q&&Math.abs(a-T)<=$q)continue;E=s;T=a;if(o===d||o===p||o===m)continue;let l=0;for(let t=0,e=this._hashKey(s,a);t<this._hashSize;t++){l=r[(e+t)%this._hashSize];if(l!==-1&&l!==n[l])break}l=e[l];let u=l,c;while(c=n[u],b$(s,a,t[2*u],t[2*u+1],t[2*c],t[2*c+1])>=0){u=c;if(u===l){u=-1;break}}if(u===-1)continue;let f=this._addTriangle(u,o,n[u],-1,-1,i[u]);i[o]=this._legalize(f+2);i[u]=f;M++;let h=n[u];while(c=n[h],b$(s,a,t[2*h],t[2*h+1],t[2*c],t[2*c+1])<0){f=this._addTriangle(h,o,c,i[o],-1,i[h]);i[o]=this._legalize(f+2);n[h]=h;M--;h=c}if(u===l){while(c=e[u],b$(s,a,t[2*c],t[2*c+1],t[2*u],t[2*u+1])<0){f=this._addTriangle(c,o,u,-1,i[u],i[c]);this._legalize(f+2);i[c]=f;n[u]=u;M--;u=c}}this._hullStart=e[o]=u;n[u]=e[h]=o;n[o]=h;r[this._hashKey(s,a)]=o;r[this._hashKey(t[2*u],t[2*u+1])]=u}this.hull=new Uint32Array(M);for(let S=0,E=this._hullStart;S<M;S++){this.hull[S]=E;E=n[E]}this.triangles=this._triangles.subarray(0,this.trianglesLen);this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(Iq(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:n,coords:i}=this;let r=0;let o=0;while(true){const s=n[t];const a=t-t%3;o=a+(t+2)%3;if(s===-1){if(r===0)break;t=Pq[--r];continue}const l=s-s%3;const u=a+(t+1)%3;const c=l+(s+2)%3;const f=e[o];const h=e[t];const d=e[u];const p=e[c];const m=Fq(i[2*f],i[2*f+1],i[2*h],i[2*h+1],i[2*d],i[2*d+1],i[2*p],i[2*p+1]);if(m){e[t]=p;e[s]=f;const i=n[c];if(i===-1){let e=this._hullStart;do{if(this._hullTri[e]===c){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,i);this._link(s,n[o]);this._link(o,c);const a=l+(s+1)%3;if(r<Pq.length){Pq[r++]=a}}else{if(r===0)break;t=Pq[--r]}}return o}_link(t,e){this._halfedges[t]=e;if(e!==-1)this._halfedges[e]=t}_addTriangle(t,e,n,i,r,o){const s=this.trianglesLen;this._triangles[s]=t;this._triangles[s+1]=e;this._triangles[s+2]=n;this._link(s,i);this._link(s+1,r);this._link(s+2,o);this.trianglesLen+=3;return s}}function Iq(t,e){const n=t/(Math.abs(t)+Math.abs(e));return(e>0?3-n:1+n)/4}function Lq(t,e,n,i){const r=t-n;const o=e-i;return r*r+o*o}function Fq(t,e,n,i,r,o,s,a){const l=t-s;const u=e-a;const c=n-s;const f=i-a;const h=r-s;const d=o-a;const p=l*l+u*u;const m=c*c+f*f;const g=h*h+d*d;return l*(f*g-m*d)-u*(c*g-m*h)+p*(c*d-f*h)<0}function jq(t,e,n,i,r,o){const s=n-t;const a=i-e;const l=r-t;const u=o-e;const c=s*s+a*a;const f=l*l+u*u;const h=.5/(s*u-a*l);const d=(u*c-a*f)*h;const p=(s*f-l*c)*h;return d*d+p*p}function Wq(t,e,n,i,r,o){const s=n-t;const a=i-e;const l=r-t;const u=o-e;const c=s*s+a*a;const f=l*l+u*u;const h=.5/(s*u-a*l);const d=t+(u*c-a*f)*h;const p=e+(s*f-l*c)*h;return{x:d,y:p}}function Xq(t,e,n,i){if(i-n<=20){for(let r=n+1;r<=i;r++){const i=t[r];const o=e[i];let s=r-1;while(s>=n&&e[t[s]]>o)t[s+1]=t[s--];t[s+1]=i}}else{const r=n+i>>1;let o=n+1;let s=i;Hq(t,r,o);if(e[t[n]]>e[t[i]])Hq(t,n,i);if(e[t[o]]>e[t[i]])Hq(t,o,i);if(e[t[n]]>e[t[o]])Hq(t,n,o);const a=t[o];const l=e[a];while(true){do{o++}while(e[t[o]]<l);do{s--}while(e[t[s]]>l);if(s<o)break;Hq(t,o,s)}t[n+1]=t[s];t[s]=a;if(i-o+1>=s-n){Xq(t,e,o,i);Xq(t,e,n,s-1)}else{Xq(t,e,n,s-1);Xq(t,e,o,i)}}}function Hq(t,e,n){const i=t[e];t[e]=t[n];t[n]=i}function Bq(t){return t[0]}function Yq(t){return t[1]}const Jq=1e-6;class Gq{constructor(){this._x0=this._y0=this._x1=this._y1=null;this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){if(this._x1!==null){this._x1=this._x0,this._y1=this._y0;this._+="Z"}}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,n){t=+t,e=+e,n=+n;const i=t+n;const r=e;if(n<0)throw new Error("negative radius");if(this._x1===null)this._+=`M${i},${r}`;else if(Math.abs(this._x1-i)>Jq||Math.abs(this._y1-r)>Jq)this._+="L"+i+","+r;if(!n)return;this._+=`A${n},${n},0,1,1,${t-n},${e}A${n},${n},0,1,1,${this._x1=i},${this._y1=r}`}rect(t,e,n,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+n}v${+i}h${-n}Z`}value(){return this._||null}}class Vq{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class Kq{constructor(t,[e,n,i,r]=[0,0,960,500]){if(!((i=+i)>=(e=+e))||!((r=+r)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=t;this._circumcenters=new Float64Array(t.points.length*2);this.vectors=new Float64Array(t.points.length*2);this.xmax=i,this.xmin=e;this.ymax=r,this.ymin=n;this._init()}update(){this.delaunay.update();this._init();return this}_init(){const{delaunay:{points:t,hull:e,triangles:n},vectors:i}=this;const r=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let h=0,d=0,p=n.length,m,g;h<p;h+=3,d+=2){const e=n[h]*2;const i=n[h+1]*2;const o=n[h+2]*2;const s=t[e];const a=t[e+1];const l=t[i];const u=t[i+1];const c=t[o];const f=t[o+1];const p=l-s;const y=u-a;const v=c-s;const _=f-a;const x=(p*_-y*v)*2;if(Math.abs(x)<1e-9){let e=1e9;const i=n[0]*2;e*=Math.sign((t[i]-s)*_-(t[i+1]-a)*v);m=(s+c)/2-e*_;g=(a+f)/2+e*v}else{const t=1/x;const e=p*p+y*y;const n=v*v+_*_;m=s+(_*e-y*n)*t;g=a+(p*n-v*e)*t}r[d]=m;r[d+1]=g}let o=e[e.length-1];let s,a=o*4;let l,u=t[2*o];let c,f=t[2*o+1];i.fill(0);for(let h=0;h<e.length;++h){o=e[h];s=a,l=u,c=f;a=o*4,u=t[2*o],f=t[2*o+1];i[s+2]=i[a]=c-f;i[s+3]=i[a+1]=u-l}}render(t){const e=t==null?t=new Gq:undefined;const{delaunay:{halfedges:n,inedges:i,hull:r},circumcenters:o,vectors:s}=this;if(r.length<=1)return null;for(let u=0,c=n.length;u<c;++u){const e=n[u];if(e<u)continue;const i=Math.floor(u/3)*2;const r=Math.floor(e/3)*2;const s=o[i];const a=o[i+1];const l=o[r];const c=o[r+1];this._renderSegment(s,a,l,c,t)}let a,l=r[r.length-1];for(let u=0;u<r.length;++u){a=l,l=r[u];const e=Math.floor(i[l]/3)*2;const n=o[e];const c=o[e+1];const f=a*4;const h=this._project(n,c,s[f+2],s[f+3]);if(h)this._renderSegment(n,c,h[0],h[1],t)}return e&&e.value()}renderBounds(t){const e=t==null?t=new Gq:undefined;t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin);return e&&e.value()}renderCell(t,e){const n=e==null?e=new Gq:undefined;const i=this._clip(t);if(i===null||!i.length)return;e.moveTo(i[0],i[1]);let r=i.length;while(i[0]===i[r-2]&&i[1]===i[r-1]&&r>1)r-=2;for(let o=2;o<r;o+=2){if(i[o]!==i[o-2]||i[o+1]!==i[o-1])e.lineTo(i[o],i[o+1])}e.closePath();return n&&n.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let e=0,n=t.length/2;e<n;++e){const t=this.cellPolygon(e);if(t)t.index=e,yield t}}cellPolygon(t){const e=new Vq;this.renderCell(t,e);return e.value()}_renderSegment(t,e,n,i,r){let o;const s=this._regioncode(t,e);const a=this._regioncode(n,i);if(s===0&&a===0){r.moveTo(t,e);r.lineTo(n,i)}else if(o=this._clipSegment(t,e,n,i,s,a)){r.moveTo(o[0],o[1]);r.lineTo(o[2],o[3])}}contains(t,e,n){if((e=+e,e!==e)||(n=+n,n!==n))return false;return this.delaunay._step(t,e,n)===t}*neighbors(t){const e=this._clip(t);if(e)for(const n of this.delaunay.neighbors(t)){const t=this._clip(n);if(t)t:for(let i=0,r=e.length;i<r;i+=2){for(let o=0,s=t.length;o<s;o+=2){if(e[i]==t[o]&&e[i+1]==t[o+1]&&e[(i+2)%r]==t[(o+s-2)%s]&&e[(i+3)%r]==t[(o+s-1)%s]){yield n;break t}}}}}_cell(t){const{circumcenters:e,delaunay:{inedges:n,halfedges:i,triangles:r}}=this;const o=n[t];if(o===-1)return null;const s=[];let a=o;do{const n=Math.floor(a/3);s.push(e[n*2],e[n*2+1]);a=a%3===2?a-2:a+1;if(r[a]!==t)break;a=i[a]}while(a!==o&&a!==-1);return s}_clip(t){if(t===0&&this.delaunay.hull.length===1){return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin]}const e=this._cell(t);if(e===null)return null;const{vectors:n}=this;const i=t*4;return n[i]||n[i+1]?this._clipInfinite(t,e,n[i],n[i+1],n[i+2],n[i+3]):this._clipFinite(t,e)}_clipFinite(t,e){const n=e.length;let i=null;let r,o,s=e[n-2],a=e[n-1];let l,u=this._regioncode(s,a);let c,f=0;for(let h=0;h<n;h+=2){r=s,o=a,s=e[h],a=e[h+1];l=u,u=this._regioncode(s,a);if(l===0&&u===0){c=f,f=0;if(i)i.push(s,a);else i=[s,a]}else{let e,n,h,d,p;if(l===0){if((e=this._clipSegment(r,o,s,a,l,u))===null)continue;[n,h,d,p]=e}else{if((e=this._clipSegment(s,a,r,o,u,l))===null)continue;[d,p,n,h]=e;c=f,f=this._edgecode(n,h);if(c&&f)this._edge(t,c,f,i,i.length);if(i)i.push(n,h);else i=[n,h]}c=f,f=this._edgecode(d,p);if(c&&f)this._edge(t,c,f,i,i.length);if(i)i.push(d,p);else i=[d,p]}}if(i){c=f,f=this._edgecode(i[0],i[1]);if(c&&f)this._edge(t,c,f,i,i.length)}else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)){return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin]}return i}_clipSegment(t,e,n,i,r,o){while(true){if(r===0&&o===0)return[t,e,n,i];if(r&o)return null;let s,a,l=r||o;if(l&8)s=t+(n-t)*(this.ymax-e)/(i-e),a=this.ymax;else if(l&4)s=t+(n-t)*(this.ymin-e)/(i-e),a=this.ymin;else if(l&2)a=e+(i-e)*(this.xmax-t)/(n-t),s=this.xmax;else a=e+(i-e)*(this.xmin-t)/(n-t),s=this.xmin;if(r)t=s,e=a,r=this._regioncode(t,e);else n=s,i=a,o=this._regioncode(n,i)}}_clipInfinite(t,e,n,i,r,o){let s=Array.from(e),a;if(a=this._project(s[0],s[1],n,i))s.unshift(a[0],a[1]);if(a=this._project(s[s.length-2],s[s.length-1],r,o))s.push(a[0],a[1]);if(s=this._clipFinite(t,s)){for(let e=0,n=s.length,i,r=this._edgecode(s[n-2],s[n-1]);e<n;e+=2){i=r,r=this._edgecode(s[e],s[e+1]);if(i&&r)e=this._edge(t,i,r,s,e),n=s.length}}else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)){s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]}return s}_edge(t,e,n,i,r){while(e!==n){let n,o;switch(e){case 5:e=4;continue;case 4:e=6,n=this.xmax,o=this.ymin;break;case 6:e=2;continue;case 2:e=10,n=this.xmax,o=this.ymax;break;case 10:e=8;continue;case 8:e=9,n=this.xmin,o=this.ymax;break;case 9:e=1;continue;case 1:e=5,n=this.xmin,o=this.ymin;break}if((i[r]!==n||i[r+1]!==o)&&this.contains(t,n,o)){i.splice(r,0,n,o),r+=2}}if(i.length>4){for(let t=0;t<i.length;t+=2){const e=(t+2)%i.length,n=(t+4)%i.length;if(i[t]===i[e]&&i[e]===i[n]||i[t+1]===i[e+1]&&i[e+1]===i[n+1])i.splice(e,2),t-=2}}return r}_project(t,e,n,i){let r=Infinity,o,s,a;if(i<0){if(e<=this.ymin)return null;if((o=(this.ymin-e)/i)<r)a=this.ymin,s=t+(r=o)*n}else if(i>0){if(e>=this.ymax)return null;if((o=(this.ymax-e)/i)<r)a=this.ymax,s=t+(r=o)*n}if(n>0){if(t>=this.xmax)return null;if((o=(this.xmax-t)/n)<r)s=this.xmax,a=e+(r=o)*i}else if(n<0){if(t<=this.xmin)return null;if((o=(this.xmin-t)/n)<r)s=this.xmin,a=e+(r=o)*i}return[s,a]}_edgecode(t,e){return(t===this.xmin?1:t===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}_regioncode(t,e){return(t<this.xmin?1:t>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}}const Zq=2*Math.PI,Qq=Math.pow;function tI(t){return t[0]}function eI(t){return t[1]}function nI(t){const{triangles:e,coords:n}=t;for(let i=0;i<e.length;i+=3){const t=2*e[i],r=2*e[i+1],o=2*e[i+2],s=(n[o]-n[t])*(n[r+1]-n[t+1])-(n[r]-n[t])*(n[o+1]-n[t+1]);if(s>1e-10)return false}return true}function iI(t,e,n){return[t+Math.sin(t+e)*n,e+Math.cos(t-e)*n]}class rI{static from(t,e=tI,n=eI,i){return new rI("length"in t?oI(t,e,n,i):Float64Array.from(sI(t,e,n,i)))}constructor(t){this._delaunator=new qq(t);this.inedges=new Int32Array(t.length/2);this._hullIndex=new Int32Array(t.length/2);this.points=this._delaunator.coords;this._init()}update(){this._delaunator.update();this._init();return this}_init(){const t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&nI(t)){this.collinear=Int32Array.from({length:e.length/2},((t,e)=>e)).sort(((t,n)=>e[2*t]-e[2*n]||e[2*t+1]-e[2*n+1]));const t=this.collinear[0],n=this.collinear[this.collinear.length-1],i=[e[2*t],e[2*t+1],e[2*n],e[2*n+1]],r=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]);for(let o=0,s=e.length/2;o<s;++o){const t=iI(e[2*o],e[2*o+1],r);e[2*o]=t[0];e[2*o+1]=t[1]}this._delaunator=new qq(e)}else{delete this.collinear}const n=this.halfedges=this._delaunator.halfedges;const i=this.hull=this._delaunator.hull;const r=this.triangles=this._delaunator.triangles;const o=this.inedges.fill(-1);const s=this._hullIndex.fill(-1);for(let a=0,l=n.length;a<l;++a){const t=r[a%3===2?a-2:a+1];if(n[a]===-1||o[t]===-1)o[t]=a}for(let a=0,l=i.length;a<l;++a){s[i[a]]=a}if(i.length<=2&&i.length>0){this.triangles=new Int32Array(3).fill(-1);this.halfedges=new Int32Array(3).fill(-1);this.triangles[0]=i[0];o[i[0]]=1;if(i.length===2){o[i[1]]=0;this.triangles[1]=i[1];this.triangles[2]=i[1]}}}voronoi(t){return new Kq(this,t)}*neighbors(t){const{inedges:e,hull:n,_hullIndex:i,halfedges:r,triangles:o,collinear:s}=this;if(s){const e=s.indexOf(t);if(e>0)yield s[e-1];if(e<s.length-1)yield s[e+1];return}const a=e[t];if(a===-1)return;let l=a,u=-1;do{yield u=o[l];l=l%3===2?l-2:l+1;if(o[l]!==t)return;l=r[l];if(l===-1){const e=n[(i[t]+1)%n.length];if(e!==u)yield e;return}}while(l!==a)}find(t,e,n=0){if((t=+t,t!==t)||(e=+e,e!==e))return-1;const i=n;let r;while((r=this._step(n,t,e))>=0&&r!==n&&r!==i)n=r;return r}_step(t,e,n){const{inedges:i,hull:r,_hullIndex:o,halfedges:s,triangles:a,points:l}=this;if(i[t]===-1||!l.length)return(t+1)%(l.length>>1);let u=t;let c=Qq(e-l[t*2],2)+Qq(n-l[t*2+1],2);const f=i[t];let h=f;do{let i=a[h];const f=Qq(e-l[i*2],2)+Qq(n-l[i*2+1],2);if(f<c)c=f,u=i;h=h%3===2?h-2:h+1;if(a[h]!==t)break;h=s[h];if(h===-1){h=r[(o[t]+1)%r.length];if(h!==i){if(Qq(e-l[h*2],2)+Qq(n-l[h*2+1],2)<c)return h}break}}while(h!==f);return u}render(t){const e=t==null?t=new Gq:undefined;const{points:n,halfedges:i,triangles:r}=this;for(let o=0,s=i.length;o<s;++o){const e=i[o];if(e<o)continue;const s=r[o]*2;const a=r[e]*2;t.moveTo(n[s],n[s+1]);t.lineTo(n[a],n[a+1])}this.renderHull(t);return e&&e.value()}renderPoints(t,e){if(e===undefined&&(!t||typeof t.moveTo!=="function"))e=t,t=null;e=e==undefined?2:+e;const n=t==null?t=new Gq:undefined;const{points:i}=this;for(let r=0,o=i.length;r<o;r+=2){const n=i[r],o=i[r+1];t.moveTo(n+e,o);t.arc(n,o,e,0,Zq)}return n&&n.value()}renderHull(t){const e=t==null?t=new Gq:undefined;const{hull:n,points:i}=this;const r=n[0]*2,o=n.length;t.moveTo(i[r],i[r+1]);for(let s=1;s<o;++s){const e=2*n[s];t.lineTo(i[e],i[e+1])}t.closePath();return e&&e.value()}hullPolygon(){const t=new Vq;this.renderHull(t);return t.value()}renderTriangle(t,e){const n=e==null?e=new Gq:undefined;const{points:i,triangles:r}=this;const o=r[t*=3]*2;const s=r[t+1]*2;const a=r[t+2]*2;e.moveTo(i[o],i[o+1]);e.lineTo(i[s],i[s+1]);e.lineTo(i[a],i[a+1]);e.closePath();return n&&n.value()}*trianglePolygons(){const{triangles:t}=this;for(let e=0,n=t.length/3;e<n;++e){yield this.trianglePolygon(e)}}trianglePolygon(t){const e=new Vq;this.renderTriangle(t,e);return e.value()}}function oI(t,e,n,i){const r=t.length;const o=new Float64Array(r*2);for(let s=0;s<r;++s){const r=t[s];o[s*2]=e.call(i,r,s,t);o[s*2+1]=n.call(i,r,s,t)}return o}function*sI(t,e,n,i){let r=0;for(const o of t){yield e.call(i,o,r,t);yield n.call(i,o,r,t);++r}}function aI(t){Cs.call(this,null,t)}aI.Definition={type:"Voronoi",metadata:{modifies:true},params:[{name:"x",type:"field",required:true},{name:"y",type:"field",required:true},{name:"size",type:"number",array:true,length:2},{name:"extent",type:"array",array:true,length:2,default:[[-1e5,-1e5],[1e5,1e5]],content:{type:"number",array:true,length:2}},{name:"as",type:"string",default:"path"}]};const lI=[-1e5,-1e5,1e5,1e5];(0,m.XW)(aI,Cs,{transform(t,e){const n=t.as||"path",i=e.source;if(!i||!i.length)return e;let r=t.size;r=r?[0,0,r[0],r[1]]:(r=t.extent)?[r[0][0],r[0][1],r[1][0],r[1][1]]:lI;const o=this.value=rI.from(i,t.x,t.y).voronoi(r);for(let s=0,a=i.length;s<a;++s){const t=o.cellPolygon(s);i[s][n]=t?uI(t):null}return e.reflow(t.modified()).modifies(n)}});function uI(t){const e=t[0][0],n=t[0][1];let i=t.length-1;for(;t[i][0]===e&&t[i][1]===n;--i);return"M"+t.slice(0,i+1).join("L")+"Z"}var cI=Math.PI/180,fI=1<<11>>5,hI=1<<11;function dI(){var t=[256,256],e,n,i,r,o,s,a,l=vI,u=[],c=Math.random,f={};f.layout=function(){var l=h(Vf()),f=xI((t[0]>>5)*t[1]),p=null,m=u.length,g=-1,y=[],v=u.map((t=>({text:e(t),font:n(t),style:r(t),weight:o(t),rotate:s(t),size:~~(i(t)+1e-14),padding:a(t),xoff:0,yoff:0,x1:0,y1:0,x0:0,y0:0,hasText:false,sprite:null,datum:t}))).sort(((t,e)=>e.size-t.size));while(++g<m){var _=v[g];_.x=t[0]*(c()+.5)>>1;_.y=t[1]*(c()+.5)>>1;pI(l,_,v,g);if(_.hasText&&d(f,_,p)){y.push(_);if(p)gI(p,_);else p=[{x:_.x+_.x0,y:_.y+_.y0},{x:_.x+_.x1,y:_.y+_.y1}];_.x-=t[0]>>1;_.y-=t[1]>>1}}return y};function h(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=(fI<<5)/e;t.height=hI/e;var n=t.getContext("2d");n.fillStyle=n.strokeStyle="red";n.textAlign="center";return{context:n,ratio:e}}function d(e,n,i){var r=n.x,o=n.y,s=Math.sqrt(t[0]*t[0]+t[1]*t[1]),a=l(t),u=c()<.5?1:-1,f=-u,h,d,p;while(h=a(f+=u)){d=~~h[0];p=~~h[1];if(Math.min(Math.abs(d),Math.abs(p))>=s)break;n.x=r+d;n.y=o+p;if(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1])continue;if(!i||!mI(n,e,t[0])){if(!i||yI(n,i)){var m=n.sprite,g=n.width>>5,y=t[0]>>5,v=n.x-(g<<4),_=v&127,x=32-_,b=n.y1-n.y0,w=(n.y+n.y0)*y+(v>>5),k;for(var M=0;M<b;M++){k=0;for(var S=0;S<=g;S++){e[w+S]|=k<<x|(S<g?(k=m[M*g+S])>>>_:0)}w+=y}n.sprite=null;return true}}}return false}f.words=function(t){if(arguments.length){u=t;return f}else{return u}};f.size=function(e){if(arguments.length){t=[+e[0],+e[1]];return f}else{return t}};f.font=function(t){if(arguments.length){n=bI(t);return f}else{return n}};f.fontStyle=function(t){if(arguments.length){r=bI(t);return f}else{return r}};f.fontWeight=function(t){if(arguments.length){o=bI(t);return f}else{return o}};f.rotate=function(t){if(arguments.length){s=bI(t);return f}else{return s}};f.text=function(t){if(arguments.length){e=bI(t);return f}else{return e}};f.spiral=function(t){if(arguments.length){l=wI[t]||t;return f}else{return l}};f.fontSize=function(t){if(arguments.length){i=bI(t);return f}else{return i}};f.padding=function(t){if(arguments.length){a=bI(t);return f}else{return a}};f.random=function(t){if(arguments.length){c=t;return f}else{return c}};return f}function pI(t,e,n,i){if(e.sprite)return;var r=t.context,o=t.ratio;r.clearRect(0,0,(fI<<5)/o,hI/o);var s=0,a=0,l=0,u=n.length,c,f,h,d,p;--i;while(++i<u){e=n[i];r.save();r.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;c=r.measureText(e.text+"m").width*o;h=e.size<<1;if(e.rotate){var m=Math.sin(e.rotate*cI),g=Math.cos(e.rotate*cI),y=c*g,v=c*m,_=h*g,x=h*m;c=Math.max(Math.abs(y+x),Math.abs(y-x))+31>>5<<5;h=~~Math.max(Math.abs(v+_),Math.abs(v-_))}else{c=c+31>>5<<5}if(h>l)l=h;if(s+c>=fI<<5){s=0;a+=l;l=0}if(a+h>=hI)break;r.translate((s+(c>>1))/o,(a+(h>>1))/o);if(e.rotate)r.rotate(e.rotate*cI);r.fillText(e.text,0,0);if(e.padding){r.lineWidth=2*e.padding;r.strokeText(e.text,0,0)}r.restore();e.width=c;e.height=h;e.xoff=s;e.yoff=a;e.x1=c>>1;e.y1=h>>1;e.x0=-e.x1;e.y0=-e.y1;e.hasText=true;s+=c}var b=r.getImageData(0,0,(fI<<5)/o,hI/o).data,w=[];while(--i>=0){e=n[i];if(!e.hasText)continue;c=e.width;f=c>>5;h=e.y1-e.y0;for(d=0;d<h*f;d++)w[d]=0;s=e.xoff;if(s==null)return;a=e.yoff;var k=0,M=-1;for(p=0;p<h;p++){for(d=0;d<c;d++){var S=f*p+(d>>5),E=b[(a+p)*(fI<<5)+(s+d)<<2]?1<<31-d%32:0;w[S]|=E;k|=E}if(k)M=p;else{e.y0++;h--;p--;a++}}e.y1=e.y0+M;e.sprite=w.slice(0,(e.y1-e.y0)*f)}}function mI(t,e,n){n>>=5;var i=t.sprite,r=t.width>>5,o=t.x-(r<<4),s=o&127,a=32-s,l=t.y1-t.y0,u=(t.y+t.y0)*n+(o>>5),c;for(var f=0;f<l;f++){c=0;for(var h=0;h<=r;h++){if((c<<a|(h<r?(c=i[f*r+h])>>>s:0))&e[u+h])return true}u+=n}return false}function gI(t,e){var n=t[0],i=t[1];if(e.x+e.x0<n.x)n.x=e.x+e.x0;if(e.y+e.y0<n.y)n.y=e.y+e.y0;if(e.x+e.x1>i.x)i.x=e.x+e.x1;if(e.y+e.y1>i.y)i.y=e.y+e.y1}function yI(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function vI(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function _I(t){var e=4,n=e*t[0]/t[1],i=0,r=0;return function(t){var o=t<0?-1:1;switch(Math.sqrt(1+4*o*t)-o&3){case 0:i+=n;break;case 1:r+=e;break;case 2:i-=n;break;default:r-=e;break}return[i,r]}}function xI(t){var e=[],n=-1;while(++n<t)e[n]=0;return e}function bI(t){return typeof t==="function"?t:function(){return t}}var wI={archimedean:vI,rectangular:_I};const kI=["x","y","font","fontSize","fontStyle","fontWeight","angle"];const MI=["text","font","rotate","fontSize","fontStyle","fontWeight"];function SI(t){Cs.call(this,dI(),t)}SI.Definition={type:"Wordcloud",metadata:{modifies:true},params:[{name:"size",type:"number",array:true,length:2},{name:"font",type:"string",expr:true,default:"sans-serif"},{name:"fontStyle",type:"string",expr:true,default:"normal"},{name:"fontWeight",type:"string",expr:true,default:"normal"},{name:"fontSize",type:"number",expr:true,default:14},{name:"fontSizeRange",type:"number",array:"nullable",default:[10,50]},{name:"rotate",type:"number",expr:true,default:0},{name:"text",type:"field"},{name:"spiral",type:"string",values:["archimedean","rectangular"]},{name:"padding",type:"number",expr:true},{name:"as",type:"string",array:true,length:7,default:kI}]};(0,m.XW)(SI,Cs,{transform(t,e){if(t.size&&!(t.size[0]&&t.size[1])){(0,m.vU)("Wordcloud size dimensions must be non-zero.")}function n(n){const i=t[n];return(0,m.mf)(i)&&e.modified(i.fields)}const i=t.modified();if(!(i||e.changed(e.ADD_REM)||MI.some(n)))return;const r=e.materialize(e.SOURCE).source,o=this.value,s=t.as||kI;let a=t.fontSize||14,l;(0,m.mf)(a)?l=t.fontSizeRange:a=(0,m.a9)(a);if(l){const t=a,e=bg("sqrt")().domain((0,m.We)(r,t)).range(l);a=n=>e(t(n))}r.forEach((t=>{t[s[0]]=NaN;t[s[1]]=NaN;t[s[3]]=0}));const u=o.words(r).text(t.text).size(t.size||[500,500]).padding(t.padding||1).spiral(t.spiral||"archimedean").rotate(t.rotate||0).font(t.font||"sans-serif").fontStyle(t.fontStyle||"normal").fontWeight(t.fontWeight||"normal").fontSize(a).random(na).layout();const c=o.size(),f=c[0]>>1,h=c[1]>>1,d=u.length;for(let p=0,m,g;p<d;++p){m=u[p];g=m.datum;g[s[0]]=m.x+f;g[s[1]]=m.y+h;g[s[2]]=m.font;g[s[3]]=m.size;g[s[4]]=m.style;g[s[5]]=m.weight;g[s[6]]=m.rotate}return e.reflow(i).modifies(s)}});function EI(t,e){return Array.from(e,(e=>t[e]))}const TI=t=>new Uint8Array(t);const DI=t=>new Uint16Array(t);const AI=t=>new Uint32Array(t);function NI(){let t=8,e=[],n=AI(0),i=RI(0,t),r=RI(0,t);return{data:()=>e,seen:()=>n=zI(n,e.length),add(t){for(let n=0,i=e.length,r=t.length,o;n<r;++n){o=t[n];o._index=i++;e.push(o)}},remove(t,n){const o=e.length,s=Array(o-t),a=e;let l,u,c;for(u=0;!n[u]&&u<o;++u){s[u]=e[u];a[u]=u}for(c=u;u<o;++u){l=e[u];if(!n[u]){a[u]=c;i[c]=i[u];r[c]=r[u];s[c]=l;l._index=c++}else{a[u]=-1}i[u]=0}e=s;return a},size:()=>e.length,curr:()=>i,prev:()=>r,reset:t=>r[t]=i[t],all:()=>t<257?255:t<65537?65535:4294967295,set(t,e){i[t]|=e},clear(t,e){i[t]&=~e},resize(e,n){const o=i.length;if(e>o||n>t){t=Math.max(n,t);i=RI(e,t,i);r=RI(e,t)}}}}function zI(t,e,n){if(t.length>=e)return t;n=n||new t.constructor(e);n.set(t);return n}function RI(t,e,n){const i=(e<257?TI:e<65537?DI:AI)(t);if(n)i.set(n);return i}function CI(t,e,n){const i=1<<e;return{one:i,zero:~i,range:n.slice(),bisect:t.bisect,index:t.index,size:t.size,onAdd(t,e){const n=this,r=n.bisect(n.range,t.value),o=t.index,s=r[0],a=r[1],l=o.length;let u;for(u=0;u<s;++u)e[o[u]]|=i;for(u=a;u<l;++u)e[o[u]]|=i;return n}}}function OI(){let t=AI(0),e=[],n=0;function i(i,r,o){if(!r.length)return[];const s=n,a=r.length,l=AI(a);let u=Array(a),c,f,h;for(h=0;h<a;++h){u[h]=i(r[h]);l[h]=h}u=UI(u,l);if(s){c=e;f=t;e=Array(s+a);t=AI(s+a);$I(o,c,f,s,u,l,a,e,t)}else{if(o>0)for(h=0;h<a;++h){l[h]+=o}e=u;t=l}n=s+a;return{index:l,value:u}}function r(i,r){const o=n;let s,a,l;for(a=0;!r[t[a]]&&a<o;++a);for(l=a;a<o;++a){if(!r[s=t[a]]){t[l]=s;e[l]=e[a];++l}}n=o-i}function o(e){for(let i=0,r=n;i<r;++i){t[i]=e[t[i]]}}function s(t,i){let r;if(i){r=i.length}else{i=e;r=n}return[th(i,t[0],0,r),Qf(i,t[1],0,r)]}return{insert:i,remove:r,bisect:s,reindex:o,index:()=>t,size:()=>n}}function UI(t,e){t.sort.call(e,((e,n)=>{const i=t[e],r=t[n];return i<r?-1:i>r?1:0}));return EI(t,e)}function $I(t,e,n,i,r,o,s,a,l){let u=0,c=0,f;for(f=0;u<i&&c<s;++f){if(e[u]<r[c]){a[f]=e[u];l[f]=n[u++]}else{a[f]=r[c];l[f]=o[c++]+t}}for(;u<i;++u,++f){a[f]=e[u];l[f]=n[u]}for(;c<s;++c,++f){a[f]=r[c];l[f]=o[c]+t}}function PI(t){Cs.call(this,NI(),t);this._indices=null;this._dims=null}PI.Definition={type:"CrossFilter",metadata:{},params:[{name:"fields",type:"field",array:true,required:true},{name:"query",type:"array",array:true,required:true,content:{type:"number",array:true,length:2}}]};(0,m.XW)(PI,Cs,{transform(t,e){if(!this._dims){return this.init(t,e)}else{var n=t.modified("fields")||t.fields.some((t=>e.modified(t.fields)));return n?this.reinit(t,e):this.eval(t,e)}},init(t,e){const n=t.fields,i=t.query,r=this._indices={},o=this._dims=[],s=i.length;let a=0,l,u;for(;a<s;++a){l=n[a].fname;u=r[l]||(r[l]=OI());o.push(CI(u,a,i[a]))}return this.eval(t,e)},reinit(t,e){const n=e.materialize().fork(),i=t.fields,r=t.query,o=this._indices,s=this._dims,a=this.value,l=a.curr(),u=a.prev(),c=a.all(),f=n.rem=n.add,h=n.mod,d=r.length,p={};let m,g,y,v,_,x,b,w,k;u.set(l);if(e.rem.length){_=this.remove(t,e,n)}if(e.add.length){a.add(e.add)}if(e.mod.length){x={};for(v=e.mod,b=0,w=v.length;b<w;++b){x[v[b]._index]=1}}for(b=0;b<d;++b){k=i[b];if(!s[b]||t.modified("fields",b)||e.modified(k.fields)){y=k.fname;if(!(m=p[y])){o[y]=g=OI();p[y]=m=g.insert(k,e.source,0)}s[b]=CI(g,b,r[b]).onAdd(m,l)}}for(b=0,w=a.data().length;b<w;++b){if(_[b]){continue}else if(u[b]!==l[b]){f.push(b)}else if(x[b]&&l[b]!==c){h.push(b)}}a.mask=(1<<d)-1;return n},eval(t,e){const n=e.materialize().fork(),i=this._dims.length;let r=0;if(e.rem.length){this.remove(t,e,n);r|=(1<<i)-1}if(t.modified("query")&&!t.modified("fields")){r|=this.update(t,e,n)}if(e.add.length){this.insert(t,e,n);r|=(1<<i)-1}if(e.mod.length){this.modify(e,n);r|=(1<<i)-1}this.value.mask=r;return n},insert(t,e,n){const i=e.add,r=this.value,o=this._dims,s=this._indices,a=t.fields,l={},u=n.add,c=r.size()+i.length,f=o.length;let h=r.size(),d,p,m;r.resize(c,f);r.add(i);const g=r.curr(),y=r.prev(),v=r.all();for(d=0;d<f;++d){p=a[d].fname;m=l[p]||(l[p]=s[p].insert(a[d],i,h));o[d].onAdd(m,g)}for(;h<c;++h){y[h]=v;if(g[h]!==v)u.push(h)}},modify(t,e){const n=e.mod,i=this.value,r=i.curr(),o=i.all(),s=t.mod;let a,l,u;for(a=0,l=s.length;a<l;++a){u=s[a]._index;if(r[u]!==o)n.push(u)}},remove(t,e,n){const i=this._indices,r=this.value,o=r.curr(),s=r.prev(),a=r.all(),l={},u=n.rem,c=e.rem;let f,h,d,p;for(f=0,h=c.length;f<h;++f){d=c[f]._index;l[d]=1;s[d]=p=o[d];o[d]=a;if(p!==a)u.push(d)}for(d in i){i[d].remove(h,l)}this.reindex(e,h,l);return l},reindex(t,e,n){const i=this._indices,r=this.value;t.runAfter((()=>{const t=r.remove(e,n);for(const e in i)i[e].reindex(t)}))},update(t,e,n){const i=this._dims,r=t.query,o=e.stamp,s=i.length;let a=0,l,u;n.filters=0;for(u=0;u<s;++u){if(t.modified("query",u)){l=u;++a}}if(a===1){a=i[l].one;this.incrementOne(i[l],r[l],n.add,n.rem)}else{for(u=0,a=0;u<s;++u){if(!t.modified("query",u))continue;a|=i[u].one;this.incrementAll(i[u],r[u],o,n.add);n.rem=n.add}}return a},incrementAll(t,e,n,i){const r=this.value,o=r.seen(),s=r.curr(),a=r.prev(),l=t.index(),u=t.bisect(t.range),c=t.bisect(e),f=c[0],h=c[1],d=u[0],p=u[1],m=t.one;let g,y,v;if(f<d){for(g=f,y=Math.min(d,h);g<y;++g){v=l[g];if(o[v]!==n){a[v]=s[v];o[v]=n;i.push(v)}s[v]^=m}}else if(f>d){for(g=d,y=Math.min(f,p);g<y;++g){v=l[g];if(o[v]!==n){a[v]=s[v];o[v]=n;i.push(v)}s[v]^=m}}if(h>p){for(g=Math.max(f,p),y=h;g<y;++g){v=l[g];if(o[v]!==n){a[v]=s[v];o[v]=n;i.push(v)}s[v]^=m}}else if(h<p){for(g=Math.max(d,h),y=p;g<y;++g){v=l[g];if(o[v]!==n){a[v]=s[v];o[v]=n;i.push(v)}s[v]^=m}}t.range=e.slice()},incrementOne(t,e,n,i){const r=this.value,o=r.curr(),s=t.index(),a=t.bisect(t.range),l=t.bisect(e),u=l[0],c=l[1],f=a[0],h=a[1],d=t.one;let p,m,g;if(u<f){for(p=u,m=Math.min(f,c);p<m;++p){g=s[p];o[g]^=d;n.push(g)}}else if(u>f){for(p=f,m=Math.min(u,h);p<m;++p){g=s[p];o[g]^=d;i.push(g)}}if(c>h){for(p=Math.max(u,h),m=c;p<m;++p){g=s[p];o[g]^=d;n.push(g)}}else if(c<h){for(p=Math.max(f,c),m=h;p<m;++p){g=s[p];o[g]^=d;i.push(g)}}t.range=e.slice()}});function qI(t){Cs.call(this,null,t)}qI.Definition={type:"ResolveFilter",metadata:{},params:[{name:"ignore",type:"number",required:true,description:"A bit mask indicating which filters to ignore."},{name:"filter",type:"object",required:true,description:"Per-tuple filter bitmaps from a CrossFilter transform."}]};(0,m.XW)(qI,Cs,{transform(t,e){const n=~(t.ignore||0),i=t.filter,r=i.mask;if((r&n)===0)return e.StopPropagation;const o=e.fork(e.ALL),s=i.data(),a=i.curr(),l=i.prev(),u=t=>!(a[t]&n)?s[t]:null;o.filter(o.MOD,u);if(!(r&r-1)){o.filter(o.ADD,u);o.filter(o.REM,(t=>(a[t]&n)===r?s[t]:null))}else{o.filter(o.ADD,(t=>{const e=a[t]&n,i=!e&&e^l[t]&n;return i?s[t]:null}));o.filter(o.REM,(t=>{const e=a[t]&n,i=e&&!(e^(e^l[t]&n));return i?s[t]:null}))}return o.filter(o.SOURCE,(t=>u(t._index)))}});var II=n(25693);var LI=new TE;var FI=new TE,jI,WI,XI,HI,BI;var YI={point:eT,lineStart:eT,lineEnd:eT,polygonStart:function(){LI=new TE;YI.lineStart=JI;YI.lineEnd=GI},polygonEnd:function(){var t=+LI;FI.add(t<0?UE+t:t);this.lineStart=this.lineEnd=this.point=eT},sphere:function(){FI.add(UE)}};function JI(){YI.point=VI}function GI(){KI(jI,WI)}function VI(t,e){YI.point=KI;jI=t,WI=e;t*=PE,e*=PE;XI=t,HI=FE(e=e/2+OE),BI=JE(e)}function KI(t,e){t*=PE,e*=PE;e=e/2+OE;var n=t-XI,i=n>=0?1:-1,r=i*n,o=FE(e),s=JE(e),a=BI*s,l=HI*o+a*FE(r),u=a*i*JE(r);LI.add(LE(u,l));XI=t,HI=o,BI=s}function ZI(t){FI=new TE;EE(t,YI);return FI*2}var QI,tL,eL,nL,iL,rL,oL,sL,aL,lL,uL;var cL={point:fL,lineStart:dL,lineEnd:pL,polygonStart:function(){cL.point=mL;cL.lineStart=gL;cL.lineEnd=yL;aL=new TE;YI.polygonStart()},polygonEnd:function(){YI.polygonEnd();cL.point=fL;cL.lineStart=dL;cL.lineEnd=pL;if(LI<0)QI=-(eL=180),tL=-(nL=90);else if(aL>NE)nL=90;else if(aL<-NE)tL=-90;uL[0]=QI,uL[1]=eL},sphere:function(){QI=-(eL=180),tL=-(nL=90)}};function fL(t,e){lL.push(uL=[QI=t,eL=t]);if(e<tL)tL=e;if(e>nL)nL=e}function hL(t,e){var n=fD([t*PE,e*PE]);if(sL){var i=dD(sL,n),r=[i[1],-i[0],0],o=dD(r,i);gD(o);o=cD(o);var s=t-iL,a=s>0?1:-1,l=o[0]*$E*a,u,c=qE(s)>180;if(c^(a*iL<l&&l<a*t)){u=o[1]*$E;if(u>nL)nL=u}else if(l=(l+360)%360-180,c^(a*iL<l&&l<a*t)){u=-o[1]*$E;if(u<tL)tL=u}else{if(e<tL)tL=e;if(e>nL)nL=e}if(c){if(t<iL){if(vL(QI,t)>vL(QI,eL))eL=t}else{if(vL(t,eL)>vL(QI,eL))QI=t}}else{if(eL>=QI){if(t<QI)QI=t;if(t>eL)eL=t}else{if(t>iL){if(vL(QI,t)>vL(QI,eL))eL=t}else{if(vL(t,eL)>vL(QI,eL))QI=t}}}}else{lL.push(uL=[QI=t,eL=t])}if(e<tL)tL=e;if(e>nL)nL=e;sL=n,iL=t}function dL(){cL.point=hL}function pL(){uL[0]=QI,uL[1]=eL;cL.point=fL;sL=null}function mL(t,e){if(sL){var n=t-iL;aL.add(qE(n)>180?n+(n>0?360:-360):n)}else{rL=t,oL=e}YI.point(t,e);hL(t,e)}function gL(){YI.lineStart()}function yL(){mL(rL,oL);YI.lineEnd();if(qE(aL)>NE)QI=-(eL=180);uL[0]=QI,uL[1]=eL;sL=null}function vL(t,e){return(e-=t)<0?e+360:e}function _L(t,e){return t[0]-e[0]}function xL(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function bL(t){var e,n,i,r,o,s,a;nL=eL=-(QI=tL=Infinity);lL=[];EE(t,cL);if(n=lL.length){lL.sort(_L);for(e=1,i=lL[0],o=[i];e<n;++e){r=lL[e];if(xL(i,r[0])||xL(i,r[1])){if(vL(i[0],r[1])>vL(i[0],i[1]))i[1]=r[1];if(vL(r[0],i[1])>vL(i[0],i[1]))i[0]=r[0]}else{o.push(i=r)}}for(s=-Infinity,n=o.length-1,e=0,i=o[n];e<=n;i=r,++e){r=o[e];if((a=vL(i[1],r[0]))>s)s=a,QI=r[0],eL=i[1]}}lL=uL=null;return QI===Infinity||tL===Infinity?[[NaN,NaN],[NaN,NaN]]:[[QI,tL],[eL,nL]]}var wL,kL,ML,SL,EL,TL,DL,AL,NL,zL,RL,CL,OL,UL,$L,PL;var qL={sphere:eT,point:IL,lineStart:FL,lineEnd:XL,polygonStart:function(){qL.lineStart=HL;qL.lineEnd=BL},polygonEnd:function(){qL.lineStart=FL;qL.lineEnd=XL}};function IL(t,e){t*=PE,e*=PE;var n=FE(e);LL(n*FE(t),n*JE(t),JE(e))}function LL(t,e,n){++wL;ML+=(t-ML)/wL;SL+=(e-SL)/wL;EL+=(n-EL)/wL}function FL(){qL.point=jL}function jL(t,e){t*=PE,e*=PE;var n=FE(e);UL=n*FE(t);$L=n*JE(t);PL=JE(e);qL.point=WL;LL(UL,$L,PL)}function WL(t,e){t*=PE,e*=PE;var n=FE(e),i=n*FE(t),r=n*JE(t),o=JE(e),s=LE(VE((s=$L*o-PL*r)*s+(s=PL*i-UL*o)*s+(s=UL*r-$L*i)*s),UL*i+$L*r+PL*o);kL+=s;TL+=s*(UL+(UL=i));DL+=s*($L+($L=r));AL+=s*(PL+(PL=o));LL(UL,$L,PL)}function XL(){qL.point=IL}function HL(){qL.point=YL}function BL(){JL(CL,OL);qL.point=IL}function YL(t,e){CL=t,OL=e;t*=PE,e*=PE;qL.point=JL;var n=FE(e);UL=n*FE(t);$L=n*JE(t);PL=JE(e);LL(UL,$L,PL)}function JL(t,e){t*=PE,e*=PE;var n=FE(e),i=n*FE(t),r=n*JE(t),o=JE(e),s=$L*o-PL*r,a=PL*i-UL*o,l=UL*r-$L*i,u=HE(s,a,l),c=QE(u),f=u&&-c/u;NL.add(f*s);zL.add(f*a);RL.add(f*l);kL+=c;TL+=c*(UL+(UL=i));DL+=c*($L+($L=r));AL+=c*(PL+(PL=o));LL(UL,$L,PL)}function GL(t){wL=kL=ML=SL=EL=TL=DL=AL=0;NL=new TE;zL=new TE;RL=new TE;EE(t,qL);var e=+NL,n=+zL,i=+RL,r=HE(e,n,i);if(r<zE){e=TL,n=DL,i=AL;if(kL<NE)e=ML,n=SL,i=EL;r=HE(e,n,i);if(r<zE)return[NaN,NaN]}return[LE(n,e)*$E,QE(i/r)*$E]}function VL(...t){const e=new Tp;for(const n of t){for(const t of n){e.add(t)}}return e}function KL(t,...e){t=new Tp(t);e=e.map(ZL);t:for(const n of t){for(const i of e){if(!i.has(n)){t.delete(n);continue t}}}return t}function ZL(t){return t instanceof Tp?t:new Tp(t)}const QL="intersect";const tF="union";const eF="vlMulti";const nF="vlPoint";const iF="or";const rF="and";const oF="_vgsid_";const sF=(0,m.EP)(oF);const aF="E",lF="R",uF="R-E",cF="R-LE",fF="R-RE",hF="index:unit";function dF(t,e){var n=e.fields,i=e.values,r=n.length,o=0,s,a;for(;o<r;++o){a=n[o];a.getter=m.EP.getter||(0,m.EP)(a.field);s=a.getter(t);if((0,m.J_)(s))s=(0,m.He)(s);if((0,m.J_)(i[o]))i[o]=(0,m.He)(i[o]);if((0,m.J_)(i[o][0]))i[o]=i[o].map(m.He);if(a.type===aF){if((0,m.kJ)(i[o])?i[o].indexOf(s)<0:s!==i[o]){return false}}else{if(a.type===lF){if(!(0,m.u5)(s,i[o]))return false}else if(a.type===fF){if(!(0,m.u5)(s,i[o],true,false))return false}else if(a.type===uF){if(!(0,m.u5)(s,i[o],false,false))return false}else if(a.type===cF){if(!(0,m.u5)(s,i[o],false,true))return false}}}return true}function pF(t,e,n){var i=this.context.data[t],r=i?i.values.value:[],o=i?i[hF]&&i[hF].value:undefined,s=n===QL,a=r.length,l=0,u,c,f,h,d;for(;l<a;++l){u=r[l];if(o&&s){c=c||{};f=c[h=u.unit]||0;if(f===-1)continue;d=dF(e,u);c[h]=d?-1:++f;if(d&&o.size===1)return true;if(!d&&f===o.get(h).count)return false}else{d=dF(e,u);if(s^d)return d}}return a&&s}const mF=Te(sF),gF=mF.left,yF=mF.right;function vF(t,e,n){const i=this.context.data[t],r=i?i.values.value:[],o=i?i[hF]&&i[hF].value:undefined,s=n===QL,a=sF(e),l=gF(r,a);if(l===r.length)return false;if(sF(r[l])!==a)return false;if(o&&s){if(o.size===1)return true;if(yF(r,a)-l<o.size)return false}return true}function _F(t,e){return t.map((t=>(0,m.l7)(e.fields?{values:e.fields.map((e=>(e.getter||(e.getter=(0,m.EP)(e.field)))(t.datum)))}:{[oF]:sF(t.datum)},e)))}function xF(t,e,n,i){var r=this.context.data[t],o=r?r.values.value:[],s={},a={},l={},u,c,f,h,d,p,g,y,v,_,x=o.length,b=0,w,k;for(;b<x;++b){u=o[b];h=u.unit;c=u.fields;f=u.values;if(c&&f){for(w=0,k=c.length;w<k;++w){d=c[w];g=s[d.field]||(s[d.field]={});y=g[h]||(g[h]=[]);l[d.field]=v=d.type.charAt(0);_=bF["".concat(v,"_union")];g[h]=_(y,(0,m.IX)(f[w]))}if(n){y=a[h]||(a[h]=[]);y.push((0,m.IX)(f).reduce(((t,e,n)=>(t[c[n].field]=e,t)),{}))}}else{d=oF;p=sF(u);g=s[d]||(s[d]={});y=g[h]||(g[h]=[]);y.push(p);if(n){y=a[h]||(a[h]=[]);y.push({[oF]:p})}}}e=e||tF;if(s[oF]){s[oF]=bF["".concat(oF,"_").concat(e)](...Object.values(s[oF]))}else{Object.keys(s).forEach((t=>{s[t]=Object.keys(s[t]).map((e=>s[t][e])).reduce(((n,i)=>n===undefined?i:bF["".concat(l[t],"_").concat(e)](n,i)))}))}o=Object.keys(a);if(n&&o.length){const t=i?nF:eF;s[t]=e===tF?{[iF]:o.reduce(((t,e)=>(t.push(...a[e]),t)),[])}:{[rF]:o.map((t=>({[iF]:a[t]})))}}return s}var bF={["".concat(oF,"_union")]:VL,["".concat(oF,"_intersect")]:KL,E_union:function(t,e){if(!t.length)return e;var n=0,i=e.length;for(;n<i;++n)if(t.indexOf(e[n])<0)t.push(e[n]);return t},E_intersect:function(t,e){return!t.length?e:t.filter((t=>e.indexOf(t)>=0))},R_union:function(t,e){var n=(0,m.He)(e[0]),i=(0,m.He)(e[1]);if(n>i){n=e[1];i=e[0]}if(!t.length)return[n,i];if(t[0]>n)t[0]=n;if(t[1]<i)t[1]=i;return t},R_intersect:function(t,e){var n=(0,m.He)(e[0]),i=(0,m.He)(e[1]);if(n>i){n=e[1];i=e[0]}if(!t.length)return[n,i];if(i<t[0]||t[1]<n){return[]}else{if(t[0]<n)t[0]=n;if(t[1]>i)t[1]=i}return t}};const wF=":",kF="@";function MF(t,e,n,i){if(e[0].type!==II.t$)(0,m.vU)("First argument to selection functions must be a string literal.");const r=e[0].value,o=e.length>=2&&(0,m.fj)(e).value,s="unit",a=kF+s,l=wF+r;if(o===QL&&!(0,m.nr)(i,a)){i[a]=n.getData(r).indataRef(n,s)}if(!(0,m.nr)(i,l)){i[l]=n.getData(r).tuplesRef()}}function SF(t){const e=this.context.data[t];return e?e.values.value:[]}function EF(t,e,n){const i=this.context.data[t]["index:"+e],r=i?i.value.get(n):undefined;return r?r.count:r}function TF(t,e){const n=this.context.dataflow,i=this.context.data[t],r=i.input;n.pulse(r,n.changeset().remove(m.yb).insert(e));return 1}function DF(t,e,n){if(t){const n=this.context.dataflow,i=t.mark.source;n.pulse(i,n.changeset().encode(t,e))}return n!==undefined?n:t}const AF=t=>function(e,n){const i=this.context.dataflow.locale();return i[t](n)(e)};const NF=AF("format");const zF=AF("timeFormat");const RF=AF("utcFormat");const CF=AF("timeParse");const OF=AF("utcParse");const UF=new Date(2e3,0,1);function $F(t,e,n){if(!Number.isInteger(t)||!Number.isInteger(e))return"";UF.setYear(2e3);UF.setMonth(t);UF.setDate(e);return zF.call(this,UF,n)}function PF(t){return $F.call(this,t,1,"%B")}function qF(t){return $F.call(this,t,1,"%b")}function IF(t){return $F.call(this,0,2+t,"%A")}function LF(t){return $F.call(this,0,2+t,"%a")}const FF=":";const jF="@";const WF="%";const XF="$";function HF(t,e,n,i){if(e[0].type!==II.t$){(0,m.vU)("First argument to data functions must be a string literal.")}const r=e[0].value,o=FF+r;if(!(0,m.nr)(o,i)){try{i[o]=n.getData(r).tuplesRef()}catch(s){}}}function BF(t,e,n,i){if(e[0].type!==II.t$)(0,m.vU)("First argument to indata must be a string literal.");if(e[1].type!==II.t$)(0,m.vU)("Second argument to indata must be a string literal.");const r=e[0].value,o=e[1].value,s=jF+o;if(!(0,m.nr)(s,i)){i[s]=n.getData(r).indataRef(n,o)}}function YF(t,e,n,i){if(e[0].type===II.t$){JF(n,i,e[0].value)}else{for(t in n.scales){JF(n,i,t)}}}function JF(t,e,n){const i=WF+n;if(!(0,m.nr)(e,i)){try{e[i]=t.scaleRef(n)}catch(r){}}}function GF(t,e){let n;return(0,m.mf)(t)?t:(0,m.HD)(t)?(n=e.scales[t])&&n.value:undefined}function VF(t,e,n){e.__bandwidth=t=>t&&t.bandwidth?t.bandwidth():0;n._bandwidth=YF;n._range=YF;n._scale=YF;const i=e=>"_["+(e.type===II.t$?(0,m.m8)(WF+e.value):(0,m.m8)(WF)+"+"+t(e))+"]";return{_bandwidth:t=>"this.__bandwidth(".concat(i(t[0]),")"),_range:t=>"".concat(i(t[0]),".range()"),_scale:e=>"".concat(i(e[0]),"(").concat(t(e[1]),")")}}function KF(t,e){return function(n,i,r){if(n){const e=GF(n,(r||this).context);return e&&e.path[t](i)}else{return e(i)}}}const ZF=KF("area",ZI);const QF=KF("bounds",bL);const tj=KF("centroid",GL);function ej(t){const e=this.context.group;let n=false;if(e)while(t){if(t===e){n=true;break}t=t.mark.group}return n}function nj(t,e,n){try{t[e].apply(t,["EXPRESSION"].concat([].slice.call(n)))}catch(i){t.warn(i)}return n[n.length-1]}function ij(){return nj(this.context.dataflow,"warn",arguments)}function rj(){return nj(this.context.dataflow,"info",arguments)}function oj(){return nj(this.context.dataflow,"debug",arguments)}function sj(t){const e=t/255;if(e<=.03928){return e/12.92}return Math.pow((e+.055)/1.055,2.4)}function aj(t){const e=Th(t),n=sj(e.r),i=sj(e.g),r=sj(e.b);return.2126*n+.7152*i+.0722*r}function lj(t,e){const n=aj(t),i=aj(e),r=Math.max(n,i),o=Math.min(n,i);return(r+.05)/(o+.05)}function uj(){const t=[].slice.call(arguments);t.unshift({});return(0,m.l7)(...t)}function cj(t,e){return t===e||t!==t&&e!==e?true:(0,m.kJ)(t)?(0,m.kJ)(e)&&t.length===e.length?fj(t,e):false:(0,m.Kn)(t)&&(0,m.Kn)(e)?hj(t,e):false}function fj(t,e){for(let n=0,i=t.length;n<i;++n){if(!cj(t[n],e[n]))return false}return true}function hj(t,e){for(const n in t){if(!cj(t[n],e[n]))return false}return true}function dj(t){return e=>hj(t,e)}function pj(t,e,n,i,r,o){const s=this.context.dataflow,a=this.context.data[t],l=a.input,u=s.stamp();let c=a.changes,f,h;if(s._trigger===false||!(l.value.length||e||i)){return 0}if(!c||c.stamp<u){a.changes=c=s.changeset();c.stamp=u;s.runAfter((()=>{a.modified=true;s.pulse(l,c).run()}),true,1)}if(n){f=n===true?m.yb:(0,m.kJ)(n)||yo(n)?n:dj(n);c.remove(f)}if(e){c.insert(e)}if(i){f=dj(i);if(l.value.some(f)){c.remove(f)}else{c.insert(i)}}if(r){for(h in o){c.modify(r,h,o[h])}}return 1}function mj(t){const e=t.touches,n=e[0].clientX-e[1].clientX,i=e[0].clientY-e[1].clientY;return Math.sqrt(n*n+i*i)}function gj(t){const e=t.touches;return Math.atan2(e[0].clientY-e[1].clientY,e[0].clientX-e[1].clientX)}const yj={};function vj(t,e){const n=yj[e]||(yj[e]=(0,m.EP)(e));return(0,m.kJ)(t)?t.map(n):n(t)}function _j(t){return(0,m.kJ)(t)||ArrayBuffer.isView(t)?t:null}function xj(t){return _j(t)||((0,m.HD)(t)?t:null)}function bj(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++){n[i-1]=arguments[i]}return _j(t).join(...n)}function wj(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++){n[i-1]=arguments[i]}return xj(t).indexOf(...n)}function kj(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++){n[i-1]=arguments[i]}return xj(t).lastIndexOf(...n)}function Mj(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++){n[i-1]=arguments[i]}return xj(t).slice(...n)}function Sj(t,e,n){if((0,m.mf)(n))(0,m.vU)("Function argument passed to replace.");return String(t).replace(e,n)}function Ej(t){return _j(t).slice().reverse()}function Tj(t,e,n){return Fm(t||0,e||0,n||0)}function Dj(t,e){const n=GF(t,(e||this).context);return n&&n.bandwidth?n.bandwidth():0}function Aj(t,e){const n=GF(t,(e||this).context);return n?n.copy():undefined}function Nj(t,e){const n=GF(t,(e||this).context);return n?n.domain():[]}function zj(t,e,n){const i=GF(t,(n||this).context);return!i?undefined:(0,m.kJ)(e)?(i.invertRange||i.invert)(e):(i.invert||i.invertExtent)(e)}function Rj(t,e){const n=GF(t,(e||this).context);return n&&n.range?n.range():[]}function Cj(t,e,n){const i=GF(t,(n||this).context);return i?i(e):undefined}function Oj(t,e,n,i,r){t=GF(t,(r||this).context);const o=My(e,n);let s=t.domain(),a=s[0],l=(0,m.fj)(s),u=m.yR;if(!(l-a)){t=(t.interpolator?bg("sequential")().interpolator(t.interpolator()):bg("linear")().interpolate(t.interpolate()).range(t.range())).domain([a=0,l=1])}else{u=$g(t,a,l)}if(t.ticks){s=t.ticks(+i||15);if(a!==s[0])s.unshift(a);if(l!==(0,m.fj)(s))s.push(l)}s.forEach((e=>o.stop(u(e),t(e))));return o}function Uj(t,e,n){const i=GF(t,(n||this).context);return function(t){return i?i.path.context(t)(e):""}}function $j(t){let e=null;return function(n){return n?By(n,e=e||Ry(t)):t}}const Pj=t=>t.data;function qj(t,e){const n=SF.call(e,t);return n.root&&n.root.lookup||{}}function Ij(t,e,n){const i=qj(t,this),r=i[e],o=i[n];return r&&o?r.path(o).map(Pj):undefined}function Lj(t,e){const n=qj(t,this)[e];return n?n.ancestors().map(Pj):undefined}const Fj=()=>typeof window!=="undefined"&&window||null;function jj(){const t=Fj();return t?t.screen:{}}function Wj(){const t=Fj();return t?[t.innerWidth,t.innerHeight]:[undefined,undefined]}function Xj(){const t=this.context.dataflow,e=t.container&&t.container();return e?[e.clientWidth,e.clientHeight]:[undefined,undefined]}function Hj(t,e,n){if(!t)return[];const[i,r]=t,o=(new Yv).set(i[0],i[1],r[0],r[1]),s=n||this.context.dataflow.scenegraph().root;return zk(s,o,Bj(e))}function Bj(t){let e=null;if(t){const n=(0,m.IX)(t.marktype),i=(0,m.IX)(t.markname);e=t=>(!n.length||n.some((e=>t.marktype===e)))&&(!i.length||i.some((e=>t.name===e)))}return e}function Yj(t,e,n){let i=arguments.length>3&&arguments[3]!==undefined?arguments[3]:5;const r=t[t.length-1];if(r===undefined||Math.sqrt((r[0]-e)**2+(r[1]-n)**2)>i){t.push([e,n]);return[...t]}return t}function Jj(t){return(t!==null&&t!==void 0?t:[]).reduce(((e,n,i)=>{let[r,o]=n;return e+=i==0?"M ".concat(r,",").concat(o," "):i===t.length-1?" Z":"L ".concat(r,",").concat(o," ")}),"")}function Gj(t,e,n){const{x:i,y:r,mark:o}=n;const s=(new Yv).set(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,Number.MIN_SAFE_INTEGER,Number.MIN_SAFE_INTEGER);for(const[l,u]of e){if(l<s.x1)s.x1=l;if(l>s.x2)s.x2=l;if(u<s.y1)s.y1=u;if(u>s.y2)s.y2=u}s.translate(i,r);const a=Hj([[s.x1,s.y1],[s.x2,s.y2]],t,o);return a.filter((t=>Vj(t.x,t.y,e)))}function Vj(t,e,n){let i=0;for(let r=0,o=n.length-1;r<n.length;o=r++){const[s,a]=n[o];const[l,u]=n[r];if(u>e!=a>e&&t<(s-l)*(e-u)/(a-u)+l){i++}}return i&1}const Kj={random(){return na()},cumulativeNormal:pa,cumulativeLogNormal:ba,cumulativeUniform:Ta,densityNormal:da,densityLogNormal:xa,densityUniform:Ea,quantileNormal:ma,quantileLogNormal:wa,quantileUniform:Da,sampleNormal:ha,sampleLogNormal:_a,sampleUniform:Sa,isArray:m.kJ,isBoolean:m.jn,isDate:m.J_,isDefined(t){return t!==undefined},isNumber:m.hj,isObject:m.Kn,isRegExp:m.Kj,isString:m.HD,isTuple:yo,isValid(t){return t!=null&&t===t},toBoolean:m.sw,toDate(t){return(0,m.ZU)(t)},toNumber:m.He,toString:m.BB,indexof:wj,join:bj,lastindexof:kj,replace:Sj,reverse:Ej,slice:Mj,flush:m.yl,lerp:m.t7,merge:uj,pad:m.vk,peek:m.fj,pluck:vj,span:m.yP,inrange:m.u5,truncate:m.$G,rgb:Th,lab:fm,hcl:_m,hsl:Ph,luminance:aj,contrast:lj,sequence:Qa,format:NF,utcFormat:RF,utcParse:OF,utcOffset:xn,utcSequence:kn,timeFormat:zF,timeParse:CF,timeOffset:_n,timeSequence:wn,timeUnitSpecifier:We,monthFormat:PF,monthAbbrevFormat:qF,dayFormat:IF,dayAbbrevFormat:LF,quarter:m.mS,utcquarter:m.N3,week:Ye,utcweek:Qe,dayofyear:Be,utcdayofyear:Ze,warn:ij,info:rj,debug:oj,extent(t){return(0,m.We)(t)},inScope:ej,intersect:Hj,clampRange:m.l$,pinchDistance:mj,pinchAngle:gj,screen:jj,containerSize:Xj,windowSize:Wj,bandspace:Tj,setdata:TF,pathShape:$j,panLinear:m.Dw,panLog:m.mJ,panPow:m.QA,panSymlog:m.Zw,zoomLinear:m.ay,zoomLog:m.dH,zoomPow:m.mK,zoomSymlog:m.bV,encode:DF,modify:pj,lassoAppend:Yj,lassoPath:Jj,intersectLasso:Gj};const Zj=["view","item","group","xy","x","y"],Qj="event.vega.",tW="this.",eW={};const nW={forbidden:["_"],allowed:["datum","event","item"],fieldvar:"datum",globalvar:t=>"_[".concat((0,m.m8)(XF+t),"]"),functions:rW,constants:II._G,visitors:eW};const iW=(0,II.YP)(nW);function rW(t){const e=(0,II.wk)(t);Zj.forEach((t=>e[t]=Qj+t));for(const n in Kj){e[n]=tW+n}(0,m.l7)(e,VF(t,Kj,eW));return e}function oW(t,e,n){if(arguments.length===1){return Kj[t]}Kj[t]=e;if(n)eW[t]=n;if(iW)iW.functions[t]=tW+t;return this}oW("bandwidth",Dj,YF);oW("copy",Aj,YF);oW("domain",Nj,YF);oW("range",Rj,YF);oW("invert",zj,YF);oW("scale",Cj,YF);oW("gradient",Oj,YF);oW("geoArea",ZF,YF);oW("geoBounds",QF,YF);oW("geoCentroid",tj,YF);oW("geoShape",Uj,YF);oW("indata",EF,BF);oW("data",SF,HF);oW("treePath",Ij,HF);oW("treeAncestors",Lj,HF);oW("vlSelectionTest",pF,MF);oW("vlSelectionIdTest",vF,MF);oW("vlSelectionResolve",xF,MF);oW("vlSelectionTuples",_F);function sW(t,e){const n={};let i;try{t=(0,m.HD)(t)?t:(0,m.m8)(t)+"";i=(0,II.BJ)(t)}catch(o){(0,m.vU)("Expression parse error: "+t)}i.visit((t=>{if(t.type!==II.Lt)return;const i=t.callee.name,r=nW.visitors[i];if(r)r(i,t.arguments,e,n)}));const r=iW(i);r.globals.forEach((t=>{const i=XF+t;if(!(0,m.nr)(n,i)&&e.getSignal(t)){n[i]=e.signalRef(t)}}));return{$expr:(0,m.l7)({code:r.code},e.options.ast?{ast:i}:null),$fields:r.fields,$params:n}}function aW(t){const e=this,n=t.operators||[];if(t.background){e.background=t.background}if(t.eventConfig){e.eventConfig=t.eventConfig}if(t.locale){e.locale=t.locale}n.forEach((t=>e.parseOperator(t)));n.forEach((t=>e.parseOperatorParameters(t)));(t.streams||[]).forEach((t=>e.parseStream(t)));(t.updates||[]).forEach((t=>e.parseUpdate(t)));return e.resolve()}const lW=(0,m.Rg)(["rule"]),uW=(0,m.Rg)(["group","image","rect"]);function cW(t,e){let n="";if(lW[e])return n;if(t.x2){if(t.x){if(uW[e]){n+="if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"}n+="o.width=o.x2-o.x;"}else{n+="o.x=o.x2-(o.width||0);"}}if(t.xc){n+="o.x=o.xc-(o.width||0)/2;"}if(t.y2){if(t.y){if(uW[e]){n+="if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"}n+="o.height=o.y2-o.y;"}else{n+="o.y=o.y2-(o.height||0);"}}if(t.yc){n+="o.y=o.yc-(o.height||0)/2;"}return n}function fW(t){return(t+"").toLowerCase()}function hW(t){return fW(t)==="operator"}function dW(t){return fW(t)==="collect"}function pW(t,e,n){if(n[n.length-1]!==";"){n="return("+n+");"}const i=Function(...e.concat(n));return t&&t.functions?i.bind(t.functions):i}function mW(t,e,n,i){return"((u = ".concat(t,") < (v = ").concat(e,") || u == null) && v != null ? ").concat(n,"\n : (u > v || v == null) && u != null ? ").concat(i,"\n : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ").concat(n,"\n : v !== v && u === u ? ").concat(i," : ")}var gW={operator:(t,e)=>pW(t,["_"],e.code),parameter:(t,e)=>pW(t,["datum","_"],e.code),event:(t,e)=>pW(t,["event"],e.code),handler:(t,e)=>{const n="var datum=event.item&&event.item.datum;return ".concat(e.code,";");return pW(t,["_","event"],n)},encode:(t,e)=>{const{marktype:n,channels:i}=e;let r="var o=item,datum=o.datum,m=0,$;";for(const o in i){const t="o["+(0,m.m8)(o)+"]";r+="$=".concat(i[o].code,";if(").concat(t,"!==$)").concat(t,"=$,m=1;")}r+=cW(i,n);r+="return m;";return pW(t,["item","_"],r)},codegen:{get(t){const e="[".concat(t.map(m.m8).join("]["),"]");const n=Function("_","return _".concat(e,";"));n.path=e;return n},comparator(t,e){let n;const i=(t,i)=>{const r=e[i];let o,s;if(t.path){o="a".concat(t.path);s="b".concat(t.path)}else{(n=n||{})["f"+i]=t;o="this.f".concat(i,"(a)");s="this.f".concat(i,"(b)")}return mW(o,s,-r,r)};const r=Function("a","b","var u, v; return "+t.map(i).join("")+"0;");return n?r.bind(n):r}}};function yW(t){const e=this;if(hW(t.type)||!t.type){e.operator(t,t.update?e.operatorExpression(t.update):null)}else{e.transform(t,t.type)}}function vW(t){const e=this;if(t.params){const n=e.get(t.id);if(!n)(0,m.vU)("Invalid operator id: "+t.id);e.dataflow.connect(n,n.parameters(e.parseParameters(t.params),t.react,t.initonly))}}function _W(t,e){e=e||{};const n=this;for(const i in t){const r=t[i];e[i]=(0,m.kJ)(r)?r.map((t=>xW(t,n,e))):xW(r,n,e)}return e}function xW(t,e,n){if(!t||!(0,m.Kn)(t))return t;for(let i=0,r=bW.length,o;i<r;++i){o=bW[i];if((0,m.nr)(t,o.key)){return o.parse(t,e,n)}}return t}var bW=[{key:"$ref",parse:wW},{key:"$key",parse:MW},{key:"$expr",parse:kW},{key:"$field",parse:SW},{key:"$encode",parse:TW},{key:"$compare",parse:EW},{key:"$context",parse:DW},{key:"$subflow",parse:AW},{key:"$tupleid",parse:NW}];function wW(t,e){return e.get(t.$ref)||(0,m.vU)("Operator not defined: "+t.$ref)}function kW(t,e,n){if(t.$params){e.parseParameters(t.$params,n)}const i="e:"+t.$expr.code+"_"+t.$name;return e.fn[i]||(e.fn[i]=(0,m.ZE)(e.parameterExpression(t.$expr),t.$fields,t.$name))}function MW(t,e){const n="k:"+t.$key+"_"+!!t.$flat;return e.fn[n]||(e.fn[n]=(0,m.Jy)(t.$key,t.$flat,e.expr.codegen))}function SW(t,e){if(!t.$field)return null;const n="f:"+t.$field+"_"+t.$name;return e.fn[n]||(e.fn[n]=(0,m.EP)(t.$field,t.$name,e.expr.codegen))}function EW(t,e){const n="c:"+t.$compare+"_"+t.$order,i=(0,m.IX)(t.$compare).map((t=>t&&t.$tupleid?vo:t));return e.fn[n]||(e.fn[n]=(0,m.qu)(i,t.$order,e.expr.codegen))}function TW(t,e){const n=t.$encode,i={};for(const r in n){const t=n[r];i[r]=(0,m.ZE)(e.encodeExpression(t.$expr),t.$fields);i[r].output=t.$output}return i}function DW(t,e){return e}function AW(t,e){const n=t.$subflow;return function(t,i,r){const o=e.fork().parse(n),s=o.get(n.operators[0].id),a=o.signals.parent;if(a)a.set(r);s.detachSubflow=()=>e.detach(o);return s}}function NW(){return vo}function zW(t){var e=this,n=t.filter!=null?e.eventExpression(t.filter):undefined,i=t.stream!=null?e.get(t.stream):undefined,r;if(t.source){i=e.events(t.source,t.type,n)}else if(t.merge){r=t.merge.map((t=>e.get(t)));i=r[0].merge.apply(r[0],r.slice(1))}if(t.between){r=t.between.map((t=>e.get(t)));i=i.between(r[0],r[1])}if(t.filter){i=i.filter(n)}if(t.throttle!=null){i=i.throttle(+t.throttle)}if(t.debounce!=null){i=i.debounce(+t.debounce)}if(i==null){(0,m.vU)("Invalid stream definition: "+JSON.stringify(t))}if(t.consume)i.consume(true);e.stream(t,i)}function RW(t){var e=this,n=(0,m.Kn)(n=t.source)?n.$ref:n,i=e.get(n),r=null,o=t.update,s=undefined;if(!i)(0,m.vU)("Source not defined: "+t.source);r=t.target&&t.target.$expr?e.eventExpression(t.target.$expr):e.get(t.target);if(o&&o.$expr){if(o.$params){s=e.parseParameters(o.$params)}o=e.handlerExpression(o.$expr)}e.update(t,i,r,o,s)}const CW={skip:true};function OW(t){var e=this,n={};if(t.signals){var i=n.signals={};Object.keys(e.signals).forEach((n=>{const r=e.signals[n];if(t.signals(n,r)){i[n]=r.value}}))}if(t.data){var r=n.data={};Object.keys(e.data).forEach((n=>{const i=e.data[n];if(t.data(n,i)){r[n]=i.input.value}}))}if(e.subcontext&&t.recurse!==false){n.subcontext=e.subcontext.map((e=>e.getState(t)))}return n}function UW(t){var e=this,n=e.dataflow,i=t.data,r=t.signals;Object.keys(r||{}).forEach((t=>{n.update(e.signals[t],r[t],CW)}));Object.keys(i||{}).forEach((t=>{n.pulse(e.data[t].input,n.changeset().remove(m.yb).insert(i[t]))}));(t.subcontext||[]).forEach(((t,n)=>{const i=e.subcontext[n];if(i)i.setState(t)}))}function $W(t,e,n,i){return new PW(t,e,n,i)}function PW(t,e,n,i){this.dataflow=t;this.transforms=e;this.events=t.events.bind(t);this.expr=i||gW,this.signals={};this.scales={};this.nodes={};this.data={};this.fn={};if(n){this.functions=Object.create(n);this.functions.context=this}}function qW(t){this.dataflow=t.dataflow;this.transforms=t.transforms;this.events=t.events;this.expr=t.expr;this.signals=Object.create(t.signals);this.scales=Object.create(t.scales);this.nodes=Object.create(t.nodes);this.data=Object.create(t.data);this.fn=Object.create(t.fn);if(t.functions){this.functions=Object.create(t.functions);this.functions.context=this}}PW.prototype=qW.prototype={fork(){const t=new qW(this);(this.subcontext||(this.subcontext=[])).push(t);return t},detach(t){this.subcontext=this.subcontext.filter((e=>e!==t));const e=Object.keys(t.nodes);for(const n of e)t.nodes[n]._targets=null;for(const n of e)t.nodes[n].detach();t.nodes=null},get(t){return this.nodes[t]},set(t,e){return this.nodes[t]=e},add(t,e){const n=this,i=n.dataflow,r=t.value;n.set(t.id,e);if(dW(t.type)&&r){if(r.$ingest){i.ingest(e,r.$ingest,r.$format)}else if(r.$request){i.preload(e,r.$request,r.$format)}else{i.pulse(e,i.changeset().insert(r))}}if(t.root){n.root=e}if(t.parent){let r=n.get(t.parent.$ref);if(r){i.connect(r,[e]);e.targets().add(r)}else{(n.unresolved=n.unresolved||[]).push((()=>{r=n.get(t.parent.$ref);i.connect(r,[e]);e.targets().add(r)}))}}if(t.signal){n.signals[t.signal]=e}if(t.scale){n.scales[t.scale]=e}if(t.data){for(const i in t.data){const r=n.data[i]||(n.data[i]={});t.data[i].forEach((t=>r[t]=e))}}},resolve(){(this.unresolved||[]).forEach((t=>t()));delete this.unresolved;return this},operator(t,e){this.add(t,this.dataflow.add(t.value,e))},transform(t,e){this.add(t,this.dataflow.add(this.transforms[fW(e)]))},stream(t,e){this.set(t.id,e)},update(t,e,n,i,r){this.dataflow.on(e,n,i,r,t.options)},operatorExpression(t){return this.expr.operator(this,t)},parameterExpression(t){return this.expr.parameter(this,t)},eventExpression(t){return this.expr.event(this,t)},handlerExpression(t){return this.expr.handler(this,t)},encodeExpression(t){return this.expr.encode(this,t)},parse:aW,parseOperator:yW,parseOperatorParameters:vW,parseParameters:_W,parseStream:zW,parseUpdate:RW,getState:OW,setState:UW};function IW(t,e,n){var i=new NR,r=e;if(e==null)return i.restart(t,e,n),i;i._restart=i.restart;i.restart=function(t,e,n){e=+e,n=n==null?DR():+n;i._restart((function o(s){s+=r;i._restart(o,r+=e,n);t(s)}),e,n)};i.restart(t,e,n);return i}function LW(t){const e=t.container();if(e){e.setAttribute("role","graphics-document");e.setAttribute("aria-roleDescription","visualization");FW(e,t.description())}}function FW(t,e){if(t)e==null?t.removeAttribute("aria-label"):t.setAttribute("aria-label",e)}function jW(t){t.add(null,(e=>{t._background=e.bg;t._resize=1;return e.bg}),{bg:t._signals.background})}const WW="default";function XW(t){const e=t._signals.cursor||(t._signals.cursor=t.add({user:WW,item:null}));t.on(t.events("view","mousemove"),e,((t,n)=>{const i=e.value,r=i?(0,m.HD)(i)?i:i.user:WW,o=n.item&&n.item.cursor||null;return i&&r===i.user&&o==i.item?i:{user:r,item:o}}));t.add(null,(function(e){let n=e.cursor,i=this.value;if(!(0,m.HD)(n)){i=n.item;n=n.user}HW(t,n&&n!==WW?n:i||n);return i}),{cursor:e})}function HW(t,e){const n=t.globalCursor()?typeof document!=="undefined"&&document.body:t.container();if(n){return e==null?n.style.removeProperty("cursor"):n.style.cursor=e}}function BW(t,e){var n=t._runtime.data;if(!(0,m.nr)(n,e)){(0,m.vU)("Unrecognized data set: "+e)}return n[e]}function YW(t,e){return arguments.length<2?BW(this,t).values.value:JW.call(this,t,Eo().remove(m.yb).insert(e))}function JW(t,e){if(!So(e)){(0,m.vU)("Second argument to changes must be a changeset.")}const n=BW(this,t);n.modified=true;return this.pulse(n.input,e)}function GW(t,e){return JW.call(this,t,Eo().insert(e))}function VW(t,e){return JW.call(this,t,Eo().remove(e))}function KW(t){var e=t.padding();return Math.max(0,t._viewWidth+e.left+e.right)}function ZW(t){var e=t.padding();return Math.max(0,t._viewHeight+e.top+e.bottom)}function QW(t){var e=t.padding(),n=t._origin;return[e.left+n[0],e.top+n[1]]}function tX(t){var e=QW(t),n=KW(t),i=ZW(t);t._renderer.background(t.background());t._renderer.resize(n,i,e);t._handler.origin(e);t._resizeListeners.forEach((e=>{try{e(n,i)}catch(r){t.error(r)}}))}function eX(t,e,n){var i=t._renderer,r=i&&i.canvas(),o,s,a;if(r){a=QW(t);s=e.changedTouches?e.changedTouches[0]:e;o=Lb(s,r);o[0]-=a[0];o[1]-=a[1]}e.dataflow=t;e.item=n;e.vega=nX(t,n,o);return e}function nX(t,e,n){const i=e?e.mark.marktype==="group"?e:e.mark.group:null;function r(t){var n=i,r;if(t)for(r=e;r;r=r.mark.group){if(r.mark.name===t){n=r;break}}return n&&n.mark&&n.mark.interactive?n:{}}function o(t){if(!t)return n;if((0,m.HD)(t))t=r(t);const e=n.slice();while(t){e[0]-=t.x||0;e[1]-=t.y||0;t=t.mark&&t.mark.group}return e}return{view:(0,m.a9)(t),item:(0,m.a9)(e||{}),group:r,xy:o,x:t=>o(t)[0],y:t=>o(t)[1]}}const iX="view",rX="timer",oX="window",sX={trap:false};function aX(t){const e=(0,m.l7)({defaults:{}},t);const n=(t,e)=>{e.forEach((e=>{if((0,m.kJ)(t[e]))t[e]=(0,m.Rg)(t[e])}))};n(e.defaults,["prevent","allow"]);n(e,["view","window","selector"]);return e}function lX(t,e,n,i){t._eventListeners.push({type:n,sources:(0,m.IX)(e),handler:i})}function uX(t,e){var n=t._eventConfig.defaults,i=n.prevent,r=n.allow;return i===false||r===true?false:i===true||r===false?true:i?i[e]:r?!r[e]:t.preventDefault()}function cX(t,e,n){const i=t._eventConfig&&t._eventConfig[e];if(i===false||(0,m.Kn)(i)&&!i[n]){t.warn("Blocked ".concat(e," ").concat(n," event listener."));return false}return true}function fX(t,e,n){var i=this,r=new Io(n),o=function(n,o){i.runAsync(null,(()=>{if(t===iX&&uX(i,e)){n.preventDefault()}r.receive(eX(i,n,o))}))},s;if(t===rX){if(cX(i,"timer",e)){i.timer(o,e)}}else if(t===iX){if(cX(i,"view",e)){i.addEventListener(e,o,sX)}}else{if(t===oX){if(cX(i,"window",e)&&typeof window!=="undefined"){s=[window]}}else if(typeof document!=="undefined"){if(cX(i,"selector",e)){s=document.querySelectorAll(t)}}if(!s){i.warn("Can not resolve event source: "+t)}else{for(var a=0,l=s.length;a<l;++a){s[a].addEventListener(e,o)}lX(i,s,e,o)}}return r}function hX(t){return t.item}function dX(t){return t.item.mark.source}function pX(t){return function(e,n){return n.vega.view().changeset().encode(n.item,t)}}function mX(t,e){t=[t||"hover"];e=[e||"update",t[0]];this.on(this.events("view","mouseover",hX),dX,pX(t));this.on(this.events("view","mouseout",hX),dX,pX(e));return this}function gX(){var t=this._tooltip,e=this._timers,n=this._eventListeners,i,r,o;i=e.length;while(--i>=0){e[i].stop()}i=n.length;while(--i>=0){o=n[i];r=o.sources.length;while(--r>=0){o.sources[r].removeEventListener(o.type,o.handler)}}if(t){t.call(this,this._handler,null,null,null)}return this}function yX(t,e,n){const i=document.createElement(t);for(const r in e)i.setAttribute(r,e[r]);if(n!=null)i.textContent=n;return i}const vX="vega-bind",_X="vega-bind-name",xX="vega-bind-radio";function bX(t,e,n){if(!e)return;const i=n.param;let r=n.state;if(!r){r=n.state={elements:null,active:false,set:null,update:e=>{if(e!=t.signal(i.signal)){t.runAsync(null,(()=>{r.source=true;t.signal(i.signal,e)}))}}};if(i.debounce){r.update=(0,m.Ds)(i.debounce,r.update)}}const o=i.input==null&&i.element?wX:MX;o(r,e,i,t);if(!r.active){t.on(t._signals[i.signal],null,(()=>{r.source?r.source=false:r.set(t.signal(i.signal))}));r.active=true}return r}function wX(t,e,n,i){const r=n.event||"input";const o=()=>t.update(e.value);i.signal(n.signal,e.value);e.addEventListener(r,o);lX(i,e,r,o);t.set=t=>{e.value=t;e.dispatchEvent(kX(r))}}function kX(t){return typeof Event!=="undefined"?new Event(t):{type:t}}function MX(t,e,n,i){const r=i.signal(n.signal);const o=yX("div",{class:vX});const s=n.input==="radio"?o:o.appendChild(yX("label"));s.appendChild(yX("span",{class:_X},n.name||n.signal));e.appendChild(o);let a=SX;switch(n.input){case"checkbox":a=EX;break;case"select":a=TX;break;case"radio":a=DX;break;case"range":a=AX;break}a(t,s,n,r)}function SX(t,e,n,i){const r=yX("input");for(const o in n){if(o!=="signal"&&o!=="element"){r.setAttribute(o==="input"?"type":o,n[o])}}r.setAttribute("name",n.signal);r.value=i;e.appendChild(r);r.addEventListener("input",(()=>t.update(r.value)));t.elements=[r];t.set=t=>r.value=t}function EX(t,e,n,i){const r={type:"checkbox",name:n.signal};if(i)r.checked=true;const o=yX("input",r);e.appendChild(o);o.addEventListener("change",(()=>t.update(o.checked)));t.elements=[o];t.set=t=>o.checked=!!t||null}function TX(t,e,n,i){const r=yX("select",{name:n.signal}),o=n.labels||[];n.options.forEach(((t,e)=>{const n={value:t};if(NX(t,i))n.selected=true;r.appendChild(yX("option",n,(o[e]||t)+""))}));e.appendChild(r);r.addEventListener("change",(()=>{t.update(n.options[r.selectedIndex])}));t.elements=[r];t.set=t=>{for(let e=0,i=n.options.length;e<i;++e){if(NX(n.options[e],t)){r.selectedIndex=e;return}}}}function DX(t,e,n,i){const r=yX("span",{class:xX}),o=n.labels||[];e.appendChild(r);t.elements=n.options.map(((e,s)=>{const a={type:"radio",name:n.signal,value:e};if(NX(e,i))a.checked=true;const l=yX("input",a);l.addEventListener("change",(()=>t.update(e)));const u=yX("label",{},(o[s]||e)+"");u.prepend(l);r.appendChild(u);return l}));t.set=e=>{const n=t.elements,i=n.length;for(let t=0;t<i;++t){if(NX(n[t].value,e))n[t].checked=true}}}function AX(t,e,n,i){i=i!==undefined?i:(+n.max+ +n.min)/2;const r=n.max!=null?n.max:Math.max(100,+i)||100,o=n.min||Math.min(0,r,+i)||0,s=n.step||W(o,r,100);const a=yX("input",{type:"range",name:n.signal,min:o,max:r,step:s});a.value=i;const l=yX("span",{},+i);e.appendChild(a);e.appendChild(l);const u=()=>{l.textContent=a.value;t.update(+a.value)};a.addEventListener("input",u);a.addEventListener("change",u);t.elements=[a];t.set=t=>{a.value=t;l.textContent=t}}function NX(t,e){return t===e||t+""===e+""}function zX(t,e,n,i,r,o){e=e||new i(t.loader());return e.initialize(n,KW(t),ZW(t),QW(t),r,o).background(t.background())}function RX(t,e){return!e?null:function(){try{e.apply(this,arguments)}catch(n){t.error(n)}}}function CX(t,e,n,i){const r=new i(t.loader(),RX(t,t.tooltip())).scene(t.scenegraph().root).initialize(n,QW(t),t);if(e){e.handlers().forEach((t=>{r.on(t.type,t.handler)}))}return r}function OX(t,e){const n=this,i=n._renderType,r=n._eventConfig.bind,o=Nk(i);t=n._el=t?UX(n,t,true):null;LW(n);if(!o)n.error("Unrecognized renderer type: "+i);const s=o.handler||dw,a=t?o.renderer:o.headless;n._renderer=!a?null:zX(n,n._renderer,t,a);n._handler=CX(n,n._handler,t,s);n._redraw=true;if(t&&r!=="none"){e=e?n._elBind=UX(n,e,true):t.appendChild(yX("form",{class:"vega-bindings"}));n._bind.forEach((t=>{if(t.param.element&&r!=="container"){t.element=UX(n,t.param.element,!!t.param.input)}}));n._bind.forEach((t=>{bX(n,t.element||e,t)}))}return n}function UX(t,e,n){if(typeof e==="string"){if(typeof document!=="undefined"){e=document.querySelector(e);if(!e){t.error("Signal bind element not found: "+e);return null}}else{t.error("DOM document instance not found.");return null}}if(e&&n){try{e.textContent=""}catch(i){e=null;t.error(i)}}return e}const $X=t=>+t||0;const PX=t=>({top:t,bottom:t,left:t,right:t});function qX(t){return(0,m.Kn)(t)?{top:$X(t.top),bottom:$X(t.bottom),left:$X(t.left),right:$X(t.right)}:PX($X(t))}async function IX(t,e,n,i){const r=Nk(e),o=r&&r.headless;if(!o)(0,m.vU)("Unrecognized renderer type: "+e);await t.runAsync();return zX(t,null,null,o,n,i).renderAsync(t._scenegraph.root)}async function LX(t,e){if(t!==Dk.Canvas&&t!==Dk.SVG&&t!==Dk.PNG){(0,m.vU)("Unrecognized image type: "+t)}const n=await IX(this,t,e);return t===Dk.SVG?FX(n.svg(),"image/svg+xml"):n.canvas().toDataURL("image/png")}function FX(t,e){const n=new Blob([t],{type:e});return window.URL.createObjectURL(n)}async function jX(t,e){const n=await IX(this,Dk.Canvas,t,e);return n.canvas()}async function WX(t){const e=await IX(this,Dk.SVG,t);return e.svg()}function XX(t,e,n){return $W(t,Os,Kj,n).parse(e)}function HX(t){var e=this._runtime.scales;if(!(0,m.nr)(e,t)){(0,m.vU)("Unrecognized scale or projection: "+t)}return e[t].value}var BX="width",YX="height",JX="padding",GX={skip:true};function VX(t,e){var n=t.autosize(),i=t.padding();return e-(n&&n.contains===JX?i.left+i.right:0)}function KX(t,e){var n=t.autosize(),i=t.padding();return e-(n&&n.contains===JX?i.top+i.bottom:0)}function ZX(t){var e=t._signals,n=e[BX],i=e[YX],r=e[JX];function o(){t._autosize=t._resize=1}t._resizeWidth=t.add(null,(e=>{t._width=e.size;t._viewWidth=VX(t,e.size);o()}),{size:n});t._resizeHeight=t.add(null,(e=>{t._height=e.size;t._viewHeight=KX(t,e.size);o()}),{size:i});const s=t.add(null,o,{pad:r});t._resizeWidth.rank=n.rank+1;t._resizeHeight.rank=i.rank+1;s.rank=r.rank+1}function QX(t,e,n,i,r,o){this.runAfter((s=>{let a=0;s._autosize=0;if(s.width()!==n){a=1;s.signal(BX,n,GX);s._resizeWidth.skip(true)}if(s.height()!==i){a=1;s.signal(YX,i,GX);s._resizeHeight.skip(true)}if(s._viewWidth!==t){s._resize=1;s._viewWidth=t}if(s._viewHeight!==e){s._resize=1;s._viewHeight=e}if(s._origin[0]!==r[0]||s._origin[1]!==r[1]){s._resize=1;s._origin=r}if(a)s.run("enter");if(o)s.runAfter((t=>t.resize()))}),false,1)}function tH(t){return this._runtime.getState(t||{data:eH,signals:nH,recurse:true})}function eH(t,e){return e.modified&&(0,m.kJ)(e.input.value)&&t.indexOf("_:vega:_")}function nH(t,e){return!(t==="parent"||e instanceof Os.proxy)}function iH(t){this.runAsync(null,(e=>{e._trigger=false;e._runtime.setState(t)}),(t=>{t._trigger=true}));return this}function rH(t,e){function n(e){t({timestamp:Date.now(),elapsed:e})}this._timers.push(IW(n,e))}function oH(t,e,n,i){const r=t.element();if(r)r.setAttribute("title",sH(i))}function sH(t){return t==null?"":(0,m.kJ)(t)?lH(t):(0,m.Kn)(t)&&!(0,m.J_)(t)?aH(t):t+""}function aH(t){return Object.keys(t).map((e=>{const n=t[e];return e+": "+((0,m.kJ)(n)?lH(n):uH(n))})).join("\n")}function lH(t){return"["+t.map(uH).join(", ")+"]"}function uH(t){return(0,m.kJ)(t)?"[…]":(0,m.Kn)(t)&&!(0,m.J_)(t)?"{…}":t}function cH(t,e){const n=this;e=e||{};zs.call(n);if(e.loader)n.loader(e.loader);if(e.logger)n.logger(e.logger);if(e.logLevel!=null)n.logLevel(e.logLevel);if(e.locale||t.locale){const i=(0,m.l7)({},t.locale,e.locale);n.locale(Ar(i.number,i.time))}n._el=null;n._elBind=null;n._renderType=e.renderer||Dk.Canvas;n._scenegraph=new Cb;const i=n._scenegraph.root;n._renderer=null;n._tooltip=e.tooltip||oH,n._redraw=true;n._handler=(new dw).scene(i);n._globalCursor=false;n._preventDefault=false;n._timers=[];n._eventListeners=[];n._resizeListeners=[];n._eventConfig=aX(t.eventConfig);n.globalCursor(n._eventConfig.globalCursor);const r=XX(n,t,e.expr);n._runtime=r;n._signals=r.signals;n._bind=(t.bindings||[]).map((t=>({state:null,param:(0,m.l7)({},t)})));if(r.root)r.root.set(i);i.source=r.data.root.input;n.pulse(r.data.root.input,n.changeset().insert(i.items));n._width=n.width();n._height=n.height();n._viewWidth=VX(n,n._width);n._viewHeight=KX(n,n._height);n._origin=[0,0];n._resize=0;n._autosize=1;ZX(n);jW(n);XW(n);n.description(t.description);if(e.hover)n.hover();if(e.container)n.initialize(e.container,e.bind)}function fH(t,e){return(0,m.nr)(t._signals,e)?t._signals[e]:(0,m.vU)("Unrecognized signal name: "+(0,m.m8)(e))}function hH(t,e){const n=(t._targets||[]).filter((t=>t._update&&t._update.handler===e));return n.length?n[0]:null}function dH(t,e,n,i){let r=hH(n,i);if(!r){r=RX(t,(()=>i(e,n.value)));r.handler=i;t.on(n,null,r)}return t}function pH(t,e,n){const i=hH(e,n);if(i)e._targets.remove(i);return t}(0,m.XW)(cH,zs,{async evaluate(t,e,n){await zs.prototype.evaluate.call(this,t,e);if(this._redraw||this._resize){try{if(this._renderer){if(this._resize){this._resize=0;tX(this)}await this._renderer.renderAsync(this._scenegraph.root)}this._redraw=false}catch(i){this.error(i)}}if(n)po(this,n);return this},dirty(t){this._redraw=true;this._renderer&&this._renderer.dirty(t)},description(t){if(arguments.length){const e=t!=null?t+"":null;if(e!==this._desc)FW(this._el,this._desc=e);return this}return this._desc},container(){return this._el},scenegraph(){return this._scenegraph},origin(){return this._origin.slice()},signal(t,e,n){const i=fH(this,t);return arguments.length===1?i.value:this.update(i,e,n)},width(t){return arguments.length?this.signal("width",t):this.signal("width")},height(t){return arguments.length?this.signal("height",t):this.signal("height")},padding(t){return arguments.length?this.signal("padding",qX(t)):qX(this.signal("padding"))},autosize(t){return arguments.length?this.signal("autosize",t):this.signal("autosize")},background(t){return arguments.length?this.signal("background",t):this.signal("background")},renderer(t){if(!arguments.length)return this._renderType;if(!Nk(t))(0,m.vU)("Unrecognized renderer type: "+t);if(t!==this._renderType){this._renderType=t;this._resetRenderer()}return this},tooltip(t){if(!arguments.length)return this._tooltip;if(t!==this._tooltip){this._tooltip=t;this._resetRenderer()}return this},loader(t){if(!arguments.length)return this._loader;if(t!==this._loader){zs.prototype.loader.call(this,t);this._resetRenderer()}return this},resize(){this._autosize=1;return this.touch(fH(this,"autosize"))},_resetRenderer(){if(this._renderer){this._renderer=null;this.initialize(this._el,this._elBind)}},_resizeView:QX,addEventListener(t,e,n){let i=e;if(!(n&&n.trap===false)){i=RX(this,e);i.raw=e}this._handler.on(t,i);return this},removeEventListener(t,e){var n=this._handler.handlers(t),i=n.length,r,o;while(--i>=0){o=n[i].type;r=n[i].handler;if(t===o&&(e===r||e===r.raw)){this._handler.off(o,r);break}}return this},addResizeListener(t){const e=this._resizeListeners;if(e.indexOf(t)<0){e.push(t)}return this},removeResizeListener(t){var e=this._resizeListeners,n=e.indexOf(t);if(n>=0){e.splice(n,1)}return this},addSignalListener(t,e){return dH(this,t,fH(this,t),e)},removeSignalListener(t,e){return pH(this,fH(this,t),e)},addDataListener(t,e){return dH(this,t,BW(this,t).values,e)},removeDataListener(t,e){return pH(this,BW(this,t).values,e)},globalCursor(t){if(arguments.length){if(this._globalCursor!==!!t){const e=HW(this,null);this._globalCursor=!!t;if(e)HW(this,e)}return this}else{return this._globalCursor}},preventDefault(t){if(arguments.length){this._preventDefault=t;return this}else{return this._preventDefault}},timer:rH,events:fX,finalize:gX,hover:mX,data:YW,change:JW,insert:GW,remove:VW,scale:HX,initialize:OX,toImageURL:LX,toCanvas:jX,toSVG:WX,getState:tH,setState:iH});var mH=n(83082);function gH(t){return(0,m.Kn)(t)?t:{type:t||"pad"}}const yH=t=>+t||0;const vH=t=>({top:t,bottom:t,left:t,right:t});function _H(t){return!(0,m.Kn)(t)?vH(yH(t)):t.signal?t:{top:yH(t.top),bottom:yH(t.bottom),left:yH(t.left),right:yH(t.right)}}const xH=t=>(0,m.Kn)(t)&&!(0,m.kJ)(t)?(0,m.l7)({},t):{value:t};function bH(t,e,n,i){if(n!=null){const r=(0,m.Kn)(n)&&!(0,m.kJ)(n)||(0,m.kJ)(n)&&n.length&&(0,m.Kn)(n[0]);if(r){t.update[e]=n}else{t[i||"enter"][e]={value:n}}return 1}else{return 0}}function wH(t,e,n){for(const i in e){bH(t,i,e[i])}for(const i in n){bH(t,i,n[i],"update")}}function kH(t,e,n){for(const i in e){if(n&&(0,m.nr)(n,i))continue;t[i]=(0,m.l7)(t[i]||{},e[i])}return t}function MH(t,e){return e&&(e.enter&&e.enter[t]||e.update&&e.update[t])}const SH="mark";const EH="frame";const TH="scope";const DH="axis";const AH="axis-domain";const NH="axis-grid";const zH="axis-label";const RH="axis-tick";const CH="axis-title";const OH="legend";const UH="legend-band";const $H="legend-entry";const PH="legend-gradient";const qH="legend-label";const IH="legend-symbol";const LH="legend-title";const FH="title";const jH="title-text";const WH="title-subtitle";function XH(t,e,n,i,r){const o={},s={};let a,l,u,c;l="lineBreak";if(e==="text"&&r[l]!=null&&!MH(l,t)){HH(o,l,r[l])}if(n=="legend"||String(n).startsWith("axis")){n=null}c=n===EH?r.group:n===SH?(0,m.l7)({},r.mark,r[e]):null;for(l in c){u=MH(l,t)||(l==="fill"||l==="stroke")&&(MH("fill",t)||MH("stroke",t));if(!u)HH(o,l,c[l])}(0,m.IX)(i).forEach((e=>{const n=r.style&&r.style[e];for(const i in n){if(!MH(i,t)){HH(o,i,n[i])}}}));t=(0,m.l7)({},t);for(l in o){c=o[l];if(c.signal){(a=a||{})[l]=c}else{s[l]=c}}t.enter=(0,m.l7)(s,t.enter);if(a)t.update=(0,m.l7)(a,t.update);return t}function HH(t,e,n){t[e]=n&&n.signal?{signal:n.signal}:{value:n}}const BH=t=>(0,m.HD)(t)?(0,m.m8)(t):t.signal?`(${t.signal})`:ZH(t);function YH(t){if(t.gradient!=null){return VH(t)}let e=t.signal?`(${t.signal})`:t.color?GH(t.color):t.field!=null?ZH(t.field):t.value!==undefined?(0,m.m8)(t.value):undefined;if(t.scale!=null){e=tB(t,e)}if(e===undefined){e=null}if(t.exponent!=null){e=`pow(${e},${KH(t.exponent)})`}if(t.mult!=null){e+=`*${KH(t.mult)}`}if(t.offset!=null){e+=`+${KH(t.offset)}`}if(t.round){e=`round(${e})`}return e}const JH=(t,e,n,i)=>`(${t}(${[e,n,i].map(YH).join(",")})+'')`;function GH(t){return t.c?JH("hcl",t.h,t.c,t.l):t.h||t.s?JH("hsl",t.h,t.s,t.l):t.l||t.a?JH("lab",t.l,t.a,t.b):t.r||t.g||t.b?JH("rgb",t.r,t.g,t.b):null}function VH(t){const e=[t.start,t.stop,t.count].map((t=>t==null?null:(0,m.m8)(t)));while(e.length&&(0,m.fj)(e)==null)e.pop();e.unshift(BH(t.gradient));return`gradient(${e.join(",")})`}function KH(t){return(0,m.Kn)(t)?"("+YH(t)+")":t}function ZH(t){return QH((0,m.Kn)(t)?t:{datum:t})}function QH(t){let e,n,i;if(t.signal){e="datum";i=t.signal}else if(t.group||t.parent){n=Math.max(1,t.level||1);e="item";while(n-- >0){e+=".mark.group"}if(t.parent){i=t.parent;e+=".datum"}else{i=t.group}}else if(t.datum){e="datum";i=t.datum}else{(0,m.vU)("Invalid field reference: "+(0,m.m8)(t))}if(!t.signal){i=(0,m.HD)(i)?(0,m._k)(i).map(m.m8).join("]["):QH(i)}return e+"["+i+"]"}function tB(t,e){const n=BH(t.scale);if(t.range!=null){e=`lerp(_range(${n}), ${+t.range})`}else{if(e!==undefined)e=`_scale(${n}, ${e})`;if(t.band){e=(e?e+"+":"")+`_bandwidth(${n})`+(+t.band===1?"":"*"+KH(t.band));if(t.extra){e=`(datum.extra ? _scale(${n}, datum.extra.value) : ${e})`}}if(e==null)e="0"}return e}function eB(t){let e="";t.forEach((t=>{const n=YH(t);e+=t.test?`(${t.test})?${n}:`:n}));if((0,m.fj)(e)===":"){e+="null"}return e}function nB(t,e,n,i,r,o){const s={};o=o||{};o.encoders={$encode:s};t=XH(t,e,n,i,r.config);for(const a in t){s[a]=iB(t[a],e,o,r)}return o}function iB(t,e,n,i){const r={},o={};for(const s in t){if(t[s]!=null){r[s]=oB(rB(t[s]),i,n,o)}}return{$expr:{marktype:e,channels:r},$fields:Object.keys(o),$output:Object.keys(t)}}function rB(t){return(0,m.kJ)(t)?eB(t):YH(t)}function oB(t,e,n,i){const r=sW(t,e);r.$fields.forEach((t=>i[t]=1));(0,m.l7)(n,r.$params);return r.$expr}const sB="outer",aB=["value","update","init","react","bind"];function lB(t,e){(0,m.vU)(t+' for "outer" push: '+(0,m.m8)(e))}function uB(t,e){const n=t.name;if(t.push===sB){if(!e.signals[n])lB("No prior signal definition",n);aB.forEach((e=>{if(t[e]!==undefined)lB("Invalid property ",e)}))}else{const i=e.addSignal(n,t.value);if(t.react===false)i.react=false;if(t.bind)e.addBinding(n,t.bind)}}function cB(t,e,n,i){this.id=-1;this.type=t;this.value=e;this.params=n;if(i)this.parent=i}function fB(t,e,n,i){return new cB(t,e,n,i)}function hB(t,e){return fB("operator",t,e)}function dB(t){const e={$ref:t.id};if(t.id<0)(t.refs=t.refs||[]).push(e);return e}function pB(t,e){return e?{$field:t,$name:e}:{$field:t}}const mB=pB("key");function gB(t,e){return{$compare:t,$order:e}}function yB(t,e){const n={$key:t};if(e)n.$flat=true;return n}const vB="ascending";const _B="descending";function xB(t){return!(0,m.Kn)(t)?"":(t.order===_B?"-":"+")+bB(t.op,t.field)}function bB(t,e){return(t&&t.signal?"$"+t.signal:t||"")+(t&&e?"_":"")+(e&&e.signal?"$"+e.signal:e||"")}const wB="scope";const kB="view";function MB(t){return t&&t.signal}function SB(t){return t&&t.expr}function EB(t){if(MB(t))return true;if((0,m.Kn)(t))for(const e in t){if(EB(t[e]))return true}return false}function TB(t,e){return t!=null?t:e}function DB(t){return t&&t.signal||t}const AB="timer";function NB(t,e){const n=t.merge?RB:t.stream?CB:t.type?OB:(0,m.vU)("Invalid stream specification: "+(0,m.m8)(t));return n(t,e)}function zB(t){return t===wB?kB:t||kB}function RB(t,e){const n=t.merge.map((t=>NB(t,e))),i=UB({merge:n},t,e);return e.addStream(i).id}function CB(t,e){const n=NB(t.stream,e),i=UB({stream:n},t,e);return e.addStream(i).id}function OB(t,e){let n;if(t.type===AB){n=e.event(AB,t.throttle);t={between:t.between,filter:t.filter}}else{n=e.event(zB(t.source),t.type)}const i=UB({stream:n},t,e);return Object.keys(i).length===1?n:e.addStream(i).id}function UB(t,e,n){let i=e.between;if(i){if(i.length!==2){(0,m.vU)('Stream "between" parameter must have 2 entries: '+(0,m.m8)(e))}t.between=[NB(i[0],n),NB(i[1],n)]}i=e.filter?[].concat(e.filter):[];if(e.marktype||e.markname||e.markrole){i.push($B(e.marktype,e.markname,e.markrole))}if(e.source===wB){i.push("inScope(event.item)")}if(i.length){t.filter=sW("("+i.join(")&&(")+")",n).$expr}if((i=e.throttle)!=null){t.throttle=+i}if((i=e.debounce)!=null){t.debounce=+i}if(e.consume){t.consume=true}return t}function $B(t,e,n){const i="event.item";return i+(t&&t!=="*"?"&&"+i+".mark.marktype==='"+t+"'":"")+(n?"&&"+i+".mark.role==='"+n+"'":"")+(e?"&&"+i+".mark.name==='"+e+"'":"")}const PB={code:"_.$value",ast:{type:"Identifier",value:"value"}};function qB(t,e,n){const i=t.encode,r={target:n};let o=t.events,s=t.update,a=[];if(!o){(0,m.vU)("Signal update missing events specification.")}if((0,m.HD)(o)){o=(0,mH.r)(o,e.isSubscope()?wB:kB)}o=(0,m.IX)(o).filter((t=>t.signal||t.scale?(a.push(t),0):1));if(a.length>1){a=[LB(a)]}if(o.length){a.push(o.length>1?{merge:o}:o[0])}if(i!=null){if(s)(0,m.vU)("Signal encode and update are mutually exclusive.");s="encode(item(),"+(0,m.m8)(i)+")"}r.update=(0,m.HD)(s)?sW(s,e):s.expr!=null?sW(s.expr,e):s.value!=null?s.value:s.signal!=null?{$expr:PB,$params:{$value:e.signalRef(s.signal)}}:(0,m.vU)("Invalid signal update specification.");if(t.force){r.options={force:true}}a.forEach((t=>e.addUpdate((0,m.l7)(IB(t,e),r))))}function IB(t,e){return{source:t.signal?e.signalRef(t.signal):t.scale?e.scaleRef(t.scale):NB(t,e)}}function LB(t){return{signal:"["+t.map((t=>t.scale?'scale("'+t.scale+'")':t.signal))+"]"}}function FB(t,e){const n=e.getSignal(t.name);let i=t.update;if(t.init){if(i){(0,m.vU)("Signals can not include both init and update expressions.")}else{i=t.init;n.initonly=true}}if(i){i=sW(i,e);n.update=i.$expr;n.params=i.$params}if(t.on){t.on.forEach((t=>qB(t,e,n.id)))}}const jB=t=>(e,n,i)=>fB(t,n,e||undefined,i);const WB=jB("aggregate");const XB=jB("axisticks");const HB=jB("bound");const BB=jB("collect");const YB=jB("compare");const JB=jB("datajoin");const GB=jB("encode");const VB=jB("expression");const KB=jB("facet");const ZB=jB("field");const QB=jB("key");const tY=jB("legendentries");const eY=jB("load");const nY=jB("mark");const iY=jB("multiextent");const rY=jB("multivalues");const oY=jB("overlap");const sY=jB("params");const aY=jB("prefacet");const lY=jB("projection");const uY=jB("proxy");const cY=jB("relay");const fY=jB("render");const hY=jB("scale");const dY=jB("sieve");const pY=jB("sortitems");const mY=jB("viewlayout");const gY=jB("values");let yY=0;const vY={min:"min",max:"max",count:"sum"};function _Y(t,e){const n=t.type||"linear";if(!wg(n)){(0,m.vU)("Unrecognized scale type: "+(0,m.m8)(n))}e.addScale(t.name,{type:n,domain:undefined})}function xY(t,e){const n=e.getScale(t.name).params;let i;n.domain=MY(t.domain,t,e);if(t.range!=null){n.range=$Y(t,e,n)}if(t.interpolate!=null){UY(t.interpolate,n)}if(t.nice!=null){n.nice=OY(t.nice)}if(t.bins!=null){n.bins=CY(t.bins,e)}for(i in t){if((0,m.nr)(n,i)||i==="name")continue;n[i]=bY(t[i],e)}}function bY(t,e){return!(0,m.Kn)(t)?t:t.signal?e.signalRef(t.signal):(0,m.vU)("Unsupported object: "+(0,m.m8)(t))}function wY(t,e){return t.signal?e.signalRef(t.signal):t.map((t=>bY(t,e)))}function kY(t){(0,m.vU)("Can not find data set: "+(0,m.m8)(t))}function MY(t,e,n){if(!t){if(e.domainMin!=null||e.domainMax!=null){(0,m.vU)("No scale domain defined for domainMin/domainMax to override.")}return}return t.signal?n.signalRef(t.signal):((0,m.kJ)(t)?SY:t.fields?TY:EY)(t,e,n)}function SY(t,e,n){return t.map((t=>bY(t,n)))}function EY(t,e,n){const i=n.getData(t.data);if(!i)kY(t.data);return Sg(e.type)?i.valuesRef(n,t.field,NY(t.sort,false)):Ng(e.type)?i.domainRef(n,t.field):i.extentRef(n,t.field)}function TY(t,e,n){const i=t.data,r=t.fields.reduce(((t,e)=>{e=(0,m.HD)(e)?{data:i,field:e}:(0,m.kJ)(e)||e.signal?DY(e,n):e;t.push(e);return t}),[]);return(Sg(e.type)?AY:Ng(e.type)?zY:RY)(t,n,r)}function DY(t,e){const n="_:vega:_"+yY++,i=BB({});if((0,m.kJ)(t)){i.value={$ingest:t}}else if(t.signal){const r="setdata("+(0,m.m8)(n)+","+t.signal+")";i.params.input=e.signalRef(r)}e.addDataPipeline(n,[i,dY({})]);return{data:n,field:"data"}}function AY(t,e,n){const i=NY(t.sort,true);let r,o;const s=n.map((t=>{const n=e.getData(t.data);if(!n)kY(t.data);return n.countsRef(e,t.field,i)}));const a={groupby:mB,pulse:s};if(i){r=i.op||"count";o=i.field?bB(r,i.field):"count";a.ops=[vY[r]];a.fields=[e.fieldRef(o)];a.as=[o]}r=e.add(WB(a));const l=e.add(BB({pulse:dB(r)}));o=e.add(gY({field:mB,sort:e.sortRef(i),pulse:dB(l)}));return dB(o)}function NY(t,e){if(t){if(!t.field&&!t.op){if((0,m.Kn)(t))t.field="key";else t={field:"key"}}else if(!t.field&&t.op!=="count"){(0,m.vU)("No field provided for sort aggregate op: "+t.op)}else if(e&&t.field){if(t.op&&!vY[t.op]){(0,m.vU)("Multiple domain scales can not be sorted using "+t.op)}}}return t}function zY(t,e,n){const i=n.map((t=>{const n=e.getData(t.data);if(!n)kY(t.data);return n.domainRef(e,t.field)}));return dB(e.add(rY({values:i})))}function RY(t,e,n){const i=n.map((t=>{const n=e.getData(t.data);if(!n)kY(t.data);return n.extentRef(e,t.field)}));return dB(e.add(iY({extents:i})))}function CY(t,e){return t.signal||(0,m.kJ)(t)?wY(t,e):e.objectProperty(t)}function OY(t){return(0,m.Kn)(t)?{interval:bY(t.interval),step:bY(t.step)}:bY(t)}function UY(t,e){e.interpolate=bY(t.type||t);if(t.gamma!=null){e.interpolateGamma=bY(t.gamma)}}function $Y(t,e,n){const i=e.config.range;let r=t.range;if(r.signal){return e.signalRef(r.signal)}else if((0,m.HD)(r)){if(i&&(0,m.nr)(i,r)){t=(0,m.l7)({},t,{range:i[r]});return $Y(t,e,n)}else if(r==="width"){r=[0,{signal:"width"}]}else if(r==="height"){r=Sg(t.type)?[0,{signal:"height"}]:[{signal:"height"},0]}else{(0,m.vU)("Unrecognized scale range value: "+(0,m.m8)(r))}}else if(r.scheme){n.scheme=(0,m.kJ)(r.scheme)?wY(r.scheme,e):bY(r.scheme,e);if(r.extent)n.schemeExtent=wY(r.extent,e);if(r.count)n.schemeCount=bY(r.count,e);return}else if(r.step){n.rangeStep=bY(r.step,e);return}else if(Sg(t.type)&&!(0,m.kJ)(r)){return MY(r,t,e)}else if(!(0,m.kJ)(r)){(0,m.vU)("Unsupported range type: "+(0,m.m8)(r))}return r.map((t=>((0,m.kJ)(t)?wY:bY)(t,e)))}function PY(t,e){const n=e.config.projection||{},i={};for(const r in t){if(r==="name")continue;i[r]=qY(t[r],r,e)}for(const r in n){if(i[r]==null){i[r]=qY(n[r],r,e)}}e.addProjection(t.name,i)}function qY(t,e,n){return(0,m.kJ)(t)?t.map((t=>qY(t,e,n))):!(0,m.Kn)(t)?t:t.signal?n.signalRef(t.signal):e==="fit"?t:(0,m.vU)("Unsupported parameter object: "+(0,m.m8)(t))}const IY="top";const LY="left";const FY="right";const jY="bottom";const WY="center";const XY="vertical";const HY="start";const BY="middle";const YY="end";const JY="index";const GY="label";const VY="offset";const KY="perc";const ZY="perc2";const QY="value";const tJ="guide-label";const eJ="guide-title";const nJ="group-title";const iJ="group-subtitle";const rJ="symbol";const oJ="gradient";const sJ="discrete";const aJ="size";const lJ="shape";const uJ="fill";const cJ="stroke";const fJ="strokeWidth";const hJ="strokeDash";const dJ="opacity";const pJ=[aJ,lJ,uJ,cJ,fJ,hJ,dJ];const mJ={name:1,style:1,interactive:1};const gJ={value:0};const yJ={value:1};const vJ="group";const _J="rect";const xJ="rule";const bJ="symbol";const wJ="text";function kJ(t){t.type=vJ;t.interactive=t.interactive||false;return t}function MJ(t,e){const n=(n,i)=>TB(t[n],TB(e[n],i));n.isVertical=n=>XY===TB(t.direction,e.direction||(n?e.symbolDirection:e.gradientDirection));n.gradientLength=()=>TB(t.gradientLength,e.gradientLength||e.gradientWidth);n.gradientThickness=()=>TB(t.gradientThickness,e.gradientThickness||e.gradientHeight);n.entryColumns=()=>TB(t.columns,TB(e.columns,+n.isVertical(true)));return n}function SJ(t,e){const n=e&&(e.update&&e.update[t]||e.enter&&e.enter[t]);return n&&n.signal?n:n?n.value:null}function EJ(t,e,n){const i=e.config.style[n];return i&&i[t]}function TJ(t,e,n){return`item.anchor === '${HY}' ? ${t} : item.anchor === '${YY}' ? ${e} : ${n}`}const DJ=TJ((0,m.m8)(LY),(0,m.m8)(FY),(0,m.m8)(WY));function AJ(t){const e=t("tickBand");let n=t("tickOffset"),i,r;if(!e){i=t("bandPosition");r=t("tickExtra")}else if(e.signal){i={signal:`(${e.signal}) === 'extent' ? 1 : 0.5`};r={signal:`(${e.signal}) === 'extent'`};if(!(0,m.Kn)(n)){n={signal:`(${e.signal}) === 'extent' ? 0 : ${n}`}}}else if(e==="extent"){i=1;r=true;n=0}else{i=.5;r=false}return{extra:r,band:i,offset:n}}function NJ(t,e){return!e?t:!t?e:!(0,m.Kn)(t)?{value:t,offset:e}:Object.assign({},t,{offset:NJ(t.offset,e)})}function zJ(t,e){if(e){t.name=e.name;t.style=e.style||t.style;t.interactive=!!e.interactive;t.encode=kH(t.encode,e,mJ)}else{t.interactive=false}return t}function RJ(t,e,n,i){const r=MJ(t,n),o=r.isVertical(),s=r.gradientThickness(),a=r.gradientLength();let l,u,c,f,h;if(o){u=[0,1];c=[0,0];f=s;h=a}else{u=[0,0];c=[1,0];f=a;h=s}const d={enter:l={opacity:gJ,x:gJ,y:gJ,width:xH(f),height:xH(h)},update:(0,m.l7)({},l,{opacity:yJ,fill:{gradient:e,start:u,stop:c}}),exit:{opacity:gJ}};wH(d,{stroke:r("gradientStrokeColor"),strokeWidth:r("gradientStrokeWidth")},{opacity:r("gradientOpacity")});return zJ({type:_J,role:PH,encode:d},i)}function CJ(t,e,n,i,r){const o=MJ(t,n),s=o.isVertical(),a=o.gradientThickness(),l=o.gradientLength();let u,c,f,h,d="";s?(u="y",f="y2",c="x",h="width",d="1-"):(u="x",f="x2",c="y",h="height");const p={opacity:gJ,fill:{scale:e,field:QY}};p[u]={signal:d+"datum."+KY,mult:l};p[c]=gJ;p[f]={signal:d+"datum."+ZY,mult:l};p[h]=xH(a);const g={enter:p,update:(0,m.l7)({},p,{opacity:yJ}),exit:{opacity:gJ}};wH(g,{stroke:o("gradientStrokeColor"),strokeWidth:o("gradientStrokeWidth")},{opacity:o("gradientOpacity")});return zJ({type:_J,role:UH,key:QY,from:r,encode:g},i)}const OJ=`datum.${KY}<=0?"${LY}":datum.${KY}>=1?"${FY}":"${WY}"`,UJ=`datum.${KY}<=0?"${jY}":datum.${KY}>=1?"${IY}":"${BY}"`;function $J(t,e,n,i){const r=MJ(t,e),o=r.isVertical(),s=xH(r.gradientThickness()),a=r.gradientLength();let l=r("labelOverlap"),u,c,f,h,d="";const p={enter:u={opacity:gJ},update:c={opacity:yJ,text:{field:GY}},exit:{opacity:gJ}};wH(p,{fill:r("labelColor"),fillOpacity:r("labelOpacity"),font:r("labelFont"),fontSize:r("labelFontSize"),fontStyle:r("labelFontStyle"),fontWeight:r("labelFontWeight"),limit:TB(t.labelLimit,e.gradientLabelLimit)});if(o){u.align={value:"left"};u.baseline=c.baseline={signal:UJ};f="y";h="x";d="1-"}else{u.align=c.align={signal:OJ};u.baseline={value:"top"};f="x";h="y"}u[f]=c[f]={signal:d+"datum."+KY,mult:a};u[h]=c[h]=s;s.offset=TB(t.labelOffset,e.gradientLabelOffset)||0;l=l?{separation:r("labelSeparation"),method:l,order:"datum."+JY}:undefined;return zJ({type:wJ,role:qH,style:tJ,key:QY,from:i,encode:p,overlap:l},n)}function PJ(t,e,n,i,r){const o=MJ(t,e),s=n.entries,a=!!(s&&s.interactive),l=s?s.name:undefined,u=o("clipHeight"),c=o("symbolOffset"),f={data:"value"},h=`(${r}) ? datum.${VY} : datum.${aJ}`,d=u?xH(u):{field:aJ},p=`datum.${JY}`,m=`max(1, ${r})`;let g,y,v,_,x;d.mult=.5;g={enter:y={opacity:gJ,x:{signal:h,mult:.5,offset:c},y:d},update:v={opacity:yJ,x:y.x,y:y.y},exit:{opacity:gJ}};let b=null,w=null;if(!t.fill){b=e.symbolBaseFillColor;w=e.symbolBaseStrokeColor}wH(g,{fill:o("symbolFillColor",b),shape:o("symbolType"),size:o("symbolSize"),stroke:o("symbolStrokeColor",w),strokeDash:o("symbolDash"),strokeDashOffset:o("symbolDashOffset"),strokeWidth:o("symbolStrokeWidth")},{opacity:o("symbolOpacity")});pJ.forEach((e=>{if(t[e]){v[e]=y[e]={scale:t[e],field:QY}}}));const k=zJ({type:bJ,role:IH,key:QY,from:f,clip:u?true:undefined,encode:g},n.symbols);const M=xH(c);M.offset=o("labelOffset");g={enter:y={opacity:gJ,x:{signal:h,offset:M},y:d},update:v={opacity:yJ,text:{field:GY},x:y.x,y:y.y},exit:{opacity:gJ}};wH(g,{align:o("labelAlign"),baseline:o("labelBaseline"),fill:o("labelColor"),fillOpacity:o("labelOpacity"),font:o("labelFont"),fontSize:o("labelFontSize"),fontStyle:o("labelFontStyle"),fontWeight:o("labelFontWeight"),limit:o("labelLimit")});const S=zJ({type:wJ,role:qH,style:tJ,key:QY,from:f,encode:g},n.labels);g={enter:{noBound:{value:!u},width:gJ,height:u?xH(u):gJ,opacity:gJ},exit:{opacity:gJ},update:v={opacity:yJ,row:{signal:null},column:{signal:null}}};if(o.isVertical(true)){_=`ceil(item.mark.items.length / ${m})`;v.row.signal=`${p}%${_}`;v.column.signal=`floor(${p} / ${_})`;x={field:["row",p]}}else{v.row.signal=`floor(${p} / ${m})`;v.column.signal=`${p} % ${m}`;x={field:p}}v.column.signal=`(${r})?${v.column.signal}:${p}`;i={facet:{data:i,name:"value",groupby:JY}};return kJ({role:TH,from:i,encode:kH(g,s,mJ),marks:[k,S],name:l,interactive:a,sort:x})}function qJ(t,e){const n=MJ(t,e);return{align:n("gridAlign"),columns:n.entryColumns(),center:{row:true,column:false},padding:{row:n("rowPadding"),column:n("columnPadding")}}}const IJ='item.orient === "left"',LJ='item.orient === "right"',FJ=`(${IJ} || ${LJ})`,jJ=`datum.vgrad && ${FJ}`,WJ=TJ('"top"','"bottom"','"middle"'),XJ=TJ('"right"','"left"','"center"'),HJ=`datum.vgrad && ${LJ} ? (${XJ}) : (${FJ} && !(datum.vgrad && ${IJ})) ? "left" : ${DJ}`,BJ=`item._anchor || (${FJ} ? "middle" : "start")`,YJ=`${jJ} ? (${IJ} ? -90 : 90) : 0`,JJ=`${FJ} ? (datum.vgrad ? (${LJ} ? "bottom" : "top") : ${WJ}) : "top"`;function GJ(t,e,n,i){const r=MJ(t,e);const o={enter:{opacity:gJ},update:{opacity:yJ,x:{field:{group:"padding"}},y:{field:{group:"padding"}}},exit:{opacity:gJ}};wH(o,{orient:r("titleOrient"),_anchor:r("titleAnchor"),anchor:{signal:BJ},angle:{signal:YJ},align:{signal:HJ},baseline:{signal:JJ},text:t.title,fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),baseline:r("titleBaseline")});return zJ({type:wJ,role:LH,style:eJ,from:i,encode:o},n)}function VJ(t,e){let n;if((0,m.Kn)(t)){if(t.signal){n=t.signal}else if(t.path){n="pathShape("+KJ(t.path)+")"}else if(t.sphere){n="geoShape("+KJ(t.sphere)+', {type: "Sphere"})'}}return n?e.signalRef(n):!!t}function KJ(t){return(0,m.Kn)(t)&&t.signal?t.signal:(0,m.m8)(t)}function ZJ(t){const e=t.role||"";return!e.indexOf("axis")||!e.indexOf("legend")||!e.indexOf("title")?e:t.type===vJ?TH:e||SH}function QJ(t){return{marktype:t.type,name:t.name||undefined,role:t.role||ZJ(t),zindex:+t.zindex||undefined,aria:t.aria,description:t.description}}function tG(t,e){return t&&t.signal?e.signalRef(t.signal):t===false?false:true}function eG(t,e){const n=Us(t.type);if(!n)(0,m.vU)("Unrecognized transform type: "+(0,m.m8)(t.type));const i=fB(n.type.toLowerCase(),null,nG(n,t,e));if(t.signal)e.addSignal(t.signal,e.proxy(i));i.metadata=n.metadata||{};return i}function nG(t,e,n){const i={},r=t.params.length;for(let o=0;o<r;++o){const r=t.params[o];i[r.name]=iG(r,e,n)}return i}function iG(t,e,n){const i=t.type,r=e[t.name];if(i==="index"){return oG(t,e,n)}else if(r===undefined){if(t.required){(0,m.vU)("Missing required "+(0,m.m8)(e.type)+" parameter: "+(0,m.m8)(t.name))}return}else if(i==="param"){return sG(t,e,n)}else if(i==="projection"){return n.projectionRef(e[t.name])}return t.array&&!MB(r)?r.map((e=>rG(t,e,n))):rG(t,r,n)}function rG(t,e,n){const i=t.type;if(MB(e)){return fG(i)?(0,m.vU)("Expression references can not be signals."):hG(i)?n.fieldRef(e):dG(i)?n.compareRef(e):n.signalRef(e.signal)}else{const r=t.expr||hG(i);return r&&lG(e)?n.exprRef(e.expr,e.as):r&&uG(e)?pB(e.field,e.as):fG(i)?sW(e,n):cG(i)?dB(n.getData(e).values):hG(i)?pB(e):dG(i)?n.compareRef(e):e}}function oG(t,e,n){if(!(0,m.HD)(e.from)){(0,m.vU)('Lookup "from" parameter must be a string literal.')}return n.getData(e.from).lookupRef(n,e.key)}function sG(t,e,n){const i=e[t.name];if(t.array){if(!(0,m.kJ)(i)){(0,m.vU)("Expected an array of sub-parameters. Instead: "+(0,m.m8)(i))}return i.map((e=>aG(t,e,n)))}else{return aG(t,i,n)}}function aG(t,e,n){const i=t.params.length;let r;for(let s=0;s<i;++s){r=t.params[s];for(const t in r.key){if(r.key[t]!==e[t]){r=null;break}}if(r)break}if(!r)(0,m.vU)("Unsupported parameter: "+(0,m.m8)(e));const o=(0,m.l7)(nG(r,e,n),r.key);return dB(n.add(sY(o)))}const lG=t=>t&&t.expr;const uG=t=>t&&t.field;const cG=t=>t==="data";const fG=t=>t==="expr";const hG=t=>t==="field";const dG=t=>t==="compare";function pG(t,e,n){let i,r,o,s,a;if(!t){s=dB(n.add(BB(null,[{}])))}else if(i=t.facet){if(!e)(0,m.vU)("Only group marks can be faceted.");if(i.field!=null){s=a=mG(i,n)}else{if(!t.data){o=eG((0,m.l7)({type:"aggregate",groupby:(0,m.IX)(i.groupby)},i.aggregate),n);o.params.key=n.keyRef(i.groupby);o.params.pulse=mG(i,n);s=a=dB(n.add(o))}else{a=dB(n.getData(t.data).aggregate)}r=n.keyRef(i.groupby,true)}}if(!s){s=mG(t,n)}return{key:r,pulse:s,parent:a}}function mG(t,e){return t.$ref?t:t.data&&t.data.$ref?t.data:dB(e.getData(t.data).output)}function gG(t,e,n,i,r){this.scope=t;this.input=e;this.output=n;this.values=i;this.aggregate=r;this.index={}}gG.fromEntries=function(t,e){const n=e.length,i=e[n-1],r=e[n-2];let o=e[0],s=null,a=1;if(o&&o.type==="load"){o=e[1]}t.add(e[0]);for(;a<n;++a){e[a].params.pulse=dB(e[a-1]);t.add(e[a]);if(e[a].type==="aggregate")s=e[a]}return new gG(t,o,r,i,s)};function yG(t){return(0,m.HD)(t)?t:null}function vG(t,e,n){const i=bB(n.op,n.field);let r;if(e.ops){for(let t=0,n=e.as.length;t<n;++t){if(e.as[t]===i)return}}else{e.ops=["count"];e.fields=[null];e.as=["count"]}if(n.op){e.ops.push((r=n.op.signal)?t.signalRef(r):n.op);e.fields.push(t.fieldRef(n.field));e.as.push(i)}}function _G(t,e,n,i,r,o,s){const a=e[n]||(e[n]={}),l=xB(o);let u=yG(r),c,f;if(u!=null){t=e.scope;u=u+(l?"|"+l:"");c=a[u]}if(!c){const n=o?{field:mB,pulse:e.countsRef(t,r,o)}:{field:t.fieldRef(r),pulse:dB(e.output)};if(l)n.sort=t.sortRef(o);f=t.add(fB(i,undefined,n));if(s)e.index[r]=f;c=dB(f);if(u!=null)a[u]=c}return c}gG.prototype={countsRef(t,e,n){const i=this,r=i.counts||(i.counts={}),o=yG(e);let s,a,l;if(o!=null){t=i.scope;s=r[o]}if(!s){l={groupby:t.fieldRef(e,"key"),pulse:dB(i.output)};if(n&&n.field)vG(t,l,n);a=t.add(WB(l));s=t.add(BB({pulse:dB(a)}));s={agg:a,ref:dB(s)};if(o!=null)r[o]=s}else if(n&&n.field){vG(t,s.agg.params,n)}return s.ref},tuplesRef(){return dB(this.values)},extentRef(t,e){return _G(t,this,"extent","extent",e,false)},domainRef(t,e){return _G(t,this,"domain","values",e,false)},valuesRef(t,e,n){return _G(t,this,"vals","values",e,n||true)},lookupRef(t,e){return _G(t,this,"lookup","tupleindex",e,false)},indataRef(t,e){return _G(t,this,"indata","tupleindex",e,true,true)}};function xG(t,e,n){const i=t.from.facet,r=i.name,o=mG(i,e);let s;if(!i.name){(0,m.vU)("Facet must have a name: "+(0,m.m8)(i))}if(!i.data){(0,m.vU)("Facet must reference a data set: "+(0,m.m8)(i))}if(i.field){s=e.add(aY({field:e.fieldRef(i.field),pulse:o}))}else if(i.groupby){s=e.add(KB({key:e.keyRef(i.groupby),group:dB(e.proxy(n.parent)),pulse:o}))}else{(0,m.vU)("Facet must specify groupby or field: "+(0,m.m8)(i))}const a=e.fork(),l=a.add(BB()),u=a.add(dY({pulse:dB(l)}));a.addData(r,new gG(a,l,l,u));a.addSignal("parent",null);s.params.subflow={$subflow:a.parse(t).toRuntime()}}function bG(t,e,n){const i=e.add(aY({pulse:n.pulse})),r=e.fork();r.add(dY());r.addSignal("parent",null);i.params.subflow={$subflow:r.parse(t).toRuntime()}}function wG(t,e,n){const i=t.remove,r=t.insert,o=t.toggle,s=t.modify,a=t.values,l=e.add(hB());const u="if("+t.trigger+',modify("'+n+'",'+[r,i,o,s,a].map((t=>t==null?"null":t)).join(",")+"),0)";const c=sW(u,e);l.update=c.$expr;l.params=c.$params}function kG(t,e){const n=ZJ(t),i=t.type===vJ,r=t.from&&t.from.facet,o=t.overlap;let s=t.layout||n===TH||n===EH,a,l,u,c,f,h,d;const p=n===SH||s||r;const g=pG(t.from,i,e);l=e.add(JB({key:g.key||(t.key?pB(t.key):undefined),pulse:g.pulse,clean:!i}));const y=dB(l);l=u=e.add(BB({pulse:y}));l=e.add(nY({markdef:QJ(t),interactive:tG(t.interactive,e),clip:VJ(t.clip,e),context:{$context:true},groups:e.lookup(),parent:e.signals.parent?e.signalRef("parent"):null,index:e.markpath(),pulse:dB(l)}));const v=dB(l);l=c=e.add(GB(nB(t.encode,t.type,n,t.style,e,{mod:false,pulse:v})));l.params.parent=e.encode();if(t.transform){t.transform.forEach((t=>{const n=eG(t,e),i=n.metadata;if(i.generates||i.changes){(0,m.vU)("Mark transforms should not generate new data.")}if(!i.nomod)c.params.mod=true;n.params.pulse=dB(l);e.add(l=n)}))}if(t.sort){l=e.add(pY({sort:e.compareRef(t.sort),pulse:dB(l)}))}const _=dB(l);if(r||s){s=e.add(mY({layout:e.objectProperty(t.layout),legends:e.legends,mark:v,pulse:_}));h=dB(s)}const x=e.add(HB({mark:v,pulse:h||_}));d=dB(x);if(i){if(p){a=e.operators;a.pop();if(s)a.pop()}e.pushState(_,h||d,y);r?xG(t,e,g):p?bG(t,e,g):e.parse(t);e.popState();if(p){if(s)a.push(s);a.push(x)}}if(o){d=MG(o,d,e)}const b=e.add(fY({pulse:d})),w=e.add(dY({pulse:dB(b)},undefined,e.parent()));if(t.name!=null){f=t.name;e.addData(f,new gG(e,u,b,w));if(t.on)t.on.forEach((t=>{if(t.insert||t.remove||t.toggle){(0,m.vU)("Marks only support modify triggers.")}wG(t,e,f)}))}}function MG(t,e,n){const i=t.method,r=t.bound,o=t.separation;const s={separation:MB(o)?n.signalRef(o.signal):o,method:MB(i)?n.signalRef(i.signal):i,pulse:e};if(t.order){s.sort=n.compareRef({field:t.order})}if(r){const t=r.tolerance;s.boundTolerance=MB(t)?n.signalRef(t.signal):+t;s.boundScale=n.scaleRef(r.scale);s.boundOrient=r.orient}return dB(n.add(oY(s)))}function SG(t,e){const n=e.config.legend,i=t.encode||{},r=MJ(t,n),o=i.legend||{},s=o.name||undefined,a=o.interactive,l=o.style,u={};let c=0,f,h,d;pJ.forEach((e=>t[e]?(u[e]=t[e],c=c||t[e]):0));if(!c)(0,m.vU)("Missing valid scale for legend.");const p=EG(t,e.scaleType(c));const g={title:t.title!=null,scales:u,type:p,vgrad:p!=="symbol"&&r.isVertical()};const y=dB(e.add(BB(null,[g])));const v={enter:{x:{value:0},y:{value:0}}};const _=dB(e.add(tY(h={type:p,scale:e.scaleRef(c),count:e.objectProperty(r("tickCount")),limit:e.property(r("symbolLimit")),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)})));if(p===oJ){d=[RJ(t,c,n,i.gradient),$J(t,n,i.labels,_)];h.count=h.count||e.signalRef(`max(2,2*floor((${DB(r.gradientLength())})/100))`)}else if(p===sJ){d=[CJ(t,c,n,i.gradient,_),$J(t,n,i.labels,_)]}else{f=qJ(t,n);d=[PJ(t,n,i,_,DB(f.columns))];h.size=AG(t,e,d[0].marks)}d=[kJ({role:$H,from:y,encode:v,marks:d,layout:f,interactive:a})];if(g.title){d.push(GJ(t,n,i.title,y))}return kG(kJ({role:OH,from:y,encode:kH(DG(r,t,n),o,mJ),marks:d,aria:r("aria"),description:r("description"),zindex:r("zindex"),name:s,interactive:a,style:l}),e)}function EG(t,e){let n=t.type||rJ;if(!t.type&&TG(t)===1&&(t.fill||t.stroke)){n=Mg(e)?oJ:Eg(e)?sJ:rJ}return n!==oJ?n:Eg(e)?sJ:oJ}function TG(t){return pJ.reduce(((e,n)=>e+(t[n]?1:0)),0)}function DG(t,e,n){const i={enter:{},update:{}};wH(i,{orient:t("orient"),offset:t("offset"),padding:t("padding"),titlePadding:t("titlePadding"),cornerRadius:t("cornerRadius"),fill:t("fillColor"),stroke:t("strokeColor"),strokeWidth:n.strokeWidth,strokeDash:n.strokeDash,x:t("legendX"),y:t("legendY"),format:e.format,formatType:e.formatType});return i}function AG(t,e,n){const i=DB(NG("size",t,n)),r=DB(NG("strokeWidth",t,n)),o=DB(zG(n[1].encode,e,tJ));return sW(`max(ceil(sqrt(${i})+${r}),${o})`,e)}function NG(t,e,n){return e[t]?`scale("${e[t]}",datum)`:SJ(t,n[0].encode)}function zG(t,e,n){return SJ("fontSize",t)||EJ("fontSize",e,n)}const RG=`item.orient==="${LY}"?-90:item.orient==="${FY}"?90:0`;function CG(t,e){t=(0,m.HD)(t)?{text:t}:t;const n=MJ(t,e.config.title),i=t.encode||{},r=i.group||{},o=r.name||undefined,s=r.interactive,a=r.style,l=[];const u={},c=dB(e.add(BB(null,[u])));l.push($G(t,n,OG(t),c));if(t.subtitle){l.push(PG(t,n,i.subtitle,c))}return kG(kJ({role:FH,from:c,encode:UG(n,r),marks:l,aria:n("aria"),description:n("description"),zindex:n("zindex"),name:o,interactive:s,style:a}),e)}function OG(t){const e=t.encode;return e&&e.title||(0,m.l7)({name:t.name,interactive:t.interactive,style:t.style},e)}function UG(t,e){const n={enter:{},update:{}};wH(n,{orient:t("orient"),anchor:t("anchor"),align:{signal:DJ},angle:{signal:RG},limit:t("limit"),frame:t("frame"),offset:t("offset")||0,padding:t("subtitlePadding")});return kH(n,e,mJ)}function $G(t,e,n,i){const r={value:0},o=t.text,s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};wH(s,{text:o,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:e("dx"),dy:e("dy"),fill:e("color"),font:e("font"),fontSize:e("fontSize"),fontStyle:e("fontStyle"),fontWeight:e("fontWeight"),lineHeight:e("lineHeight")},{align:e("align"),angle:e("angle"),baseline:e("baseline")});return zJ({type:wJ,role:jH,style:nJ,from:i,encode:s},n)}function PG(t,e,n,i){const r={value:0},o=t.subtitle,s={enter:{opacity:r},update:{opacity:{value:1}},exit:{opacity:r}};wH(s,{text:o,align:{signal:"item.mark.group.align"},angle:{signal:"item.mark.group.angle"},limit:{signal:"item.mark.group.limit"},baseline:"top",dx:e("dx"),dy:e("dy"),fill:e("subtitleColor"),font:e("subtitleFont"),fontSize:e("subtitleFontSize"),fontStyle:e("subtitleFontStyle"),fontWeight:e("subtitleFontWeight"),lineHeight:e("subtitleLineHeight")},{align:e("align"),angle:e("angle"),baseline:e("baseline")});return zJ({type:wJ,role:WH,style:iJ,from:i,encode:s},n)}function qG(t,e){const n=[];if(t.transform){t.transform.forEach((t=>{n.push(eG(t,e))}))}if(t.on){t.on.forEach((n=>{wG(n,e,t.name)}))}e.addDataPipeline(t.name,IG(t,e,n))}function IG(t,e,n){const i=[];let r=null,o=false,s=false,a,l,u,c,f;if(t.values){if(MB(t.values)||EB(t.format)){i.push(FG(e,t));i.push(r=LG())}else{i.push(r=LG({$ingest:t.values,$format:t.format}))}}else if(t.url){if(EB(t.url)||EB(t.format)){i.push(FG(e,t));i.push(r=LG())}else{i.push(r=LG({$request:t.url,$format:t.format}))}}else if(t.source){r=a=(0,m.IX)(t.source).map((t=>dB(e.getData(t).output)));i.push(null)}for(l=0,u=n.length;l<u;++l){c=n[l];f=c.metadata;if(!r&&!f.source){i.push(r=LG())}i.push(c);if(f.generates)s=true;if(f.modifies&&!s)o=true;if(f.source)r=c;else if(f.changes)r=null}if(a){u=a.length-1;i[0]=cY({derive:o,pulse:u?a:a[0]});if(o||u){i.splice(1,0,LG())}}if(!r)i.push(LG());i.push(dY({}));return i}function LG(t){const e=BB({},t);e.metadata={source:true};return e}function FG(t,e){return eY({url:e.url?t.property(e.url):undefined,async:e.async?t.property(e.async):undefined,values:e.values?t.property(e.values):undefined,format:t.objectProperty(e.format)})}const jG=t=>t===jY||t===IY;const WG=(t,e,n)=>MB(t)?VG(t.signal,e,n):t===LY||t===IY?e:n;const XG=(t,e,n)=>MB(t)?JG(t.signal,e,n):jG(t)?e:n;const HG=(t,e,n)=>MB(t)?GG(t.signal,e,n):jG(t)?n:e;const BG=(t,e,n)=>MB(t)?KG(t.signal,e,n):t===IY?{value:e}:{value:n};const YG=(t,e,n)=>MB(t)?ZG(t.signal,e,n):t===FY?{value:e}:{value:n};const JG=(t,e,n)=>QG(`${t} === '${IY}' || ${t} === '${jY}'`,e,n);const GG=(t,e,n)=>QG(`${t} !== '${IY}' && ${t} !== '${jY}'`,e,n);const VG=(t,e,n)=>eV(`${t} === '${LY}' || ${t} === '${IY}'`,e,n);const KG=(t,e,n)=>eV(`${t} === '${IY}'`,e,n);const ZG=(t,e,n)=>eV(`${t} === '${FY}'`,e,n);const QG=(t,e,n)=>{e=e!=null?xH(e):e;n=n!=null?xH(n):n;if(tV(e)&&tV(n)){e=e?e.signal||(0,m.m8)(e.value):null;n=n?n.signal||(0,m.m8)(n.value):null;return{signal:`${t} ? (${e}) : (${n})`}}else{return[(0,m.l7)({test:t},e)].concat(n||[])}};const tV=t=>t==null||Object.keys(t).length===1;const eV=(t,e,n)=>({signal:`${t} ? (${iV(e)}) : (${iV(n)})`});const nV=(t,e,n,i,r)=>({signal:(i!=null?`${t} === '${LY}' ? (${iV(i)}) : `:"")+(n!=null?`${t} === '${jY}' ? (${iV(n)}) : `:"")+(r!=null?`${t} === '${FY}' ? (${iV(r)}) : `:"")+(e!=null?`${t} === '${IY}' ? (${iV(e)}) : `:"")+"(null)"});const iV=t=>MB(t)?t.signal:t==null?null:(0,m.m8)(t);const rV=(t,e)=>e===0?0:MB(t)?{signal:`(${t.signal}) * ${e}`}:{value:t*e};const oV=(t,e)=>{const n=t.signal;return n&&n.endsWith("(null)")?{signal:n.slice(0,-6)+e.signal}:t};function sV(t,e,n,i){let r;if(e&&(0,m.nr)(e,t)){return e[t]}else if((0,m.nr)(n,t)){return n[t]}else if(t.startsWith("title")){switch(t){case"titleColor":r="fill";break;case"titleFont":case"titleFontSize":case"titleFontWeight":r=t[5].toLowerCase()+t.slice(6)}return i[eJ][r]}else if(t.startsWith("label")){switch(t){case"labelColor":r="fill";break;case"labelFont":case"labelFontSize":r=t[5].toLowerCase()+t.slice(6)}return i[tJ][r]}return null}function aV(t){const e={};for(const n of t){if(!n)continue;for(const t in n)e[t]=1}return Object.keys(e)}function lV(t,e){var n=e.config,i=n.style,r=n.axis,o=e.scaleType(t.scale)==="band"&&n.axisBand,s=t.orient,a,l,u;if(MB(s)){const t=aV([n.axisX,n.axisY]),e=aV([n.axisTop,n.axisBottom,n.axisLeft,n.axisRight]);a={};for(u of t){a[u]=XG(s,sV(u,n.axisX,r,i),sV(u,n.axisY,r,i))}l={};for(u of e){l[u]=nV(s.signal,sV(u,n.axisTop,r,i),sV(u,n.axisBottom,r,i),sV(u,n.axisLeft,r,i),sV(u,n.axisRight,r,i))}}else{a=s===IY||s===jY?n.axisX:n.axisY;l=n["axis"+s[0].toUpperCase()+s.slice(1)]}const c=a||l||o?(0,m.l7)({},r,a,l,o):r;return c}function uV(t,e,n,i){const r=MJ(t,e),o=t.orient;let s,a;const l={enter:s={opacity:gJ},update:a={opacity:yJ},exit:{opacity:gJ}};wH(l,{stroke:r("domainColor"),strokeCap:r("domainCap"),strokeDash:r("domainDash"),strokeDashOffset:r("domainDashOffset"),strokeWidth:r("domainWidth"),strokeOpacity:r("domainOpacity")});const u=cV(t,0);const c=cV(t,1);s.x=a.x=XG(o,u,gJ);s.x2=a.x2=XG(o,c);s.y=a.y=HG(o,u,gJ);s.y2=a.y2=HG(o,c);return zJ({type:xJ,role:AH,from:i,encode:l},n)}function cV(t,e){return{scale:t.scale,range:e}}function fV(t,e,n,i,r){const o=MJ(t,e),s=t.orient,a=t.gridScale,l=WG(s,1,-1),u=hV(t.offset,l);let c,f,h;const d={enter:c={opacity:gJ},update:h={opacity:yJ},exit:f={opacity:gJ}};wH(d,{stroke:o("gridColor"),strokeCap:o("gridCap"),strokeDash:o("gridDash"),strokeDashOffset:o("gridDashOffset"),strokeOpacity:o("gridOpacity"),strokeWidth:o("gridWidth")});const p={scale:t.scale,field:QY,band:r.band,extra:r.extra,offset:r.offset,round:o("tickRound")};const g=XG(s,{signal:"height"},{signal:"width"});const y=a?{scale:a,range:0,mult:l,offset:u}:{value:0,offset:u};const v=a?{scale:a,range:1,mult:l,offset:u}:(0,m.l7)(g,{mult:l,offset:u});c.x=h.x=XG(s,p,y);c.y=h.y=HG(s,p,y);c.x2=h.x2=HG(s,v);c.y2=h.y2=XG(s,v);f.x=XG(s,p);f.y=HG(s,p);return zJ({type:xJ,role:NH,key:QY,from:i,encode:d},n)}function hV(t,e){if(e===1);else if(!(0,m.Kn)(t)){t=MB(e)?{signal:`(${e.signal}) * (${t||0})`}:e*(t||0)}else{let n=t=(0,m.l7)({},t);while(n.mult!=null){if(!(0,m.Kn)(n.mult)){n.mult=MB(e)?{signal:`(${n.mult}) * (${e.signal})`}:n.mult*e;return t}else{n=n.mult=(0,m.l7)({},n.mult)}}n.mult=e}return t}function dV(t,e,n,i,r,o){const s=MJ(t,e),a=t.orient,l=WG(a,-1,1);let u,c,f;const h={enter:u={opacity:gJ},update:f={opacity:yJ},exit:c={opacity:gJ}};wH(h,{stroke:s("tickColor"),strokeCap:s("tickCap"),strokeDash:s("tickDash"),strokeDashOffset:s("tickDashOffset"),strokeOpacity:s("tickOpacity"),strokeWidth:s("tickWidth")});const d=xH(r);d.mult=l;const p={scale:t.scale,field:QY,band:o.band,extra:o.extra,offset:o.offset,round:s("tickRound")};f.y=u.y=XG(a,gJ,p);f.y2=u.y2=XG(a,d);c.x=XG(a,p);f.x=u.x=HG(a,gJ,p);f.x2=u.x2=HG(a,d);c.y=HG(a,p);return zJ({type:xJ,role:RH,key:QY,from:i,encode:h},n)}function pV(t,e,n,i,r){return{signal:'flush(range("'+t+'"), '+'scale("'+t+'", datum.value), '+e+","+n+","+i+","+r+")"}}function mV(t,e,n,i,r,o){const s=MJ(t,e),a=t.orient,l=t.scale,u=WG(a,-1,1),c=DB(s("labelFlush")),f=DB(s("labelFlushOffset")),h=s("labelAlign"),d=s("labelBaseline");let p=c===0||!!c,m;const g=xH(r);g.mult=u;g.offset=xH(s("labelPadding")||0);g.offset.mult=u;const y={scale:l,field:QY,band:.5,offset:NJ(o.offset,s("labelOffset"))};const v=XG(a,p?pV(l,c,'"left"','"right"','"center"'):{value:"center"},YG(a,"left","right"));const _=XG(a,BG(a,"bottom","top"),p?pV(l,c,'"top"','"bottom"','"middle"'):{value:"middle"});const x=pV(l,c,`-(${f})`,f,0);p=p&&f;const b={opacity:gJ,x:XG(a,y,g),y:HG(a,y,g)};const w={enter:b,update:m={opacity:yJ,text:{field:GY},x:b.x,y:b.y,align:v,baseline:_},exit:{opacity:gJ,x:b.x,y:b.y}};wH(w,{dx:!h&&p?XG(a,x):null,dy:!d&&p?HG(a,x):null});wH(w,{angle:s("labelAngle"),fill:s("labelColor"),fillOpacity:s("labelOpacity"),font:s("labelFont"),fontSize:s("labelFontSize"),fontWeight:s("labelFontWeight"),fontStyle:s("labelFontStyle"),limit:s("labelLimit"),lineHeight:s("labelLineHeight")},{align:h,baseline:d});const k=s("labelBound");let M=s("labelOverlap");M=M||k?{separation:s("labelSeparation"),method:M,order:"datum.index",bound:k?{scale:l,orient:a,tolerance:k}:null}:undefined;if(m.align!==v){m.align=oV(m.align,v)}if(m.baseline!==_){m.baseline=oV(m.baseline,_)}return zJ({type:wJ,role:zH,style:tJ,key:QY,from:i,encode:w,overlap:M},n)}function gV(t,e,n,i){const r=MJ(t,e),o=t.orient,s=WG(o,-1,1);let a,l;const u={enter:a={opacity:gJ,anchor:xH(r("titleAnchor",null)),align:{signal:DJ}},update:l=(0,m.l7)({},a,{opacity:yJ,text:xH(t.title)}),exit:{opacity:gJ}};const c={signal:`lerp(range("${t.scale}"), ${TJ(0,1,.5)})`};l.x=XG(o,c);l.y=HG(o,c);a.angle=XG(o,gJ,rV(s,90));a.baseline=XG(o,BG(o,jY,IY),{value:jY});l.angle=a.angle;l.baseline=a.baseline;wH(u,{fill:r("titleColor"),fillOpacity:r("titleOpacity"),font:r("titleFont"),fontSize:r("titleFontSize"),fontStyle:r("titleFontStyle"),fontWeight:r("titleFontWeight"),limit:r("titleLimit"),lineHeight:r("titleLineHeight")},{align:r("titleAlign"),angle:r("titleAngle"),baseline:r("titleBaseline")});yV(r,o,u,n);u.update.align=oV(u.update.align,a.align);u.update.angle=oV(u.update.angle,a.angle);u.update.baseline=oV(u.update.baseline,a.baseline);return zJ({type:wJ,role:CH,style:eJ,from:i,encode:u},n)}function yV(t,e,n,i){const r=(t,e)=>t!=null?(n.update[e]=oV(xH(t),n.update[e]),false):!MH(e,i)?true:false;const o=r(t("titleX"),"x"),s=r(t("titleY"),"y");n.enter.auto=s===o?xH(s):XG(e,xH(s),xH(o))}function vV(t,e){const n=lV(t,e),i=t.encode||{},r=i.axis||{},o=r.name||undefined,s=r.interactive,a=r.style,l=MJ(t,n),u=AJ(l);const c={scale:t.scale,ticks:!!l("ticks"),labels:!!l("labels"),grid:!!l("grid"),domain:!!l("domain"),title:t.title!=null};const f=dB(e.add(BB({},[c])));const h=dB(e.add(XB({scale:e.scaleRef(t.scale),extra:e.property(u.extra),count:e.objectProperty(t.tickCount),values:e.objectProperty(t.values),minstep:e.property(t.tickMinStep),formatType:e.property(t.formatType),formatSpecifier:e.property(t.format)})));const d=[];let p;if(c.grid){d.push(fV(t,n,i.grid,h,u))}if(c.ticks){p=l("tickSize");d.push(dV(t,n,i.ticks,h,p,u))}if(c.labels){p=c.ticks?p:0;d.push(mV(t,n,i.labels,h,p,u))}if(c.domain){d.push(uV(t,n,i.domain,f))}if(c.title){d.push(gV(t,n,i.title,f))}return kG(kJ({role:DH,from:f,encode:kH(_V(l,t),r,mJ),marks:d,aria:l("aria"),description:l("description"),zindex:l("zindex"),name:o,interactive:s,style:a}),e)}function _V(t,e){const n={enter:{},update:{}};wH(n,{orient:t("orient"),offset:t("offset")||0,position:TB(e.position,0),titlePadding:t("titlePadding"),minExtent:t("minExtent"),maxExtent:t("maxExtent"),range:{signal:`abs(span(range("${e.scale}")))`},translate:t("translate"),format:e.format,formatType:e.formatType});return n}function xV(t,e,n){const i=(0,m.IX)(t.signals),r=(0,m.IX)(t.scales);if(!n)i.forEach((t=>uB(t,e)));(0,m.IX)(t.projections).forEach((t=>PY(t,e)));r.forEach((t=>_Y(t,e)));(0,m.IX)(t.data).forEach((t=>qG(t,e)));r.forEach((t=>xY(t,e)));(n||i).forEach((t=>FB(t,e)));(0,m.IX)(t.axes).forEach((t=>vV(t,e)));(0,m.IX)(t.marks).forEach((t=>kG(t,e)));(0,m.IX)(t.legends).forEach((t=>SG(t,e)));if(t.title)CG(t.title,e);e.parseLambdas();return e}const bV=t=>kH({enter:{x:{value:0},y:{value:0}},update:{width:{signal:"width"},height:{signal:"height"}}},t);function wV(t,e){const n=e.config;const i=dB(e.root=e.add(hB()));const r=MV(t,n);r.forEach((t=>uB(t,e)));e.description=t.description||n.description;e.eventConfig=n.events;e.legends=e.objectProperty(n.legend&&n.legend.layout);e.locale=n.locale;const o=e.add(BB());const s=e.add(GB(nB(bV(t.encode),vJ,EH,t.style,e,{pulse:dB(o)})));const a=e.add(mY({layout:e.objectProperty(t.layout),legends:e.legends,autosize:e.signalRef("autosize"),mark:i,pulse:dB(s)}));e.operators.pop();e.pushState(dB(s),dB(a),null);xV(t,e,r);e.operators.push(a);let l=e.add(HB({mark:i,pulse:dB(a)}));l=e.add(fY({pulse:dB(l)}));l=e.add(dY({pulse:dB(l)}));e.addData("root",new gG(e,o,o,l));return e}function kV(t,e){return e&&e.signal?{name:t,update:e.signal}:{name:t,value:e}}function MV(t,e){const n=n=>TB(t[n],e[n]),i=[kV("background",n("background")),kV("autosize",gH(n("autosize"))),kV("padding",_H(n("padding"))),kV("width",n("width")||0),kV("height",n("height")||0)],r=i.reduce(((t,e)=>(t[e.name]=e,t)),{}),o={};(0,m.IX)(t.signals).forEach((t=>{if((0,m.nr)(r,t.name)){t=(0,m.l7)(r[t.name],t)}else{i.push(t)}o[t.name]=t}));(0,m.IX)(e.signals).forEach((t=>{if(!(0,m.nr)(o,t.name)&&!(0,m.nr)(r,t.name)){i.push(t)}}));return i}function SV(t,e){this.config=t||{};this.options=e||{};this.bindings=[];this.field={};this.signals={};this.lambdas={};this.scales={};this.events={};this.data={};this.streams=[];this.updates=[];this.operators=[];this.eventConfig=null;this.locale=null;this._id=0;this._subid=0;this._nextsub=[0];this._parent=[];this._encode=[];this._lookup=[];this._markpath=[]}function EV(t){this.config=t.config;this.options=t.options;this.legends=t.legends;this.field=Object.create(t.field);this.signals=Object.create(t.signals);this.lambdas=Object.create(t.lambdas);this.scales=Object.create(t.scales);this.events=Object.create(t.events);this.data=Object.create(t.data);this.streams=[];this.updates=[];this.operators=[];this._id=0;this._subid=++t._nextsub[0];this._nextsub=t._nextsub;this._parent=t._parent.slice();this._encode=t._encode.slice();this._lookup=t._lookup.slice();this._markpath=t._markpath}SV.prototype=EV.prototype={parse(t){return xV(t,this)},fork(){return new EV(this)},isSubscope(){return this._subid>0},toRuntime(){this.finish();return{description:this.description,operators:this.operators,streams:this.streams,updates:this.updates,bindings:this.bindings,eventConfig:this.eventConfig,locale:this.locale}},id(){return(this._subid?this._subid+":":0)+this._id++},add(t){this.operators.push(t);t.id=this.id();if(t.refs){t.refs.forEach((e=>{e.$ref=t.id}));t.refs=null}return t},proxy(t){const e=t instanceof cB?dB(t):t;return this.add(uY({value:e}))},addStream(t){this.streams.push(t);t.id=this.id();return t},addUpdate(t){this.updates.push(t);return t},finish(){let t,e;if(this.root)this.root.root=true;for(t in this.signals){this.signals[t].signal=t}for(t in this.scales){this.scales[t].scale=t}function n(t,e,n){let i,r;if(t){i=t.data||(t.data={});r=i[e]||(i[e]=[]);r.push(n)}}for(t in this.data){e=this.data[t];n(e.input,t,"input");n(e.output,t,"output");n(e.values,t,"values");for(const i in e.index){n(e.index[i],t,"index:"+i)}}return this},pushState(t,e,n){this._encode.push(dB(this.add(dY({pulse:t}))));this._parent.push(e);this._lookup.push(n?dB(this.proxy(n)):null);this._markpath.push(-1)},popState(){this._encode.pop();this._parent.pop();this._lookup.pop();this._markpath.pop()},parent(){return(0,m.fj)(this._parent)},encode(){return(0,m.fj)(this._encode)},lookup(){return(0,m.fj)(this._lookup)},markpath(){const t=this._markpath;return++t[t.length-1]},fieldRef(t,e){if((0,m.HD)(t))return pB(t,e);if(!t.signal){(0,m.vU)("Unsupported field reference: "+(0,m.m8)(t))}const n=t.signal;let i=this.field[n];if(!i){const t={name:this.signalRef(n)};if(e)t.as=e;this.field[n]=i=dB(this.add(ZB(t)))}return i},compareRef(t){let e=false;const n=t=>MB(t)?(e=true,this.signalRef(t.signal)):SB(t)?(e=true,this.exprRef(t.expr)):t;const i=(0,m.IX)(t.field).map(n),r=(0,m.IX)(t.order).map(n);return e?dB(this.add(YB({fields:i,orders:r}))):gB(i,r)},keyRef(t,e){let n=false;const i=t=>MB(t)?(n=true,dB(r[t.signal])):t;const r=this.signals;t=(0,m.IX)(t).map(i);return n?dB(this.add(QB({fields:t,flat:e}))):yB(t,e)},sortRef(t){if(!t)return t;const e=bB(t.op,t.field),n=t.order||vB;return n.signal?dB(this.add(YB({fields:e,orders:this.signalRef(n.signal)}))):gB(e,n)},event(t,e){const n=t+":"+e;if(!this.events[n]){const i=this.id();this.streams.push({id:i,source:t,type:e});this.events[n]=i}return this.events[n]},hasOwnSignal(t){return(0,m.nr)(this.signals,t)},addSignal(t,e){if(this.hasOwnSignal(t)){(0,m.vU)("Duplicate signal name: "+(0,m.m8)(t))}const n=e instanceof cB?e:this.add(hB(e));return this.signals[t]=n},getSignal(t){if(!this.signals[t]){(0,m.vU)("Unrecognized signal name: "+(0,m.m8)(t))}return this.signals[t]},signalRef(t){if(this.signals[t]){return dB(this.signals[t])}else if(!(0,m.nr)(this.lambdas,t)){this.lambdas[t]=this.add(hB(null))}return dB(this.lambdas[t])},parseLambdas(){const t=Object.keys(this.lambdas);for(let e=0,n=t.length;e<n;++e){const n=t[e],i=sW(n,this),r=this.lambdas[n];r.params=i.$params;r.update=i.$expr}},property(t){return t&&t.signal?this.signalRef(t.signal):t},objectProperty(t){return!t||!(0,m.Kn)(t)?t:this.signalRef(t.signal||TV(t))},exprRef(t,e){const n={expr:sW(t,this)};if(e)n.expr.$name=e;return dB(this.add(VB(n)))},addBinding(t,e){if(!this.bindings){(0,m.vU)("Nested signals do not support binding: "+(0,m.m8)(t))}this.bindings.push((0,m.l7)({signal:t},e))},addScaleProj(t,e){if((0,m.nr)(this.scales,t)){(0,m.vU)("Duplicate scale or projection name: "+(0,m.m8)(t))}this.scales[t]=this.add(e)},addScale(t,e){this.addScaleProj(t,hY(e))},addProjection(t,e){this.addScaleProj(t,lY(e))},getScale(t){if(!this.scales[t]){(0,m.vU)("Unrecognized scale name: "+(0,m.m8)(t))}return this.scales[t]},scaleRef(t){return dB(this.getScale(t))},scaleType(t){return this.getScale(t).params.type},projectionRef(t){return this.scaleRef(t)},projectionType(t){return this.scaleType(t)},addData(t,e){if((0,m.nr)(this.data,t)){(0,m.vU)("Duplicate data set name: "+(0,m.m8)(t))}return this.data[t]=e},getData(t){if(!this.data[t]){(0,m.vU)("Undefined data set name: "+(0,m.m8)(t))}return this.data[t]},addDataPipeline(t,e){if((0,m.nr)(this.data,t)){(0,m.vU)("Duplicate data set name: "+(0,m.m8)(t))}return this.addData(t,gG.fromEntries(this,e))}};function TV(t){return((0,m.kJ)(t)?DV:AV)(t)}function DV(t){const e=t.length;let n="[";for(let i=0;i<e;++i){const e=t[i];n+=(i>0?",":"")+((0,m.Kn)(e)?e.signal||TV(e):(0,m.m8)(e))}return n+"]"}function AV(t){let e="{",n=0,i,r;for(i in t){r=t[i];e+=(++n>1?",":"")+(0,m.m8)(i)+":"+((0,m.Kn)(r)?r.signal||TV(r):(0,m.m8)(r))}return e+"}"}function NV(){const t="sans-serif",e=30,n=2,i="#4c78a8",r="#000",o="#888",s="#ddd";return{description:"Vega visualization",padding:0,autosize:"pad",background:null,events:{defaults:{allow:["wheel"]}},group:null,mark:null,arc:{fill:i},area:{fill:i},image:null,line:{stroke:i,strokeWidth:n},path:{stroke:i},rect:{fill:i},rule:{stroke:r},shape:{stroke:i},symbol:{fill:i,size:64},text:{fill:r,font:t,fontSize:11},trail:{fill:i,size:n},style:{"guide-label":{fill:r,font:t,fontSize:10},"guide-title":{fill:r,font:t,fontSize:11,fontWeight:"bold"},"group-title":{fill:r,font:t,fontSize:13,fontWeight:"bold"},"group-subtitle":{fill:r,font:t,fontSize:12},point:{size:e,strokeWidth:n,shape:"circle"},circle:{size:e,strokeWidth:n},square:{size:e,strokeWidth:n,shape:"square"},cell:{fill:"transparent",stroke:s}},title:{orient:"top",anchor:"middle",offset:4,subtitlePadding:3},axis:{minExtent:0,maxExtent:200,bandPosition:.5,domain:true,domainWidth:1,domainColor:o,grid:false,gridWidth:1,gridColor:s,labels:true,labelAngle:0,labelLimit:180,labelOffset:0,labelPadding:2,ticks:true,tickColor:o,tickOffset:0,tickRound:true,tickSize:5,tickWidth:1,titlePadding:4},axisBand:{tickOffset:-.5},projection:{type:"mercator"},legend:{orient:"right",padding:0,gridAlign:"each",columnPadding:10,rowPadding:2,symbolDirection:"vertical",gradientDirection:"vertical",gradientLength:200,gradientThickness:16,gradientStrokeColor:s,gradientStrokeWidth:0,gradientLabelOffset:2,labelAlign:"left",labelBaseline:"middle",labelLimit:160,labelOffset:4,labelOverlap:true,symbolLimit:30,symbolType:"circle",symbolSize:100,symbolOffset:0,symbolStrokeWidth:1.5,symbolBaseFillColor:"transparent",symbolBaseStrokeColor:o,titleLimit:180,titleOrient:"top",titlePadding:5,layout:{offset:18,direction:"horizontal",left:{direction:"vertical"},right:{direction:"vertical"}}},range:{category:{scheme:"tableau10"},ordinal:{scheme:"blues"},heatmap:{scheme:"yellowgreenblue"},ramp:{scheme:"blues"},diverging:{scheme:"blueorange",extent:[1,0]},symbol:["circle","square","triangle-up","cross","diamond","triangle-right","triangle-down","triangle-left"]}}}function zV(t,e,n){if(!(0,m.Kn)(t)){(0,m.vU)("Input Vega specification must be an object.")}e=(0,m.fE)(NV(),e,t.config);return wV(t,new SV(e,n)).toRuntime()}var RV="5.22.1";(0,m.l7)(Os,i,o,s,a,l,c,u,f,h,d,p)}}]);
|
2
|
-
//# sourceMappingURL=6269.3431fb9d9d780c0af4e9.js.map?v=3431fb9d9d780c0af4e9
|