summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/jetpack/_inc/blocks/vendors~map')
-rw-r--r--plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.css1
-rw-r--r--plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.js1
-rw-r--r--plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.rtl.css1
-rw-r--r--plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.css1
-rw-r--r--plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.js1
-rw-r--r--plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.rtl.css1
6 files changed, 3 insertions, 3 deletions
diff --git a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.css b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.css
new file mode 100644
index 00000000..ff605b61
--- /dev/null
+++ b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.css
@@ -0,0 +1 @@
+.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass{cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;overflow:hidden;background:#fff}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}.mapboxgl-ctrl-group>button{width:30px;height:30px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group>button+button{border-top:1px solid #ddd}.mapboxgl-ctrl>button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl>button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-icon,.mapboxgl-ctrl-icon>.mapboxgl-ctrl-compass-arrow{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mapboxgl-ctrl-icon{padding:5px}.mapboxgl-ctrl-icon.mapboxgl-ctrl-icon-disabled{opacity:.25;border-color:#373737}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 9c-.554 0-1 .446-1 1s.446 1 1 1h6c.554 0 1-.446 1-1s-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 6c-.554 0-1 .446-1 1v2H7c-.554 0-1 .446-1 1s.446 1 1 1h2v2c0 .554.446 1 1 1s1-.446 1-1v-2h2c.554 0 1-.446 1-1s-.446-1-1-1h-2V7c0-.554-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate:disabled{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 010-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 010-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting{animation:mapboxgl-spin 2s linear infinite}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.mapboxgl-ctrl-icon.mapboxgl-ctrl-fullscreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 4c-.5 0-1 .5-1 1v4h.5l1.277-1.703c1 .763 2.059 1.66 3.114 2.703a30.38 30.38 0 01-3.11 2.707L4.5 11H4v4c0 .5.5 1 1 1h4v-.5l-1.727-1.295a35.498 35.498 0 012.688-3.137 30.312 30.312 0 012.746 3.15L11 15.5v.5h4c.5 0 1-.5 1-1v-4h-.5l-1.295 1.727a35.513 35.513 0 01-3.168-2.717 47.787 47.787 0 013.192-2.705L15.5 9h.5V5c0-.5-.5-1-1-1h-4v.5l1.703 1.277A32.243 32.243 0 019.971 8.92 47.761 47.761 0 017.305 5.77L9 4.5V4H5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-shrink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.242 3.492a.75.75 0 00-.523 1.29l2.246 2.245L4 8.5V9h4c.5 0 1-.5 1-1V4h-.5L7.018 5.955 4.78 3.72a.75.75 0 00-.539-.227zm11.492 0a.75.75 0 00-.515.227l-2.235 2.234L11.5 4H11v4c0 .5.5 1 1 1h4v-.5l-1.965-1.473 2.246-2.246a.75.75 0 00-.547-1.289zM4 11v.5l1.965 1.473-2.246 2.246A.751.751 0 104.78 16.28l2.246-2.246L8.5 16H9v-4c0-.5-.5-1-1-1H4zm8 0c-.5 0-1 .5-1 1v4h.5l1.473-1.965 2.246 2.246a.751.751 0 101.062-1.062l-2.246-2.246L16 11.5V11h-4z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass>.mapboxgl-ctrl-compass-arrow{width:20px;height:20px;margin:5px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' d='M6 9l4-8 4 8z'/%3E%3Cpath fill='%23CCC' d='M6 11l4 8 4-8z'/%3E%3C/svg%3E");background-repeat:no-repeat;display:inline-block}a.mapboxgl-ctrl-logo{width:85px;height:21px;margin:0 0 -3px -3px;display:block;background-repeat:no-repeat;cursor:pointer;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84.49 21'%3E%3Cpath class='st0' d='M83.25 14.26c0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 01-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.4-2.35a.34.34 0 01.3-.17H83c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.63 2.43 3.67c0 .05.01.09.01.13zM66.24 9.59c-.39-1.88-1.96-3.28-3.84-3.28-1.03 0-2.03.42-2.73 1.18V3.51c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23v-.73c.71.75 1.7 1.18 2.73 1.18 1.88 0 3.45-1.41 3.84-3.29.13-.6.13-1.21 0-1.8zM62.08 13c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51S63.41 13 62.08 13zM71.67 6.32a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19s-1.9-4.17-4.27-4.17zm-.02 6.69c-1.33 0-2.42-1.12-2.42-2.51s1.08-2.52 2.42-2.52c1.33 0 2.42 1.12 2.42 2.51s-1.08 2.51-2.42 2.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M62.08 7.98c-1.32 0-2.39 1.11-2.41 2.48v.06c.01 1.38 1.08 2.48 2.41 2.48s2.42-1.12 2.42-2.51-1.09-2.51-2.42-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.57 1.17 1.27-.01.71-.52 1.27-1.17 1.27zM71.65 7.98c-1.33 0-2.42 1.12-2.42 2.51S70.32 13 71.65 13s2.42-1.12 2.42-2.51-1.08-2.51-2.42-2.51zm0 3.78c-.64 0-1.17-.57-1.17-1.27 0-.7.53-1.26 1.17-1.26s1.17.57 1.17 1.27c0 .71-.53 1.26-1.17 1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M45.74 6.53h-1.4c-.13 0-.23.11-.23.23v.73c-.71-.75-1.7-1.18-2.73-1.18-2.17 0-3.94 1.87-3.94 4.19s1.77 4.19 3.94 4.19c1.04 0 2.03-.43 2.73-1.19v.73c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23V6.74c0-.12-.09-.22-.22-.22 0 .01 0 .01-.01.01zm-1.62 4C44.11 11.9 43.03 13 41.71 13s-2.42-1.12-2.42-2.51 1.08-2.52 2.4-2.52c1.33 0 2.39 1.11 2.41 2.48l.02.08z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M41.71 7.98c-1.33 0-2.42 1.12-2.42 2.51S40.37 13 41.71 13s2.39-1.11 2.41-2.48v-.06c-.02-1.37-1.09-2.48-2.41-2.48zm-1.16 2.51c0-.7.52-1.27 1.17-1.27.64 0 1.14.56 1.17 1.25v.04c-.01.68-.53 1.24-1.17 1.24-.64 0-1.17-.56-1.17-1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M52.41 6.32c-1.03 0-2.03.42-2.73 1.18v-.75c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.1.23-.23V13.5c.71.75 1.7 1.18 2.74 1.18 2.17 0 3.94-1.87 3.94-4.19s-1.78-4.17-3.95-4.17zm-.33 6.69c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51S53.4 13 52.08 13.01z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M52.08 7.98c-1.32 0-2.39 1.11-2.42 2.48v.06c.03 1.38 1.1 2.48 2.42 2.48s2.41-1.12 2.41-2.51-1.09-2.51-2.41-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.58 1.17 1.27s-.53 1.27-1.17 1.27z' opacity='.35'/%3E%3Cpath class='st0' d='M36.08 14.24c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.17z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M84.34 13.59l-.07-.13-1.96-2.99 1.94-2.95c.44-.67.26-1.56-.41-2.02-.02 0-.03 0-.04-.01-.23-.15-.5-.22-.78-.22h-1.61c-.56 0-1.08.29-1.37.78l-.32.55-.34-.56c-.29-.48-.81-.77-1.38-.77h-1.6c-.6 0-1.13.37-1.35.92a5.59 5.59 0 00-7.26.45c-.35.34-.65.72-.89 1.14-.9-1.62-2.58-2.72-4.5-2.72-.5 0-1.01.07-1.48.23V3.51c0-.82-.66-1.48-1.47-1.48h-1.4c-.81 0-1.47.66-1.47 1.47v3.75a5.12 5.12 0 00-4.17-2.19c-.74 0-1.46.16-2.12.47-.24-.17-.54-.26-.84-.26h-1.4c-.45 0-.87.21-1.15.56a1.498 1.498 0 00-1.16-.55h-1.39c-.3 0-.6.09-.84.26-.67-.3-1.39-.46-2.12-.46-1.83 0-3.43 1-4.37 2.5-.2-.46-.48-.89-.83-1.25-.8-.81-1.89-1.25-3.02-1.25h-.01c-.89.01-1.75.33-2.46.88-.74-.57-1.64-.88-2.57-.88h-.03c-.29 0-.58.03-.86.11-.28.06-.56.16-.82.28-.21-.12-.45-.18-.7-.18h-1.4c-.82 0-1.47.66-1.47 1.47v7.5c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.48-.66 1.48-1.48V9.79c.03-.36.23-.59.36-.59.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47l-.01-4.57c.06-.32.25-.47.35-.47.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47v-.38a5.068 5.068 0 004.06 2.06c.74 0 1.46-.16 2.12-.47.24.17.54.26.84.26h1.39c.3 0 .6-.09.84-.26v2.01c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.47-.66 1.47-1.47v-1.77c.48.15.99.23 1.49.22 1.7 0 3.22-.87 4.17-2.2v.52c0 .82.66 1.47 1.47 1.47h1.4c.3 0 .6-.09.84-.26.66.31 1.39.47 2.12.47 1.92 0 3.6-1.1 4.49-2.73 1.54 2.65 4.95 3.53 7.58 1.98.18-.11.36-.22.53-.36.22.55.76.91 1.35.9H78c.56 0 1.08-.29 1.37-.78l.37-.61.37.61c.29.48.81.78 1.38.78h1.6c.81 0 1.46-.66 1.45-1.46-.05-.22-.1-.44-.2-.65zm-48.48.88h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74a.23.23 0 01.23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.01 5.16c.02.13-.09.23-.21.24zm10.11-.23c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23v-.74c-.7.76-1.69 1.18-2.72 1.18-2.17 0-3.94-1.87-3.94-4.19s1.77-4.19 3.94-4.19c1.03 0 2.02.43 2.73 1.18v-.74c0-.13.1-.23.23-.23h1.4c.12-.01.22.08.23.21V14.25h-.01v-.01zm6.44.43c-1.03 0-2.02-.43-2.73-1.18v3.97c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V6.75c0-.13.1-.22.23-.22h1.4c.13 0 .23.11.23.23v.73a3.73 3.73 0 012.73-1.18c2.17 0 3.94 1.86 3.94 4.18s-1.77 4.18-3.94 4.18zm13.83-3.28c-.39 1.87-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.73c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V3.51c0-.13.1-.23.23-.23h1.4c.13 0 .23.11.23.23v3.97a3.72 3.72 0 012.73-1.17c1.88 0 3.45 1.4 3.84 3.28.13.6.13 1.21 0 1.8zm5.43 3.29c-2 .01-3.73-1.35-4.17-3.3-.13-.59-.13-1.19 0-1.77a4.243 4.243 0 014.17-3.3c2.36 0 4.26 1.87 4.26 4.19s-1.9 4.18-4.26 4.18zm11.37-.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 01-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.41-2.36a.34.34 0 01.3-.17h1.61c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.38 3.64 2.43 3.67c.02.03.03.07.03.12-.03.13-.12.22-.24.22z' opacity='.35'/%3E%3Cpath class='st0' d='M10.5 1.24c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M10.5-.01C4.7-.01 0 4.7 0 10.49s4.7 10.5 10.5 10.5S21 16.29 21 10.49C20.99 4.7 16.3-.01 10.5-.01zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' opacity='.35'/%3E%3Cpath class='st1' d='M14.74 6.25c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M14.33 9.43l-1.86.91-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87z'/%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:21px;height:21px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath d='M10.5 1.25c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' class='st0' opacity='.9' fill='%23fff'/%3E%3Cpath d='M10.5 0C4.7 0 0 4.71 0 10.5S4.7 21 10.5 21 21 16.3 21 10.5C20.99 4.71 16.3 0 10.5 0zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' class='st1' opacity='.35'/%3E%3Cpath d='M14.74 6.26c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9z' class='st1' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M11.56 12.22l-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z'/%3E%3C/svg%3E")}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:0;margin:10px;position:relative;background-color:#fff;border-radius:3px 12px 12px 3px}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 24px 2px 4px;visibility:visible;margin-top:6px}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 4px 2px 24px;border-radius:12px 3px 3px 12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact:after{content:"";cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' fill-rule='evenodd' d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot{box-shadow:0 0 2px rgba(0,0,0,.25)}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box}@keyframes mapboxgl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}} \ No newline at end of file
diff --git a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.js b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.js
new file mode 100644
index 00000000..16d18787
--- /dev/null
+++ b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.js
@@ -0,0 +1 @@
+(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{282:function(t,e,r){t.exports=function(){"use strict";var t,e,r;function i(i,n){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),(r=n(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else e=n;else t=n}return i(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=i;function i(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var r,i,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var n=o;function o(t,e){this.x=t,this.y=e}function a(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!a(t[r],e[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var i in t)if(!a(t[i],e[i]))return!1;return!0}return t===e}function s(t,e,i,n){var o=new r(t,e,i,n);return function(t){return o.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var u=s(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function p(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function c(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}var h=1;function f(){return h++}function d(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function y(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function v(t,e){return-1!==t.indexOf(e,t.length-e.length)}function _(t,e,r){var i={};for(var n in t)i[n]=e.call(r||this,t[n],n,t);return i}function g(t,e,r){var i={};for(var n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?_(t,x):t}var b={};function w(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function E(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function S(t){for(var e=0,r=0,i=t.length,n=i-1,o=void 0,a=void 0;r<i;n=r++)o=t[r],e+=((a=t[n]).x-o.x)*(o.y+a.y);return e}function T(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var A,I,z,k=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),C=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,P=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,M={now:k,frame:function(t){var e=C(t);return{cancel:function(){return P(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){return A||(A=self.document.createElement("a")),A.href=t,A.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio}},L={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},D={supported:!1,testSupport:function(t){!B&&z&&(R?F(t):I=t)}},B=!1,R=!1;function F(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,z),t.isContextLost())return;D.supported=!0}catch(t){}t.deleteTexture(e),B=!0}self.document&&((z=self.document.createElement("img")).onload=function(){I&&F(I),I=null,R=!0},z.onerror=function(){B=!0,I=null},z.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var O="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes";function U(t,e){var r=W(L.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!L.REQUIRE_ACCESS_TOKEN)return K(t);if(!(e=e||L.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+O);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+O);return t.params.push("access_token="+e),K(t)}function V(t){return 0===t.indexOf("mapbox:")}var N=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function j(t){return N.test(t)}var q=/(\.(png|jpg)\d*)(?=$)/,Z=/\.[\w]+$/,G=function(t){var e=W(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match(Z))return t;var r="mapbox://tiles/";r+=e.path.replace("/v4/","");var i=e.params.filter((function(t){return!t.match(/^access_token=/)}));return i.length&&(r+="?"+i.join("&")),r},X=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/;function W(t){var e=t.match(X);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function K(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function H(t){if(!t)return null;var e,r=t.split(".");if(!r||3!==r.length)return null;try{return JSON.parse((e=r[1],decodeURIComponent(self.atob(e).split("").map((function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)})).join(""))))}catch(t){return null}}var J=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};J.prototype.getStorageKey=function(t){var e,r=H(L.ACCESS_TOKEN),i="";return r&&r.u?(e=r.u,i=self.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(t,e){return String.fromCharCode(Number("0x"+e))})))):i=L.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+i:"mapbox.eventData:"+i},J.prototype.fetchEventData=function(){var t=T("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var i=self.localStorage.getItem(e);i&&(this.eventData=JSON.parse(i));var n=self.localStorage.getItem(r);n&&(this.anonId=n)}catch(t){w("Unable to read from LocalStorage")}},J.prototype.saveEventData=function(){var t=T("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{self.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},J.prototype.processRequests=function(){},J.prototype.postEvent=function(t,e,r){var i=this;if(L.EVENTS_URL){var n=W(L.EVENTS_URL);n.params.push("access_token="+(L.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"0.54.1",userId:this.anonId},a=e?c(o,e):o,s={url:K(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=pt(s,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests()}))}},J.prototype.queueRequest=function(t){this.queue.push(t),this.processRequests()};var Y=function(t){function e(){t.call(this,"map.load"),this.success={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e){L.EVENTS_URL&&L.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return V(t)||j(t)}))&&this.queueRequest({id:e,timestamp:Date.now()})},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var e=this.queue.shift(),r=e.id,i=e.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=d()),this.postEvent(i,{},(function(e){e||r&&(t.success[r]=!0)})))}},e}(J),$=new(function(t){function e(){t.call(this,"appUserTurnstile")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t){L.EVENTS_URL&&L.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return V(t)||j(t)}))&&this.queueRequest(Date.now())},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var e=H(L.ACCESS_TOKEN),r=e?e.u:L.ACCESS_TOKEN,i=r!==this.eventData.tokenU;m(this.anonId)||(this.anonId=d(),i=!0);var n=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),a=new Date(n),s=(n-this.eventData.lastSuccess)/864e5;i=i||s>=1||s<-1||o.getDate()!==a.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(n,{"enabled.telemetry":!1},(function(e){e||(t.eventData.lastSuccess=n,t.eventData.tokenU=r)}))}},e}(J)),Q=$.postTurnstileEvent.bind($),tt=new Y,et=tt.postMapLoadEvent.bind(tt),rt={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(rt);var it=function(t){function e(e,r,i){401===r&&j(i)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=i,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error);function nt(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var ot,at,st=nt()?function(){return self.worker&&self.worker.referrer}:function(){var t=self.location.origin;if(t&&"null"!==t&&"file://"!==t)return t+self.location.pathname},ut=function(t,e){if(!/^file:/.test(t.url)){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return function(t,e){var r=new self.AbortController,i=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:st(),signal:r.signal});return"json"===t.type&&i.headers.set("Accept","application/json"),self.fetch(i).then((function(r){r.ok?r[t.type||"text"]().then((function(t){e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires"))})).catch((function(t){return e(new Error(t.message))})):e(new it(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))})),{cancel:function(){return r.abort()}}}(t,e);if(nt()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}return function(t,e){var r=new self.XMLHttpRequest;for(var i in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(i,t.headers[i]);return"json"===t.type&&r.setRequestHeader("Accept","application/json"),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var i=r.response;if("json"===t.type)try{i=JSON.parse(r.response)}catch(t){return e(t)}e(null,i,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new it(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},lt=function(t,e){return ut(c(t,{type:"arrayBuffer"}),e)},pt=function(t,e){return ut(c(t,{method:"POST"}),e)};ot=[],at=0;var ct=function(t,e){if(at>=L.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return ot.push(r),r}at++;var i=!1,n=function(){if(!i)for(i=!0,at--;ot.length&&at<L.MAX_PARALLEL_IMAGE_REQUESTS;){var t=ot.shift(),e=t.requestParameters,r=t.callback;t.cancelled||(t.cancel=ct(e,r).cancel)}},o=lt(t,(function(t,r,i,o){if(n(),t)e(t);else if(r){var a=new self.Image,s=self.URL||self.webkitURL;a.onload=function(){e(null,a),s.revokeObjectURL(a.src)},a.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var u=new self.Blob([new Uint8Array(r)],{type:"image/png"});a.cacheControl=i,a.expires=o,a.src=r.byteLength?s.createObjectURL(u):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}}));return{cancel:function(){o.cancel(),n()}}};function ht(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function ft(t,e,r){if(r&&r[t]){var i=r[t].indexOf(e);-1!==i&&r[t].splice(i,1)}}var dt=function(t,e){void 0===e&&(e={}),c(this,e),this.type=t},mt=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,"error",c({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(dt),yt=function(){};yt.prototype.on=function(t,e){return this._listeners=this._listeners||{},ht(t,e,this._listeners),this},yt.prototype.off=function(t,e){return ft(t,e,this._listeners),ft(t,e,this._oneTimeListeners),this},yt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},ht(t,e,this._oneTimeListeners),this},yt.prototype.fire=function(t,e){"string"==typeof t&&(t=new dt(t,e||{}));var r=t.type;if(this.listens(r)){t.target=this;for(var i=0,n=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];i<n.length;i+=1)n[i].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];o<a.length;o+=1){var s=a[o];ft(r,s,this._oneTimeListeners),s.call(this,t)}var u=this._eventedParent;u&&(c(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),u.fire(t))}else t instanceof mt&&console.error(t.error);return this},yt.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},yt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var vt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:[{"!":"text-offset"}],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:[{"!":"text-anchor"},{"!":"text-offset"},{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",requires:["text-field"],values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},_t=function(t,e,r,i){this.message=(t?t+": ":"")+r,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function gt(t){var e=t.key,r=t.value;return r?[new _t(e,r,"constants have been deprecated as of v8")]:[]}function xt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}function bt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function wt(t){return Array.isArray(t)?t.map(wt):bt(t)}var Et=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),St=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,i=e;r<i.length;r+=1){var n=i[r],o=n[0],a=n[1];this.bindings[o]=a}};St.prototype.concat=function(t){return new St(this,t)},St.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},St.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Tt={kind:"null"},At={kind:"number"},It={kind:"string"},zt={kind:"boolean"},kt={kind:"color"},Ct={kind:"object"},Pt={kind:"value"},Mt={kind:"collator"},Lt={kind:"formatted"};function Dt(t,e){return{kind:"array",itemType:t,N:e}}function Bt(t){if("array"===t.kind){var e=Bt(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Rt=[Tt,At,It,zt,kt,Lt,Ct,Dt(Pt)];function Ft(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Ft(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,i=Rt;r<i.length;r+=1)if(!Ft(i[r],e))return null}return"Expected "+Bt(t)+" but found "+Bt(e)+" instead."}var Ot=e((function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100*255):i(parseInt(t))}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100):n(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in r)return r[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=n.indexOf("("),l=n.indexOf(")");if(-1!==u&&l+1===n.length){var p=n.substr(0,u),c=n.substr(u+1,l-(u+1)).split(","),h=1;switch(p){case"rgba":if(4!==c.length)return null;h=a(c.pop());case"rgb":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),h];case"hsla":if(4!==c.length)return null;h=a(c.pop());case"hsl":if(3!==c.length)return null;var f=(parseFloat(c[0])%360+360)%360/360,d=a(c[1]),m=a(c[2]),y=m<=.5?m*(d+1):m+d-m*d,v=2*m-y;return[i(255*s(v,y,f+1/3)),i(255*s(v,y,f)),i(255*s(v,y,f-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,Ut=function(t,e,r,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=r,this.a=i};Ut.parse=function(t){if(t){if(t instanceof Ut)return t;if("string"==typeof t){var e=Ot(t);if(e)return new Ut(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Ut.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],i=t[2],n=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(i)+","+n+")"},Ut.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,i=this.a;return 0===i?[0,0,0,0]:[255*t/i,255*e/i,255*r/i,i]},Ut.black=new Ut(0,0,0,1),Ut.white=new Ut(1,1,1,1),Ut.transparent=new Ut(0,0,0,0),Ut.red=new Ut(1,0,0,1);var Vt=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Vt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Vt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Nt=function(t,e,r){this.text=t,this.scale=e,this.fontStack=r},jt=function(t){this.sections=t};function qt(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,r,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function Zt(t){if(null===t)return Tt;if("string"==typeof t)return It;if("boolean"==typeof t)return zt;if("number"==typeof t)return At;if(t instanceof Ut)return kt;if(t instanceof Vt)return Mt;if(t instanceof jt)return Lt;if(Array.isArray(t)){for(var e,r=t.length,i=0,n=t;i<n.length;i+=1){var o=Zt(n[i]);if(e){if(e===o)continue;e=Pt;break}e=o}return Dt(e||Pt,r)}return Ct}function Gt(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Ut||t instanceof jt?t.toString():JSON.stringify(t)}jt.fromString=function(t){return new jt([new Nt(t,null,null)])},jt.prototype.toString=function(){return this.sections.map((function(t){return t.text})).join("")},jt.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t.push(i.text);var n={};i.fontStack&&(n["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(n["font-scale"]=i.scale),t.push(n)}return t};var Xt=function(t,e){this.type=t,this.value=e};Xt.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Ut)return!0;if(e instanceof Vt)return!0;if(e instanceof jt)return!0;if(Array.isArray(e)){for(var r=0,i=e;r<i.length;r+=1)if(!t(i[r]))return!1;return!0}if("object"==typeof e){for(var n in e)if(!t(e[n]))return!1;return!0}return!1}(t[1]))return e.error("invalid value");var r=t[1],i=Zt(r),n=e.expectedType;return"array"!==i.kind||0!==i.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(i=n),new Xt(i,r)},Xt.prototype.evaluate=function(){return this.value},Xt.prototype.eachChild=function(){},Xt.prototype.possibleOutputs=function(){return[this.value]},Xt.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Ut?["rgba"].concat(this.value.toArray()):this.value instanceof jt?this.value.serialize():this.value};var Wt=function(t){this.name="ExpressionEvaluationError",this.message=t};Wt.prototype.toJSON=function(){return this.message};var Kt={string:It,number:At,boolean:zt,object:Ct},Ht=function(t,e){this.type=t,this.args=e};Ht.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,i=1,n=t[0];if("array"===n){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in Kt)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=Kt[s],i++}else o=Pt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],i++}r=Dt(o,a)}else r=Kt[n];for(var u=[];i<t.length;i++){var l=e.parse(t[i],i,Pt);if(!l)return null;u.push(l)}return new Ht(r,u)},Ht.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Ft(this.type,Zt(r)))return r;if(e===this.args.length-1)throw new Wt("Expected value to be of type "+Bt(this.type)+", but found "+Bt(Zt(r))+" instead.")}return null},Ht.prototype.eachChild=function(t){this.args.forEach(t)},Ht.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})))},Ht.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var i=t.N;("number"==typeof i||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var Jt=function(t){this.type=Lt,this.sections=t};Jt.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var r=[],i=1;i<t.length-1;i+=2){var n=e.parse(t[i],1,Pt);if(!n)return null;var o=n.type.kind;if("string"!==o&&"value"!==o&&"null"!==o)return e.error("Formatted text type must be 'string', 'value', or 'null'.");var a=t[i+1];if("object"!=typeof a||Array.isArray(a))return e.error("Format options argument must be an object.");var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,At)))return null;var u=null;if(a["text-font"]&&!(u=e.parse(a["text-font"],1,Dt(It))))return null;r.push({text:n,scale:s,font:u})}return new Jt(r)},Jt.prototype.evaluate=function(t){return new jt(this.sections.map((function(e){return new Nt(Gt(e.text.evaluate(t)),e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null)})))},Jt.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t(i.text),i.scale&&t(i.scale),i.font&&t(i.font)}},Jt.prototype.possibleOutputs=function(){return[void 0]},Jt.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t.push(i.text.serialize());var n={};i.scale&&(n["font-scale"]=i.scale.serialize()),i.font&&(n["text-font"]=i.font.serialize()),t.push(n)}return t};var Yt={"to-boolean":zt,"to-color":kt,"to-number":At,"to-string":It},$t=function(t,e){this.type=t,this.args=e};$t.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var i=Yt[r],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Pt);if(!a)return null;n.push(a)}return new $t(i,n)},$t.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,i=0,n=this.args;i<n.length;i+=1){if(r=null,(e=n[i].evaluate(t))instanceof Ut)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":qt(e[0],e[1],e[2],e[3])))return new Ut(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Wt(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,u=this.args;s<u.length;s+=1){if(null===(a=u[s].evaluate(t)))return 0;var l=Number(a);if(!isNaN(l))return l}throw new Wt("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?jt.fromString(Gt(this.args[0].evaluate(t))):Gt(this.args[0].evaluate(t))},$t.prototype.eachChild=function(t){this.args.forEach(t)},$t.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})))},$t.prototype.serialize=function(){if("formatted"===this.type.kind)return new Jt([{text:this.args[0],scale:null,font:null}]).serialize();var t=["to-"+this.type.kind];return this.eachChild((function(e){t.push(e.serialize())})),t};var Qt=["Unknown","Point","LineString","Polygon"],te=function(){this.globals=null,this.feature=null,this.featureState=null,this._parseColorCache={}};te.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},te.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Qt[this.feature.type]:this.feature.type:null},te.prototype.properties=function(){return this.feature&&this.feature.properties||{}},te.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Ut.parse(t)),e};var ee=function(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i};ee.prototype.evaluate=function(t){return this._evaluate(t,this.args)},ee.prototype.eachChild=function(t){this.args.forEach(t)},ee.prototype.possibleOutputs=function(){return[void 0]},ee.prototype.serialize=function(){return[this.name].concat(this.args.map((function(t){return t.serialize()})))},ee.parse=function(t,e){var r,i=t[0],n=ee.definitions[i];if(!n)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=a.filter((function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1})),u=null,l=0,p=s;l<p.length;l+=1){var c=p[l],h=c[0],f=c[1];u=new se(e.registry,e.path,null,e.scope);for(var d=[],m=!1,y=1;y<t.length;y++){var v=t[y],_=Array.isArray(h)?h[y-1]:h.type,g=u.parse(v,1+d.length,_);if(!g){m=!0;break}d.push(g)}if(!m)if(Array.isArray(h)&&h.length!==d.length)u.error("Expected "+h.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=d[x];u.concat(x+1).checkSubtype(b,w.type)}if(0===u.errors.length)return new ee(i,o,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,u.errors);else{for(var E=(s.length?s:a).map((function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Bt).join(", ")+")":"("+Bt(e.type)+"...)"})).join(" | "),S=[],T=1;T<t.length;T++){var A=e.parse(t[T],1+S.length);if(!A)return null;S.push(Bt(A.type))}e.error("Expected arguments of type "+E+", but found ("+S.join(", ")+") instead.")}return null},ee.register=function(t,e){for(var r in ee.definitions=e,e)t[r]=ee};var re=function(t,e,r){this.type=Mt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function ie(t){if(t instanceof ee){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild((function(t){e&&!ie(t)&&(e=!1)})),e}function ne(t){if(t instanceof ee&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild((function(t){e&&!ne(t)&&(e=!1)})),e}function oe(t,e){if(t instanceof ee&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild((function(t){r&&!oe(t,e)&&(r=!1)})),r}re.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,zt);if(!i)return null;var n=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,zt);if(!n)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,It))?null:new re(i,n,o)},re.prototype.evaluate=function(t){return new Vt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},re.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},re.prototype.possibleOutputs=function(){return[void 0]},re.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var ae=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};ae.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new ae(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},ae.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},ae.prototype.eachChild=function(){},ae.prototype.possibleOutputs=function(){return[void 0]},ae.prototype.serialize=function(){return["var",this.name]};var se=function(t,e,r,i,n){void 0===e&&(e=[]),void 0===i&&(i=new St),void 0===n&&(n=[]),this.registry=t,this.path=e,this.key=e.map((function(t){return"["+t+"]"})).join(""),this.scope=i,this.errors=n,this.expectedType=r};function ue(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(r=t[a=Math.floor((n+o)/2)],i=t[a+1],e===r||e>r&&e<i)return a;if(r<e)n=a+1;else{if(!(r>e))throw new Wt("Input is not a number.");o=a-1}}return Math.max(a-1,0)}se.prototype.parse=function(t,e,r,i,n){return void 0===n&&(n={}),e?this.concat(e,r,i)._parse(t,n):this._parse(t,n)},se.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new Ht(e,[t]):"coerce"===r?new $t(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=t[0];if("string"!=typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var n=this.registry[i];if(n){var o=n.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof Xt)&&function t(e){if(e instanceof ae)return t(e.boundExpression);if(e instanceof ee&&"error"===e.name)return!1;if(e instanceof re)return!1;var r=e instanceof $t||e instanceof Ht,i=!0;return e.eachChild((function(e){i=r?i&&t(e):i&&e instanceof Xt})),!!i&&ie(e)&&oe(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var u=new te;try{o=new Xt(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},se.prototype.concat=function(t,e,r){var i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new se(this.registry,i,e||null,n,this.errors)},se.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var i=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Et(i,t))},se.prototype.checkSubtype=function(t,e){var r=Ft(t,e);return r&&this.error(r),r};var le=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,n=r;i<n.length;i+=1){var o=n[i],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};function pe(t,e,r){return t*(1-r)+e*r}le.parse=function(t,e){var r=t[1],i=t.slice(2);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(r=e.parse(r,1,At)))return null;var n=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType),i.unshift(-1/0);for(var a=0;a<i.length;a+=2){var s=i[a],u=i[a+1],l=a+1,p=a+2;if("number"!=typeof s)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(u,p,o);if(!c)return null;o=o||c.type,n.push([s,c])}return new le(o,r,n)},le.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;return i>=e[n-1]?r[n-1].evaluate(t):r[ue(e,i)].evaluate(t)},le.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},le.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()})))},le.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var ce=Object.freeze({number:pe,color:function(t,e,r){return new Ut(pe(t.r,e.r,r),pe(t.g,e.g,r),pe(t.b,e.b,r),pe(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,i){return pe(t,e[i],r)}))}}),he=.95047,fe=1,de=1.08883,me=4/29,ye=6/29,ve=3*ye*ye,_e=ye*ye*ye,ge=Math.PI/180,xe=180/Math.PI;function be(t){return t>_e?Math.pow(t,1/3):t/ve+me}function we(t){return t>ye?t*t*t:ve*(t-me)}function Ee(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Se(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Te(t){var e=Se(t.r),r=Se(t.g),i=Se(t.b),n=be((.4124564*e+.3575761*r+.1804375*i)/he),o=be((.2126729*e+.7151522*r+.072175*i)/fe);return{l:116*o-16,a:500*(n-o),b:200*(o-be((.0193339*e+.119192*r+.9503041*i)/de)),alpha:t.a}}function Ae(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=fe*we(e),r=he*we(r),i=de*we(i),new Ut(Ee(3.2404542*r-1.5371385*e-.4985314*i),Ee(-.969266*r+1.8760108*e+.041556*i),Ee(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}function Ie(t,e,r){var i=e-t;return t+r*(i>180||i<-180?i-360*Math.round(i/360):i)}var ze={forward:Te,reverse:Ae,interpolate:function(t,e,r){return{l:pe(t.l,e.l,r),a:pe(t.a,e.a,r),b:pe(t.b,e.b,r),alpha:pe(t.alpha,e.alpha,r)}}},ke={forward:function(t){var e=Te(t),r=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*xe;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:r,alpha:t.a}},reverse:function(t){var e=t.h*ge,r=t.c;return Ae({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:Ie(t.h,e.h,r),c:pe(t.c,e.c,r),l:pe(t.l,e.l,r),alpha:pe(t.alpha,e.alpha,r)}}},Ce=Object.freeze({lab:ze,hcl:ke}),Pe=function(t,e,r,i,n){this.type=t,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(var o=0,a=n;o<a.length;o+=1){var s=a[o],u=s[0],l=s[1];this.labels.push(u),this.outputs.push(l)}};function Me(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}Pe.interpolationFactor=function(t,e,i,n){var o=0;if("exponential"===t.name)o=Me(e,t.base,i,n);else if("linear"===t.name)o=Me(e,1,i,n);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new r(a[0],a[1],a[2],a[3]).solve(Me(e,1,i,n))}return o},Pe.parse=function(t,e){var r=t[0],i=t[1],n=t[2],o=t.slice(3);if(!Array.isArray(i)||0===i.length)return e.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){var a=i[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:a}}else{if("cubic-bezier"!==i[0])return e.error("Unknown interpolation type "+String(i[0]),1,0);var s=i.slice(1);if(4!==s.length||s.some((function(t){return"number"!=typeof t||t<0||t>1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,2,At)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=kt:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var p=0;p<o.length;p+=2){var c=o[p],h=o[p+1],f=p+3,d=p+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(u.length&&u[u.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,l);if(!m)return null;l=l||m.type,u.push([c,m])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new Pe(l,r,i,n,u):e.error("Type "+Bt(l)+" is not interpolatable.")},Pe.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);var o=ue(e,i),a=e[o],s=e[o+1],u=Pe.interpolationFactor(this.interpolation,i,a,s),l=r[o].evaluate(t),p=r[o+1].evaluate(t);return"interpolate"===this.operator?ce[this.type.kind.toLowerCase()](l,p,u):"interpolate-hcl"===this.operator?ke.reverse(ke.interpolate(ke.forward(l),ke.forward(p),u)):ze.reverse(ze.interpolate(ze.forward(l),ze.forward(p),u))},Pe.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},Pe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()})))},Pe.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var Le=function(t,e){this.type=t,this.args=e};Le.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);for(var n=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],u=e.parse(s,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!u)return null;r=r||u.type,n.push(u)}var l=i&&n.some((function(t){return Ft(i,t.type)}));return new Le(l?Pt:r,n)},Le.prototype.evaluate=function(t){for(var e=null,r=0,i=this.args;r<i.length&&null===(e=i[r].evaluate(t));r+=1);return e},Le.prototype.eachChild=function(t){this.args.forEach(t)},Le.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map((function(t){return t.possibleOutputs()})))},Le.prototype.serialize=function(){var t=["coalesce"];return this.eachChild((function(e){t.push(e.serialize())})),t};var De=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};De.prototype.evaluate=function(t){return this.result.evaluate(t)},De.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},De.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],i=1;i<t.length-1;i+=2){var n=t[i];if("string"!=typeof n)return e.error("Expected string, but found "+typeof n+" instead.",i);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var o=e.parse(t[i+1],i+1);if(!o)return null;r.push([n,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new De(r,a):null},De.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},De.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t.push(n,o.serialize())}return t.push(this.result.serialize()),t};var Be=function(t,e,r){this.type=t,this.index=e,this.input=r};Be.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,At),i=e.parse(t[2],2,Dt(e.expectedType||Pt));if(!r||!i)return null;var n=i.type;return new Be(n.itemType,r,i)},Be.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new Wt("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new Wt("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new Wt("Array index must be an integer, but found "+e+" instead.");return r[e]},Be.prototype.eachChild=function(t){t(this.index),t(this.input)},Be.prototype.possibleOutputs=function(){return[void 0]},Be.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Re=function(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o};Re.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var n={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];Array.isArray(s)||(s=[s]);var l=e.concat(a);if(0===s.length)return l.error("Expected at least one branch label.");for(var p=0,c=s;p<c.length;p+=1){var h=c[p];if("number"!=typeof h&&"string"!=typeof h)return l.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,Zt(h)))return null}else r=Zt(h);if(void 0!==n[String(h)])return l.error("Branch labels must be unique.");n[String(h)]=o.length}var f=e.parse(u,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,Pt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,i);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new Re(r,i,d,n,o,m):null},Re.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(Zt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Re.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Re.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map((function(t){return t.possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Re.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],i={},n=0,o=Object.keys(this.cases).sort();n<o.length;n+=1){var a=o[n];void 0===(c=i[this.cases[a]])?(i[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[c][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,l=r;u<l.length;u+=1){var p=l[u],c=p[0],h=p[1];1===h.length?e.push(s(h[0])):e.push(h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Fe=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function Oe(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Ue(t,e,r,i){return 0===i.compare(e,r)}function Ve(t,e,r){var i="=="!==t&&"!="!==t;return function(){function n(t,e,r){this.type=zt,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,Pt);if(!o)return null;if(!Oe(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Bt(o.type)+"'.");var a=e.parse(t[2],2,Pt);if(!a)return null;if(!Oe(r,a.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Bt(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+Bt(o.type)+"' and '"+Bt(a.type)+"'.");i&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Ht(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Ht(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Mt)))return null}return new n(o,a,s)},n.prototype.evaluate=function(n){var o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){var s=Zt(o),u=Zt(a);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new Wt('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var l=Zt(o),p=Zt(a);if("string"!==l.kind||"string"!==p.kind)return e(n,o,a)}return this.collator?r(n,o,a,this.collator.evaluate(n)):e(n,o,a)},n.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.possibleOutputs=function(){return[!0,!1]},n.prototype.serialize=function(){var e=[t];return this.eachChild((function(t){e.push(t.serialize())})),e},n}()}Fe.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],n=1;n<t.length-1;n+=2){var o=e.parse(t[n],n,zt);if(!o)return null;var a=e.parse(t[n+1],n+1,r);if(!a)return null;i.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Fe(r,i,s):null},Fe.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];if(n.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},Fe.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t(n),t(o)}t(this.otherwise)},Fe.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.branches.map((function(t){return t[0],t[1].possibleOutputs()}))).concat(this.otherwise.possibleOutputs())},Fe.prototype.serialize=function(){var t=["case"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Ne=Ve("==",(function(t,e,r){return e===r}),Ue),je=Ve("!=",(function(t,e,r){return e!==r}),(function(t,e,r,i){return!Ue(0,e,r,i)})),qe=Ve("<",(function(t,e,r){return e<r}),(function(t,e,r,i){return i.compare(e,r)<0})),Ze=Ve(">",(function(t,e,r){return e>r}),(function(t,e,r,i){return i.compare(e,r)>0})),Ge=Ve("<=",(function(t,e,r){return e<=r}),(function(t,e,r,i){return i.compare(e,r)<=0})),Xe=Ve(">=",(function(t,e,r){return e>=r}),(function(t,e,r,i){return i.compare(e,r)>=0})),We=function(t,e,r,i,n){this.type=It,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=n};We.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,At);if(!r)return null;var i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var n=null;if(i.locale&&!(n=e.parse(i.locale,1,It)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,It)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,At)))return null;var s=null;return i["max-fraction-digits"]&&!(s=e.parse(i["max-fraction-digits"],1,At))?null:new We(r,n,o,a,s)},We.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},We.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},We.prototype.possibleOutputs=function(){return[void 0]},We.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var Ke=function(t){this.type=At,this.input=t};Ke.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Bt(r.type)+" instead."):new Ke(r):null},Ke.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Wt("Expected value to be of type string or array, but found "+Bt(Zt(e))+" instead.")},Ke.prototype.eachChild=function(t){t(this.input)},Ke.prototype.possibleOutputs=function(){return[void 0]},Ke.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var He={"==":Ne,"!=":je,">":Ze,"<":qe,">=":Xe,"<=":Ge,array:Ht,at:Be,boolean:Ht,case:Fe,coalesce:Le,collator:re,format:Jt,interpolate:Pe,"interpolate-hcl":Pe,"interpolate-lab":Pe,length:Ke,let:De,literal:Xt,match:Re,number:Ht,"number-format":We,object:Ht,step:le,string:Ht,"to-boolean":$t,"to-color":$t,"to-number":$t,"to-string":$t,var:ae};function Je(t,e){var r=e[0],i=e[1],n=e[2],o=e[3];r=r.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);var a=o?o.evaluate(t):1,s=qt(r,i,n,a);if(s)throw new Wt(s);return new Ut(r/255*a,i/255*a,n/255*a,a)}function Ye(t,e){return t in e}function $e(t,e){var r=e[t];return void 0===r?null:r}function Qe(t){return{type:t}}function tr(t){return{result:"success",value:t}}function er(t){return{result:"error",value:t}}function rr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function ir(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function nr(t){return!!t.expression&&t.expression.interpolated}function or(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function ar(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function sr(t){return t}function ur(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function lr(t,e,r,i,n){return ur(typeof r===n?i[r]:void 0,t.default,e.default)}function pr(t,e,r){if("number"!==or(r))return ur(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=fr(t.stops,r);return t.stops[n][1]}function cr(t,e,r){var i=void 0!==t.base?t.base:1;if("number"!==or(r))return ur(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var o=fr(t.stops,r),a=function(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}(r,i,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=ce[e.type]||sr;if(t.colorSpace&&"rgb"!==t.colorSpace){var p=Ce[t.colorSpace];l=function(t,e){return p.reverse(p.interpolate(p.forward(t),p.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),i=u.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return l(r,i,a)}}:l(s,u,a)}function hr(t,e,r){return"color"===e.type?r=Ut.parse(r):"formatted"===e.type?r=jt.fromString(r.toString()):or(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),ur(r,t.default,e.default)}function fr(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(r=t[a=Math.floor((n+o)/2)][0],i=t[a+1][0],e===r||e>r&&e<i)return a;r<e?n=a+1:r>e&&(o=a-1)}return Math.max(a-1,0)}ee.register(He,{error:[{kind:"error"},[It],function(t,e){var r=e[0];throw new Wt(r.evaluate(t))}],typeof:[It,[Pt],function(t,e){return Bt(Zt(e[0].evaluate(t)))}],"to-rgba":[Dt(At,4),[kt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[kt,[At,At,At],Je],rgba:[kt,[At,At,At,At],Je],has:{type:zt,overloads:[[[It],function(t,e){return Ye(e[0].evaluate(t),t.properties())}],[[It,Ct],function(t,e){var r=e[0],i=e[1];return Ye(r.evaluate(t),i.evaluate(t))}]]},get:{type:Pt,overloads:[[[It],function(t,e){return $e(e[0].evaluate(t),t.properties())}],[[It,Ct],function(t,e){var r=e[0],i=e[1];return $e(r.evaluate(t),i.evaluate(t))}]]},"feature-state":[Pt,[It],function(t,e){return $e(e[0].evaluate(t),t.featureState||{})}],properties:[Ct,[],function(t){return t.properties()}],"geometry-type":[It,[],function(t){return t.geometryType()}],id:[Pt,[],function(t){return t.id()}],zoom:[At,[],function(t){return t.globals.zoom}],"heatmap-density":[At,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[At,[],function(t){return t.globals.lineProgress||0}],accumulated:[Pt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[At,Qe(At),function(t,e){for(var r=0,i=0,n=e;i<n.length;i+=1)r+=n[i].evaluate(t);return r}],"*":[At,Qe(At),function(t,e){for(var r=1,i=0,n=e;i<n.length;i+=1)r*=n[i].evaluate(t);return r}],"-":{type:At,overloads:[[[At,At],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)-i.evaluate(t)}],[[At],function(t,e){return-e[0].evaluate(t)}]]},"/":[At,[At,At],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)/i.evaluate(t)}],"%":[At,[At,At],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[At,[],function(){return Math.LN2}],pi:[At,[],function(){return Math.PI}],e:[At,[],function(){return Math.E}],"^":[At,[At,At],function(t,e){var r=e[0],i=e[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[At,[At],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[At,[At],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[At,[At],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[At,[At],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[At,[At],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[At,[At],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[At,[At],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[At,[At],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[At,[At],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[At,[At],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[At,Qe(At),function(t,e){return Math.min.apply(Math,e.map((function(e){return e.evaluate(t)})))}],max:[At,Qe(At),function(t,e){return Math.max.apply(Math,e.map((function(e){return e.evaluate(t)})))}],abs:[At,[At],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[At,[At],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[At,[At],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[At,[At],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[zt,[It,Pt],function(t,e){var r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[zt,[Pt],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[zt,[It],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[zt,[It,Pt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<o}],"filter-id-<":[zt,[Pt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<n}],"filter->":[zt,[It,Pt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[zt,[Pt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>n}],"filter-<=":[zt,[It,Pt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[zt,[Pt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<=n}],"filter->=":[zt,[It,Pt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[zt,[Pt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>=n}],"filter-has":[zt,[Pt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[zt,[],function(t){return null!==t.id()}],"filter-type-in":[zt,[Dt(It)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[zt,[Dt(Pt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[zt,[It,Dt(Pt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[zt,[It,Dt(Pt)],function(t,e){var r=e[0],i=e[1];return function(t,e,r,i){for(;r<=i;){var n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:zt,overloads:[[[zt,zt],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)&&i.evaluate(t)}],[Qe(zt),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(!i[r].evaluate(t))return!1;return!0}]]},any:{type:zt,overloads:[[[zt,zt],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)||i.evaluate(t)}],[Qe(zt),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(i[r].evaluate(t))return!0;return!1}]]},"!":[zt,[zt],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[zt,[It],function(t,e){var r=e[0],i=t.globals&&t.globals.isSupportedScript;return!i||i(r.evaluate(t))}],upcase:[It,[It],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[It,[It],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[It,Qe(Pt),function(t,e){return e.map((function(e){return Gt(e.evaluate(t))})).join("")}],"resolved-locale":[It,[Mt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var dr=function(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new te,this._defaultValue=e?"color"===(r=e).type&&ar(r.default)?new Ut(0,0,0,0):"color"===r.type?Ut.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function mr(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in He}function yr(t,e){var r=new se(He,[],e?function(t){var e={color:kt,string:It,number:At,enum:It,boolean:zt,formatted:Lt};return"array"===t.type?Dt(e[t.value]||Pt,t.length):e[t.type]}(e):void 0),i=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?tr(new dr(i,e)):er(r.errors)}dr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this.expression.evaluate(this._evaluator)},dr.prototype.evaluate=function(t,e,r){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null;try{var i=this.expression.evaluate(this._evaluator);if(null==i)return this._defaultValue;if(this._enumValues&&!(i in this._enumValues))throw new Wt("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(i)+" instead.");return i}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var vr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!ne(e.expression)};vr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},vr.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)};var _r=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!ne(e.expression),r instanceof Pe&&(this._interpolationType=r.interpolation)};function gr(t,e){if("error"===(t=yr(t,e)).result)return t;var r=t.value.expression,i=ie(r);if(!i&&!rr(e))return er([new Et("","data expressions not supported")]);var n=oe(r,["zoom"]);if(!n&&!ir(e))return er([new Et("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof De)r=t(e.result);else if(e instanceof Le)for(var i=0,n=e.args;i<n.length;i+=1){var o=n[i];if(r=t(o))break}else(e instanceof le||e instanceof Pe)&&e.input instanceof ee&&"zoom"===e.input.name&&(r=e);return r instanceof Et?r:(e.eachChild((function(e){var i=t(e);i instanceof Et?r=i:!r&&i?r=new Et("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new Et("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),r)}(r);return o||n?o instanceof Et?er([o]):o instanceof Pe&&!nr(e)?er([new Et("",'"interpolate" expressions cannot be used with this property')]):tr(o?new _r(i?"camera":"composite",t.value,o):new vr(i?"constant":"source",t.value)):er([new Et("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}_r.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},_r.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)},_r.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?Pe.interpolationFactor(this._interpolationType,t,e,r):0};var xr=function(t,e){this._parameters=t,this._specification=e,xt(this,function t(e,r){var i,n,o,a="color"===r.type,s=e.stops&&"object"==typeof e.stops[0][0],u=s||void 0!==e.property,l=s||!u,p=e.type||(nr(r)?"exponential":"interval");if(a&&((e=xt({},e)).stops&&(e.stops=e.stops.map((function(t){return[t[0],Ut.parse(t[1])]}))),e.default?e.default=Ut.parse(e.default):e.default=Ut.parse(r.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Ce[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===p)i=cr;else if("interval"===p)i=pr;else if("categorical"===p){i=lr,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var f=h[c];n[f[0]]=f[1]}o=typeof e.stops[0][0]}else{if("identity"!==p)throw new Error('Unknown function type "'+p+'"');i=hr}if(s){for(var d={},m=[],y=0;y<e.stops.length;y++){var v=e.stops[y],_=v[0].zoom;void 0===d[_]&&(d[_]={zoom:_,type:e.type,property:e.property,default:e.default,stops:[]},m.push(_)),d[_].stops.push([v[0].value,v[1]])}for(var g=[],x=0,b=m;x<b.length;x+=1){var w=b[x];g.push([d[w].zoom,t(d[w],r)])}return{kind:"composite",interpolationFactor:Pe.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:g.map((function(t){return t[0]})),evaluate:function(t,i){var n=t.zoom;return cr({stops:g,base:e.base},r,n).evaluate(n,i)}}}return l?{kind:"camera",interpolationFactor:"exponential"===p?Pe.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map((function(t){return t[0]})),evaluate:function(t){var a=t.zoom;return i(e,r,a,n,o)}}:{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?ur(e.default,r.default):i(e,r,s,n,o)}}}(this._parameters,this._specification))};function br(t,e){if(ar(t))return new xr(t,e);if(mr(t)){var r=gr(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var i=t;return"string"==typeof t&&"color"===e.type&&(i=Ut.parse(t)),{kind:"constant",evaluate:function(){return i}}}function wr(t){var e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],u=or(r);if("object"!==u)return[new _t(e,r,"object expected, "+u+" found")];for(var l in r){var p=l.split(".")[0],c=i[p]||i["*"],h=void 0;if(n[p])h=n[p];else if(i[p])h=Xr;else if(n["*"])h=n["*"];else{if(!i["*"]){s.push(new _t(e,r[l],'unknown property "'+l+'"'));continue}h=Xr}s=s.concat(h({key:(e?e+".":e)+l,value:r[l],valueSpec:c,style:o,styleSpec:a,object:r,objectKey:l},r))}for(var f in i)n[f]||i[f].required&&void 0===i[f].default&&void 0===r[f]&&s.push(new _t(e,r,'missing required property "'+f+'"'));return s}function Er(t){var e=t.value,r=t.valueSpec,i=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||Xr;if("array"!==or(e))return[new _t(o,e,"array expected, "+or(e)+" found")];if(r.length&&e.length!==r.length)return[new _t(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new _t(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value,values:r.values};n.$version<7&&(s.function=r.function),"object"===or(r.value)&&(s=r.value);for(var u=[],l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:i,styleSpec:n,key:o+"["+l+"]"}));return u}function Sr(t){var e=t.key,r=t.value,i=t.valueSpec,n=or(r);return"number"!==n?[new _t(e,r,"number expected, "+n+" found")]:"minimum"in i&&r<i.minimum?[new _t(e,r,r+" is less than the minimum value "+i.minimum)]:"maximum"in i&&r>i.maximum?[new _t(e,r,r+" is greater than the maximum value "+i.maximum)]:[]}function Tr(t){var e,r,i,n=t.valueSpec,o=bt(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,u=!s,l="array"===or(t.value.stops)&&"array"===or(t.value.stops[0])&&"object"===or(t.value.stops[0][0]),p=wr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new _t(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Er({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===or(r)&&0===r.length&&e.push(new _t(t.key,r,"array must have at least one stop")),e},default:function(t){return Xr({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&p.push(new _t(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||p.push(new _t(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!nr(t.valueSpec)&&p.push(new _t(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!rr(t.valueSpec)?p.push(new _t(t.key,t.value,"property functions not supported")):s&&!ir(t.valueSpec)&&p.push(new _t(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!l||void 0!==t.value.property||p.push(new _t(t.key,t.value,'"property" property is required')),p;function c(t){var e=[],o=t.value,s=t.key;if("array"!==or(o))return[new _t(s,o,"array expected, "+or(o)+" found")];if(2!==o.length)return[new _t(s,o,"array length 2 expected, length "+o.length+" found")];if(l){if("object"!==or(o[0]))return[new _t(s,o,"object expected, "+or(o[0])+" found")];if(void 0===o[0].zoom)return[new _t(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new _t(s,o,"object stop key must have value")];if(i&&i>bt(o[0].zoom))return[new _t(s,o[0].zoom,"stop zoom values must appear in ascending order")];bt(o[0].zoom)!==i&&(i=bt(o[0].zoom),r=void 0,a={}),e=e.concat(wr({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Sr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return mr(wt(o[1]))?e.concat([new _t(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Xr({key:s+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function h(t,i){var s=or(t.value),u=bt(t.value),l=null!==t.value?t.value:i;if(e){if(s!==e)return[new _t(t.key,l,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new _t(t.key,l,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var p="number expected, "+s+" found";return rr(n)&&void 0===o&&(p+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _t(t.key,l,p)]}return"categorical"!==o||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===s&&void 0!==r&&u<r?[new _t(t.key,l,"stop domain values must appear in ascending order")]:(r=u,"categorical"===o&&u in a?[new _t(t.key,l,"stop domain values must be unique")]:(a[u]=!0,[])):[new _t(t.key,l,"integer expected, found "+u)]}}function Ar(t){var e=("property"===t.expressionContext?gr:yr)(wt(t.value),t.valueSpec);if("error"===e.result)return e.value.map((function(e){return new _t(""+t.key+e.key,t.value,e.message)}));var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==r.possibleOutputs().indexOf(void 0))return[new _t(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!ne(r))return[new _t(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!ne(r))return[new _t(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!oe(r,["zoom","feature-state"]))return[new _t(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!ie(r))return[new _t(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ir(t){var e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(bt(r))&&n.push(new _t(e,r,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(i.values).indexOf(bt(r))&&n.push(new _t(e,r,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(r)+" found")),n}function zr(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var i=r[e];if(!zr(i)&&"boolean"!=typeof i)return!1}return!0;default:return!0}}xr.deserialize=function(t){return new xr(t._parameters,t._specification)},xr.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var kr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Cr(t){if(null==t)return function(){return!0};zr(t)||(t=Mr(t));var e=yr(t,kr);if("error"===e.result)throw new Error(e.value.map((function(t){return t.key+": "+t.message})).join(", "));return function(t,r){return e.value.evaluate(t,r)}}function Pr(t,e){return t<e?-1:t>e?1:0}function Mr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Lr(t[1],t[2],"=="):"!="===r?Rr(Lr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Lr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(Mr))):"all"===r?["all"].concat(t.slice(1).map(Mr)):"none"===r?["all"].concat(t.slice(1).map(Mr).map(Rr)):"in"===r?Dr(t[1],t.slice(2)):"!in"===r?Rr(Dr(t[1],t.slice(2))):"has"===r?Br(t[1]):"!has"!==r||Rr(Br(t[1]))}function Lr(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function Dr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(Pr)]]:["filter-in-small",t,["literal",e]]}}function Br(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Rr(t){return["!",t]}function Fr(t){return zr(wt(t.value))?Ar(xt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,i=e.key;if("array"!==or(r))return[new _t(i,r,"array expected, "+or(r)+" found")];var n,o=e.styleSpec,a=[];if(r.length<1)return[new _t(i,r,"filter array must have at least 1 element")];switch(a=a.concat(Ir({key:i+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),bt(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===bt(r[1])&&a.push(new _t(i,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new _t(i,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(n=or(r[1]))&&a.push(new _t(i+"[1]",r[1],"string expected, "+n+" found"));for(var s=2;s<r.length;s++)n=or(r[s]),"$type"===bt(r[1])?a=a.concat(Ir({key:i+"["+s+"]",value:r[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&a.push(new _t(i+"["+s+"]",r[s],"string, number, or boolean expected, "+n+" found"));break;case"any":case"all":case"none":for(var u=1;u<r.length;u++)a=a.concat(t({key:i+"["+u+"]",value:r[u],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=or(r[1]),2!==r.length?a.push(new _t(i,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new _t(i+"[1]",r[1],"string expected, "+n+" found"))}return a}(t)}function Or(t,e){var r=t.key,i=t.style,n=t.styleSpec,o=t.value,a=t.objectKey,s=n[e+"_"+t.layerType];if(!s)return[];var u=a.match(/^(.*)-transition$/);if("paint"===e&&u&&s[u[1]]&&s[u[1]].transition)return Xr({key:r,value:o,valueSpec:n.transition,style:i,styleSpec:n});var l,p=t.valueSpec||s[a];if(!p)return[new _t(r,o,'unknown property "'+a+'"')];if("string"===or(o)&&rr(p)&&!p.tokens&&(l=/^{([^}]+)}$/.exec(o)))return[new _t(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(l[1])+" }`.")];var c=[];return"symbol"===t.layerType&&("text-field"===a&&i&&!i.glyphs&&c.push(new _t(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&ar(wt(o))&&"identity"===bt(o.type)&&c.push(new _t(r,o,'"text-font" does not support identity functions'))),c.concat(Xr({key:t.key,value:o,valueSpec:p,style:i,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function Ur(t){return Or(t,"paint")}function Vr(t){return Or(t,"layout")}function Nr(t){var e=[],r=t.value,i=t.key,n=t.style,o=t.styleSpec;r.type||r.ref||e.push(new _t(i,r,'either "type" or "ref" is required'));var a,s=bt(r.type),u=bt(r.ref);if(r.id)for(var l=bt(r.id),p=0;p<t.arrayIndex;p++){var c=n.layers[p];bt(c.id)===l&&e.push(new _t(i,r.id,'duplicate layer id "'+r.id+'", previously used at line '+c.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach((function(t){t in r&&e.push(new _t(i,r[t],'"'+t+'" is prohibited for ref layers'))})),n.layers.forEach((function(t){bt(t.id)===u&&(a=t)})),a?a.ref?e.push(new _t(i,r.ref,"ref cannot reference another ref layer")):s=bt(a.type):e.push(new _t(i,r.ref,'ref layer "'+u+'" not found'));else if("background"!==s)if(r.source){var h=n.sources&&n.sources[r.source],f=h&&bt(h.type);h?"vector"===f&&"raster"===s?e.push(new _t(i,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new _t(i,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new _t(i,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&h.lineMetrics||e.push(new _t(i,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new _t(i,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new _t(i,r.source,'source "'+r.source+'" not found'))}else e.push(new _t(i,r,'missing required property "source"'));return e=e.concat(wr({key:i,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Xr({key:i+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Fr,layout:function(t){return wr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Vr(xt({layerType:s},t))}}})},paint:function(t){return wr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Ur(xt({layerType:s},t))}}})}}}))}function jr(t){var e=t.value,r=t.key,i=t.styleSpec,n=t.style;if(!e.type)return[new _t(r,e,'"type" is required')];var o,a=bt(e.type);switch(a){case"vector":case"raster":case"raster-dem":if(o=wr({key:r,value:e,valueSpec:i["source_"+a.replace("-","_")],style:t.style,styleSpec:i}),"url"in e)for(var s in e)["type","url","tileSize"].indexOf(s)<0&&o.push(new _t(r+"."+s,e[s],'a source with a "url" property may not include a "'+s+'" property'));return o;case"geojson":if(o=wr({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i}),e.cluster)for(var u in e.clusterProperties){var l=e.clusterProperties[u],p=l[0],c=l[1],h="string"==typeof p?[p,["accumulated"],["get",u]]:p;o.push.apply(o,Ar({key:r+"."+u+".map",value:c,expressionContext:"cluster-map"})),o.push.apply(o,Ar({key:r+"."+u+".reduce",value:h,expressionContext:"cluster-reduce"}))}return o;case"video":return wr({key:r,value:e,valueSpec:i.source_video,style:n,styleSpec:i});case"image":return wr({key:r,value:e,valueSpec:i.source_image,style:n,styleSpec:i});case"canvas":return[new _t(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ir({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:i})}}function qr(t){var e=t.value,r=t.styleSpec,i=r.light,n=t.style,o=[],a=or(e);if(void 0===e)return o;if("object"!==a)return o.concat([new _t("light",e,"object expected, "+a+" found")]);for(var s in e){var u=s.match(/^(.*)-transition$/);o=u&&i[u[1]]&&i[u[1]].transition?o.concat(Xr({key:s,value:e[s],valueSpec:r.transition,style:n,styleSpec:r})):i[s]?o.concat(Xr({key:s,value:e[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new _t(s,e[s],'unknown property "'+s+'"')])}return o}function Zr(t){var e=t.value,r=t.key,i=or(e);return"string"!==i?[new _t(r,e,"string expected, "+i+" found")]:[]}var Gr={"*":function(){return[]},array:Er,boolean:function(t){var e=t.value,r=t.key,i=or(e);return"boolean"!==i?[new _t(r,e,"boolean expected, "+i+" found")]:[]},number:Sr,color:function(t){var e=t.key,r=t.value,i=or(r);return"string"!==i?[new _t(e,r,"color expected, "+i+" found")]:null===Ot(r)?[new _t(e,r,'color expected, "'+r+'" found')]:[]},constants:gt,enum:Ir,filter:Fr,function:Tr,layer:Nr,object:wr,source:jr,light:qr,string:Zr,formatted:function(t){return 0===Zr(t).length?[]:Ar(t)}};function Xr(t){var e=t.value,r=t.valueSpec,i=t.styleSpec;return r.expression&&ar(bt(e))?Tr(t):r.expression&&mr(wt(e))?Ar(t):r.type&&Gr[r.type]?Gr[r.type](t):wr(xt({},t,{valueSpec:r.type?i[r.type]:r}))}function Wr(t){var e=t.value,r=t.key,i=Zr(t);return i.length?i:(-1===e.indexOf("{fontstack}")&&i.push(new _t(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&i.push(new _t(r,e,'"glyphs" url must include a "{range}" token')),i)}function Kr(t,e){e=e||vt;var r=[];return r=r.concat(Xr({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Wr,"*":function(){return[]}}})),t.constants&&(r=r.concat(gt({key:"constants",value:t.constants,style:t,styleSpec:e}))),Hr(r)}function Hr(t){return[].concat(t).sort((function(t,e){return t.line-e.line}))}function Jr(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Hr(t.apply(this,e))}}Kr.source=Jr(jr),Kr.light=Jr(qr),Kr.layer=Jr(Nr),Kr.filter=Jr(Fr),Kr.paintProperty=Jr(Ur),Kr.layoutProperty=Jr(Vr);var Yr=Kr,$r=Kr.light,Qr=Kr.paintProperty,ti=Kr.layoutProperty;function ei(t,e){var r=!1;if(e&&e.length)for(var i=0,n=e;i<n.length;i+=1){var o=n[i];t.fire(new mt(new Error(o.message))),r=!0}return r}var ri=ni,ii=3;function ni(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var n=new Int32Array(this.arrayBuffer);t=n[0],e=n[1],r=n[2],this.d=e+2*r;for(var o=0;o<this.d*this.d;o++){var a=n[ii+o],s=n[ii+o+1];i.push(a===s?null:n.subarray(a,s))}var u=n[ii+i.length],l=n[ii+i.length+1];this.keys=n.subarray(u,l),this.bboxes=n.subarray(l),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var p=0;p<this.d*this.d;p++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var c=r/e*t;this.min=-c,this.max=t+c}ni.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},ni.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ni.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},ni.prototype.query=function(t,e,r,i,n){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=r&&a<=i&&!n)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,i,this._queryCell,s,{},n),s},ni.prototype._queryCell=function(t,e,r,i,n,o,a,s){var u=this.cells[n];if(null!==u)for(var l=this.keys,p=this.bboxes,c=0;c<u.length;c++){var h=u[c];if(void 0===a[h]){var f=4*h;(s?s(p[f+0],p[f+1],p[f+2],p[f+3]):t<=p[f+2]&&e<=p[f+3]&&r>=p[f+0]&&i>=p[f+1])?(a[h]=!0,o.push(l[h])):a[h]=!1}}},ni.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),p=this._convertToCellCoord(r),c=this._convertToCellCoord(i),h=u;h<=p;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&n.call(this,t,e,r,i,d,o,a,s))return}},ni.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},ni.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ni.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ii+this.cells.length+1+1,r=0,i=0;i<this.cells.length;i++)r+=this.cells[i].length;var n=new Int32Array(e+r+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];n[ii+a]=o,n.set(s,o),o+=s.length}return n[ii+t.length]=o,n.set(this.keys,o),o+=this.keys.length,n[ii+t.length+1]=o,n.set(this.bboxes,o),o+=this.bboxes.length,n.buffer};var oi=self.ImageData,ai={};function si(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),ai[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var ui in si("Object",Object),ri.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),{buffer:r}},ri.deserialize=function(t){return new ri(t.buffer)},si("Grid",ri),si("Color",Ut),si("Error",Error),si("StylePropertyFunction",xr),si("StyleExpression",dr,{omit:["_evaluator"]}),si("ZoomDependentExpression",_r),si("ZoomConstantExpression",vr),si("CompoundExpression",ee,{omit:["_evaluate"]}),He)He[ui]._classRegistryKey||si("Expression_"+ui,He[ui]);function li(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof oi)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var i=[],n=0,o=t;n<o.length;n+=1){var a=o[n];i.push(li(a,e))}return i}if("object"==typeof t){var s=t.constructor,u=s._classRegistryKey;if(!u)throw new Error("can't serialize object of unregistered class");var l=s.serialize?s.serialize(t,e):{};if(!s.serialize){for(var p in t)if(t.hasOwnProperty(p)&&!(ai[u].omit.indexOf(p)>=0)){var c=t[p];l[p]=ai[u].shallow.indexOf(p)>=0?c:li(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(l.$name=u),l}throw new Error("can't serialize object of type "+typeof t)}function pi(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof oi)return t;if(Array.isArray(t))return t.map(pi);if("object"==typeof t){var e=t.$name||"Object",r=ai[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var i=Object.create(r.prototype),n=0,o=Object.keys(t);n<o.length;n+=1){var a=o[n];if("$name"!==a){var s=t[a];i[a]=ai[e].shallow.indexOf(a)>=0?s:pi(s)}}return i}throw new Error("can't deserialize object of type "+typeof t)}var ci=function(){this.first=!0};ci.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var hi={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function fi(t){for(var e=0,r=t;e<r.length;e+=1)if(yi(r[e].charCodeAt(0)))return!0;return!1}function di(t){for(var e=0,r=t;e<r.length;e+=1)if(!mi(r[e].charCodeAt(0)))return!1;return!0}function mi(t){return!(hi.Arabic(t)||hi["Arabic Supplement"](t)||hi["Arabic Extended-A"](t)||hi["Arabic Presentation Forms-A"](t)||hi["Arabic Presentation Forms-B"](t))}function yi(t){return!(746!==t&&747!==t&&(t<4352||!(hi["Bopomofo Extended"](t)||hi.Bopomofo(t)||hi["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||hi["CJK Compatibility Ideographs"](t)||hi["CJK Compatibility"](t)||hi["CJK Radicals Supplement"](t)||hi["CJK Strokes"](t)||!(!hi["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||hi["CJK Unified Ideographs Extension A"](t)||hi["CJK Unified Ideographs"](t)||hi["Enclosed CJK Letters and Months"](t)||hi["Hangul Compatibility Jamo"](t)||hi["Hangul Jamo Extended-A"](t)||hi["Hangul Jamo Extended-B"](t)||hi["Hangul Jamo"](t)||hi["Hangul Syllables"](t)||hi.Hiragana(t)||hi["Ideographic Description Characters"](t)||hi.Kanbun(t)||hi["Kangxi Radicals"](t)||hi["Katakana Phonetic Extensions"](t)||hi.Katakana(t)&&12540!==t||!(!hi["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!hi["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||hi["Unified Canadian Aboriginal Syllabics"](t)||hi["Unified Canadian Aboriginal Syllabics Extended"](t)||hi["Vertical Forms"](t)||hi["Yijing Hexagram Symbols"](t)||hi["Yi Syllables"](t)||hi["Yi Radicals"](t))))}function vi(t){return!(yi(t)||function(t){return!!(hi["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||hi["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||hi["Letterlike Symbols"](t)||hi["Number Forms"](t)||hi["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||hi["Control Pictures"](t)&&9251!==t||hi["Optical Character Recognition"](t)||hi["Enclosed Alphanumerics"](t)||hi["Geometric Shapes"](t)||hi["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||hi["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||hi["CJK Symbols and Punctuation"](t)||hi.Katakana(t)||hi["Private Use Area"](t)||hi["CJK Compatibility Forms"](t)||hi["Small Form Variants"](t)||hi["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function _i(t,e){return!(!e&&(t>=1424&&t<=2303||hi["Arabic Presentation Forms-A"](t)||hi["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||hi.Khmer(t))}var gi,xi=!1,bi=null,wi=!1,Ei=new yt,Si={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return wi||null!=Si.applyArabicShaping}},Ti=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ci,this.transition={})};Ti.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,i=t;r<i.length;r+=1)if(!_i(i[r].charCodeAt(0),e))return!1;return!0}(t,Si.isLoaded())},Ti.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ti.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var Ai=function(t,e){this.property=t,this.value=e,this.expression=br(void 0===e?t.specification.default:e,t.specification)};Ai.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Ai.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Ii=function(t){this.property=t,this.value=new Ai(t,void 0)};Ii.prototype.transitioned=function(t,e){return new ki(this.property,this.value,e,c({},t.transition,this.transition),t.now)},Ii.prototype.untransitioned=function(){return new ki(this.property,this.value,null,{},0)};var zi=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};zi.prototype.getValue=function(t){return x(this._values[t].value.value)},zi.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ii(this._values[t].property)),this._values[t].value=new Ai(this._values[t].property,null===e?void 0:x(e))},zi.prototype.getTransition=function(t){return x(this._values[t].transition)},zi.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ii(this._values[t].property)),this._values[t].transition=x(e)||void 0},zi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n);var o=this.getTransition(i);void 0!==o&&(t[i+"-transition"]=o)}return t},zi.prototype.transitioned=function(t,e){for(var r=new Ci(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var o=n[i];r._values[o]=this._values[o].transitioned(t,e._values[o])}return r},zi.prototype.untransitioned=function(){for(var t=new Ci(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e];t._values[i]=this._values[i].untransitioned()}return t};var ki=function(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)};ki.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),i=this.prior;if(i){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return i.possiblyEvaluate(t);var n=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(i.possiblyEvaluate(t),r,function(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(n))}return r};var Ci=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Ci.prototype.possiblyEvaluate=function(t){for(var e=new Li(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var n=i[r];e._values[n]=this._values[n].possiblyEvaluate(t)}return e},Ci.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Pi=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Pi.prototype.getValue=function(t){return x(this._values[t].value)},Pi.prototype.setValue=function(t,e){this._values[t]=new Ai(this._values[t].property,null===e?void 0:x(e))},Pi.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n)}return t},Pi.prototype.possiblyEvaluate=function(t){for(var e=new Li(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var n=i[r];e._values[n]=this._values[n].possiblyEvaluate(t)}return e};var Mi=function(t,e,r){this.property=t,this.value=e,this.parameters=r};Mi.prototype.isConstant=function(){return"constant"===this.value.kind},Mi.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},Mi.prototype.evaluate=function(t,e){return this.property.evaluate(this.value,this.parameters,t,e)};var Li=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Li.prototype.get=function(t){return this._values[t]};var Di=function(t){this.specification=t};Di.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Di.prototype.interpolate=function(t,e,r){var i=ce[this.specification.type];return i?i(t,e,r):t};var Bi=function(t){this.specification=t};Bi.prototype.possiblyEvaluate=function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new Mi(this,{kind:"constant",value:t.expression.evaluate(e)},e):new Mi(this,t.expression,e)},Bi.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new Mi(this,{kind:"constant",value:void 0},t.parameters);var i=ce[this.specification.type];return i?new Mi(this,{kind:"constant",value:i(t.value.value,e.value.value,r)},t.parameters):t},Bi.prototype.evaluate=function(t,e,r,i){return"constant"===t.kind?t.value:t.evaluate(e,r,i)};var Ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(t,e){if(void 0===t.value)return new Mi(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var r=t.expression.evaluate(e),i=this._calculate(r,r,r,e);return new Mi(this,{kind:"constant",value:i},e)}if("camera"===t.expression.kind){var n=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new Mi(this,{kind:"constant",value:n},e)}return new Mi(this,t.expression,e)},e.prototype.evaluate=function(t,e,r,i){if("source"===t.kind){var n=t.evaluate(e,r,i);return this._calculate(n,n,n,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,i),t.evaluate({zoom:Math.floor(e.zoom)},r,i),t.evaluate({zoom:Math.floor(e.zoom)+1},r,i),e):t.value},e.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Bi),Fi=function(t){this.specification=t};Fi.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Ti(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Ti(Math.floor(e.zoom),e)),t.expression.evaluate(new Ti(Math.floor(e.zoom+1),e)),e)}},Fi.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Fi.prototype.interpolate=function(t){return t};var Oi=function(t){this.specification=t};Oi.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Oi.prototype.interpolate=function(){return!1};var Ui=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],i=this.defaultPropertyValues[e]=new Ai(r,void 0),n=this.defaultTransitionablePropertyValues[e]=new Ii(r);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};si("DataDrivenProperty",Bi),si("DataConstantProperty",Di),si("CrossFadedDataDrivenProperty",Ri),si("CrossFadedProperty",Fi),si("ColorRampProperty",Oi);var Vi=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter=function(){return!0},"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new Pi(r.layout)),r.paint)){for(var i in this._transitionablePaint=new zi(r.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var i="layers."+this.id+".layout."+t;if(this._validate(ti,i,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e},e.prototype.getPaintProperty=function(t){return v(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var i="layers."+this.id+".paint."+t;if(this._validate(Qr,i,t,e,r))return!1}if(v(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var n=this._transitionablePaint._values[t],o="cross-faded-data-driven"===n.property.specification["property-type"]&&!n.value.value&&e,a=this._transitionablePaint._values[t].value.isDataDriven();this._transitionablePaint.setValue(t,e);var s=this._transitionablePaint._values[t].value.isDataDriven();return this._handleSpecialPaintPropertyUpdate(t),s||a||o},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),g(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,r,i,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&ei(this,t.call(Yr,{key:e,layerType:this.type,objectKey:r,value:i,styleSpec:vt,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof Mi&&rr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(yt),Ni={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ji=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},qi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Zi(t,e){void 0===e&&(e=1);var r=0,i=0;return{members:t.map((function(t){var n,o=(n=t.type,Ni[n].BYTES_PER_ELEMENT),a=r=Gi(r,Math.max(e,o)),s=t.components||1;return i=Math.max(i,o),r+=o*s,{name:t.name,type:t.type,components:s,offset:a}})),size:Gi(r,Math.max(i,e)),alignment:e}}function Gi(t,e){return Math.ceil(t/e)*e}qi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},qi.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},qi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},qi.prototype.clear=function(){this.length=0},qi.prototype.resize=function(t){this.reserve(t),this.length=t},qi.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},qi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.int16[i+0]=e,this.int16[i+1]=r,t},e}(qi);Xi.prototype.bytesPerElement=4,si("StructArrayLayout2i4",Xi);var Wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,t},e}(qi);Wi.prototype.bytesPerElement=8,si("StructArrayLayout4i8",Wi);var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(qi);Ki.prototype.bytesPerElement=12,si("StructArrayLayout2i4i12",Ki);var Hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u){var l=6*t,p=12*t;return this.int16[l+0]=e,this.int16[l+1]=r,this.int16[l+2]=i,this.int16[l+3]=n,this.uint8[p+8]=o,this.uint8[p+9]=a,this.uint8[p+10]=s,this.uint8[p+11]=u,t},e}(qi);Hi.prototype.bytesPerElement=12,si("StructArrayLayout4i4ub12",Hi);var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u){var l=8*t;return this.uint16[l+0]=e,this.uint16[l+1]=r,this.uint16[l+2]=i,this.uint16[l+3]=n,this.uint16[l+4]=o,this.uint16[l+5]=a,this.uint16[l+6]=s,this.uint16[l+7]=u,t},e}(qi);Ji.prototype.bytesPerElement=16,si("StructArrayLayout8ui16",Ji);var Yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u){var l=8*t;return this.int16[l+0]=e,this.int16[l+1]=r,this.int16[l+2]=i,this.int16[l+3]=n,this.uint16[l+4]=o,this.uint16[l+5]=a,this.uint16[l+6]=s,this.uint16[l+7]=u,t},e}(qi);Yi.prototype.bytesPerElement=16,si("StructArrayLayout4i4ui16",Yi);var $i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t},e}(qi);$i.prototype.bytesPerElement=12,si("StructArrayLayout3f12",$i);var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(qi);Qi.prototype.bytesPerElement=4,si("StructArrayLayout1ul4",Qi);var tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,u,l,p){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,i,n,o,a,s,u,l,p)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u,l,p,c){var h=12*t,f=6*t;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=i,this.int16[h+3]=n,this.int16[h+4]=o,this.int16[h+5]=a,this.uint32[f+3]=s,this.uint16[h+8]=u,this.uint16[h+9]=l,this.int16[h+10]=p,this.int16[h+11]=c,t},e}(qi);tn.prototype.bytesPerElement=24,si("StructArrayLayout6i1ul2ui2i24",tn);var en=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(qi);en.prototype.bytesPerElement=12,si("StructArrayLayout2i2i2i12",en);var rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[a+1]=i,this.float32[a+2]=n,t},e}(qi);rn.prototype.bytesPerElement=12,si("StructArrayLayout2ub2f12",rn);var nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d){var m=this.length;return this.resize(m+1),this.emplace(m,t,e,r,i,n,o,a,s,u,l,p,c,h,f,d)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d,m){var y=22*t,v=11*t,_=44*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=i,this.uint16[y+3]=n,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[y+10]=u,this.uint16[y+11]=l,this.uint16[y+12]=p,this.float32[v+7]=c,this.float32[v+8]=h,this.uint8[_+36]=f,this.uint8[_+37]=d,this.uint32[v+10]=m,t},e}(qi);nn.prototype.bytesPerElement=44,si("StructArrayLayout2i2ui3ul3ui2f2ub1ul44",nn);var on=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d,m,y,v){var _=this.length;return this.resize(_+1),this.emplace(_,t,e,r,i,n,o,a,s,u,l,p,c,h,f,d,m,y,v)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d,m,y,v,_){var g=22*t,x=11*t;return this.int16[g+0]=e,this.int16[g+1]=r,this.int16[g+2]=i,this.int16[g+3]=n,this.int16[g+4]=o,this.int16[g+5]=a,this.uint16[g+6]=s,this.uint16[g+7]=u,this.uint16[g+8]=l,this.uint16[g+9]=p,this.uint16[g+10]=c,this.uint16[g+11]=h,this.uint16[g+12]=f,this.uint16[g+13]=d,this.uint16[g+14]=m,this.uint32[x+8]=y,this.float32[x+9]=v,this.float32[x+10]=_,t},e}(qi);on.prototype.bytesPerElement=44,si("StructArrayLayout6i9ui1ul2f44",on);var an=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(qi);an.prototype.bytesPerElement=4,si("StructArrayLayout1f4",an);var sn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t},e}(qi);sn.prototype.bytesPerElement=6,si("StructArrayLayout3i6",sn);var un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=2*t,o=4*t;return this.uint32[n+0]=e,this.uint16[o+2]=r,this.uint16[o+3]=i,t},e}(qi);un.prototype.bytesPerElement=8,si("StructArrayLayout1ul2ui8",un);var ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t},e}(qi);ln.prototype.bytesPerElement=6,si("StructArrayLayout3ui6",ln);var pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,t},e}(qi);pn.prototype.bytesPerElement=4,si("StructArrayLayout2ui4",pn);var cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(qi);cn.prototype.bytesPerElement=2,si("StructArrayLayout1ui2",cn);var hn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.float32[i+0]=e,this.float32[i+1]=r,t},e}(qi);hn.prototype.bytesPerElement=8,si("StructArrayLayout2f8",hn);var fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=i,this.float32[o+3]=n,t},e}(qi);fn.prototype.bytesPerElement=16,si("StructArrayLayout4f16",fn);var dn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(ji);dn.prototype.size=24;var mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new dn(this,t)},e}(tn);si("CollisionBoxArray",mn);var yn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},Object.defineProperties(e.prototype,r),e}(ji);yn.prototype.size=44;var vn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new yn(this,t)},e}(nn);si("PlacedSymbolArray",vn);var _n=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},radialTextOffset:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.rightJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.centerJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.leftJustifiedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+4]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+5]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+6]},r.key.set=function(t){this._structArray.uint16[this._pos2+6]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+12]},r.numHorizontalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+13]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+13]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+14]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+14]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+8]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+8]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+9]},r.textBoxScale.set=function(t){this._structArray.float32[this._pos4+9]=t},r.radialTextOffset.get=function(){return this._structArray.float32[this._pos4+10]},r.radialTextOffset.set=function(t){this._structArray.float32[this._pos4+10]=t},Object.defineProperties(e.prototype,r),e}(ji);_n.prototype.size=44;var gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new _n(this,t)},e}(on);si("SymbolInstanceArray",gn);var xn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(ji);xn.prototype.size=4;var bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new xn(this,t)},e}(an);si("GlyphOffsetArray",bn);var wn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(ji);wn.prototype.size=6;var En=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new wn(this,t)},e}(sn);si("SymbolLineVertexArray",En);var Sn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(ji);Sn.prototype.size=8;var Tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new Sn(this,t)},e}(un);si("FeatureIndexArray",Tn);var An=Zi([{name:"a_pos",components:2,type:"Int16"}],4).members,In=function(t){void 0===t&&(t=[]),this.segments=t};function zn(t,e){return 256*(t=l(Math.floor(t),0,255))+l(Math.floor(e),0,255)}In.prototype.prepareSegment=function(t,e,r,i){var n=this.segments[this.segments.length-1];return t>In.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+In.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>In.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i)&&(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==i&&(n.sortKey=i),this.segments.push(n)),n},In.prototype.get=function(){return this.segments},In.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var i in r.vaos)r.vaos[i].destroy()}},In.simpleSegment=function(t,e,r,i){return new In([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])},In.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,si("SegmentVector",In);var kn=function(){this.ids=[],this.positions=[],this.indexed=!1};function Cn(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}kn.prototype.add=function(t,e,r,i){this.ids.push(t),this.positions.push(e,r,i)},kn.prototype.getPositions=function(t){for(var e=0,r=this.ids.length-1;e<r;){var i=e+r>>1;this.ids[i]>=t?r=i:e=i+1}for(var n=[];this.ids[e]===t;){var o=this.positions[3*e],a=this.positions[3*e+1],s=this.positions[3*e+2];n.push({index:o,start:a,end:s}),e++}return n},kn.serialize=function(t,e){var r=new Float64Array(t.ids),i=new Uint32Array(t.positions);return function t(e,r,i,n){if(!(i>=n)){for(var o=e[i+n>>1],a=i-1,s=n+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;Cn(e,a,s),Cn(r,3*a,3*s),Cn(r,3*a+1,3*s+1),Cn(r,3*a+2,3*s+2)}t(e,r,i,s),t(e,r,s+1,n)}}(r,i,0,r.length-1),e.push(r.buffer,i.buffer),{ids:r,positions:i}},kn.deserialize=function(t){var e=new kn;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},si("FeaturePositionMap",kn);var Pn=function(t,e){this.gl=t.gl,this.location=e},Mn=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(Pn),Ln=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(Pn),Dn=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(Pn),Bn=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(Pn),Rn=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(Pn),Fn=function(t){function e(e,r){t.call(this,e,r),this.current=Ut.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(Pn),On=new Float32Array(16),Un=function(t){function e(e,r){t.call(this,e,r),this.current=On}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(Pn);function Vn(t){return[zn(255*t.r,255*t.g),zn(255*t.b,255*t.a)]}var Nn=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map((function(t){return"u_"+t})),this.type=r,this.maxValue=-1/0};Nn.prototype.defines=function(){return this.names.map((function(t){return"#define HAS_UNIFORM_u_"+t}))},Nn.prototype.setConstantPatternPositions=function(){},Nn.prototype.populatePaintArray=function(){},Nn.prototype.updatePaintArray=function(){},Nn.prototype.upload=function(){},Nn.prototype.destroy=function(){},Nn.prototype.setUniforms=function(t,e,r,i){e.set(i.constantOr(this.value))},Nn.prototype.getBinding=function(t,e){return"color"===this.type?new Fn(t,e):new Ln(t,e)},Nn.serialize=function(t){var e=t.value,r=t.names,i=t.type;return{value:li(e),names:r,type:i}},Nn.deserialize=function(t){var e=t.value,r=t.names,i=t.type;return new Nn(pi(e),r,i)};var jn=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map((function(t){return"u_"+t})),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};jn.prototype.defines=function(){return this.names.map((function(t){return"#define HAS_UNIFORM_u_"+t}))},jn.prototype.populatePaintArray=function(){},jn.prototype.updatePaintArray=function(){},jn.prototype.upload=function(){},jn.prototype.destroy=function(){},jn.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},jn.prototype.setUniforms=function(t,e,r,i,n){var o=this.patternPositions;"u_pattern_to"===n&&o.patternTo&&e.set(o.patternTo),"u_pattern_from"===n&&o.patternFrom&&e.set(o.patternFrom)},jn.prototype.getBinding=function(t,e){return new Rn(t,e)};var qn=function(t,e,r,i){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map((function(t){return"a_"+t})),this.maxValue=-1/0,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}})),this.paintVertexArray=new i};qn.prototype.defines=function(){return[]},qn.prototype.setConstantPatternPositions=function(){},qn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,i=r.length;r.reserve(t);var n=this.expression.evaluate(new Ti(0),e,{});if("color"===this.type)for(var o=Vn(n),a=i;a<t;a++)r.emplaceBack(o[0],o[1]);else{for(var s=i;s<t;s++)r.emplaceBack(n);this.maxValue=Math.max(this.maxValue,n)}},qn.prototype.updatePaintArray=function(t,e,r,i){var n=this.paintVertexArray,o=this.expression.evaluate({zoom:0},r,i);if("color"===this.type)for(var a=Vn(o),s=t;s<e;s++)n.emplace(s,a[0],a[1]);else{for(var u=t;u<e;u++)n.emplace(u,o);this.maxValue=Math.max(this.maxValue,o)}},qn.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},qn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},qn.prototype.setUniforms=function(t,e){e.set(0)},qn.prototype.getBinding=function(t,e){return new Ln(t,e)};var Zn=function(t,e,r,i,n,o){this.expression=t,this.names=e,this.uniformNames=this.names.map((function(t){return"a_"+t+"_t"})),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?4:2,offset:0}})),this.paintVertexArray=new a};Zn.prototype.defines=function(){return[]},Zn.prototype.setConstantPatternPositions=function(){},Zn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,i=r.length;r.reserve(t);var n=this.expression.evaluate(new Ti(this.zoom),e,{}),o=this.expression.evaluate(new Ti(this.zoom+1),e,{});if("color"===this.type)for(var a=Vn(n),s=Vn(o),u=i;u<t;u++)r.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var l=i;l<t;l++)r.emplaceBack(n,o);this.maxValue=Math.max(this.maxValue,n,o)}},Zn.prototype.updatePaintArray=function(t,e,r,i){var n=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},r,i),a=this.expression.evaluate({zoom:this.zoom+1},r,i);if("color"===this.type)for(var s=Vn(o),u=Vn(a),l=t;l<e;l++)n.emplace(l,s[0],s[1],u[0],u[1]);else{for(var p=t;p<e;p++)n.emplace(p,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},Zn.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Zn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Zn.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},Zn.prototype.setUniforms=function(t,e,r){e.set(this.interpolationFactor(r.zoom))},Zn.prototype.getBinding=function(t,e){return new Ln(t,e)};var Gn=function(t,e,r,i,n,o,a){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map((function(t){return"a_"+t+"_t"})),this.useIntegerZoom=i,this.zoom=n,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=e.map((function(t){return{name:"a_"+t,type:"Uint16",components:4,offset:0}})),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};Gn.prototype.defines=function(){return[]},Gn.prototype.setConstantPatternPositions=function(){},Gn.prototype.populatePaintArray=function(t,e,r){var i=this.zoomInPaintVertexArray,n=this.zoomOutPaintVertexArray,o=this.layerId,a=i.length;if(i.reserve(t),n.reserve(t),r&&e.patterns&&e.patterns[o]){var s=e.patterns[o],u=s.min,l=s.mid,p=s.max,c=r[u],h=r[l],f=r[p];if(!c||!h||!f)return;for(var d=a;d<t;d++)i.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],c.tl[0],c.tl[1],c.br[0],c.br[1]),n.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},Gn.prototype.updatePaintArray=function(t,e,r,i,n){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(n&&r.patterns&&r.patterns[s]){var u=r.patterns[s],l=u.min,p=u.mid,c=u.max,h=n[l],f=n[p],d=n[c];if(!h||!f||!d)return;for(var m=t;m<e;m++)o.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),a.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1])}},Gn.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Gn.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},Gn.prototype.setUniforms=function(t,e){e.set(0)},Gn.prototype.getBinding=function(t,e){return new Ln(t,e)};var Xn=function(){this.binders={},this.cacheKey="",this._buffers=[],this._featureMap=new kn,this._bufferOffset=0};Xn.createDynamic=function(t,e,r){var i=new Xn,n=[];for(var o in t.paint._values)if(r(o)){var a=t.paint.get(o);if(a instanceof Mi&&rr(a.property.specification)){var s=Kn(o,t.type),u=a.property.specification.type,l=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)i.binders[o]=new jn(a.value.value,s,u),n.push("/u_"+o);else{var p=Hn(o,u,"source");i.binders[o]=new Gn(a.value,s,u,l,e,p,t.id),n.push("/a_"+o)}else if("constant"===a.value.kind)i.binders[o]=new Nn(a.value.value,s,u),n.push("/u_"+o);else if("source"===a.value.kind){var c=Hn(o,u,"source");i.binders[o]=new qn(a.value,s,u,c),n.push("/a_"+o)}else{var h=Hn(o,u,"composite");i.binders[o]=new Zn(a.value,s,u,l,e,h),n.push("/z_"+o)}}}return i.cacheKey=n.sort().join(""),i},Xn.prototype.populatePaintArrays=function(t,e,r,i){for(var n in this.binders)this.binders[n].populatePaintArray(t,e,i);void 0!==e.id&&this._featureMap.add(+e.id,r,this._bufferOffset,t),this._bufferOffset=t},Xn.prototype.setConstantPatternPositions=function(t,e){for(var r in this.binders)this.binders[r].setConstantPatternPositions(t,e)},Xn.prototype.updatePaintArrays=function(t,e,r,i){var n=!1;for(var o in t)for(var a=0,s=this._featureMap.getPositions(+o);a<s.length;a+=1){var u=s[a],l=e.feature(u.index);for(var p in this.binders){var c=this.binders[p];if(!(c instanceof Nn||c instanceof jn)&&!0===c.expression.isStateDependent){var h=r.paint.get(p);c.expression=h.value,c.updatePaintArray(u.start,u.end,l,t[o],i),n=!0}}}return n},Xn.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},Xn.prototype.getPaintVertexBuffers=function(){return this._buffers},Xn.prototype.getUniforms=function(t,e){var r=[];for(var i in this.binders)for(var n=this.binders[i],o=0,a=n.uniformNames;o<a.length;o+=1){var s=a[o];if(e[s]){var u=n.getBinding(t,e[s]);r.push({name:s,property:i,binding:u})}}return r},Xn.prototype.setUniforms=function(t,e,r,i){for(var n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.name,u=a.property,l=a.binding;this.binders[u].setUniforms(t,l,i,r.get(u),s)}},Xn.prototype.updatePatternPaintBuffers=function(t){var e=[];for(var r in this.binders){var i=this.binders[r];if(i instanceof Gn){var n=2===t.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;n&&e.push(n)}else(i instanceof qn||i instanceof Zn)&&i.paintVertexBuffer&&e.push(i.paintVertexBuffer)}this._buffers=e},Xn.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var i in this.binders){var n=this.binders[i];(n instanceof qn||n instanceof Zn)&&n.paintVertexBuffer&&r.push(n.paintVertexBuffer)}this._buffers=r},Xn.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var Wn=function(t,e,r,i){void 0===i&&(i=function(){return!0}),this.programConfigurations={};for(var n=0,o=e;n<o.length;n+=1){var a=o[n];this.programConfigurations[a.id]=Xn.createDynamic(a,r,i),this.programConfigurations[a.id].layoutAttributes=t}this.needsUpload=!1};function Kn(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function Hn(t,e,r){var i={color:{source:hn,composite:fn},number:{source:an,composite:hn}},n=function(t){return{"line-pattern":{source:Ji,composite:Ji},"fill-pattern":{source:Ji,composite:Ji},"fill-extrusion-pattern":{source:Ji,composite:Ji}}[t]}(t);return n&&n[r]||i[e][r]}Wn.prototype.populatePaintArrays=function(t,e,r,i){for(var n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e,r,i);this.needsUpload=!0},Wn.prototype.updatePaintArrays=function(t,e,r,i){for(var n=0,o=r;n<o.length;n+=1){var a=o[n];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,e,a,i)||this.needsUpload}},Wn.prototype.get=function(t){return this.programConfigurations[t]},Wn.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},Wn.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},si("ConstantBinder",Nn),si("CrossFadedConstantBinder",jn),si("SourceExpressionBinder",qn),si("CrossFadedCompositeBinder",Gn),si("CompositeExpressionBinder",Zn),si("ProgramConfiguration",Xn,{omit:["_buffers"]}),si("ProgramConfigurationSet",Wn);var Jn=8192,Yn={min:-1*Math.pow(2,15),max:Math.pow(2,15)-1};function $n(t){for(var e=Jn/t.extent,r=t.loadGeometry(),i=0;i<r.length;i++)for(var n=r[i],o=0;o<n.length;o++){var a=n[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<Yn.min||a.x>Yn.max||a.y<Yn.min||a.y>Yn.max)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function Qn(t,e,r,i,n){t.emplaceBack(2*e+(i+1)/2,2*r+(n+1)/2)}var to=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Xi,this.indexArray=new ln,this.segments=new In,this.programConfigurations=new Wn(An,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function eo(t,e){for(var r=0;r<t.length;r++)if(po(e,t[r]))return!0;for(var i=0;i<e.length;i++)if(po(t,e[i]))return!0;return!!oo(t,e)}function ro(t,e,r){return!!po(t,e)||!!so(e,t,r)}function io(t,e){if(1===t.length)return lo(e,t[0]);for(var r=0;r<e.length;r++)for(var i=e[r],n=0;n<i.length;n++)if(po(t,i[n]))return!0;for(var o=0;o<t.length;o++)if(lo(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(oo(t,e[a]))return!0;return!1}function no(t,e,r){if(t.length>1){if(oo(t,e))return!0;for(var i=0;i<e.length;i++)if(so(e[i],t,r))return!0}for(var n=0;n<t.length;n++)if(so(t[n],e,r))return!0;return!1}function oo(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var i=t[r],n=t[r+1],o=0;o<e.length-1;o++)if(ao(i,n,e[o],e[o+1]))return!0;return!1}function ao(t,e,r,i){return E(t,r,i)!==E(e,r,i)&&E(t,e,r)!==E(t,e,i)}function so(t,e,r){var i=r*r;if(1===e.length)return t.distSqr(e[0])<i;for(var n=1;n<e.length;n++)if(uo(t,e[n-1],e[n])<i)return!0;return!1}function uo(t,e,r){var i=e.distSqr(r);if(0===i)return t.distSqr(e);var n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return n<0?t.distSqr(e):n>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function lo(t,e){for(var r,i,n,o=!1,a=0;a<t.length;a++)for(var s=0,u=(r=t[a]).length-1;s<r.length;u=s++)i=r[s],n=r[u],i.y>e.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}function po(t,e){for(var r=!1,i=0,n=t.length-1;i<t.length;n=i++){var o=t[i],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function co(t,e,r){var i=r[0],n=r[2];if(t.x<i.x&&e.x<i.x||t.x>n.x&&e.x>n.x||t.y<i.y&&e.y<i.y||t.y>n.y&&e.y>n.y)return!1;var o=E(t,e,r[0]);return o!==E(t,e,r[1])||o!==E(t,e,r[2])||o!==E(t,e,r[3])}function ho(t,e,r){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:r.programConfigurations.get(e.id).binders[t].maxValue}function fo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function mo(t,e,r,i,o){if(!e[0]&&!e[1])return t;var a=n.convert(e)._mult(o);"viewport"===r&&a._rotate(-i);for(var s=[],u=0;u<t.length;u++){var l=t[u];s.push(l.sub(a))}return s}to.prototype.populate=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var u=$n(o);this.addFeature(o,u,a),e.featureIndex.insert(o,u,a,s,this.index)}}},to.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},to.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},to.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},to.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,An),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},to.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},to.prototype.addFeature=function(t,e,r){for(var i=0,n=e;i<n.length;i+=1)for(var o=0,a=n[i];o<a.length;o+=1){var s=a[o],u=s.x,l=s.y;if(!(u<0||u>=Jn||l<0||l>=Jn)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=p.vertexLength;Qn(this.layoutVertexArray,u,l,-1,-1),Qn(this.layoutVertexArray,u,l,1,-1),Qn(this.layoutVertexArray,u,l,1,1),Qn(this.layoutVertexArray,u,l,-1,1),this.indexArray.emplaceBack(c,c+1,c+2),this.indexArray.emplaceBack(c,c+3,c+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},si("CircleBucket",to,{omit:["layers"]});var yo={paint:new Ui({"circle-radius":new Bi(vt.paint_circle["circle-radius"]),"circle-color":new Bi(vt.paint_circle["circle-color"]),"circle-blur":new Bi(vt.paint_circle["circle-blur"]),"circle-opacity":new Bi(vt.paint_circle["circle-opacity"]),"circle-translate":new Di(vt.paint_circle["circle-translate"]),"circle-translate-anchor":new Di(vt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Di(vt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Di(vt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Bi(vt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Bi(vt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Bi(vt.paint_circle["circle-stroke-opacity"])})},vo="undefined"!=typeof Float32Array?Float32Array:Array;function _o(){var t=new vo(9);return vo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function go(){var t=new vo(3);return vo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function xo(t,e,r){var i=new vo(3);return i[0]=t,i[1]=e,i[2]=r,i}function bo(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,t[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,t[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,t[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,t}function wo(){var t=new vo(4);return vo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}Math.PI,go(),function(){var t;t=new vo(4),vo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}(),go(),xo(1,0,0),xo(0,1,0),wo(),wo(),_o(),function(){var t;t=new vo(2),vo!=Float32Array&&(t[0]=0,t[1]=0)}();var Eo=function(t){function e(e){t.call(this,e,yo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new to(t)},e.prototype.queryRadius=function(t){var e=t;return ho("circle-radius",this,e)+ho("circle-stroke-width",this,e)+fo(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a,s){for(var u=mo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),l=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),p="map"===this.paint.get("circle-pitch-alignment"),c=p?u:function(t,e){return t.map((function(t){return So(t,e)}))}(u,s),h=p?l*a:l,f=0,d=i;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var v=y[m],_=p?v:So(v,s),g=h,x=bo([],[v.x,v.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?g*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(g*=o.cameraToCenterDistance/x[3]),ro(c,_,g))return!0}return!1},e}(Vi);function So(t,e){var r=bo([],[t.x,t.y,0,1],e);return new n(r[0]/r[3],r[1]/r[3])}var To=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(to);function Ao(t,e,r,i){var n=e.width,o=e.height;if(i){if(i.length!==n*o*r)throw new RangeError("mismatched image size")}else i=new Uint8Array(n*o*r);return t.width=n,t.height=o,t.data=i,t}function Io(t,e,r){var i=e.width,n=e.height;if(i!==t.width||n!==t.height){var o=Ao({},{width:i,height:n},r);zo(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,i),height:Math.min(t.height,n)},r),t.width=i,t.height=n,t.data=o.data}}function zo(t,e,r,i,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,u=0;u<n.height;u++)for(var l=((r.y+u)*t.width+r.x)*o,p=((i.y+u)*e.width+i.x)*o,c=0;c<n.width*o;c++)s[p+c]=a[l+c];return e}si("HeatmapBucket",To,{omit:["layers"]});var ko=function(t,e){Ao(this,t,1,e)};ko.prototype.resize=function(t){Io(this,t,1)},ko.prototype.clone=function(){return new ko({width:this.width,height:this.height},new Uint8Array(this.data))},ko.copy=function(t,e,r,i,n){zo(t,e,r,i,n,1)};var Co=function(t,e){Ao(this,t,4,e)};Co.prototype.resize=function(t){Io(this,t,4)},Co.prototype.replace=function(t,e){e?this.data.set(t):this.data=t},Co.prototype.clone=function(){return new Co({width:this.width,height:this.height},new Uint8Array(this.data))},Co.copy=function(t,e,r,i,n){zo(t,e,r,i,n,4)},si("AlphaImage",ko),si("RGBAImage",Co);var Po={paint:new Ui({"heatmap-radius":new Bi(vt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Bi(vt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Di(vt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Oi(vt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Di(vt.paint_heatmap["heatmap-opacity"])})};function Mo(t,e){for(var r=new Uint8Array(1024),i={},n=0,o=0;n<256;n++,o+=4){i[e]=n/255;var a=t.evaluate(i);r[o+0]=Math.floor(255*a.r/a.a),r[o+1]=Math.floor(255*a.g/a.a),r[o+2]=Math.floor(255*a.b/a.a),r[o+3]=Math.floor(255*a.a)}return new Co({width:256,height:1},r)}var Lo=function(t){function e(e){t.call(this,e,Po),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new To(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Mo(t,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(Vi),Do={paint:new Ui({"hillshade-illumination-direction":new Di(vt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Di(vt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Di(vt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Di(vt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Di(vt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Di(vt.paint_hillshade["hillshade-accent-color"])})},Bo=function(t){function e(e){t.call(this,e,Do)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(Vi),Ro=Zi([{name:"a_pos",components:2,type:"Int16"}],4).members,Fo=Uo,Oo=Uo;function Uo(t,e,r){r=r||2;var i,n,o,a,s,u,l,p=e&&e.length,c=p?e[0]*r:t.length,h=Vo(t,0,c,r,!0),f=[];if(!h||h.next===h.prev)return f;if(p&&(h=function(t,e,r,i){var n,o,a,s=[];for(n=0,o=e.length;n<o;n++)(a=Vo(t,e[n]*i,n<o-1?e[n+1]*i:t.length,i,!1))===a.next&&(a.steiner=!0),s.push(Jo(a));for(s.sort(Wo),n=0;n<s.length;n++)Ko(s[n],r),r=No(r,r.next);return r}(t,e,h,r)),t.length>80*r){i=o=t[0],n=a=t[1];for(var d=r;d<c;d+=r)(s=t[d])<i&&(i=s),(u=t[d+1])<n&&(n=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-i,a-n))?1/l:0}return jo(h,f,r,i,n,l),f}function Vo(t,e,r,i,n){var o,a;if(n===sa(t,e,r,i)>0)for(o=e;o<r;o+=i)a=na(o,t[o],t[o+1],a);else for(o=r-i;o>=e;o-=i)a=na(o,t[o],t[o+1],a);return a&&ta(a,a.next)&&(oa(a),a=a.next),a}function No(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!ta(i,i.next)&&0!==Qo(i.prev,i,i.next))i=i.next;else{if(oa(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function jo(t,e,r,i,n,o,a){if(t){!a&&o&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=Ho(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,a,s,u,l=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,i=r,s=0,e=0;e<l&&(s++,i=i.nextZ);e++);for(u=l;s>0||u>0&&i;)0!==s&&(0===u||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,u--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,l*=2}while(a>1)}(n)}(t,i,n,o);for(var s,u,l=t;t.prev!==t.next;)if(s=t.prev,u=t.next,o?Zo(t,i,n,o):qo(t))e.push(s.i/r),e.push(t.i/r),e.push(u.i/r),oa(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?jo(t=Go(t,e,r),e,r,i,n,o,2):2===a&&Xo(t,e,r,i,n,o):jo(No(t),e,r,i,n,o,1);break}}}function qo(t){var e=t.prev,r=t,i=t.next;if(Qo(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(Yo(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&Qo(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function Zo(t,e,r,i){var n=t.prev,o=t,a=t.next;if(Qo(n,o,a)>=0)return!1;for(var s=n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,u=n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,l=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,p=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,c=Ho(s,u,e,r,i),h=Ho(l,p,e,r,i),f=t.prevZ,d=t.nextZ;f&&f.z>=c&&d&&d.z<=h;){if(f!==t.prev&&f!==t.next&&Yo(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&Yo(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&Yo(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Yo(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Go(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!ta(n,o)&&ea(n,i,i.next,o)&&ra(n,o)&&ra(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),oa(i),oa(i.next),i=t=o),i=i.next}while(i!==t);return i}function Xo(t,e,r,i,n,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&$o(a,s)){var u=ia(a,s);return a=No(a,a.next),u=No(u,u.next),jo(a,e,r,i,n,o),void jo(u,e,r,i,n,o)}s=s.next}a=a.next}while(a!==t)}function Wo(t,e){return t.x-e.x}function Ko(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>a){if(a=s,s===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===a)return r.prev;var u,l=r,p=r.x,c=r.y,h=1/0;for(i=r.next;i!==l;)n>=i.x&&i.x>=p&&n!==i.x&&Yo(o<c?n:a,o,p,c,o<c?a:n,o,i.x,i.y)&&((u=Math.abs(o-i.y)/(n-i.x))<h||u===h&&i.x>r.x)&&ra(i,t)&&(r=i,h=u),i=i.next;return r}(t,e)){var r=ia(e,t);No(r,r.next)}}function Ho(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Jo(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function Yo(t,e,r,i,n,o,a,s){return(n-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(n-a)*(i-s)>=0}function $o(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&ea(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&ra(t,e)&&ra(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function ta(t,e){return t.x===e.x&&t.y===e.y}function ea(t,e,r,i){return!!(ta(t,e)&&ta(r,i)||ta(t,i)&&ta(r,e))||Qo(t,e,r)>0!=Qo(t,e,i)>0&&Qo(r,i,t)>0!=Qo(r,i,e)>0}function ra(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function ia(t,e){var r=new aa(t.i,t.x,t.y),i=new aa(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function na(t,e,r,i){var n=new aa(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function oa(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function aa(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function sa(t,e,r,i){for(var n=0,o=e,a=r-i;o<r;o+=i)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}function ua(t,e,r,i,n){!function t(e,r,i,n,o){for(;n>i;){if(n-i>600){var a=n-i+1,s=r-i+1,u=Math.log(a),l=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-s*l/a+p)),Math.min(n,Math.floor(r+(a-s)*l/a+p)),o)}var c=e[r],h=i,f=n;for(la(e,i,r),o(e[n],c)>0&&la(e,i,n);h<f;){for(la(e,h,f),h++,f--;o(e[h],c)<0;)h++;for(;o(e[f],c)>0;)f--}0===o(e[i],c)?la(e,i,f):la(e,++f,n),f<=r&&(i=f+1),r<=f&&(n=f-1)}}(t,e,r||0,i||t.length-1,n||pa)}function la(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function pa(t,e){return t<e?-1:t>e?1:0}function ca(t,e){var r=t.length;if(r<=1)return[t];for(var i,n,o=[],a=0;a<r;a++){var s=S(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===n&&(n=s<0),n===s<0?(i&&o.push(i),i=[t[a]]):i.push(t[a]))}if(i&&o.push(i),e>1)for(var u=0;u<o.length;u++)o[u].length<=e||(ua(o[u],e,1,o[u].length-1,ha),o[u]=o[u].slice(0,e));return o}function ha(t,e){return e.area-t.area}function fa(t,e,r){for(var i=r.patternDependencies,n=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(n=!0);var u=s.constantOr(null);u&&(n=!0,i[u.to]=!0,i[u.from]=!0)}return n}function da(t,e,r,i,n){for(var o=n.patternDependencies,a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.paint.get(t+"-pattern").value;if("constant"!==l.kind){var p=l.evaluate({zoom:i-1},r,{}),c=l.evaluate({zoom:i},r,{}),h=l.evaluate({zoom:i+1},r,{});o[p]=!0,o[c]=!0,o[h]=!0,r.patterns[u.id]={min:p,mid:c,max:h}}}return r}Uo.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,a=Math.abs(sa(t,0,o,r));if(n)for(var s=0,u=e.length;s<u;s++){var l=e[s]*r,p=s<u-1?e[s+1]*r:t.length;a-=Math.abs(sa(t,l,p,r))}var c=0;for(s=0;s<i.length;s+=3){var h=i[s]*r,f=i[s+1]*r,d=i[s+2]*r;c+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===c?0:Math.abs((c-a)/a)},Uo.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[n][o][a]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r},Fo.default=Oo;var ma=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Xi,this.indexArray=new ln,this.indexArray2=new pn,this.programConfigurations=new Wn(Ro,t.layers,t.zoom),this.segments=new In,this.segments2=new In,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};ma.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("fill",this.layers,e);for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var u=$n(o),l={sourceLayerIndex:s,index:a,geometry:u,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(l.id=o.id),this.hasPattern?this.features.push(da("fill",this.layers,l,this.zoom,e)):this.addFeature(l,u,a,{}),e.featureIndex.insert(o,u,a,s,this.index)}}},ma.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},ma.prototype.addFeatures=function(t,e){for(var r=0,i=this.features;r<i.length;r+=1){var n=i[r],o=n.geometry;this.addFeature(n,o,n.index,e)}},ma.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ma.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ma.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Ro),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},ma.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},ma.prototype.addFeature=function(t,e,r,i){for(var n=0,o=ca(e,500);n<o.length;n+=1){for(var a=o[n],s=0,u=0,l=a;u<l.length;u+=1)s+=l[u].length;for(var p=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray),c=p.vertexLength,h=[],f=[],d=0,m=a;d<m.length;d+=1){var y=m[d];if(0!==y.length){y!==a[0]&&f.push(h.length/2);var v=this.segments2.prepareSegment(y.length,this.layoutVertexArray,this.indexArray2),_=v.vertexLength;this.layoutVertexArray.emplaceBack(y[0].x,y[0].y),this.indexArray2.emplaceBack(_+y.length-1,_),h.push(y[0].x),h.push(y[0].y);for(var g=1;g<y.length;g++)this.layoutVertexArray.emplaceBack(y[g].x,y[g].y),this.indexArray2.emplaceBack(_+g-1,_+g),h.push(y[g].x),h.push(y[g].y);v.vertexLength+=y.length,v.primitiveLength+=y.length}}for(var x=Fo(h,f),b=0;b<x.length;b+=3)this.indexArray.emplaceBack(c+x[b],c+x[b+1],c+x[b+2]);p.vertexLength+=s,p.primitiveLength+=x.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i)},si("FillBucket",ma,{omit:["layers","features"]});var ya={paint:new Ui({"fill-antialias":new Di(vt.paint_fill["fill-antialias"]),"fill-opacity":new Bi(vt.paint_fill["fill-opacity"]),"fill-color":new Bi(vt.paint_fill["fill-color"]),"fill-outline-color":new Bi(vt.paint_fill["fill-outline-color"]),"fill-translate":new Di(vt.paint_fill["fill-translate"]),"fill-translate-anchor":new Di(vt.paint_fill["fill-translate-anchor"]),"fill-pattern":new Ri(vt.paint_fill["fill-pattern"])})},va=function(t){function e(e){t.call(this,e,ya)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e);var r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new ma(t)},e.prototype.queryRadius=function(){return fo(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a){return io(mo(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),i)},e.prototype.isTileClipped=function(){return!0},e}(Vi),_a=Zi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,ga=xa;function xa(t,e,r,i,n){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n,t.readFields(ba,this,e)}function ba(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function wa(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],i+=((r=t[a]).x-e.x)*(e.y+r.y);return i}xa.types=["Unknown","Point","LineString","Polygon"],xa.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,u=[];t.pos<r;){if(o<=0){var l=t.readVarint();i=7&l,o=l>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&u.push(e),e=[]),e.push(new n(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&u.push(e),u},xa.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(i<=0){var p=t.readVarint();r=7&p,i=p>>3}if(i--,1===r||2===r)(n+=t.readSVarint())<a&&(a=n),n>s&&(s=n),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,u,s,l]},xa.prototype.toGeoJSON=function(t,e,r){var i,n,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,u=this.loadGeometry(),l=xa.types[this.type];function p(t){for(var e=0;e<t.length;e++){var r=t[e],i=180-360*(r.y+s)/o;t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90]}}switch(this.type){case 1:var c=[];for(i=0;i<u.length;i++)c[i]=u[i][0];p(u=c);break;case 2:for(i=0;i<u.length;i++)p(u[i]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var r,i,n=[],o=0;o<e;o++){var a=wa(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(r&&n.push(r),r=[t[o]]):r.push(t[o]))}return r&&n.push(r),n}(u),i=0;i<u.length;i++)for(n=0;n<u[i].length;n++)p(u[i][n])}1===u.length?u=u[0]:l="Multi"+l;var h={type:"Feature",geometry:{type:l,coordinates:u},properties:this.properties};return"id"in this&&(h.id=this.id),h};var Ea=Sa;function Sa(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Ta,this,e),this.length=this._features.length}function Ta(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(r))}function Aa(t,e,r){if(3===t){var i=new Ea(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}Sa.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new ga(this._pbf,e,this.extent,this._keys,this._values)};var Ia={VectorTile:function(t,e){this.layers=t.readFields(Aa,{},e)},VectorTileFeature:ga,VectorTileLayer:Ea},za=Ia.VectorTileFeature.types,ka=Math.pow(2,13);function Ca(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,2*Math.floor(i*ka)+a,n*ka*2,o*ka*2,Math.round(s))}var Pa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Ki,this.indexArray=new ln,this.programConfigurations=new Wn(_a,t.layers,t.zoom),this.segments=new In,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Ma(t,e){return t.x===e.x&&(t.x<0||t.x>Jn)||t.y===e.y&&(t.y<0||t.y>Jn)}function La(t){return t.every((function(t){return t.x<0}))||t.every((function(t){return t.x>Jn}))||t.every((function(t){return t.y<0}))||t.every((function(t){return t.y>Jn}))}Pa.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("fill-extrusion",this.layers,e);for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var u=$n(o),l={sourceLayerIndex:s,index:a,geometry:u,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(l.id=o.id),this.hasPattern?this.features.push(da("fill-extrusion",this.layers,l,this.zoom,e)):this.addFeature(l,u,a,{}),e.featureIndex.insert(o,u,a,s,this.index,!0)}}},Pa.prototype.addFeatures=function(t,e){for(var r=0,i=this.features;r<i.length;r+=1){var n=i[r],o=n.geometry;this.addFeature(n,o,n.index,e)}},Pa.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Pa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Pa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Pa.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,_a),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Pa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Pa.prototype.addFeature=function(t,e,r,i){for(var n=0,o=ca(e,500);n<o.length;n+=1){for(var a=o[n],s=0,u=0,l=a;u<l.length;u+=1)s+=l[u].length;for(var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=0,h=a;c<h.length;c+=1){var f=h[c];if(0!==f.length&&!La(f))for(var d=0,m=0;m<f.length;m++){var y=f[m];if(m>=1){var v=f[m-1];if(!Ma(y,v)){p.vertexLength+4>In.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var _=y.sub(v)._perp()._unit(),g=v.dist(y);d+g>32768&&(d=0),Ca(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,0,d),Ca(this.layoutVertexArray,y.x,y.y,_.x,_.y,0,1,d),d+=g,Ca(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,0,d),Ca(this.layoutVertexArray,v.x,v.y,_.x,_.y,0,1,d);var x=p.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+s>In.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray)),"Polygon"===za[t.type]){for(var b=[],w=[],E=p.vertexLength,S=0,T=a;S<T.length;S+=1){var A=T[S];if(0!==A.length){A!==a[0]&&w.push(b.length/2);for(var I=0;I<A.length;I++){var z=A[I];Ca(this.layoutVertexArray,z.x,z.y,0,0,1,1,0),b.push(z.x),b.push(z.y)}}}for(var k=Fo(b,w),C=0;C<k.length;C+=3)this.indexArray.emplaceBack(E+k[C],E+k[C+2],E+k[C+1]);p.primitiveLength+=k.length/3,p.vertexLength+=s}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i)},si("FillExtrusionBucket",Pa,{omit:["layers","features"]});var Da={paint:new Ui({"fill-extrusion-opacity":new Di(vt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Bi(vt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Di(vt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Di(vt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ri(vt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Bi(vt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Bi(vt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Di(vt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Ba=function(t){function e(e){t.call(this,e,Da)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Pa(t)},e.prototype.queryRadius=function(){return fo(this.paint.get("fill-extrusion-translate"))},e.prototype.is3D=function(){return!0},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s,u){var l=mo(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),p=this.paint.get("fill-extrusion-height").evaluate(e,r),c=this.paint.get("fill-extrusion-base").evaluate(e,r),h=function(t,e,r,i){for(var o=[],a=0,s=t;a<s.length;a+=1){var u=s[a],l=[u.x,u.y,0,1];bo(l,l,e),o.push(new n(l[0]/l[3],l[1]/l[3]))}return o}(l,u),f=function(t,e,r,i){for(var o=[],a=[],s=i[8]*e,u=i[9]*e,l=i[10]*e,p=i[11]*e,c=i[8]*r,h=i[9]*r,f=i[10]*r,d=i[11]*r,m=0,y=t;m<y.length;m+=1){for(var v=[],_=[],g=0,x=y[m];g<x.length;g+=1){var b=x[g],w=b.x,E=b.y,S=i[0]*w+i[4]*E+i[12],T=i[1]*w+i[5]*E+i[13],A=i[2]*w+i[6]*E+i[14],I=i[3]*w+i[7]*E+i[15],z=A+l,k=I+p,C=S+c,P=T+h,M=A+f,L=I+d,D=new n((S+s)/k,(T+u)/k);D.z=z/k,v.push(D);var B=new n(C/L,P/L);B.z=M/L,_.push(B)}o.push(v),a.push(_)}return[o,a]}(i,c,p,u);return function(t,e,r){var i=1/0;io(r,e)&&(i=Fa(r,e[0]));for(var n=0;n<e.length;n++)for(var o=e[n],a=t[n],s=0;s<o.length-1;s++){var u=o[s],l=o[s+1],p=a[s],c=[u,l,a[s+1],p,u];eo(r,c)&&(i=Math.min(i,Fa(r,c)))}return i!==1/0&&i}(f[0],f[1],h)},e}(Vi);function Ra(t,e){return t.x*e.x+t.y*e.y}function Fa(t,e){if(1===t.length){var r=e[0],i=e[1],n=e[3],o=t[0],a=i.sub(r),s=n.sub(r),u=o.sub(r),l=Ra(a,a),p=Ra(a,s),c=Ra(s,s),h=Ra(u,a),f=Ra(u,s),d=l*c-p*p,m=(c*h-p*f)/d,y=(l*f-p*h)/d,v=1-m-y;return r.z*v+i.z*m+n.z*y}for(var _=1/0,g=0,x=e;g<x.length;g+=1){var b=x[g];_=Math.min(_,b.z)}return _}var Oa=Zi([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Ua=Ia.VectorTileFeature.types,Va=63,Na=Math.cos(Math.PI/180*37.5),ja=.5,qa=Math.pow(2,14)/ja;function Za(t,e,r,i,n,o,a){t.emplaceBack(e.x,e.y,i?1:0,n?1:-1,Math.round(Va*r.x)+128,Math.round(Va*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*ja&63)<<2,a*ja>>6)}var Ga=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.features=[],this.hasPattern=!1,this.layoutVertexArray=new Hi,this.indexArray=new ln,this.programConfigurations=new Wn(Oa,t.layers,t.zoom),this.segments=new In,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Xa(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(qa-1)}Ga.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("line",this.layers,e);for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ti(this.zoom),o)){var u=$n(o),l={sourceLayerIndex:s,index:a,geometry:u,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(l.id=o.id),this.hasPattern?this.features.push(da("line",this.layers,l,this.zoom,e)):this.addFeature(l,u,a,{}),e.featureIndex.insert(o,u,a,s,this.index)}}},Ga.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Ga.prototype.addFeatures=function(t,e){for(var r=0,i=this.features;r<i.length;r+=1){var n=i[r],o=n.geometry;this.addFeature(n,o,n.index,e)}},Ga.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ga.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ga.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Oa),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Ga.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ga.prototype.addFeature=function(t,e,r,i){for(var n=this.layers[0].layout,o=n.get("line-join").evaluate(t,{}),a=n.get("line-cap"),s=n.get("line-miter-limit"),u=n.get("line-round-limit"),l=0,p=e;l<p.length;l+=1){var c=p[l];this.addLine(c,t,o,a,s,u,r,i)}},Ga.prototype.addLine=function(t,e,r,i,n,o,a,s){var u=null;e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")&&(u={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var l="Polygon"===Ua[e.type],p=t.length;p>=2&&t[p-1].equals(t[p-2]);)p--;for(var c=0;c<p-1&&t[c].equals(t[c+1]);)c++;if(!(p<(l?3:2))){u&&(u.tileTotal=function(t,e,r){for(var i,n,o=0,a=e;a<r-1;a++)i=t[a],n=t[a+1],o+=i.dist(n);return o}(t,c,p)),"bevel"===r&&(n=1.05);var h=Jn/(512*this.overscaling)*15,f=t[c],d=this.segments.prepareSegment(10*p,this.layoutVertexArray,this.indexArray);this.distance=0;var m,y,v,_=i,g=l?"butt":i,x=!0,b=void 0,w=void 0,E=void 0,S=void 0;this.e1=this.e2=this.e3=-1,l&&(m=t[p-2],S=f.sub(m)._unit()._perp());for(var T=c;T<p;T++)if(!(w=l&&T===p-1?t[c+1]:t[T+1])||!t[T].equals(w)){S&&(E=S),m&&(b=m),m=t[T],S=w?w.sub(m)._unit()._perp():E;var A=(E=E||S).add(S);0===A.x&&0===A.y||A._unit();var I=A.x*S.x+A.y*S.y,z=0!==I?1/I:1/0,k=I<Na&&b&&w;if(k&&T>c){var C=m.dist(b);if(C>2*h){var P=m.sub(m.sub(b)._mult(h/C)._round());this.distance+=P.dist(b),this.addCurrentVertex(P,this.distance,E.mult(1),0,0,!1,d,u),b=P}}var M=b&&w,L=M?r:w?_:g;if(M&&"round"===L&&(z<o?L="miter":z<=2&&(L="fakeround")),"miter"===L&&z>n&&(L="bevel"),"bevel"===L&&(z>2&&(L="flipbevel"),z<n&&(L="miter")),b&&(this.distance+=m.dist(b)),"miter"===L)A._mult(z),this.addCurrentVertex(m,this.distance,A,0,0,!1,d,u);else if("flipbevel"===L){if(z>100)A=S.clone().mult(-1);else{var D=E.x*S.y-E.y*S.x>0?-1:1,B=z*E.add(S).mag()/E.sub(S).mag();A._perp()._mult(B*D)}this.addCurrentVertex(m,this.distance,A,0,0,!1,d,u),this.addCurrentVertex(m,this.distance,A.mult(-1),0,0,!1,d,u)}else if("bevel"===L||"fakeround"===L){var R=E.x*S.y-E.y*S.x>0,F=-Math.sqrt(z*z-1);if(R?(v=0,y=F):(y=0,v=F),x||this.addCurrentVertex(m,this.distance,E,y,v,!1,d,u),"fakeround"===L){for(var O=Math.floor(8*(.5-(I-.5))),U=void 0,V=0;V<O;V++)U=S.mult((V+1)/(O+1))._add(E)._unit(),this.addPieSliceVertex(m,this.distance,U,R,d,u);this.addPieSliceVertex(m,this.distance,A,R,d,u);for(var N=O-1;N>=0;N--)U=E.mult((N+1)/(O+1))._add(S)._unit(),this.addPieSliceVertex(m,this.distance,U,R,d,u)}w&&this.addCurrentVertex(m,this.distance,S,-y,-v,!1,d,u)}else"butt"===L?(x||this.addCurrentVertex(m,this.distance,E,0,0,!1,d,u),w&&this.addCurrentVertex(m,this.distance,S,0,0,!1,d,u)):"square"===L?(x||(this.addCurrentVertex(m,this.distance,E,1,1,!1,d,u),this.e1=this.e2=-1),w&&this.addCurrentVertex(m,this.distance,S,-1,-1,!1,d,u)):"round"===L&&(x||(this.addCurrentVertex(m,this.distance,E,0,0,!1,d,u),this.addCurrentVertex(m,this.distance,E,1,1,!0,d,u),this.e1=this.e2=-1),w&&(this.addCurrentVertex(m,this.distance,S,-1,-1,!0,d,u),this.addCurrentVertex(m,this.distance,S,0,0,!1,d,u)));if(k&&T<p-1){var j=m.dist(w);if(j>2*h){var q=m.add(w.sub(m)._mult(h/j)._round());this.distance+=q.dist(m),this.addCurrentVertex(q,this.distance,S.mult(1),0,0,!1,d,u),m=q}}x=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a,s)}},Ga.prototype.addCurrentVertex=function(t,e,r,i,n,o,a,s){var u,l=this.layoutVertexArray,p=this.indexArray;s&&(e=Xa(e,s)),u=r.clone(),i&&u._sub(r.perp()._mult(i)),Za(l,t,u,o,!1,i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,u=r.mult(-1),n&&u._sub(r.perp()._mult(n)),Za(l,t,u,o,!0,-n,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>qa/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,i,n,o,a))},Ga.prototype.addPieSliceVertex=function(t,e,r,i,n,o){r=r.mult(i?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=Xa(e,o)),Za(a,t,r,!1,i,0,e),this.e3=n.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),n.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},si("LineBucket",Ga,{omit:["layers","features"]});var Wa=new Ui({"line-cap":new Di(vt.layout_line["line-cap"]),"line-join":new Bi(vt.layout_line["line-join"]),"line-miter-limit":new Di(vt.layout_line["line-miter-limit"]),"line-round-limit":new Di(vt.layout_line["line-round-limit"])}),Ka={paint:new Ui({"line-opacity":new Bi(vt.paint_line["line-opacity"]),"line-color":new Bi(vt.paint_line["line-color"]),"line-translate":new Di(vt.paint_line["line-translate"]),"line-translate-anchor":new Di(vt.paint_line["line-translate-anchor"]),"line-width":new Bi(vt.paint_line["line-width"]),"line-gap-width":new Bi(vt.paint_line["line-gap-width"]),"line-offset":new Bi(vt.paint_line["line-offset"]),"line-blur":new Bi(vt.paint_line["line-blur"]),"line-dasharray":new Fi(vt.paint_line["line-dasharray"]),"line-pattern":new Ri(vt.paint_line["line-pattern"]),"line-gradient":new Oi(vt.paint_line["line-gradient"])}),layout:Wa},Ha=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Ti(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,i,n){return r=c({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,i,n)},e}(Bi))(Ka.paint.properties["line-width"].specification);Ha.useIntegerZoom=!0;var Ja=function(t){function e(e){t.call(this,e,Ka)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Mo(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=Ha.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ga(t)},e.prototype.queryRadius=function(t){var e=t,r=Ya(ho("line-width",this,e),ho("line-gap-width",this,e)),i=ho("line-offset",this,e);return r/2+Math.abs(i)+fo(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s){var u=mo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),l=s/2*Ya(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),p=this.paint.get("line-offset").evaluate(e,r);return p&&(i=function(t,e){for(var r=[],i=new n(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],u=0;u<a.length;u++){var l=a[u-1],p=a[u],c=a[u+1],h=0===u?i:p.sub(l)._unit()._perp(),f=u===a.length-1?i:c.sub(p)._unit()._perp(),d=h._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(p))}r.push(s)}return r}(i,p*s)),function(t,e,r){for(var i=0;i<e.length;i++){var n=e[i];if(t.length>=3)for(var o=0;o<n.length;o++)if(po(t,n[o]))return!0;if(no(t,n,r))return!0}return!1}(u,i,l)},e.prototype.isTileClipped=function(){return!0},e}(Vi);function Ya(t,e){return e>0?e+2*t:t}var $a=Zi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),Qa=Zi([{name:"a_projected_pos",components:3,type:"Float32"}],4),ts=(Zi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Zi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),es=(Zi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),Zi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),rs=Zi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function is(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var i=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),Si.applyArabicShaping&&(t=Si.applyArabicShaping(t)),t}(t.text,e,r)})),t}Zi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"}]),Zi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"radialTextOffset"}]),Zi([{type:"Float32",name:"offsetX"}]),Zi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var ns={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},os=function(t){function e(e,r,i,n){t.call(this,e,r),this.angle=i,void 0!==n&&(this.segment=n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(n);si("Anchor",os);var as=256;function ss(t,e){var r=e.expression;if("constant"===r.kind)return{functionType:"constant",layoutSize:r.evaluate(new Ti(t+1))};if("source"===r.kind)return{functionType:"source"};for(var i=r.zoomStops,n=0;n<i.length&&i[n]<=t;)n++;for(var o=n=Math.max(0,n-1);o<i.length&&i[o]<t+1;)o++;o=Math.min(i.length-1,o);var a={min:i[n],max:i[o]};return"composite"===r.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:r.evaluate(new Ti(t+1)),zoomRange:a,sizeRange:{min:r.evaluate(new Ti(a.min)),max:r.evaluate(new Ti(a.max))},propertyValue:e.value}}function us(t,e,r){var i=e;return"source"===t.functionType?r.lowerSize/as:"composite"===t.functionType?pe(r.lowerSize/as,r.upperSize/as,i.uSizeT):i.uSize}function ls(t,e,r){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var i=t.propertyValue,n=t.zoomRange,o=t.sizeRange,a=l(br(i,r.specification).interpolationFactor(e,n.min,n.max),0,1);return{uSizeT:0,uSize:o.min+a*(o.max-o.min)}}var s=t.propertyValue,u=t.zoomRange;return{uSizeT:l(br(s,r.specification).interpolationFactor(e,u.min,u.max),0,1),uSize:0}}var ps=Object.freeze({getSizeData:ss,evaluateSizeForFeature:us,evaluateSizeForZoom:ls,SIZE_PACK_FACTOR:as}),cs=Ia.VectorTileFeature.types,hs=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function fs(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,Math.round(32*i),Math.round(32*n),o,a,s?s[0]:0,s?s[1]:0)}function ds(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var ms=function(t){this.layoutVertexArray=new Yi,this.indexArray=new ln,this.programConfigurations=t,this.segments=new In,this.dynamicLayoutVertexArray=new $i,this.opacityVertexArray=new Qi,this.placedSymbolArray=new vn};ms.prototype.upload=function(t,e,r,i){r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,$a.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Qa.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,hs,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(t)},ms.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},si("SymbolBuffers",ms);var ys=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new In,this.collisionVertexArray=new rn};ys.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,ts.members,!0)},ys.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},si("CollisionBuffers",ys);var vs=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ss(this.zoom,e["text-size"]),this.iconSizeData=ss(this.zoom,e["icon-size"]);var r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==n&&void 0!==i.constantOr(1);var o="viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement")),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id})),this.sourceID=t.sourceID};vs.prototype.createArrays=function(){this.text=new ms(new Wn($a.members,this.layers,this.zoom,(function(t){return/^text/.test(t)}))),this.icon=new ms(new Wn($a.members,this.layers,this.zoom,(function(t){return/^icon/.test(t)}))),this.collisionBox=new ys(en,es.members,pn),this.collisionCircle=new ys(en,rs.members,ln),this.glyphOffsetArray=new bn,this.lineVertexArray=new En,this.symbolInstances=new gn},vs.prototype.calculateGlyphDependencies=function(t,e,r,i){for(var n=0;n<t.length;n++)if(e[t.charCodeAt(n)]=!0,r&&i){var o=ns[t.charAt(n)];o&&(e[o.charCodeAt(0)]=!0)}},vs.prototype.populate=function(t,e){var r=this.layers[0],i=r.layout,n=i.get("text-font"),o=i.get("text-field"),a=i.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.toString().length>0)&&("constant"!==n.value.kind||n.value.value.length>0),u="constant"!==a.value.kind||a.value.value&&a.value.value.length>0,l=i.get("symbol-sort-key");if(this.features=[],s||u){for(var p=e.iconDependencies,c=e.glyphDependencies,h=new Ti(this.zoom),f=0,d=t;f<d.length;f+=1){var m=d[f],y=m.feature,v=m.index,_=m.sourceLayerIndex;if(r._featureFilter(h,y)){var g=void 0;if(s){var x=r.getValueAndResolveTokens("text-field",y);g=is(x instanceof jt?x:jt.fromString(x),r,y)}var b=void 0;if(u&&(b=r.getValueAndResolveTokens("icon-image",y)),g||b){var w=this.sortFeaturesByKey?l.evaluate(y,{}):void 0,E={text:g,icon:b,index:v,sourceLayerIndex:_,geometry:$n(y),properties:y.properties,type:cs[y.type],sortKey:w};if(void 0!==y.id&&(E.id=y.id),this.features.push(E),b&&(p[b]=!0),g)for(var S=n.evaluate(y,{}).join(","),T="map"===i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement"),A=0,I=g.sections;A<I.length;A+=1){var z=I[A],k=fi(g.toString()),C=z.fontStack||S,P=c[C]=c[C]||{};this.calculateGlyphDependencies(z.text,P,T,k)}}}}"line"===i.get("symbol-placement")&&(this.features=function(t){var e={},r={},i=[],n=0;function o(e){i.push(t[e]),n++}function a(t,e,n){var o=r[t];return delete r[t],r[e]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(n[0]),o}function s(t,r,n){var o=e[r];return delete e[r],e[t]=o,i[o].geometry[0].shift(),i[o].geometry[0]=n[0].concat(i[o].geometry[0]),o}function u(t,e,r){var i=r?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var l=0;l<t.length;l++){var p=t[l],c=p.geometry,h=p.text?p.text.toString():null;if(h){var f=u(h,c),d=u(h,c,!0);if(f in r&&d in e&&r[f]!==e[d]){var m=s(f,d,c),y=a(f,d,i[m].geometry);delete e[f],delete r[d],r[u(h,i[y].geometry,!0)]=y,i[m].geometry=null}else f in r?a(f,d,c):d in e?s(f,d,c):(o(l),e[f]=n-1,r[d]=n-1)}else o(l)}return i.filter((function(t){return t.geometry}))}(this.features)),this.sortFeaturesByKey&&this.features.sort((function(t,e){return t.sortKey-e.sortKey}))}},vs.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},vs.prototype.isEmpty=function(){return 0===this.symbolInstances.length},vs.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},vs.prototype.upload=function(t){this.uploaded||(this.collisionBox.upload(t),this.collisionCircle.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},vs.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},vs.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:i},a<e.length-1&&(i+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},vs.prototype.addSymbols=function(t,e,r,i,n,o,a,s,u,l){for(var p=t.indexArray,c=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,f=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray,o.sortKey),d=this.glyphOffsetArray.length,m=f.vertexLength,y=0,v=e;y<v.length;y+=1){var _=v[y],g=_.tl,x=_.tr,b=_.bl,w=_.br,E=_.tex,S=f.vertexLength,T=_.glyphOffset[1];fs(c,s.x,s.y,g.x,T+g.y,E.x,E.y,r),fs(c,s.x,s.y,x.x,T+x.y,E.x+E.w,E.y,r),fs(c,s.x,s.y,b.x,T+b.y,E.x,E.y+E.h,r),fs(c,s.x,s.y,w.x,T+w.y,E.x+E.w,E.y+E.h,r),ds(h,s,0),p.emplaceBack(S,S+1,S+2),p.emplaceBack(S+1,S+2,S+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(_.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,m,u,l,s.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],a,!1,0),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{})},vs.prototype._addCollisionDebugVertex=function(t,e,r,i,n,o){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,i,n,Math.round(o.x),Math.round(o.y))},vs.prototype.addCollisionDebugVertices=function(t,e,r,i,o,a,s,u){var l=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),p=l.vertexLength,c=o.layoutVertexArray,h=o.collisionVertexArray,f=s.anchorX,d=s.anchorY;if(this._addCollisionDebugVertex(c,h,a,f,d,new n(t,e)),this._addCollisionDebugVertex(c,h,a,f,d,new n(r,e)),this._addCollisionDebugVertex(c,h,a,f,d,new n(r,i)),this._addCollisionDebugVertex(c,h,a,f,d,new n(t,i)),l.vertexLength+=4,u){var m=o.indexArray;m.emplaceBack(p,p+1,p+2),m.emplaceBack(p,p+2,p+3),l.primitiveLength+=2}else{var y=o.indexArray;y.emplaceBack(p,p+1),y.emplaceBack(p+1,p+2),y.emplaceBack(p+2,p+3),y.emplaceBack(p+3,p),l.primitiveLength+=4}},vs.prototype.addDebugCollisionBoxes=function(t,e,r){for(var i=t;i<e;i++){var n=this.collisionBoxArray.get(i),o=n.x1,a=n.y1,s=n.x2,u=n.y2,l=n.radius>0;this.addCollisionDebugVertices(o,a,s,u,l?this.collisionCircle:this.collisionBox,n.anchorPoint,r,l)}},vs.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e)}},vs.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,i,n){for(var o={},a=e;a<r;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},o.textFeatureIndex=s.featureIndex;break}o.textCircles||(o.textCircles=[],o.textFeatureIndex=s.featureIndex),o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var u=i;u<n;u++){var l=t.get(u);if(0===l.radius){o.iconBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY},o.iconFeatureIndex=l.featureIndex;break}}return o},vs.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex))}},vs.prototype.hasTextData=function(){return this.text.segments.get().length>0},vs.prototype.hasIconData=function(){return this.icon.segments.get().length>0},vs.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},vs.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},vs.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),r=e.vertexStartIndex+4*e.numGlyphs,i=e.vertexStartIndex;i<r;i+=4)this.text.indexArray.emplaceBack(i,i+1,i+2),this.text.indexArray.emplaceBack(i+1,i+2,i+3)},vs.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var r=[],i=0;i<this.symbolInstances.length;i++)r.push(i);for(var n=Math.sin(t),o=Math.cos(t),a=[],s=[],u=0;u<this.symbolInstances.length;u++){var l=this.symbolInstances.get(u);a.push(0|Math.round(n*l.anchorX+o*l.anchorY)),s.push(l.featureIndex)}r.sort((function(t,e){return a[t]-a[e]||s[e]-s[t]})),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var p=0,c=r;p<c.length;p+=1){var h=c[p],f=this.symbolInstances.get(h);this.featureSortOrder.push(f.featureIndex),[f.rightJustifiedTextSymbolIndex,f.centerJustifiedTextSymbolIndex,f.leftJustifiedTextSymbolIndex].forEach((function(t,r,i){t>=0&&i.indexOf(t)===r&&e.addIndicesForPlacedTextSymbol(t)})),f.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(f.verticalPlacedTextSymbolIndex);var d=this.icon.placedSymbolArray.get(h);if(d.numGlyphs){var m=d.vertexStartIndex;this.icon.indexArray.emplaceBack(m,m+1,m+2),this.icon.indexArray.emplaceBack(m+1,m+2,m+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},si("SymbolBucket",vs,{omit:["layers","collisionBoxArray","features","compareText"]}),vs.MAX_GLYPHS=65535,vs.addDynamicAttributes=ds;var _s=new Ui({"symbol-placement":new Di(vt.layout_symbol["symbol-placement"]),"symbol-spacing":new Di(vt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Di(vt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Bi(vt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Di(vt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Di(vt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Di(vt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Di(vt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Di(vt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Bi(vt.layout_symbol["icon-size"]),"icon-text-fit":new Di(vt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Di(vt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Bi(vt.layout_symbol["icon-image"]),"icon-rotate":new Bi(vt.layout_symbol["icon-rotate"]),"icon-padding":new Di(vt.layout_symbol["icon-padding"]),"icon-keep-upright":new Di(vt.layout_symbol["icon-keep-upright"]),"icon-offset":new Bi(vt.layout_symbol["icon-offset"]),"icon-anchor":new Bi(vt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Di(vt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Di(vt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Di(vt.layout_symbol["text-rotation-alignment"]),"text-field":new Bi(vt.layout_symbol["text-field"]),"text-font":new Bi(vt.layout_symbol["text-font"]),"text-size":new Bi(vt.layout_symbol["text-size"]),"text-max-width":new Bi(vt.layout_symbol["text-max-width"]),"text-line-height":new Di(vt.layout_symbol["text-line-height"]),"text-letter-spacing":new Bi(vt.layout_symbol["text-letter-spacing"]),"text-justify":new Bi(vt.layout_symbol["text-justify"]),"text-radial-offset":new Bi(vt.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Di(vt.layout_symbol["text-variable-anchor"]),"text-anchor":new Bi(vt.layout_symbol["text-anchor"]),"text-max-angle":new Di(vt.layout_symbol["text-max-angle"]),"text-rotate":new Bi(vt.layout_symbol["text-rotate"]),"text-padding":new Di(vt.layout_symbol["text-padding"]),"text-keep-upright":new Di(vt.layout_symbol["text-keep-upright"]),"text-transform":new Bi(vt.layout_symbol["text-transform"]),"text-offset":new Bi(vt.layout_symbol["text-offset"]),"text-allow-overlap":new Di(vt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Di(vt.layout_symbol["text-ignore-placement"]),"text-optional":new Di(vt.layout_symbol["text-optional"])}),gs={paint:new Ui({"icon-opacity":new Bi(vt.paint_symbol["icon-opacity"]),"icon-color":new Bi(vt.paint_symbol["icon-color"]),"icon-halo-color":new Bi(vt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Bi(vt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Bi(vt.paint_symbol["icon-halo-blur"]),"icon-translate":new Di(vt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Di(vt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Bi(vt.paint_symbol["text-opacity"]),"text-color":new Bi(vt.paint_symbol["text-color"]),"text-halo-color":new Bi(vt.paint_symbol["text-halo-color"]),"text-halo-width":new Bi(vt.paint_symbol["text-halo-width"]),"text-halo-blur":new Bi(vt.paint_symbol["text-halo-blur"]),"text-translate":new Di(vt.paint_symbol["text-translate"]),"text-translate-anchor":new Di(vt.paint_symbol["text-translate-anchor"])}),layout:_s},xs=function(t){function e(e){t.call(this,e,gs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,i=this.layout.get(t).evaluate(e,{}),n=this._unevaluatedLayout._values[t];return n.isDataDriven()||mr(n.value)?i:(r=e.properties,i.replace(/{([^{}]+)}/g,(function(t,e){return e in r?String(r[e]):""})))},e.prototype.createBucket=function(t){return new vs(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Vi),bs={paint:new Ui({"background-color":new Di(vt.paint_background["background-color"]),"background-pattern":new Fi(vt.paint_background["background-pattern"]),"background-opacity":new Di(vt.paint_background["background-opacity"])})},ws=function(t){function e(e){t.call(this,e,bs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Vi),Es={paint:new Ui({"raster-opacity":new Di(vt.paint_raster["raster-opacity"]),"raster-hue-rotate":new Di(vt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Di(vt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Di(vt.paint_raster["raster-brightness-max"]),"raster-saturation":new Di(vt.paint_raster["raster-saturation"]),"raster-contrast":new Di(vt.paint_raster["raster-contrast"]),"raster-resampling":new Di(vt.paint_raster["raster-resampling"]),"raster-fade-duration":new Di(vt.paint_raster["raster-fade-duration"])})},Ss=function(t){function e(e){t.call(this,e,Es)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Vi),Ts=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t)},e}(Vi),As={circle:Eo,heatmap:Lo,hillshade:Bo,fill:va,"fill-extrusion":Ba,line:Ja,symbol:xs,background:ws,raster:Ss};function Is(t){for(var e=0,r=0,i=0,n=t;i<n.length;i+=1){var o=n[i];e+=o.w*o.h,r=Math.max(r,o.w)}t.sort((function(t,e){return e.h-t.h}));for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,u=0,l=0,p=t;l<p.length;l+=1)for(var c=p[l],h=a.length-1;h>=0;h--){var f=a[h];if(!(c.w>f.w||c.h>f.h)){if(c.x=f.x,c.y=f.y,u=Math.max(u,c.y+c.h),s=Math.max(s,c.x+c.w),c.w===f.w&&c.h===f.h){var d=a.pop();h<a.length&&(a[h]=d)}else c.h===f.h?(f.x+=c.w,f.w-=c.w):c.w===f.w?(f.y+=c.h,f.h-=c.h):(a.push({x:f.x+c.w,y:f.y,w:f.w-c.w,h:c.h}),f.y+=c.h,f.h-=c.h);break}}return{w:s,h:u,fill:e/(s*u)||0}}var zs=function(t,e){var r=e.pixelRatio,i=e.version;this.paddedRect=t,this.pixelRatio=r,this.version=i},ks={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};ks.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},ks.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},ks.tlbr.get=function(){return this.tl.concat(this.br)},ks.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(zs.prototype,ks);var Cs=function(t,e){var r={},i={};this.haveRenderCallbacks=[];var n=[];this.addImages(t,r,n),this.addImages(e,i,n);var o=Is(n),a=o.w,s=o.h,u=new Co({width:a||1,height:s||1});for(var l in t){var p=t[l],c=r[l].paddedRect;Co.copy(p.data,u,{x:0,y:0},{x:c.x+1,y:c.y+1},p.data)}for(var h in e){var f=e[h],d=i[h].paddedRect,m=d.x+1,y=d.y+1,v=f.data.width,_=f.data.height;Co.copy(f.data,u,{x:0,y:0},{x:m,y:y},f.data),Co.copy(f.data,u,{x:0,y:_-1},{x:m,y:y-1},{width:v,height:1}),Co.copy(f.data,u,{x:0,y:0},{x:m,y:y+_},{width:v,height:1}),Co.copy(f.data,u,{x:v-1,y:0},{x:m-1,y:y},{width:1,height:_}),Co.copy(f.data,u,{x:0,y:0},{x:m+v,y:y},{width:1,height:_})}this.image=u,this.iconPositions=r,this.patternPositions=i};Cs.prototype.addImages=function(t,e,r){for(var i in t){var n=t[i],o={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(o),e[i]=new zs(o,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}},Cs.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},Cs.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var i=t.tl,n=i[0],o=i[1];r.update(e.data,void 0,{x:n,y:o})}},si("ImagePosition",zs),si("ImageAtlas",Cs);var Ps=self.HTMLImageElement,Ms=self.HTMLCanvasElement,Ls=self.HTMLVideoElement,Ds=self.ImageData,Bs=function(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,i)};Bs.prototype.update=function(t,e,r){var i=t.width,n=t.height,o=!(this.size&&this.size[0]===i&&this.size[1]===n||r),a=this.context,s=a.gl;if(this.useMipmap=Boolean(e&&e.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!e||!1!==e.premultiply)),o)this.size=[i,n],t instanceof Ps||t instanceof Ms||t instanceof Ls||t instanceof Ds?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,i,n,0,this.format,s.UNSIGNED_BYTE,t.data);else{var u=r||{x:0,y:0},l=u.x,p=u.y;t instanceof Ps||t instanceof Ms||t instanceof Ls||t instanceof Ds?s.texSubImage2D(s.TEXTURE_2D,0,l,p,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,l,p,i,n,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},Bs.prototype.bind=function(t,e,r){var i=this.context.gl;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},Bs.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Bs.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Rs=function(t,e,r,i,n){var o,a,s=8*n-i-1,u=(1<<s)-1,l=u>>1,p=-7,c=r?n-1:0,h=r?-1:1,f=t[e+c];for(c+=h,o=f&(1<<-p)-1,f>>=-p,p+=s;p>0;o=256*o+t[e+c],c+=h,p-=8);for(a=o&(1<<-p)-1,o>>=-p,p+=i;p>0;a=256*a+t[e+c],c+=h,p-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=l}return(f?-1:1)*a*Math.pow(2,o-i)},Fs=function(t,e,r,i,n,o){var a,s,u,l=8*o-n-1,p=(1<<l)-1,c=p>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=p):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=p?(s=0,a=p):a+c>=1?(s=(e*u-1)*Math.pow(2,n),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;t[r+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,l+=n;l>0;t[r+f]=255&a,f+=d,a/=256,l-=8);t[r+f-d]|=128*m},Os=Us;function Us(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function Vs(t){return t.type===Us.Bytes?t.readVarint()+t.pos:t.pos+1}function Ns(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function js(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function qs(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function Zs(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function Gs(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function Xs(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function Ws(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function Ks(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function Hs(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function Js(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function Ys(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function $s(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Qs(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function tu(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Us.Varint=0,Us.Fixed64=1,Us.Bytes=2,Us.Fixed32=5,Us.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=$s(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=tu(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=$s(this.buf,this.pos)+4294967296*$s(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=$s(this.buf,this.pos)+4294967296*tu(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Rs(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Rs(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(i=(112&(n=o[r.pos++]))>>4,n<128)return Ns(t,i,e);if(i|=(127&(n=o[r.pos++]))<<3,n<128)return Ns(t,i,e);if(i|=(127&(n=o[r.pos++]))<<10,n<128)return Ns(t,i,e);if(i|=(127&(n=o[r.pos++]))<<17,n<128)return Ns(t,i,e);if(i|=(127&(n=o[r.pos++]))<<24,n<128)return Ns(t,i,e);if(i|=(1&(n=o[r.pos++]))<<31,n<128)return Ns(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var i="",n=e;n<r;){var o,a,s,u=t[n],l=null,p=u>239?4:u>223?3:u>191?2:1;if(n+p>r)break;1===p?u<128&&(l=u):2===p?128==(192&(o=t[n+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===p?(o=t[n+1],a=t[n+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===p&&(o=t[n+1],a=t[n+2],s=t[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,p=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=p}return i}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=Vs(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=Vs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Us.Varint)for(;this.buf[this.pos++]>127;);else if(e===Us.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Us.Fixed32)this.pos+=4;else{if(e!==Us.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Qs(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Qs(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Qs(this.buf,-1&t,this.pos),Qs(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Qs(this.buf,-1&t,this.pos),Qs(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&js(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Fs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Fs(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&js(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,Us.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,qs,e)},writePackedSVarint:function(t,e){this.writeMessage(t,Zs,e)},writePackedBoolean:function(t,e){this.writeMessage(t,Ws,e)},writePackedFloat:function(t,e){this.writeMessage(t,Gs,e)},writePackedDouble:function(t,e){this.writeMessage(t,Xs,e)},writePackedFixed32:function(t,e){this.writeMessage(t,Ks,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,Hs,e)},writePackedFixed64:function(t,e){this.writeMessage(t,Js,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,Ys,e)},writeBytesField:function(t,e){this.writeTag(t,Us.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Us.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Us.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Us.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Us.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Us.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Us.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Us.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Us.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Us.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var eu=3;function ru(t,e,r){1===t&&r.readMessage(iu,e)}function iu(t,e,r){if(3===t){var i=r.readMessage(nu,{}),n=i.id,o=i.bitmap,a=i.width,s=i.height,u=i.left,l=i.top,p=i.advance;e.push({id:n,bitmap:new ko({width:a+2*eu,height:s+2*eu},o),metrics:{width:a,height:s,left:u,top:l,advance:p}})}}function nu(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var ou=eu,au=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,y(["receive"],this),this.target.addEventListener("message",this.receive,!1)};function su(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}au.prototype.send=function(t,e,r,i){var n=this,o=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[o]=r);var a=[];if(this.target.postMessage({targetMapId:i,sourceMapId:this.mapId,type:t,id:String(o),data:li(e,a)},a),r)return{cancel:function(){n.callbacks[o]=null,n.target.postMessage({targetMapId:i,sourceMapId:n.mapId,type:"<cancel>",id:String(o)})}}},au.prototype.receive=function(t){var e,r=this,i=t.data,n=i.id;if(!i.targetMapId||this.mapId===i.targetMapId){var o=function(t,e){delete r.callbacks[n];var i=[];r.target.postMessage({sourceMapId:r.mapId,type:"<response>",id:String(n),error:t?li(t):null,data:li(e,i)},i)};if("<response>"===i.type||"<cancel>"===i.type)e=this.callbacks[i.id],delete this.callbacks[i.id],e&&i.error?e(pi(i.error)):e&&e(null,pi(i.data));else if(void 0!==i.id&&this.parent[i.type]){this.callbacks[i.id]=null;var a=this.parent[i.type](i.sourceMapId,pi(i.data),o);a&&null===this.callbacks[i.id]&&(this.callbacks[i.id]=a.cancel)}else if(void 0!==i.id&&this.parent.getWorkerSource){var s=i.type.split("."),u=pi(i.data);this.parent.getWorkerSource(i.sourceMapId,s[0],u.source)[s[1]](u,o)}else this.parent[i.type](pi(i.data))}},au.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var uu=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};uu.prototype.setNorthEast=function(t){return this._ne=t instanceof lu?new lu(t.lng,t.lat):lu.convert(t),this},uu.prototype.setSouthWest=function(t){return this._sw=t instanceof lu?new lu(t.lng,t.lat):lu.convert(t),this},uu.prototype.extend=function(t){var e,r,i=this._sw,n=this._ne;if(t instanceof lu)e=t,r=t;else{if(!(t instanceof uu))return Array.isArray(t)?t.every(Array.isArray)?this.extend(uu.convert(t)):this.extend(lu.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return i||n?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),n.lng=Math.max(r.lng,n.lng),n.lat=Math.max(r.lat,n.lat)):(this._sw=new lu(e.lng,e.lat),this._ne=new lu(r.lng,r.lat)),this},uu.prototype.getCenter=function(){return new lu((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},uu.prototype.getSouthWest=function(){return this._sw},uu.prototype.getNorthEast=function(){return this._ne},uu.prototype.getNorthWest=function(){return new lu(this.getWest(),this.getNorth())},uu.prototype.getSouthEast=function(){return new lu(this.getEast(),this.getSouth())},uu.prototype.getWest=function(){return this._sw.lng},uu.prototype.getSouth=function(){return this._sw.lat},uu.prototype.getEast=function(){return this._ne.lng},uu.prototype.getNorth=function(){return this._ne.lat},uu.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},uu.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},uu.prototype.isEmpty=function(){return!(this._sw&&this._ne)},uu.convert=function(t){return!t||t instanceof uu?t:new uu(t)};var lu=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};function pu(t){return 2*Math.PI*6378137*Math.cos(t*Math.PI/180)}function cu(t){return(180+t)/360}function hu(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function fu(t,e){return t/pu(e)}function du(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}lu.prototype.wrap=function(){return new lu(p(this.lng,-180,180),this.lat)},lu.prototype.toArray=function(){return[this.lng,this.lat]},lu.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},lu.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new uu(new lu(this.lng-r,this.lat-e),new lu(this.lng+r,this.lat+e))},lu.convert=function(t){if(t instanceof lu)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new lu(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new lu(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var mu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};mu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=lu.convert(t);return new mu(cu(r.lng),hu(r.lat),fu(e,r.lat))},mu.prototype.toLngLat=function(){return new lu(360*this.x-180,du(this.y))},mu.prototype.toAltitude=function(){return this.z*pu(du(this.y))};var yu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=gu(0,t,e,r)};yu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},yu.prototype.url=function(t,e){var r,i,n,o,a,s=(r=this.x,i=this.y,n=this.z,o=su(256*r,256*(i=Math.pow(2,n)-i-1),n),a=su(256*(r+1),256*(i+1),n),o[0]+","+o[1]+","+a[0]+","+a[1]),u=function(t,e,r){for(var i,n="",o=t;o>0;o--)n+=(e&(i=1<<o-1)?1:0)+(r&i?2:0);return n}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",u).replace("{bbox-epsg-3857}",s)},yu.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new n((t.x*e-this.x)*Jn,(t.y*e-this.y)*Jn)};var vu=function(t,e){this.wrap=t,this.canonical=e,this.key=gu(t,e.z,e.x,e.y)},_u=function(t,e,r,i,n){this.overscaledZ=t,this.wrap=e,this.canonical=new yu(r,+i,+n),this.key=gu(e,t,i,n)};function gu(t,e,r,i){(t*=2)<0&&(t=-1*t-1);var n=1<<e;return 32*(n*n*t+n*i+r)+e}_u.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},_u.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new _u(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new _u(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},_u.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},_u.prototype.children=function(t){if(this.overscaledZ>=t)return[new _u(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new _u(e,this.wrap,e,r,i),new _u(e,this.wrap,e,r+1,i),new _u(e,this.wrap,e,r,i+1),new _u(e,this.wrap,e,r+1,i+1)]},_u.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},_u.prototype.wrapped=function(){return new _u(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},_u.prototype.unwrapTo=function(t){return new _u(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},_u.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},_u.prototype.toUnwrapped=function(){return new vu(this.wrap,this.canonical)},_u.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},_u.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new mu(t.x-this.wrap,t.y))},si("CanonicalTileID",yu),si("OverscaledTileID",_u,{omit:["posMatrix"]});var xu=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return w('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var i=this.dim=e.height;this.stride=this.dim+2,this.data=new Int32Array(this.stride*this.stride);for(var n=e.data,o="terrarium"===r?this._unpackTerrarium:this._unpackMapbox,a=0;a<i;a++)for(var s=0;s<i;s++){var u=4*(a*i+s);this.set(s,a,o(n[u],n[u+1],n[u+2]))}for(var l=0;l<i;l++)this.set(-1,l,this.get(0,l)),this.set(i,l,this.get(i-1,l)),this.set(l,-1,this.get(l,0)),this.set(l,i,this.get(l,i-1));this.set(-1,-1,this.get(0,0)),this.set(i,-1,this.get(i-1,0)),this.set(-1,i,this.get(0,i-1)),this.set(i,i,this.get(i-1,i-1))};xu.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},xu.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},xu.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},xu.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},xu.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},xu.prototype.getPixels=function(){return new Co({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},xu.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,n=e*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(e){case-1:i=n-1;break;case 1:n=i+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,u=-r*this.dim,l=o;l<a;l++)for(var p=i;p<n;p++)this.set(p,l,t.get(p+s,l+u))},si("DEMData",xu);var bu=Zi([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),wu=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};wu.prototype.encode=function(t){return this._stringToNumber[t]},wu.prototype.decode=function(t){return this._numberToString[t]};var Eu=function(t,e,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,null!=t.id&&(this.id=t.id)},Su={geometry:{configurable:!0}};Su.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Su.geometry.set=function(t){this._geometry=t},Eu.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Eu.prototype,Su);var Tu=function(){this.state={},this.stateChanges={},this.deletedStates={}};Tu.prototype.updateState=function(t,e,r){var i=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][i]=this.stateChanges[t][i]||{},c(this.stateChanges[t][i],r),null===this.deletedStates[t])for(var n in this.deletedStates[t]={},this.state[t])n!==i&&(this.deletedStates[t][n]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][i])for(var o in this.deletedStates[t][i]={},this.state[t][i])r[o]||(this.deletedStates[t][i][o]=null);else for(var a in r)this.deletedStates[t]&&this.deletedStates[t][i]&&null===this.deletedStates[t][i][a]&&delete this.deletedStates[t][i][a]},Tu.prototype.removeFeatureState=function(t,e,r){if(null!==this.deletedStates[t]){var i=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&e)null!==this.deletedStates[t][i]&&(this.deletedStates[t][i]=this.deletedStates[t][i]||{},this.deletedStates[t][i][r]=null);else if(e)if(this.stateChanges[t]&&this.stateChanges[t][i])for(r in this.deletedStates[t][i]={},this.stateChanges[t][i])this.deletedStates[t][i][r]=null;else this.deletedStates[t][i]=null;else this.deletedStates[t]=null}},Tu.prototype.getState=function(t,e){var r=String(e),i=this.state[t]||{},n=this.stateChanges[t]||{},o=c({},i[r],n[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var a=this.deletedStates[t][e];if(null===a)return{};for(var s in a)delete o[s]}return o},Tu.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Tu.prototype.coalesceChanges=function(t,e){var r={};for(var i in this.stateChanges){this.state[i]=this.state[i]||{};var n={};for(var o in this.stateChanges[i])this.state[i][o]||(this.state[i][o]={}),c(this.state[i][o],this.stateChanges[i][o]),n[o]=this.state[i][o];r[i]=n}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a])for(var u in this.state[a])s[u]={},this.state[a][u]={};else for(var l in this.deletedStates[a]){if(null===this.deletedStates[a][l])this.state[a][l]={};else for(var p=0,h=Object.keys(this.deletedStates[a][l]);p<h.length;p+=1){var f=h[p];delete this.state[a][l][f]}s[l]=this.state[a][l]}r[a]=r[a]||{},c(r[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var d in t)t[d].setFeatureState(r,e)};var Au=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new ri(Jn,16,0),this.grid3D=new ri(Jn,16,0),this.featureIndexArray=r||new Tn};function Iu(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];e=Math.min(e,s.x),r=Math.min(r,s.y),i=Math.max(i,s.x),n=Math.max(n,s.y)}return{minX:e,minY:r,maxX:i,maxY:n}}function zu(t,e){return e-t}Au.prototype.insert=function(t,e,r,i,n,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);for(var s=o?this.grid3D:this.grid,u=0;u<e.length;u++){for(var l=e[u],p=[1/0,1/0,-1/0,-1/0],c=0;c<l.length;c++){var h=l[c];p[0]=Math.min(p[0],h.x),p[1]=Math.min(p[1],h.y),p[2]=Math.max(p[2],h.x),p[3]=Math.max(p[3],h.y)}p[0]<Jn&&p[1]<Jn&&p[2]>=0&&p[3]>=0&&s.insert(a,p[0],p[1],p[2],p[3])}},Au.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ia.VectorTile(new Os(this.rawTileData)).layers,this.sourceLayerCoder=new wu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Au.prototype.query=function(t,e,r){var i=this;this.loadVTLayers();for(var o=t.params||{},a=Jn/t.tileSize/t.scale,s=Cr(o.filter),u=t.queryGeometry,l=t.queryPadding*a,p=Iu(u),c=this.grid.query(p.minX-l,p.minY-l,p.maxX+l,p.maxY+l),h=Iu(t.cameraQueryGeometry),f=0,d=this.grid3D.query(h.minX-l,h.minY-l,h.maxX+l,h.maxY+l,(function(e,r,i,o){return function(t,e,r,i,o){for(var a=0,s=t;a<s.length;a+=1){var u=s[a];if(e<=u.x&&r<=u.y&&i>=u.x&&o>=u.y)return!0}var l=[new n(e,r),new n(e,o),new n(i,o),new n(i,r)];if(t.length>2)for(var p=0,c=l;p<c.length;p+=1)if(po(t,c[p]))return!0;for(var h=0;h<t.length-1;h++)if(co(t[h],t[h+1],l))return!0;return!1}(t.cameraQueryGeometry,e-l,r-l,i+l,o+l)}));f<d.length;f+=1){var m=d[f];c.push(m)}c.sort(zu);for(var y,v={},_=function(n){var l=c[n];if(l!==y){y=l;var p=i.featureIndexArray.get(l),h=null;i.loadMatchingFeature(v,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,s,o.layers,e,(function(e,n){h||(h=$n(e));var o={};return e.id&&(o=r.getState(n.sourceLayer||"_geojsonTileLayer",e.id)),n.queryIntersectsFeature(u,e,o,h,i.z,t.transform,a,t.pixelPosMatrix)}))}},g=0;g<c.length;g++)_(g);return v},Au.prototype.loadMatchingFeature=function(t,e,r,i,n,o,a,s){var u=this.bucketLayerIDs[e];if(!o||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(o,u)){var l=this.sourceLayerCoder.decode(r),p=this.vtLayers[l].feature(i);if(n(new Ti(this.tileID.overscaledZ),p))for(var c=0;c<u.length;c++){var h=u[c];if(!(o&&o.indexOf(h)<0)){var f=a[h];if(f){var d=!s||s(p,f);if(d){var m=new Eu(p,this.z,this.x,this.y);m.layer=f.serialize();var y=t[h];void 0===y&&(y=t[h]=[]),y.push({featureIndex:i,feature:m,intersectionZ:d})}}}}}},Au.prototype.lookupSymbolFeatures=function(t,e,r,i,n,o){var a={};this.loadVTLayers();for(var s=Cr(i),u=0,l=t;u<l.length;u+=1){var p=l[u];this.loadMatchingFeature(a,e,r,p,s,n,o)}return a},Au.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var i=0,n=r[e];i<n.length;i+=1)if(t===n[i])return!0;return!1},si("FeatureIndex",Au,{omit:["rawTileData","sourceLayerCoder"]});var ku=function(t,e){this.tileID=t,this.uid=f(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.expiredRequestCount=0,this.state="loading"};ku.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<M.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},ku.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},ku.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var i in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var i=function(){var t=o[n],i=t.layerIds.map((function(t){return e.getLayer(t)})).filter(Boolean);if(0!==i.length){t.layers=i,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map((function(t){return i.filter((function(e){return e.id===t}))[0]})));for(var a=0,s=i;a<s.length;a+=1){var u=s[a];r[u.id]=t}}},n=0,o=t;n<o.length;n+=1)i();return r}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var n=this.buckets[i];if(n instanceof vs){if(this.hasSymbolBuckets=!0,!r)break;n.justReloaded=!0}}for(var o in this.queryPadding=0,this.buckets){var a=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(o).queryRadius(a))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new mn},ku.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},ku.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},ku.prototype.getBucket=function(t){return this.buckets[t.id]},ku.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var i=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Bs(t,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Bs(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)},ku.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},ku.prototype.queryRenderedFeatures=function(t,e,r,i,n,o,a,s,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:i,scale:n,tileSize:this.tileSize,pixelPosMatrix:u,transform:a,params:o,queryPadding:this.queryPadding*s},t,e):{}},ku.prototype.querySourceFeatures=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var r=this.latestFeatureIndex.loadVTLayers(),i=e?e.sourceLayer:"",n=r._geojsonTileLayer||r[i];if(n)for(var o=Cr(e&&e.filter),a=this.tileID.canonical,s=a.z,u=a.x,l=a.y,p={z:s,x:u,y:l},c=0;c<n.length;c++){var h=n.feature(c);if(o(new Ti(this.tileID.overscaledZ),h)){var f=new Eu(h,s,u,l);f.tile=p,t.push(f)}}}},ku.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},ku.prototype.setMask=function(t,e){if(!a(this.mask,t)&&(this.mask=t,this.clearMask(),!a(t,{0:!0}))){var r=new Wi,i=new ln;this.segments=new In,this.segments.prepareSegment(0,r,i);for(var o=Object.keys(t),s=0;s<o.length;s++){var u=t[o[s]],l=Jn>>u.z,p=new n(u.x*l,u.y*l),c=new n(p.x+l,p.y+l),h=this.segments.prepareSegment(4,r,i);r.emplaceBack(p.x,p.y,p.x,p.y),r.emplaceBack(c.x,p.y,c.x,p.y),r.emplaceBack(p.x,c.y,p.x,c.y),r.emplaceBack(c.x,c.y,c.x,c.y);var f=h.vertexLength;i.emplaceBack(f,f+1,f+2),i.emplaceBack(f+1,f+2,f+3),h.vertexLength+=4,h.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,bu.members),this.maskedIndexBuffer=e.createIndexBuffer(i)}},ku.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},ku.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},ku.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,r,i,n){var o=i||n;return e[r]=!o||o.toLowerCase(),""})),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var i=Date.now(),n=!1;if(this.expirationTime>i)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{var o=this.expirationTime-e;o?this.expirationTime=i+Math.max(o,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},ku.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},ku.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var i in this.buckets){var n=this.buckets[i],o=n.layers[0].sourceLayer||"_geojsonTileLayer",a=r[o],s=t[o];a&&s&&0!==Object.keys(s).length&&(n.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{}),e&&e.style&&(this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(i).queryRadius(n))))}}},ku.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},ku.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<M.now()},ku.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},ku.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=M.now()+t};var Cu=24,Pu={horizontal:1,vertical:2,horizontalOnly:3},Mu=function(){this.text="",this.sectionIndex=[],this.sections=[]};function Lu(t,e,r,i,n,o,a,s,u,l){var p,c=Mu.fromFeature(t,r);l===Pu.vertical&&c.verticalizePunctuation();var h=Si.processBidirectionalText,f=Si.processStyledBidirectionalText;if(h&&1===c.sections.length){p=[];for(var d=0,m=h(c.toString(),Uu(c,s,i,e));d<m.length;d+=1){var y=m[d],v=new Mu;v.text=y,v.sections=c.sections;for(var _=0;_<y.length;_++)v.sectionIndex.push(0);p.push(v)}}else if(f){p=[];for(var g=0,x=f(c.text,c.sectionIndex,Uu(c,s,i,e));g<x.length;g+=1){var b=x[g],w=new Mu;w.text=b[0],w.sectionIndex=b[1],w.sections=c.sections,p.push(w)}}else p=function(t,e){for(var r=[],i=t.text,n=0,o=0,a=e;o<a.length;o+=1){var s=a[o];r.push(t.substring(n,s)),n=s}return n<i.length&&r.push(t.substring(n,i.length)),r}(c,Uu(c,s,i,e));var E=[],S={positionedGlyphs:E,text:c.toString(),top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:l,lineCount:p.length};return function(t,e,r,i,n,o,a,s){for(var u=0,l=-17,p=0,c=t.positionedGlyphs,h="right"===o?1:"left"===o?0:.5,f=0,d=r;f<d.length;f+=1){var m=d[f];m.trim();var y=m.getMaxScale();if(m.length()){for(var v=c.length,_=0;_<m.length();_++){var g=m.getSection(_),x=m.getCharCode(_),b=24*(y-g.scale),w=e[g.fontStack],E=w&&w[x];E&&(yi(x)&&a!==Pu.horizontal?(c.push({glyph:x,x:u,y:b,vertical:!0,scale:g.scale,fontStack:g.fontStack}),u+=Cu*g.scale+s):(c.push({glyph:x,x:u,y:l+b,vertical:!1,scale:g.scale,fontStack:g.fontStack}),u+=E.metrics.advance*g.scale+s))}if(c.length!==v){var S=u-s;p=Math.max(S,p),Nu(c,e,v,c.length-1,h)}u=0,l+=i*y}else l+=i}var T=Vu(n),A=T.horizontalAlign,I=T.verticalAlign;!function(t,e,r,i,n,o,a){for(var s=(e-r)*n,u=(-i*a+.5)*o,l=0;l<t.length;l++)t[l].x+=s,t[l].y+=u}(c,h,A,I,p,i,r.length);var z=l- -17;t.top+=-I*z,t.bottom=t.top+z,t.left+=-A*p,t.right=t.left+p}(S,e,p,n,o,a,l,s),!!E.length&&S}Mu.fromFeature=function(t,e){for(var r=new Mu,i=0;i<t.sections.length;i++){var n=t.sections[i];r.sections.push({scale:n.scale||1,fontStack:n.fontStack||e}),r.text+=n.text;for(var o=0;o<n.text.length;o++)r.sectionIndex.push(i)}return r},Mu.prototype.length=function(){return this.text.length},Mu.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},Mu.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},Mu.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",r=0;r<t.length;r++){var i=t.charCodeAt(r+1)||null,n=t.charCodeAt(r-1)||null;i&&vi(i)&&!ns[t[r+1]]||n&&vi(n)&&!ns[t[r-1]]||!ns[t[r]]?e+=t[r]:e+=ns[t[r]]}return e}(this.text)},Mu.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&Du[this.text.charCodeAt(e)];e++)t++;for(var r=this.text.length,i=this.text.length-1;i>=0&&i>=t&&Du[this.text.charCodeAt(i)];i--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Mu.prototype.substring=function(t,e){var r=new Mu;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Mu.prototype.toString=function(){return this.text},Mu.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)};var Du={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},Bu={};function Ru(t,e,r,i){var n=Math.pow(t-e,2);return i?t<e?n/2:2*n:n+Math.abs(r)*r}function Fu(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Ou(t,e,r,i,n,o){for(var a=null,s=Ru(e,r,n,o),u=0,l=i;u<l.length;u+=1){var p=l[u],c=Ru(e-p.x,r,n,o)+p.badness;c<=s&&(a=p,s=c)}return{index:t,x:e,priorBreak:a,badness:s}}function Uu(t,e,r,i){if(!r)return[];if(!t)return[];for(var n,o=[],a=function(t,e,r,i){for(var n=0,o=0;o<t.length();o++){var a=t.getSection(o),s=i[a.fontStack],u=s&&s[t.getCharCode(o)];u&&(n+=u.metrics.advance*a.scale+e)}return n/Math.max(1,Math.ceil(n/r))}(t,e,r,i),s=0,u=0;u<t.length();u++){var l=t.getSection(u),p=t.getCharCode(u),c=i[l.fontStack],h=c&&c[p];h&&!Du[p]&&(s+=h.metrics.advance*l.scale+e),u<t.length()-1&&(Bu[p]||!((n=p)<11904)&&(hi["Bopomofo Extended"](n)||hi.Bopomofo(n)||hi["CJK Compatibility Forms"](n)||hi["CJK Compatibility Ideographs"](n)||hi["CJK Compatibility"](n)||hi["CJK Radicals Supplement"](n)||hi["CJK Strokes"](n)||hi["CJK Symbols and Punctuation"](n)||hi["CJK Unified Ideographs Extension A"](n)||hi["CJK Unified Ideographs"](n)||hi["Enclosed CJK Letters and Months"](n)||hi["Halfwidth and Fullwidth Forms"](n)||hi.Hiragana(n)||hi["Ideographic Description Characters"](n)||hi["Kangxi Radicals"](n)||hi["Katakana Phonetic Extensions"](n)||hi.Katakana(n)||hi["Vertical Forms"](n)||hi["Yi Radicals"](n)||hi["Yi Syllables"](n)))&&o.push(Ou(u+1,s,a,o,Fu(p,t.getCharCode(u+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Ou(t.length(),s,a,o,0,!0))}function Vu(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function Nu(t,e,r,i,n){if(n){var o=t[i],a=e[o.fontStack],s=a&&a[o.glyph];if(s)for(var u=s.metrics.advance*o.scale,l=(t[i].x+u)*n,p=r;p<=i;p++)t[p].x-=l}}function ju(t,e,r){var i=Vu(r),n=i.horizontalAlign,o=i.verticalAlign,a=e[0],s=e[1],u=a-t.displaySize[0]*n,l=u+t.displaySize[0],p=s-t.displaySize[1]*o;return{image:t,top:p,bottom:p+t.displaySize[1],left:u,right:l}}function qu(t,e,r,i,n){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var u=[],l=0;s<r/2;){var p=t[a-1],c=t[a],h=t[a+1];if(!h)return!1;var f=p.angleTo(c)-c.angleTo(h);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),u.push({distance:s,angleDelta:f}),l+=f;s-u[0].distance>i;)l-=u.shift().angleDelta;if(l>n)return!1;a++,s+=c.dist(h)}return!0}function Zu(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function Gu(t,e,r){return t?.6*e*r:0}function Xu(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Wu(t,e,r,i,n,o){for(var a=Gu(r,n,o),s=Xu(r,i)*o,u=0,l=Zu(t)/2,p=0;p<t.length-1;p++){var c=t[p],h=t[p+1],f=c.dist(h);if(u+f>l){var d=(l-u)/f,m=pe(c.x,h.x,d),y=pe(c.y,h.y,d),v=new os(m,y,h.angleTo(c),p);return v._round(),!a||qu(t,v,s,a,e)?v:void 0}u+=f}}function Ku(t,e,r,i,n,o,a,s,u){var l=Gu(i,o,a),p=Xu(i,n),c=p*a,h=0===t[0].x||t[0].x===u||0===t[0].y||t[0].y===u;return e-c<e/4&&(e=c+e/4),function t(e,r,i,n,o,a,s,u,l){for(var p=a/2,c=Zu(e),h=0,f=r-i,d=[],m=0;m<e.length-1;m++){for(var y=e[m],v=e[m+1],_=y.dist(v),g=v.angleTo(y);f+i<h+_;){var x=((f+=i)-h)/_,b=pe(y.x,v.x,x),w=pe(y.y,v.y,x);if(b>=0&&b<l&&w>=0&&w<l&&f-p>=0&&f+p<=c){var E=new os(b,w,g,m);E._round(),n&&!qu(e,E,a,n,o)||d.push(E)}}h+=_}return u||d.length||s||(d=t(e,h/2,i,n,o,a,s,!0,l)),d}(t,h?e/2*s%e:(p/2+2*o)*a*s%e,e,l,r,c,h,!1,u)}Bu[10]=!0,Bu[32]=!0,Bu[38]=!0,Bu[40]=!0,Bu[41]=!0,Bu[43]=!0,Bu[45]=!0,Bu[47]=!0,Bu[173]=!0,Bu[183]=!0,Bu[8203]=!0,Bu[8208]=!0,Bu[8211]=!0,Bu[8231]=!0;var Hu=function(t,e,r,i,o,a,s,u,l,p,c,h){var f=s.top*u-l,d=s.bottom*u+l,m=s.left*u-l,y=s.right*u+l;if(this.boxStartIndex=t.length,p){var v=d-f,_=y-m;v>0&&(v=Math.max(10*u,v),this._addLineCollisionCircles(t,e,r,r.segment,_,v,i,o,a,c))}else{if(h){var g=new n(m,f),x=new n(y,f),b=new n(m,d),w=new n(y,d),E=h*Math.PI/180;g._rotate(E),x._rotate(E),b._rotate(E),w._rotate(E),m=Math.min(g.x,x.x,b.x,w.x),y=Math.max(g.x,x.x,b.x,w.x),f=Math.min(g.y,x.y,b.y,w.y),d=Math.max(g.y,x.y,b.y,w.y)}t.emplaceBack(r.x,r.y,m,f,y,d,i,o,a,0,0)}this.boxEndIndex=t.length};Hu.prototype._addLineCollisionCircles=function(t,e,r,i,n,o,a,s,u,l){var p=o/2,c=Math.floor(n/p)||1,h=1+.4*Math.log(l)/Math.LN2,f=Math.floor(c*h/2),d=-o/2,m=r,y=i+1,v=d,_=-n/2,g=_-n/4;do{if(--y<0){if(v>_)return;y=0;break}v-=e[y].dist(m),m=e[y]}while(v>g);for(var x=e[y].dist(e[y+1]),b=-f;b<c+f;b++){var w=b*p,E=_+w;if(w<0&&(E+=w),w>n&&(E+=w-n),!(E<v)){for(;v+x<E;){if(v+=x,++y+1>=e.length)return;x=e[y].dist(e[y+1])}var S=E-v,T=e[y],A=e[y+1].sub(T)._unit()._mult(S)._add(T)._round(),I=Math.abs(E-d)<p?0:.8*(E-d);t.emplaceBack(A.x,A.y,-o/2,-o/2,o/2,o/2,a,s,u,o/2,I)}}};var Ju=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Yu),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Yu(t,e){return t<e?-1:t>e?1:0}function $u(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var i=1/0,o=1/0,a=-1/0,s=-1/0,u=t[0],l=0;l<u.length;l++){var p=u[l];(!l||p.x<i)&&(i=p.x),(!l||p.y<o)&&(o=p.y),(!l||p.x>a)&&(a=p.x),(!l||p.y>s)&&(s=p.y)}var c=a-i,h=s-o,f=Math.min(c,h),d=f/2,m=new Ju([],Qu);if(0===f)return new n(i,o);for(var y=i;y<a;y+=f)for(var v=o;v<s;v+=f)m.push(new tl(y+d,v+d,d,t));for(var _=function(t){for(var e=0,r=0,i=0,n=t[0],o=0,a=n.length,s=a-1;o<a;s=o++){var u=n[o],l=n[s],p=u.x*l.y-l.x*u.y;r+=(u.x+l.x)*p,i+=(u.y+l.y)*p,e+=3*p}return new tl(r/e,i/e,0,t)}(t),g=m.length;m.length;){var x=m.pop();(x.d>_.d||!_.d)&&(_=x,r&&console.log("found best %d after %d probes",Math.round(1e4*x.d)/1e4,g)),x.max-_.d<=e||(d=x.h/2,m.push(new tl(x.p.x-d,x.p.y-d,d,t)),m.push(new tl(x.p.x+d,x.p.y-d,d,t)),m.push(new tl(x.p.x-d,x.p.y+d,d,t)),m.push(new tl(x.p.x+d,x.p.y+d,d,t)),g+=4)}return r&&(console.log("num probes: "+g),console.log("best distance: "+_.d)),_.p}function Qu(t,e){return e.max-t.max}function tl(t,e,r,i){this.p=new n(t,e),this.h=r,this.d=function(t,e){for(var r=!1,i=1/0,n=0;n<e.length;n++)for(var o=e[n],a=0,s=o.length,u=s-1;a<s;u=a++){var l=o[a],p=o[u];l.y>t.y!=p.y>t.y&&t.x<(p.x-l.x)*(t.y-l.y)/(p.y-l.y)+l.x&&(r=!r),i=Math.min(i,uo(t,l,p))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}Ju.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Ju.prototype.pop=function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},Ju.prototype.peek=function(){return this.data[0]},Ju.prototype._up=function(t){for(var e=this.data,r=this.compare,i=e[t];t>0;){var n=t-1>>1,o=e[n];if(r(i,o)>=0)break;e[t]=o,t=n}e[t]=i},Ju.prototype._down=function(t){for(var e=this.data,r=this.compare,i=this.length>>1,n=e[t];t<i;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&r(e[s],a)<0&&(o=s,a=e[s]),r(a,n)>=0)break;e[t]=a,t=o}e[t]=n};var el=e((function(t){t.exports=function(t,e){var r,i,n,o,a,s,u,l;for(r=3&t.length,i=t.length-r,n=e,a=3432918353,s=461845907,l=0;l<i;)u=255&t.charCodeAt(l)|(255&t.charCodeAt(++l))<<8|(255&t.charCodeAt(++l))<<16|(255&t.charCodeAt(++l))<<24,++l,n=27492+(65535&(o=5*(65535&(n=(n^=u=(65535&(u=(u=(65535&u)*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(u=0,r){case 3:u^=(255&t.charCodeAt(l+2))<<16;case 2:u^=(255&t.charCodeAt(l+1))<<8;case 1:n^=u=(65535&(u=(u=(65535&(u^=255&t.charCodeAt(l)))*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}})),rl=e((function(t){t.exports=function(t,e){for(var r,i=t.length,n=e^i,o=0;i>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:n^=(255&t.charCodeAt(o+2))<<16;case 2:n^=(255&t.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}})),il=el,nl=el,ol=rl;il.murmur3=nl,il.murmur2=ol;var al=7;function sl(t,e){var r=0,i=0,n=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":i=n-al;break;case"bottom-right":case"bottom-left":i=-n+al;break;case"bottom":i=-e+al;break;case"top":i=e-al}switch(t){case"top-right":case"bottom-right":r=-n;break;case"top-left":case"bottom-left":r=n;break;case"left":r=e;break;case"right":r=-e}return[r,i]}function ul(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function ll(t,e,r,i,o,a,s){var u=a.layoutTextSize.evaluate(e,{}),l=a.layoutIconSize.evaluate(e,{}),p=a.textMaxSize.evaluate(e,{});void 0===p&&(p=u);var c=t.layers[0].layout,h=c.get("icon-offset").evaluate(e,{}),f=hl(r.horizontal),d=u/24,m=t.tilePixelRatio*d,y=t.tilePixelRatio*p/24,v=t.tilePixelRatio*l,_=t.tilePixelRatio*c.get("symbol-spacing"),g=c.get("text-padding")*t.tilePixelRatio,x=c.get("icon-padding")*t.tilePixelRatio,b=c.get("text-max-angle")/180*Math.PI,E="map"===c.get("text-rotation-alignment")&&"point"!==c.get("symbol-placement"),S="map"===c.get("icon-rotation-alignment")&&"point"!==c.get("symbol-placement"),T=c.get("symbol-placement"),A=_/2,I=function(u,l){l.x<0||l.x>=Jn||l.y<0||l.y>=Jn||function(t,e,r,i,o,a,s,u,l,p,c,h,f,d,m,y,v,_,g,x,b){var E,S,T=t.addToLineVertexArray(e,r),A=0,I=0,z=0,k={},C=il(""),P=(a.layout.get("text-radial-offset").evaluate(g,{})||0)*Cu;for(var M in i.horizontal){var L=i.horizontal[M];if(!E){C=il(L.text);var D=a.layout.get("text-rotate").evaluate(g,{});E=new Hu(s,r,e,u,l,p,L,c,h,f,t.overscaling,D)}var B=1===L.lineCount;if(I+=cl(t,e,L,a,f,g,d,T,i.vertical?Pu.horizontal:Pu.horizontalOnly,B?Object.keys(i.horizontal):[M],k,x,b),B)break}i.vertical&&(z+=cl(t,e,i.vertical,a,f,g,d,T,Pu.vertical,["vertical"],k,x,b));var R=E?E.boxStartIndex:t.collisionBoxArray.length,F=E?E.boxEndIndex:t.collisionBoxArray.length;if(o){var O=function(t,e,r,i,o,a){var s,u,l,p,c=e.image,h=r.layout,f=e.top-1/c.pixelRatio,d=e.left-1/c.pixelRatio,m=e.bottom+1/c.pixelRatio,y=e.right+1/c.pixelRatio;if("none"!==h.get("icon-text-fit")&&o){var v=y-d,_=m-f,g=h.get("text-size").evaluate(a,{})/24,x=o.left*g,b=o.right*g,w=o.top*g,E=b-x,S=o.bottom*g-w,T=h.get("icon-text-fit-padding")[0],A=h.get("icon-text-fit-padding")[1],I=h.get("icon-text-fit-padding")[2],z=h.get("icon-text-fit-padding")[3],k="width"===h.get("icon-text-fit")?.5*(S-_):0,C="height"===h.get("icon-text-fit")?.5*(E-v):0,P="width"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?E:v,M="height"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?S:_;s=new n(x+C-z,w+k-T),u=new n(x+C+A+P,w+k-T),l=new n(x+C+A+P,w+k+I+M),p=new n(x+C-z,w+k+I+M)}else s=new n(d,f),u=new n(y,f),l=new n(y,m),p=new n(d,m);var L=r.layout.get("icon-rotate").evaluate(a,{})*Math.PI/180;if(L){var D=Math.sin(L),B=Math.cos(L),R=[B,-D,D,B];s._matMult(R),u._matMult(R),p._matMult(R),l._matMult(R)}return[{tl:s,tr:u,bl:p,br:l,tex:c.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,hl(i.horizontal),g),U=a.layout.get("icon-rotate").evaluate(g,{});S=new Hu(s,r,e,u,l,p,o,m,y,!1,t.overscaling,U),A=4*O.length;var V=t.iconSizeData,N=null;"source"===V.functionType?(N=[as*a.layout.get("icon-size").evaluate(g,{})])[0]>pl&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===V.functionType&&((N=[as*b.compositeIconSizes[0].evaluate(g,{}),as*b.compositeIconSizes[1].evaluate(g,{})])[0]>pl||N[1]>pl)&&w(t.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),t.addSymbols(t.icon,O,N,_,v,g,!1,e,T.lineStartIndex,T.lineLength)}var j=S?S.boxStartIndex:t.collisionBoxArray.length,q=S?S.boxEndIndex:t.collisionBoxArray.length;t.glyphOffsetArray.length>=vs.MAX_GLYPHS&&w("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),t.symbolInstances.emplaceBack(e.x,e.y,k.right>=0?k.right:-1,k.center>=0?k.center:-1,k.left>=0?k.left:-1,k.vertical||-1,C,R,F,j,q,u,I,z,A,0,c,P)}(t,l,u,r,i,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,m,g,E,s,v,x,S,h,e,o,a)};if("line"===T)for(var z=0,k=function(t,e,r,i,o){for(var a=[],s=0;s<t.length;s++)for(var u=t[s],l=void 0,p=0;p<u.length-1;p++){var c=u[p],h=u[p+1];c.x<0&&h.x<0||(c.x<0?c=new n(0,c.y+(h.y-c.y)*((0-c.x)/(h.x-c.x)))._round():h.x<0&&(h=new n(0,c.y+(h.y-c.y)*((0-c.x)/(h.x-c.x)))._round()),c.y<0&&h.y<0||(c.y<0?c=new n(c.x+(h.x-c.x)*((0-c.y)/(h.y-c.y)),0)._round():h.y<0&&(h=new n(c.x+(h.x-c.x)*((0-c.y)/(h.y-c.y)),0)._round()),c.x>=i&&h.x>=i||(c.x>=i?c=new n(i,c.y+(h.y-c.y)*((i-c.x)/(h.x-c.x)))._round():h.x>=i&&(h=new n(i,c.y+(h.y-c.y)*((i-c.x)/(h.x-c.x)))._round()),c.y>=o&&h.y>=o||(c.y>=o?c=new n(c.x+(h.x-c.x)*((o-c.y)/(h.y-c.y)),o)._round():h.y>=o&&(h=new n(c.x+(h.x-c.x)*((o-c.y)/(h.y-c.y)),o)._round()),l&&c.equals(l[l.length-1])||(l=[c],a.push(l)),l.push(h)))))}return a}(e.geometry,0,0,Jn,Jn);z<k.length;z+=1)for(var C=k[z],P=0,M=Ku(C,_,b,r.vertical||f,i,24,y,t.overscaling,Jn);P<M.length;P+=1){var L=M[P];f&&fl(t,f.text,A,L)||I(C,L)}else if("line-center"===T)for(var D=0,B=e.geometry;D<B.length;D+=1){var R=B[D];if(R.length>1){var F=Wu(R,b,r.vertical||f,i,24,y);F&&I(R,F)}}else if("Polygon"===e.type)for(var O=0,U=ca(e.geometry,0);O<U.length;O+=1){var V=U[O],N=$u(V,16);I(V[0],new os(N.x,N.y,0))}else if("LineString"===e.type)for(var j=0,q=e.geometry;j<q.length;j+=1){var Z=q[j];I(Z,new os(Z[0].x,Z[0].y,0))}else if("Point"===e.type)for(var G=0,X=e.geometry;G<X.length;G+=1)for(var W=0,K=X[G];W<K.length;W+=1){var H=K[W];I([H],new os(H.x,H.y,0))}}var pl=65535;function cl(t,e,r,i,o,a,s,u,l,p,c,h,f){var d=function(t,e,r,i,o,a,s){for(var u=i.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,l=e.positionedGlyphs,p=[],c=0;c<l.length;c++){var h=l[c],f=s[h.fontStack],d=f&&f[h.glyph];if(d){var m=d.rect;if(m){var y=ou+1,v=d.metrics.advance*h.scale/2,_=o?[h.x+v,h.y]:[0,0],g=o?[0,0]:[h.x+v+r[0],h.y+r[1]],x=(d.metrics.left-y)*h.scale-v+g[0],b=(-d.metrics.top-y)*h.scale+g[1],w=x+m.w*h.scale,E=b+m.h*h.scale,S=new n(x,b),T=new n(w,b),A=new n(x,E),I=new n(w,E);if(o&&h.vertical){var z=new n(-v,v),k=-Math.PI/2,C=new n(5,0);S._rotateAround(k,z)._add(C),T._rotateAround(k,z)._add(C),A._rotateAround(k,z)._add(C),I._rotateAround(k,z)._add(C)}if(u){var P=Math.sin(u),M=Math.cos(u),L=[M,-P,P,M];S._matMult(L),T._matMult(L),A._matMult(L),I._matMult(L)}p.push({tl:S,tr:T,bl:A,br:I,tex:m,writingMode:e.writingMode,glyphOffset:_})}}}return p}(0,r,s,i,o,a,h),m=t.textSizeData,y=null;"source"===m.functionType?(y=[as*i.layout.get("text-size").evaluate(a,{})])[0]>pl&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===m.functionType&&((y=[as*f.compositeTextSizes[0].evaluate(a,{}),as*f.compositeTextSizes[1].evaluate(a,{})])[0]>pl||y[1]>pl)&&w(t.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),t.addSymbols(t.text,d,y,s,o,a,l,e,u.lineStartIndex,u.lineLength);for(var v=0,_=p;v<_.length;v+=1)c[_[v]]=t.text.placedSymbolArray.length-1;return 4*d.length}function hl(t){for(var e in t)return t[e];return null}function fl(t,e,r,i){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;a>=0;a--)if(i.dist(o[a])<r)return!0}else n[e]=[];return n[e].push(i),!1}t.Actor=au,t.AlphaImage=ko,t.CanonicalTileID=yu,t.CollisionBoxArray=mn,t.Color=Ut,t.DEMData=xu,t.DataConstantProperty=Di,t.DictionaryCoder=wu,t.EXTENT=Jn,t.ErrorEvent=mt,t.EvaluationParameters=Ti,t.Event=dt,t.Evented=yt,t.FeatureIndex=Au,t.FillBucket=ma,t.FillExtrusionBucket=Pa,t.ImageAtlas=Cs,t.ImagePosition=zs,t.LineBucket=Ga,t.LngLat=lu,t.LngLatBounds=uu,t.MercatorCoordinate=mu,t.ONE_EM=Cu,t.OverscaledTileID=_u,t.Point=n,t.Point$1=n,t.ProgramConfiguration=Xn,t.Properties=Ui,t.Protobuf=Os,t.RGBAImage=Co,t.ResourceType=rt,t.SegmentVector=In,t.SourceFeatureState=Tu,t.StructArrayLayout1ui2=cn,t.StructArrayLayout2i4=Xi,t.StructArrayLayout2ui4=pn,t.StructArrayLayout3ui6=ln,t.StructArrayLayout4i8=Wi,t.SymbolBucket=vs,t.Texture=Bs,t.Tile=ku,t.Transitionable=zi,t.Uniform1f=Ln,t.Uniform1i=Mn,t.Uniform2f=Dn,t.Uniform3f=Bn,t.Uniform4f=Rn,t.UniformColor=Fn,t.UniformMatrix4f=Un,t.UnwrappedTileID=vu,t.ValidationError=_t,t.WritingMode=Pu,t.ZoomHistory=ci,t.addDynamicAttributes=ds,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach((function(t,a){e(t,(function(t,e){t&&(o=t),n[a]=e,0==--i&&r(o,n)}))}))},t.bezier=s,t.bindAll=y,t.browser=M,t.canonicalizeTileset=function(t,e){if(!V(e))return t.tiles||[];for(var r=[],i=0,n=t.tiles;i<n.length;i+=1){var o=n[i],a=G(o);r.push(a)}return r},t.clamp=l,t.clone=function(t){var e=new vo(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=x,t.config=L,t.create=function(){var t=new vo(16);return vo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=_o,t.create$2=function(){var t=new vo(4);return vo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=yr,t.createLayout=Zi,t.createStyleLayer=function(t){return"custom"===t.type?new Ts(t):new As[t.type](t)},t.deepEqual=a,t.ease=u,t.emitValidationErrors=ei,t.endsWith=v,t.evaluateRadialOffset=sl,t.evaluateSizeForFeature=us,t.evaluateSizeForZoom=ls,t.evented=Ei,t.extend=c,t.featureFilter=Cr,t.filterObject=g,t.fromRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=-r,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=Vu,t.getAnchorJustification=ul,t.getArrayBuffer=lt,t.getImage=ct,t.getJSON=function(t,e){return ut(c(t,{type:"json"}),e)},t.getReferrer=st,t.getVideo=function(t,e){var r,i,n=self.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");r=t[o],i=void 0,(i=self.document.createElement("a")).href=r,(i.protocol!==self.document.location.protocol||i.host!==self.document.location.host)&&(n.crossOrigin="Anonymous"),a.src=t[o],n.appendChild(a)}return{cancel:function(){}}},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.invert=function(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],p=e[8],c=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],v=e[15],_=r*s-i*a,g=r*u-n*a,x=r*l-o*a,b=i*u-n*s,w=i*l-o*s,E=n*l-o*u,S=p*m-c*d,T=p*y-h*d,A=p*v-f*d,I=c*y-h*m,z=c*v-f*m,k=h*v-f*y,C=_*k-g*z+x*I+b*A-w*T+E*S;return C?(C=1/C,t[0]=(s*k-u*z+l*I)*C,t[1]=(n*z-i*k-o*I)*C,t[2]=(m*E-y*w+v*b)*C,t[3]=(h*w-c*E-f*b)*C,t[4]=(u*A-a*k-l*T)*C,t[5]=(r*k-n*A+o*T)*C,t[6]=(y*x-d*E-v*g)*C,t[7]=(p*E-h*x+f*g)*C,t[8]=(a*z-s*A+l*S)*C,t[9]=(i*A-r*z-o*S)*C,t[10]=(d*w-m*x+v*_)*C,t[11]=(c*x-p*w-f*_)*C,t[12]=(s*T-a*I-u*S)*C,t[13]=(r*I-i*T+n*S)*C,t[14]=(m*g-d*b-y*_)*C,t[15]=(p*b-c*g+h*_)*C,t):null},t.isChar=hi,t.isMapboxURL=V,t.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},t.makeRequest=ut,t.mapObject=_,t.mercatorXfromLng=cu,t.mercatorYfromLat=hu,t.mercatorZfromAltitude=fu,t.multiply=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],p=e[7],c=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],v=e[14],_=e[15],g=r[0],x=r[1],b=r[2],w=r[3];return t[0]=g*i+x*s+b*c+w*m,t[1]=g*n+x*u+b*h+w*y,t[2]=g*o+x*l+b*f+w*v,t[3]=g*a+x*p+b*d+w*_,g=r[4],x=r[5],b=r[6],w=r[7],t[4]=g*i+x*s+b*c+w*m,t[5]=g*n+x*u+b*h+w*y,t[6]=g*o+x*l+b*f+w*v,t[7]=g*a+x*p+b*d+w*_,g=r[8],x=r[9],b=r[10],w=r[11],t[8]=g*i+x*s+b*c+w*m,t[9]=g*n+x*u+b*h+w*y,t[10]=g*o+x*l+b*f+w*v,t[11]=g*a+x*p+b*d+w*_,g=r[12],x=r[13],b=r[14],w=r[15],t[12]=g*i+x*s+b*c+w*m,t[13]=g*n+x*u+b*h+w*y,t[14]=g*o+x*l+b*f+w*v,t[15]=g*a+x*p+b*d+w*_,t},t.mvt=Ia,t.normalizeGlyphsURL=function(t,e){if(!V(t))return t;var r=W(t);return r.path="/fonts/v1"+r.path,U(r,e)},t.normalizeSourceURL=function(t,e){if(!V(t))return t;var r=W(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),U(r,e)},t.normalizeSpriteURL=function(t,e,r,i){var n=W(t);return V(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+r,U(n,i)):(n.path+=""+e+r,K(n))},t.normalizeStyleURL=function(t,e){if(!V(t))return t;var r=W(t);return r.path="/styles/v1"+r.path,U(r,e)},t.normalizeTileURL=function(t,e,r){if(!e||!V(e))return t;var i=W(t),n=M.devicePixelRatio>=2||512===r?"@2x":"",o=D.supported?".webp":"$1";return i.path=i.path.replace(q,""+n+o),i.path="/v4"+i.path,U(i)},t.number=pe,t.ortho=function(t,e,r,i,n,o,a){var s=1/(e-r),u=1/(i-n),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+r)*s,t[13]=(n+i)*u,t[14]=(a+o)*l,t[15]=1,t},t.parseGlyphPBF=function(t){return new Os(t).readFields(ru,[])},t.pbf=Os,t.performSymbolLayout=function(t,e,r,i,n,o){t.createArrays();var a=512*t.overscaling;t.tilePixelRatio=Jn/a,t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,u=t.layers[0]._unevaluatedLayout._values,l={};if("composite"===t.textSizeData.functionType){var p=t.textSizeData.zoomRange,c=p.min,h=p.max;l.compositeTextSizes=[u["text-size"].possiblyEvaluate(new Ti(c)),u["text-size"].possiblyEvaluate(new Ti(h))]}if("composite"===t.iconSizeData.functionType){var f=t.iconSizeData.zoomRange,d=f.min,m=f.max;l.compositeIconSizes=[u["icon-size"].possiblyEvaluate(new Ti(d)),u["icon-size"].possiblyEvaluate(new Ti(m))]}l.layoutTextSize=u["text-size"].possiblyEvaluate(new Ti(t.zoom+1)),l.layoutIconSize=u["icon-size"].possiblyEvaluate(new Ti(t.zoom+1)),l.textMaxSize=u["text-size"].possiblyEvaluate(new Ti(18));for(var y=s.get("text-line-height")*Cu,v="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),_=s.get("text-keep-upright"),g=0,x=t.features;g<x.length;g+=1){var b=x[g],E=s.get("text-font").evaluate(b,{}).join(","),S=r,T={horizontal:{},vertical:void 0},A=b.text,I=[0,0];if(A){var z=A.toString(),k=s.get("text-letter-spacing").evaluate(b,{})*Cu,C=di(z)?k:0,P=s.get("text-anchor").evaluate(b,{}),M=s.get("text-variable-anchor"),L=s.get("text-radial-offset").evaluate(b,{});M||(I=L?sl(P,L*Cu):s.get("text-offset").evaluate(b,{}).map((function(t){return t*Cu})));var D=v?"center":s.get("text-justify").evaluate(b,{}),B="point"===s.get("symbol-placement")?s.get("text-max-width").evaluate(b,{})*Cu:0;if(!v&&M)for(var R="auto"===D?M.map((function(t){return ul(t)})):[D],F=!1,O=0;O<R.length;O++){var U=R[O];if(!T.horizontal[U])if(F)T.horizontal[U]=T.horizontal[0];else{var V=Lu(A,e,E,B,y,"center",U,C,I,Pu.horizontal);V&&(T.horizontal[U]=V,F=1===V.lineCount)}}else{"auto"===D&&(D=ul(P));var N=Lu(A,e,E,B,y,P,D,C,I,Pu.horizontal);N&&(T.horizontal[D]=N),fi(z)&&v&&_&&(T.vertical=Lu(A,e,E,B,y,P,D,C,I,Pu.vertical))}}var j=void 0;if(b.icon){var q=i[b.icon];q&&(j=ju(n[b.icon],s.get("icon-offset").evaluate(b,{}),s.get("icon-anchor").evaluate(b,{})),void 0===t.sdfIcons?t.sdfIcons=q.sdf:t.sdfIcons!==q.sdf&&w("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),q.pixelRatio!==t.pixelRatio?t.iconsNeedLinear=!0:0!==s.get("icon-rotate").constantOr(1)&&(t.iconsNeedLinear=!0))}(Object.keys(T.horizontal).length||j)&&ll(t,b,T,j,S,l,I)}o&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,r,i,n){var o,a=1/Math.tan(e/2);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(o=1/(i-n),t[10]=(n+i)*o,t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},t.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r},t.plugin=Si,t.polygonIntersectsPolygon=eo,t.postMapLoadEvent=et,t.postTurnstileEvent=Q,t.potpack=Is,t.properties=gs,t.rasterBoundsAttributes=bu,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=si,t.registerForPluginAvailability=function(t){return bi?t({pluginURL:bi,completionCallback:gi}):Ei.once("pluginAvailable",t),t},t.rotate=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(r),u=Math.cos(r);return t[0]=i*u+o*s,t[1]=n*u+a*s,t[2]=i*-s+o*u,t[3]=n*-s+a*u,t},t.rotateX=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],p=e[9],c=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+l*i,t[5]=a*n+p*i,t[6]=s*n+c*i,t[7]=u*n+h*i,t[8]=l*n-o*i,t[9]=p*n-a*i,t[10]=c*n-s*i,t[11]=h*n-u*i,t},t.rotateZ=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],p=e[5],c=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+l*i,t[1]=a*n+p*i,t[2]=s*n+c*i,t[3]=u*n+h*i,t[4]=l*n-o*i,t[5]=p*n-a*i,t[6]=c*n-s*i,t[7]=h*n-u*i,t},t.scale=function(t,e,r){var i=r[0],n=r[1],o=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.setRTLTextPlugin=function(t,e){if(xi)throw new Error("setRTLTextPlugin cannot be called multiple times.");xi=!0,bi=M.resolveURL(t),gi=function(t){t?(xi=!1,bi=null,e&&e(t)):wi=!0},Ei.fire(new dt("pluginAvailable",{pluginURL:bi,completionCallback:gi}))},t.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(i),y:e*Math.sin(r)*Math.sin(i),z:e*Math.cos(i)}},t.styleSpec=vt,t.symbolSize=ps,t.transformMat3=function(t,e,r){var i=e[0],n=e[1],o=e[2];return t[0]=i*r[0]+n*r[3]+o*r[6],t[1]=i*r[1]+n*r[4]+o*r[7],t[2]=i*r[2]+n*r[5]+o*r[8],t},t.transformMat4=bo,t.translate=function(t,e,r){var i,n,o,a,s,u,l,p,c,h,f,d,m=r[0],y=r[1],v=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*v+e[12],t[13]=e[1]*m+e[5]*y+e[9]*v+e[13],t[14]=e[2]*m+e[6]*y+e[10]*v+e[14],t[15]=e[3]*m+e[7]*y+e[11]*v+e[15]):(i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],p=e[7],c=e[8],h=e[9],f=e[10],d=e[11],t[0]=i,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=p,t[8]=c,t[9]=h,t[10]=f,t[11]=d,t[12]=i*m+s*y+c*v+e[12],t[13]=n*m+u*y+h*v+e[13],t[14]=o*m+l*y+f*v+e[14],t[15]=a*m+p*y+d*v+e[15]),t},t.uniqueId=f,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:"layers."+r+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+r+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),e},t.validateLight=$r,t.validateStyle=Yr,t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.vectorTile=Ia,t.version="0.54.1",t.warnOnce=w,t.webpSupported=D,t.window=self,t.wrap=p})),i(0,(function(t){function e(t){var r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var i="[",n=0,o=t;n<o.length;n+=1)i+=e(o[n])+",";return i+"]"}for(var a=Object.keys(t).sort(),s="{",u=0;u<a.length;u++)s+=JSON.stringify(a[u])+":"+e(t[a[u]])+",";return s+"}"}function r(r){for(var i="",n=0,o=t.refProperties;n<o.length;n+=1)i+="/"+e(r[o[n]]);return i}var i=function(t){t&&this.replace(t)};i.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},i.prototype.update=function(e,i){for(var n=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var u=this._layers[s.id]=t.createStyleLayer(s);u._featureFilter=t.featureFilter(u.filter)}for(var l=0,p=i;l<p.length;l+=1){var c=p[l];delete this._layerConfigs[c],delete this._layers[c]}this.familiesBySource={};for(var h=0,f=function(t){for(var e={},i=0;i<t.length;i++){var n=r(t[i]),o=e[n];o||(o=e[n]=[]),o.push(t[i])}var a=[];for(var s in e)a.push(e[s]);return a}(t.values(this._layerConfigs));h<f.length;h+=1){var d=f[h].map((function(t){return n._layers[t.id]})),m=d[0];if("none"!==m.visibility){var y=m.source||"",v=this.familiesBySource[y];v||(v=this.familiesBySource[y]={});var _=m.sourceLayer||"_geojsonTileLayer",g=v[_];g||(g=v[_]=[]),g.push(d)}}};var n=function(e){var r={},i=[];for(var n in e){var o=e[n],a=r[n]={};for(var s in o){var u=o[+s];if(u&&0!==u.bitmap.width&&0!==u.bitmap.height){var l={x:0,y:0,w:u.bitmap.width+2,h:u.bitmap.height+2};i.push(l),a[s]={rect:l,metrics:u.metrics}}}}var p=t.potpack(i),c=p.w,h=p.h,f=new t.AlphaImage({width:c||1,height:h||1});for(var d in e){var m=e[d];for(var y in m){var v=m[+y];if(v&&0!==v.bitmap.width&&0!==v.bitmap.height){var _=r[d][y].rect;t.AlphaImage.copy(v.bitmap,f,{x:0,y:0},{x:_.x+1,y:_.y+1},v.bitmap)}}}this.image=f,this.positions=r};t.register("GlyphAtlas",n);var o=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies};function a(e,r){for(var i=new t.EvaluationParameters(r),n=0,o=e;n<o.length;n+=1)o[n].recalculate(i)}o.prototype.parse=function(e,r,i,o){var s=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var u=new t.DictionaryCoder(Object.keys(e.layers).sort()),l=new t.FeatureIndex(this.tileID);l.bucketLayerIDs=[];var p,c,h,f,d={},m={featureIndex:l,iconDependencies:{},patternDependencies:{},glyphDependencies:{}},y=r.familiesBySource[this.source];for(var v in y){var _=e.layers[v];if(_){1===_.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+v+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var g=u.encode(v),x=[],b=0;b<_.length;b++){var w=_.feature(b);x.push({feature:w,index:b,sourceLayerIndex:g})}for(var E=0,S=y[v];E<S.length;E+=1){var T=S[E],A=T[0];A.minzoom&&this.zoom<Math.floor(A.minzoom)||A.maxzoom&&this.zoom>=A.maxzoom||"none"!==A.visibility&&(a(T,this.zoom),(d[A.id]=A.createBucket({index:l.bucketLayerIDs.length,layers:T,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:g,sourceID:this.source})).populate(x,m),l.bucketLayerIDs.push(T.map((function(t){return t.id}))))}}}var I=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(I).length?i.send("getGlyphs",{uid:this.uid,stacks:I},(function(t,e){p||(p=t,c=e,C.call(s))})):c={};var z=Object.keys(m.iconDependencies);z.length?i.send("getImages",{icons:z},(function(t,e){p||(p=t,h=e,C.call(s))})):h={};var k=Object.keys(m.patternDependencies);function C(){if(p)return o(p);if(c&&h&&f){var e=new n(c),r=new t.ImageAtlas(h,f);for(var i in d){var s=d[i];s instanceof t.SymbolBucket?(a(s.layers,this.zoom),t.performSymbolLayout(s,c,e.positions,h,r.iconPositions,this.showCollisionBoxes)):s.hasPattern&&(s instanceof t.LineBucket||s instanceof t.FillBucket||s instanceof t.FillExtrusionBucket)&&(a(s.layers,this.zoom),s.addFeatures(m,r.patternPositions))}this.status="done",o(null,{buckets:t.values(d).filter((function(t){return!t.isEmpty()})),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?c:null,iconMap:this.returnDependencies?h:null,glyphPositions:this.returnDependencies?e.positions:null})}}k.length?i.send("getImages",{icons:k},(function(t,e){p||(p=t,f=e,C.call(s))})):f={},C.call(this)};var s="undefined"!=typeof performance,u={getEntriesByName:function(t){return!!(s&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(s&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(s&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(s&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(s&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},l=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},u.mark(this._marks.start)};function p(e,r){var i=t.getArrayBuffer(e.request,(function(e,i,n,o){e?r(e):i&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(i)),rawData:i,cacheControl:n,expires:o})}));return function(){i.cancel(),r()}}l.prototype.finish=function(){u.mark(this._marks.end);var t=u.getEntriesByName(this._marks.measure);return 0===t.length&&(u.measure(this._marks.measure,this._marks.start,this._marks.end),t=u.getEntriesByName(this._marks.measure),u.clearMarks(this._marks.start),u.clearMarks(this._marks.end),u.clearMeasures(this._marks.measure)),t},u.Performance=l;var c=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||p,this.loading={},this.loaded={}};c.prototype.loadTile=function(e,r){var i=this,n=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new u.Performance(e.request),s=this.loading[n]=new o(e);s.abort=this.loadVectorData(e,(function(e,o){if(delete i.loading[n],e||!o)return s.status="done",i.loaded[n]=s,r(e);var u=o.rawData,l={};o.expires&&(l.expires=o.expires),o.cacheControl&&(l.cacheControl=o.cacheControl);var p={};if(a){var c=a.finish();c&&(p.resourceTiming=JSON.parse(JSON.stringify(c)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,i.layerIndex,i.actor,(function(e,i){if(e||!i)return r(e);r(null,t.extend({rawTileData:u.slice(0)},i,l,p))})),i.loaded=i.loaded||{},i.loaded[n]=s}))},c.prototype.reloadTile=function(t,e){var r=this.loaded,i=t.uid,n=this;if(r&&r[i]){var o=r[i];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,r){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,n.layerIndex,n.actor,i)),e(t,r)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.actor,a):a())}},c.prototype.abortTile=function(t,e){var r=this.loading,i=t.uid;r&&r[i]&&r[i].abort&&(r[i].abort(),delete r[i]),e()},c.prototype.removeTile=function(t,e){var r=this.loaded,i=t.uid;r&&r[i]&&delete r[i],e()};var h=function(){this.loaded={}};h.prototype.loadTile=function(e,r){var i=e.uid,n=e.encoding,o=e.rawImageData,a=new t.DEMData(i,o,n);this.loaded=this.loaded||{},this.loaded[i]=a,r(null,a)},h.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function d(t){var e=0;if(t&&t.length>0){e+=Math.abs(m(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(m(t[r]))}return e}function m(t){var e,r,i,n,o,a,s=0,u=t.length;if(u>2){for(a=0;a<u;a++)a===u-2?(i=u-2,n=u-1,o=0):a===u-1?(i=u-1,n=0,o=1):(i=a,n=a+1,o=a+2),e=t[i],r=t[n],s+=(y(t[o][0])-y(e[0]))*Math.sin(y(r[1]));s=s*f.RADIUS*f.RADIUS/2}return s}function y(t){return t*Math.PI/180}var v={geometry:function t(e){var r,i=0;switch(e.type){case"Polygon":return d(e.coordinates);case"MultiPolygon":for(r=0;r<e.coordinates.length;r++)i+=d(e.coordinates[r]);return i;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(r=0;r<e.geometries.length;r++)i+=t(e.geometries[r]);return i}},ring:m};function _(t,e){return function(r){return t(r,e)}}function g(t,e){e=!!e,t[0]=x(t[0],e);for(var r=1;r<t.length;r++)t[r]=x(t[r],!e);return t}function x(t,e){return function(t){return v.ring(t)>=0}(t)===e?t:t.reverse()}var b=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,w=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};w.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,i=this._feature.geometry;r<i.length;r+=1){var n=i[r];e.push([new t.Point$1(n[0],n[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var u=[],l=0,p=s[a];l<p.length;l+=1){var c=p[l];u.push(new t.Point$1(c[0],c[1]))}o.push(u)}return o},w.prototype.toGeoJSON=function(t,e,r){return b.call(this,t,e,r)};var E=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};E.prototype.feature=function(t){return new w(this._features[t])};var S=t.vectorTile.VectorTileFeature,T=A;function A(t,e){this.options=e||{},this.features=t,this.length=t.length}function I(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}A.prototype.feature=function(t){return new I(this.features[t],this.options.extent)},I.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var i=e[r],n=[],o=0;o<i.length;o++)n.push(new t.Point$1(i[o][0],i[o][1]));this.geometry.push(n)}return this.geometry},I.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,i=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var u=a[s];e=Math.min(e,u.x),r=Math.max(r,u.x),i=Math.min(i,u.y),n=Math.max(n,u.y)}return[e,i,r,n]},I.prototype.toGeoJSON=S.prototype.toGeoJSON;var z=P,k=P,C=T;function P(e){var r=new t.pbf;return function(t,e){for(var r in t.layers)e.writeMessage(3,M,t.layers[r])}(e,r),r.finish()}function M(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var i={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,L,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,O,o[r])}function L(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,D,t),e.writeVarintField(3,r.type),e.writeMessage(4,F,r)}function D(t,e){var r=t.feature,i=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var u=o[s];void 0===u&&(i.push(s),u=i.length-1,o[s]=u),e.writeVarint(u);var l=r.properties[s],p=typeof l;"string"!==p&&"boolean"!==p&&"number"!==p&&(l=JSON.stringify(l));var c=p+":"+l,h=a[c];void 0===h&&(n.push(l),h=n.length-1,a[c]=h),e.writeVarint(h)}}function B(t,e){return(e<<3)+(7&t)}function R(t){return t<<1^t>>31}function F(t,e){for(var r=t.loadGeometry(),i=t.type,n=0,o=0,a=r.length,s=0;s<a;s++){var u=r[s],l=1;1===i&&(l=u.length),e.writeVarint(B(1,l));for(var p=3===i?u.length-1:u.length,c=0;c<p;c++){1===c&&1!==i&&e.writeVarint(B(2,p-1));var h=u[c].x-n,f=u[c].y-o;e.writeVarint(R(h)),e.writeVarint(R(f)),n+=h,o+=f}3===i&&e.writeVarint(B(7,1))}}function O(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function U(t,e,r,i){V(t,r,i),V(e,2*r,2*i),V(e,2*r+1,2*i+1)}function V(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function N(t,e,r,i){var n=t-r,o=e-i;return n*n+o*o}z.fromVectorTileJs=k,z.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var i in t)r[i]=new T(t[i].features,e),r[i].name=i,r[i].version=e.version,r[i].extent=e.extent;return P({layers:r})},z.GeoJSONWrapper=C;var j=function(t){return t[0]},q=function(t){return t[1]},Z=function(t,e,r,i,n){void 0===e&&(e=j),void 0===r&&(r=q),void 0===i&&(i=64),void 0===n&&(n=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new n(2*t.length),u=0;u<t.length;u++)a[u]=u,s[2*u]=e(t[u]),s[2*u+1]=r(t[u]);!function t(e,r,i,n,o,a){if(!(o-n<=i)){var s=n+o>>1;!function t(e,r,i,n,o,a){for(;o>n;){if(o-n>600){var s=o-n+1,u=i-n+1,l=Math.log(s),p=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*p*(s-p)/s)*(u-s/2<0?-1:1);t(e,r,i,Math.max(n,Math.floor(i-u*p/s+c)),Math.min(o,Math.floor(i+(s-u)*p/s+c)),a)}var h=r[2*i+a],f=n,d=o;for(U(e,r,n,i),r[2*o+a]>h&&U(e,r,n,o);f<d;){for(U(e,r,f,d),f++,d--;r[2*f+a]<h;)f++;for(;r[2*d+a]>h;)d--}r[2*n+a]===h?U(e,r,n,d):U(e,r,++d,o),d<=i&&(n=d+1),i<=d&&(o=d-1)}}(e,r,s,n,o,a%2),t(e,r,i,n,s-1,a+1),t(e,r,i,s+1,o,a+1)}}(a,s,i,0,a.length-1,0)};Z.prototype.range=function(t,e,r,i){return function(t,e,r,i,n,o,a){for(var s,u,l=[0,t.length-1,0],p=[];l.length;){var c=l.pop(),h=l.pop(),f=l.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],u=e[2*d+1],s>=r&&s<=n&&u>=i&&u<=o&&p.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],u=e[2*m+1],s>=r&&s<=n&&u>=i&&u<=o&&p.push(t[m]);var y=(c+1)%2;(0===c?r<=s:i<=u)&&(l.push(f),l.push(m-1),l.push(y)),(0===c?n>=s:o>=u)&&(l.push(m+1),l.push(h),l.push(y))}}return p}(this.ids,this.coords,t,e,r,i,this.nodeSize)},Z.prototype.within=function(t,e,r){return function(t,e,r,i,n,o){for(var a=[0,t.length-1,0],s=[],u=n*n;a.length;){var l=a.pop(),p=a.pop(),c=a.pop();if(p-c<=o)for(var h=c;h<=p;h++)N(e[2*h],e[2*h+1],r,i)<=u&&s.push(t[h]);else{var f=Math.floor((c+p)/2),d=e[2*f],m=e[2*f+1];N(d,m,r,i)<=u&&s.push(t[f]);var y=(l+1)%2;(0===l?r-n<=d:i-n<=m)&&(a.push(c),a.push(f-1),a.push(y)),(0===l?r+n>=d:i+n>=m)&&(a.push(f+1),a.push(p),a.push(y))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var G={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},X=function(t){this.options=Q(Object.create(G),t),this.trees=new Array(this.options.maxZoom+1)};function W(t,e,r,i,n){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:i,properties:n}}function K(t,e){var r=t.geometry.coordinates,i=r[0],n=r[1];return{x:Y(i),y:$(n),zoom:1/0,index:e,parentId:-1}}function H(t){return{type:"Feature",id:t.id,properties:J(t),geometry:{type:"Point",coordinates:[(i=t.x,360*(i-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,i}function J(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Q(Q({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function Y(t){return t/360+.5}function $(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Q(t,e){for(var r in e)t[r]=e[r];return t}function tt(t){return t.x}function et(t){return t.y}function rt(t,e,r,i,n,o){var a=n-r,s=o-i;if(0!==a||0!==s){var u=((t-r)*a+(e-i)*s)/(a*a+s*s);u>1?(r=n,i=o):u>0&&(r+=a*u,i+=s*u)}return(a=t-r)*a+(s=e-i)*s}function it(t,e,r,i){var n={id:void 0===t?null:t,type:e,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)nt(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var i=0;i<e.length;i++)nt(t,e[i]);else if("MultiPolygon"===r)for(i=0;i<e.length;i++)for(var n=0;n<e[i].length;n++)nt(t,e[i][n])}(n),n}function nt(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function ot(t,e,r,i){if(e.geometry){var n=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],u=e.id;if(r.promoteId?u=e.properties[r.promoteId]:r.generateId&&(u=i||0),"Point"===o)at(n,s);else if("MultiPoint"===o)for(var l=0;l<n.length;l++)at(n[l],s);else if("LineString"===o)st(n,s,a,!1);else if("MultiLineString"===o){if(r.lineMetrics){for(l=0;l<n.length;l++)s=[],st(n[l],s,a,!1),t.push(it(u,"LineString",s,e.properties));return}ut(n,s,a,!1)}else if("Polygon"===o)ut(n,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(l=0;l<e.geometry.geometries.length;l++)ot(t,{id:u,geometry:e.geometry.geometries[l],properties:e.properties},r,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(l=0;l<n.length;l++){var p=[];ut(n[l],p,a,!0),s.push(p)}}t.push(it(u,o,s,e.properties))}}function at(t,e){e.push(lt(t[0])),e.push(pt(t[1])),e.push(0)}function st(t,e,r,i){for(var n,o,a=0,s=0;s<t.length;s++){var u=lt(t[s][0]),l=pt(t[s][1]);e.push(u),e.push(l),e.push(0),s>0&&(a+=i?(n*l-u*o)/2:Math.sqrt(Math.pow(u-n,2)+Math.pow(l-o,2))),n=u,o=l}var p=e.length-3;e[2]=1,function t(e,r,i,n){for(var o,a=n,s=i-r>>1,u=i-r,l=e[r],p=e[r+1],c=e[i],h=e[i+1],f=r+3;f<i;f+=3){var d=rt(e[f],e[f+1],l,p,c,h);if(d>a)o=f,a=d;else if(d===a){var m=Math.abs(f-s);m<u&&(o=f,u=m)}}a>n&&(o-r>3&&t(e,r,o,n),e[o+2]=a,i-o>3&&t(e,o,i,n))}(e,0,p,r),e[p+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function ut(t,e,r,i){for(var n=0;n<t.length;n++){var o=[];st(t[n],o,r,i),e.push(o)}}function lt(t){return t/360+.5}function pt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function ct(t,e,r,i,n,o,a,s){if(i/=e,o>=(r/=e)&&a<i)return t;if(a<r||o>=i)return null;for(var u=[],l=0;l<t.length;l++){var p=t[l],c=p.geometry,h=p.type,f=0===n?p.minX:p.minY,d=0===n?p.maxX:p.maxY;if(f>=r&&d<i)u.push(p);else if(!(d<r||f>=i)){var m=[];if("Point"===h||"MultiPoint"===h)ht(c,m,r,i,n);else if("LineString"===h)ft(c,m,r,i,n,!1,s.lineMetrics);else if("MultiLineString"===h)mt(c,m,r,i,n,!1);else if("Polygon"===h)mt(c,m,r,i,n,!0);else if("MultiPolygon"===h)for(var y=0;y<c.length;y++){var v=[];mt(c[y],v,r,i,n,!0),v.length&&m.push(v)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(y=0;y<m.length;y++)u.push(it(p.id,h,m[y],p.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),u.push(it(p.id,h,m,p.tags))}}}return u.length?u:null}function ht(t,e,r,i,n){for(var o=0;o<t.length;o+=3){var a=t[o+n];a>=r&&a<=i&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function ft(t,e,r,i,n,o,a){for(var s,u,l=dt(t),p=0===n?vt:_t,c=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],y=t[h+3],v=t[h+4],_=0===n?f:d,g=0===n?y:v,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-v,2))),_<r?g>r&&(u=p(l,f,d,y,v,r),a&&(l.start=c+s*u)):_>i?g<i&&(u=p(l,f,d,y,v,i),a&&(l.start=c+s*u)):yt(l,f,d,m),g<r&&_>=r&&(u=p(l,f,d,y,v,r),x=!0),g>i&&_<=i&&(u=p(l,f,d,y,v,i),x=!0),!o&&x&&(a&&(l.end=c+s*u),e.push(l),l=dt(t)),a&&(c+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(_=0===n?f:d)>=r&&_<=i&&yt(l,f,d,m),b=l.length-3,o&&b>=3&&(l[b]!==l[0]||l[b+1]!==l[1])&&yt(l,l[0],l[1],l[2]),l.length&&e.push(l)}function dt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function mt(t,e,r,i,n,o){for(var a=0;a<t.length;a++)ft(t[a],e,r,i,n,o,!1)}function yt(t,e,r,i){t.push(e),t.push(r),t.push(i)}function vt(t,e,r,i,n,o){var a=(o-e)/(i-e);return t.push(o),t.push(r+(n-r)*a),t.push(1),a}function _t(t,e,r,i,n,o){var a=(o-r)/(n-r);return t.push(e+(i-e)*a),t.push(o),t.push(1),a}function gt(t,e){for(var r=[],i=0;i<t.length;i++){var n,o=t[i],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)n=xt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(xt(o.geometry[s],e))}else if("MultiPolygon"===a)for(n=[],s=0;s<o.geometry.length;s++){for(var u=[],l=0;l<o.geometry[s].length;l++)u.push(xt(o.geometry[s][l],e));n.push(u)}r.push(it(o.id,a,n,o.tags))}return r}function xt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var i=0;i<t.length;i+=3)r.push(t[i]+e,t[i+1],t[i+2]);return r}function bt(t,e){if(t.transformed)return t;var r,i,n,o=1<<t.z,a=t.x,s=t.y;for(r=0;r<t.features.length;r++){var u=t.features[r],l=u.geometry,p=u.type;if(u.geometry=[],1===p)for(i=0;i<l.length;i+=2)u.geometry.push(wt(l[i],l[i+1],e,o,a,s));else for(i=0;i<l.length;i++){var c=[];for(n=0;n<l[i].length;n+=2)c.push(wt(l[i][n],l[i][n+1],e,o,a,s));u.geometry.push(c)}}return t.transformed=!0,t}function wt(t,e,r,i,n,o){return[Math.round(r*(t*i-n)),Math.round(r*(e*i-o))]}function Et(t,e,r,i,n){for(var o=e===n.maxZoom?0:n.tolerance/((1<<e)*n.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,St(a,t[s],o,n);var u=t[s].minX,l=t[s].minY,p=t[s].maxX,c=t[s].maxY;u<a.minX&&(a.minX=u),l<a.minY&&(a.minY=l),p>a.maxX&&(a.maxX=p),c>a.maxY&&(a.maxY=c)}return a}function St(t,e,r,i){var n=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<n.length;s+=3)a.push(n[s]),a.push(n[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)Tt(a,n,t,r,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)Tt(a,n[s],t,r,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var u=0;u<n.length;u++){var l=n[u];for(s=0;s<l.length;s++)Tt(a,l[s],t,r,!0,0===s)}if(a.length){var p=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var c in p={},e.tags)p[c]=e.tags[c];p.mapbox_clip_start=n.start/n.size,p.mapbox_clip_end=n.end/n.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:p};null!==e.id&&(h.id=e.id),t.features.push(h)}}function Tt(t,e,r,i,n,o){var a=i*i;if(i>0&&e.size<(n?a:i))r.numPoints+=e.length/3;else{for(var s=[],u=0;u<e.length;u+=3)(0===i||e[u+2]>a)&&(r.numSimplified++,s.push(e[u]),s.push(e[u+1])),r.numPoints++;n&&function(t,e){for(var r=0,i=0,n=t.length,o=n-2;i<n;o=i,i+=2)r+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(r>0===e)for(i=0,n=t.length;i<n/2;i+=2){var a=t[i],s=t[i+1];t[i]=t[n-2-i],t[i+1]=t[n-1-i],t[n-2-i]=a,t[n-1-i]=s}}(s,o),t.push(s)}}function At(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)ot(r,t.features[i],e,i);else"Feature"===t.type?ot(r,t,e):ot(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var r=e.buffer/e.extent,i=t,n=ct(t,1,-1-r,r,0,-1,2,e),o=ct(t,1,1-r,2+r,0,-1,2,e);return(n||o)&&(i=ct(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=gt(n,1).concat(i)),o&&(i=i.concat(gt(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function It(t,e,r){return 32*((1<<t)*r+e)+t}function zt(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var i=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!i)return e(null,null);var n=new E(i.features),o=z(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:n,rawData:o.buffer})}X.prototype.load=function(t){var e=this.options,r=e.log,i=e.minZoom,n=e.maxZoom,o=e.nodeSize;r&&console.time("total time");var a="prepare "+t.length+" points";r&&console.time(a),this.points=t;for(var s=[],u=0;u<t.length;u++)t[u].geometry&&s.push(K(t[u],u));this.trees[n+1]=new Z(s,tt,et,o,Float32Array),r&&console.timeEnd(a);for(var l=n;l>=i;l--){var p=+Date.now();s=this._cluster(s,l),this.trees[l]=new Z(s,tt,et,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",l,s.length,+Date.now()-p)}return r&&console.timeEnd("total time"),this},X.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){var a=this.getClusters([r,i,180,o],e),s=this.getClusters([-180,i,n,o],e);return a.concat(s)}for(var u=this.trees[this._limitZoom(e)],l=[],p=0,c=u.range(Y(r),$(o),Y(n),$(i));p<c.length;p+=1){var h=c[p],f=u.points[h];l.push(f.numPoints?H(f):this.points[f.index])}return l},X.prototype.getChildren=function(t){var e=t>>5,r=t%32,i="No cluster with the specified id.",n=this.trees[r];if(!n)throw new Error(i);var o=n.points[e];if(!o)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],u=0,l=n.within(o.x,o.y,a);u<l.length;u+=1){var p=l[u],c=n.points[p];c.parentId===t&&s.push(c.numPoints?H(c):this.points[c.index])}if(0===s.length)throw new Error(i);return s},X.prototype.getLeaves=function(t,e,r){e=e||10,r=r||0;var i=[];return this._appendLeaves(i,t,e,r,0),i},X.prototype.getTile=function(t,e,r){var i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options,a=o.extent,s=o.radius/a,u=(r-s)/n,l=(r+1+s)/n,p={features:[]};return this._addTileFeatures(i.range((e-s)/n,u,(e+1+s)/n,l),i.points,e,r,n,p),0===e&&this._addTileFeatures(i.range(1-s/n,u,1,l),i.points,n,r,n,p),e===n-1&&this._addTileFeatures(i.range(0,u,s/n,l),i.points,-1,r,n,p),p.features.length?p:null},X.prototype.getClusterExpansionZoom=function(t){for(var e=t%32-1;e<=this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},X.prototype._appendLeaves=function(t,e,r,i,n){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],u=s.properties;if(u&&u.cluster?n+u.point_count<=i?n+=u.point_count:n=this._appendLeaves(t,u.cluster_id,r,i,n):n<i?n++:t.push(s),t.length===r)break}return n},X.prototype._addTileFeatures=function(t,e,r,i,n,o){for(var a=0,s=t;a<s.length;a+=1){var u=e[s[a]],l={type:1,geometry:[[Math.round(this.options.extent*(u.x*n-r)),Math.round(this.options.extent*(u.y*n-i))]],tags:u.numPoints?J(u):this.points[u.index].properties},p=u.numPoints?u.id:this.points[u.index].id;void 0!==p&&(l.id=p),o.features.push(l)}},X.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},X.prototype._cluster=function(t,e){for(var r=[],i=this.options,n=i.radius,o=i.extent,a=i.reduce,s=n/(o*Math.pow(2,e)),u=0;u<t.length;u++){var l=t[u];if(!(l.zoom<=e)){l.zoom=e;for(var p=this.trees[e+1],c=p.within(l.x,l.y,s),h=l.numPoints||1,f=l.x*h,d=l.y*h,m=a?this._map(l,!0):null,y=(u<<5)+(e+1),v=0,_=c;v<_.length;v+=1){var g=_[v],x=p.points[g];if(!(x.zoom<=e)){x.zoom=e;var b=x.numPoints||1;f+=x.x*b,d+=x.y*b,h+=b,x.parentId=y,a&&a(m,this._map(x))}}1===h?r.push(l):(l.parentId=y,r.push(W(f/h,d/h,y,h,m)))}}return r},X.prototype._map=function(t,e){if(t.numPoints)return e?Q({},t.properties):t.properties;var r=this.points[t.index].properties,i=this.options.map(r);return e&&i===r?Q({},i):i},At.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},At.prototype.splitTile=function(t,e,r,i,n,o,a){for(var s=[t,e,r,i],u=this.options,l=u.debug;s.length;){i=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var p=1<<e,c=It(e,r,i),h=this.tiles[c];if(!h&&(l>1&&console.time("creation"),h=this.tiles[c]=Et(t,e,r,i,u),this.tileCoords.push({z:e,x:r,y:i}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,n){if(e===u.maxZoom||e===n)continue;var d=1<<n-e;if(r!==Math.floor(o/d)||i!==Math.floor(a/d))continue}else if(e===u.indexMaxZoom||h.numPoints<=u.indexMaxPoints)continue;if(h.source=null,0!==t.length){l>1&&console.time("clipping");var m,y,v,_,g,x,b=.5*u.buffer/u.extent,w=.5-b,E=.5+b,S=1+b;m=y=v=_=null,g=ct(t,p,r-b,r+E,0,h.minX,h.maxX,u),x=ct(t,p,r+w,r+S,0,h.minX,h.maxX,u),t=null,g&&(m=ct(g,p,i-b,i+E,1,h.minY,h.maxY,u),y=ct(g,p,i+w,i+S,1,h.minY,h.maxY,u),g=null),x&&(v=ct(x,p,i-b,i+E,1,h.minY,h.maxY,u),_=ct(x,p,i+w,i+S,1,h.minY,h.maxY,u),x=null),l>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*r,2*i),s.push(y||[],e+1,2*r,2*i+1),s.push(v||[],e+1,2*r+1,2*i),s.push(_||[],e+1,2*r+1,2*i+1)}}},At.prototype.getTile=function(t,e,r){var i=this.options,n=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=It(t,e=(e%a+a)%a,r);if(this.tiles[s])return bt(this.tiles[s],n);o>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var u,l=t,p=e,c=r;!u&&l>0;)l--,p=Math.floor(p/2),c=Math.floor(c/2),u=this.tiles[It(l,p,c)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,p,c),o>1&&console.time("drilling down"),this.splitTile(u.source,l,p,c,t,e,r),o>1&&console.timeEnd("drilling down"),this.tiles[s]?bt(this.tiles[s],n):null):null};var kt=function(e){function r(t,r,i){e.call(this,t,r,zt),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var n=!!(i&&i.request&&i.request.collectResourceTiming)&&new u.Performance(i.request);this.loadGeoJSON(i,(function(o,a){if(o||!a)return r(o);if("object"!=typeof a)return r(new Error("Input data is not a valid GeoJSON object."));!function t(e,r){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(_(t,r)),e;case"GeometryCollection":return e.geometries=e.geometries.map(_(t,r)),e;case"Feature":return e.geometry=t(e.geometry,r),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=g(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(_(g,e))),t}(e,r);default:return e}}(a,!0);try{e._geoJSONIndex=i.cluster?new X(function(e){var r=e.superclusterOptions,i=e.clusterProperties;if(!i||!r)return r;for(var n={},o={},a={accumulated:null,zoom:0},s={properties:null},u=Object.keys(i),l=0,p=u;l<p.length;l+=1){var c=p[l],h=i[c],f=h[0],d=h[1],m=t.createExpression(d),y=t.createExpression("string"==typeof f?[f,["accumulated"],["get",c]]:f);n[c]=m.value,o[c]=y.value}return r.map=function(t){s.properties=t;for(var e={},r=0,i=u;r<i.length;r+=1){var o=i[r];e[o]=n[o].evaluate(a,s)}return e},r.reduce=function(t,e){s.properties=e;for(var r=0,i=u;r<i.length;r+=1){var n=i[r];a.accumulated=t[n],t[n]=o[n].evaluate(a,s)}},r}(i)).load(a.features):function(t,e){return new At(t,e)}(a,i.geojsonVtOptions)}catch(o){return r(o)}e.loaded={};var s={};if(n){var u=n.finish();u&&(s.resourceTiming={},s.resourceTiming[i.source]=JSON.parse(JSON.stringify(u)))}r(null,s)}))}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(t,r){var i=this.loaded,n=t.uid;return i&&i[n]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if("string"!=typeof e.data)return r(new Error("Input data is not a valid GeoJSON object."));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error("Input data is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))},r.prototype.getClusterChildren=function(t,e){e(null,this._geoJSONIndex.getChildren(t.clusterId))},r.prototype.getClusterLeaves=function(t,e){e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))},r}(c),Ct=function(e){var r=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:c,geojson:kt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return Ct.prototype.setReferrer=function(t,e){this.referrer=e},Ct.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},Ct.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},Ct.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},Ct.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},Ct.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},Ct.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},Ct.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},Ct.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},Ct.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var i=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==i.removeSource?i.removeSource(e,r):r()}},Ct.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},Ct.prototype.loadRTLTextPlugin=function(e,r,i){try{t.plugin.isLoaded()||(this.self.importScripts(r),i(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+r)))}catch(t){i(t.toString())}},Ct.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i),e},Ct.prototype.getWorkerSource=function(t,e,r){var i=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var n={send:function(e,r,n){i.actor.send(e,r,n,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](n,this.getLayerIndex(t))}return this.workerSources[t][e][r]},Ct.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new h),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&void 0!==t.window&&t.window instanceof WorkerGlobalScope&&(t.window.worker=new Ct(t.window)),Ct})),i(0,(function(t){var e=t.createCommonjsModule((function(t){function e(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(r);try{e=new Worker(i),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(i),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){return void 0===r[t]&&(r[t]=function(t){var r=document.createElement("canvas"),i=Object.create(e.webGLContextAttributes);return i.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",i)||r.probablySupportsContext("experimental-webgl",i):r.supportsContext?r.supportsContext("webgl",i)||r.supportsContext("experimental-webgl",i):r.getContext("webgl",i)||r.getContext("experimental-webgl",i)}(t)),r[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}})),r={create:function(e,r,i){var n=t.window.document.createElement(e);return r&&(n.className=r),i&&i.appendChild(n),n},createNS:function(e,r){return t.window.document.createElementNS(e,r)}},i=t.window.document?t.window.document.documentElement.style:null;function n(t){if(!i)return null;for(var e=0;e<t.length;e++)if(t[e]in i)return t[e];return t[0]}var o,a=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){i&&a&&(o=i[a],i[a]="none")},r.enableDrag=function(){i&&a&&(i[a]=o)};var s=n(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[s]=e};var u=!1;try{var l=Object.defineProperty({},"passive",{get:function(){u=!0}});t.window.addEventListener("test",l,l),t.window.removeEventListener("test",l,l)}catch(t){u=!1}r.addEventListener=function(t,e,r,i){void 0===i&&(i={}),"passive"in i&&u?t.addEventListener(e,r,i):t.addEventListener(e,r,i.capture)},r.removeEventListener=function(t,e,r,i){void 0===i&&(i={}),"passive"in i&&u?t.removeEventListener(e,r,i):t.removeEventListener(e,r,i.capture)};var p=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",p,!0)};function c(t){var e=t.userImage;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}r.suppressClick=function(){t.window.addEventListener("click",p,!0),t.window.setTimeout((function(){t.window.removeEventListener("click",p,!0)}),0)},r.mousePos=function(e,r){var i=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t.Point(r.clientX-i.left-e.clientLeft,r.clientY-i.top-e.clientTop)},r.touchPos=function(e,r){for(var i=e.getBoundingClientRect(),n=[],o="touchend"===r.type?r.changedTouches:r.touches,a=0;a<o.length;a++)n.push(new t.Point(o[a].clientX-i.left-e.clientLeft,o[a].clientY-i.top-e.clientTop));return n},r.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var i=r[e],n=i.ids,o=i.callback;this._notify(n,o)}this.requestors=[]}},r.prototype.getImage=function(t){return this.images[t]},r.prototype.addImage=function(t,e){this.images[t]=e},r.prototype.updateImage=function(t,e){var r=this.images[t];e.version=r.version+1,this.images[t]=e,this.updatedImages[t]=!0},r.prototype.removeImage=function(t){var e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()},r.prototype.listImages=function(){return Object.keys(this.images)},r.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var i=0,n=t;i<n.length;i+=1){var o=n[i];this.images[o]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},r.prototype._notify=function(e,r){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n];this.images[a]||this.fire(new t.Event("styleimagemissing",{id:a}));var s=this.images[a];s?i[a]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image "'+a+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}r(null,i)},r.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},r.prototype.getPattern=function(e){var r=this.patterns[e],i=this.getImage(e);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{var n={w:i.data.width+2,h:i.data.height+2,x:0,y:0},o=new t.ImagePosition(n,i);this.patterns[e]={bin:n,position:o}}return this._updatePatternAtlas(),this.patterns[e].position},r.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},r.prototype._updatePatternAtlas=function(){var e=[];for(var r in this.patterns)e.push(this.patterns[r].bin);var i=t.potpack(e),n=i.w,o=i.h,a=this.atlasImage;for(var s in a.resize({width:n||1,height:o||1}),this.patterns){var u=this.patterns[s].bin,l=u.x+1,p=u.y+1,c=this.images[s].data,h=c.width,f=c.height;t.RGBAImage.copy(c,a,{x:0,y:0},{x:l,y:p},{width:h,height:f}),t.RGBAImage.copy(c,a,{x:0,y:f-1},{x:l,y:p-1},{width:h,height:1}),t.RGBAImage.copy(c,a,{x:0,y:0},{x:l,y:p+f},{width:h,height:1}),t.RGBAImage.copy(c,a,{x:h-1,y:0},{x:l-1,y:p},{width:1,height:f}),t.RGBAImage.copy(c,a,{x:0,y:0},{x:l+h,y:p},{width:1,height:f})}this.dirty=!0},r.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},r.prototype.dispatchRenderCallbacks=function(t){for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(!this.callbackDispatchedThisFrame[i]){this.callbackDispatchedThisFrame[i]=!0;var n=this.images[i];c(n)&&this.updateImage(i,n)}}},r}(t.Evented),f=m,d=1e20;function m(t,e,r,i,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function y(t,e,r,i,n,o,a){for(var s=0;s<e;s++){for(var u=0;u<r;u++)i[u]=t[u*e+s];for(v(i,n,o,a,r),u=0;u<r;u++)t[u*e+s]=n[u]}for(u=0;u<r;u++){for(s=0;s<e;s++)i[s]=t[u*e+s];for(v(i,n,o,a,e),s=0;s<e;s++)t[u*e+s]=Math.sqrt(n[s])}}function v(t,e,r,i,n){r[0]=0,i[0]=-d,i[1]=+d;for(var o=1,a=0;o<n;o++){for(var s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);s<=i[a];)a--,s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);r[++a]=o,i[a]=s,i[a+1]=+d}for(o=0,a=0;o<n;o++){for(;i[a+1]<o;)a++;e[o]=(o-r[a])*(o-r[a])+t[r[a]]}}m.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var n=e.data[4*i+3]/255;this.gridOuter[i]=1===n?0:0===n?d:Math.pow(Math.max(0,.5-n),2),this.gridInner[i]=1===n?d:0===n?0:Math.pow(Math.max(0,n-.5),2)}for(y(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),y(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var o=this.gridOuter[i]-this.gridInner[i];r[i]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return r};var _=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};_.prototype.setURL=function(t){this.url=t},_.prototype.getGlyphs=function(e,r){var i=this,n=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1){var u=s[a];n.push({stack:o,id:u})}t.asyncAll(n,(function(t,e){var r=t.stack,n=t.id,o=i.entries[r];o||(o=i.entries[r]={glyphs:{},requests:{}});var a=o.glyphs[n];if(void 0===a)if(a=i._tinySDF(o,r,n))e(null,{stack:r,id:n,glyph:a});else{var s=Math.floor(n/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else{var u=o.requests[s];u||(u=o.requests[s]=[],_.loadGlyphRange(r,s,i.url,i.requestTransform,(function(t,e){if(e)for(var r in e)o.glyphs[+r]=e[+r];for(var i=0,n=u;i<n.length;i+=1)(0,n[i])(t,e);delete o.requests[s]}))),u.push((function(t,i){t?e(t):i&&e(null,{stack:r,id:n,glyph:i[n]||null})}))}}else e(null,{stack:r,id:n,glyph:a})}),(function(t,e){if(t)r(t);else if(e){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.stack,u=a.id,l=a.glyph;(i[s]||(i[s]={}))[u]=l&&{id:l.id,bitmap:l.bitmap.clone(),metrics:l.metrics}}r(null,i)}}))},_.prototype._tinySDF=function(e,r,i){var n=this.localIdeographFontFamily;if(n&&(t.isChar["CJK Unified Ideographs"](i)||t.isChar["Hangul Syllables"](i))){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(r)?a="900":/medium/i.test(r)?a="500":/light/i.test(r)&&(a="200"),o=e.tinySDF=new _.TinySDF(24,3,8,.25,n,a)}return{id:i,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},_.loadGlyphRange=function(e,r,i,n,o){var a=256*r,s=a+255,u=n(t.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(u,(function(e,r){if(e)o(e);else if(r){for(var i={},n=0,a=t.parseGlyphPBF(r);n<a.length;n+=1){var s=a[n];i[s.id]=s}o(null,i)}}))},_.TinySDF=f;var g=function(){this.specification=t.styleSpec.light.position};g.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},g.prototype.interpolate=function(e,r,i){return{x:t.number(e.x,r.x,i),y:t.number(e.y,r.y,i),z:t.number(e.z,r.z,i)}};var x=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new g,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),b=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(x),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e,r){if(void 0===r&&(r={}),!this._validate(t.validateLight,e,r))for(var i in e){var n=e[i];t.endsWith(i,"-transition")?this._transitionable.setTransition(i.slice(0,-"-transition".length),n):this._transitionable.setValue(i,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r,i){return(!i||!1!==i.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},r}(t.Evented),w=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};w.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},w.prototype.addDash=function(e,r){var i=r?7:0,n=2*i+1;if(this.nextRow+n>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];for(var s=this.width/o,u=s/2,l=e.length%2==1,p=-i;p<=i;p++)for(var c=this.nextRow+i+p,h=this.width*c,f=l?-e[e.length-1]:0,d=e[0],m=1,y=0;y<this.width;y++){for(;d<y/s;)f=d,d+=e[m],l&&m===e.length-1&&(d+=e[0]),m++;var v=Math.abs(y-f*s),_=Math.abs(y-d*s),g=Math.min(v,_),x=m%2==1,b=void 0;if(r){var w=i?p/i*(u+1):0;if(x){var E=u-Math.abs(w);b=Math.sqrt(g*g+E*E)}else b=u-Math.sqrt(g*g+w*w)}else b=(x?1:-1)*g;this.data[3+4*(h+y)]=Math.max(0,Math.min(255,b+128))}var S={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:o};return this.nextRow+=n,this.dirty=!0,S},w.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var E=function e(r,i){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var n=this.workerPool.acquire(this.id),o=0;o<n.length;o++){var a=n[o],s=new e.Actor(a,i,this.id);s.name="Worker "+o,this.actors.push(s)}};function S(e,r,i){var n=function(r,n){if(r)return i(r);if(n){var o=t.pick(n,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);n.vector_layers&&(o.vectorLayers=n.vector_layers,o.vectorLayerIds=o.vectorLayers.map((function(t){return t.id}))),e.url&&(o.tiles=t.canonicalizeTileset(o,e.url)),i(null,o)}};return e.url?t.getJSON(r(t.normalizeSourceURL(e.url),t.ResourceType.Source),n):t.browser.frame((function(){return n(null,e)}))}E.prototype.broadcast=function(e,r,i){i=i||function(){},t.asyncAll(this.actors,(function(t,i){t.send(e,r,i)}),i)},E.prototype.send=function(t,e,r,i){return("number"!=typeof i||isNaN(i))&&(i=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[i].send(t,e,r),i},E.prototype.remove=function(){this.actors.forEach((function(t){t.remove()})),this.actors=[],this.workerPool.release(this.id)},E.Actor=t.Actor;var T=function(e,r,i){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=i||24};T.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},T.prototype.contains=function(e){var r=Math.pow(2,e.z),i=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*r),n=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*r),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*r),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*r);return e.x>=i&&e.x<o&&e.y>=n&&e.y<a};var A=function(e){function r(r,i,n,o){if(e.call(this),this.id=r,this.dispatcher=n,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(i,["url","scheme","tileSize"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=S(this._options,this.map._transformRequest,(function(r,i){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new T(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var i=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url),n={request:this.map._transformRequest(i,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,i){return e.aborted?r(null):t&&404!==t.status?r(t):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}n.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||"expired"===e.state?e.workerID=this.dispatcher.send("loadTile",n,o.bind(this)):"loading"===e.state?e.reloadCallback=r:this.dispatcher.send("reloadTile",n,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),I=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=S(this._options,this.map._transformRequest,(function(r,i){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new T(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var i=this,n=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),(function(n,o){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(n)e.state="errored",r(n);else if(o){i.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=i.map.painter.context,s=a.gl;e.texture=i.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",r(null)}}))},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),z=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({},i),this.encoding=i.encoding||"mapbox"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var i=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(i,n){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(i)e.state="errored",r(i);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=t.browser.getImageData(n),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.workerID&&"expired"!==e.state||(e.workerID=this.dispatcher.send("loadDEMTile",a,function(t,i){t&&(e.state="errored",r(t)),i&&(e.dem=i,e.needsHillshadePrepare=!0,e.state="loaded",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,o=0===r.x?e.wrap-1:e.wrap,a=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,u={};return u[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(u[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1<i&&(u[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y+1).key]={backfilled:!1}),u},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",this.dispatcher.send("removeDEMTile",{uid:t.uid,source:this.id},void 0,t.workerID)},r}(I),k=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=n,this.setEventedParent(o),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution);var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*a,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(i.clusterRadius||50)*a,log:!1},clusterProperties:i.clusterProperties},i.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(r){if(r)e.fire(new t.ErrorEvent(r));else{var i={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",i))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(i.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",i))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterLeaves=function(t,e,r,i){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},i,this.workerID),this},r.prototype._updateWorkerData=function(e){var r=this,i=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(i.request=this.map._transformRequest(t.browser.resolveURL(n),t.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(n),this.workerID=this.dispatcher.send(this.type+".loadData",i,(function(t,n){r._removed||n&&n.abandoned||(r._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[r.id]&&(r._resourceTiming=n.resourceTiming[r.id].slice(0)),r.dispatcher.send(r.type+".coalesce",{source:i.source},null,r.workerID),e(t))}),this.workerID)},r.prototype.loadTile=function(e,r){var i=this,n=void 0===e.workerID?"loadTile":"reloadTile",o={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID=this.dispatcher.send(n,o,(function(t,o){return e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(o,i.map.painter,"reloadTile"===n),r(null))}),this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),C=function(e){function r(t,r,i,n){e.call(this),this.id=t,this.dispatcher=i,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(n),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var i=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),(function(n,o){n?i.fire(new t.ErrorEvent(n)):o&&(i.image=o,e&&(i.coordinates=e),r&&r(),i._finishLoading())}))},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var i=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,i=1/0,n=-1/0,o=-1/0,a=0,s=e;a<s.length;a+=1){var u=s[a];r=Math.min(r,u.x),i=Math.min(i,u.y),n=Math.max(n,u.x),o=Math.max(o,u.y)}var l=n-r,p=o-i,c=Math.max(l,p),h=Math.max(0,Math.floor(-Math.log(c)/Math.LN2)),f=Math.pow(2,h);return new t.CanonicalTileID(h,Math.floor((r+n)/2*f),Math.floor((i+o)/2*f))}(i),this.minzoom=this.maxzoom=this.tileID.z;var n=i.map((function(t){return r.tileID.getTilePoint(t)._round()}));return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=function(e){function r(t,r,i,n){e.call(this,t,r,i,n),this.roundZoom=!0,this.type="video",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var i=0,n=r.urls;i<n.length;i+=1){var o=n[i];this.urls.push(this.map._transformRequest(o,t.ResourceType.Source).url)}t.getVideo(this.urls,(function(r,i){r?e.fire(new t.ErrorEvent(r)):i&&(e.video=i,e.video.loop=!0,e.video.addEventListener("playing",(function(){e.map.triggerRepaint()})),e.map&&e.video.play(),e._finishLoading())}))},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(C),M=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,i=r.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,i.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[n];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(C),L={vector:A,raster:I,"raster-dem":z,geojson:k,video:P,image:C,canvas:M},D=function(e,r,i,n){var o=new L[r.type](e,r,i,n);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o};function B(e,r){var i=t.identity([]);return t.translate(i,i,[1,1,0]),t.scale(i,i,[.5*e.width,.5*e.height,1]),t.multiply(i,i,e.calculatePosMatrix(r.toUnwrapped()))}function R(t,e,r,i,n){var o=function(t,e,r){if(t)for(var i=0,n=t;i<n.length;i+=1){var o=e[n[i]];if(o&&o.source===r&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===r&&"fill-extrusion"===s.type)return!0}return!1}(i&&i.layers,e,t.id),a=n.maxPitchScaleFactor(),s=t.tilesIn(r,a,o);s.sort(F);for(var u=[],l=0,p=s;l<p.length;l+=1){var c=p[l];u.push({wrappedTileID:c.tileID.wrapped().key,queryResults:c.tile.queryRenderedFeatures(e,t._state,c.queryGeometry,c.cameraQueryGeometry,c.scale,i,n,a,B(t.transform,c.tileID))})}var h=function(t){for(var e={},r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.queryResults,s=o.wrappedTileID,u=r[s]=r[s]||{};for(var l in a)for(var p=a[l],c=u[l]=u[l]||{},h=e[l]=e[l]||[],f=0,d=p;f<d.length;f+=1){var m=d[f];c[m.featureIndex]||(c[m.featureIndex]=!0,h.push(m))}}return e}(u);for(var f in h)h[f].forEach((function(e){var r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}));return h}function F(t,e){var r=t.tileID,i=e.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}var O=function(t,e){this.max=t,this.onRemove=e,this.reset()};O.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var i=r[e];i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value)}return this.data={},this.order=[],this},O.prototype.add=function(t,e,r){var i=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o={value:e,timeout:void 0};if(void 0!==r&&(o.timeout=setTimeout((function(){i.remove(t,o)}),r)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},O.prototype.has=function(t){return t.wrapped().key in this.data},O.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},O.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},O.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},O.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,i=void 0===e?0:this.data[r].indexOf(e),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this},O.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var U=function(t,e,r){this.context=t;var i=t.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};U.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},U.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},U.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var V={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},N=function(t,e,r,i){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=i,this.context=t;var n=t.gl;this.buffer=n.createBuffer(),t.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};N.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},N.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},N.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var i=this.attributes[r],n=e.attributes[i.name];void 0!==n&&t.enableVertexAttribArray(n)}},N.prototype.setVertexAttribPointers=function(t,e,r){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],o=e.attributes[n.name];void 0!==o&&t.vertexAttribPointer(o,n.components,t[V[n.type]],!1,this.itemSize,n.offset+this.itemSize*(r||0))}},N.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var j=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};j.prototype.get=function(){return this.current},j.prototype.set=function(t){},j.prototype.getDefault=function(){return this.default},j.prototype.setDefault=function(){this.set(this.default)};var q=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(j),Z=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(j),G=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(j),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(j),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(j),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(j),H=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(j),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(j),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(j),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(j),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(j),tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(j),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(j),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(j),it=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(j),nt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(j),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(j),at=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(j),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(j),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(j),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(j),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(j),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(j),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(j),ft=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(j),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(j),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(j),yt=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(j),vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(j),_t=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(j),gt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(j),xt=function(t){function e(e,r){t.call(this,e),this.context=e,this.parent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e}(j),bt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(xt),wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(xt),Et=function(t,e,r){this.context=t,this.width=e,this.height=r;var i=t.gl,n=this.framebuffer=i.createFramebuffer();this.colorAttachment=new bt(t,n),this.depthAttachment=new wt(t,n)};Et.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var St=function(t,e,r){this.func=t,this.mask=e,this.range=r};St.ReadOnly=!1,St.ReadWrite=!0,St.disabled=new St(519,St.ReadOnly,[0,1]);var Tt=function(t,e,r,i,n,o){this.test=t,this.ref=e,this.mask=r,this.fail=i,this.depthFail=n,this.pass=o};Tt.disabled=new Tt({func:519,mask:0},0,0,7680,7680,7680);var At=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};At.disabled=new At(At.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),At.unblended=new At(At.Replace,t.Color.transparent,[!0,!0,!0,!0]),At.alphaBlended=new At([1,771],t.Color.transparent,[!0,!0,!0,!0]);var It=function(t,e,r){this.enable=t,this.mode=e,this.frontFace=r};It.disabled=new It(!1,1029,2305),It.backCCW=new It(!0,1029,2305);var zt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new q(this),this.clearDepth=new Z(this),this.clearStencil=new G(this),this.colorMask=new X(this),this.depthMask=new W(this),this.stencilMask=new K(this),this.stencilFunc=new H(this),this.stencilOp=new J(this),this.stencilTest=new Y(this),this.depthRange=new $(this),this.depthTest=new Q(this),this.depthFunc=new tt(this),this.blend=new et(this),this.blendFunc=new rt(this),this.blendColor=new it(this),this.blendEquation=new nt(this),this.cullFace=new ot(this),this.cullFaceSide=new at(this),this.frontFace=new st(this),this.program=new ut(this),this.activeTexture=new lt(this),this.viewport=new pt(this),this.bindFramebuffer=new ct(this),this.bindRenderbuffer=new ht(this),this.bindTexture=new ft(this),this.bindVertexBuffer=new dt(this),this.bindElementBuffer=new mt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new yt(this),this.pixelStoreUnpack=new vt(this),this.pixelStoreUnpackPremultiplyAlpha=new _t(this),this.pixelStoreUnpackFlipY=new gt(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&t.getExtension("OES_texture_half_float_linear")};zt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},zt.prototype.createIndexBuffer=function(t,e){return new U(this,t,e)},zt.prototype.createVertexBuffer=function(t,e,r){return new N(this,t,e,r)},zt.prototype.createRenderbuffer=function(t,e,r){var i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),n},zt.prototype.createFramebuffer=function(t,e){return new Et(this,t,e)},zt.prototype.clear=function(t){var e=t.color,r=t.depth,i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),i.clear(n)},zt.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},zt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},zt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},zt.prototype.setColorMode=function(e){t.deepEqual(e.blendFunction,At.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},zt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var kt=function(e){function r(r,i,n){var o=this;e.call(this),this.id=r,this.dispatcher=n,this.on("data",(function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))})),this.on("error",(function(){o._sourceErrored=!0})),this._source=D(r,i,n,this),this._tiles={},this._cache=new O(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,(function(){}))},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,(function(){}))},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var r=this._tiles[e];r.upload(t),r.prepare(this.map.style.imageManager)}},r.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(Ct)},r.prototype.getRenderableIds=function(e){var r=this,i=[];for(var n in this._tiles)this._isIdRenderable(+n,e)&&i.push(+n);return e?i.sort((function(e,i){var n=r._tiles[e].tileID,o=r._tiles[i].tileID,a=new t.Point(n.canonical.x,n.canonical.y)._rotate(r.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(r.transform.angle);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x})):i.sort(Ct)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,i,n){if(n)return e.state="errored",void(404!==n.status?this._source.fire(new t.ErrorEvent(n,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var i=e[r];if(t.neighboringTiles&&t.neighboringTiles[i]){var n=this.getTileByID(i);o(t,n),o(n,t)}}function o(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,i=e.tileID.canonical.y-t.tileID.canonical.y,n=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===r&&0===i||Math.abs(i)>1||(Math.abs(r)>1&&(1===Math.abs(r+n)?r+=n:1===Math.abs(r-n)&&(r-=n)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,i),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._retainLoadedChildren=function(t,e,r,i){for(var n in this._tiles){var o=this._tiles[n];if(!(i[n]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var u=a;u.overscaledZ>e;)if(t[(u=u.scaledTo(u.overscaledZ-1)).key]){i[a.key]=a;break}}}},r.prototype.findLoadedParent=function(t,e){for(var r=t.overscaledZ-1;r>=e;r--){var i=t.scaledTo(r);if(!i)return;var n=String(i.key),o=this._tiles[n];if(o&&o.hasData())return o;if(this._cache.has(i))return this._cache.get(i)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var i={};for(var n in this._tiles){var o=this._tiles[n];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+r),i[o.tileID.key]=o}for(var a in this._tiles=i,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var u=this._tiles[s];this._setTileReloadTimer(s,u)}}},r.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var n;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(n=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(n=n.filter((function(t){return i._source.hasTile(t)})))):n=[];var o=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(n,o);if(Pt(this._source.type)){for(var l={},p={},c=0,h=Object.keys(u);c<h.length;c+=1){var f=h[c],d=u[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var y=this.findLoadedParent(d,a);y&&(this._addTile(y.tileID),l[y.tileID.key]=y.tileID),p[f]=d}}for(var v in this._retainLoadedChildren(p,o,s,u),l)u[v]||(this._coveredTiles[v]=!0,u[v]=l[v])}for(var _ in u)this._tiles[_].clearFadeHold();for(var g=0,x=t.keysDifference(this._tiles,u);g<x.length;g+=1){var b=x[g],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}}},r.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},r.prototype._updateRetainedTiles=function(t,e){for(var i={},n={},o=Math.max(e-r.maxOverzooming,this._source.minzoom),a=Math.max(e+r.maxUnderzooming,this._source.minzoom),s={},u=0,l=t;u<l.length;u+=1){var p=l[u],c=this._addTile(p);i[p.key]=p,c.hasData()||e<this._source.maxzoom&&(s[p.key]=p)}this._retainLoadedChildren(s,e,a,i);for(var h=0,f=t;h<f.length;h+=1){var d=f[h],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var y=d.children(this._source.maxzoom)[0],v=this.getTile(y);if(v&&v.hasData()){i[y.key]=y;continue}}else{var _=d.children(this._source.maxzoom);if(i[_[0].key]&&i[_[1].key]&&i[_[2].key]&&i[_[3].key])continue}for(var g=m.wasRequested(),x=d.overscaledZ-1;x>=o;--x){var b=d.scaledTo(x);if(n[b.key])break;if(n[b.key]=!0,!(m=this.getTile(b))&&g&&(m=this._addTile(b)),m&&(i[b.key]=b,g=m.wasRequested(),m.hasData()))break}}}return i},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var i=Boolean(r);return i||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,i||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout((function(){r._reloadTile(t,"expired"),delete r._timers[t]}),i))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,i){var n=this,o=[],a=this.transform;if(!a)return o;for(var s=i?a.getCameraQueryGeometry(e):e,u=e.map((function(t){return a.pointCoordinate(t)})),l=s.map((function(t){return a.pointCoordinate(t)})),p=this.getIds(),c=1/0,h=1/0,f=-1/0,d=-1/0,m=0,y=l;m<y.length;m+=1){var v=y[m];c=Math.min(c,v.x),h=Math.min(h,v.y),f=Math.max(f,v.x),d=Math.max(d,v.y)}for(var _=function(e){var i=n._tiles[p[e]];if(!i.holdingForFade()){var s=i.tileID,m=Math.pow(2,a.zoom-i.tileID.overscaledZ),y=r*i.queryPadding*t.EXTENT/i.tileSize/m,v=[s.getTilePoint(new t.MercatorCoordinate(c,h)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(v[0].x-y<t.EXTENT&&v[0].y-y<t.EXTENT&&v[1].x+y>=0&&v[1].y+y>=0){var _=u.map((function(t){return s.getTilePoint(t)})),g=l.map((function(t){return s.getTilePoint(t)}));o.push({tile:i,tileID:s,queryGeometry:_,cameraQueryGeometry:g,scale:m})}}},g=0;g<p.length;g++)_(g);return o},r.prototype.getVisibleCoordinates=function(t){for(var e=this,r=this.getRenderableIds(t).map((function(t){return e._tiles[t].tileID})),i=0,n=r;i<n.length;i+=1){var o=n[i];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Pt(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},r}(t.Evented);function Ct(t,e){return t%32-e%32||e-t}function Pt(t){return"raster"===t||"image"===t||"video"===t}function Mt(){return new t.window.Worker($i.workerUrl)}kt.maxOverzooming=10,kt.maxUnderzooming=3;var Lt=function(){this.active={}};Lt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<Lt.workerCount;)this.workers.push(new Mt);return this.active[t]=!0,this.workers.slice()},Lt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach((function(t){t.terminate()})),this.workers=null)};var Dt,Bt=Math.floor(t.browser.hardwareConcurrency/2);function Rt(e,r){var i={};for(var n in e)"ref"!==n&&(i[n]=e[n]);return t.refProperties.forEach((function(t){t in r&&(i[t]=r[t])})),i}function Ft(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=Rt(t[i],e[t[i].ref]));return t}Lt.workerCount=Math.max(Math.min(Bt,6),1);var Ot={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Ut(t,e,r){r.push({command:Ot.addSource,args:[t,e[t]]})}function Vt(t,e,r){e.push({command:Ot.removeSource,args:[t]}),r[t]=!0}function Nt(t,e,r,i){Vt(t,r,i),Ut(t,e,r)}function jt(e,r,i){var n;for(n in e[i])if(e[i].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[i][n],r[i][n]))return!1;for(n in r[i])if(r[i].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[i][n],r[i][n]))return!1;return!0}function qt(e,r,i,n,o,a){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}))}function Zt(t){return t.id}function Gt(t,e){return t[e.id]=e,t}var Xt=function(t,e,r){var i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o<this.xCellCount*this.yCellCount;o++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};Xt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Xt.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},Xt.prototype.insertCircle=function(t,e,r,i){this._forEachCell(e-i,r-i,e+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(i)},Xt.prototype._insertBoxCell=function(t,e,r,i,n,o){this.boxCells[n].push(o)},Xt.prototype._insertCircleCell=function(t,e,r,i,n,o){this.circleCells[n].push(o)},Xt.prototype._query=function(t,e,r,i,n,o){if(r<0||t>this.width||i<0||e>this.height)return!n&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=i){if(n)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var u=0;u<this.circleKeys.length;u++){var l=this.circles[3*u],p=this.circles[3*u+1],c=this.circles[3*u+2];a.push({key:this.circleKeys[u],x1:l-c,y1:p-c,x2:l+c,y2:p+c})}return o?a.filter(o):a}var h={hitTest:n,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,r,i,this._queryCell,a,h,o),n?a.length>0:a},Xt.prototype._queryCircle=function(t,e,r,i,n){var o=t-r,a=t+r,s=e-r,u=e+r;if(a<0||o>this.width||u<0||s>this.height)return!i&&[];var l=[],p={hitTest:i,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,u,this._queryCellCircle,l,p,n),i?l.length>0:l},Xt.prototype.query=function(t,e,r,i,n){return this._query(t,e,r,i,!1,n)},Xt.prototype.hitTest=function(t,e,r,i,n){return this._query(t,e,r,i,!0,n)},Xt.prototype.hitTestCircle=function(t,e,r,i){return this._queryCircle(t,e,r,!0,i)},Xt.prototype._queryCell=function(t,e,r,i,n,o,a,s){var u=a.seenUids,l=this.boxCells[n];if(null!==l)for(var p=this.bboxes,c=0,h=l;c<h.length;c+=1){var f=h[c];if(!u.box[f]){u.box[f]=!0;var d=4*f;if(t<=p[d+2]&&e<=p[d+3]&&r>=p[d+0]&&i>=p[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:p[d],y1:p[d+1],x2:p[d+2],y2:p[d+3]})}}}var m=this.circleCells[n];if(null!==m)for(var y=this.circles,v=0,_=m;v<_.length;v+=1){var g=_[v];if(!u.circle[g]){u.circle[g]=!0;var x=3*g;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,r,i)&&(!s||s(this.circleKeys[g]))){if(a.hitTest)return o.push(!0),!0;var b=y[x],w=y[x+1],E=y[x+2];o.push({key:this.circleKeys[g],x1:b-E,y1:w-E,x2:b+E,y2:w+E})}}}},Xt.prototype._queryCellCircle=function(t,e,r,i,n,o,a,s){var u=a.circle,l=a.seenUids,p=this.boxCells[n];if(null!==p)for(var c=this.bboxes,h=0,f=p;h<f.length;h+=1){var d=f[h];if(!l.box[d]){l.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(u.x,u.y,u.radius,c[m+0],c[m+1],c[m+2],c[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var y=this.circleCells[n];if(null!==y)for(var v=this.circles,_=0,g=y;_<g.length;_+=1){var x=g[_];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circlesCollide(v[b],v[b+1],v[b+2],u.x,u.y,u.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Xt.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var u=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),p=this._convertToXCellCoord(r),c=this._convertToYCellCoord(i),h=u;h<=p;h++)for(var f=l;f<=c;f++){var d=this.xCellCount*f+h;if(n.call(this,t,e,r,i,d,o,a,s))return}},Xt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Xt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Xt.prototype._circlesCollide=function(t,e,r,i,n,o){var a=i-t,s=n-e,u=r+o;return u*u>a*a+s*s},Xt.prototype._circleAndRectCollide=function(t,e,r,i,n,o,a){var s=(o-i)/2,u=Math.abs(t-(i+s));if(u>s+r)return!1;var l=(a-n)/2,p=Math.abs(e-(n+l));if(p>l+r)return!1;if(u<=s||p<=l)return!0;var c=u-s,h=p-l;return c*c+h*h<=r*r};var Wt=t.properties.layout;function Kt(e,r,i,n,o){var a=t.create();return r?(t.scale(a,a,[1/o,1/o,1]),i||t.rotateZ(a,a,n.angle)):t.multiply(a,n.labelPlaneMatrix,e),a}function Ht(e,r,i,n,o){if(r){var a=t.clone(e);return t.scale(a,a,[o,o,1]),i||t.rotateZ(a,a,-n.angle),a}return n.glCoordMatrix}function Jt(e,r){var i=[e.x,e.y,0,1];ae(i,i,r);var n=i[3];return{point:new t.Point(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function Yt(t,e){var r=t[0]/t[3],i=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&i>=-e[1]&&i<=e[1]}function $t(e,r,i,n,o,a,s,u){var l=n?e.textSizeData:e.iconSizeData,p=t.evaluateSizeForZoom(l,i.transform.zoom,Wt.properties[n?"text-size":"icon-size"]),c=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=i.transform.width/i.transform.height,y=!1,v=0;v<d.length;v++){var _=d.get(v);if(_.hidden||_.writingMode===t.WritingMode.vertical&&!y)oe(_.numGlyphs,h);else{y=!1;var g=[_.anchorX,_.anchorY,0,1];if(t.transformMat4(g,g,r),Yt(g,c)){var x=.5+g[3]/i.transform.cameraToCenterDistance*.5,b=t.evaluateSizeForFeature(l,p,_),w=s?b*x:b/x,E=new t.Point(_.anchorX,_.anchorY),S=Jt(E,o).point,T={},A=ee(_,w,!1,u,r,o,a,e.glyphOffsetArray,f,h,S,E,T,m);y=A.useVertical,(A.notEnoughRoom||y||A.needsFlipping&&ee(_,w,!0,u,r,o,a,e.glyphOffsetArray,f,h,S,E,T,m).notEnoughRoom)&&oe(_.numGlyphs,h)}else oe(_.numGlyphs,h)}}n?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function Qt(t,e,r,i,n,o,a,s,u,l,p,c){var h=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),y=e.getoffsetX(h-1),v=ie(t*m,r,i,n,o,a,s.segment,f,d,u,l,p,c);if(!v)return null;var _=ie(t*y,r,i,n,o,a,s.segment,f,d,u,l,p,c);return _?{first:v,last:_}:null}function te(e,r,i,n){return e===t.WritingMode.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<i.y:r.x>i.x)?{needsFlipping:!0}:null}function ee(e,r,i,n,o,a,s,u,l,p,c,h,f,d){var m,y=r/24,v=e.lineOffsetX*y,_=e.lineOffsetY*y;if(e.numGlyphs>1){var g=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=Qt(y,u,v,_,i,c,h,e,l,a,f,!1);if(!w)return{notEnoughRoom:!0};var E=Jt(w.first.point,s).point,S=Jt(w.last.point,s).point;if(n&&!i){var T=te(e.writingMode,E,S,d);if(T)return T}m=[w.first];for(var A=e.glyphStartIndex+1;A<g-1;A++)m.push(ie(y*u.getoffsetX(A),v,_,i,c,h,e.segment,x,b,l,a,f,!1));m.push(w.last)}else{if(n&&!i){var I=Jt(h,o).point,z=e.lineStartIndex+e.segment+1,k=new t.Point(l.getx(z),l.gety(z)),C=Jt(k,o),P=C.signedDistanceFromCamera>0?C.point:re(h,k,I,1,o),M=te(e.writingMode,I,P,d);if(M)return M}var L=ie(y*u.getoffsetX(e.glyphStartIndex),v,_,i,c,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,a,f,!1);if(!L)return{notEnoughRoom:!0};m=[L]}for(var D=0,B=m;D<B.length;D+=1){var R=B[D];t.addDynamicAttributes(p,R.point,R.angle)}return{}}function re(t,e,r,i,n){var o=Jt(t.add(t.sub(e)._unit()),n).point,a=r.sub(o);return r.add(a._mult(i/a.mag()))}function ie(e,r,i,n,o,a,s,u,l,p,c,h,f){var d=n?e-r:e+r,m=d>0?1:-1,y=0;n&&(m*=-1,y=Math.PI),m<0&&(y+=Math.PI);for(var v=m>0?u+s:u+s+1,_=v,g=o,x=o,b=0,w=0,E=Math.abs(d);b+w<=E;){if((v+=m)<u||v>=l)return null;if(x=g,void 0===(g=h[v])){var S=new t.Point(p.getx(v),p.gety(v)),T=Jt(S,c);if(T.signedDistanceFromCamera>0)g=h[v]=T.point;else{var A=v-m;g=re(0===b?a:new t.Point(p.getx(A),p.gety(A)),S,x,E-b+1,c)}}b+=w,w=x.dist(g)}var I=(E-b)/w,z=g.sub(x),k=z.mult(I)._add(x);return k._add(z._unit()._perp()._mult(i*m)),{point:k,angle:y+Math.atan2(g.y-x.y,g.x-x.x),tileDistance:f?{prevTileDistance:v-m===_?0:p.gettileUnitDistanceFromAnchor(v-m),lastSegmentViewportDistance:E-b}:null}}var ne=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function oe(t,e){for(var r=0;r<t;r++){var i=e.length;e.resize(i+4),e.float32.set(ne,3*i)}}function ae(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[4]*n+r[12],t[1]=r[1]*i+r[5]*n+r[13],t[3]=r[3]*i+r[7]*n+r[15],t}var se=function(t,e,r){void 0===e&&(e=new Xt(t.width+200,t.height+200,25)),void 0===r&&(r=new Xt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function ue(t,e,r){t[e+4]=r?1:0}function le(e,r,i){return r*(t.EXTENT/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}se.prototype.placeCollisionBox=function(t,e,r,i,n){var o=this.projectAndGetPerspectiveRatio(i,t.anchorPointX,t.anchorPointY),a=r*o.perspectiveRatio,s=t.x1*a+o.point.x,u=t.y1*a+o.point.y,l=t.x2*a+o.point.x,p=t.y2*a+o.point.y;return!this.isInsideGrid(s,u,l,p)||!e&&this.grid.hitTest(s,u,l,p,n)?{box:[],offscreen:!1}:{box:[s,u,l,p],offscreen:this.isOffscreen(s,u,l,p)}},se.prototype.approximateTileDistance=function(t,e,r,i,n){var o=n?1:i/this.pitchfactor,a=t.lastSegmentViewportDistance*r;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},se.prototype.placeCollisionCircles=function(e,r,i,n,o,a,s,u,l,p,c,h,f){var d=[],m=this.projectAnchor(l,o.anchorX,o.anchorY),y=u/24,v=o.lineOffsetX*u,_=o.lineOffsetY*u,g=new t.Point(o.anchorX,o.anchorY),x=Qt(y,s,v,_,!1,Jt(g,p).point,g,o,a,p,{},!0),b=!1,w=!1,E=!0,S=m.perspectiveRatio*n,T=1/(n*i),A=0,I=0;x&&(A=this.approximateTileDistance(x.first.tileDistance,x.first.angle,T,m.cameraDistance,h),I=this.approximateTileDistance(x.last.tileDistance,x.last.angle,T,m.cameraDistance,h));for(var z=0;z<e.length;z+=5){var k=e[z],C=e[z+1],P=e[z+2],M=e[z+3];if(!x||M<-A||M>I)ue(e,z,!1);else{var L=this.projectPoint(l,k,C),D=P*S;if(d.length>0){var B=L.x-d[d.length-4],R=L.y-d[d.length-3];if(D*D*2>B*B+R*R&&z+8<e.length){var F=e[z+8];if(F>-A&&F<I){ue(e,z,!1);continue}}}var O=z/5;d.push(L.x,L.y,D,O),ue(e,z,!0);var U=L.x-D,V=L.y-D,N=L.x+D,j=L.y+D;if(E=E&&this.isOffscreen(U,V,N,j),w=w||this.isInsideGrid(U,V,N,j),!r&&this.grid.hitTestCircle(L.x,L.y,D,f)){if(!c)return{circles:[],offscreen:!1};b=!0}}}return{circles:b||!w?[]:d,offscreen:E}},se.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],i=1/0,n=1/0,o=-1/0,a=-1/0,s=0,u=e;s<u.length;s+=1){var l=u[s],p=new t.Point(l.x+100,l.y+100);i=Math.min(i,p.x),n=Math.min(n,p.y),o=Math.max(o,p.x),a=Math.max(a,p.y),r.push(p)}for(var c={},h={},f=0,d=this.grid.query(i,n,o,a).concat(this.ignoredGrid.query(i,n,o,a));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===c[y.bucketInstanceId]&&(c[y.bucketInstanceId]={}),!c[y.bucketInstanceId][y.featureIndex]){var v=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(r,v)&&(c[y.bucketInstanceId][y.featureIndex]=!0,void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]=[]),h[y.bucketInstanceId].push(y.featureIndex))}}return h},se.prototype.insertCollisionBox=function(t,e,r,i,n){var o={bucketInstanceId:r,featureIndex:i,collisionGroupID:n};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])},se.prototype.insertCollisionCircles=function(t,e,r,i,n){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:i,collisionGroupID:n},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},se.prototype.projectAnchor=function(t,e,r){var i=[e,r,0,1];return ae(i,i,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5,cameraDistance:i[3]}},se.prototype.projectPoint=function(e,r,i){var n=[r,i,0,1];return ae(n,n,e),new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100)},se.prototype.projectAndGetPerspectiveRatio=function(e,r,i){var n=[r,i,0,1];return ae(n,n,e),{point:new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}},se.prototype.isOffscreen=function(t,e,r,i){return r<100||t>=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},se.prototype.isInsideGrid=function(t,e,r,i){return r>=0&&t<this.gridRightBoundary&&i>=0&&e<this.gridBottomBoundary};var pe=function(t,e,r,i){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):i&&r?1:0,this.placed=r};pe.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var ce=function(t,e,r,i,n){this.text=new pe(t?t.text:null,e,r,n),this.icon=new pe(t?t.icon:null,e,i,n)};ce.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var he=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},fe=function(t,e,r,i,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n},de=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};function me(e,r,i,n,o){var a=t.getAnchorAlignment(e),s=-(a.horizontalAlign-.5)*r,u=-(a.verticalAlign-.5)*i,l=t.evaluateRadialOffset(e,n);return new t.Point(s+l[0]*o,u+l[1]*o)}de.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var ye=function(t,e,r,i){this.transform=t.clone(),this.collisionIndex=new se(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new de(r),this.prevPlacement=i,i&&(i.prevPlacement=void 0)};function ve(t,e,r,i,n){t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0)}ye.prototype.placeLayerTile=function(e,r,i,n){var o=r.getBucket(e),a=r.latestFeatureIndex;if(o&&a&&e.id===o.layerIds[0]){var s=r.collisionBoxArray,u=o.layers[0].layout,l=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),p=r.tileSize/t.EXTENT,c=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=Kt(c,"map"===u.get("text-pitch-alignment"),"map"===u.get("text-rotation-alignment"),this.transform,le(r,1,this.transform.zoom)),f=Kt(c,"map"===u.get("icon-pitch-alignment"),"map"===u.get("icon-rotation-alignment"),this.transform,le(r,1,this.transform.zoom));this.retainedQueryData[o.bucketInstanceId]=new fe(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID),this.placeLayerBucket(o,c,h,f,l,p,i,r.holdingForFade(),n,s)}},ye.prototype.attemptAnchorPlacement=function(e,r,i,n,o,a,s,u,l,p,c,h,f,d){var m,y=me(e,i,n,o,a),v=this.collisionIndex.placeCollisionBox(function(e,r,i,n,o,a){var s=e.x1,u=e.x2,l=e.y1,p=e.y2,c=e.anchorPointX,h=e.anchorPointY,f=new t.Point(r,i);return n&&f._rotate(o?a:-a),{x1:s+f.x,y1:l+f.y,x2:u+f.x,y2:p+f.y,anchorPointX:c,anchorPointY:h}}(r,y.x,y.y,s,u,this.transform.angle),h,l,p,c.predicate);if(v.box.length>0)return this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(m=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={radialOffset:o,width:i,height:n,anchor:e,textBoxScale:a,prevAnchor:m},this.markUsedJustification(d,e,f),v},ye.prototype.placeLayerBucket=function(e,r,i,n,o,a,s,u,l,p){var c=e.layers[0].layout,h=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,t.properties.layout.properties["text-size"]),f=c.get("text-optional"),d=c.get("icon-optional"),m=c.get("text-allow-overlap"),y=c.get("icon-allow-overlap"),v=m&&(y||!e.hasIconData()||d),_=y&&(m||!e.hasTextData()||f),g=this.collisionGroups.get(e.sourceID),x="map"===c.get("text-rotation-alignment"),b="map"===c.get("text-pitch-alignment");!e.collisionArrays&&p&&e.deserializeCollisionBoxes(p);for(var w=0;w<e.symbolInstances.length;w++){var E=e.symbolInstances.get(w);if(!l[E.crossTileID]){if(u){this.placements[E.crossTileID]=new he(!1,!1,!1);continue}var S=!1,T=!1,A=!0,I=null,z=null,k=null,C=0,P=0,M=e.collisionArrays[w];M.textFeatureIndex&&(C=M.textFeatureIndex);var L=M.textBox;if(L)if(c.get("text-variable-anchor")){var D=L.x2-L.x1,B=L.y2-L.y1,R=E.textBoxScale,F=c.get("text-variable-anchor");if(this.prevPlacement&&this.prevPlacement.variableOffsets[E.crossTileID]){var O=this.prevPlacement.variableOffsets[E.crossTileID];F[0]!==O.anchor&&(F=F.filter((function(t){return t!==O.anchor}))).unshift(O.anchor)}for(var U=0,V=F;U<V.length;U+=1){var N=V[U];if(I=this.attemptAnchorPlacement(N,L,D,B,E.radialTextOffset,R,x,b,a,r,g,m,E,e)){S=!0;break}}if(!this.variableOffsets[E.crossTileID]&&this.prevPlacement){var j=this.prevPlacement.variableOffsets[E.crossTileID];j&&(this.variableOffsets[E.crossTileID]=j,this.markUsedJustification(e,j.anchor,E))}}else S=(I=this.collisionIndex.placeCollisionBox(L,c.get("text-allow-overlap"),a,r,g.predicate)).box.length>0;A=I&&I.offscreen;var q=M.textCircles;if(q){var Z=e.text.placedSymbolArray.get(E.centerJustifiedTextSymbolIndex),G=t.evaluateSizeForFeature(e.textSizeData,h,Z);z=this.collisionIndex.placeCollisionCircles(q,c.get("text-allow-overlap"),o,a,Z,e.lineVertexArray,e.glyphOffsetArray,G,r,i,s,b,g.predicate),S=c.get("text-allow-overlap")||z.circles.length>0,A=A&&z.offscreen}M.iconFeatureIndex&&(P=M.iconFeatureIndex),M.iconBox&&(T=(k=this.collisionIndex.placeCollisionBox(M.iconBox,c.get("icon-allow-overlap"),a,r,g.predicate)).box.length>0,A=A&&k.offscreen);var X=f||0===E.numHorizontalGlyphVertices&&0===E.numVerticalGlyphVertices,W=d||0===E.numIconVertices;X||W?W?X||(T=T&&S):S=T&&S:T=S=T&&S,S&&I&&this.collisionIndex.insertCollisionBox(I.box,c.get("text-ignore-placement"),e.bucketInstanceId,C,g.ID),T&&k&&this.collisionIndex.insertCollisionBox(k.box,c.get("icon-ignore-placement"),e.bucketInstanceId,P,g.ID),S&&z&&this.collisionIndex.insertCollisionCircles(z.circles,c.get("text-ignore-placement"),e.bucketInstanceId,C,g.ID),this.placements[E.crossTileID]=new he(S||v,T||_,A||e.justReloaded),l[E.crossTileID]=!0}}e.justReloaded=!1},ye.prototype.markUsedJustification=function(e,r,i){var n={left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex},o=n[t.getAnchorJustification(r)];for(var a in n){var s=n[a];s>=0&&(e.text.placedSymbolArray.get(s).crossTileID=o>=0&&s!==o?0:i.crossTileID)}},ye.prototype.commit=function(t){this.commitTime=t;var e=this.prevPlacement,r=!1,i=e&&0!==this.fadeDuration?(this.commitTime-e.commitTime)/this.fadeDuration:1,n=e?e.opacities:{},o=e?e.variableOffsets:{};for(var a in this.placements){var s=this.placements[a],u=n[a];u?(this.opacities[a]=new ce(u,i,s.text,s.icon),r=r||s.text!==u.text.placed||s.icon!==u.icon.placed):(this.opacities[a]=new ce(null,i,s.text,s.icon,s.skipFade),r=r||s.text||s.icon)}for(var l in n){var p=n[l];if(!this.opacities[l]){var c=new ce(p,i,!1,!1);c.isHidden()||(this.opacities[l]=c,r=r||p.text.placed||p.icon.placed)}}for(var h in o)this.variableOffsets[h]||!this.opacities[h]||this.opacities[h].isHidden()||(this.variableOffsets[h]=o[h]);r?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},ye.prototype.updateLayerOpacities=function(t,e){for(var r={},i=0,n=e;i<n.length;i+=1){var o=n[i],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,r,o.collisionBoxArray)}},ye.prototype.updateBucketOpacities=function(e,r,i){e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasCollisionBoxData()&&e.collisionBox.collisionVertexArray.clear(),e.hasCollisionCircleData()&&e.collisionCircle.collisionVertexArray.clear();var n=e.layers[0].layout,o=new ce(null,0,!1,!1,!0),a=n.get("text-allow-overlap"),s=n.get("icon-allow-overlap"),u=n.get("text-variable-anchor"),l="map"===n.get("text-rotation-alignment"),p="map"===n.get("text-pitch-alignment"),c=new ce(null,0,a&&(s||!e.hasIconData()||n.get("icon-optional")),s&&(a||!e.hasTextData()||n.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasCollisionBoxData()||e.hasCollisionCircleData())&&e.deserializeCollisionBoxes(i);for(var h=0;h<e.symbolInstances.length;h++){var f=e.symbolInstances.get(h),d=f.numHorizontalGlyphVertices,m=f.numVerticalGlyphVertices,y=f.crossTileID,v=r[y],_=this.opacities[y];v?_=o:_||(_=c,this.opacities[y]=_),r[y]=!0;var g=d>0||m>0,x=f.numIconVertices>0;if(g){for(var b=Te(_.text),w=(d+m)/4,E=0;E<w;E++)e.text.opacityVertexArray.emplaceBack(b);var S=_.text.isHidden()?1:0;[f.rightJustifiedTextSymbolIndex,f.centerJustifiedTextSymbolIndex,f.leftJustifiedTextSymbolIndex,f.verticalPlacedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=S)}));var T=this.variableOffsets[f.crossTileID];T&&this.markUsedJustification(e,T.anchor,f)}if(x){for(var A=Te(_.icon),I=0;I<f.numIconVertices/4;I++)e.icon.opacityVertexArray.emplaceBack(A);e.icon.placedSymbolArray.get(h).hidden=_.icon.isHidden()}if(e.hasCollisionBoxData()||e.hasCollisionCircleData()){var z=e.collisionArrays[h];if(z){if(z.textBox){var k=new t.Point(0,0),C=!0;if(u){var P=this.variableOffsets[y];P?(k=me(P.anchor,P.width,P.height,P.radialOffset,P.textBoxScale),l&&k._rotate(p?this.transform.angle:-this.transform.angle)):C=!1}ve(e.collisionBox.collisionVertexArray,_.text.placed,!C,k.x,k.y)}z.iconBox&&ve(e.collisionBox.collisionVertexArray,_.icon.placed,!1);var M=z.textCircles;if(M&&e.hasCollisionCircleData())for(var L=0;L<M.length;L+=5){var D=v||0===M[L+4];ve(e.collisionCircle.collisionVertexArray,_.text.placed,D)}}}}e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasCollisionBoxData()&&e.collisionBox.collisionVertexBuffer&&e.collisionBox.collisionVertexBuffer.updateData(e.collisionBox.collisionVertexArray),e.hasCollisionCircleData()&&e.collisionCircle.collisionVertexBuffer&&e.collisionCircle.collisionVertexBuffer.updateData(e.collisionCircle.collisionVertexArray)},ye.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},ye.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},ye.prototype.stillRecent=function(t){return this.commitTime+this.fadeDuration>t},ye.prototype.setStale=function(){this.stale=!0};var _e=Math.pow(2,25),ge=Math.pow(2,24),xe=Math.pow(2,17),be=Math.pow(2,16),we=Math.pow(2,9),Ee=Math.pow(2,8),Se=Math.pow(2,1);function Te(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*_e+e*ge+r*xe+e*be+r*we+e*Ee+r*Se+e}var Ae=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};Ae.prototype.continuePlacement=function(t,e,r,i,n){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(i,o,r,this._seenCrossTileIDs),this._currentTileIndex++,n())return!0}};var Ie=function(t,e,r,i,n,o,a){this.placement=new ye(t,n,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._done=!1};Ie.prototype.isDone=function(){return this._done},Ie.prototype.continuePlacement=function(e,r,i){for(var n=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!n._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],u=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=u)&&(!s.maxzoom||s.maxzoom>u)){if(this._inProgressLayer||(this._inProgressLayer=new Ae),this._inProgressLayer.continuePlacement(i[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ie.prototype.commit=function(t){return this.placement.commit(t),this.placement};var ze=512/t.EXTENT/2,ke=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var i=0;i<e.length;i++){var n=e.get(i),o=n.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}};ke.prototype.getScaledCoordinates=function(e,r){var i=r.canonical.z-this.tileID.canonical.z,n=ze/Math.pow(2,i);return{x:Math.floor((r.canonical.x*t.EXTENT+e.anchorX)*n),y:Math.floor((r.canonical.y*t.EXTENT+e.anchorY)*n)}},ke.prototype.findMatches=function(t,e,r){for(var i=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),n=0;n<t.length;n++){var o=t.get(n);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,e),u=0,l=a;u<l.length;u+=1){var p=l[u];if(Math.abs(p.coord.x-s.x)<=i&&Math.abs(p.coord.y-s.y)<=i&&!r[p.crossTileID]){r[p.crossTileID]=!0,o.crossTileID=p.crossTileID;break}}}}};var Ce=function(){this.maxCrossTileID=0};Ce.prototype.generate=function(){return++this.maxCrossTileID};var Pe=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Pe.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var i=this.indexes[r],n={};for(var o in i){var a=i[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),n[a.tileID.key]=a}this.indexes[r]=n}this.lng=t},Pe.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var i=0;i<e.symbolInstances.length;i++)e.symbolInstances.get(i).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var n=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var u=a[s];u.tileID.isChildOf(t)&&u.findMatches(e.symbolInstances,t,n)}else{var l=a[t.scaledTo(Number(o)).key];l&&l.findMatches(e.symbolInstances,t,n)}}for(var p=0;p<e.symbolInstances.length;p++){var c=e.symbolInstances.get(p);c.crossTileID||(c.crossTileID=r.generate(),n[c.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new ke(t,e.symbolInstances,e.bucketInstanceId),!0},Pe.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var i=0,n=e.indexedSymbolInstances[r];i<n.length;i+=1){var o=n[i];delete this.usedCrossTileIDs[t][o.crossTileID]}},Pe.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var i=this.indexes[r];for(var n in i)t[i[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,i[n]),delete i[n],e=!0)}return e};var Me=function(){this.layerIndexes={},this.crossTileIDs=new Ce,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Me.prototype.addLayer=function(t,e,r){var i=this.layerIndexes[t.id];void 0===i&&(i=this.layerIndexes[t.id]=new Pe);var n=!1,o={};i.handleWrapJump(r);for(var a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.getBucket(t);l&&t.id===l.layerIds[0]&&(l.bucketInstanceId||(l.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(u.tileID,l,this.crossTileIDs)&&(n=!0),o[l.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(n=!0),n},Me.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach((function(t){e[t]=!0})),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Le=function(e,r){return t.emitValidationErrors(e,r&&r.filter((function(t){return"source.canvas"!==t.identifier})))},De=t.pick(Ot,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Be=t.pick(Ot,["setCenter","setZoom","setBearing","setPitch"]),Re=function(e){function r(i,n){var o=this;void 0===n&&(n={}),e.call(this),this.map=i,this.dispatcher=new E((Dt||(Dt=new Lt),Dt),this),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new _(i._transformRequest,n.localIdeographFontFamily),this.lineAtlas=new w(256,512),this.crossTileSymbolIndex=new Me,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var a=this;this._rtlTextPluginCallback=r.registerForPluginAvailability((function(t){for(var e in a.dispatcher.broadcast("loadRTLTextPlugin",t.pluginURL,t.completionCallback),a.sourceCaches)a.sourceCaches[e].reload()})),this.on("data",(function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=o.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var i in o._layers){var n=o._layers[i];n.source===r.id&&o._validateLayer(n)}}}}))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var n="boolean"==typeof r.validate?r.validate:!t.isMapboxURL(e);e=t.normalizeStyleURL(e,r.accessToken);var o=this.map._transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,(function(e,r){i._request=null,e?i.fire(new t.ErrorEvent(e)):r&&i._load(r,n)}))},r.prototype.loadJSON=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame((function(){i._request=null,i._load(e,!1!==r.validate)}))},r.prototype._load=function(e,r){var i=this;if(!r||!Le(this,t.validateStyle(e))){for(var n in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(n,e.sources[n],{validate:!1});e.sprite?this._spriteRequest=function(e,r,i){var n,o,a,s=t.browser.devicePixelRatio>1?"@2x":"",u=t.getJSON(r(t.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){u=null,a||(a=t,n=e,p())})),l=t.getImage(r(t.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){l=null,a||(a=t,o=e,p())}));function p(){if(a)i(a);else if(n&&o){var e=t.browser.getImageData(o),r={};for(var s in n){var u=n[s],l=u.width,p=u.height,c=u.x,h=u.y,f=u.sdf,d=u.pixelRatio,m=new t.RGBAImage({width:l,height:p});t.RGBAImage.copy(e,m,{x:c,y:h},{x:0,y:0},{width:l,height:p}),r[s]={data:m,pixelRatio:d,sdf:f}}i(null,r)}}return{cancel:function(){u&&(u.cancel(),u=null),l&&(l.cancel(),l=null)}}}(e.sprite,this.map._transformRequest,(function(e,r){if(i._spriteRequest=null,e)i.fire(new t.ErrorEvent(e));else if(r)for(var n in r)i.imageManager.addImage(n,r[n]);i.imageManager.setLoaded(!0),i.fire(new t.Event("data",{dataType:"style"}))})):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=Ft(this.stylesheet.layers);this._order=o.map((function(t){return t.id})),this._layers={};for(var a=0,s=o;a<s.length;a+=1){var u=s[a];(u=t.createStyleLayer(u)).setEventedParent(this,{layer:{id:u.id}}),this._layers[u.id]=u}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new b(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var i=e.sourceLayer;if(i){var n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(i))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+i+'" does not exist on source "'+n.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,i=t;r<i.length;r+=1){var n=i[r],o=this._layers[n];"custom"!==o.type&&e.push(o.serialize())}return e},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(e){if(this._loaded){var r=this._changed;if(this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var o in(i.length||n.length)&&this._updateWorkerLayers(i,n),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var u in this.sourceCaches)this.sourceCaches[u].used=!1;for(var l=0,p=this._order;l<p.length;l+=1){var c=p[l],h=this._layers[c];h.recalculate(e),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,r&&this.fire(new t.Event("data",{dataType:"style"}))}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Le(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=Ft(e.layers);var i=function(e,r){if(!e)return[{command:Ot.setStyle,args:[r]}];var i=[];try{if(!t.deepEqual(e.version,r.version))return[{command:Ot.setStyle,args:[r]}];t.deepEqual(e.center,r.center)||i.push({command:Ot.setCenter,args:[r.center]}),t.deepEqual(e.zoom,r.zoom)||i.push({command:Ot.setZoom,args:[r.zoom]}),t.deepEqual(e.bearing,r.bearing)||i.push({command:Ot.setBearing,args:[r.bearing]}),t.deepEqual(e.pitch,r.pitch)||i.push({command:Ot.setPitch,args:[r.pitch]}),t.deepEqual(e.sprite,r.sprite)||i.push({command:Ot.setSprite,args:[r.sprite]}),t.deepEqual(e.glyphs,r.glyphs)||i.push({command:Ot.setGlyphs,args:[r.glyphs]}),t.deepEqual(e.transition,r.transition)||i.push({command:Ot.setTransition,args:[r.transition]}),t.deepEqual(e.light,r.light)||i.push({command:Ot.setLight,args:[r.light]});var n={},o=[];!function(e,r,i,n){var o;for(o in r=r||{},e=e||{})e.hasOwnProperty(o)&&(r.hasOwnProperty(o)||Vt(o,i,n));for(o in r)r.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.deepEqual(e[o],r[o])||("geojson"===e[o].type&&"geojson"===r[o].type&&jt(e,r,o)?i.push({command:Ot.setGeoJSONSourceData,args:[o,r[o].data]}):Nt(o,r,i,n)):Ut(o,r,i))}(e.sources,r.sources,o,n);var a=[];e.layers&&e.layers.forEach((function(t){n[t.source]?i.push({command:Ot.removeLayer,args:[t.id]}):a.push(t)})),i=i.concat(o),function(e,r,i){r=r||[];var n,o,a,s,u,l,p,c=(e=e||[]).map(Zt),h=r.map(Zt),f=e.reduce(Gt,{}),d=r.reduce(Gt,{}),m=c.slice(),y=Object.create(null);for(n=0,o=0;n<c.length;n++)a=c[n],d.hasOwnProperty(a)?o++:(i.push({command:Ot.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(n=0,o=0;n<h.length;n++)a=h[h.length-1-n],m[m.length-1-n]!==a&&(f.hasOwnProperty(a)?(i.push({command:Ot.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,l=m[m.length-n],i.push({command:Ot.addLayer,args:[d[a],l]}),m.splice(m.length-n,0,a),y[a]=!0);for(n=0;n<h.length;n++)if(s=f[a=h[n]],u=d[a],!y[a]&&!t.deepEqual(s,u))if(t.deepEqual(s.source,u.source)&&t.deepEqual(s["source-layer"],u["source-layer"])&&t.deepEqual(s.type,u.type)){for(p in qt(s.layout,u.layout,i,a,null,Ot.setLayoutProperty),qt(s.paint,u.paint,i,a,null,Ot.setPaintProperty),t.deepEqual(s.filter,u.filter)||i.push({command:Ot.setFilter,args:[a,u.filter]}),t.deepEqual(s.minzoom,u.minzoom)&&t.deepEqual(s.maxzoom,u.maxzoom)||i.push({command:Ot.setLayerZoomRange,args:[a,u.minzoom,u.maxzoom]}),s)s.hasOwnProperty(p)&&"layout"!==p&&"paint"!==p&&"filter"!==p&&"metadata"!==p&&"minzoom"!==p&&"maxzoom"!==p&&(0===p.indexOf("paint.")?qt(s[p],u[p],i,a,p.slice(6),Ot.setPaintProperty):t.deepEqual(s[p],u[p])||i.push({command:Ot.setLayerProperty,args:[a,p,u[p]]}));for(p in u)u.hasOwnProperty(p)&&!s.hasOwnProperty(p)&&"layout"!==p&&"paint"!==p&&"filter"!==p&&"metadata"!==p&&"minzoom"!==p&&"maxzoom"!==p&&(0===p.indexOf("paint.")?qt(s[p],u[p],i,a,p.slice(6),Ot.setPaintProperty):t.deepEqual(s[p],u[p])||i.push({command:Ot.setLayerProperty,args:[a,p,u[p]]}))}else i.push({command:Ot.removeLayer,args:[a]}),l=m[m.lastIndexOf(a)+1],i.push({command:Ot.addLayer,args:[u,l]})}(a,r.layers,i)}catch(t){console.warn("Unable to compute style diff:",t),i=[{command:Ot.setStyle,args:[r]}]}return i}(this.serialize(),e).filter((function(t){return!(t.command in Be)}));if(0===i.length)return!1;var n=i.filter((function(t){return!(t.command in De)}));if(n.length>0)throw new Error("Unimplemented: "+n.map((function(t){return t.command})).join(", ")+".");return i.forEach((function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,i){var n=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,i))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[e]=new kt(e,r,this.dispatcher);o.style=this,o.setEventedParent(this,(function(){return{isSourceLoaded:n.loaded(),source:o.serialize(),sourceId:e}})),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=e.id;if(this.getLayer(n))this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" already exists on this map')));else{var o;if("custom"===e.type){if(Le(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(n,e.source),e=t.clone$1(e),e=t.extend(e,{source:n})),this._validate(t.validateStyle.layer,"layers."+n,e,{arrayIndex:-1},i))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}})}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,n),this._layerOrderChanged=!0,this._layers[n]=o,this._removedLayers[n]&&o.source&&"custom"!==o.type){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var i=this._order.indexOf(e);this._order.splice(i,1);var n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,i){this._checkLoaded();var n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.deepEqual(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,"layers."+n.id+".filter",r,null,i)||(n.filter=t.clone$1(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(r),i)||(o.setLayoutProperty(r,i,n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(r),i)||(o.setPaintProperty(r,i,n)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=e.sourceLayer,o=this.sourceCaches[i],a=parseInt(e.id,10);if(void 0!==o){var s=o.getSource().type;"geojson"===s&&n?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||n?isNaN(a)||a<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):o.setFeatureState(n,a,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=this.sourceCaches[i];if(void 0!==n){var o=n.getSource().type,a="vector"===o?e.sourceLayer:void 0,s=parseInt(e.id,10);"vector"!==o||a?void 0!==e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):n.removeFeatureState(a,s,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,i=e.sourceLayer,n=this.sourceCaches[r],o=parseInt(e.id,10);if(void 0!==n)if("vector"!==n.getSource().type||i){if(!(isNaN(o)||o<0))return n.getFeatureState(i,o);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},i={},n=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){i[a]=o;for(var s=0,u=t;s<u.length;s+=1){var l=u[s][a];if(l)for(var p=0,c=l;p<c.length;p+=1){var h=c[p];n.push(h)}}}}n.sort((function(t,e){return e.intersectionZ-t.intersectionZ}));for(var f=[],d=this._order.length-1;d>=0;d--){var m=this._order[d];if(r(m))for(var y=n.length-1;y>=0;y--){var v=n[y].feature;if(i[v.layer.id]<d)break;f.push(v),n.pop()}else for(var _=0,g=t;_<g.length;_+=1){var x=g[_][m];if(x)for(var b=0,w=x;b<w.length;b+=1){var E=w[b];f.push(E.feature)}}}return f},r.prototype.queryRenderedFeatures=function(e,r,i){r&&r.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",r.filter);var n={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=r.layers;o<a.length;o+=1){var s=a[o],u=this._layers[s];if(!u)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];n[u.source]=!0}}var l=[];for(var p in this.sourceCaches)r.layers&&!n[p]||l.push(R(this.sourceCaches[p],this._layers,e,r,i));return this.placement&&l.push(function(t,e,r,i,n,o){for(var a={},s=n.queryRenderedSymbols(r),u=[],l=0,p=Object.keys(s).map(Number);l<p.length;l+=1){var c=p[l];u.push(o[c])}u.sort(F);for(var h=function(){var e=d[f],r=e.featureIndex.lookupSymbolFeatures(s[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,i.filter,i.layers,t);for(var n in r){var o=a[n]=a[n]||[],u=r[n];u.sort((function(t,r){var i=e.featureSortOrder;if(i){var n=i.indexOf(t.featureIndex);return i.indexOf(r.featureIndex)-n}return r.featureIndex-t.featureIndex}));for(var l=0,p=u;l<p.length;l+=1){var c=p[l];o.push(c)}}},f=0,d=u;f<d.length;f+=1)h();var m=function(r){a[r].forEach((function(i){var n=i.feature,o=t[r],a=e[o.source].getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=a}))};for(var y in a)m(y);return a}(this._layers,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(l)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",r.filter);var i=this.sourceCaches[e];return i?function(t,e){for(var r=t.getRenderableIds().map((function(e){return t.getTileByID(e)})),i=[],n={},o=0;o<r.length;o++){var a=r[o],s=a.tileID.canonical.key;n[s]||(n[s]=!0,a.querySourceFeatures(i,e))}return i}(i,r):[]},r.prototype.addSourceType=function(t,e,i){return r.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e,r){void 0===r&&(r={}),this._checkLoaded();var i=this.light.getLight(),n=!1;for(var o in e)if(!t.deepEqual(e[o],i[o])){n=!0;break}if(n){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}},r.prototype._validate=function(e,r,i,n,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&Le(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:i,styleSpec:t.styleSpec},n)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,i,n){for(var o=!1,a=!1,s={},u=0,l=this._order;u<l.length;u+=1){var p=l[u],c=this._layers[p];if("symbol"===c.type){if(!s[c.source]){var h=this.sourceCaches[c.source];s[c.source]=h.getRenderableIds(!0).map((function(t){return h.getTileByID(t)})).sort((function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)}))}var f=this.crossTileSymbolIndex.addLayer(c,s[c.source],e.center.lng);o=o||f}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var d=this._layerOrderChanged||0===i;if((d||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now()))&&(this.pauseablePlacement=new Ie(e,this._order,d,r,i,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),a=!0),o&&this.pauseablePlacement.placement.setStale()),a||o)for(var m=0,y=this._order;m<y.length;m+=1){var v=y[m],_=this._layers[v];"symbol"===_.type&&this.placement.updateLayerOpacities(_,s[_.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r.prototype.getResource=function(e,r,i){return t.makeRequest(r,i)},r}(t.Evented);Re.getSourceType=function(t){return L[t]},Re.setSourceType=function(t,e){L[t]=e},Re.registerForPluginAvailability=t.registerForPluginAvailability;var Fe=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Oe=lr("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Ue=lr("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ve=lr("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Ne=lr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvarying vec3 v_data;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvarying vec3 v_data;void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/DEVICE_PIXEL_RATIO/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),je=lr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),qe=lr("#pragma mapbox: define highp float weight\nuniform highp float u_intensity;varying vec2 v_extrude;\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nuniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;const highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ze=lr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Ge=lr("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Xe=lr("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),We=lr("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ke=lr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),He=lr("#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_pos;void main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Je=lr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Ye=lr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),$e=lr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),Qe=lr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),tr=lr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),er=lr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),rr=lr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),ir=lr("#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nuniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;void main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),nr=lr("uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_gl_units_to_pixels;uniform mediump float u_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}"),or=lr("uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),ar=lr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),sr=lr("uniform sampler2D u_texture;\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;\n#pragma mapbox: define lowp float opacity\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),ur=lr("#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nuniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function lr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i={};return{fragmentSource:t=t.replace(r,(function(t,e,r,n,o){return i[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"})),vertexSource:e=e.replace(r,(function(t,e,r,n,o){var a="float"===n?"vec2":"vec4",s=o.match(/color/)?"color":a;return i[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"}))}}var pr=Object.freeze({prelude:Oe,background:Ue,backgroundPattern:Ve,circle:Ne,clippingMask:je,heatmap:qe,heatmapTexture:Ze,collisionBox:Ge,collisionCircle:Xe,debug:We,fill:Ke,fillOutline:He,fillOutlinePattern:Je,fillPattern:Ye,fillExtrusion:$e,fillExtrusionPattern:Qe,hillshadePrepare:tr,hillshade:er,line:rr,lineGradient:ir,linePattern:nr,lineSDF:or,raster:ar,symbolIcon:sr,symbolSDF:ur}),cr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};cr.prototype.bind=function(t,e,r,i,n,o,a,s){this.context=t;for(var u=this.boundPaintVertexBuffers.length!==i.length,l=0;!u&&l<i.length;l++)this.boundPaintVertexBuffers[l]!==i[l]&&(u=!0);var p=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||u||this.boundIndexBuffer!==n||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||p?this.freshBind(e,r,i,n,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),n&&n.dynamicDraw&&n.bind(),s&&s.bind())},cr.prototype.freshBind=function(t,e,r,i,n,o,a){var s,u=t.numAttributes,l=this.context,p=l.gl;if(l.extVertexArrayObject)this.vao&&this.destroy(),this.vao=l.extVertexArrayObject.createVertexArrayOES(),l.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=i,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=l.currentNumAttributes||0;for(var c=u;c<s;c++)p.disableVertexAttribArray(c)}e.enableAttributes(p,t);for(var h=0,f=r;h<f.length;h+=1)f[h].enableAttributes(p,t);o&&o.enableAttributes(p,t),a&&a.enableAttributes(p,t),e.bind(),e.setVertexAttribPointers(p,t,n);for(var d=0,m=r;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(p,t,n)}o&&(o.bind(),o.setVertexAttribPointers(p,t,n)),i&&i.bind(),a&&(a.bind(),a.setVertexAttribPointers(p,t,n)),l.currentNumAttributes=u},cr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var hr=function(e,r,i,n,o){var a=e.gl;this.program=a.createProgram();var s=i.defines().concat("#define DEVICE_PIXEL_RATIO "+t.browser.devicePixelRatio.toFixed(1));o&&s.push("#define OVERDRAW_INSPECTOR;");var u=s.concat(Oe.fragmentSource,r.fragmentSource).join("\n"),l=s.concat(Oe.vertexSource,r.vertexSource).join("\n"),p=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(p,u),a.compileShader(p),a.attachShader(this.program,p);var c=a.createShader(a.VERTEX_SHADER);a.shaderSource(c,l),a.compileShader(c),a.attachShader(this.program,c);for(var h=i.layoutAttributes||[],f=0;f<h.length;f++)a.bindAttribLocation(this.program,f,h[f].name);a.linkProgram(this.program),this.numAttributes=a.getProgramParameter(this.program,a.ACTIVE_ATTRIBUTES),this.attributes={};for(var d={},m=0;m<this.numAttributes;m++){var y=a.getActiveAttrib(this.program,m);y&&(this.attributes[y.name]=a.getAttribLocation(this.program,y.name))}for(var v=a.getProgramParameter(this.program,a.ACTIVE_UNIFORMS),_=0;_<v;_++){var g=a.getActiveUniform(this.program,_);g&&(d[g.name]=a.getUniformLocation(this.program,g.name))}this.fixedUniforms=n(e,d),this.binderUniforms=i.getUniforms(e,d)};function fr(e,r,i){var n=1/le(i,1,r.transform.tileZoom),o=Math.pow(2,i.tileID.overscaledZ),a=i.tileSize*Math.pow(2,r.transform.tileZoom)/o,s=a*(i.tileID.canonical.x+i.tileID.wrap*o),u=a*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[t.browser.devicePixelRatio,n,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,u>>16],u_pixel_coord_lower:[65535&s,65535&u]}}hr.prototype.draw=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d,m){var y,v=t.gl;for(var _ in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(i),t.setColorMode(n),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[_].set(a[_]);f&&f.setUniforms(t,this.binderUniforms,c,{zoom:h});for(var g=(y={},y[v.LINES]=2,y[v.TRIANGLES]=3,y[v.LINE_STRIP]=1,y)[e],x=0,b=p.get();x<b.length;x+=1){var w=b[x],E=w.vaos||(w.vaos={});(E[s]||(E[s]=new cr)).bind(t,this,u,f?f.getPaintVertexBuffers():[],l,w.vertexOffset,d,m),v.drawElements(e,w.primitiveLength*g,v.UNSIGNED_SHORT,w.primitiveOffset*g*2)}};var dr=function(e,r,i,n){var o=r.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],u=t.create$1();"viewport"===o.properties.get("anchor")&&t.fromRotation(u,-r.transform.angle),t.transformMat3(s,s,u);var l=o.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[l.r,l.g,l.b],u_vertical_gradient:+i,u_opacity:n}},mr=function(e,r,i,n,o,a,s){return t.extend(dr(e,r,i,n),fr(a,r,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8})},yr=function(t){return{u_matrix:t}},vr=function(e,r,i,n){return t.extend(yr(e),fr(i,r,n))},_r=function(t,e){return{u_matrix:t,u_world:e}},gr=function(e,r,i,n,o){return t.extend(vr(e,r,i,n),{u_world:o})},xr=function(t,e,r,i){var n,o,a=t.transform;if("map"===i.paint.get("circle-pitch-alignment")){var s=le(r,1,a.zoom);n=!0,o=[s,s]}else n=!1,o=a.pixelsToGLUnits;return{u_camera_to_center_distance:a.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(e.posMatrix,r,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+n,u_extrude_scale:o}},br=function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},wr=function(t,e,r){var i=le(r,1,e.zoom),n=Math.pow(2,e.zoom-r.tileID.overscaledZ),o=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:i,u_extrude_scale:[e.pixelsToGLUnits[0]/(i*n),e.pixelsToGLUnits[1]/(i*n)],u_overscale_factor:o}},Er=function(t,e){return{u_matrix:t,u_color:e}},Sr=function(t){return{u_matrix:t}},Tr=function(t,e,r,i){return{u_matrix:t,u_extrude_scale:le(e,1,r),u_intensity:i}},Ar=function(t,e,r){var i=r.paint.get("hillshade-shadow-color"),n=r.paint.get("hillshade-highlight-color"),o=r.paint.get("hillshade-accent-color"),a=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(a-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:zr(0,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),a],u_shadow:i,u_highlight:n,u_accent:o}},Ir=function(e,r){var i=e.dem.stride,n=t.create();return t.ortho(n,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(n,n,[0,-t.EXTENT,0]),{u_matrix:n,u_image:1,u_dimension:[i,i],u_zoom:e.tileID.overscaledZ,u_maxzoom:r}};function zr(e,r){var i=Math.pow(2,r.canonical.z),n=r.canonical.y;return[new t.MercatorCoordinate(0,n/i).toLngLat().lat,new t.MercatorCoordinate(0,(n+1)/i).toLngLat().lat]}var kr=function(t,e,r){var i=t.transform;return{u_matrix:Dr(t,e,r),u_ratio:1/le(e,1,i.zoom),u_gl_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Cr=function(e,r,i){return t.extend(kr(e,r,i),{u_image:0})},Pr=function(e,r,i,n){var o=e.transform,a=Lr(r,o);return{u_matrix:Dr(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:1/le(r,1,o.zoom),u_image:0,u_scale:[t.browser.devicePixelRatio,a,n.fromScale,n.toScale],u_fade:n.t,u_gl_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Mr=function(e,r,i,n,o){var a=e.transform,s=e.lineAtlas,u=Lr(r,a),l="round"===i.layout.get("line-cap"),p=s.getDash(n.from,l),c=s.getDash(n.to,l),h=p.width*o.fromScale,f=c.width*o.toScale;return t.extend(kr(e,r,i),{u_patternscale_a:[u/h,-p.height/2],u_patternscale_b:[u/f,-c.height/2],u_sdfgamma:s.width/(256*Math.min(h,f)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:p.y,u_tex_y_b:c.y,u_mix:o.t})};function Lr(t,e){return 1/le(t,1,e.tileZoom)}function Dr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Br=function(t,e,r,i,n){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*n.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:n.paint.get("raster-brightness-min"),u_brightness_high:n.paint.get("raster-brightness-max"),u_saturation_factor:(a=n.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=n.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Rr(n.paint.get("raster-hue-rotate"))};var o,a};function Rr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var Fr=function(t,e,r,i,n,o,a,s,u,l){var p=n.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:p.cameraToCenterDistance,u_pitch:p.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:p.width/p.height,u_fade_change:n.options.fadeDuration?n.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_gl_coord_matrix:s,u_is_text:+u,u_pitch_with_map:+i,u_texsize:l,u_texture:0}},Or=function(e,r,i,n,o,a,s,u,l,p,c){var h=o.transform;return t.extend(Fr(e,r,i,n,o,a,s,u,l,p),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_is_halo:+c})},Ur=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Vr=function(e,r,i,n,o,a){return t.extend(function(t,e,r,i){var n=r.imageManager.getPattern(t.from),o=r.imageManager.getPattern(t.to),a=r.imageManager.getPixelSize(),s=a.width,u=a.height,l=Math.pow(2,i.tileID.overscaledZ),p=i.tileSize*Math.pow(2,r.transform.tileZoom)/l,c=p*(i.tileID.canonical.x+i.tileID.wrap*l),h=p*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,u],u_mix:e.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/le(i,1,r.transform.tileZoom),u_pixel_coord_upper:[c>>16,h>>16],u_pixel_coord_lower:[65535&c,65535&h]}}(n,a,i,o),{u_matrix:e,u_opacity:r})},Nr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:br,collisionCircle:br,debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_image:new t.Uniform1i(e,r.u_image),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,r.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,r.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_is_halo:new t.Uniform1f(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function jr(e,r){for(var i=e.sort((function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0})),n=0;n<i.length;n++){var o={},a=i[n],s=i.slice(n+1);qr(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),o),a.setMask(o,r)}}function qr(e,r,i,n,o){for(var a=0;a<i.length;a++){var s=i[a];if(n.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var u=r.children(1/0),l=0;l<u.length;l++)qr(e,u[l],i.slice(a),n,o);return}}var p=r.overscaledZ-e.overscaledZ,c=new t.CanonicalTileID(p,r.canonical.x-(e.canonical.x<<p),r.canonical.y-(e.canonical.y<<p));o[c.key]=o[c.key]||c}function Zr(t,e,r,i,n){for(var o=t.context,a=o.gl,s=n?t.useProgram("collisionCircle"):t.useProgram("collisionBox"),u=0;u<i.length;u++){var l=i[u],p=e.getTile(l),c=p.getBucket(r);if(c){var h=n?c.collisionCircle:c.collisionBox;h&&s.draw(o,n?a.TRIANGLES:a.LINES,St.disabled,Tt.disabled,t.colorModeForRenderPass(),It.disabled,wr(l.posMatrix,t.transform,p),r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,t.transform.zoom,null,null,h.collisionVertexBuffer)}}}var Gr=t.identity(new Float32Array(16)),Xr=t.properties.layout;function Wr(e,r,i,n,o,a){var s=t.getAnchorAlignment(e),u=-(s.horizontalAlign-.5)*r,l=-(s.verticalAlign-.5)*i,p=t.evaluateRadialOffset(e,n);return new t.Point((u/o+p[0])*a,(l/o+p[1])*a)}function Kr(e,r,i,n,o,a,s,u,l,p){var c=e.text.placedSymbolArray,h=e.text.dynamicLayoutVertexArray;h.clear();for(var f=0;f<c.length;f++){var d=c.get(f),m=!d.hidden&&d.crossTileID?n[d.crossTileID]:null;if(m){var y=new t.Point(d.anchorX,d.anchorY),v=Jt(y,i?u:s),_=.5+a.cameraToCenterDistance/v.signedDistanceFromCamera*.5,g=o.evaluateSizeForFeature(e.textSizeData,p,d)*_/t.ONE_EM;i&&(g*=e.tilePixelRatio/l);for(var x=m.width,b=m.height,w=m.radialOffset,E=m.textBoxScale,S=Wr(m.anchor,x,b,w,E,g),T=i?Jt(y.add(S),s).point:v.point.add(r?S.rotate(-a.angle):S),A=0;A<d.numGlyphs;A++)t.addDynamicAttributes(h,T,0)}else oe(d.numGlyphs,h)}e.text.dynamicLayoutVertexBuffer.updateData(h)}function Hr(e,r,i,n,o,a,s,u,l,p,c,h,f){for(var d,m,y=e.context,v=y.gl,_=e.transform,g="map"===u,x="map"===l,b=g&&"point"!==i.layout.get("symbol-placement"),w=g&&!x&&!b,E=void 0!==i.layout.get("symbol-sort-key").constantOr(1),S=e.depthModeForSublayer(0,St.ReadOnly),T=i.layout.get("text-variable-anchor"),A=[],I=0,z=n;I<z.length;I+=1){var k=z[I],C=r.getTile(k),P=C.getBucket(i);if(P){var M=o?P.text:P.icon;if(M&&M.segments.get().length){var L=M.programConfigurations.get(i.id),D=o||P.sdfIcons,B=o?P.textSizeData:P.iconSizeData;d||(d=e.useProgram(D?"symbolSDF":"symbolIcon",L),m=t.evaluateSizeForZoom(B,_.zoom,Xr.properties[o?"text-size":"icon-size"])),y.activeTexture.set(v.TEXTURE0);var R=void 0,F=void 0,O=void 0;if(o)F=C.glyphAtlasTexture,O=v.LINEAR,R=C.glyphAtlasTexture.size;else{var U=1!==i.layout.get("icon-size").constantOr(0)||P.iconsNeedLinear,V=x||0!==_.pitch;F=C.imageAtlasTexture,O=D||e.options.rotating||e.options.zooming||U||V?v.LINEAR:v.NEAREST,R=C.imageAtlasTexture.size}var N=le(C,1,e.transform.zoom),j=Kt(k.posMatrix,x,g,e.transform,N),q=Ht(k.posMatrix,x,g,e.transform,N);if(b)$t(P,k.posMatrix,e,o,j,q,x,p);else if(o&&m&&T){var Z=Math.pow(2,_.zoom-C.tileID.overscaledZ);Kr(P,g,x,f,t.symbolSize,_,j,k.posMatrix,Z,m)}var G=e.translatePosMatrix(k.posMatrix,C,a,s),X=b||o&&T?Gr:j,W=e.translatePosMatrix(q,C,a,s,!0),K=D&&0!==i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),H={program:d,buffers:M,uniformValues:D?Or(B.functionType,m,w,x,e,G,X,W,o,R,!0):Fr(B.functionType,m,w,x,e,G,X,W,o,R),atlasTexture:F,atlasInterpolation:O,isSDF:D,hasHalo:K};if(E)for(var J=0,Y=M.segments.get();J<Y.length;J+=1){var $=Y[J];A.push({segments:new t.SegmentVector([$]),sortKey:$.sortKey,state:H})}else A.push({segments:M.segments,sortKey:0,state:H})}}}E&&A.sort((function(t,e){return t.sortKey-e.sortKey}));for(var Q=0,tt=A;Q<tt.length;Q+=1){var et=tt[Q],rt=et.state;if(rt.atlasTexture.bind(rt.atlasInterpolation,v.CLAMP_TO_EDGE),rt.isSDF){var it=rt.uniformValues;rt.hasHalo&&(it.u_is_halo=1,Jr(rt.buffers,et.segments,i,e,rt.program,S,c,h,it)),it.u_is_halo=0}Jr(rt.buffers,et.segments,i,e,rt.program,S,c,h,rt.uniformValues)}}function Jr(t,e,r,i,n,o,a,s,u){var l=i.context,p=l.gl;n.draw(l,p.TRIANGLES,o,a,s,It.disabled,u,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,i.transform.zoom,t.programConfigurations.get(r.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function Yr(t,e,r,i,n,o,a){var s,u,l,p,c,h=t.context.gl,f=r.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=r.getCrossfadeParameters();a?(u=d&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=h.LINES):(u=d?"fillPattern":"fill",s=h.TRIANGLES);for(var y=0,v=i;y<v.length;y+=1){var _=v[y],g=e.getTile(_);if(!d||g.patternsLoaded()){var x=g.getBucket(r);if(x){var b=x.programConfigurations.get(r.id),w=t.useProgram(u,b);d&&(t.context.activeTexture.set(h.TEXTURE0),g.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePatternPaintBuffers(m));var E=f.constantOr(null);if(E&&g.imageAtlas){var S=g.imageAtlas.patternPositions[E.to],T=g.imageAtlas.patternPositions[E.from];S&&T&&b.setConstantPatternPositions(S,T)}var A=t.translatePosMatrix(_.posMatrix,g,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(a){p=x.indexBuffer2,c=x.segments2;var I=[h.drawingBufferWidth,h.drawingBufferHeight];l="fillOutlinePattern"===u&&d?gr(A,t,m,g,I):_r(A,I)}else p=x.indexBuffer,c=x.segments,l=d?vr(A,t,m,g):yr(A);w.draw(t.context,s,n,t.stencilModeForClipping(_),o,It.disabled,l,r.id,x.layoutVertexBuffer,p,c,r.paint,t.transform.zoom,b)}}}}function $r(t,e,r,i,n,o,a){for(var s=t.context,u=s.gl,l=r.paint.get("fill-extrusion-pattern"),p=l.constantOr(1),c=r.getCrossfadeParameters(),h=r.paint.get("fill-extrusion-opacity"),f=0,d=i;f<d.length;f+=1){var m=d[f],y=e.getTile(m),v=y.getBucket(r);if(v){var _=v.programConfigurations.get(r.id),g=t.useProgram(p?"fillExtrusionPattern":"fillExtrusion",_);p&&(t.context.activeTexture.set(u.TEXTURE0),y.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),_.updatePatternPaintBuffers(c));var x=l.constantOr(null);if(x&&y.imageAtlas){var b=y.imageAtlas.patternPositions[x.to],w=y.imageAtlas.patternPositions[x.from];b&&w&&_.setConstantPatternPositions(b,w)}var E=t.translatePosMatrix(m.posMatrix,y,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),S=r.paint.get("fill-extrusion-vertical-gradient"),T=p?mr(E,t,S,h,m,c,y):dr(E,t,S,h);g.draw(s,s.gl.TRIANGLES,n,o,a,It.backCCW,T,r.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,r.paint,t.transform.zoom,_)}}}function Qr(t,e,r,i,n,o){var a=t.context,s=a.gl,u=e.fbo;if(u){var l=t.useProgram("hillshade");a.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,u.colorAttachment.get());var p=Ar(t,e,r);e.maskedBoundsBuffer&&e.maskedIndexBuffer&&e.segments?l.draw(a,s.TRIANGLES,i,n,o,It.disabled,p,r.id,e.maskedBoundsBuffer,e.maskedIndexBuffer,e.segments):l.draw(a,s.TRIANGLES,i,n,o,It.disabled,p,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}}function ti(e,r,i,n,o,a,s){var u=e.context,l=u.gl;if(r.dem&&r.dem.data){var p=r.dem.dim,c=r.dem.stride,h=r.dem.getPixels();if(u.activeTexture.set(l.TEXTURE1),u.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(c),r.demTexture){var f=r.demTexture;f.update(h,{premultiply:!1}),f.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else r.demTexture=new t.Texture(u,h,l.RGBA,{premultiply:!1}),r.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);u.activeTexture.set(l.TEXTURE0);var d=r.fbo;if(!d){var m=new t.Texture(u,{width:p,height:p,data:null},l.RGBA);m.bind(l.LINEAR,l.CLAMP_TO_EDGE),(d=r.fbo=u.createFramebuffer(p,p)).colorAttachment.set(m.texture)}u.bindFramebuffer.set(d.framebuffer),u.viewport.set([0,0,p,p]),e.useProgram("hillshadePrepare").draw(u,l.TRIANGLES,o,a,s,It.disabled,Ir(r,n),i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function ei(e,r,i,n,o){var a=n.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),u=(s-e.timeAdded)/a,l=r?(s-r.timeAdded)/a:-1,p=i.getSource(),c=o.coveringZoomLevel({tileSize:p.tileSize,roundZoom:p.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-c)>Math.abs(e.tileID.overscaledZ-c),f=h&&e.refreshedUponExpiration?1:t.clamp(h?u:1-l,0,1);return e.refreshedUponExpiration&&u>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function ri(e,r,i){var n=e.context,o=n.gl,a=i.posMatrix,s=e.useProgram("debug"),u=St.disabled,l=Tt.disabled,p=e.colorModeForRenderPass(),c="$debug";s.draw(n,o.LINE_STRIP,u,l,p,It.disabled,Er(a,t.Color.red),c,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var h=r.getTileByID(i.key).latestRawTileData,f=h&&h.byteLength||0,d=Math.floor(f/1024),m=function(t,e,r,i){i=i||1;var n,o,a,s,u,l,p,c,h=[];for(n=0,o=t.length;n<o;n++)if(u=ii[t[n]]){for(c=null,a=0,s=u[1].length;a<s;a+=2)-1===u[1][a]&&-1===u[1][a+1]?c=null:(l=e+u[1][a]*i,p=200-u[1][a+1]*i,c&&h.push(c.x,c.y,l,p),c={x:l,y:p});e+=u[0]*i}return h}(i.toString()+" "+d+"kb",50,0,5),y=new t.StructArrayLayout2i4,v=new t.StructArrayLayout2ui4,_=0;_<m.length;_+=2)y.emplaceBack(m[_],m[_+1]),v.emplaceBack(_,_+1);for(var g=n.createVertexBuffer(y,Fe.members),x=n.createIndexBuffer(v),b=t.SegmentVector.simpleSegment(0,0,y.length/2,y.length/2),w=r.getTile(i).tileSize,E=t.EXTENT/(Math.pow(2,e.transform.zoom-i.overscaledZ)*w),S=[[-1,-1],[-1,1],[1,-1],[1,1]],T=0;T<S.length;T++){var A=S[T];s.draw(n,o.LINES,u,l,p,It.disabled,Er(t.translate([],a,[E*A[0],E*A[1],0]),t.Color.white),c,g,x,b)}s.draw(n,o.LINES,u,l,p,It.disabled,Er(a,t.Color.black),c,g,x,b)}var ii={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},ni={symbol:function(t,e,r,i,n){if("translucent"===t.renderPass){var o=Tt.disabled,a=t.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Hr(t,e,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),o,a,n),0!==r.paint.get("text-opacity").constantOr(1)&&Hr(t,e,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),o,a,n),e.map.showCollisionBoxes&&function(t,e,r,i){Zr(t,e,r,i,!1),Zr(t,e,r,i,!0)}(t,e,r,i)}},circle:function(t,e,r,i){if("translucent"===t.renderPass){var n=r.paint.get("circle-opacity"),o=r.paint.get("circle-stroke-width"),a=r.paint.get("circle-stroke-opacity");if(0!==n.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1))for(var s=t.context,u=s.gl,l=t.depthModeForSublayer(0,St.ReadOnly),p=Tt.disabled,c=t.colorModeForRenderPass(),h=0;h<i.length;h++){var f=i[h],d=e.getTile(f),m=d.getBucket(r);if(m){var y=m.programConfigurations.get(r.id);t.useProgram("circle",y).draw(s,u.TRIANGLES,l,p,c,It.disabled,xr(t,f,d,r),r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,r.paint,t.transform.zoom,y)}}}},heatmap:function(e,r,i,n){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=e.depthModeForSublayer(0,St.ReadOnly),u=Tt.disabled,l=new At([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,r){var i=t.gl;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var n=r.heatmapFbo;if(n)i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),t.bindFramebuffer.set(n.framebuffer);else{var o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),n=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,r,i,n){var o=e.gl;o.texImage2D(o.TEXTURE_2D,0,o.RGBA,r.width/4,r.height/4,0,o.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:o.UNSIGNED_BYTE,null),n.colorAttachment.set(i),e.extTextureHalfFloat&&o.checkFramebufferStatus(o.FRAMEBUFFER)!==o.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,n.colorAttachment.setDirty(),t(e,r,i,n))}(t,e,o,n)}}(o,e,i),o.clear({color:t.Color.transparent});for(var p=0;p<n.length;p++){var c=n[p];if(!r.hasRenderableParent(c)){var h=r.getTile(c),f=h.getBucket(i);if(f){var d=f.programConfigurations.get(i.id),m=e.useProgram("heatmap",d),y=e.transform.zoom;m.draw(o,a.TRIANGLES,s,u,l,It.disabled,Tr(c.posMatrix,h,y,i.paint.get("heatmap-intensity")),i.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,i.paint,e.transform.zoom,d)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var i=e.context,n=i.gl,o=r.heatmapFbo;if(o){i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),i.activeTexture.set(n.TEXTURE1);var a=r.colorRampTexture;a||(a=r.colorRampTexture=new t.Texture(i,r.colorRamp,n.RGBA)),a.bind(n.LINEAR,n.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(i,n.TRIANGLES,St.disabled,Tt.disabled,e.colorModeForRenderPass(),It.disabled,function(e,r,i,n){var o=t.create();t.ortho(o,0,e.width,e.height,0,0,1);var a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:i,u_color_ramp:n,u_opacity:r.paint.get("heatmap-opacity")}}(e,r,0,1),r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom)}}(e,i))},line:function(e,r,i,n){if("translucent"===e.renderPass){var o=i.paint.get("line-opacity"),a=i.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,St.ReadOnly),u=e.colorModeForRenderPass(),l=i.paint.get("line-dasharray"),p=i.paint.get("line-pattern"),c=p.constantOr(1),h=i.paint.get("line-gradient"),f=i.getCrossfadeParameters(),d=l?"lineSDF":c?"linePattern":h?"lineGradient":"line",m=e.context,y=m.gl,v=!0;if(h){m.activeTexture.set(y.TEXTURE0);var _=i.gradientTexture;if(!i.gradient)return;_||(_=i.gradientTexture=new t.Texture(m,i.gradient,y.RGBA)),_.bind(y.LINEAR,y.CLAMP_TO_EDGE)}for(var g=0,x=n;g<x.length;g+=1){var b=x[g],w=r.getTile(b);if(!c||w.patternsLoaded()){var E=w.getBucket(i);if(E){var S=E.programConfigurations.get(i.id),T=e.context.program.get(),A=e.useProgram(d,S),I=v||A.program!==T,z=p.constantOr(null);if(z&&w.imageAtlas){var k=w.imageAtlas.patternPositions[z.to],C=w.imageAtlas.patternPositions[z.from];k&&C&&S.setConstantPatternPositions(k,C)}var P=l?Mr(e,w,i,l,f):c?Pr(e,w,i,f):h?Cr(e,w,i):kr(e,w,i);l&&(I||e.lineAtlas.dirty)?(m.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(m)):c&&(m.activeTexture.set(y.TEXTURE0),w.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),S.updatePatternPaintBuffers(f)),A.draw(m,y.TRIANGLES,s,e.stencilModeForClipping(b),u,It.disabled,P,i.id,E.layoutVertexBuffer,E.indexBuffer,E.segments,i.paint,e.transform.zoom,S),v=!1}}}}}},fill:function(e,r,i,n){var o=i.paint.get("fill-color"),a=i.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),u=i.paint.get("fill-pattern"),l=e.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===l){var p=e.depthModeForSublayer(1,"opaque"===e.renderPass?St.ReadWrite:St.ReadOnly);Yr(e,r,i,n,p,s,!1)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var c=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,St.ReadOnly);Yr(e,r,i,n,c,s,!0)}}},"fill-extrusion":function(t,e,r,i){var n=r.paint.get("fill-extrusion-opacity");if(0!==n&&"translucent"===t.renderPass){var o=new St(t.context.gl.LEQUAL,St.ReadWrite,t.depthRangeFor3D);if(1!==n||r.paint.get("fill-extrusion-pattern").constantOr(1))$r(t,e,r,i,o,Tt.disabled,At.disabled),$r(t,e,r,i,o,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var a=t.colorModeForRenderPass();$r(t,e,r,i,o,Tt.disabled,a)}}},hillshade:function(t,e,r,i){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var n=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,St.ReadOnly),s=Tt.disabled,u=t.colorModeForRenderPass(),l=0,p=i;l<p.length;l+=1){var c=p[l],h=e.getTile(c);h.needsHillshadePrepare&&"offscreen"===t.renderPass?ti(t,h,r,o,a,s,u):"translucent"===t.renderPass&&Qr(t,h,r,a,s,u)}n.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,i){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity"))for(var n=t.context,o=n.gl,a=e.getSource(),s=t.useProgram("raster"),u=Tt.disabled,l=t.colorModeForRenderPass(),p=i.length&&i[0].overscaledZ,c=!t.options.moving,h=0,f=i;h<f.length;h+=1){var d=f[h],m=t.depthModeForSublayer(d.overscaledZ-p,1===r.paint.get("raster-opacity")?St.ReadWrite:St.ReadOnly,o.LESS),y=e.getTile(d),v=t.transform.calculatePosMatrix(d.toUnwrapped(),c);y.registerFadeDuration(r.paint.get("raster-fade-duration"));var _=e.findLoadedParent(d,0),g=ei(y,_,e,r,t.transform),x=void 0,b=void 0,w="nearest"===r.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;n.activeTexture.set(o.TEXTURE0),y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.activeTexture.set(o.TEXTURE1),_?(_.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),x=Math.pow(2,_.tileID.overscaledZ-y.tileID.overscaledZ),b=[y.tileID.canonical.x*x%1,y.tileID.canonical.y*x%1]):y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var E=Br(v,b||[0,0],x||1,g,r);a instanceof C?s.draw(n,o.TRIANGLES,m,u,l,It.disabled,E,r.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):y.maskedBoundsBuffer&&y.maskedIndexBuffer&&y.segments?s.draw(n,o.TRIANGLES,m,u,l,It.disabled,E,r.id,y.maskedBoundsBuffer,y.maskedIndexBuffer,y.segments,r.paint,t.transform.zoom):s.draw(n,o.TRIANGLES,m,u,l,It.disabled,E,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,r){var i=r.paint.get("background-color"),n=r.paint.get("background-opacity");if(0!==n){var o=t.context,a=o.gl,s=t.transform,u=s.tileSize,l=r.paint.get("background-pattern");if(!t.isPatternMissing(l)){var p=l||1!==i.a||1!==n?"translucent":"opaque";if(t.renderPass===p){var c=Tt.disabled,h=t.depthModeForSublayer(0,"opaque"===p?St.ReadWrite:St.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(l?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:u});l&&(o.activeTexture.set(a.TEXTURE0),t.imageManager.bind(t.context));for(var y=r.getCrossfadeParameters(),v=0,_=m;v<_.length;v+=1){var g=_[v],x=t.transform.calculatePosMatrix(g.toUnwrapped()),b=l?Vr(x,n,t,l,{tileID:g,tileSize:u},y):Ur(x,n,i);d.draw(o,a.TRIANGLES,h,c,f,It.disabled,b,r.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,r){for(var i=0;i<r.length;i++)ri(t,e,r[i])},custom:function(t,e,r){var i=t.context,n=r.implementation;if("offscreen"===t.renderPass){var o=n.prerender;o&&(t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),o.call(n,i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),i.setStencilMode(Tt.disabled);var a="3d"===n.renderingMode?new St(t.context.gl.LEQUAL,St.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,St.ReadOnly);i.setDepthMode(a),n.render(i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState(),i.bindFramebuffer.set(null)}}},oi=function(e,r){this.context=new zt(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=kt.maxUnderzooming+kt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.ProgramConfiguration,this.crossTileSymbolIndex=new Me};function ai(t,e){if(t.y>e.y){var r=t;t=e,e=r}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function si(t,e,r,i,n){var o=Math.max(r,Math.floor(e.y0)),a=Math.min(i,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var u=t.dx/t.dy,l=e.dx/e.dy,p=t.dx>0,c=e.dx<0,h=o;h<a;h++){var f=u*Math.max(0,Math.min(t.dy,h+p-t.y0))+t.x0,d=l*Math.max(0,Math.min(e.dy,h+c-e.y0))+e.x0;n(Math.floor(d),Math.ceil(f),h)}}function ui(t,e,r,i,n,o){var a,s=ai(t,e),u=ai(e,r),l=ai(r,t);s.dy>u.dy&&(a=s,s=u,u=a),s.dy>l.dy&&(a=s,s=l,l=a),u.dy>l.dy&&(a=u,u=l,l=a),s.dy&&si(l,s,i,n,o),u.dy&&si(l,u,i,n,o)}oi.prototype.resize=function(e,r){var i=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,o=this.style._order;n<o.length;n+=1){var a=o[n];this.style._layers[a].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},oi.prototype.setup=function(){var e=this.context,r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(r,Fe.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var i=new t.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(t.EXTENT,0),i.emplaceBack(0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(i,Fe.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var n=new t.StructArrayLayout4i8;n.emplaceBack(0,0,0,0),n.emplaceBack(t.EXTENT,0,t.EXTENT,0),n.emplaceBack(0,t.EXTENT,0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(n,t.rasterBoundsAttributes.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Fe.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);var u=this.context.gl;this.stencilClearMode=new Tt({func:u.ALWAYS,mask:0},0,255,u.ZERO,u.ZERO,u.ZERO)},oi.prototype.clearStencil=function(){var e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=t.create();t.ortho(i,0,this.width,this.height,0,0,1),t.scale(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,St.disabled,this.stencilClearMode,At.disabled,It.disabled,Sr(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},oi.prototype._renderTileClippingMasks=function(t,e){if(this.currentStencilSource!==t.source&&t.isTileClipped()&&e&&e.length){this.currentStencilSource=t.source;var r=this.context,i=r.gl;this.nextStencilID+e.length>256&&this.clearStencil(),r.setColorMode(At.disabled),r.setDepthMode(St.disabled);var n=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o<a.length;o+=1){var s=a[o],u=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;n.draw(r,i.TRIANGLES,St.disabled,new Tt({func:i.ALWAYS,mask:0},u,255,i.KEEP,i.KEEP,i.REPLACE),At.disabled,It.disabled,Sr(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},oi.prototype.stencilModeFor3D=function(){this.nextStencilID+1>256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Tt({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},oi.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Tt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},oi.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new At([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?At.unblended:At.alphaBlended},oi.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return St.disabled;var i=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new St(r||this.context.gl.LEQUAL,e,[i,i])},oi.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},oi.prototype.render=function(e,r){this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var i=this.style._order,n=this.style.sourceCaches;for(var o in n){var a=n[o];a.used&&a.prepare(this.context)}var s={},u={},l={};for(var p in n){var c=n[p];s[p]=c.getVisibleCoordinates(),u[p]=s[p].slice().reverse(),l[p]=c.getVisibleCoordinates(!0).reverse()}for(var h in n){var f=n[h],d=f.getSource();if("raster"===d.type||"raster-dem"===d.type){for(var m=[],y=0,v=s[h];y<v.length;y+=1){var _=v[y];m.push(f.getTile(_))}jr(m,this.context)}}this.opaquePassCutoff=1/0;for(var g=0;g<i.length;g++){var x=i[g];if(this.style._layers[x].is3D()){this.opaquePassCutoff=g;break}}this.renderPass="offscreen",this.depthRboNeedsClear=!0;for(var b=0,w=i;b<w.length;b+=1){var E=w[b],S=this.style._layers[E];if(S.hasOffscreenPass()&&!S.isHidden(this.transform.zoom)){var T=u[S.source];("custom"===S.type||T.length)&&this.renderLayer(this,n[S.source],S,T)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var A=this.style._layers[i[this.currentLayer]],I=n[A.source],z=s[A.source];this._renderTileClippingMasks(A,z),this.renderLayer(this,I,A,z)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<i.length;this.currentLayer++){var k=this.style._layers[i[this.currentLayer]],C=n[k.source],P=("symbol"===k.type?l:u)[k.source];this._renderTileClippingMasks(k,s[k.source]),this.renderLayer(this,C,k,P)}if(this.options.showTileBoundaries)for(var M in n){ni.debug(this,n[M],s[M]);break}this.setCustomLayerDefaults()},oi.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},oi.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||i.length)&&(this.id=r.id,ni[r.type](t,e,r,i,this.style.placement.variableOffsets))},oi.prototype.translatePosMatrix=function(e,r,i,n,o){if(!i[0]&&!i[1])return e;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),u=Math.cos(a);i=[i[0]*u-i[1]*s,i[0]*s+i[1]*u]}var l=[o?i[0]:le(r,i[0],this.transform.zoom),o?i[1]:le(r,i[1],this.transform.zoom),0],p=new Float32Array(16);return t.translate(p,e,l),p},oi.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},oi.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},oi.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),r=this.imageManager.getPattern(t.to);return!e||!r},oi.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new hr(this.context,pr[t],e,Nr[t],this._showOverdrawInspector)),this.cache[r]},oi.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},oi.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)};var li=function(e,r,i){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===i||i,this._minZoom=e||0,this._maxZoom=r||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},pi={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};li.prototype.clone=function(){var t=new li(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},pi.minZoom.get=function(){return this._minZoom},pi.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},pi.maxZoom.get=function(){return this._maxZoom},pi.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},pi.renderWorldCopies.get=function(){return this._renderWorldCopies},pi.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},pi.worldSize.get=function(){return this.tileSize*this.scale},pi.centerPoint.get=function(){return this.size._div(2)},pi.size.get=function(){return new t.Point(this.width,this.height)},pi.bearing.get=function(){return-this.angle/Math.PI*180},pi.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},pi.pitch.get=function(){return this._pitch/Math.PI*180},pi.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},pi.fov.get=function(){return this._fov/Math.PI*180},pi.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},pi.zoom.get=function(){return this._zoom},pi.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},pi.center.get=function(){return this._center},pi.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},li.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},li.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new t.Point(0,0)),n=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(i.x,n.x,o.x,a.x)),u=Math.floor(Math.max(i.x,n.x,o.x,a.x)),l=s-1;l<=u+1;l++)0!==l&&r.push(new t.UnwrappedTileID(l,e));return r},li.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),i=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var n=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=new t.Point(o*n.x-.5,o*n.y-.5);return function(e,r,i,n){void 0===n&&(n=!0);var o=1<<e,a={};function s(r,s,u){var l,p,c,h;if(u>=0&&u<=o)for(l=r;l<s;l++)p=Math.floor(l/o),c=(l%o+o)%o,0!==p&&!0!==n||(h=new t.OverscaledTileID(i,p,e,c,u),a[h.key]=h)}var u=r.map((function(e){return new t.Point(e.x,e.y)._mult(o)}));return ui(u[0],u[1],u[2],0,o,s),ui(u[2],u[3],u[0],0,o,s),Object.keys(a).map((function(t){return a[t]}))}(r,[this.pointCoordinate(new t.Point(0,0)),this.pointCoordinate(new t.Point(this.width,0)),this.pointCoordinate(new t.Point(this.width,this.height)),this.pointCoordinate(new t.Point(0,this.height))],e.reparseOverscaled?i:r,this._renderWorldCopies).sort((function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)}))},li.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},pi.unmodified.get=function(){return this._unmodified},li.prototype.zoomScale=function(t){return Math.pow(2,t)},li.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},li.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},li.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},pi.point.get=function(){return this.project(this.center)},li.prototype.setLocationAtPoint=function(e,r){var i=this.pointCoordinate(r),n=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(i.x-n.x),o.y-(i.y-n.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},li.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},li.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},li.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},li.prototype.coordinateLocation=function(t){return t.toLngLat()},li.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(i,i,this.pixelMatrixInverse);var n=r[3],o=i[3],a=r[0]/n,s=i[0]/o,u=r[1]/n,l=i[1]/o,p=r[2]/n,c=i[2]/o,h=p===c?0:(0-p)/(c-p);return new t.MercatorCoordinate(t.number(a,s,h)/this.worldSize,t.number(u,l,h)/this.worldSize)},li.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},li.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},li.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},li.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},li.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var i=e.key,n=r?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,u=t.identity(new Float64Array(16));return t.translate(u,u,[s*a,o.y*a,0]),t.scale(u,u,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(u,r?this.alignedProjMatrix:this.projMatrix,u),n[i]=new Float32Array(u),n[i]},li.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},li.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,i,n,o=-90,a=90,s=-180,u=180,l=this.size,p=this._unmodified;if(this.latRange){var c=this.latRange;o=t.mercatorYfromLat(c[1])*this.worldSize,e=(a=t.mercatorYfromLat(c[0])*this.worldSize)-o<l.y?l.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,r=(u=t.mercatorXfromLng(h[1])*this.worldSize)-s<l.x?l.x/(u-s):0}var f=this.point,d=Math.max(r||0,e||0);if(d)return this.center=this.unproject(new t.Point(r?(u+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=p,void(this._constraining=!1);if(this.latRange){var m=f.y,y=l.y/2;m-y<o&&(n=o+y),m+y>a&&(n=a-y)}if(this.lngRange){var v=f.x,_=l.x/2;v-_<s&&(i=s+_),v+_>u&&(i=u-_)}void 0===i&&void 0===n||(this.center=this.unproject(new t.Point(void 0!==i?i:f.x,void 0!==n?n:f.y))),this._unmodified=p,this._constraining=!1}},li.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),n=this.point,o=n.x,a=n.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),u=new Float64Array(16);t.perspective(u,this._fov,this.width/this.height,1,s),t.scale(u,u,[1,-1,1]),t.translate(u,u,[0,0,-this.cameraToCenterDistance]),t.rotateX(u,u,this._pitch),t.rotateZ(u,u,this.angle),t.translate(u,u,[-o,-a,0]),this.mercatorMatrix=t.scale([],u,[this.worldSize,this.worldSize,this.worldSize]),t.scale(u,u,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=u;var l=this.width%2/2,p=this.height%2/2,c=Math.cos(this.angle),h=Math.sin(this.angle),f=o-Math.round(o)+c*l+h*p,d=a-Math.round(a)+c*p+h*l,m=new Float64Array(u);if(t.translate(m,m,[f>.5?f-1:f,d>.5?d-1:d,0]),this.alignedProjMatrix=m,u=t.create(),t.scale(u,u,[this.width/2,-this.height/2,1]),t.translate(u,u,[1,-1,0]),this.labelPlaneMatrix=u,u=t.create(),t.scale(u,u,[1,-1,1]),t.translate(u,u,[-1,-1,0]),t.scale(u,u,[2/this.width,2/this.height,1]),this.glCoordMatrix=u,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(u=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=u,this._posMatrixCache={},this._alignedPosMatrixCache={}}},li.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},li.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},li.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var i=r.x,n=r.y,o=r.x,a=r.y,s=0,u=e;s<u.length;s+=1){var l=u[s];i=Math.min(i,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),a=Math.max(a,l.y)}return[new t.Point(i,n),new t.Point(o,n),new t.Point(o,a),new t.Point(i,a),new t.Point(i,n)]},Object.defineProperties(li.prototype,pi);var ci=function(){var e,r,i,n;t.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),r=!1,i=0,n=function(){i=0,r&&(e(),i=setTimeout(n,300),r=!1)},function(){return r=!0,i||n(),i})};ci.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},ci.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},ci.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),n=Math.pow(10,i),o=Math.round(e.lng*n)/n,a=Math.round(e.lat*n)/n,s=this._map.getBearing(),u=this._map.getPitch(),l="";return l+=t?"#/"+o+"/"+a+"/"+r:"#"+r+"/"+a+"/"+o,(s||u)&&(l+="/"+Math.round(10*s)/10),u&&(l+="/"+Math.round(u)),l},ci.prototype._onHashChange=function(){var e=t.window.location.hash.replace("#","").split("/");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},ci.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var hi=function(e){function i(i,n,o,a){void 0===a&&(a={});var s=r.mousePos(n.getCanvasContainer(),o),u=n.unproject(s);e.call(this,i,t.extend({point:s,lngLat:u,originalEvent:o},a)),this._defaultPrevented=!1,this.target=n}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),fi=function(e){function i(i,n,o){var a=r.touchPos(n.getCanvasContainer(),o),s=a.map((function(t){return n.unproject(t)})),u=a.reduce((function(t,e,r,i){return t.add(e.div(i.length))}),new t.Point(0,0)),l=n.unproject(u);e.call(this,i,{points:a,point:u,lngLats:s,lngLat:l,originalEvent:o}),this._defaultPrevented=!1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),di=function(t){function e(e,r,i){t.call(this,e,{originalEvent:i}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),mi=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};mi.prototype.isEnabled=function(){return!!this._enabled},mi.prototype.isActive=function(){return!!this._active},mi.prototype.isZooming=function(){return!!this._zooming},mi.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},mi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},mi.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=t.browser.now(),n=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},mi.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},mi.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var i=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},mi.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,n=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==n&&(n=1/n);var o="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*n))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,u=this._easing,l=!1;if("wheel"===this._type&&s&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),c=u(p);r.zoom=t.number(s,a,c),p<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):l=!0}else r.zoom=a,l=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),l&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom}),200))}},mi.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var i=this._prevEase,n=(t.browser.now()-i.start)/i.duration,o=i.easing(n+.01)-i.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r};var yi=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};yi.prototype.isEnabled=function(){return!!this._enabled},yi.prototype.isActive=function(){return!!this._active},yi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},yi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},yi.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},yi.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=e,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(i.x,e.x),o=Math.max(i.x,e.x),a=Math.min(i.y,e.y),s=Math.max(i.y,e.y);r.setTransform(this._box,"translate("+n+"px,"+a+"px)"),this._box.style.width=o-n+"px",this._box.style.height=s-a+"px"}},yi.prototype._onMouseUp=function(e){if(0===e.button){var i=this._startPos,n=r.mousePos(this._el,e);this._finish(),r.suppressClick(),i.x===n.x&&i.y===n.y?this._fireEvent("boxzoomcancel",e):this._map.fitScreenCoordinates(i,n,this._map.getBearing(),{linear:!0}).fire(new t.Event("boxzoomend",{originalEvent:e}))}},yi.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},yi.prototype._finish=function(){this._active=!1,t.window.document.removeEventListener("mousemove",this._onMouseMove,!1),t.window.document.removeEventListener("keydown",this._onKeyDown,!1),t.window.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},yi.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var vi=t.bezier(0,0,.25,1),_i=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state="disabled",this._button=r.button||"right",this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll(["onMouseDown","_onMouseMove","_onMouseUp","_onBlur","_onDragFrame"],this)};_i.prototype.isEnabled=function(){return"disabled"!==this._state},_i.prototype.isActive=function(){return"active"===this._state},_i.prototype.enable=function(){this.isEnabled()||(this._state="enabled")},_i.prototype.disable=function(){if(this.isEnabled())switch(this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend"),this._pitchWithRotate&&this._fireEvent("pitchend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},_i.prototype.onMouseDown=function(e){if("enabled"===this._state){if("right"===this._button){if(this._eventButton=r.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==r.mouseButton(e))return;this._eventButton=0}r.disableDrag(),t.window.document.addEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.addEventListener("mouseup",this._onMouseUp),t.window.addEventListener("blur",this._onBlur),this._state="pending",this._inertia=[[t.browser.now(),this._map.getBearing()]],this._startPos=this._lastPos=r.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},_i.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);this._lastPos.equals(e)||(this._lastMoveEvent=t,this._lastPos=e,"pending"===this._state&&(this._state="active",this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},_i.prototype._onDragFrame=function(){this._frameId=null;var e=this._lastMoveEvent;if(e){var r=this._map.transform,i=this._startPos,n=this._lastPos,o=.8*(i.x-n.x),a=-.5*(i.y-n.y),s=r.bearing-o,u=r.pitch-a,l=this._inertia,p=l[l.length-1];this._drainInertiaBuffer(),l.push([t.browser.now(),this._map._normalizeBearing(s,p[1])]),r.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",e),r.pitch=u),this._fireEvent("rotate",e),this._fireEvent("move",e),delete this._lastMoveEvent,this._startPos=this._lastPos}},_i.prototype._onMouseUp=function(t){if(r.mouseButton(t)===this._eventButton)switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case"pending":this._state="enabled",this._unbind()}},_i.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend",t),this._pitchWithRotate&&this._fireEvent("pitchend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},_i.prototype._unbind=function(){t.window.document.removeEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.removeEventListener("mouseup",this._onMouseUp),t.window.removeEventListener("blur",this._onBlur),r.enableDrag()},_i.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._lastPos},_i.prototype._inertialRotate=function(t){var e=this;this._fireEvent("rotateend",t),this._drainInertiaBuffer();var r=this._map,i=r.getBearing(),n=this._inertia,o=function(){Math.abs(i)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent("moveend",t),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(n.length<2)o();else{var a=n[0],s=n[n.length-1],u=n[n.length-2],l=r._normalizeBearing(i,u[1]),p=s[1]-a[1],c=p<0?-1:1,h=(s[0]-a[0])/1e3;if(0!==p&&0!==h){var f=Math.abs(p*(.25/h));f>180&&(f=180);var d=f/180;l+=c*f*(d/2),Math.abs(r._normalizeBearing(l,0))<this._bearingSnap&&(l=r._normalizeBearing(0,l)),r.rotateTo(l,{duration:1e3*d,easing:vi,noMoveStart:!0},{originalEvent:t})}else o()}},_i.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},_i.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var gi=t.bezier(0,0,.3,1),xi=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};xi.prototype.isEnabled=function(){return"disabled"!==this._state},xi.prototype.isActive=function(){return"active"===this._state},xi.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},xi.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},xi.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},xi.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},xi.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},xi.prototype._onMove=function(e){e.preventDefault();var i=r.mousePos(this._el,e);this._lastPos.equals(i)||"pending"===this._state&&i.dist(this._mouseDownPos)<this._clickTolerance||(this._lastMoveEvent=e,this._lastPos=i,this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),this._lastPos]),"pending"===this._state&&(this._state="active",this._fireEvent("dragstart",e),this._fireEvent("movestart",e)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},xi.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._startPos),this._lastPos),this._fireEvent("drag",t),this._fireEvent("move",t),this._startPos=this._lastPos,delete this._lastMoveEvent}},xi.prototype._onMouseUp=function(t){if(0===r.mouseButton(t))switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},xi.prototype._onTouchEnd=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},xi.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("dragend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},xi.prototype._unbind=function(){r.removeEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onTouchEnd),r.removeEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.removeEventListener(t.window.document,"mouseup",this._onMouseUp),r.removeEventListener(t.window,"blur",this._onBlur)},xi.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._mouseDownPos,delete this._lastPos},xi.prototype._inertialPan=function(t){this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent("moveend",t);else{var r=e[e.length-1],i=e[0],n=r[1].sub(i[1]),o=(r[0]-i[0])/1e3;if(0===o||r[1].equals(i[1]))this._fireEvent("moveend",t);else{var a=n.mult(.3/o),s=a.mag();s>1400&&(s=1400,a._unit()._mult(s));var u=s/750,l=a.mult(-u/2);this._map.panBy(l,{duration:1e3*u,easing:gi,noMoveStart:!0},{originalEvent:t})}}},xi.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},xi.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var bi=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function wi(t){return t*(2-t)}bi.prototype.isEnabled=function(){return!!this._enabled},bi.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},bi.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},bi.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,i=0,n=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),n=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),n=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(o=1,t.preventDefault());break;default:return}var a=this._map,s=a.getZoom(),u={duration:300,delayEndEvents:500,easing:wi,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*r,pitch:a.getPitch()+10*i,offset:[100*-n,100*-o],center:a.getCenter()};a.easeTo(u,{originalEvent:t})}};var Ei=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};Ei.prototype.isEnabled=function(){return!!this._enabled},Ei.prototype.isActive=function(){return!!this._active},Ei.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ei.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ei.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout((function(){e._tapped=null}),300)))},Ei.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},Ei.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},Ei.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var Si=t.bezier(0,0,.15,1),Ti=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};Ti.prototype.isEnabled=function(){return!!this._enabled},Ti.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},Ti.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},Ti.prototype.disableRotation=function(){this._rotationDisabled=!0},Ti.prototype.enableRotation=function(){this._rotationDisabled=!1},Ti.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var i=r.mousePos(this._el,e.touches[0]),n=r.mousePos(this._el,e.touches[1]),o=i.add(n).div(2);this._startVec=i.sub(n),this._startAround=this._map.transform.pointLocation(o),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.window.document,"touchend",this._onEnd)}},Ti.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),i=r.mousePos(this._el,t.touches[1]),n=e.sub(i);return{vec:n,center:e.add(i).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},Ti.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),i=r.vec,n=r.scale,o=r.bearing;if(!this._gestureIntent){var a=this._rotationDisabled&&1!==n||Math.abs(1-n)>.15;Math.abs(o)>10?this._gestureIntent="rotate":a&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=i)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},Ti.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var i=this._getTouchEventData(this._lastTouchEvent),n=i.center,o=i.bearing,a=i.scale,s=r.pointLocation(n),u=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*a),r.setLocationAtPoint(this._startAround,u),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),a,n])}},Ti.prototype._onEnd=function(e){r.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onEnd);var i=this._gestureIntent,n=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,i){this._map.fire(new t.Event(i+"end",{originalEvent:e})),this._drainInertiaBuffer();var o=this._inertia,a=this._map;if(o.length<2)a.snapToNorth({},{originalEvent:e});else{var s=o[o.length-1],u=o[0],l=a.transform.scaleZoom(n*s[1]),p=a.transform.scaleZoom(n*u[1]),c=l-p,h=(s[0]-u[0])/1e3,f=s[2];if(0!==h&&l!==p){var d=.15*c/h;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var m=1e3*Math.abs(d/(12*.15)),y=l+d*m/2e3;y<0&&(y=0),a.easeTo({zoom:y,duration:m,easing:Si,around:this._aroundCenter?a.getCenter():a.unproject(f),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},Ti.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>2&&r-e[0][0]>160;)e.shift()};var Ai={scrollZoom:mi,boxZoom:yi,dragRotate:_i,dragPan:xi,keyboard:bi,doubleClickZoom:Ei,touchZoomRotate:Ti},Ii=function(e){function r(r,i){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,i){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),i)},r.prototype.panTo=function(e,r,i){return this.easeTo(t.extend({center:e},r),i)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,i){return this.easeTo(t.extend({zoom:e},r),i)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,i){return this.easeTo(t.extend({bearing:e},r),i)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,r)},r.prototype._cameraForBoxAndBearing=function(e,r,i,n){if("number"==typeof(n=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var o=n.padding;n.padding={top:o,bottom:o,right:o,left:o}}if(t.deepEqual(Object.keys(n.padding).sort((function(t,e){return t<e?-1:t>e?1:0})),["bottom","left","right","top"])){var a=this.transform,s=a.project(t.LngLat.convert(e)),u=a.project(t.LngLat.convert(r)),l=s.rotate(-i*Math.PI/180),p=u.rotate(-i*Math.PI/180),c=new t.Point(Math.max(l.x,p.x),Math.max(l.y,p.y)),h=new t.Point(Math.min(l.x,p.x),Math.min(l.y,p.y)),f=c.sub(h),d=(a.width-n.padding.left-n.padding.right)/f.x,m=(a.height-n.padding.top-n.padding.bottom)/f.y;if(!(m<0||d<0)){var y=Math.min(a.scaleZoom(a.scale*Math.min(d,m)),n.maxZoom),v=t.Point.convert(n.offset),_=(n.padding.left-n.padding.right)/2,g=(n.padding.top-n.padding.bottom)/2,x=new t.Point(v.x+_,v.y+g).mult(a.scale/a.zoomScale(y));return{center:a.unproject(s.add(u).div(2).sub(x)),zoom:y,bearing:i}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,i,n,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),i,n),n,o)},r.prototype._fitInternal=function(e,r,i){return e?(r=t.extend(e,r)).linear?this.easeTo(r,i):this.flyTo(r,i):this},r.prototype.jumpTo=function(e,r){this.stop();var i=this.transform,n=!1,o=!1,a=!1;return"zoom"in e&&i.zoom!==+e.zoom&&(n=!0,i.zoom=+e.zoom),void 0!==e.center&&(i.center=t.LngLat.convert(e.center)),"bearing"in e&&i.bearing!==+e.bearing&&(o=!0,i.bearing=+e.bearing),"pitch"in e&&i.pitch!==+e.pitch&&(a=!0,i.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),n&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),o&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),a&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var i=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),u="zoom"in e?+e.zoom:o,l="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,c=n.centerPoint.add(t.Point.convert(e.offset)),h=n.pointLocation(c),f=t.LngLat.convert(e.center||h);this._normalizeCenter(f);var d,m,y=n.project(h),v=n.project(f).sub(y),_=n.zoomScale(u-o);return e.around&&(d=t.LngLat.convert(e.around),m=n.locationPoint(d)),this._zooming=u!==o,this._rotating=a!==l,this._pitching=p!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease((function(e){if(i._zooming&&(n.zoom=t.number(o,u,e)),i._rotating&&(n.bearing=t.number(a,l,e)),i._pitching&&(n.pitch=t.number(s,p,e)),d)n.setLocationAtPoint(d,m);else{var h=n.zoomScale(n.zoom-o),f=u>o?Math.min(2,_):Math.max(.5,_),g=Math.pow(f,1-e),x=n.unproject(y.add(v.mult(e*g)).mult(h));n.setLocationAtPoint(n.renderWorldCopies?x.wrap():x,c)}i._fireMoveEvents(r)}),(function(){e.delayEndEvents?i._easeEndTimeoutID=setTimeout((function(){return i._afterEase(r)}),e.delayEndEvents):i._afterEase(r)}),e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,i=this._rotating,n=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),n&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},r.prototype.flyTo=function(e,r){var i=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),u="zoom"in e?t.clamp(+e.zoom,n.minZoom,n.maxZoom):o,l="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,c=n.zoomScale(u-o),h=n.centerPoint.add(t.Point.convert(e.offset)),f=n.pointLocation(h),d=t.LngLat.convert(e.center||f);this._normalizeCenter(d);var m=n.project(f),y=n.project(d).sub(m),v=e.curve,_=Math.max(n.width,n.height),g=_/c,x=y.mag();if("minZoom"in e){var b=t.clamp(Math.min(e.minZoom,o,u),n.minZoom,n.maxZoom),w=_/n.zoomScale(b-o);v=Math.sqrt(w/x*2)}var E=v*v;function S(t){var e=(g*g-_*_+(t?-1:1)*E*E*x*x)/(2*(t?g:_)*E*x);return Math.log(Math.sqrt(e*e+1)-e)}function T(t){return(Math.exp(t)-Math.exp(-t))/2}function A(t){return(Math.exp(t)+Math.exp(-t))/2}var I=S(0),z=function(t){return A(I)/A(I+v*t)},k=function(t){return _*((A(I)*(T(e=I+v*t)/A(e))-T(I))/E)/x;var e},C=(S(1)-I)/v;if(Math.abs(x)<1e-6||!isFinite(C)){if(Math.abs(_-g)<1e-6)return this.easeTo(e,r);var P=g<_?-1:1;C=Math.abs(Math.log(g/_))/v,k=function(){return 0},z=function(t){return Math.exp(P*v*t)}}if("duration"in e)e.duration=+e.duration;else{var M="screenSpeed"in e?+e.screenSpeed/v:+e.speed;e.duration=1e3*C/M}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==l,this._pitching=p!==s,this._prepareEase(r,!1),this._ease((function(e){var c=e*C,f=1/z(c);n.zoom=1===e?u:o+n.scaleZoom(f),i._rotating&&(n.bearing=t.number(a,l,e)),i._pitching&&(n.pitch=t.number(s,p,e));var v=1===e?d:n.unproject(m.add(y.mult(k(c))).mult(f));n.setLocationAtPoint(n.renderWorldCopies?v.wrap():v,h),i._fireMoveEvents(r)}),(function(){return i._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(e,r,i){!1===i.animate||0===i.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var i=Math.abs(e-r);return Math.abs(e-360-r)<i&&(e-=360),Math.abs(e+360-r)<i&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),zi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};zi.prototype.getDefaultPosition=function(){return"bottom-right"},zi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},zi.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},zi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:t.config.ACCESS_TOKEN}];if(e){var i=r.reduce((function(t,e,i){return e.value&&(t+=e.key+"="+e.value+(i<r.length-1?"&":"")),t}),"?");e.href=t.config.FEEDBACK_URL+"/"+i+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener"}},zi.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},zi.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map((function(t){return"string"!=typeof t?"":t}))):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var i in r){var n=r[i];if(n.used){var o=n.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort((function(t,e){return t.length-e.length})),(t=t.filter((function(e,r){for(var i=r+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0}))).length?(this._innerContainer.innerHTML=t.join(" | "),this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null}},zi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var ki=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};ki.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},ki.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},ki.prototype.getDefaultPosition=function(){return"bottom-left"},ki.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},ki.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},ki.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var Ci=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ci.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},Ci.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,i=e?this._queue.concat(e):this._queue;r<i.length;r+=1){var n=i[r];if(n.id===t)return void(n.cancelled=!0)}},Ci.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(!i.cancelled&&(i.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Ci.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Pi=t.window.HTMLImageElement,Mi=t.window.HTMLElement,Li={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,clickTolerance:3,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},Di=function(i){function n(e){var n=this;if(null!=(e=t.extend({},Li,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var o=new li(e.minZoom,e.maxZoom,e.renderWorldCopies);i.call(this,o,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new Ci,this._controls=[],this._mapId=t.uniqueId();var a=e.transformRequest;if(this._transformRequest=a?function(t,e){return a(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Mi))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return n._update(!1)})),this.on("moveend",(function(){return n._update(!1)})),this.on("zoom",(function(){return n._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var i=t.getCanvasContainer(),n=null,o=!1,a=null;for(var s in Ai)t[s]=new Ai[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(i,"mouseout",(function(e){t.fire(new hi("mouseout",t,e))})),r.addEventListener(i,"mousedown",(function(n){o=!0,a=r.mousePos(i,n);var s=new hi("mousedown",t,n);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(n),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(n),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(n))})),r.addEventListener(i,"mouseup",(function(e){var r=t.dragRotate.isActive();n&&!r&&t.fire(new hi("contextmenu",t,n)),n=null,o=!1,t.fire(new hi("mouseup",t,e))})),r.addEventListener(i,"mousemove",(function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==i;)r=r.parentNode;r===i&&t.fire(new hi("mousemove",t,e))}})),r.addEventListener(i,"mouseover",(function(e){for(var r=e.target;r&&r!==i;)r=r.parentNode;r===i&&t.fire(new hi("mouseover",t,e))})),r.addEventListener(i,"touchstart",(function(r){var i=new fi("touchstart",t,r);t.fire(i),i.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(i))}),{passive:!1}),r.addEventListener(i,"touchmove",(function(e){t.fire(new fi("touchmove",t,e))}),{passive:!1}),r.addEventListener(i,"touchend",(function(e){t.fire(new fi("touchend",t,e))})),r.addEventListener(i,"touchcancel",(function(e){t.fire(new fi("touchcancel",t,e))})),r.addEventListener(i,"click",(function(n){var o=r.mousePos(i,n);(o.equals(a)||o.dist(a)<e.clickTolerance)&&t.fire(new hi("click",t,n))})),r.addEventListener(i,"dblclick",(function(e){var r=new hi("dblclick",t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)})),r.addEventListener(i,"contextmenu",(function(e){var r=t.dragRotate.isActive();o||r?o&&(n=e):t.fire(new hi("contextmenu",t,e)),(t.dragRotate.isEnabled()||t.listens("contextmenu"))&&e.preventDefault()})),r.addEventListener(i,"wheel",(function(r){e.interactive&&t.stop();var i=new di("wheel",t,r);t.fire(i),i.defaultPrevented||t.scrollZoom.onWheel(r)}),{passive:!1})}(this,e),this._hash=e.hash&&(new ci).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new zi({customAttribution:e.customAttribution})),this.addControl(new ki,e.logoPosition),this.on("style.load",(function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)})),this.on("data",(function(e){n._update("style"===e.dataType),n.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){n.fire(new t.Event(e.dataType+"dataloading",e))}))}i&&(n.__proto__=i),n.prototype=Object.create(i&&i.prototype),n.prototype.constructor=n;var o={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype._getMapId=function(){return this._mapId},n.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=e.onAdd(this);this._controls.push(e);var n=this._controlPositions[r];return-1!==r.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},n.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),i=r[0],n=r[1];return this._resizeCanvas(i,n),this.transform.resize(i,n),this.painter.resize(i,n),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},n.prototype.getBounds=function(){return this.transform.getBounds()},n.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},n.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,r){var n=this;if(void 0===r)return i.prototype.on.call(this,t,e);var o=function(){var i;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){var a=n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[];a.length?o||(o=!0,r.call(n,new hi(t,n,i.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){(n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,r.call(n,new hi(t,n,i.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(n,new hi(t,n,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(i={},i[t]=function(t){var i=n.getLayer(e)?n.queryRenderedFeatures(t.point,{layers:[e]}):[];i.length&&(t.features=i,r.call(n,t),delete t.features)},i)}}();for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)this.on(a,o.delegates[a]);return this},n.prototype.off=function(t,e,r){if(void 0===r)return i.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var n=this._delegatedListeners[t],o=0;o<n.length;o++){var a=n[o];if(a.layer===e&&a.listener===r){for(var s in a.delegates)this.off(s,a.delegates[s]);return n.splice(o,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,r){if(!this.style)return[];var i;if(void 0!==r||void 0===e||e instanceof t.Point||Array.isArray(e)||(r=e,e=void 0),r=r||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])i=[t.Point.convert(e)];else{var n=t.Point.convert(e[0]),o=t.Point.convert(e[1]);i=[n,new t.Point(o.x,n.y),o,new t.Point(n.x,o.y),n]}return this.style.queryRenderedFeatures(i,r,this.transform)},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){return!1!==(r=t.extend({},{localIdeographFontFamily:Li.localIdeographFontFamily},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))},n.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new Re(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},n.prototype._diffStyle=function(e,r){var i=this;if("string"==typeof e){var n=t.normalizeStyleURL(e),o=this._transformRequest(n,t.ResourceType.Style);t.getJSON(o,(function(e,n){e?i.fire(new t.ErrorEvent(e)):n&&i._updateDiff(n,r)}))}else"object"==typeof e&&this._updateDiff(e,r)},n.prototype._updateDiff=function(e,r){try{this.style.setState(e)&&this._update(!0)}catch(i){t.warnOnce("Unable to perform style diff: "+(i.message||i.error||i)+". Rebuilding the style from scratch."),this._updateStyle(e,r)}},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0)},n.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var i in r){var n=r[i];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,i){void 0===i&&(i={});var n=i.pixelRatio;void 0===n&&(n=1);var o=i.sdf;if(void 0===o&&(o=!1),r instanceof Pi){var a=t.browser.getImageData(r),s=a.width,u=a.height,l=a.data;this.style.addImage(e,{data:new t.RGBAImage({width:s,height:u},l),pixelRatio:n,sdf:o,version:0})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var p=r.width,c=r.height,h=r.data,f=r;this.style.addImage(e,{data:new t.RGBAImage({width:p,height:c},new Uint8Array(h)),pixelRatio:n,sdf:o,version:0,userImage:f}),f.onAdd&&f.onAdd(this,e)}},n.prototype.updateImage=function(e,r){var i=this.style.getImage(e);if(!i)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var n=r instanceof Pi?t.browser.getImageData(r):r,o=n.width,a=n.height,s=n.data;if(void 0===o||void 0===a)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(o!==i.data.width||a!==i.data.height)return this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image")));var u=!(r instanceof Pi);i.data.replace(s,u),this.style.updateImage(e,i)},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},n.prototype.listImages=function(){return this.style.listImages()},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0)},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e,r){return void 0===r&&(r={}),this.style.setFilter(t,e,r),this._update(!0)},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0)},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setPaintProperty(t,e,r,i),this._update(!0)},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setLayoutProperty(t,e,r,i),this._update(!0)},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t,e){return void 0===e&&(e={}),this.style.setLight(t,e),this._update(!0)},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},n.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},n.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},n.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=r.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var i=this._containerDimensions();this._resizeCanvas(i[0],i[1]);var n=this._controlContainer=r.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((function(t){o[t]=r.create("div","mapboxgl-ctrl-"+t,n)}))},n.prototype._resizeCanvas=function(e,r){var i=t.window.devicePixelRatio||1;this._canvas.width=i*e,this._canvas.height=i*r,this._canvas.style.width=e+"px",this._canvas.style.height=r+"px"},n.prototype._setupPainter=function(){var r=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),i=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);i?(this.painter=new oi(i,this.transform),t.webpSupported.testSupport(i)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},n.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,i=t.browser.now();this.style.zoomHistory.update(r,i);var n=new t.EvaluationParameters(r,{now:i,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=n.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(n)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),this},n.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,r=this._controls;e<r.length;e+=1)r[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var i=this.painter.context.gl.getExtension("WEBGL_lose_context");i&&i.loseContext(),Bi(this._canvasContainer),Bi(this._controlContainer),Bi(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this.fire(new t.Event("remove"))},n.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame((function(){e._frame=null,e._render()})))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&&this.resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},Object.defineProperties(n.prototype,o),n}(Ii);function Bi(t){t.parentNode&&t.parentNode.removeChild(t)}var Ri={showCompass:!0,showZoom:!0},Fi=function(e){var i=this;this.options=t.extend({},Ri,e),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this.options.showZoom&&(t.bindAll(["_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom in",(function(){return i._map.zoomIn()})),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom out",(function(){return i._map.zoomOut()}))),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset bearing to north",(function(){return i._map.resetNorth()})),this._compassArrow=r.create("span","mapboxgl-ctrl-compass-arrow",this._compass))};function Oi(e,r,i){if(e=new t.LngLat(e.lng,e.lat),r){var n=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=i.locationPoint(e).distSqr(r);i.locationPoint(n).distSqr(r)<a?e=n:i.locationPoint(o).distSqr(r)<a&&(e=o)}for(;Math.abs(e.lng-i.center.lng)>180;){var s=i.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=i.width&&s.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e}Fi.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.classList.toggle("mapboxgl-ctrl-icon-disabled",t===this._map.getMaxZoom()),this._zoomOutButton.classList.toggle("mapboxgl-ctrl-icon-disabled",t===this._map.getMinZoom())},Fi.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Fi.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new _i(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},Fi.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},Fi.prototype._createButton=function(t,e,i){var n=r.create("button",t,this._container);return n.type="button",n.title=e,n.setAttribute("aria-label",e),n.addEventListener("click",i),n};var Ui={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Vi(t,e,r){var i=t.classList;for(var n in Ui)i.remove("mapboxgl-"+r+"-anchor-"+n);i.add("mapboxgl-"+r+"-anchor-"+e)}var Ni,ji=function(e){function i(i,n){if(e.call(this),(i instanceof t.window.HTMLElement||n)&&(i=t.extend({element:i},n)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._draggable=i&&i.draggable||!1,this._state="inactive",i&&i.element)this._element=i.element,this._offset=t.Point.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var o=r.createNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"display","block"),o.setAttributeNS(null,"height","41px"),o.setAttributeNS(null,"width","27px"),o.setAttributeNS(null,"viewBox","0 0 27 41");var a=r.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var u=r.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(3.0, 29.0)"),u.setAttributeNS(null,"fill","#000000");for(var l=0,p=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];l<p.length;l+=1){var c=p[l],h=r.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",c.rx),h.setAttributeNS(null,"ry",c.ry),u.appendChild(h)}var f=r.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"fill",this._color);var d=r.createNS("http://www.w3.org/2000/svg","path");d.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),f.appendChild(d);var m=r.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var y=r.createNS("http://www.w3.org/2000/svg","path");y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(y);var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(6.0, 7.0)"),v.setAttributeNS(null,"fill","#FFFFFF");var _=r.createNS("http://www.w3.org/2000/svg","g");_.setAttributeNS(null,"transform","translate(8.0, 8.0)");var g=r.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");var x=r.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),_.appendChild(g),_.appendChild(x),s.appendChild(u),s.appendChild(f),s.appendChild(m),s.appendChild(v),s.appendChild(_),o.appendChild(s),this._element.appendChild(o),this._offset=t.Point.convert(i&&i.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",(function(t){t.preventDefault()})),Vi(this._element,this._anchor,"marker"),this._popup=null}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},i.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},i.prototype.getElement=function(){return this._element},i.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},i.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},i.prototype.getPopup=function(){return this._popup},i.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},i.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,Ui[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px)"))},i.prototype.getOffset=function(){return this._offset},i.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},i.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},i.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},i.prototype.isDraggable=function(){return this._draggable},i}(t.Evented),qi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},Zi=function(e){function i(r){e.call(this),this.options=t.extend({},qi,r),t.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(e){var i;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i=this._setupUI,void 0!==Ni?i(Ni):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then((function(t){Ni="denied"!==t.state,i(Ni)})):(Ni=!!t.window.navigator.geolocation,i(Ni)),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),r.remove(this._container),this._map=void 0},i.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()},i.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,n=this._map.getBearing(),o=t.extend({bearing:n},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(i),o,{geolocateSource:!0})},i.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},i.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;!1!==e?(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new ji(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new t.Event("trackuserlocationend")))}))):t.warnOnce("Geolocation support is not available, the GeolocateControl will not be visible.")},i.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},i}(t.Evented),Gi={maxWidth:100,unit:"metric"},Xi=function(e){this.options=t.extend({},Gi,e),t.bindAll(["_onMove","setUnit"],this)};function Wi(t,e,r){var i,n,o,a,s,u,l=r&&r.maxWidth||100,p=t._container.clientHeight/2,c=(i=t.unproject([0,p]),n=t.unproject([l,p]),o=Math.PI/180,a=i.lat*o,s=n.lat*o,u=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((n.lng-i.lng)*o),6371e3*Math.acos(Math.min(u,1)));if(r&&"imperial"===r.unit){var h=3.2808*c;h>5280?Ki(e,l,h/5280,"mi"):Ki(e,l,h,"ft")}else r&&"nautical"===r.unit?Ki(e,l,c/1852,"nm"):Ki(e,l,c,"m")}function Ki(t,e,r,i){var n,o,a,s=(n=r,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=(a=n/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a))),u=s/r;"m"===i&&s>=1e3&&(s/=1e3,i="km"),t.style.width=e*u+"px",t.innerHTML=s+i}Xi.prototype.getDefaultPosition=function(){return"bottom-left"},Xi.prototype._onMove=function(){Wi(this._map,this._container,this.options)},Xi.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Xi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Xi.prototype.setUnit=function(t){this.options.unit=t,Wi(this._map,this._container,this.options)};var Hi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Hi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Hi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Hi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Hi.prototype._setupUI=function(){(this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer)).type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Hi.prototype._updateTitle=function(){var t=this._isFullscreen()?"Exit fullscreen":"Enter fullscreen";this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},Hi.prototype._isFullscreen=function(){return this._fullscreen},Hi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"),this._updateTitle())},Hi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Ji={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Yi=function(e){function i(r){e.call(this),this.options=t.extend(Object.create(Ji),r),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(e){return this._map=e,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this.fire(new t.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),this._map.off("remove",this.remove),delete this._map),this.fire(new t.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._update(),this},i.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},i.prototype.setHTML=function(e){var r,i=t.window.document.createDocumentFragment(),n=t.window.document.createElement("body");for(n.innerHTML=e;r=n.firstChild;)i.appendChild(r);return this.setDOMContent(i)},i.prototype.getMaxWidth=function(){return this._container.style.maxWidth},i.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))},i.prototype._update=function(){var e=this;if(this._map&&this._lngLat&&this._content){this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return e._container.classList.add(t)}))),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&(this._lngLat=Oi(this._lngLat,this._pos,this._map.transform));var i=this._pos=this._map.project(this._lngLat),n=this.options.anchor,o=function e(r){if(r){if("number"==typeof r){var i=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(i,i),"top-right":new t.Point(-i,i),bottom:new t.Point(0,-r),"bottom-left":new t.Point(i,-i),"bottom-right":new t.Point(-i,-i),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var n=t.Point.convert(r);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!n){var a,s=this._container.offsetWidth,u=this._container.offsetHeight;a=i.y+o.bottom.y<u?["top"]:i.y>this._map.transform.height-u?["bottom"]:[],i.x<s/2?a.push("left"):i.x>this._map.transform.width-s/2&&a.push("right"),n=0===a.length?"bottom":a.join("-")}var l=i.add(o[n]).round();r.setTransform(this._container,Ui[n]+" translate("+l.x+"px,"+l.y+"px)"),Vi(this._container,n,"popup")}},i.prototype._onClickClose=function(){this.remove()},i}(t.Evented),$i={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:Di,NavigationControl:Fi,GeolocateControl:Zi,AttributionControl:zi,ScaleControl:Xi,FullscreenControl:Hi,Popup:Yi,Marker:ji,Style:Re,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Lt.workerCount},set workerCount(t){Lt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},workerUrl:""};return $i})),r}()},283:function(t,e,r){}}]); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.rtl.css b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.rtl.css
new file mode 100644
index 00000000..0efbf5be
--- /dev/null
+++ b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.1239e27c56411388bad5.rtl.css
@@ -0,0 +1 @@
+.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass{cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;right:0}.mapboxgl-ctrl-top-right{top:0;left:0}.mapboxgl-ctrl-bottom-left{bottom:0;right:0}.mapboxgl-ctrl-bottom-right{left:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-group{border-radius:4px;overflow:hidden;background:#fff}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}.mapboxgl-ctrl-group>button{width:30px;height:30px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group>button+button{border-top:1px solid #ddd}.mapboxgl-ctrl>button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl>button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-icon,.mapboxgl-ctrl-icon>.mapboxgl-ctrl-compass-arrow{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mapboxgl-ctrl-icon{padding:5px}.mapboxgl-ctrl-icon.mapboxgl-ctrl-icon-disabled{opacity:.25;border-color:#373737}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 9c-.554 0-1 .446-1 1s.446 1 1 1h6c.554 0 1-.446 1-1s-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 6c-.554 0-1 .446-1 1v2H7c-.554 0-1 .446-1 1s.446 1 1 1h2v2c0 .554.446 1 1 1s1-.446 1-1v-2h2c.554 0 1-.446 1-1s-.446-1-1-1h-2V7c0-.554-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate:disabled{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 013.5 3.5 3.5 3.5 0 01-3.5 3.5A3.5 3.5 0 016.5 10 3.5 3.5 0 0110 6.5zm0 1.8A1.8 1.8 0 008.3 10a1.8 1.8 0 001.7 1.8 1.8 1.8 0 001.8-1.8A1.8 1.8 0 0010 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 010-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 005.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 009 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 003.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0011 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 110 7 3.5 3.5 0 010-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting{animation:mapboxgl-spin 2s linear infinite}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.mapboxgl-ctrl-icon.mapboxgl-ctrl-fullscreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 4c-.5 0-1 .5-1 1v4h.5l1.277-1.703c1 .763 2.059 1.66 3.114 2.703a30.38 30.38 0 01-3.11 2.707L4.5 11H4v4c0 .5.5 1 1 1h4v-.5l-1.727-1.295a35.498 35.498 0 012.688-3.137 30.312 30.312 0 012.746 3.15L11 15.5v.5h4c.5 0 1-.5 1-1v-4h-.5l-1.295 1.727a35.513 35.513 0 01-3.168-2.717 47.787 47.787 0 013.192-2.705L15.5 9h.5V5c0-.5-.5-1-1-1h-4v.5l1.703 1.277A32.243 32.243 0 019.971 8.92 47.761 47.761 0 017.305 5.77L9 4.5V4H5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-shrink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.242 3.492a.75.75 0 00-.523 1.29l2.246 2.245L4 8.5V9h4c.5 0 1-.5 1-1V4h-.5L7.018 5.955 4.78 3.72a.75.75 0 00-.539-.227zm11.492 0a.75.75 0 00-.515.227l-2.235 2.234L11.5 4H11v4c0 .5.5 1 1 1h4v-.5l-1.965-1.473 2.246-2.246a.75.75 0 00-.547-1.289zM4 11v.5l1.965 1.473-2.246 2.246A.751.751 0 104.78 16.28l2.246-2.246L8.5 16H9v-4c0-.5-.5-1-1-1H4zm8 0c-.5 0-1 .5-1 1v4h.5l1.473-1.965 2.246 2.246a.751.751 0 101.062-1.062l-2.246-2.246L16 11.5V11h-4z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass>.mapboxgl-ctrl-compass-arrow{width:20px;height:20px;margin:5px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' d='M6 9l4-8 4 8z'/%3E%3Cpath fill='%23CCC' d='M6 11l4 8 4-8z'/%3E%3C/svg%3E");background-repeat:no-repeat;display:inline-block}a.mapboxgl-ctrl-logo{width:85px;height:21px;margin:0 -3px -3px 0;display:block;background-repeat:no-repeat;cursor:pointer;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84.49 21'%3E%3Cpath class='st0' d='M83.25 14.26c0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 01-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.4-2.35a.34.34 0 01.3-.17H83c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.63 2.43 3.67c0 .05.01.09.01.13zM66.24 9.59c-.39-1.88-1.96-3.28-3.84-3.28-1.03 0-2.03.42-2.73 1.18V3.51c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23v-.73c.71.75 1.7 1.18 2.73 1.18 1.88 0 3.45-1.41 3.84-3.29.13-.6.13-1.21 0-1.8zM62.08 13c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51S63.41 13 62.08 13zM71.67 6.32a4.24 4.24 0 00-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 004.17 3.3c2.35 0 4.26-1.87 4.26-4.19s-1.9-4.17-4.27-4.17zm-.02 6.69c-1.33 0-2.42-1.12-2.42-2.51s1.08-2.52 2.42-2.52c1.33 0 2.42 1.12 2.42 2.51s-1.08 2.51-2.42 2.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M62.08 7.98c-1.32 0-2.39 1.11-2.41 2.48v.06c.01 1.38 1.08 2.48 2.41 2.48s2.42-1.12 2.42-2.51-1.09-2.51-2.42-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.57 1.17 1.27-.01.71-.52 1.27-1.17 1.27zM71.65 7.98c-1.33 0-2.42 1.12-2.42 2.51S70.32 13 71.65 13s2.42-1.12 2.42-2.51-1.08-2.51-2.42-2.51zm0 3.78c-.64 0-1.17-.57-1.17-1.27 0-.7.53-1.26 1.17-1.26s1.17.57 1.17 1.27c0 .71-.53 1.26-1.17 1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M45.74 6.53h-1.4c-.13 0-.23.11-.23.23v.73c-.71-.75-1.7-1.18-2.73-1.18-2.17 0-3.94 1.87-3.94 4.19s1.77 4.19 3.94 4.19c1.04 0 2.03-.43 2.73-1.19v.73c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23V6.74c0-.12-.09-.22-.22-.22 0 .01 0 .01-.01.01zm-1.62 4C44.11 11.9 43.03 13 41.71 13s-2.42-1.12-2.42-2.51 1.08-2.52 2.4-2.52c1.33 0 2.39 1.11 2.41 2.48l.02.08z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M41.71 7.98c-1.33 0-2.42 1.12-2.42 2.51S40.37 13 41.71 13s2.39-1.11 2.41-2.48v-.06c-.02-1.37-1.09-2.48-2.41-2.48zm-1.16 2.51c0-.7.52-1.27 1.17-1.27.64 0 1.14.56 1.17 1.25v.04c-.01.68-.53 1.24-1.17 1.24-.64 0-1.17-.56-1.17-1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M52.41 6.32c-1.03 0-2.03.42-2.73 1.18v-.75c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.1.23-.23V13.5c.71.75 1.7 1.18 2.74 1.18 2.17 0 3.94-1.87 3.94-4.19s-1.78-4.17-3.95-4.17zm-.33 6.69c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51S53.4 13 52.08 13.01z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M52.08 7.98c-1.32 0-2.39 1.11-2.42 2.48v.06c.03 1.38 1.1 2.48 2.42 2.48s2.41-1.12 2.41-2.51-1.09-2.51-2.41-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.58 1.17 1.27s-.53 1.27-1.17 1.27z' opacity='.35'/%3E%3Cpath class='st0' d='M36.08 14.24c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.17z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M84.34 13.59l-.07-.13-1.96-2.99 1.94-2.95c.44-.67.26-1.56-.41-2.02-.02 0-.03 0-.04-.01-.23-.15-.5-.22-.78-.22h-1.61c-.56 0-1.08.29-1.37.78l-.32.55-.34-.56c-.29-.48-.81-.77-1.38-.77h-1.6c-.6 0-1.13.37-1.35.92a5.59 5.59 0 00-7.26.45c-.35.34-.65.72-.89 1.14-.9-1.62-2.58-2.72-4.5-2.72-.5 0-1.01.07-1.48.23V3.51c0-.82-.66-1.48-1.47-1.48h-1.4c-.81 0-1.47.66-1.47 1.47v3.75a5.12 5.12 0 00-4.17-2.19c-.74 0-1.46.16-2.12.47-.24-.17-.54-.26-.84-.26h-1.4c-.45 0-.87.21-1.15.56a1.498 1.498 0 00-1.16-.55h-1.39c-.3 0-.6.09-.84.26-.67-.3-1.39-.46-2.12-.46-1.83 0-3.43 1-4.37 2.5-.2-.46-.48-.89-.83-1.25-.8-.81-1.89-1.25-3.02-1.25h-.01c-.89.01-1.75.33-2.46.88-.74-.57-1.64-.88-2.57-.88h-.03c-.29 0-.58.03-.86.11-.28.06-.56.16-.82.28-.21-.12-.45-.18-.7-.18h-1.4c-.82 0-1.47.66-1.47 1.47v7.5c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.48-.66 1.48-1.48V9.79c.03-.36.23-.59.36-.59.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47l-.01-4.57c.06-.32.25-.47.35-.47.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47v-.38a5.068 5.068 0 004.06 2.06c.74 0 1.46-.16 2.12-.47.24.17.54.26.84.26h1.39c.3 0 .6-.09.84-.26v2.01c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.47-.66 1.47-1.47v-1.77c.48.15.99.23 1.49.22 1.7 0 3.22-.87 4.17-2.2v.52c0 .82.66 1.47 1.47 1.47h1.4c.3 0 .6-.09.84-.26.66.31 1.39.47 2.12.47 1.92 0 3.6-1.1 4.49-2.73 1.54 2.65 4.95 3.53 7.58 1.98.18-.11.36-.22.53-.36.22.55.76.91 1.35.9H78c.56 0 1.08-.29 1.37-.78l.37-.61.37.61c.29.48.81.78 1.38.78h1.6c.81 0 1.46-.66 1.45-1.46-.05-.22-.1-.44-.2-.65zm-48.48.88h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74a.23.23 0 01.23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.01 5.16c.02.13-.09.23-.21.24zm10.11-.23c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23v-.74c-.7.76-1.69 1.18-2.72 1.18-2.17 0-3.94-1.87-3.94-4.19s1.77-4.19 3.94-4.19c1.03 0 2.02.43 2.73 1.18v-.74c0-.13.1-.23.23-.23h1.4c.12-.01.22.08.23.21V14.25h-.01v-.01zm6.44.43c-1.03 0-2.02-.43-2.73-1.18v3.97c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V6.75c0-.13.1-.22.23-.22h1.4c.13 0 .23.11.23.23v.73a3.73 3.73 0 012.73-1.18c2.17 0 3.94 1.86 3.94 4.18s-1.77 4.18-3.94 4.18zm13.83-3.28c-.39 1.87-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.73c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V3.51c0-.13.1-.23.23-.23h1.4c.13 0 .23.11.23.23v3.97a3.72 3.72 0 012.73-1.17c1.88 0 3.45 1.4 3.84 3.28.13.6.13 1.21 0 1.8zm5.43 3.29c-2 .01-3.73-1.35-4.17-3.3-.13-.59-.13-1.19 0-1.77a4.243 4.243 0 014.17-3.3c2.36 0 4.26 1.87 4.26 4.19s-1.9 4.18-4.26 4.18zm11.37-.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 01-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 01-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.41-2.36a.34.34 0 01.3-.17h1.61c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.38 3.64 2.43 3.67c.02.03.03.07.03.12-.03.13-.12.22-.24.22z' opacity='.35'/%3E%3Cpath class='st0' d='M10.5 1.24c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M10.5-.01C4.7-.01 0 4.7 0 10.49s4.7 10.5 10.5 10.5S21 16.29 21 10.49C20.99 4.7 16.3-.01 10.5-.01zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' opacity='.35'/%3E%3Cpath class='st1' d='M14.74 6.25c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M14.33 9.43l-1.86.91-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87z'/%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:21px;height:21px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath d='M10.5 1.25c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 013.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' class='st0' opacity='.9' fill='%23fff'/%3E%3Cpath d='M10.5 0C4.7 0 0 4.71 0 10.5S4.7 21 10.5 21 21 16.3 21 10.5C20.99 4.71 16.3 0 10.5 0zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' class='st1' opacity='.35'/%3E%3Cpath d='M14.74 6.26c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9z' class='st1' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M11.56 12.22l-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z'/%3E%3C/svg%3E")}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{min-height:20px;padding:0;margin:10px;position:relative;background-color:#fff;border-radius:12px 3px 3px 12px}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 4px 2px 24px;visibility:visible;margin-top:6px}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 24px 2px 4px;border-radius:3px 12px 12px 3px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact:after{content:"";cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' fill-rule='evenodd' d='M4 10a6 6 0 1012 0 6 6 0 10-12 0m5-3a1 1 0 102 0 1 1 0 10-2 0m0 3a1 1 0 112 0v3a1 1 0 11-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-right:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;right:0;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-close-button{position:absolute;left:0;top:0;border:0;border-radius:3px 0 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-marker{position:absolute;top:0;right:0;will-change:transform}.mapboxgl-user-location-dot{box-shadow:0 0 2px rgba(0,0,0,.25)}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;right:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box}@keyframes mapboxgl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;right:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}} \ No newline at end of file
diff --git a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.css b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.css
deleted file mode 100644
index 48a6f0fc..00000000
--- a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.css
+++ /dev/null
@@ -1 +0,0 @@
-.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass{cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;left:0}.mapboxgl-ctrl-top-right{top:0;right:0}.mapboxgl-ctrl-bottom-left{bottom:0;left:0}.mapboxgl-ctrl-bottom-right{right:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-group{border-radius:4px;overflow:hidden;background:#fff}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}.mapboxgl-ctrl-group>button{width:30px;height:30px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group>button+button{border-top:1px solid #ddd}.mapboxgl-ctrl>button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl>button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-icon,.mapboxgl-ctrl-icon>.mapboxgl-ctrl-compass-arrow{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mapboxgl-ctrl-icon{padding:5px}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 9c-.554 0-1 .446-1 1s.446 1 1 1h6c.554 0 1-.446 1-1s-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 6c-.554 0-1 .446-1 1v2H7c-.554 0-1 .446-1 1s.446 1 1 1h2v2c0 .554.446 1 1 1s1-.446 1-1v-2h2c.554 0 1-.446 1-1s-.446-1-1-1h-2V7c0-.554-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate:disabled{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting{animation:mapboxgl-spin 2s linear infinite}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.mapboxgl-ctrl-icon.mapboxgl-ctrl-fullscreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 4c-.5 0-1 .5-1 1v4h.5l1.277-1.703c1 .763 2.059 1.66 3.114 2.703a30.38 30.38 0 0 1-3.11 2.707L4.5 11H4v4c0 .5.5 1 1 1h4v-.5l-1.727-1.295a35.498 35.498 0 0 1 2.688-3.137 30.312 30.312 0 0 1 2.746 3.15L11 15.5v.5h4c.5 0 1-.5 1-1v-4h-.5l-1.295 1.727a35.513 35.513 0 0 1-3.168-2.717 47.787 47.787 0 0 1 3.192-2.705L15.5 9h.5V5c0-.5-.5-1-1-1h-4v.5l1.703 1.277A32.243 32.243 0 0 1 9.971 8.92 47.761 47.761 0 0 1 7.305 5.77L9 4.5V4H5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-shrink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.242 3.492a.75.75 0 0 0-.523 1.29l2.246 2.245L4 8.5V9h4c.5 0 1-.5 1-1V4h-.5L7.018 5.955 4.78 3.72a.75.75 0 0 0-.539-.227zm11.492 0a.75.75 0 0 0-.515.227l-2.235 2.234L11.5 4H11v4c0 .5.5 1 1 1h4v-.5l-1.965-1.473 2.246-2.246a.75.75 0 0 0-.547-1.289zM4 11v.5l1.965 1.473-2.246 2.246A.751.751 0 1 0 4.78 16.28l2.246-2.246L8.5 16H9v-4c0-.5-.5-1-1-1H4zm8 0c-.5 0-1 .5-1 1v4h.5l1.473-1.965 2.246 2.246a.751.751 0 1 0 1.062-1.062l-2.246-2.246L16 11.5V11h-4z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass>.mapboxgl-ctrl-compass-arrow{width:20px;height:20px;margin:5px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' d='M6 9l4-8 4 8z'/%3E%3Cpath fill='%23CCC' d='M6 11l4 8 4-8z'/%3E%3C/svg%3E");background-repeat:no-repeat;display:inline-block}a.mapboxgl-ctrl-logo{width:85px;height:21px;margin:0 0 -3px -3px;display:block;background-repeat:no-repeat;cursor:pointer;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84.49 21'%3E%3Cpath class='st0' d='M83.25 14.26c0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 0 1-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.4-2.35a.34.34 0 0 1 .3-.17H83c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.63 2.43 3.67c0 .05.01.09.01.13zM66.24 9.59c-.39-1.88-1.96-3.28-3.84-3.28-1.03 0-2.03.42-2.73 1.18V3.51c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23v-.73c.71.75 1.7 1.18 2.73 1.18 1.88 0 3.45-1.41 3.84-3.29.13-.6.13-1.21 0-1.8zM62.08 13c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51S63.41 13 62.08 13zM71.67 6.32a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19s-1.9-4.17-4.27-4.17zm-.02 6.69c-1.33 0-2.42-1.12-2.42-2.51s1.08-2.52 2.42-2.52c1.33 0 2.42 1.12 2.42 2.51s-1.08 2.51-2.42 2.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M62.08 7.98c-1.32 0-2.39 1.11-2.41 2.48v.06c.01 1.38 1.08 2.48 2.41 2.48s2.42-1.12 2.42-2.51-1.09-2.51-2.42-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.57 1.17 1.27-.01.71-.52 1.27-1.17 1.27zM71.65 7.98c-1.33 0-2.42 1.12-2.42 2.51S70.32 13 71.65 13s2.42-1.12 2.42-2.51-1.08-2.51-2.42-2.51zm0 3.78c-.64 0-1.17-.57-1.17-1.27 0-.7.53-1.26 1.17-1.26s1.17.57 1.17 1.27c0 .71-.53 1.26-1.17 1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M45.74 6.53h-1.4c-.13 0-.23.11-.23.23v.73c-.71-.75-1.7-1.18-2.73-1.18-2.17 0-3.94 1.87-3.94 4.19s1.77 4.19 3.94 4.19c1.04 0 2.03-.43 2.73-1.19v.73c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23V6.74c0-.12-.09-.22-.22-.22 0 .01 0 .01-.01.01zm-1.62 4C44.11 11.9 43.03 13 41.71 13s-2.42-1.12-2.42-2.51 1.08-2.52 2.4-2.52c1.33 0 2.39 1.11 2.41 2.48l.02.08z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M41.71 7.98c-1.33 0-2.42 1.12-2.42 2.51S40.37 13 41.71 13s2.39-1.11 2.41-2.48v-.06c-.02-1.37-1.09-2.48-2.41-2.48zm-1.16 2.51c0-.7.52-1.27 1.17-1.27.64 0 1.14.56 1.17 1.25v.04c-.01.68-.53 1.24-1.17 1.24-.64 0-1.17-.56-1.17-1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M52.41 6.32c-1.03 0-2.03.42-2.73 1.18v-.75c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.1.23-.23V13.5c.71.75 1.7 1.18 2.74 1.18 2.17 0 3.94-1.87 3.94-4.19s-1.78-4.17-3.95-4.17zm-.33 6.69c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51S53.4 13 52.08 13.01z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M52.08 7.98c-1.32 0-2.39 1.11-2.42 2.48v.06c.03 1.38 1.1 2.48 2.42 2.48s2.41-1.12 2.41-2.51-1.09-2.51-2.41-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.58 1.17 1.27s-.53 1.27-1.17 1.27z' opacity='.35'/%3E%3Cpath class='st0' d='M36.08 14.24c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.17z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M84.34 13.59l-.07-.13-1.96-2.99 1.94-2.95c.44-.67.26-1.56-.41-2.02-.02 0-.03 0-.04-.01-.23-.15-.5-.22-.78-.22h-1.61c-.56 0-1.08.29-1.37.78l-.32.55-.34-.56c-.29-.48-.81-.77-1.38-.77h-1.6c-.6 0-1.13.37-1.35.92a5.59 5.59 0 0 0-7.26.45c-.35.34-.65.72-.89 1.14-.9-1.62-2.58-2.72-4.5-2.72-.5 0-1.01.07-1.48.23V3.51c0-.82-.66-1.48-1.47-1.48h-1.4c-.81 0-1.47.66-1.47 1.47v3.75a5.12 5.12 0 0 0-4.17-2.19c-.74 0-1.46.16-2.12.47-.24-.17-.54-.26-.84-.26h-1.4c-.45 0-.87.21-1.15.56a1.498 1.498 0 0 0-1.16-.55h-1.39c-.3 0-.6.09-.84.26-.67-.3-1.39-.46-2.12-.46-1.83 0-3.43 1-4.37 2.5-.2-.46-.48-.89-.83-1.25-.8-.81-1.89-1.25-3.02-1.25h-.01c-.89.01-1.75.33-2.46.88-.74-.57-1.64-.88-2.57-.88h-.03c-.29 0-.58.03-.86.11-.28.06-.56.16-.82.28-.21-.12-.45-.18-.7-.18h-1.4c-.82 0-1.47.66-1.47 1.47v7.5c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.48-.66 1.48-1.48V9.79c.03-.36.23-.59.36-.59.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47l-.01-4.57c.06-.32.25-.47.35-.47.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47v-.38a5.068 5.068 0 0 0 4.06 2.06c.74 0 1.46-.16 2.12-.47.24.17.54.26.84.26h1.39c.3 0 .6-.09.84-.26v2.01c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.47-.66 1.47-1.47v-1.77c.48.15.99.23 1.49.22 1.7 0 3.22-.87 4.17-2.2v.52c0 .82.66 1.47 1.47 1.47h1.4c.3 0 .6-.09.84-.26.66.31 1.39.47 2.12.47 1.92 0 3.6-1.1 4.49-2.73 1.54 2.65 4.95 3.53 7.58 1.98.18-.11.36-.22.53-.36.22.55.76.91 1.35.9H78c.56 0 1.08-.29 1.37-.78l.37-.61.37.61c.29.48.81.78 1.38.78h1.6c.81 0 1.46-.66 1.45-1.46-.05-.22-.1-.44-.2-.65zm-48.48.88h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74a.23.23 0 0 1 .23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.01 5.16c.02.13-.09.23-.21.24zm10.11-.23c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23v-.74c-.7.76-1.69 1.18-2.72 1.18-2.17 0-3.94-1.87-3.94-4.19s1.77-4.19 3.94-4.19c1.03 0 2.02.43 2.73 1.18v-.74c0-.13.1-.23.23-.23h1.4c.12-.01.22.08.23.21V14.25h-.01v-.01zm6.44.43c-1.03 0-2.02-.43-2.73-1.18v3.97c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V6.75c0-.13.1-.22.23-.22h1.4c.13 0 .23.11.23.23v.73a3.73 3.73 0 0 1 2.73-1.18c2.17 0 3.94 1.86 3.94 4.18s-1.77 4.18-3.94 4.18zm13.83-3.28c-.39 1.87-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.73c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V3.51c0-.13.1-.23.23-.23h1.4c.13 0 .23.11.23.23v3.97a3.72 3.72 0 0 1 2.73-1.17c1.88 0 3.45 1.4 3.84 3.28.13.6.13 1.21 0 1.8zm5.43 3.29c-2 .01-3.73-1.35-4.17-3.3-.13-.59-.13-1.19 0-1.77a4.243 4.243 0 0 1 4.17-3.3c2.36 0 4.26 1.87 4.26 4.19s-1.9 4.18-4.26 4.18zm11.37-.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 0 1-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.41-2.36a.34.34 0 0 1 .3-.17h1.61c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.38 3.64 2.43 3.67c.02.03.03.07.03.12-.03.13-.12.22-.24.22z' opacity='.35'/%3E%3Cpath class='st0' d='M10.5 1.24c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M10.5-.01C4.7-.01 0 4.7 0 10.49s4.7 10.5 10.5 10.5S21 16.29 21 10.49C20.99 4.7 16.3-.01 10.5-.01zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' opacity='.35'/%3E%3Cpath class='st1' d='M14.74 6.25c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M14.33 9.43l-1.86.91-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87z'/%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:21px;height:21px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath d='M10.5 1.25c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' class='st0' opacity='.9' fill='%23fff'/%3E%3Cpath d='M10.5 0C4.7 0 0 4.71 0 10.5S4.7 21 10.5 21 21 16.3 21 10.5C20.99 4.71 16.3 0 10.5 0zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' class='st1' opacity='.35'/%3E%3Cpath d='M14.74 6.26c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9z' class='st1' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M11.56 12.22l-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z'/%3E%3C/svg%3E")}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{margin:10px;position:relative;background-color:#fff;border-radius:3px 12px 12px 3px}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 24px 2px 4px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 4px 2px 24px;border-radius:12px 3px 3px 12px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact:after{content:"";cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' fill-rule='evenodd' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-left:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;left:0;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;border:0;border-radius:0 3px 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-marker{position:absolute;top:0;left:0;will-change:transform}.mapboxgl-user-location-dot{box-shadow:0 0 2px rgba(0,0,0,.25)}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box}@keyframes mapboxgl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;left:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}} \ No newline at end of file
diff --git a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.js b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.js
deleted file mode 100644
index 2485c7b4..00000000
--- a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.js
+++ /dev/null
@@ -1 +0,0 @@
-(window.webpackJsonp=window.webpackJsonp||[]).push([[10],{275:function(t,e,r){t.exports=function(){"use strict";var t,e,r;function i(i,n){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),(r=n(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else e=n;else t=n}return i(0,function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=i;function i(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var r,i,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var n=o;function o(t,e){this.x=t,this.y=e}function a(t,e){if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!a(t[r],e[r]))return!1;return!0}if("object"==typeof t&&null!==t&&null!==e){if("object"!=typeof e)return!1;if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var i in t)if(!a(t[i],e[i]))return!1;return!0}return t===e}function s(t,e,i,n){var o=new r(t,e,i,n);return function(t){return o.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,r=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=r,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),i=e*this.x-r*this.y,n=r*this.x+e*this.y;return this.x=i,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.x+r*(this.x-e.x)-i*(this.y-e.y),o=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=n,this.y=o,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var u=s(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function p(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function c(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}var h=1;function f(){return h++}function d(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function m(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function y(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function _(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var i={};for(var n in t)i[n]=e.call(r||this,t[n],n,t);return i}function g(t,e,r){var i={};for(var n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?v(t,x):t}var b={};function w(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function E(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function S(t){for(var e=0,r=0,i=t.length,n=i-1,o=void 0,a=void 0;r<i;n=r++)o=t[r],e+=((a=t[n]).x-o.x)*(o.y+a.y);return e}function T(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var A,z,I=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),C=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,k=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,P={now:I,frame:function(t){var e=C(t);return{cancel:function(){return k(e)}}},getImageData:function(t){var e=self.document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("failed to create canvas 2d context");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height),r.getImageData(0,0,t.width,t.height)},resolveURL:function(t){var e=self.document.createElement("a");return e.href=t,e.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio}},M={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},L={supported:!1,testSupport:function(t){!D&&z&&(R?B(t):A=t)}},D=!1,R=!1;function B(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,z),t.isContextLost())return;L.supported=!0}catch(t){}t.deleteTexture(e),D=!0}self.document&&((z=self.document.createElement("img")).onload=function(){A&&B(A),A=null,R=!0},z.onerror=function(){D=!0,A=null},z.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var F="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes";function O(t,e){var r=X(M.API_URL);if(t.protocol=r.protocol,t.authority=r.authority,"/"!==r.path&&(t.path=""+r.path+t.path),!M.REQUIRE_ACCESS_TOKEN)return W(t);if(!(e=e||M.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+F);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+F);return t.params.push("access_token="+e),W(t)}function U(t){return 0===t.indexOf("mapbox:")}var V=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function N(t){return V.test(t)}var j=/(\.(png|jpg)\d*)(?=$)/,q=/\.[\w]+$/,Z=function(t){var e=X(t);if(!e.path.match(/(^\/v4\/)/)||!e.path.match(q))return t;var r="mapbox://tiles/";r+=e.path.replace("/v4/","");var i=e.params.filter(function(t){return!t.match(/^access_token=/)});return i.length&&(r+="?"+i.join("&")),r},G=/^(\w+):\/\/([^\/?]*)(\/[^?]+)?\??(.+)?/;function X(t){var e=t.match(G);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function W(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function K(t){if(!t)return null;var e,r=t.split(".");if(!r||3!==r.length)return null;try{return JSON.parse((e=r[1],decodeURIComponent(self.atob(e).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join(""))))}catch(t){return null}}var H=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};H.prototype.getStorageKey=function(t){var e,r=K(M.ACCESS_TOKEN),i="";return r&&r.u?(e=r.u,i=self.btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode(Number("0x"+e))}))):i=M.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+i:"mapbox.eventData:"+i},H.prototype.fetchEventData=function(){var t=T("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var i=self.localStorage.getItem(e);i&&(this.eventData=JSON.parse(i));var n=self.localStorage.getItem(r);n&&(this.anonId=n)}catch(t){w("Unable to read from LocalStorage")}},H.prototype.saveEventData=function(){var t=T("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{self.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){w("Unable to write to LocalStorage")}},H.prototype.processRequests=function(){},H.prototype.postEvent=function(t,e,r){var i=this;if(M.EVENTS_URL){var n=X(M.EVENTS_URL);n.params.push("access_token="+(M.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"0.53.1",userId:this.anonId},a=e?c(o,e):o,s={url:W(n),headers:{"Content-Type":"text/plain"},body:JSON.stringify([a])};this.pendingRequest=lt(s,function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests()})}},H.prototype.queueRequest=function(t){this.queue.push(t),this.processRequests()};var Y=function(t){function e(){t.call(this,"map.load"),this.success={}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postMapLoadEvent=function(t,e){M.EVENTS_URL&&M.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return U(t)||N(t)})&&this.queueRequest({id:e,timestamp:Date.now()})},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){var e=this.queue.shift(),r=e.id,i=e.timestamp;r&&this.success[r]||(this.anonId||this.fetchEventData(),m(this.anonId)||(this.anonId=d()),this.postEvent(i,{},function(e){e||r&&(t.success[r]=!0)}))}},e}(H),J=new(function(t){function e(){t.call(this,"appUserTurnstile")}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.postTurnstileEvent=function(t){M.EVENTS_URL&&M.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return U(t)||N(t)})&&this.queueRequest(Date.now())},e.prototype.processRequests=function(){var t=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var e=K(M.ACCESS_TOKEN),r=e?e.u:M.ACCESS_TOKEN,i=r!==this.eventData.tokenU;m(this.anonId)||(this.anonId=d(),i=!0);var n=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),a=new Date(n),s=(n-this.eventData.lastSuccess)/864e5;i=i||s>=1||s<-1||o.getDate()!==a.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(n,{"enabled.telemetry":!1},function(e){e||(t.eventData.lastSuccess=n,t.eventData.tokenU=r)})}},e}(H)),$=J.postTurnstileEvent.bind(J),Q=new Y,tt=Q.postMapLoadEvent.bind(Q),et={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(et);var rt=function(t){function e(e,r,i){401===r&&N(i)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=i,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error);function it(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}var nt,ot,at=it()?function(){return self.worker&&self.worker.referrer}:function(){var t=self.location.origin;if(t&&"null"!==t&&"file://"!==t)return t+self.location.pathname},st=function(t,e){if(!/^file:/.test(t.url)){if(self.fetch&&self.Request&&self.AbortController)return function(t,e){var r=new self.AbortController,i=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:at(),signal:r.signal});return"json"===t.type&&i.headers.set("Accept","application/json"),self.fetch(i).then(function(r){r.ok?r[t.type||"text"]().then(function(t){e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires"))}).catch(function(t){return e(new Error(t.message))}):e(new rt(r.statusText,r.status,t.url))}).catch(function(t){20!==t.code&&e(new Error(t.message))}),{cancel:function(){return r.abort()}}}(t,e);if(it()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e)}return function(t,e){var r=new self.XMLHttpRequest;for(var i in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(i,t.headers[i]);return"json"===t.type&&r.setRequestHeader("Accept","application/json"),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var i=r.response;if("json"===t.type)try{i=JSON.parse(r.response)}catch(t){return e(t)}e(null,i,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new rt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},ut=function(t,e){return st(c(t,{type:"arrayBuffer"}),e)},lt=function(t,e){return st(c(t,{method:"POST"}),e)};nt=[],ot=0;var pt=function(t,e){if(ot>=M.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return nt.push(r),r}ot++;var i=!1,n=function(){if(!i)for(i=!0,ot--;nt.length&&ot<M.MAX_PARALLEL_IMAGE_REQUESTS;){var t=nt.shift(),e=t.requestParameters,r=t.callback;t.cancelled||(t.cancel=pt(e,r).cancel)}},o=ut(t,function(t,r,i,o){if(n(),t)e(t);else if(r){var a=new self.Image,s=self.URL||self.webkitURL;a.onload=function(){e(null,a),s.revokeObjectURL(a.src)},a.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var u=new self.Blob([new Uint8Array(r)],{type:"image/png"});a.cacheControl=i,a.expires=o,a.src=r.byteLength?s.createObjectURL(u):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}});return{cancel:function(){o.cancel(),n()}}};function ct(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function ht(t,e,r){if(r&&r[t]){var i=r[t].indexOf(e);-1!==i&&r[t].splice(i,1)}}var ft=function(t,e){void 0===e&&(e={}),c(this,e),this.type=t},dt=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,"error",c({error:e},r))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ft),mt=function(){};mt.prototype.on=function(t,e){return this._listeners=this._listeners||{},ct(t,e,this._listeners),this},mt.prototype.off=function(t,e){return ht(t,e,this._listeners),ht(t,e,this._oneTimeListeners),this},mt.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},ct(t,e,this._oneTimeListeners),this},mt.prototype.fire=function(t,e){"string"==typeof t&&(t=new ft(t,e||{}));var r=t.type;if(this.listens(r)){t.target=this;for(var i=0,n=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];i<n.length;i+=1)n[i].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];o<a.length;o+=1){var s=a[o];ht(r,s,this._oneTimeListeners),s.call(this,t)}var u=this._eventedParent;u&&(c(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),u.fire(t))}else t instanceof dt&&console.error(t.error);return this},mt.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},mt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var yt={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"string",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:22,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"string",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}}},_t=function(t,e,r,i){this.message=(t?t+": ":"")+r,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function vt(t){var e=t.key,r=t.value;return r?[new _t(e,r,"constants have been deprecated as of v8")]:[]}function gt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}function xt(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function bt(t){return Array.isArray(t)?t.map(bt):xt(t)}var wt=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Error),Et=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,i=e;r<i.length;r+=1){var n=i[r],o=n[0],a=n[1];this.bindings[o]=a}};Et.prototype.concat=function(t){return new Et(this,t)},Et.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Et.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var St={kind:"null"},Tt={kind:"number"},At={kind:"string"},zt={kind:"boolean"},It={kind:"color"},Ct={kind:"object"},kt={kind:"value"},Pt={kind:"collator"},Mt={kind:"formatted"};function Lt(t,e){return{kind:"array",itemType:t,N:e}}function Dt(t){if("array"===t.kind){var e=Dt(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Rt=[St,Tt,At,zt,It,Mt,Ct,Lt(kt)];function Bt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Bt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,i=Rt;r<i.length;r+=1)if(!Bt(i[r],e))return null}return"Expected "+Dt(t)+" but found "+Dt(e)+" instead."}var Ft=e(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return t<0?0:t>1?1:t}function o(t){return"%"===t[t.length-1]?i(parseFloat(t)/100*255):i(parseInt(t))}function a(t){return"%"===t[t.length-1]?n(parseFloat(t)/100):n(parseFloat(t))}function s(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,n=t.replace(/ /g,"").toLowerCase();if(n in r)return r[n].slice();if("#"===n[0])return 4===n.length?(e=parseInt(n.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===n.length&&(e=parseInt(n.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var u=n.indexOf("("),l=n.indexOf(")");if(-1!==u&&l+1===n.length){var p=n.substr(0,u),c=n.substr(u+1,l-(u+1)).split(","),h=1;switch(p){case"rgba":if(4!==c.length)return null;h=a(c.pop());case"rgb":return 3!==c.length?null:[o(c[0]),o(c[1]),o(c[2]),h];case"hsla":if(4!==c.length)return null;h=a(c.pop());case"hsl":if(3!==c.length)return null;var f=(parseFloat(c[0])%360+360)%360/360,d=a(c[1]),m=a(c[2]),y=m<=.5?m*(d+1):m+d-m*d,_=2*m-y;return[i(255*s(_,y,f+1/3)),i(255*s(_,y,f)),i(255*s(_,y,f-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,Ot=function(t,e,r,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=r,this.a=i};Ot.parse=function(t){if(t){if(t instanceof Ot)return t;if("string"==typeof t){var e=Ft(t);if(e)return new Ot(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Ot.prototype.toString=function(){var t=this.toArray(),e=t[0],r=t[1],i=t[2],n=t[3];return"rgba("+Math.round(e)+","+Math.round(r)+","+Math.round(i)+","+n+")"},Ot.prototype.toArray=function(){var t=this.r,e=this.g,r=this.b,i=this.a;return 0===i?[0,0,0,0]:[255*t/i,255*e/i,255*r/i,i]},Ot.black=new Ot(0,0,0,1),Ot.white=new Ot(1,1,1,1),Ot.transparent=new Ot(0,0,0,0),Ot.red=new Ot(1,0,0,1);var Ut=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Ut.prototype.compare=function(t,e){return this.collator.compare(t,e)},Ut.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Vt=function(t,e,r){this.text=t,this.scale=e,this.fontStack=r},Nt=function(t){this.sections=t};function jt(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,r,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function qt(t){if(null===t)return St;if("string"==typeof t)return At;if("boolean"==typeof t)return zt;if("number"==typeof t)return Tt;if(t instanceof Ot)return It;if(t instanceof Ut)return Pt;if(t instanceof Nt)return Mt;if(Array.isArray(t)){for(var e,r=t.length,i=0,n=t;i<n.length;i+=1){var o=qt(n[i]);if(e){if(e===o)continue;e=kt;break}e=o}return Lt(e||kt,r)}return Ct}function Zt(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Ot||t instanceof Nt?t.toString():JSON.stringify(t)}Nt.fromString=function(t){return new Nt([new Vt(t,null,null)])},Nt.prototype.toString=function(){return this.sections.map(function(t){return t.text}).join("")},Nt.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t.push(i.text);var n={};i.fontStack&&(n["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(n["font-scale"]=i.scale),t.push(n)}return t};var Gt=function(t,e){this.type=t,this.value=e};Gt.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!function t(e){if(null===e)return!0;if("string"==typeof e)return!0;if("boolean"==typeof e)return!0;if("number"==typeof e)return!0;if(e instanceof Ot)return!0;if(e instanceof Ut)return!0;if(e instanceof Nt)return!0;if(Array.isArray(e)){for(var r=0,i=e;r<i.length;r+=1)if(!t(i[r]))return!1;return!0}if("object"==typeof e){for(var n in e)if(!t(e[n]))return!1;return!0}return!1}(t[1]))return e.error("invalid value");var r=t[1],i=qt(r),n=e.expectedType;return"array"!==i.kind||0!==i.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(i=n),new Gt(i,r)},Gt.prototype.evaluate=function(){return this.value},Gt.prototype.eachChild=function(){},Gt.prototype.possibleOutputs=function(){return[this.value]},Gt.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Ot?["rgba"].concat(this.value.toArray()):this.value instanceof Nt?this.value.serialize():this.value};var Xt=function(t){this.name="ExpressionEvaluationError",this.message=t};Xt.prototype.toJSON=function(){return this.message};var Wt={string:At,number:Tt,boolean:zt,object:Ct},Kt=function(t,e){this.type=t,this.args=e};Kt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,i=1,n=t[0];if("array"===n){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in Wt)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=Wt[s],i++}else o=kt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],i++}r=Lt(o,a)}else r=Wt[n];for(var u=[];i<t.length;i++){var l=e.parse(t[i],i,kt);if(!l)return null;u.push(l)}return new Kt(r,u)},Kt.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Bt(this.type,qt(r)))return r;if(e===this.args.length-1)throw new Xt("Expected value to be of type "+Dt(this.type)+", but found "+Dt(qt(r))+" instead.")}return null},Kt.prototype.eachChild=function(t){this.args.forEach(t)},Kt.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Kt.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var i=t.N;("number"==typeof i||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var Ht=function(t){this.type=Mt,this.sections=t};Ht.parse=function(t,e){if(t.length<3)return e.error("Expected at least two arguments.");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");for(var r=[],i=1;i<t.length-1;i+=2){var n=e.parse(t[i],1,kt);if(!n)return null;var o=n.type.kind;if("string"!==o&&"value"!==o&&"null"!==o)return e.error("Formatted text type must be 'string', 'value', or 'null'.");var a=t[i+1];if("object"!=typeof a||Array.isArray(a))return e.error("Format options argument must be an object.");var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Tt)))return null;var u=null;if(a["text-font"]&&!(u=e.parse(a["text-font"],1,Lt(At))))return null;r.push({text:n,scale:s,font:u})}return new Ht(r)},Ht.prototype.evaluate=function(t){return new Nt(this.sections.map(function(e){return new Vt(Zt(e.text.evaluate(t)),e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null)}))},Ht.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t(i.text),i.scale&&t(i.scale),i.font&&t(i.font)}},Ht.prototype.possibleOutputs=function(){return[void 0]},Ht.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t.push(i.text.serialize());var n={};i.scale&&(n["font-scale"]=i.scale.serialize()),i.font&&(n["text-font"]=i.font.serialize()),t.push(n)}return t};var Yt={"to-boolean":zt,"to-color":It,"to-number":Tt,"to-string":At},Jt=function(t,e){this.type=t,this.args=e};Jt.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var i=Yt[r],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,kt);if(!a)return null;n.push(a)}return new Jt(i,n)},Jt.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,i=0,n=this.args;i<n.length;i+=1){if(r=null,(e=n[i].evaluate(t))instanceof Ot)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":jt(e[0],e[1],e[2],e[3])))return new Ot(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new Xt(r||"Could not parse color from value '"+("string"==typeof e?e:JSON.stringify(e))+"'")}if("number"===this.type.kind){for(var a=null,s=0,u=this.args;s<u.length;s+=1){if(null===(a=u[s].evaluate(t)))return 0;var l=Number(a);if(!isNaN(l))return l}throw new Xt("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?Nt.fromString(Zt(this.args[0].evaluate(t))):Zt(this.args[0].evaluate(t))},Jt.prototype.eachChild=function(t){this.args.forEach(t)},Jt.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Jt.prototype.serialize=function(){if("formatted"===this.type.kind)return new Ht([{text:this.args[0],scale:null,font:null}]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var $t=["Unknown","Point","LineString","Polygon"],Qt=function(){this.globals=null,this.feature=null,this.featureState=null,this._parseColorCache={}};Qt.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Qt.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?$t[this.feature.type]:this.feature.type:null},Qt.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Qt.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Ot.parse(t)),e};var te=function(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i};te.prototype.evaluate=function(t){return this._evaluate(t,this.args)},te.prototype.eachChild=function(t){this.args.forEach(t)},te.prototype.possibleOutputs=function(){return[void 0]},te.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},te.parse=function(t,e){var r,i=t[0],n=te.definitions[i];if(!n)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),u=null,l=0,p=s;l<p.length;l+=1){var c=p[l],h=c[0],f=c[1];u=new ae(e.registry,e.path,null,e.scope);for(var d=[],m=!1,y=1;y<t.length;y++){var _=t[y],v=Array.isArray(h)?h[y-1]:h.type,g=u.parse(_,1+d.length,v);if(!g){m=!0;break}d.push(g)}if(!m)if(Array.isArray(h)&&h.length!==d.length)u.error("Expected "+h.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=d[x];u.concat(x+1).checkSubtype(b,w.type)}if(0===u.errors.length)return new te(i,o,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,u.errors);else{for(var E=(s.length?s:a).map(function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Dt).join(", ")+")":"("+Dt(e.type)+"...)"}).join(" | "),S=[],T=1;T<t.length;T++){var A=e.parse(t[T],1+S.length);if(!A)return null;S.push(Dt(A.type))}e.error("Expected arguments of type "+E+", but found ("+S.join(", ")+") instead.")}return null},te.register=function(t,e){for(var r in te.definitions=e,e)t[r]=te};var ee=function(t,e,r){this.type=Pt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function re(t){if(t instanceof te){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}var e=!0;return t.eachChild(function(t){e&&!re(t)&&(e=!1)}),e}function ie(t){if(t instanceof te&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild(function(t){e&&!ie(t)&&(e=!1)}),e}function ne(t,e){if(t instanceof te&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!ne(t,e)&&(r=!1)}),r}ee.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,zt);if(!i)return null;var n=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,zt);if(!n)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,At))?null:new ee(i,n,o)},ee.prototype.evaluate=function(t){return new Ut(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ee.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ee.prototype.possibleOutputs=function(){return[void 0]},ee.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var oe=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};oe.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new oe(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},oe.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},oe.prototype.eachChild=function(){},oe.prototype.possibleOutputs=function(){return[void 0]},oe.prototype.serialize=function(){return["var",this.name]};var ae=function(t,e,r,i,n){void 0===e&&(e=[]),void 0===i&&(i=new Et),void 0===n&&(n=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=i,this.errors=n,this.expectedType=r};function se(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(r=t[a=Math.floor((n+o)/2)],i=t[a+1],e===r||e>r&&e<i)return a;if(r<e)n=a+1;else{if(!(r>e))throw new Xt("Input is not a number.");o=a-1}}return Math.max(a-1,0)}ae.prototype.parse=function(t,e,r,i,n){return void 0===n&&(n={}),e?this.concat(e,r,i)._parse(t,n):this._parse(t,n)},ae.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new Kt(e,[t]):"coerce"===r?new Jt(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=t[0];if("string"!=typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var n=this.registry[i];if(n){var o=n.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof Gt)&&function t(e){if(e instanceof oe)return t(e.boundExpression);if(e instanceof te&&"error"===e.name)return!1;if(e instanceof ee)return!1;var r=e instanceof Jt||e instanceof Kt,i=!0;return e.eachChild(function(e){i=r?i&&t(e):i&&e instanceof Gt}),!!i&&re(e)&&ne(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var u=new Qt;try{o=new Gt(o.type,o.evaluate(u))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return void 0===t?this.error("'undefined' value invalid. Use null instead."):"object"==typeof t?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof t+" instead.")},ae.prototype.concat=function(t,e,r){var i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new ae(this.registry,i,e||null,n,this.errors)},ae.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var i=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new wt(i,t))},ae.prototype.checkSubtype=function(t,e){var r=Bt(t,e);return r&&this.error(r),r};var ue=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,n=r;i<n.length;i+=1){var o=n[i],a=o[0],s=o[1];this.labels.push(a),this.outputs.push(s)}};function le(t,e,r){return t*(1-r)+e*r}ue.parse=function(t,e){var r=t[1],i=t.slice(2);if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(r=e.parse(r,1,Tt)))return null;var n=[],o=null;e.expectedType&&"value"!==e.expectedType.kind&&(o=e.expectedType),i.unshift(-1/0);for(var a=0;a<i.length;a+=2){var s=i[a],u=i[a+1],l=a+1,p=a+2;if("number"!=typeof s)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(n.length&&n[n.length-1][0]>=s)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(u,p,o);if(!c)return null;o=o||c.type,n.push([s,c])}return new ue(o,r,n)},ue.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;return i>=e[n-1]?r[n-1].evaluate(t):r[se(e,i)].evaluate(t)},ue.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},ue.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}))},ue.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var pe=Object.freeze({number:le,color:function(t,e,r){return new Ot(le(t.r,e.r,r),le(t.g,e.g,r),le(t.b,e.b,r),le(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,i){return le(t,e[i],r)})}}),ce=.95047,he=1,fe=1.08883,de=4/29,me=6/29,ye=3*me*me,_e=me*me*me,ve=Math.PI/180,ge=180/Math.PI;function xe(t){return t>_e?Math.pow(t,1/3):t/ye+de}function be(t){return t>me?t*t*t:ye*(t-de)}function we(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ee(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Se(t){var e=Ee(t.r),r=Ee(t.g),i=Ee(t.b),n=xe((.4124564*e+.3575761*r+.1804375*i)/ce),o=xe((.2126729*e+.7151522*r+.072175*i)/he);return{l:116*o-16,a:500*(n-o),b:200*(o-xe((.0193339*e+.119192*r+.9503041*i)/fe)),alpha:t.a}}function Te(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=he*be(e),r=ce*be(r),i=fe*be(i),new Ot(we(3.2404542*r-1.5371385*e-.4985314*i),we(-.969266*r+1.8760108*e+.041556*i),we(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}function Ae(t,e,r){var i=e-t;return t+r*(i>180||i<-180?i-360*Math.round(i/360):i)}var ze={forward:Se,reverse:Te,interpolate:function(t,e,r){return{l:le(t.l,e.l,r),a:le(t.a,e.a,r),b:le(t.b,e.b,r),alpha:le(t.alpha,e.alpha,r)}}},Ie={forward:function(t){var e=Se(t),r=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*ge;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:r,alpha:t.a}},reverse:function(t){var e=t.h*ve,r=t.c;return Te({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:Ae(t.h,e.h,r),c:le(t.c,e.c,r),l:le(t.l,e.l,r),alpha:le(t.alpha,e.alpha,r)}}},Ce=Object.freeze({lab:ze,hcl:Ie}),ke=function(t,e,r,i,n){this.type=t,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(var o=0,a=n;o<a.length;o+=1){var s=a[o],u=s[0],l=s[1];this.labels.push(u),this.outputs.push(l)}};function Pe(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}ke.interpolationFactor=function(t,e,i,n){var o=0;if("exponential"===t.name)o=Pe(e,t.base,i,n);else if("linear"===t.name)o=Pe(e,1,i,n);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new r(a[0],a[1],a[2],a[3]).solve(Pe(e,1,i,n))}return o},ke.parse=function(t,e){var r=t[0],i=t[1],n=t[2],o=t.slice(3);if(!Array.isArray(i)||0===i.length)return e.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){var a=i[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:a}}else{if("cubic-bezier"!==i[0])return e.error("Unknown interpolation type "+String(i[0]),1,0);var s=i.slice(1);if(4!==s.length||s.some(function(t){return"number"!=typeof t||t<0||t>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,2,Tt)))return null;var u=[],l=null;"interpolate-hcl"===r||"interpolate-lab"===r?l=It:e.expectedType&&"value"!==e.expectedType.kind&&(l=e.expectedType);for(var p=0;p<o.length;p+=2){var c=o[p],h=o[p+1],f=p+3,d=p+4;if("number"!=typeof c)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(u.length&&u[u.length-1][0]>=c)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,l);if(!m)return null;l=l||m.type,u.push([c,m])}return"number"===l.kind||"color"===l.kind||"array"===l.kind&&"number"===l.itemType.kind&&"number"==typeof l.N?new ke(l,r,i,n,u):e.error("Type "+Dt(l)+" is not interpolatable.")},ke.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);var o=se(e,i),a=e[o],s=e[o+1],u=ke.interpolationFactor(this.interpolation,i,a,s),l=r[o].evaluate(t),p=r[o+1].evaluate(t);return"interpolate"===this.operator?pe[this.type.kind.toLowerCase()](l,p,u):"interpolate-hcl"===this.operator?Ie.reverse(Ie.interpolate(Ie.forward(l),Ie.forward(p),u)):ze.reverse(ze.interpolate(ze.forward(l),ze.forward(p),u))},ke.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},ke.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()}))},ke.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var Me=function(t,e){this.type=t,this.args=e};Me.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);for(var n=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=a[o],u=e.parse(s,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!u)return null;r=r||u.type,n.push(u)}var l=i&&n.some(function(t){return Bt(i,t.type)});return new Me(l?kt:r,n)},Me.prototype.evaluate=function(t){for(var e=null,r=0,i=this.args;r<i.length&&null===(e=i[r].evaluate(t));r+=1);return e},Me.prototype.eachChild=function(t){this.args.forEach(t)},Me.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.args.map(function(t){return t.possibleOutputs()}))},Me.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Le=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};Le.prototype.evaluate=function(t){return this.result.evaluate(t)},Le.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},Le.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],i=1;i<t.length-1;i+=2){var n=t[i];if("string"!=typeof n)return e.error("Expected string, but found "+typeof n+" instead.",i);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var o=e.parse(t[i+1],i+1);if(!o)return null;r.push([n,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new Le(r,a):null},Le.prototype.possibleOutputs=function(){return this.result.possibleOutputs()},Le.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t.push(n,o.serialize())}return t.push(this.result.serialize()),t};var De=function(t,e,r){this.type=t,this.index=e,this.input=r};De.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Tt),i=e.parse(t[2],2,Lt(e.expectedType||kt));if(!r||!i)return null;var n=i.type;return new De(n.itemType,r,i)},De.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new Xt("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new Xt("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new Xt("Array index must be an integer, but found "+e+" instead.");return r[e]},De.prototype.eachChild=function(t){t(this.index),t(this.input)},De.prototype.possibleOutputs=function(){return[void 0]},De.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Re=function(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o};Re.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var n={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],u=t[a+1];Array.isArray(s)||(s=[s]);var l=e.concat(a);if(0===s.length)return l.error("Expected at least one branch label.");for(var p=0,c=s;p<c.length;p+=1){var h=c[p];if("number"!=typeof h&&"string"!=typeof h)return l.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return l.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return l.error("Numeric branch labels must be integer values.");if(r){if(l.checkSubtype(r,qt(h)))return null}else r=qt(h);if(void 0!==n[String(h)])return l.error("Branch labels must be unique.");n[String(h)]=o.length}var f=e.parse(u,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,kt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,i);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new Re(r,i,d,n,o,m):null},Re.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(qt(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},Re.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},Re.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.outputs.map(function(t){return t.possibleOutputs()})).concat(this.otherwise.possibleOutputs())},Re.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],i={},n=0,o=Object.keys(this.cases).sort();n<o.length;n+=1){var a=o[n];void 0===(c=i[this.cases[a]])?(i[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[c][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},u=0,l=r;u<l.length;u+=1){var p=l[u],c=p[0],h=p[1];1===h.length?e.push(s(h[0])):e.push(h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var Be=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};function Fe(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function Oe(t,e,r,i){return 0===i.compare(e,r)}function Ue(t,e,r){var i="=="!==t&&"!="!==t;return function(){function n(t,e,r){this.type=zt,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,kt);if(!o)return null;if(!Fe(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Dt(o.type)+"'.");var a=e.parse(t[2],2,kt);if(!a)return null;if(!Fe(r,a.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Dt(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+Dt(o.type)+"' and '"+Dt(a.type)+"'.");i&&("value"===o.type.kind&&"value"!==a.type.kind?o=new Kt(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new Kt(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Pt)))return null}return new n(o,a,s)},n.prototype.evaluate=function(n){var o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){var s=qt(o),u=qt(a);if(s.kind!==u.kind||"string"!==s.kind&&"number"!==s.kind)throw new Xt('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+u.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var l=qt(o),p=qt(a);if("string"!==l.kind||"string"!==p.kind)return e(n,o,a)}return this.collator?r(n,o,a,this.collator.evaluate(n)):e(n,o,a)},n.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.possibleOutputs=function(){return[!0,!1]},n.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},n}()}Be.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],n=1;n<t.length-1;n+=2){var o=e.parse(t[n],n,zt);if(!o)return null;var a=e.parse(t[n+1],n+1,r);if(!a)return null;i.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new Be(r,i,s):null},Be.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];if(n.evaluate(t))return o.evaluate(t)}return this.otherwise.evaluate(t)},Be.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[0],o=i[1];t(n),t(o)}t(this.otherwise)},Be.prototype.possibleOutputs=function(){var t;return(t=[]).concat.apply(t,this.branches.map(function(t){return t[0],t[1].possibleOutputs()})).concat(this.otherwise.possibleOutputs())},Be.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ve=Ue("==",function(t,e,r){return e===r},Oe),Ne=Ue("!=",function(t,e,r){return e!==r},function(t,e,r,i){return!Oe(0,e,r,i)}),je=Ue("<",function(t,e,r){return e<r},function(t,e,r,i){return i.compare(e,r)<0}),qe=Ue(">",function(t,e,r){return e>r},function(t,e,r,i){return i.compare(e,r)>0}),Ze=Ue("<=",function(t,e,r){return e<=r},function(t,e,r,i){return i.compare(e,r)<=0}),Ge=Ue(">=",function(t,e,r){return e>=r},function(t,e,r,i){return i.compare(e,r)>=0}),Xe=function(t,e,r,i,n){this.type=At,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=n};Xe.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Tt);if(!r)return null;var i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var n=null;if(i.locale&&!(n=e.parse(i.locale,1,At)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,At)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,Tt)))return null;var s=null;return i["max-fraction-digits"]&&!(s=e.parse(i["max-fraction-digits"],1,Tt))?null:new Xe(r,n,o,a,s)},Xe.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},Xe.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},Xe.prototype.possibleOutputs=function(){return[void 0]},Xe.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var We=function(t){this.type=Tt,this.input=t};We.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Dt(r.type)+" instead."):new We(r):null},We.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new Xt("Expected value to be of type string or array, but found "+Dt(qt(e))+" instead.")},We.prototype.eachChild=function(t){t(this.input)},We.prototype.possibleOutputs=function(){return[void 0]},We.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Ke={"==":Ve,"!=":Ne,">":qe,"<":je,">=":Ge,"<=":Ze,array:Kt,at:De,boolean:Kt,case:Be,coalesce:Me,collator:ee,format:Ht,interpolate:ke,"interpolate-hcl":ke,"interpolate-lab":ke,length:We,let:Le,literal:Gt,match:Re,number:Kt,"number-format":Xe,object:Kt,step:ue,string:Kt,"to-boolean":Jt,"to-color":Jt,"to-number":Jt,"to-string":Jt,var:oe};function He(t,e){var r=e[0],i=e[1],n=e[2],o=e[3];r=r.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);var a=o?o.evaluate(t):1,s=jt(r,i,n,a);if(s)throw new Xt(s);return new Ot(r/255*a,i/255*a,n/255*a,a)}function Ye(t,e){return t in e}function Je(t,e){var r=e[t];return void 0===r?null:r}function $e(t){return{type:t}}function Qe(t){return{result:"success",value:t}}function tr(t){return{result:"error",value:t}}function er(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function rr(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function ir(t){return!!t.expression&&t.expression.interpolated}function nr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function or(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function ar(t){return t}function sr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function ur(t,e,r,i,n){return sr(typeof r===n?i[r]:void 0,t.default,e.default)}function lr(t,e,r){if("number"!==nr(r))return sr(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=hr(t.stops,r);return t.stops[n][1]}function pr(t,e,r){var i=void 0!==t.base?t.base:1;if("number"!==nr(r))return sr(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var o=hr(t.stops,r),a=function(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}(r,i,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],u=t.stops[o+1][1],l=pe[e.type]||ar;if(t.colorSpace&&"rgb"!==t.colorSpace){var p=Ce[t.colorSpace];l=function(t,e){return p.reverse(p.interpolate(p.forward(t),p.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),i=u.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return l(r,i,a)}}:l(s,u,a)}function cr(t,e,r){return"color"===e.type?r=Ot.parse(r):"formatted"===e.type?r=Nt.fromString(r.toString()):nr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),sr(r,t.default,e.default)}function hr(t,e){for(var r,i,n=0,o=t.length-1,a=0;n<=o;){if(r=t[a=Math.floor((n+o)/2)][0],i=t[a+1][0],e===r||e>r&&e<i)return a;r<e?n=a+1:r>e&&(o=a-1)}return Math.max(a-1,0)}te.register(Ke,{error:[{kind:"error"},[At],function(t,e){var r=e[0];throw new Xt(r.evaluate(t))}],typeof:[At,[kt],function(t,e){return Dt(qt(e[0].evaluate(t)))}],"to-rgba":[Lt(Tt,4),[It],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[It,[Tt,Tt,Tt],He],rgba:[It,[Tt,Tt,Tt,Tt],He],has:{type:zt,overloads:[[[At],function(t,e){return Ye(e[0].evaluate(t),t.properties())}],[[At,Ct],function(t,e){var r=e[0],i=e[1];return Ye(r.evaluate(t),i.evaluate(t))}]]},get:{type:kt,overloads:[[[At],function(t,e){return Je(e[0].evaluate(t),t.properties())}],[[At,Ct],function(t,e){var r=e[0],i=e[1];return Je(r.evaluate(t),i.evaluate(t))}]]},"feature-state":[kt,[At],function(t,e){return Je(e[0].evaluate(t),t.featureState||{})}],properties:[Ct,[],function(t){return t.properties()}],"geometry-type":[At,[],function(t){return t.geometryType()}],id:[kt,[],function(t){return t.id()}],zoom:[Tt,[],function(t){return t.globals.zoom}],"heatmap-density":[Tt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Tt,[],function(t){return t.globals.lineProgress||0}],accumulated:[kt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Tt,$e(Tt),function(t,e){for(var r=0,i=0,n=e;i<n.length;i+=1)r+=n[i].evaluate(t);return r}],"*":[Tt,$e(Tt),function(t,e){for(var r=1,i=0,n=e;i<n.length;i+=1)r*=n[i].evaluate(t);return r}],"-":{type:Tt,overloads:[[[Tt,Tt],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)-i.evaluate(t)}],[[Tt],function(t,e){return-e[0].evaluate(t)}]]},"/":[Tt,[Tt,Tt],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)/i.evaluate(t)}],"%":[Tt,[Tt,Tt],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)%i.evaluate(t)}],ln2:[Tt,[],function(){return Math.LN2}],pi:[Tt,[],function(){return Math.PI}],e:[Tt,[],function(){return Math.E}],"^":[Tt,[Tt,Tt],function(t,e){var r=e[0],i=e[1];return Math.pow(r.evaluate(t),i.evaluate(t))}],sqrt:[Tt,[Tt],function(t,e){var r=e[0];return Math.sqrt(r.evaluate(t))}],log10:[Tt,[Tt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN10}],ln:[Tt,[Tt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))}],log2:[Tt,[Tt],function(t,e){var r=e[0];return Math.log(r.evaluate(t))/Math.LN2}],sin:[Tt,[Tt],function(t,e){var r=e[0];return Math.sin(r.evaluate(t))}],cos:[Tt,[Tt],function(t,e){var r=e[0];return Math.cos(r.evaluate(t))}],tan:[Tt,[Tt],function(t,e){var r=e[0];return Math.tan(r.evaluate(t))}],asin:[Tt,[Tt],function(t,e){var r=e[0];return Math.asin(r.evaluate(t))}],acos:[Tt,[Tt],function(t,e){var r=e[0];return Math.acos(r.evaluate(t))}],atan:[Tt,[Tt],function(t,e){var r=e[0];return Math.atan(r.evaluate(t))}],min:[Tt,$e(Tt),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[Tt,$e(Tt),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[Tt,[Tt],function(t,e){var r=e[0];return Math.abs(r.evaluate(t))}],round:[Tt,[Tt],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Tt,[Tt],function(t,e){var r=e[0];return Math.floor(r.evaluate(t))}],ceil:[Tt,[Tt],function(t,e){var r=e[0];return Math.ceil(r.evaluate(t))}],"filter-==":[zt,[At,kt],function(t,e){var r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[zt,[kt],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[zt,[At],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[zt,[At,kt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<o}],"filter-id-<":[zt,[kt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<n}],"filter->":[zt,[At,kt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[zt,[kt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>n}],"filter-<=":[zt,[At,kt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[zt,[kt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<=n}],"filter->=":[zt,[At,kt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[zt,[kt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>=n}],"filter-has":[zt,[kt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[zt,[],function(t){return null!==t.id()}],"filter-type-in":[zt,[Lt(At)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[zt,[Lt(kt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[zt,[At,Lt(kt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[zt,[At,Lt(kt)],function(t,e){var r=e[0],i=e[1];return function(t,e,r,i){for(;r<=i;){var n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:zt,overloads:[[[zt,zt],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)&&i.evaluate(t)}],[$e(zt),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(!i[r].evaluate(t))return!1;return!0}]]},any:{type:zt,overloads:[[[zt,zt],function(t,e){var r=e[0],i=e[1];return r.evaluate(t)||i.evaluate(t)}],[$e(zt),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(i[r].evaluate(t))return!0;return!1}]]},"!":[zt,[zt],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[zt,[At],function(t,e){var r=e[0],i=t.globals&&t.globals.isSupportedScript;return!i||i(r.evaluate(t))}],upcase:[At,[At],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[At,[At],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[At,$e(kt),function(t,e){return e.map(function(e){return Zt(e.evaluate(t))}).join("")}],"resolved-locale":[At,[Pt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var fr=function(t,e){var r;this.expression=t,this._warningHistory={},this._evaluator=new Qt,this._defaultValue=e?"color"===(r=e).type&&or(r.default)?new Ot(0,0,0,0):"color"===r.type?Ot.parse(r.default)||null:void 0===r.default?null:r.default:null,this._enumValues=e&&"enum"===e.type?e.values:null};function dr(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Ke}function mr(t,e){var r=new ae(Ke,[],e?function(t){var e={color:It,string:At,number:Tt,enum:At,boolean:zt,formatted:Mt};return"array"===t.type?Lt(e[t.value]||kt,t.length):e[t.type]}(e):void 0),i=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?Qe(new fr(i,e)):tr(r.errors)}fr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this.expression.evaluate(this._evaluator)},fr.prototype.evaluate=function(t,e,r){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null;try{var i=this.expression.evaluate(this._evaluator);if(null==i)return this._defaultValue;if(this._enumValues&&!(i in this._enumValues))throw new Xt("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(i)+" instead.");return i}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var yr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!ie(e.expression)};yr.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},yr.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)};var _r=function(t,e,r){this.kind=t,this.zoomStops=r.labels,this._styleExpression=e,this.isStateDependent="camera"!==t&&!ie(e.expression),r instanceof ke&&(this._interpolationType=r.interpolation)};function vr(t,e){if("error"===(t=mr(t,e)).result)return t;var r=t.value.expression,i=re(r);if(!i&&!er(e))return tr([new wt("","data expressions not supported")]);var n=ne(r,["zoom"]);if(!n&&!rr(e))return tr([new wt("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof Le)r=t(e.result);else if(e instanceof Me)for(var i=0,n=e.args;i<n.length;i+=1){var o=n[i];if(r=t(o))break}else(e instanceof ue||e instanceof ke)&&e.input instanceof te&&"zoom"===e.input.name&&(r=e);return r instanceof wt?r:(e.eachChild(function(e){var i=t(e);i instanceof wt?r=i:!r&&i?r=new wt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new wt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r)}(r);return o||n?o instanceof wt?tr([o]):o instanceof ke&&!ir(e)?tr([new wt("",'"interpolate" expressions cannot be used with this property')]):Qe(o?new _r(i?"camera":"composite",t.value,o):new yr(i?"constant":"source",t.value)):tr([new wt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}_r.prototype.evaluateWithoutErrorHandling=function(t,e,r){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r)},_r.prototype.evaluate=function(t,e,r){return this._styleExpression.evaluate(t,e,r)},_r.prototype.interpolationFactor=function(t,e,r){return this._interpolationType?ke.interpolationFactor(this._interpolationType,t,e,r):0};var gr=function(t,e){this._parameters=t,this._specification=e,gt(this,function t(e,r){var i,n,o,a="color"===r.type,s=e.stops&&"object"==typeof e.stops[0][0],u=s||void 0!==e.property,l=s||!u,p=e.type||(ir(r)?"exponential":"interval");if(a&&((e=gt({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],Ot.parse(t[1])]})),e.default?e.default=Ot.parse(e.default):e.default=Ot.parse(r.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!Ce[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===p)i=pr;else if("interval"===p)i=lr;else if("categorical"===p){i=ur,n=Object.create(null);for(var c=0,h=e.stops;c<h.length;c+=1){var f=h[c];n[f[0]]=f[1]}o=typeof e.stops[0][0]}else{if("identity"!==p)throw new Error('Unknown function type "'+p+'"');i=cr}if(s){for(var d={},m=[],y=0;y<e.stops.length;y++){var _=e.stops[y],v=_[0].zoom;void 0===d[v]&&(d[v]={zoom:v,type:e.type,property:e.property,default:e.default,stops:[]},m.push(v)),d[v].stops.push([_[0].value,_[1]])}for(var g=[],x=0,b=m;x<b.length;x+=1){var w=b[x];g.push([d[w].zoom,t(d[w],r)])}return{kind:"composite",interpolationFactor:ke.interpolationFactor.bind(void 0,{name:"linear"}),zoomStops:g.map(function(t){return t[0]}),evaluate:function(t,i){var n=t.zoom;return pr({stops:g,base:e.base},r,n).evaluate(n,i)}}}return l?{kind:"camera",interpolationFactor:"exponential"===p?ke.interpolationFactor.bind(void 0,{name:"exponential",base:void 0!==e.base?e.base:1}):function(){return 0},zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){var a=t.zoom;return i(e,r,a,n,o)}}:{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?sr(e.default,r.default):i(e,r,s,n,o)}}}(this._parameters,this._specification))};function xr(t,e){if(or(t))return new gr(t,e);if(dr(t)){var r=vr(t,e);if("error"===r.result)throw new Error(r.value.map(function(t){return t.key+": "+t.message}).join(", "));return r.value}var i=t;return"string"==typeof t&&"color"===e.type&&(i=Ot.parse(t)),{kind:"constant",evaluate:function(){return i}}}function br(t){var e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],u=nr(r);if("object"!==u)return[new _t(e,r,"object expected, "+u+" found")];for(var l in r){var p=l.split(".")[0],c=i[p]||i["*"],h=void 0;if(n[p])h=n[p];else if(i[p])h=Gr;else if(n["*"])h=n["*"];else{if(!i["*"]){s.push(new _t(e,r[l],'unknown property "'+l+'"'));continue}h=Gr}s=s.concat(h({key:(e?e+".":e)+l,value:r[l],valueSpec:c,style:o,styleSpec:a,object:r,objectKey:l},r))}for(var f in i)n[f]||i[f].required&&void 0===i[f].default&&void 0===r[f]&&s.push(new _t(e,r,'missing required property "'+f+'"'));return s}function wr(t){var e=t.value,r=t.valueSpec,i=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||Gr;if("array"!==nr(e))return[new _t(o,e,"array expected, "+nr(e)+" found")];if(r.length&&e.length!==r.length)return[new _t(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new _t(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value};n.$version<7&&(s.function=r.function),"object"===nr(r.value)&&(s=r.value);for(var u=[],l=0;l<e.length;l++)u=u.concat(a({array:e,arrayIndex:l,value:e[l],valueSpec:s,style:i,styleSpec:n,key:o+"["+l+"]"}));return u}function Er(t){var e=t.key,r=t.value,i=t.valueSpec,n=nr(r);return"number"!==n?[new _t(e,r,"number expected, "+n+" found")]:"minimum"in i&&r<i.minimum?[new _t(e,r,r+" is less than the minimum value "+i.minimum)]:"maximum"in i&&r>i.maximum?[new _t(e,r,r+" is greater than the maximum value "+i.maximum)]:[]}function Sr(t){var e,r,i,n=t.valueSpec,o=xt(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,u=!s,l="array"===nr(t.value.stops)&&"array"===nr(t.value.stops[0])&&"object"===nr(t.value.stops[0][0]),p=br({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new _t(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(wr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:c})),"array"===nr(r)&&0===r.length&&e.push(new _t(t.key,r,"array must have at least one stop")),e},default:function(t){return Gr({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&p.push(new _t(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||p.push(new _t(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!ir(t.valueSpec)&&p.push(new _t(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(u&&!er(t.valueSpec)?p.push(new _t(t.key,t.value,"property functions not supported")):s&&!rr(t.valueSpec)&&p.push(new _t(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!l||void 0!==t.value.property||p.push(new _t(t.key,t.value,'"property" property is required')),p;function c(t){var e=[],o=t.value,s=t.key;if("array"!==nr(o))return[new _t(s,o,"array expected, "+nr(o)+" found")];if(2!==o.length)return[new _t(s,o,"array length 2 expected, length "+o.length+" found")];if(l){if("object"!==nr(o[0]))return[new _t(s,o,"object expected, "+nr(o[0])+" found")];if(void 0===o[0].zoom)return[new _t(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new _t(s,o,"object stop key must have value")];if(i&&i>xt(o[0].zoom))return[new _t(s,o[0].zoom,"stop zoom values must appear in ascending order")];xt(o[0].zoom)!==i&&(i=xt(o[0].zoom),r=void 0,a={}),e=e.concat(br({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Er,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return dr(bt(o[1]))?e.concat([new _t(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(Gr({key:s+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function h(t,i){var s=nr(t.value),u=xt(t.value),l=null!==t.value?t.value:i;if(e){if(s!==e)return[new _t(t.key,l,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new _t(t.key,l,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var p="number expected, "+s+" found";return er(n)&&void 0===o&&(p+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new _t(t.key,l,p)]}return"categorical"!==o||"number"!==s||isFinite(u)&&Math.floor(u)===u?"categorical"!==o&&"number"===s&&void 0!==r&&u<r?[new _t(t.key,l,"stop domain values must appear in ascending order")]:(r=u,"categorical"===o&&u in a?[new _t(t.key,l,"stop domain values must be unique")]:(a[u]=!0,[])):[new _t(t.key,l,"integer expected, found "+u)]}}function Tr(t){var e=("property"===t.expressionContext?vr:mr)(bt(t.value),t.valueSpec);if("error"===e.result)return e.value.map(function(e){return new _t(""+t.key+e.key,t.value,e.message)});var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&-1!==r.possibleOutputs().indexOf(void 0))return[new _t(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!ie(r))return[new _t(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!ie(r))return[new _t(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!ne(r,["zoom","feature-state"]))return[new _t(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!re(r))return[new _t(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ar(t){var e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(xt(r))&&n.push(new _t(e,r,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(i.values).indexOf(xt(r))&&n.push(new _t(e,r,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(r)+" found")),n}function zr(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var i=r[e];if(!zr(i)&&"boolean"!=typeof i)return!1}return!0;default:return!0}}gr.deserialize=function(t){return new gr(t._parameters,t._specification)},gr.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var Ir={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Cr(t){if(null==t)return function(){return!0};zr(t)||(t=Pr(t));var e=mr(t,Ir);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return function(t,r){return e.value.evaluate(t,r)}}function kr(t,e){return t<e?-1:t>e?1:0}function Pr(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?Mr(t[1],t[2],"=="):"!="===r?Rr(Mr(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?Mr(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(Pr))):"all"===r?["all"].concat(t.slice(1).map(Pr)):"none"===r?["all"].concat(t.slice(1).map(Pr).map(Rr)):"in"===r?Lr(t[1],t.slice(2)):"!in"===r?Rr(Lr(t[1],t.slice(2))):"has"===r?Dr(t[1]):"!has"!==r||Rr(Dr(t[1]))}function Mr(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function Lr(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(kr)]]:["filter-in-small",t,["literal",e]]}}function Dr(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function Rr(t){return["!",t]}function Br(t){return zr(bt(t.value))?Tr(gt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,i=e.key;if("array"!==nr(r))return[new _t(i,r,"array expected, "+nr(r)+" found")];var n,o=e.styleSpec,a=[];if(r.length<1)return[new _t(i,r,"filter array must have at least 1 element")];switch(a=a.concat(Ar({key:i+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),xt(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===xt(r[1])&&a.push(new _t(i,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new _t(i,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(n=nr(r[1]))&&a.push(new _t(i+"[1]",r[1],"string expected, "+n+" found"));for(var s=2;s<r.length;s++)n=nr(r[s]),"$type"===xt(r[1])?a=a.concat(Ar({key:i+"["+s+"]",value:r[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&a.push(new _t(i+"["+s+"]",r[s],"string, number, or boolean expected, "+n+" found"));break;case"any":case"all":case"none":for(var u=1;u<r.length;u++)a=a.concat(t({key:i+"["+u+"]",value:r[u],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=nr(r[1]),2!==r.length?a.push(new _t(i,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new _t(i+"[1]",r[1],"string expected, "+n+" found"))}return a}(t)}function Fr(t,e){var r=t.key,i=t.style,n=t.styleSpec,o=t.value,a=t.objectKey,s=n[e+"_"+t.layerType];if(!s)return[];var u=a.match(/^(.*)-transition$/);if("paint"===e&&u&&s[u[1]]&&s[u[1]].transition)return Gr({key:r,value:o,valueSpec:n.transition,style:i,styleSpec:n});var l,p=t.valueSpec||s[a];if(!p)return[new _t(r,o,'unknown property "'+a+'"')];if("string"===nr(o)&&er(p)&&!p.tokens&&(l=/^{([^}]+)}$/.exec(o)))return[new _t(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(l[1])+" }`.")];var c=[];return"symbol"===t.layerType&&("text-field"===a&&i&&!i.glyphs&&c.push(new _t(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&or(bt(o))&&"identity"===xt(o.type)&&c.push(new _t(r,o,'"text-font" does not support identity functions'))),c.concat(Gr({key:t.key,value:o,valueSpec:p,style:i,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function Or(t){return Fr(t,"paint")}function Ur(t){return Fr(t,"layout")}function Vr(t){var e=[],r=t.value,i=t.key,n=t.style,o=t.styleSpec;r.type||r.ref||e.push(new _t(i,r,'either "type" or "ref" is required'));var a,s=xt(r.type),u=xt(r.ref);if(r.id)for(var l=xt(r.id),p=0;p<t.arrayIndex;p++){var c=n.layers[p];xt(c.id)===l&&e.push(new _t(i,r.id,'duplicate layer id "'+r.id+'", previously used at line '+c.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new _t(i,r[t],'"'+t+'" is prohibited for ref layers'))}),n.layers.forEach(function(t){xt(t.id)===u&&(a=t)}),a?a.ref?e.push(new _t(i,r.ref,"ref cannot reference another ref layer")):s=xt(a.type):e.push(new _t(i,r.ref,'ref layer "'+u+'" not found'));else if("background"!==s)if(r.source){var h=n.sources&&n.sources[r.source],f=h&&xt(h.type);h?"vector"===f&&"raster"===s?e.push(new _t(i,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new _t(i,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new _t(i,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&h.lineMetrics||e.push(new _t(i,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new _t(i,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new _t(i,r.source,'source "'+r.source+'" not found'))}else e.push(new _t(i,r,'missing required property "source"'));return e=e.concat(br({key:i,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return Gr({key:i+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:Br,layout:function(t){return br({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Ur(gt({layerType:s},t))}}})},paint:function(t){return br({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return Or(gt({layerType:s},t))}}})}}}))}function Nr(t){var e=t.value,r=t.key,i=t.styleSpec,n=t.style;if(!e.type)return[new _t(r,e,'"type" is required')];var o,a=xt(e.type);switch(a){case"vector":case"raster":case"raster-dem":if(o=br({key:r,value:e,valueSpec:i["source_"+a.replace("-","_")],style:t.style,styleSpec:i}),"url"in e)for(var s in e)["type","url","tileSize"].indexOf(s)<0&&o.push(new _t(r+"."+s,e[s],'a source with a "url" property may not include a "'+s+'" property'));return o;case"geojson":if(o=br({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i}),e.cluster)for(var u in e.clusterProperties){var l=e.clusterProperties[u],p=l[0],c=l[1],h="string"==typeof p?[p,["accumulated"],["get",u]]:p;o.push.apply(o,Tr({key:r+"."+u+".map",value:c,expressionContext:"cluster-map"})),o.push.apply(o,Tr({key:r+"."+u+".reduce",value:h,expressionContext:"cluster-reduce"}))}return o;case"video":return br({key:r,value:e,valueSpec:i.source_video,style:n,styleSpec:i});case"image":return br({key:r,value:e,valueSpec:i.source_image,style:n,styleSpec:i});case"canvas":return[new _t(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Ar({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:i})}}function jr(t){var e=t.value,r=t.styleSpec,i=r.light,n=t.style,o=[],a=nr(e);if(void 0===e)return o;if("object"!==a)return o.concat([new _t("light",e,"object expected, "+a+" found")]);for(var s in e){var u=s.match(/^(.*)-transition$/);o=u&&i[u[1]]&&i[u[1]].transition?o.concat(Gr({key:s,value:e[s],valueSpec:r.transition,style:n,styleSpec:r})):i[s]?o.concat(Gr({key:s,value:e[s],valueSpec:i[s],style:n,styleSpec:r})):o.concat([new _t(s,e[s],'unknown property "'+s+'"')])}return o}function qr(t){var e=t.value,r=t.key,i=nr(e);return"string"!==i?[new _t(r,e,"string expected, "+i+" found")]:[]}var Zr={"*":function(){return[]},array:wr,boolean:function(t){var e=t.value,r=t.key,i=nr(e);return"boolean"!==i?[new _t(r,e,"boolean expected, "+i+" found")]:[]},number:Er,color:function(t){var e=t.key,r=t.value,i=nr(r);return"string"!==i?[new _t(e,r,"color expected, "+i+" found")]:null===Ft(r)?[new _t(e,r,'color expected, "'+r+'" found')]:[]},constants:vt,enum:Ar,filter:Br,function:Sr,layer:Vr,object:br,source:Nr,light:jr,string:qr,formatted:function(t){return 0===qr(t).length?[]:Tr(t)}};function Gr(t){var e=t.value,r=t.valueSpec,i=t.styleSpec;return r.expression&&or(xt(e))?Sr(t):r.expression&&dr(bt(e))?Tr(t):r.type&&Zr[r.type]?Zr[r.type](t):br(gt({},t,{valueSpec:r.type?i[r.type]:r}))}function Xr(t){var e=t.value,r=t.key,i=qr(t);return i.length?i:(-1===e.indexOf("{fontstack}")&&i.push(new _t(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&i.push(new _t(r,e,'"glyphs" url must include a "{range}" token')),i)}function Wr(t,e){e=e||yt;var r=[];return r=r.concat(Gr({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:Xr,"*":function(){return[]}}})),t.constants&&(r=r.concat(vt({key:"constants",value:t.constants,style:t,styleSpec:e}))),Kr(r)}function Kr(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function Hr(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return Kr(t.apply(this,e))}}Wr.source=Hr(Nr),Wr.light=Hr(jr),Wr.layer=Hr(Vr),Wr.filter=Hr(Br),Wr.paintProperty=Hr(Or),Wr.layoutProperty=Hr(Ur);var Yr=Wr,Jr=Wr.light,$r=Wr.paintProperty,Qr=Wr.layoutProperty;function ti(t,e){var r=!1;if(e&&e.length)for(var i=0,n=e;i<n.length;i+=1){var o=n[i];t.fire(new dt(new Error(o.message))),r=!0}return r}var ei=ii,ri=3;function ii(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var n=new Int32Array(this.arrayBuffer);t=n[0],e=n[1],r=n[2],this.d=e+2*r;for(var o=0;o<this.d*this.d;o++){var a=n[ri+o],s=n[ri+o+1];i.push(a===s?null:n.subarray(a,s))}var u=n[ri+i.length],l=n[ri+i.length+1];this.keys=n.subarray(u,l),this.bboxes=n.subarray(l),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var p=0;p<this.d*this.d;p++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var c=r/e*t;this.min=-c,this.max=t+c}ii.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},ii.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ii.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},ii.prototype.query=function(t,e,r,i,n){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=r&&a<=i&&!n)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,i,this._queryCell,s,{},n),s},ii.prototype._queryCell=function(t,e,r,i,n,o,a,s){var u=this.cells[n];if(null!==u)for(var l=this.keys,p=this.bboxes,c=0;c<u.length;c++){var h=u[c];if(void 0===a[h]){var f=4*h;(s?s(p[f+0],p[f+1],p[f+2],p[f+3]):t<=p[f+2]&&e<=p[f+3]&&r>=p[f+0]&&i>=p[f+1])?(a[h]=!0,o.push(l[h])):a[h]=!1}}},ii.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var u=this._convertToCellCoord(t),l=this._convertToCellCoord(e),p=this._convertToCellCoord(r),c=this._convertToCellCoord(i),h=u;h<=p;h++)for(var f=l;f<=c;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&n.call(this,t,e,r,i,d,o,a,s))return}},ii.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},ii.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},ii.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=ri+this.cells.length+1+1,r=0,i=0;i<this.cells.length;i++)r+=this.cells[i].length;var n=new Int32Array(e+r+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];n[ri+a]=o,n.set(s,o),o+=s.length}return n[ri+t.length]=o,n.set(this.keys,o),o+=this.keys.length,n[ri+t.length+1]=o,n.set(this.bboxes,o),o+=this.bboxes.length,n.buffer};var ni=self.ImageData,oi={};function ai(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),oi[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var si in ai("Object",Object),ei.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),{buffer:r}},ei.deserialize=function(t){return new ei(t.buffer)},ai("Grid",ei),ai("Color",Ot),ai("Error",Error),ai("StylePropertyFunction",gr),ai("StyleExpression",fr,{omit:["_evaluator"]}),ai("ZoomDependentExpression",_r),ai("ZoomConstantExpression",yr),ai("CompoundExpression",te,{omit:["_evaluate"]}),Ke)Ke[si]._classRegistryKey||ai("Expression_"+si,Ke[si]);function ui(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(t instanceof ArrayBuffer)return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof ni)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var i=[],n=0,o=t;n<o.length;n+=1){var a=o[n];i.push(ui(a,e))}return i}if("object"==typeof t){var s=t.constructor,u=s._classRegistryKey;if(!u)throw new Error("can't serialize object of unregistered class");var l=s.serialize?s.serialize(t,e):{};if(!s.serialize){for(var p in t)if(t.hasOwnProperty(p)&&!(oi[u].omit.indexOf(p)>=0)){var c=t[p];l[p]=oi[u].shallow.indexOf(p)>=0?c:ui(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==u&&(l.$name=u),l}throw new Error("can't serialize object of type "+typeof t)}function li(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||t instanceof ArrayBuffer||ArrayBuffer.isView(t)||t instanceof ni)return t;if(Array.isArray(t))return t.map(li);if("object"==typeof t){var e=t.$name||"Object",r=oi[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var i=Object.create(r.prototype),n=0,o=Object.keys(t);n<o.length;n+=1){var a=o[n];if("$name"!==a){var s=t[a];i[a]=oi[e].shallow.indexOf(a)>=0?s:li(s)}}return i}throw new Error("can't deserialize object of type "+typeof t)}var pi=function(){this.first=!0};pi.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var ci={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function hi(t){for(var e=0,r=t;e<r.length;e+=1)if(di(r[e].charCodeAt(0)))return!0;return!1}function fi(t){return!(ci.Arabic(t)||ci["Arabic Supplement"](t)||ci["Arabic Extended-A"](t)||ci["Arabic Presentation Forms-A"](t)||ci["Arabic Presentation Forms-B"](t))}function di(t){return!(746!==t&&747!==t&&(t<4352||!(ci["Bopomofo Extended"](t)||ci.Bopomofo(t)||ci["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||ci["CJK Compatibility Ideographs"](t)||ci["CJK Compatibility"](t)||ci["CJK Radicals Supplement"](t)||ci["CJK Strokes"](t)||!(!ci["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||ci["CJK Unified Ideographs Extension A"](t)||ci["CJK Unified Ideographs"](t)||ci["Enclosed CJK Letters and Months"](t)||ci["Hangul Compatibility Jamo"](t)||ci["Hangul Jamo Extended-A"](t)||ci["Hangul Jamo Extended-B"](t)||ci["Hangul Jamo"](t)||ci["Hangul Syllables"](t)||ci.Hiragana(t)||ci["Ideographic Description Characters"](t)||ci.Kanbun(t)||ci["Kangxi Radicals"](t)||ci["Katakana Phonetic Extensions"](t)||ci.Katakana(t)&&12540!==t||!(!ci["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!ci["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||ci["Unified Canadian Aboriginal Syllabics"](t)||ci["Unified Canadian Aboriginal Syllabics Extended"](t)||ci["Vertical Forms"](t)||ci["Yijing Hexagram Symbols"](t)||ci["Yi Syllables"](t)||ci["Yi Radicals"](t))))}function mi(t){return!(di(t)||function(t){return!!(ci["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||ci["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||ci["Letterlike Symbols"](t)||ci["Number Forms"](t)||ci["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||ci["Control Pictures"](t)&&9251!==t||ci["Optical Character Recognition"](t)||ci["Enclosed Alphanumerics"](t)||ci["Geometric Shapes"](t)||ci["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||ci["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||ci["CJK Symbols and Punctuation"](t)||ci.Katakana(t)||ci["Private Use Area"](t)||ci["CJK Compatibility Forms"](t)||ci["Small Form Variants"](t)||ci["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function yi(t,e){return!(!e&&(t>=1424&&t<=2303||ci["Arabic Presentation Forms-A"](t)||ci["Arabic Presentation Forms-B"](t))||t>=2304&&t<=3583||t>=3840&&t<=4255||ci.Khmer(t))}var _i,vi=!1,gi=null,xi=!1,bi=new mt,wi={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return xi||null!=wi.applyArabicShaping}},Ei=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new pi,this.transition={})};Ei.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,i=t;r<i.length;r+=1)if(!yi(i[r].charCodeAt(0),e))return!1;return!0}(t,wi.isLoaded())},Ei.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},Ei.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var Si=function(t,e){this.property=t,this.value=e,this.expression=xr(void 0===e?t.specification.default:e,t.specification)};Si.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Si.prototype.possiblyEvaluate=function(t){return this.property.possiblyEvaluate(this,t)};var Ti=function(t){this.property=t,this.value=new Si(t,void 0)};Ti.prototype.transitioned=function(t,e){return new zi(this.property,this.value,e,c({},t.transition,this.transition),t.now)},Ti.prototype.untransitioned=function(){return new zi(this.property,this.value,null,{},0)};var Ai=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};Ai.prototype.getValue=function(t){return x(this._values[t].value.value)},Ai.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ti(this._values[t].property)),this._values[t].value=new Si(this._values[t].property,null===e?void 0:x(e))},Ai.prototype.getTransition=function(t){return x(this._values[t].transition)},Ai.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new Ti(this._values[t].property)),this._values[t].transition=x(e)||void 0},Ai.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n);var o=this.getTransition(i);void 0!==o&&(t[i+"-transition"]=o)}return t},Ai.prototype.transitioned=function(t,e){for(var r=new Ii(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var o=n[i];r._values[o]=this._values[o].transitioned(t,e._values[o])}return r},Ai.prototype.untransitioned=function(){for(var t=new Ii(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e];t._values[i]=this._values[i].untransitioned()}return t};var zi=function(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)};zi.prototype.possiblyEvaluate=function(t){var e=t.now||0,r=this.value.possiblyEvaluate(t),i=this.prior;if(i){if(e>this.end)return this.prior=null,r;if(this.value.isDataDriven())return this.prior=null,r;if(e<this.begin)return i.possiblyEvaluate(t);var n=(e-this.begin)/(this.end-this.begin);return this.property.interpolate(i.possiblyEvaluate(t),r,function(t){if(n<=0)return 0;if(n>=1)return 1;var e=n*n,r=e*n;return 4*(n<.5?r:3*(n-e)+r-.75)}())}return r};var Ii=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};Ii.prototype.possiblyEvaluate=function(t){for(var e=new Pi(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var n=i[r];e._values[n]=this._values[n].possiblyEvaluate(t)}return e},Ii.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1){var r=e[t];if(this._values[r].prior)return!0}return!1};var Ci=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};Ci.prototype.getValue=function(t){return x(this._values[t].value)},Ci.prototype.setValue=function(t,e){this._values[t]=new Si(this._values[t].property,null===e?void 0:x(e))},Ci.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n)}return t},Ci.prototype.possiblyEvaluate=function(t){for(var e=new Pi(this._properties),r=0,i=Object.keys(this._values);r<i.length;r+=1){var n=i[r];e._values[n]=this._values[n].possiblyEvaluate(t)}return e};var ki=function(t,e,r){this.property=t,this.value=e,this.parameters=r};ki.prototype.isConstant=function(){return"constant"===this.value.kind},ki.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},ki.prototype.evaluate=function(t,e){return this.property.evaluate(this.value,this.parameters,t,e)};var Pi=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};Pi.prototype.get=function(t){return this._values[t]};var Mi=function(t){this.specification=t};Mi.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},Mi.prototype.interpolate=function(t,e,r){var i=pe[this.specification.type];return i?i(t,e,r):t};var Li=function(t){this.specification=t};Li.prototype.possiblyEvaluate=function(t,e){return"constant"===t.expression.kind||"camera"===t.expression.kind?new ki(this,{kind:"constant",value:t.expression.evaluate(e)},e):new ki(this,t.expression,e)},Li.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new ki(this,{kind:"constant",value:void 0},t.parameters);var i=pe[this.specification.type];return i?new ki(this,{kind:"constant",value:i(t.value.value,e.value.value,r)},t.parameters):t},Li.prototype.evaluate=function(t,e,r,i){return"constant"===t.kind?t.value:t.evaluate(e,r,i)};var Di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(t,e){if(void 0===t.value)return new ki(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var r=t.expression.evaluate(e),i=this._calculate(r,r,r,e);return new ki(this,{kind:"constant",value:i},e)}if("camera"===t.expression.kind){var n=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new ki(this,{kind:"constant",value:n},e)}return new ki(this,t.expression,e)},e.prototype.evaluate=function(t,e,r,i){if("source"===t.kind){var n=t.evaluate(e,r,i);return this._calculate(n,n,n,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,i),t.evaluate({zoom:Math.floor(e.zoom)},r,i),t.evaluate({zoom:Math.floor(e.zoom)+1},r,i),e):t.value},e.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(Li),Ri=function(t){this.specification=t};Ri.prototype.possiblyEvaluate=function(t,e){if(void 0!==t.value){if("constant"===t.expression.kind){var r=t.expression.evaluate(e);return this._calculate(r,r,r,e)}return this._calculate(t.expression.evaluate(new Ei(Math.floor(e.zoom-1),e)),t.expression.evaluate(new Ei(Math.floor(e.zoom),e)),t.expression.evaluate(new Ei(Math.floor(e.zoom+1),e)),e)}},Ri.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},Ri.prototype.interpolate=function(t){return t};var Bi=function(t){this.specification=t};Bi.prototype.possiblyEvaluate=function(t,e){return!!t.expression.evaluate(e)},Bi.prototype.interpolate=function(){return!1};var Fi=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},t){var r=t[e],i=this.defaultPropertyValues[e]=new Si(r,void 0),n=this.defaultTransitionablePropertyValues[e]=new Ti(r);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};ai("DataDrivenProperty",Li),ai("DataConstantProperty",Mi),ai("CrossFadedDataDrivenProperty",Di),ai("CrossFadedProperty",Ri),ai("ColorRampProperty",Bi);var Oi=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this.visibility="visible",this._featureFilter=function(){return!0},"custom"!==e.type&&(e=e,this.metadata=e.metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new Ci(r.layout)),r.paint)){for(var i in this._transitionablePaint=new Ai(r.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var i="layers."+this.id+".layout."+t;if(this._validate(Qr,i,t,e,r))return}"visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility="none"===e?e:"visible"},e.prototype.getPaintProperty=function(t){return _(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e){var i="layers."+this.id+".paint."+t;if(this._validate($r,i,t,e,r))return!1}if(_(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var n=this._transitionablePaint._values[t],o="cross-faded-data-driven"===n.property.specification["property-type"]&&!n.value.value&&e,a=this._transitionablePaint._values[t].value.isDataDriven();this._transitionablePaint.setValue(t,e);var s=this._transitionablePaint._values[t].value.isDataDriven();return this._handleSpecialPaintPropertyUpdate(t),s||a||o},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t)),this.paint=this._transitioningPaint.possiblyEvaluate(t)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return"none"===this.visibility&&(t.layout=t.layout||{},t.layout.visibility="none"),g(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,i,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&ti(this,t.call(Yr,{key:e,layerType:this.type,objectKey:r,value:i,styleSpec:yt,style:{glyphs:!0,sprite:!0}}))},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof ki&&er(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(mt),Ui={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Vi=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},Ni=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function ji(t,e){void 0===e&&(e=1);var r=0,i=0;return{members:t.map(function(t){var n,o=(n=t.type,Ui[n].BYTES_PER_ELEMENT),a=r=qi(r,Math.max(e,o)),s=t.components||1;return i=Math.max(i,o),r+=o*s,{name:t.name,type:t.type,components:s,offset:a}}),size:qi(r,Math.max(i,e)),alignment:e}}function qi(t,e){return Math.ceil(t/e)*e}Ni.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},Ni.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},Ni.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Ni.prototype.clear=function(){this.length=0},Ni.prototype.resize=function(t){this.reserve(t),this.length=t},Ni.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},Ni.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.int16[i+0]=e,this.int16[i+1]=r,t},e}(Ni);Zi.prototype.bytesPerElement=4,ai("StructArrayLayout2i4",Zi);var Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,t},e}(Ni);Gi.prototype.bytesPerElement=8,ai("StructArrayLayout4i8",Gi);var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Ni);Xi.prototype.bytesPerElement=12,ai("StructArrayLayout2i4i12",Xi);var Wi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u){var l=6*t,p=12*t;return this.int16[l+0]=e,this.int16[l+1]=r,this.int16[l+2]=i,this.int16[l+3]=n,this.uint8[p+8]=o,this.uint8[p+9]=a,this.uint8[p+10]=s,this.uint8[p+11]=u,t},e}(Ni);Wi.prototype.bytesPerElement=12,ai("StructArrayLayout4i4ub12",Wi);var Ki=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u){var l=8*t;return this.uint16[l+0]=e,this.uint16[l+1]=r,this.uint16[l+2]=i,this.uint16[l+3]=n,this.uint16[l+4]=o,this.uint16[l+5]=a,this.uint16[l+6]=s,this.uint16[l+7]=u,t},e}(Ni);Ki.prototype.bytesPerElement=16,ai("StructArrayLayout8ui16",Ki);var Hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u){var l=8*t;return this.int16[l+0]=e,this.int16[l+1]=r,this.int16[l+2]=i,this.int16[l+3]=n,this.uint16[l+4]=o,this.uint16[l+5]=a,this.uint16[l+6]=s,this.uint16[l+7]=u,t},e}(Ni);Hi.prototype.bytesPerElement=16,ai("StructArrayLayout4i4ui16",Hi);var Yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t},e}(Ni);Yi.prototype.bytesPerElement=12,ai("StructArrayLayout3f12",Yi);var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint32[r+0]=e,t},e}(Ni);Ji.prototype.bytesPerElement=4,ai("StructArrayLayout1ul4",Ji);var $i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,u,l,p){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,i,n,o,a,s,u,l,p)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u,l,p,c){var h=12*t,f=6*t;return this.int16[h+0]=e,this.int16[h+1]=r,this.int16[h+2]=i,this.int16[h+3]=n,this.int16[h+4]=o,this.int16[h+5]=a,this.uint32[f+3]=s,this.uint16[h+8]=u,this.uint16[h+9]=l,this.int16[h+10]=p,this.int16[h+11]=c,t},e}(Ni);$i.prototype.bytesPerElement=24,ai("StructArrayLayout6i1ul2ui2i24",$i);var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(Ni);Qi.prototype.bytesPerElement=12,ai("StructArrayLayout2i2i2i12",Qi);var tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=4*t;return this.uint8[i+0]=e,this.uint8[i+1]=r,t},e}(Ni);tn.prototype.bytesPerElement=4,ai("StructArrayLayout2ub4",tn);var en=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f){var d=this.length;return this.resize(d+1),this.emplace(d,t,e,r,i,n,o,a,s,u,l,p,c,h,f)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d){var m=20*t,y=10*t,_=40*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.uint16[m+2]=i,this.uint16[m+3]=n,this.uint32[y+2]=o,this.uint32[y+3]=a,this.uint32[y+4]=s,this.uint16[m+10]=u,this.uint16[m+11]=l,this.uint16[m+12]=p,this.float32[y+7]=c,this.float32[y+8]=h,this.uint8[_+36]=f,this.uint8[_+37]=d,t},e}(Ni);en.prototype.bytesPerElement=40,ai("StructArrayLayout2i2ui3ul3ui2f2ub40",en);var rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f){var d=this.length;return this.resize(d+1),this.emplace(d,t,e,r,i,n,o,a,s,u,l,p,c,h,f)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d){var m=16*t,y=8*t;return this.int16[m+0]=e,this.int16[m+1]=r,this.int16[m+2]=i,this.int16[m+3]=n,this.uint16[m+4]=o,this.uint16[m+5]=a,this.uint16[m+6]=s,this.uint16[m+7]=u,this.uint16[m+8]=l,this.uint16[m+9]=p,this.uint16[m+10]=c,this.uint16[m+11]=h,this.uint16[m+12]=f,this.uint32[y+7]=d,t},e}(Ni);rn.prototype.bytesPerElement=32,ai("StructArrayLayout4i9ui1ul32",rn);var nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.float32[r+0]=e,t},e}(Ni);nn.prototype.bytesPerElement=4,ai("StructArrayLayout1f4",nn);var on=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t},e}(Ni);on.prototype.bytesPerElement=6,ai("StructArrayLayout3i6",on);var an=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=2*t,o=4*t;return this.uint32[n+0]=e,this.uint16[o+2]=r,this.uint16[o+3]=i,t},e}(Ni);an.prototype.bytesPerElement=8,ai("StructArrayLayout1ul2ui8",an);var sn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t},e}(Ni);sn.prototype.bytesPerElement=6,ai("StructArrayLayout3ui6",sn);var un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,t},e}(Ni);un.prototype.bytesPerElement=4,ai("StructArrayLayout2ui4",un);var ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){var r=1*t;return this.uint16[r+0]=e,t},e}(Ni);ln.prototype.bytesPerElement=2,ai("StructArrayLayout1ui2",ln);var pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.float32[i+0]=e,this.float32[i+1]=r,t},e}(Ni);pn.prototype.bytesPerElement=8,ai("StructArrayLayout2f8",pn);var cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=i,this.float32[o+3]=n,t},e}(Ni);cn.prototype.bytesPerElement=16,ai("StructArrayLayout4f16",cn);var hn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},radius:{configurable:!0},signedDistanceFromAnchor:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorPointY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.x1.set=function(t){this._structArray.int16[this._pos2+2]=t},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.y1.set=function(t){this._structArray.int16[this._pos2+3]=t},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.x2.set=function(t){this._structArray.int16[this._pos2+4]=t},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.y2.set=function(t){this._structArray.int16[this._pos2+5]=t},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.radius.get=function(){return this._structArray.int16[this._pos2+10]},r.radius.set=function(t){this._structArray.int16[this._pos2+10]=t},r.signedDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+11]},r.signedDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+11]=t},r.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(Vi);hn.prototype.size=24;var fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new hn(this,t)},e}($i);ai("CollisionBoxArray",fn);var dn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},hidden:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.glyphStartIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.numGlyphs.set=function(t){this._structArray.uint16[this._pos2+3]=t},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.vertexStartIndex.set=function(t){this._structArray.uint32[this._pos4+2]=t},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineStartIndex.set=function(t){this._structArray.uint32[this._pos4+3]=t},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.lineLength.set=function(t){this._structArray.uint32[this._pos4+4]=t},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.segment.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.lowerSize.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.upperSize.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetX.set=function(t){this._structArray.float32[this._pos4+7]=t},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.lineOffsetY.set=function(t){this._structArray.float32[this._pos4+8]=t},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.writingMode.set=function(t){this._structArray.uint8[this._pos1+36]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+37]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+37]=t},Object.defineProperties(e.prototype,r),e}(Vi);dn.prototype.size=40;var mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new dn(this,t)},e}(en);ai("PlacedSymbolArray",mn);var yn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},horizontalPlacedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},crossTileID:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorX.set=function(t){this._structArray.int16[this._pos2+0]=t},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.anchorY.set=function(t){this._structArray.int16[this._pos2+1]=t},r.horizontalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.horizontalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+2]=t},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.verticalPlacedTextSymbolIndex.set=function(t){this._structArray.int16[this._pos2+3]=t},r.key.get=function(){return this._structArray.uint16[this._pos2+4]},r.key.set=function(t){this._structArray.uint16[this._pos2+4]=t},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+5]},r.textBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+5]=t},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+6]},r.textBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+6]=t},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+7]},r.iconBoxStartIndex.set=function(t){this._structArray.uint16[this._pos2+7]=t},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.iconBoxEndIndex.set=function(t){this._structArray.uint16[this._pos2+8]=t},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.featureIndex.set=function(t){this._structArray.uint16[this._pos2+9]=t},r.numGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+10]},r.numGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+10]=t},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+11]},r.numVerticalGlyphVertices.set=function(t){this._structArray.uint16[this._pos2+11]=t},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+12]},r.numIconVertices.set=function(t){this._structArray.uint16[this._pos2+12]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+7]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+7]=t},Object.defineProperties(e.prototype,r),e}(Vi);yn.prototype.size=32;var _n=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new yn(this,t)},e}(rn);ai("SymbolInstanceArray",_n);var vn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={offsetX:{configurable:!0}};return r.offsetX.get=function(){return this._structArray.float32[this._pos4+0]},r.offsetX.set=function(t){this._structArray.float32[this._pos4+0]=t},Object.defineProperties(e.prototype,r),e}(Vi);vn.prototype.size=4;var gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e.prototype.get=function(t){return new vn(this,t)},e}(nn);ai("GlyphOffsetArray",gn);var xn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={x:{configurable:!0},y:{configurable:!0},tileUnitDistanceFromAnchor:{configurable:!0}};return r.x.get=function(){return this._structArray.int16[this._pos2+0]},r.x.set=function(t){this._structArray.int16[this._pos2+0]=t},r.y.get=function(){return this._structArray.int16[this._pos2+1]},r.y.set=function(t){this._structArray.int16[this._pos2+1]=t},r.tileUnitDistanceFromAnchor.get=function(){return this._structArray.int16[this._pos2+2]},r.tileUnitDistanceFromAnchor.set=function(t){this._structArray.int16[this._pos2+2]=t},Object.defineProperties(e.prototype,r),e}(Vi);xn.prototype.size=6;var bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e.prototype.get=function(t){return new xn(this,t)},e}(on);ai("SymbolLineVertexArray",bn);var wn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.featureIndex.set=function(t){this._structArray.uint32[this._pos4+0]=t},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.sourceLayerIndex.set=function(t){this._structArray.uint16[this._pos2+2]=t},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},r.bucketIndex.set=function(t){this._structArray.uint16[this._pos2+3]=t},Object.defineProperties(e.prototype,r),e}(Vi);wn.prototype.size=8;var En=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(t){return new wn(this,t)},e}(an);ai("FeatureIndexArray",En);var Sn=ji([{name:"a_pos",components:2,type:"Int16"}],4),Tn=Sn.members,An=(Sn.size,Sn.alignment,function(t){void 0===t&&(t=[]),this.segments=t});function zn(t,e){return 256*(t=l(Math.floor(t),0,255))+l(Math.floor(e),0,255)}An.prototype.prepareSegment=function(t,e,r,i){var n=this.segments[this.segments.length-1];return t>An.MAX_VERTEX_ARRAY_LENGTH&&w("Max vertices per segment is "+An.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>An.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i)&&(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==i&&(n.sortKey=i),this.segments.push(n)),n},An.prototype.get=function(){return this.segments},An.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var i in r.vaos)r.vaos[i].destroy()}},An.simpleSegment=function(t,e,r,i){return new An([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])},An.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,ai("SegmentVector",An);var In=function(){this.ids=[],this.positions=[],this.indexed=!1};function Cn(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}In.prototype.add=function(t,e,r,i){this.ids.push(t),this.positions.push(e,r,i)},In.prototype.getPositions=function(t){for(var e=0,r=this.ids.length-1;e<r;){var i=e+r>>1;this.ids[i]>=t?r=i:e=i+1}for(var n=[];this.ids[e]===t;){var o=this.positions[3*e],a=this.positions[3*e+1],s=this.positions[3*e+2];n.push({index:o,start:a,end:s}),e++}return n},In.serialize=function(t,e){var r=new Float64Array(t.ids),i=new Uint32Array(t.positions);return function t(e,r,i,n){if(!(i>=n)){for(var o=e[i+n>>1],a=i-1,s=n+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;Cn(e,a,s),Cn(r,3*a,3*s),Cn(r,3*a+1,3*s+1),Cn(r,3*a+2,3*s+2)}t(e,r,i,s),t(e,r,s+1,n)}}(r,i,0,r.length-1),e.push(r.buffer,i.buffer),{ids:r,positions:i}},In.deserialize=function(t){var e=new In;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e},ai("FeaturePositionMap",In);var kn=function(t,e){this.gl=t.gl,this.location=e},Pn=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(kn),Mn=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(kn),Ln=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(kn),Dn=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(kn),Rn=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(kn),Bn=function(t){function e(e,r){t.call(this,e,r),this.current=Ot.transparent}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(kn),Fn=new Float32Array(16),On=function(t){function e(e,r){t.call(this,e,r),this.current=Fn}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(kn);function Un(t){return[zn(255*t.r,255*t.g),zn(255*t.b,255*t.a)]}var Vn=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0};Vn.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Vn.prototype.setConstantPatternPositions=function(){},Vn.prototype.populatePaintArray=function(){},Vn.prototype.updatePaintArray=function(){},Vn.prototype.upload=function(){},Vn.prototype.destroy=function(){},Vn.prototype.setUniforms=function(t,e,r,i){e.set(i.constantOr(this.value))},Vn.prototype.getBinding=function(t,e){return"color"===this.type?new Bn(t,e):new Mn(t,e)},Vn.serialize=function(t){var e=t.value,r=t.names,i=t.type;return{value:ui(e),names:r,type:i}},Vn.deserialize=function(t){var e=t.value,r=t.names,i=t.type;return new Vn(li(e),r,i)};var Nn=function(t,e,r){this.value=t,this.names=e,this.uniformNames=this.names.map(function(t){return"u_"+t}),this.type=r,this.maxValue=-1/0,this.patternPositions={patternTo:null,patternFrom:null}};Nn.prototype.defines=function(){return this.names.map(function(t){return"#define HAS_UNIFORM_u_"+t})},Nn.prototype.populatePaintArray=function(){},Nn.prototype.updatePaintArray=function(){},Nn.prototype.upload=function(){},Nn.prototype.destroy=function(){},Nn.prototype.setConstantPatternPositions=function(t,e){this.patternPositions.patternTo=t.tlbr,this.patternPositions.patternFrom=e.tlbr},Nn.prototype.setUniforms=function(t,e,r,i,n){var o=this.patternPositions;"u_pattern_to"===n&&o.patternTo&&e.set(o.patternTo),"u_pattern_from"===n&&o.patternFrom&&e.set(o.patternFrom)},Nn.prototype.getBinding=function(t,e){return new Rn(t,e)};var jn=function(t,e,r,i){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t}),this.maxValue=-1/0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new i};jn.prototype.defines=function(){return[]},jn.prototype.setConstantPatternPositions=function(){},jn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,i=r.length;r.reserve(t);var n=this.expression.evaluate(new Ei(0),e,{});if("color"===this.type)for(var o=Un(n),a=i;a<t;a++)r.emplaceBack(o[0],o[1]);else{for(var s=i;s<t;s++)r.emplaceBack(n);this.maxValue=Math.max(this.maxValue,n)}},jn.prototype.updatePaintArray=function(t,e,r,i){var n=this.paintVertexArray,o=this.expression.evaluate({zoom:0},r,i);if("color"===this.type)for(var a=Un(o),s=t;s<e;s++)n.emplace(s,a[0],a[1]);else{for(var u=t;u<e;u++)n.emplace(u,o);this.maxValue=Math.max(this.maxValue,o)}},jn.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},jn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},jn.prototype.setUniforms=function(t,e){e.set(0)},jn.prototype.getBinding=function(t,e){return new Mn(t,e)};var qn=function(t,e,r,i,n,o){this.expression=t,this.names=e,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=-1/0;var a=o;this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?4:2,offset:0}}),this.paintVertexArray=new a};qn.prototype.defines=function(){return[]},qn.prototype.setConstantPatternPositions=function(){},qn.prototype.populatePaintArray=function(t,e){var r=this.paintVertexArray,i=r.length;r.reserve(t);var n=this.expression.evaluate(new Ei(this.zoom),e,{}),o=this.expression.evaluate(new Ei(this.zoom+1),e,{});if("color"===this.type)for(var a=Un(n),s=Un(o),u=i;u<t;u++)r.emplaceBack(a[0],a[1],s[0],s[1]);else{for(var l=i;l<t;l++)r.emplaceBack(n,o);this.maxValue=Math.max(this.maxValue,n,o)}},qn.prototype.updatePaintArray=function(t,e,r,i){var n=this.paintVertexArray,o=this.expression.evaluate({zoom:this.zoom},r,i),a=this.expression.evaluate({zoom:this.zoom+1},r,i);if("color"===this.type)for(var s=Un(o),u=Un(a),l=t;l<e;l++)n.emplace(l,s[0],s[1],u[0],u[1]);else{for(var p=t;p<e;p++)n.emplace(p,o,a);this.maxValue=Math.max(this.maxValue,o,a)}},qn.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},qn.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},qn.prototype.interpolationFactor=function(t){return this.useIntegerZoom?this.expression.interpolationFactor(Math.floor(t),this.zoom,this.zoom+1):this.expression.interpolationFactor(t,this.zoom,this.zoom+1)},qn.prototype.setUniforms=function(t,e,r){e.set(this.interpolationFactor(r.zoom))},qn.prototype.getBinding=function(t,e){return new Mn(t,e)};var Zn=function(t,e,r,i,n,o,a){this.expression=t,this.names=e,this.type=r,this.uniformNames=this.names.map(function(t){return"a_"+t+"_t"}),this.useIntegerZoom=i,this.zoom=n,this.maxValue=-1/0,this.layerId=a,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Uint16",components:4,offset:0}}),this.zoomInPaintVertexArray=new o,this.zoomOutPaintVertexArray=new o};Zn.prototype.defines=function(){return[]},Zn.prototype.setConstantPatternPositions=function(){},Zn.prototype.populatePaintArray=function(t,e,r){var i=this.zoomInPaintVertexArray,n=this.zoomOutPaintVertexArray,o=this.layerId,a=i.length;if(i.reserve(t),n.reserve(t),r&&e.patterns&&e.patterns[o]){var s=e.patterns[o],u=s.min,l=s.mid,p=s.max,c=r[u],h=r[l],f=r[p];if(!c||!h||!f)return;for(var d=a;d<t;d++)i.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],c.tl[0],c.tl[1],c.br[0],c.br[1]),n.emplaceBack(h.tl[0],h.tl[1],h.br[0],h.br[1],f.tl[0],f.tl[1],f.br[0],f.br[1])}},Zn.prototype.updatePaintArray=function(t,e,r,i,n){var o=this.zoomInPaintVertexArray,a=this.zoomOutPaintVertexArray,s=this.layerId;if(n&&r.patterns&&r.patterns[s]){var u=r.patterns[s],l=u.min,p=u.mid,c=u.max,h=n[l],f=n[p],d=n[c];if(!h||!f||!d)return;for(var m=t;m<e;m++)o.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],h.tl[0],h.tl[1],h.br[0],h.br[1]),a.emplace(m,f.tl[0],f.tl[1],f.br[0],f.br[1],d.tl[0],d.tl[1],d.br[0],d.br[1])}},Zn.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Zn.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()},Zn.prototype.setUniforms=function(t,e){e.set(0)},Zn.prototype.getBinding=function(t,e){return new Mn(t,e)};var Gn=function(){this.binders={},this.cacheKey="",this._buffers=[],this._featureMap=new In,this._bufferOffset=0};Gn.createDynamic=function(t,e,r){var i=new Gn,n=[];for(var o in t.paint._values)if(r(o)){var a=t.paint.get(o);if(a instanceof ki&&er(a.property.specification)){var s=Wn(o,t.type),u=a.property.specification.type,l=a.property.useIntegerZoom;if("cross-faded"===a.property.specification["property-type"]||"cross-faded-data-driven"===a.property.specification["property-type"])if("constant"===a.value.kind)i.binders[o]=new Nn(a.value.value,s,u),n.push("/u_"+o);else{var p=Kn(o,u,"source");i.binders[o]=new Zn(a.value,s,u,l,e,p,t.id),n.push("/a_"+o)}else if("constant"===a.value.kind)i.binders[o]=new Vn(a.value.value,s,u),n.push("/u_"+o);else if("source"===a.value.kind){var c=Kn(o,u,"source");i.binders[o]=new jn(a.value,s,u,c),n.push("/a_"+o)}else{var h=Kn(o,u,"composite");i.binders[o]=new qn(a.value,s,u,l,e,h),n.push("/z_"+o)}}}return i.cacheKey=n.sort().join(""),i},Gn.prototype.populatePaintArrays=function(t,e,r,i){for(var n in this.binders)this.binders[n].populatePaintArray(t,e,i);void 0!==e.id&&this._featureMap.add(+e.id,r,this._bufferOffset,t),this._bufferOffset=t},Gn.prototype.setConstantPatternPositions=function(t,e){for(var r in this.binders)this.binders[r].setConstantPatternPositions(t,e)},Gn.prototype.updatePaintArrays=function(t,e,r,i){var n=!1;for(var o in t)for(var a=0,s=this._featureMap.getPositions(+o);a<s.length;a+=1){var u=s[a],l=e.feature(u.index);for(var p in this.binders){var c=this.binders[p];if(!(c instanceof Vn||c instanceof Nn)&&!0===c.expression.isStateDependent){var h=r.paint.get(p);c.expression=h.value,c.updatePaintArray(u.start,u.end,l,t[o],i),n=!0}}}return n},Gn.prototype.defines=function(){var t=[];for(var e in this.binders)t.push.apply(t,this.binders[e].defines());return t},Gn.prototype.getPaintVertexBuffers=function(){return this._buffers},Gn.prototype.getUniforms=function(t,e){var r={};for(var i in this.binders)for(var n=this.binders[i],o=0,a=n.uniformNames;o<a.length;o+=1){var s=a[o];r[s]=n.getBinding(t,e[s])}return r},Gn.prototype.setUniforms=function(t,e,r,i){for(var n in this.binders)for(var o=this.binders[n],a=0,s=o.uniformNames;a<s.length;a+=1){var u=s[a];o.setUniforms(t,e[u],i,r.get(n),u)}},Gn.prototype.updatePatternPaintBuffers=function(t){var e=[];for(var r in this.binders){var i=this.binders[r];if(i instanceof Zn){var n=2===t.fromScale?i.zoomInPaintVertexBuffer:i.zoomOutPaintVertexBuffer;n&&e.push(n)}else(i instanceof jn||i instanceof qn)&&i.paintVertexBuffer&&e.push(i.paintVertexBuffer)}this._buffers=e},Gn.prototype.upload=function(t){for(var e in this.binders)this.binders[e].upload(t);var r=[];for(var i in this.binders){var n=this.binders[i];(n instanceof jn||n instanceof qn)&&n.paintVertexBuffer&&r.push(n.paintVertexBuffer)}this._buffers=r},Gn.prototype.destroy=function(){for(var t in this.binders)this.binders[t].destroy()};var Xn=function(t,e,r,i){void 0===i&&(i=function(){return!0}),this.programConfigurations={};for(var n=0,o=e;n<o.length;n+=1){var a=o[n];this.programConfigurations[a.id]=Gn.createDynamic(a,r,i),this.programConfigurations[a.id].layoutAttributes=t}this.needsUpload=!1};function Wn(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from"],"fill-pattern":["pattern_to","pattern_from"],"fill-extrusion-pattern":["pattern_to","pattern_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function Kn(t,e,r){var i={color:{source:pn,composite:cn},number:{source:nn,composite:pn}},n=function(t){return{"line-pattern":{source:Ki,composite:Ki},"fill-pattern":{source:Ki,composite:Ki},"fill-extrusion-pattern":{source:Ki,composite:Ki}}[t]}(t);return n&&n[r]||i[e][r]}Xn.prototype.populatePaintArrays=function(t,e,r,i){for(var n in this.programConfigurations)this.programConfigurations[n].populatePaintArrays(t,e,r,i);this.needsUpload=!0},Xn.prototype.updatePaintArrays=function(t,e,r,i){for(var n=0,o=r;n<o.length;n+=1){var a=o[n];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,e,a,i)||this.needsUpload}},Xn.prototype.get=function(t){return this.programConfigurations[t]},Xn.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},Xn.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},ai("ConstantBinder",Vn),ai("CrossFadedConstantBinder",Nn),ai("SourceExpressionBinder",jn),ai("CrossFadedCompositeBinder",Zn),ai("CompositeExpressionBinder",qn),ai("ProgramConfiguration",Gn,{omit:["_buffers"]}),ai("ProgramConfigurationSet",Xn);var Hn=8192,Yn={min:-1*Math.pow(2,15),max:Math.pow(2,15)-1};function Jn(t){for(var e=Hn/t.extent,r=t.loadGeometry(),i=0;i<r.length;i++)for(var n=r[i],o=0;o<n.length;o++){var a=n[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<Yn.min||a.x>Yn.max||a.y<Yn.min||a.y>Yn.max)&&w("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function $n(t,e,r,i,n){t.emplaceBack(2*e+(i+1)/2,2*r+(n+1)/2)}var Qn=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Zi,this.indexArray=new sn,this.segments=new An,this.programConfigurations=new Xn(Tn,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function to(t,e){for(var r=0;r<t.length;r++)if(lo(e,t[r]))return!0;for(var i=0;i<e.length;i++)if(lo(t,e[i]))return!0;return!!no(t,e)}function eo(t,e,r){return!!lo(t,e)||!!ao(e,t,r)}function ro(t,e){if(1===t.length)return uo(e,t[0]);for(var r=0;r<e.length;r++)for(var i=e[r],n=0;n<i.length;n++)if(lo(t,i[n]))return!0;for(var o=0;o<t.length;o++)if(uo(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(no(t,e[a]))return!0;return!1}function io(t,e,r){if(t.length>1){if(no(t,e))return!0;for(var i=0;i<e.length;i++)if(ao(e[i],t,r))return!0}for(var n=0;n<t.length;n++)if(ao(t[n],e,r))return!0;return!1}function no(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var i=t[r],n=t[r+1],o=0;o<e.length-1;o++)if(oo(i,n,e[o],e[o+1]))return!0;return!1}function oo(t,e,r,i){return E(t,r,i)!==E(e,r,i)&&E(t,e,r)!==E(t,e,i)}function ao(t,e,r){var i=r*r;if(1===e.length)return t.distSqr(e[0])<i;for(var n=1;n<e.length;n++)if(so(t,e[n-1],e[n])<i)return!0;return!1}function so(t,e,r){var i=e.distSqr(r);if(0===i)return t.distSqr(e);var n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return n<0?t.distSqr(e):n>1?t.distSqr(r):t.distSqr(r.sub(e)._mult(n)._add(e))}function uo(t,e){for(var r,i,n,o=!1,a=0;a<t.length;a++)for(var s=0,u=(r=t[a]).length-1;s<r.length;u=s++)i=r[s],n=r[u],i.y>e.y!=n.y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}function lo(t,e){for(var r=!1,i=0,n=t.length-1;i<t.length;n=i++){var o=t[i],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function po(t,e,r){var i=r[0],n=r[2];if(t.x<i.x&&e.x<i.x||t.x>n.x&&e.x>n.x||t.y<i.y&&e.y<i.y||t.y>n.y&&e.y>n.y)return!1;var o=E(t,e,r[0]);return o!==E(t,e,r[1])||o!==E(t,e,r[2])||o!==E(t,e,r[3])}function co(t,e,r){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:r.programConfigurations.get(e.id).binders[t].maxValue}function ho(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function fo(t,e,r,i,o){if(!e[0]&&!e[1])return t;var a=n.convert(e)._mult(o);"viewport"===r&&a._rotate(-i);for(var s=[],u=0;u<t.length;u++){var l=t[u];s.push(l.sub(a))}return s}Qn.prototype.populate=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ei(this.zoom),o)){var u=Jn(o);this.addFeature(o,u,a),e.featureIndex.insert(o,u,a,s,this.index)}}},Qn.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Qn.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Qn.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Qn.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Tn),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Qn.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Qn.prototype.addFeature=function(t,e,r){for(var i=0,n=e;i<n.length;i+=1)for(var o=0,a=n[i];o<a.length;o+=1){var s=a[o],u=s.x,l=s.y;if(!(u<0||u>=Hn||l<0||l>=Hn)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=p.vertexLength;$n(this.layoutVertexArray,u,l,-1,-1),$n(this.layoutVertexArray,u,l,1,-1),$n(this.layoutVertexArray,u,l,1,1),$n(this.layoutVertexArray,u,l,-1,1),this.indexArray.emplaceBack(c,c+1,c+2),this.indexArray.emplaceBack(c,c+3,c+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{})},ai("CircleBucket",Qn,{omit:["layers"]});var mo={paint:new Fi({"circle-radius":new Li(yt.paint_circle["circle-radius"]),"circle-color":new Li(yt.paint_circle["circle-color"]),"circle-blur":new Li(yt.paint_circle["circle-blur"]),"circle-opacity":new Li(yt.paint_circle["circle-opacity"]),"circle-translate":new Mi(yt.paint_circle["circle-translate"]),"circle-translate-anchor":new Mi(yt.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Mi(yt.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Mi(yt.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Li(yt.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Li(yt.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Li(yt.paint_circle["circle-stroke-opacity"])})},yo="undefined"!=typeof Float32Array?Float32Array:Array;function _o(){var t=new yo(9);return yo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}function vo(){var t=new yo(3);return yo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function go(t,e,r){var i=new yo(3);return i[0]=t,i[1]=e,i[2]=r,i}function xo(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,t[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,t[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,t[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,t}function bo(){var t=new yo(4);return yo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}Math.PI,vo(),function(){var t;t=new yo(4),yo!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}(),vo(),go(1,0,0),go(0,1,0),bo(),bo(),_o(),function(){var t;t=new yo(2),yo!=Float32Array&&(t[0]=0,t[1]=0)}();var wo=function(t){function e(e){t.call(this,e,mo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new Qn(t)},e.prototype.queryRadius=function(t){var e=t;return co("circle-radius",this,e)+co("circle-stroke-width",this,e)+ho(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a,s){for(var u=fo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),l=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),p="map"===this.paint.get("circle-pitch-alignment"),c=p?u:function(t,e){return u.map(function(t){return Eo(t,e)})}(0,s),h=p?l*a:l,f=0,d=i;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var _=y[m],v=p?_:Eo(_,s),g=h,x=xo([],[_.x,_.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?g*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(g*=o.cameraToCenterDistance/x[3]),eo(c,v,g))return!0}return!1},e}(Oi);function Eo(t,e){var r=xo([],[t.x,t.y,0,1],e);return new n(r[0]/r[3],r[1]/r[3])}var So=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Qn);function To(t,e,r,i){var n=e.width,o=e.height;if(i){if(i.length!==n*o*r)throw new RangeError("mismatched image size")}else i=new Uint8Array(n*o*r);return t.width=n,t.height=o,t.data=i,t}function Ao(t,e,r){var i=e.width,n=e.height;if(i!==t.width||n!==t.height){var o=To({},{width:i,height:n},r);zo(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,i),height:Math.min(t.height,n)},r),t.width=i,t.height=n,t.data=o.data}}function zo(t,e,r,i,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,u=0;u<n.height;u++)for(var l=((r.y+u)*t.width+r.x)*o,p=((i.y+u)*e.width+i.x)*o,c=0;c<n.width*o;c++)s[p+c]=a[l+c];return e}ai("HeatmapBucket",So,{omit:["layers"]});var Io=function(t,e){To(this,t,1,e)};Io.prototype.resize=function(t){Ao(this,t,1)},Io.prototype.clone=function(){return new Io({width:this.width,height:this.height},new Uint8Array(this.data))},Io.copy=function(t,e,r,i,n){zo(t,e,r,i,n,1)};var Co=function(t,e){To(this,t,4,e)};Co.prototype.resize=function(t){Ao(this,t,4)},Co.prototype.clone=function(){return new Co({width:this.width,height:this.height},new Uint8Array(this.data))},Co.copy=function(t,e,r,i,n){zo(t,e,r,i,n,4)},ai("AlphaImage",Io),ai("RGBAImage",Co);var ko={paint:new Fi({"heatmap-radius":new Li(yt.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Li(yt.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Mi(yt.paint_heatmap["heatmap-intensity"]),"heatmap-color":new Bi(yt.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Mi(yt.paint_heatmap["heatmap-opacity"])})};function Po(t,e){for(var r=new Uint8Array(1024),i={},n=0,o=0;n<256;n++,o+=4){i[e]=n/255;var a=t.evaluate(i);r[o+0]=Math.floor(255*a.r/a.a),r[o+1]=Math.floor(255*a.g/a.a),r[o+2]=Math.floor(255*a.b/a.a),r[o+3]=Math.floor(255*a.a)}return new Co({width:256,height:1},r)}var Mo=function(t){function e(e){t.call(this,e,ko),this._updateColorRamp()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new So(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){var t=this._transitionablePaint._values["heatmap-color"].value.expression;this.colorRamp=Po(t,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(Oi),Lo={paint:new Fi({"hillshade-illumination-direction":new Mi(yt.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Mi(yt.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Mi(yt.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Mi(yt.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Mi(yt.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Mi(yt.paint_hillshade["hillshade-accent-color"])})},Do=function(t){function e(e){t.call(this,e,Lo)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(Oi),Ro=ji([{name:"a_pos",components:2,type:"Int16"}],4),Bo=Ro.members,Fo=(Ro.size,Ro.alignment,Uo),Oo=Uo;function Uo(t,e,r){r=r||2;var i,n,o,a,s,u,l,p=e&&e.length,c=p?e[0]*r:t.length,h=Vo(t,0,c,r,!0),f=[];if(!h||h.next===h.prev)return f;if(p&&(h=function(t,e,r,i){var n,o,a,s=[];for(n=0,o=e.length;n<o;n++)(a=Vo(t,e[n]*i,n<o-1?e[n+1]*i:t.length,i,!1))===a.next&&(a.steiner=!0),s.push(Yo(a));for(s.sort(Wo),n=0;n<s.length;n++)Ko(s[n],r),r=No(r,r.next);return r}(t,e,h,r)),t.length>80*r){i=o=t[0],n=a=t[1];for(var d=r;d<c;d+=r)(s=t[d])<i&&(i=s),(u=t[d+1])<n&&(n=u),s>o&&(o=s),u>a&&(a=u);l=0!==(l=Math.max(o-i,a-n))?1/l:0}return jo(h,f,r,i,n,l),f}function Vo(t,e,r,i,n){var o,a;if(n===sa(t,e,r,i)>0)for(o=e;o<r;o+=i)a=na(o,t[o],t[o+1],a);else for(o=r-i;o>=e;o-=i)a=na(o,t[o],t[o+1],a);return a&&ta(a,a.next)&&(oa(a),a=a.next),a}function No(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!ta(i,i.next)&&0!==Qo(i.prev,i,i.next))i=i.next;else{if(oa(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function jo(t,e,r,i,n,o,a){if(t){!a&&o&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=Ho(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,a,s,u,l=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,i=r,s=0,e=0;e<l&&(s++,i=i.nextZ);e++);for(u=l;s>0||u>0&&i;)0!==s&&(0===u||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,u--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,l*=2}while(a>1)}(n)}(t,i,n,o);for(var s,u,l=t;t.prev!==t.next;)if(s=t.prev,u=t.next,o?Zo(t,i,n,o):qo(t))e.push(s.i/r),e.push(t.i/r),e.push(u.i/r),oa(t),t=u.next,l=u.next;else if((t=u)===l){a?1===a?jo(t=Go(t,e,r),e,r,i,n,o,2):2===a&&Xo(t,e,r,i,n,o):jo(No(t),e,r,i,n,o,1);break}}}function qo(t){var e=t.prev,r=t,i=t.next;if(Qo(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(Jo(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&Qo(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function Zo(t,e,r,i){var n=t.prev,o=t,a=t.next;if(Qo(n,o,a)>=0)return!1;for(var s=n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,u=n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,l=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,p=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,c=Ho(s,u,e,r,i),h=Ho(l,p,e,r,i),f=t.prevZ,d=t.nextZ;f&&f.z>=c&&d&&d.z<=h;){if(f!==t.prev&&f!==t.next&&Jo(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,d!==t.prev&&d!==t.next&&Jo(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&Jo(n.x,n.y,o.x,o.y,a.x,a.y,f.x,f.y)&&Qo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;d&&d.z<=h;){if(d!==t.prev&&d!==t.next&&Jo(n.x,n.y,o.x,o.y,a.x,a.y,d.x,d.y)&&Qo(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function Go(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!ta(n,o)&&ea(n,i,i.next,o)&&ra(n,o)&&ra(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),oa(i),oa(i.next),i=t=o),i=i.next}while(i!==t);return i}function Xo(t,e,r,i,n,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&$o(a,s)){var u=ia(a,s);return a=No(a,a.next),u=No(u,u.next),jo(a,e,r,i,n,o),void jo(u,e,r,i,n,o)}s=s.next}a=a.next}while(a!==t)}function Wo(t,e){return t.x-e.x}function Ko(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>a){if(a=s,s===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===a)return r.prev;var u,l=r,p=r.x,c=r.y,h=1/0;for(i=r.next;i!==l;)n>=i.x&&i.x>=p&&n!==i.x&&Jo(o<c?n:a,o,p,c,o<c?a:n,o,i.x,i.y)&&((u=Math.abs(o-i.y)/(n-i.x))<h||u===h&&i.x>r.x)&&ra(i,t)&&(r=i,h=u),i=i.next;return r}(t,e)){var r=ia(e,t);No(r,r.next)}}function Ho(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Yo(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function Jo(t,e,r,i,n,o,a,s){return(n-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(n-a)*(i-s)>=0}function $o(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&ea(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&ra(t,e)&&ra(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)}function Qo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function ta(t,e){return t.x===e.x&&t.y===e.y}function ea(t,e,r,i){return!!(ta(t,e)&&ta(r,i)||ta(t,i)&&ta(r,e))||Qo(t,e,r)>0!=Qo(t,e,i)>0&&Qo(r,i,t)>0!=Qo(r,i,e)>0}function ra(t,e){return Qo(t.prev,t,t.next)<0?Qo(t,e,t.next)>=0&&Qo(t,t.prev,e)>=0:Qo(t,e,t.prev)<0||Qo(t,t.next,e)<0}function ia(t,e){var r=new aa(t.i,t.x,t.y),i=new aa(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function na(t,e,r,i){var n=new aa(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function oa(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function aa(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function sa(t,e,r,i){for(var n=0,o=e,a=r-i;o<r;o+=i)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}function ua(t,e,r,i,n){!function t(e,r,i,n,o){for(;n>i;){if(n-i>600){var a=n-i+1,s=r-i+1,u=Math.log(a),l=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-s*l/a+p)),Math.min(n,Math.floor(r+(a-s)*l/a+p)),o)}var c=e[r],h=i,f=n;for(la(e,i,r),o(e[n],c)>0&&la(e,i,n);h<f;){for(la(e,h,f),h++,f--;o(e[h],c)<0;)h++;for(;o(e[f],c)>0;)f--}0===o(e[i],c)?la(e,i,f):la(e,++f,n),f<=r&&(i=f+1),r<=f&&(n=f-1)}}(t,e,r||0,i||t.length-1,n||pa)}function la(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function pa(t,e){return t<e?-1:t>e?1:0}function ca(t,e){var r=t.length;if(r<=1)return[t];for(var i,n,o=[],a=0;a<r;a++){var s=S(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===n&&(n=s<0),n===s<0?(i&&o.push(i),i=[t[a]]):i.push(t[a]))}if(i&&o.push(i),e>1)for(var u=0;u<o.length;u++)o[u].length<=e||(ua(o[u],e,1,o[u].length-1,ha),o[u]=o[u].slice(0,e));return o}function ha(t,e){return e.area-t.area}function fa(t,e,r){for(var i=r.patternDependencies,n=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(n=!0);var u=s.constantOr(null);u&&(n=!0,i[u.to]=!0,i[u.from]=!0)}return n}function da(t,e,r,i,n){for(var o=n.patternDependencies,a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.paint.get(t+"-pattern").value;if("constant"!==l.kind){var p=l.evaluate({zoom:i-1},r,{}),c=l.evaluate({zoom:i},r,{}),h=l.evaluate({zoom:i+1},r,{});o[p]=!0,o[c]=!0,o[h]=!0,r.patterns[u.id]={min:p,mid:c,max:h}}}return r}Uo.deviation=function(t,e,r,i){var n=e&&e.length,o=n?e[0]*r:t.length,a=Math.abs(sa(t,0,o,r));if(n)for(var s=0,u=e.length;s<u;s++){var l=e[s]*r,p=s<u-1?e[s+1]*r:t.length;a-=Math.abs(sa(t,l,p,r))}var c=0;for(s=0;s<i.length;s+=3){var h=i[s]*r,f=i[s+1]*r,d=i[s+2]*r;c+=Math.abs((t[h]-t[d])*(t[f+1]-t[h+1])-(t[h]-t[f])*(t[d+1]-t[h+1]))}return 0===a&&0===c?0:Math.abs((c-a)/a)},Uo.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[n][o][a]);n>0&&(i+=t[n-1].length,r.holes.push(i))}return r},Fo.default=Oo;var ma=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Zi,this.indexArray=new sn,this.indexArray2=new un,this.programConfigurations=new Xn(Bo,t.layers,t.zoom),this.segments=new An,this.segments2=new An,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};ma.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("fill",this.layers,e);for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ei(this.zoom),o)){var u=Jn(o),l={sourceLayerIndex:s,index:a,geometry:u,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(l.id=o.id),this.hasPattern?this.features.push(da("fill",this.layers,l,this.zoom,e)):this.addFeature(l,u,a,{}),e.featureIndex.insert(o,u,a,s,this.index)}}},ma.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},ma.prototype.addFeatures=function(t,e){for(var r=0,i=this.features;r<i.length;r+=1){var n=i[r],o=n.geometry;this.addFeature(n,o,n.index,e)}},ma.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},ma.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},ma.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Bo),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},ma.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},ma.prototype.addFeature=function(t,e,r,i){for(var n=0,o=ca(e,500);n<o.length;n+=1){for(var a=o[n],s=0,u=0,l=a;u<l.length;u+=1)s+=l[u].length;for(var p=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray),c=p.vertexLength,h=[],f=[],d=0,m=a;d<m.length;d+=1){var y=m[d];if(0!==y.length){y!==a[0]&&f.push(h.length/2);var _=this.segments2.prepareSegment(y.length,this.layoutVertexArray,this.indexArray2),v=_.vertexLength;this.layoutVertexArray.emplaceBack(y[0].x,y[0].y),this.indexArray2.emplaceBack(v+y.length-1,v),h.push(y[0].x),h.push(y[0].y);for(var g=1;g<y.length;g++)this.layoutVertexArray.emplaceBack(y[g].x,y[g].y),this.indexArray2.emplaceBack(v+g-1,v+g),h.push(y[g].x),h.push(y[g].y);_.vertexLength+=y.length,_.primitiveLength+=y.length}}for(var x=Fo(h,f),b=0;b<x.length;b+=3)this.indexArray.emplaceBack(c+x[b],c+x[b+1],c+x[b+2]);p.vertexLength+=s,p.primitiveLength+=x.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i)},ai("FillBucket",ma,{omit:["layers","features"]});var ya={paint:new Fi({"fill-antialias":new Mi(yt.paint_fill["fill-antialias"]),"fill-opacity":new Li(yt.paint_fill["fill-opacity"]),"fill-color":new Li(yt.paint_fill["fill-color"]),"fill-outline-color":new Li(yt.paint_fill["fill-outline-color"]),"fill-translate":new Mi(yt.paint_fill["fill-translate"]),"fill-translate-anchor":new Mi(yt.paint_fill["fill-translate-anchor"]),"fill-pattern":new Di(yt.paint_fill["fill-pattern"])})},_a=function(t){function e(e){t.call(this,e,ya)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e);var r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new ma(t)},e.prototype.queryRadius=function(){return ho(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a){return ro(fo(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),i)},e}(Oi),va=ji([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ga=va.members,xa=(va.size,va.alignment,Math.pow(2,13));function ba(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,2*Math.floor(i*xa)+a,n*xa*2,o*xa*2,Math.round(s))}var wa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Xi,this.indexArray=new sn,this.programConfigurations=new Xn(ga,t.layers,t.zoom),this.segments=new An,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Ea(t,e){return t.x===e.x&&(t.x<0||t.x>Hn)||t.y===e.y&&(t.y<0||t.y>Hn)}function Sa(t){return t.every(function(t){return t.x<0})||t.every(function(t){return t.x>Hn})||t.every(function(t){return t.y<0})||t.every(function(t){return t.y>Hn})}wa.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("fill-extrusion",this.layers,e);for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ei(this.zoom),o)){var u=Jn(o),l={sourceLayerIndex:s,index:a,geometry:u,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(l.id=o.id),this.hasPattern?this.features.push(da("fill-extrusion",this.layers,l,this.zoom,e)):this.addFeature(l,u,a,{}),e.featureIndex.insert(o,u,a,s,this.index,!0)}}},wa.prototype.addFeatures=function(t,e){for(var r=0,i=this.features;r<i.length;r+=1){var n=i[r],o=n.geometry;this.addFeature(n,o,n.index,e)}},wa.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},wa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},wa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},wa.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ga),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},wa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},wa.prototype.addFeature=function(t,e,r,i){for(var n=0,o=ca(e,500);n<o.length;n+=1){for(var a=o[n],s=0,u=0,l=a;u<l.length;u+=1)s+=l[u].length;for(var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),c=0,h=a;c<h.length;c+=1){var f=h[c];if(0!==f.length&&!Sa(f))for(var d=0,m=0;m<f.length;m++){var y=f[m];if(m>=1){var _=f[m-1];if(!Ea(y,_)){p.vertexLength+4>An.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=y.sub(_)._perp()._unit(),g=_.dist(y);d+g>32768&&(d=0),ba(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,0,d),ba(this.layoutVertexArray,y.x,y.y,v.x,v.y,0,1,d),d+=g,ba(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,0,d),ba(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,1,d);var x=p.vertexLength;this.indexArray.emplaceBack(x,x+2,x+1),this.indexArray.emplaceBack(x+1,x+2,x+3),p.vertexLength+=4,p.primitiveLength+=2}}}}p.vertexLength+s>An.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(s,this.layoutVertexArray,this.indexArray));for(var b=[],w=[],E=p.vertexLength,S=0,T=a;S<T.length;S+=1){var A=T[S];if(0!==A.length){A!==a[0]&&w.push(b.length/2);for(var z=0;z<A.length;z++){var I=A[z];ba(this.layoutVertexArray,I.x,I.y,0,0,1,1,0),b.push(I.x),b.push(I.y)}}}for(var C=Fo(b,w),k=0;k<C.length;k+=3)this.indexArray.emplaceBack(E+C[k],E+C[k+2],E+C[k+1]);p.primitiveLength+=C.length/3,p.vertexLength+=s}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,i)},ai("FillExtrusionBucket",wa,{omit:["layers","features"]});var Ta={paint:new Fi({"fill-extrusion-opacity":new Mi(yt["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Li(yt["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Mi(yt["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Mi(yt["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Di(yt["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Li(yt["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Li(yt["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Mi(yt["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},Aa=function(t){function e(e){t.call(this,e,Ta)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.createBucket=function(t){return new wa(t)},e.prototype.queryRadius=function(){return ho(this.paint.get("fill-extrusion-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s,u){var l=fo(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),p=this.paint.get("fill-extrusion-height").evaluate(e,r),c=this.paint.get("fill-extrusion-base").evaluate(e,r),h=function(t,e,r,i){for(var o=[],a=0,s=t;a<s.length;a+=1){var u=s[a],l=[u.x,u.y,0,1];xo(l,l,e),o.push(new n(l[0]/l[3],l[1]/l[3]))}return o}(l,u),f=function(t,e,r,i){for(var o=[],a=[],s=i[8]*e,u=i[9]*e,l=i[10]*e,p=i[11]*e,c=i[8]*r,h=i[9]*r,f=i[10]*r,d=i[11]*r,m=0,y=t;m<y.length;m+=1){for(var _=[],v=[],g=0,x=y[m];g<x.length;g+=1){var b=x[g],w=b.x,E=b.y,S=i[0]*w+i[4]*E+i[12],T=i[1]*w+i[5]*E+i[13],A=i[2]*w+i[6]*E+i[14],z=i[3]*w+i[7]*E+i[15],I=A+l,C=z+p,k=S+c,P=T+h,M=A+f,L=z+d,D=new n((S+s)/C,(T+u)/C);D.z=I/C,_.push(D);var R=new n(k/L,P/L);R.z=M/L,v.push(R)}o.push(_),a.push(v)}return[o,a]}(i,c,p,u);return function(t,e,r){var i=1/0;ro(r,e)&&(i=Ia(r,e[0]));for(var n=0;n<e.length;n++)for(var o=e[n],a=t[n],s=0;s<o.length-1;s++){var u=o[s],l=o[s+1],p=a[s],c=[u,l,a[s+1],p,u];to(r,c)&&(i=Math.min(i,Ia(r,c)))}return i!==1/0&&i}(f[0],f[1],h)},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("fill-extrusion-opacity")&&"none"!==this.visibility},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e}(Oi);function za(t,e){return t.x*e.x+t.y*e.y}function Ia(t,e){if(1===t.length){var r=e[0],i=e[1],n=e[3],o=t[0],a=i.sub(r),s=n.sub(r),u=o.sub(r),l=za(a,a),p=za(a,s),c=za(s,s),h=za(u,a),f=za(u,s),d=l*c-p*p,m=(c*h-p*f)/d,y=(l*f-p*h)/d,_=1-m-y;return r.z*_+i.z*m+n.z*y}for(var v=1/0,g=0,x=e;g<x.length;g+=1){var b=x[g];v=Math.min(v,b.z)}return v}var Ca=ji([{name:"a_pos_normal",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4),ka=Ca.members,Pa=(Ca.size,Ca.alignment,Ma);function Ma(t,e,r,i,n){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n,t.readFields(La,this,e)}function La(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function Da(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)e=t[n],i+=((r=t[a]).x-e.x)*(e.y+r.y);return i}Ma.types=["Unknown","Point","LineString","Polygon"],Ma.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,u=[];t.pos<r;){if(o<=0){var l=t.readVarint();i=7&l,o=l>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&u.push(e),e=[]),e.push(new n(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&u.push(e),u},Ma.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,u=1/0,l=-1/0;t.pos<e;){if(i<=0){var p=t.readVarint();r=7&p,i=p>>3}if(i--,1===r||2===r)(n+=t.readSVarint())<a&&(a=n),n>s&&(s=n),(o+=t.readSVarint())<u&&(u=o),o>l&&(l=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,u,s,l]},Ma.prototype.toGeoJSON=function(t,e,r){var i,n,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,u=this.loadGeometry(),l=Ma.types[this.type];function p(t){for(var e=0;e<t.length;e++){var r=t[e],i=180-360*(r.y+s)/o;t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp(i*Math.PI/180))-90]}}switch(this.type){case 1:var c=[];for(i=0;i<u.length;i++)c[i]=u[i][0];p(u=c);break;case 2:for(i=0;i<u.length;i++)p(u[i]);break;case 3:for(u=function(t){var e=t.length;if(e<=1)return[t];for(var r,i,n=[],o=0;o<e;o++){var a=Da(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(r&&n.push(r),r=[t[o]]):r.push(t[o]))}return r&&n.push(r),n}(u),i=0;i<u.length;i++)for(n=0;n<u[i].length;n++)p(u[i][n])}1===u.length?u=u[0]:l="Multi"+l;var h={type:"Feature",geometry:{type:l,coordinates:u},properties:this.properties};return"id"in this&&(h.id=this.id),h};var Ra=Ba;function Ba(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(Fa,this,e),this.length=this._features.length}function Fa(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(r))}function Oa(t,e,r){if(3===t){var i=new Ra(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}Ba.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new Pa(this._pbf,e,this.extent,this._keys,this._values)};var Ua={VectorTile:function(t,e){this.layers=t.readFields(Oa,{},e)},VectorTileFeature:Pa,VectorTileLayer:Ra},Va=Ua.VectorTileFeature.types,Na=63,ja=Math.cos(Math.PI/180*37.5),qa=.5,Za=Math.pow(2,14)/qa;function Ga(t,e,r,i,n,o,a){t.emplaceBack(e.x,e.y,i?1:0,n?1:-1,Math.round(Na*r.x)+128,Math.round(Na*r.y)+128,1+(0===o?0:o<0?-1:1)|(a*qa&63)<<2,a*qa>>6)}var Xa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.features=[],this.hasPattern=!1,this.layoutVertexArray=new Wi,this.indexArray=new sn,this.programConfigurations=new Xn(ka,t.layers,t.zoom),this.segments=new An,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Wa(t,e){return(t/e.tileTotal*(e.end-e.start)+e.start)*(Za-1)}Xa.prototype.populate=function(t,e){this.features=[],this.hasPattern=fa("line",this.layers,e);for(var r=0,i=t;r<i.length;r+=1){var n=i[r],o=n.feature,a=n.index,s=n.sourceLayerIndex;if(this.layers[0]._featureFilter(new Ei(this.zoom),o)){var u=Jn(o),l={sourceLayerIndex:s,index:a,geometry:u,properties:o.properties,type:o.type,patterns:{}};void 0!==o.id&&(l.id=o.id),this.hasPattern?this.features.push(da("line",this.layers,l,this.zoom,e)):this.addFeature(l,u,a,{}),e.featureIndex.insert(o,u,a,s,this.index)}}},Xa.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Xa.prototype.addFeatures=function(t,e){for(var r=0,i=this.features;r<i.length;r+=1){var n=i[r],o=n.geometry;this.addFeature(n,o,n.index,e)}},Xa.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Xa.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Xa.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,ka),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Xa.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Xa.prototype.addFeature=function(t,e,r,i){for(var n=this.layers[0].layout,o=n.get("line-join").evaluate(t,{}),a=n.get("line-cap"),s=n.get("line-miter-limit"),u=n.get("line-round-limit"),l=0,p=e;l<p.length;l+=1){var c=p[l];this.addLine(c,t,o,a,s,u,r,i)}},Xa.prototype.addLine=function(t,e,r,i,n,o,a,s){var u=null;e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")&&(u={start:e.properties.mapbox_clip_start,end:e.properties.mapbox_clip_end,tileTotal:void 0});for(var l="Polygon"===Va[e.type],p=t.length;p>=2&&t[p-1].equals(t[p-2]);)p--;for(var c=0;c<p-1&&t[c].equals(t[c+1]);)c++;if(!(p<(l?3:2))){u&&(u.tileTotal=function(t,e,r){for(var i,n,o=0,a=c;a<r-1;a++)i=t[a],n=t[a+1],o+=i.dist(n);return o}(t,0,p)),"bevel"===r&&(n=1.05);var h=Hn/(512*this.overscaling)*15,f=t[c],d=this.segments.prepareSegment(10*p,this.layoutVertexArray,this.indexArray);this.distance=0;var m,y,_,v=i,g=l?"butt":i,x=!0,b=void 0,w=void 0,E=void 0,S=void 0;this.e1=this.e2=this.e3=-1,l&&(m=t[p-2],S=f.sub(m)._unit()._perp());for(var T=c;T<p;T++)if(!(w=l&&T===p-1?t[c+1]:t[T+1])||!t[T].equals(w)){S&&(E=S),m&&(b=m),m=t[T],S=w?w.sub(m)._unit()._perp():E;var A=(E=E||S).add(S);0===A.x&&0===A.y||A._unit();var z=A.x*S.x+A.y*S.y,I=0!==z?1/z:1/0,C=z<ja&&b&&w;if(C&&T>c){var k=m.dist(b);if(k>2*h){var P=m.sub(m.sub(b)._mult(h/k)._round());this.distance+=P.dist(b),this.addCurrentVertex(P,this.distance,E.mult(1),0,0,!1,d,u),b=P}}var M=b&&w,L=M?r:w?v:g;if(M&&"round"===L&&(I<o?L="miter":I<=2&&(L="fakeround")),"miter"===L&&I>n&&(L="bevel"),"bevel"===L&&(I>2&&(L="flipbevel"),I<n&&(L="miter")),b&&(this.distance+=m.dist(b)),"miter"===L)A._mult(I),this.addCurrentVertex(m,this.distance,A,0,0,!1,d,u);else if("flipbevel"===L){if(I>100)A=S.clone().mult(-1);else{var D=E.x*S.y-E.y*S.x>0?-1:1,R=I*E.add(S).mag()/E.sub(S).mag();A._perp()._mult(R*D)}this.addCurrentVertex(m,this.distance,A,0,0,!1,d,u),this.addCurrentVertex(m,this.distance,A.mult(-1),0,0,!1,d,u)}else if("bevel"===L||"fakeround"===L){var B=E.x*S.y-E.y*S.x>0,F=-Math.sqrt(I*I-1);if(B?(_=0,y=F):(y=0,_=F),x||this.addCurrentVertex(m,this.distance,E,y,_,!1,d,u),"fakeround"===L){for(var O=Math.floor(8*(.5-(z-.5))),U=void 0,V=0;V<O;V++)U=S.mult((V+1)/(O+1))._add(E)._unit(),this.addPieSliceVertex(m,this.distance,U,B,d,u);this.addPieSliceVertex(m,this.distance,A,B,d,u);for(var N=O-1;N>=0;N--)U=E.mult((N+1)/(O+1))._add(S)._unit(),this.addPieSliceVertex(m,this.distance,U,B,d,u)}w&&this.addCurrentVertex(m,this.distance,S,-y,-_,!1,d,u)}else"butt"===L?(x||this.addCurrentVertex(m,this.distance,E,0,0,!1,d,u),w&&this.addCurrentVertex(m,this.distance,S,0,0,!1,d,u)):"square"===L?(x||(this.addCurrentVertex(m,this.distance,E,1,1,!1,d,u),this.e1=this.e2=-1),w&&this.addCurrentVertex(m,this.distance,S,-1,-1,!1,d,u)):"round"===L&&(x||(this.addCurrentVertex(m,this.distance,E,0,0,!1,d,u),this.addCurrentVertex(m,this.distance,E,1,1,!0,d,u),this.e1=this.e2=-1),w&&(this.addCurrentVertex(m,this.distance,S,-1,-1,!0,d,u),this.addCurrentVertex(m,this.distance,S,0,0,!1,d,u)));if(C&&T<p-1){var j=m.dist(w);if(j>2*h){var q=m.add(w.sub(m)._mult(h/j)._round());this.distance+=q.dist(m),this.addCurrentVertex(q,this.distance,S.mult(1),0,0,!1,d,u),m=q}}x=!1}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,a,s)}},Xa.prototype.addCurrentVertex=function(t,e,r,i,n,o,a,s){var u,l=this.layoutVertexArray,p=this.indexArray;s&&(e=Wa(e,s)),u=r.clone(),i&&u._sub(r.perp()._mult(i)),Ga(l,t,u,o,!1,i,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,u=r.mult(-1),n&&u._sub(r.perp()._mult(n)),Ga(l,t,u,o,!0,-n,e),this.e3=a.vertexLength++,this.e1>=0&&this.e2>=0&&(p.emplaceBack(this.e1,this.e2,this.e3),a.primitiveLength++),this.e1=this.e2,this.e2=this.e3,e>Za/2&&!s&&(this.distance=0,this.addCurrentVertex(t,this.distance,r,i,n,o,a))},Xa.prototype.addPieSliceVertex=function(t,e,r,i,n,o){r=r.mult(i?-1:1);var a=this.layoutVertexArray,s=this.indexArray;o&&(e=Wa(e,o)),Ga(a,t,r,!1,i,0,e),this.e3=n.vertexLength++,this.e1>=0&&this.e2>=0&&(s.emplaceBack(this.e1,this.e2,this.e3),n.primitiveLength++),i?this.e2=this.e3:this.e1=this.e3},ai("LineBucket",Xa,{omit:["layers","features"]});var Ka=new Fi({"line-cap":new Mi(yt.layout_line["line-cap"]),"line-join":new Li(yt.layout_line["line-join"]),"line-miter-limit":new Mi(yt.layout_line["line-miter-limit"]),"line-round-limit":new Mi(yt.layout_line["line-round-limit"])}),Ha={paint:new Fi({"line-opacity":new Li(yt.paint_line["line-opacity"]),"line-color":new Li(yt.paint_line["line-color"]),"line-translate":new Mi(yt.paint_line["line-translate"]),"line-translate-anchor":new Mi(yt.paint_line["line-translate-anchor"]),"line-width":new Li(yt.paint_line["line-width"]),"line-gap-width":new Li(yt.paint_line["line-gap-width"]),"line-offset":new Li(yt.paint_line["line-offset"]),"line-blur":new Li(yt.paint_line["line-blur"]),"line-dasharray":new Ri(yt.paint_line["line-dasharray"]),"line-pattern":new Di(yt.paint_line["line-pattern"]),"line-gradient":new Bi(yt.paint_line["line-gradient"])}),layout:Ka},Ya=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new Ei(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,i,n){return r=c({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,i,n)},e}(Li))(Ha.paint.properties["line-width"].specification);Ya.useIntegerZoom=!0;var Ja=function(t){function e(e){t.call(this,e,Ha)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){var t=this._transitionablePaint._values["line-gradient"].value.expression;this.gradient=Po(t,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),this.paint._values["line-floorwidth"]=Ya.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Xa(t)},e.prototype.queryRadius=function(t){var e=t,r=$a(co("line-width",this,e),co("line-gap-width",this,e)),i=co("line-offset",this,e);return r/2+Math.abs(i)+ho(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s){var u=fo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),l=s/2*$a(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),p=this.paint.get("line-offset").evaluate(e,r);return p&&(i=function(t,e){for(var r=[],i=new n(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],u=0;u<a.length;u++){var l=a[u-1],p=a[u],c=a[u+1],h=0===u?i:p.sub(l)._unit()._perp(),f=u===a.length-1?i:c.sub(p)._unit()._perp(),d=h._add(f)._unit(),m=d.x*f.x+d.y*f.y;d._mult(1/m),s.push(d._mult(e)._add(p))}r.push(s)}return r}(i,p*s)),function(t,e,r){for(var i=0;i<e.length;i++){var n=e[i];if(t.length>=3)for(var o=0;o<n.length;o++)if(lo(t,n[o]))return!0;if(io(t,n,r))return!0}return!1}(u,i,l)},e}(Oi);function $a(t,e){return e>0?e+2*t:t}var Qa=ji([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"}]),ts=ji([{name:"a_projected_pos",components:3,type:"Float32"}],4),es=(ji([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),ji([{name:"a_placed",components:2,type:"Uint8"}],4)),rs=(ji([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"},{type:"Int16",name:"radius"},{type:"Int16",name:"signedDistanceFromAnchor"}]),ji([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),is=ji([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4);function ns(t,e,r){return t.sections.forEach(function(t){t.text=function(t,e,r){var i=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),wi.applyArabicShaping&&(t=wi.applyArabicShaping(t)),t}(t.text,e,r)}),t}ji([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"hidden"}]),ji([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"horizontalPlacedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint32",name:"crossTileID"}]),ji([{type:"Float32",name:"offsetX"}]),ji([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var os={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},as=function(t){function e(e,r,i,n){t.call(this,e,r),this.angle=i,void 0!==n&&(this.segment=n)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(n);function ss(t,e){var r=e.expression;if("constant"===r.kind)return{functionType:"constant",layoutSize:r.evaluate(new Ei(t+1))};if("source"===r.kind)return{functionType:"source"};for(var i=r.zoomStops,n=0;n<i.length&&i[n]<=t;)n++;for(var o=n=Math.max(0,n-1);o<i.length&&i[o]<t+1;)o++;o=Math.min(i.length-1,o);var a={min:i[n],max:i[o]};return"composite"===r.kind?{functionType:"composite",zoomRange:a,propertyValue:e.value}:{functionType:"camera",layoutSize:r.evaluate(new Ei(t+1)),zoomRange:a,sizeRange:{min:r.evaluate(new Ei(a.min)),max:r.evaluate(new Ei(a.max))},propertyValue:e.value}}ai("Anchor",as);var us=Ua.VectorTileFeature.types,ls=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function ps(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,Math.round(32*i),Math.round(32*n),o,a,s?s[0]:0,s?s[1]:0)}function cs(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}var hs=function(t){this.layoutVertexArray=new Hi,this.indexArray=new sn,this.programConfigurations=t,this.segments=new An,this.dynamicLayoutVertexArray=new Yi,this.opacityVertexArray=new Ji,this.placedSymbolArray=new mn};hs.prototype.upload=function(t,e,r,i){r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Qa.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,ts.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,ls,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(t)},hs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},ai("SymbolBuffers",hs);var fs=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new An,this.collisionVertexArray=new tn};fs.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,es.members,!0)},fs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},ai("CollisionBuffers",fs);var ds=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1;var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=ss(this.zoom,e["text-size"]),this.iconSizeData=ss(this.zoom,e["icon-size"]);var r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==n&&void 0!==i.constantOr(1);var o="viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey;this.sortFeaturesByY=o&&(r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement")),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id}),this.sourceID=t.sourceID};ds.prototype.createArrays=function(){this.text=new hs(new Xn(Qa.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new hs(new Xn(Qa.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.collisionBox=new fs(Qi,rs.members,un),this.collisionCircle=new fs(Qi,is.members,sn),this.glyphOffsetArray=new gn,this.lineVertexArray=new bn,this.symbolInstances=new _n},ds.prototype.calculateGlyphDependencies=function(t,e,r,i){for(var n=0;n<t.length;n++)if(e[t.charCodeAt(n)]=!0,r&&i){var o=os[t.charAt(n)];o&&(e[o.charCodeAt(0)]=!0)}},ds.prototype.populate=function(t,e){var r=this.layers[0],i=r.layout,n=i.get("text-font"),o=i.get("text-field"),a=i.get("icon-image"),s=("constant"!==o.value.kind||o.value.value.toString().length>0)&&("constant"!==n.value.kind||n.value.value.length>0),u="constant"!==a.value.kind||a.value.value&&a.value.value.length>0,l=i.get("symbol-sort-key");if(this.features=[],s||u){for(var p=e.iconDependencies,c=e.glyphDependencies,h=new Ei(this.zoom),f=0,d=t;f<d.length;f+=1){var m=d[f],y=m.feature,_=m.index,v=m.sourceLayerIndex;if(r._featureFilter(h,y)){var g=void 0;if(s){var x=r.getValueAndResolveTokens("text-field",y);g=ns(x instanceof Nt?x:Nt.fromString(x),r,y)}var b=void 0;if(u&&(b=r.getValueAndResolveTokens("icon-image",y)),g||b){var w=this.sortFeaturesByKey?l.evaluate(y,{}):void 0,E={text:g,icon:b,index:_,sourceLayerIndex:v,geometry:Jn(y),properties:y.properties,type:us[y.type],sortKey:w};if(void 0!==y.id&&(E.id=y.id),this.features.push(E),b&&(p[b]=!0),g)for(var S=n.evaluate(y,{}).join(","),T="map"===i.get("text-rotation-alignment")&&"point"!==i.get("symbol-placement"),A=0,z=g.sections;A<z.length;A+=1){var I=z[A],C=hi(g.toString()),k=I.fontStack||S,P=c[k]=c[k]||{};this.calculateGlyphDependencies(I.text,P,T,C)}}}}"line"===i.get("symbol-placement")&&(this.features=function(t){var e={},r={},i=[],n=0;function o(e){i.push(t[e]),n++}function a(t,e,n){var o=r[t];return delete r[t],r[e]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(n[0]),o}function s(t,r,n){var o=e[r];return delete e[r],e[t]=o,i[o].geometry[0].shift(),i[o].geometry[0]=n[0].concat(i[o].geometry[0]),o}function u(t,e,r){var i=r?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var l=0;l<t.length;l++){var p=t[l],c=p.geometry,h=p.text?p.text.toString():null;if(h){var f=u(h,c),d=u(h,c,!0);if(f in r&&d in e&&r[f]!==e[d]){var m=s(f,d,c),y=a(f,d,i[m].geometry);delete e[f],delete r[d],r[u(h,i[y].geometry,!0)]=y,i[m].geometry=null}else f in r?a(f,d,c):d in e?s(f,d,c):(o(l),e[f]=n-1,r[d]=n-1)}else o(l)}return i.filter(function(t){return t.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(t,e){return t.sortKey-e.sortKey})}},ds.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},ds.prototype.isEmpty=function(){return 0===this.symbolInstances.length},ds.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},ds.prototype.upload=function(t){this.uploaded||(this.collisionBox.upload(t),this.collisionCircle.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},ds.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.collisionBox.destroy(),this.collisionCircle.destroy()},ds.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:i},a<e.length-1&&(i+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(var u=0;u<e.length;u++){var l=o[u];this.lineVertexArray.emplaceBack(l.x,l.y,l.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},ds.prototype.addSymbols=function(t,e,r,i,n,o,a,s,u,l){for(var p=t.indexArray,c=t.layoutVertexArray,h=t.dynamicLayoutVertexArray,f=t.segments.prepareSegment(4*e.length,t.layoutVertexArray,t.indexArray,o.sortKey),d=this.glyphOffsetArray.length,m=f.vertexLength,y=0,_=e;y<_.length;y+=1){var v=_[y],g=v.tl,x=v.tr,b=v.bl,w=v.br,E=v.tex,S=f.vertexLength,T=v.glyphOffset[1];ps(c,s.x,s.y,g.x,T+g.y,E.x,E.y,r),ps(c,s.x,s.y,x.x,T+x.y,E.x+E.w,E.y,r),ps(c,s.x,s.y,b.x,T+b.y,E.x,E.y+E.h,r),ps(c,s.x,s.y,w.x,T+w.y,E.x+E.w,E.y+E.h,r),cs(h,s,0),p.emplaceBack(S,S+1,S+2),p.emplaceBack(S+1,S+2,S+3),f.vertexLength+=4,f.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(v.glyphOffset[0])}t.placedSymbolArray.emplaceBack(s.x,s.y,d,this.glyphOffsetArray.length-d,m,u,l,s.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],a,!1),t.programConfigurations.populatePaintArrays(t.layoutVertexArray.length,o,o.index,{})},ds.prototype._addCollisionDebugVertex=function(t,e,r,i,n,o){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,i,n,Math.round(o.x),Math.round(o.y))},ds.prototype.addCollisionDebugVertices=function(t,e,r,i,o,a,s,u){var l=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),p=l.vertexLength,c=o.layoutVertexArray,h=o.collisionVertexArray,f=s.anchorX,d=s.anchorY;if(this._addCollisionDebugVertex(c,h,a,f,d,new n(t,e)),this._addCollisionDebugVertex(c,h,a,f,d,new n(r,e)),this._addCollisionDebugVertex(c,h,a,f,d,new n(r,i)),this._addCollisionDebugVertex(c,h,a,f,d,new n(t,i)),l.vertexLength+=4,u){var m=o.indexArray;m.emplaceBack(p,p+1,p+2),m.emplaceBack(p,p+2,p+3),l.primitiveLength+=2}else{var y=o.indexArray;y.emplaceBack(p,p+1),y.emplaceBack(p+1,p+2),y.emplaceBack(p+2,p+3),y.emplaceBack(p+3,p),l.primitiveLength+=4}},ds.prototype.addDebugCollisionBoxes=function(t,e,r){for(var i=t;i<e;i++){var n=this.collisionBoxArray.get(i),o=n.x1,a=n.y1,s=n.x2,u=n.y2,l=n.radius>0;this.addCollisionDebugVertices(o,a,s,u,l?this.collisionCircle:this.collisionBox,n.anchorPoint,r,l)}},ds.prototype.generateCollisionDebugBuffers=function(){for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e)}},ds.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,i,n){for(var o={},a=e;a<r;a++){var s=t.get(a);if(0===s.radius){o.textBox={x1:s.x1,y1:s.y1,x2:s.x2,y2:s.y2,anchorPointX:s.anchorPointX,anchorPointY:s.anchorPointY},o.textFeatureIndex=s.featureIndex;break}o.textCircles||(o.textCircles=[],o.textFeatureIndex=s.featureIndex),o.textCircles.push(s.anchorPointX,s.anchorPointY,s.radius,s.signedDistanceFromAnchor,1)}for(var u=i;u<n;u++){var l=t.get(u);if(0===l.radius){o.iconBox={x1:l.x1,y1:l.y1,x2:l.x2,y2:l.y2,anchorPointX:l.anchorPointX,anchorPointY:l.anchorPointY},o.iconFeatureIndex=l.featureIndex;break}}return o},ds.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex))}},ds.prototype.hasTextData=function(){return this.text.segments.get().length>0},ds.prototype.hasIconData=function(){return this.icon.segments.get().length>0},ds.prototype.hasCollisionBoxData=function(){return this.collisionBox.segments.get().length>0},ds.prototype.hasCollisionCircleData=function(){return this.collisionCircle.segments.get().length>0},ds.prototype.addIndicesForPlacedTextSymbol=function(t){for(var e=this.text.placedSymbolArray.get(t),r=e.vertexStartIndex+4*e.numGlyphs,i=e.vertexStartIndex;i<r;i+=4)this.text.indexArray.emplaceBack(i,i+1,i+2),this.text.indexArray.emplaceBack(i+1,i+2,i+3)},ds.prototype.sortFeatures=function(t){if(this.sortFeaturesByY&&this.sortedAngle!==t&&(this.sortedAngle=t,!(this.text.segments.get().length>1||this.icon.segments.get().length>1))){for(var e=[],r=0;r<this.symbolInstances.length;r++)e.push(r);for(var i=Math.sin(t),n=Math.cos(t),o=[],a=[],s=0;s<this.symbolInstances.length;s++){var u=this.symbolInstances.get(s);o.push(0|Math.round(i*u.anchorX+n*u.anchorY)),a.push(u.featureIndex)}e.sort(function(t,e){return o[t]-o[e]||a[e]-a[t]}),this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var l=0,p=e;l<p.length;l+=1){var c=p[l],h=this.symbolInstances.get(c);this.featureSortOrder.push(h.featureIndex),h.horizontalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(h.horizontalPlacedTextSymbolIndex),h.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedTextSymbol(h.verticalPlacedTextSymbolIndex);var f=this.icon.placedSymbolArray.get(c);if(f.numGlyphs){var d=f.vertexStartIndex;this.icon.indexArray.emplaceBack(d,d+1,d+2),this.icon.indexArray.emplaceBack(d+1,d+2,d+3)}}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},ai("SymbolBucket",ds,{omit:["layers","collisionBoxArray","features","compareText"]}),ds.MAX_GLYPHS=65535,ds.addDynamicAttributes=cs;var ms=new Fi({"symbol-placement":new Mi(yt.layout_symbol["symbol-placement"]),"symbol-spacing":new Mi(yt.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Mi(yt.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Li(yt.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Mi(yt.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Mi(yt.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Mi(yt.layout_symbol["icon-ignore-placement"]),"icon-optional":new Mi(yt.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Mi(yt.layout_symbol["icon-rotation-alignment"]),"icon-size":new Li(yt.layout_symbol["icon-size"]),"icon-text-fit":new Mi(yt.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Mi(yt.layout_symbol["icon-text-fit-padding"]),"icon-image":new Li(yt.layout_symbol["icon-image"]),"icon-rotate":new Li(yt.layout_symbol["icon-rotate"]),"icon-padding":new Mi(yt.layout_symbol["icon-padding"]),"icon-keep-upright":new Mi(yt.layout_symbol["icon-keep-upright"]),"icon-offset":new Li(yt.layout_symbol["icon-offset"]),"icon-anchor":new Li(yt.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Mi(yt.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Mi(yt.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Mi(yt.layout_symbol["text-rotation-alignment"]),"text-field":new Li(yt.layout_symbol["text-field"]),"text-font":new Li(yt.layout_symbol["text-font"]),"text-size":new Li(yt.layout_symbol["text-size"]),"text-max-width":new Li(yt.layout_symbol["text-max-width"]),"text-line-height":new Mi(yt.layout_symbol["text-line-height"]),"text-letter-spacing":new Li(yt.layout_symbol["text-letter-spacing"]),"text-justify":new Li(yt.layout_symbol["text-justify"]),"text-anchor":new Li(yt.layout_symbol["text-anchor"]),"text-max-angle":new Mi(yt.layout_symbol["text-max-angle"]),"text-rotate":new Li(yt.layout_symbol["text-rotate"]),"text-padding":new Mi(yt.layout_symbol["text-padding"]),"text-keep-upright":new Mi(yt.layout_symbol["text-keep-upright"]),"text-transform":new Li(yt.layout_symbol["text-transform"]),"text-offset":new Li(yt.layout_symbol["text-offset"]),"text-allow-overlap":new Mi(yt.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Mi(yt.layout_symbol["text-ignore-placement"]),"text-optional":new Mi(yt.layout_symbol["text-optional"])}),ys={paint:new Fi({"icon-opacity":new Li(yt.paint_symbol["icon-opacity"]),"icon-color":new Li(yt.paint_symbol["icon-color"]),"icon-halo-color":new Li(yt.paint_symbol["icon-halo-color"]),"icon-halo-width":new Li(yt.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Li(yt.paint_symbol["icon-halo-blur"]),"icon-translate":new Mi(yt.paint_symbol["icon-translate"]),"icon-translate-anchor":new Mi(yt.paint_symbol["icon-translate-anchor"]),"text-opacity":new Li(yt.paint_symbol["text-opacity"]),"text-color":new Li(yt.paint_symbol["text-color"]),"text-halo-color":new Li(yt.paint_symbol["text-halo-color"]),"text-halo-width":new Li(yt.paint_symbol["text-halo-width"]),"text-halo-blur":new Li(yt.paint_symbol["text-halo-blur"]),"text-translate":new Mi(yt.paint_symbol["text-translate"]),"text-translate-anchor":new Mi(yt.paint_symbol["text-translate-anchor"])}),layout:ms},_s=function(t){function e(e){t.call(this,e,ys)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.recalculate=function(e){t.prototype.recalculate.call(this,e),"auto"===this.layout.get("icon-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-rotation-alignment")&&("point"!==this.layout.get("symbol-placement")?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment"))},e.prototype.getValueAndResolveTokens=function(t,e){var r,i=this.layout.get(t).evaluate(e,{}),n=this._unevaluatedLayout._values[t];return n.isDataDriven()||dr(n.value)?i:(r=e.properties,i.replace(/{([^{}]+)}/g,function(t,e){return e in r?String(r[e]):""}))},e.prototype.createBucket=function(t){return new ds(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e}(Oi),vs={paint:new Fi({"background-color":new Mi(yt.paint_background["background-color"]),"background-pattern":new Ri(yt.paint_background["background-pattern"]),"background-opacity":new Mi(yt.paint_background["background-opacity"])})},gs=function(t){function e(e){t.call(this,e,vs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Oi),xs={paint:new Fi({"raster-opacity":new Mi(yt.paint_raster["raster-opacity"]),"raster-hue-rotate":new Mi(yt.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Mi(yt.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Mi(yt.paint_raster["raster-brightness-max"]),"raster-saturation":new Mi(yt.paint_raster["raster-saturation"]),"raster-contrast":new Mi(yt.paint_raster["raster-contrast"]),"raster-resampling":new Mi(yt.paint_raster["raster-resampling"]),"raster-fade-duration":new Mi(yt.paint_raster["raster-fade-duration"])})},bs=function(t){function e(e){t.call(this,e,xs)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Oi),ws=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender||"3d"===this.implementation.renderingMode},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.resize=function(){this.viewportFrame&&(this.viewportFrame.destroy(),this.viewportFrame=null)},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t)},e}(Oi),Es={circle:wo,heatmap:Mo,hillshade:Do,fill:_a,"fill-extrusion":Aa,line:Ja,symbol:_s,background:gs,raster:bs};function Ss(t){for(var e=0,r=0,i=0,n=t;i<n.length;i+=1){var o=n[i];e+=o.w*o.h,r=Math.max(r,o.w)}t.sort(function(t,e){return e.h-t.h});for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,u=0,l=0,p=t;l<p.length;l+=1)for(var c=p[l],h=a.length-1;h>=0;h--){var f=a[h];if(!(c.w>f.w||c.h>f.h)){if(c.x=f.x,c.y=f.y,u=Math.max(u,c.y+c.h),s=Math.max(s,c.x+c.w),c.w===f.w&&c.h===f.h){var d=a.pop();h<a.length&&(a[h]=d)}else c.h===f.h?(f.x+=c.w,f.w-=c.w):c.w===f.w?(f.y+=c.h,f.h-=c.h):(a.push({x:f.x+c.w,y:f.y,w:f.w-c.w,h:c.h}),f.y+=c.h,f.h-=c.h);break}}return{w:s,h:u,fill:e/(s*u)||0}}var Ts=function(t,e){var r=e.pixelRatio;this.paddedRect=t,this.pixelRatio=r},As={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};As.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},As.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},As.tlbr.get=function(){return this.tl.concat(this.br)},As.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ts.prototype,As);var zs=function(t,e){var r={},i={},n=[];for(var o in t){var a=t[o],s={x:0,y:0,w:a.data.width+2,h:a.data.height+2};n.push(s),r[o]=new Ts(s,a)}for(var u in e){var l=e[u],p={x:0,y:0,w:l.data.width+2,h:l.data.height+2};n.push(p),i[u]=new Ts(p,l)}var c=Ss(n),h=c.w,f=c.h,d=new Co({width:h||1,height:f||1});for(var m in t){var y=t[m],_=r[m].paddedRect;Co.copy(y.data,d,{x:0,y:0},{x:_.x+1,y:_.y+1},y.data)}for(var v in e){var g=e[v],x=i[v].paddedRect,b=x.x+1,w=x.y+1,E=g.data.width,S=g.data.height;Co.copy(g.data,d,{x:0,y:0},{x:b,y:w},g.data),Co.copy(g.data,d,{x:0,y:S-1},{x:b,y:w-1},{width:E,height:1}),Co.copy(g.data,d,{x:0,y:0},{x:b,y:w+S},{width:E,height:1}),Co.copy(g.data,d,{x:E-1,y:0},{x:b-1,y:w},{width:1,height:S}),Co.copy(g.data,d,{x:0,y:0},{x:b+E,y:w},{width:1,height:S})}this.image=d,this.iconPositions=r,this.patternPositions=i};ai("ImagePosition",Ts),ai("ImageAtlas",zs);var Is=self.HTMLImageElement,Cs=self.HTMLCanvasElement,ks=self.HTMLVideoElement,Ps=self.ImageData,Ms=function(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,i)};Ms.prototype.update=function(t,e){var r=t.width,i=t.height,n=!this.size||this.size[0]!==r||this.size[1]!==i,o=this.context,a=o.gl;this.useMipmap=Boolean(e&&e.useMipmap),a.bindTexture(a.TEXTURE_2D,this.texture),o.pixelStoreUnpackFlipY.set(!1),o.pixelStoreUnpack.set(1),o.pixelStoreUnpackPremultiplyAlpha.set(this.format===a.RGBA&&(!e||!1!==e.premultiply)),n?(this.size=[r,i],t instanceof Is||t instanceof Cs||t instanceof ks||t instanceof Ps?a.texImage2D(a.TEXTURE_2D,0,this.format,this.format,a.UNSIGNED_BYTE,t):a.texImage2D(a.TEXTURE_2D,0,this.format,r,i,0,this.format,a.UNSIGNED_BYTE,t.data)):t instanceof Is||t instanceof Cs||t instanceof ks||t instanceof Ps?a.texSubImage2D(a.TEXTURE_2D,0,0,0,a.RGBA,a.UNSIGNED_BYTE,t):a.texSubImage2D(a.TEXTURE_2D,0,0,0,r,i,a.RGBA,a.UNSIGNED_BYTE,t.data),this.useMipmap&&this.isSizePowerOfTwo()&&a.generateMipmap(a.TEXTURE_2D)},Ms.prototype.bind=function(t,e,r){var i=this.context.gl;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},Ms.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Ms.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Ls=function(t,e,r,i,n){var o,a,s=8*n-i-1,u=(1<<s)-1,l=u>>1,p=-7,c=r?n-1:0,h=r?-1:1,f=t[e+c];for(c+=h,o=f&(1<<-p)-1,f>>=-p,p+=s;p>0;o=256*o+t[e+c],c+=h,p-=8);for(a=o&(1<<-p)-1,o>>=-p,p+=i;p>0;a=256*a+t[e+c],c+=h,p-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=l}return(f?-1:1)*a*Math.pow(2,o-i)},Ds=function(t,e,r,i,n,o){var a,s,u,l=8*o-n-1,p=(1<<l)-1,c=p>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=p):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=p?(s=0,a=p):a+c>=1?(s=(e*u-1)*Math.pow(2,n),a+=c):(s=e*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;t[r+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,l+=n;l>0;t[r+f]=255&a,f+=d,a/=256,l-=8);t[r+f-d]|=128*m},Rs=Bs;function Bs(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}function Fs(t){return t.type===Bs.Bytes?t.readVarint()+t.pos:t.pos+1}function Os(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Us(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.ceil(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function Vs(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function Ns(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function js(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function qs(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function Zs(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function Gs(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function Xs(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function Ws(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function Ks(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function Hs(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function Ys(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function Js(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}Bs.Varint=0,Bs.Fixed64=1,Bs.Bytes=2,Bs.Fixed32=5,Bs.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=Hs(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=Js(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=Hs(this.buf,this.pos)+4294967296*Hs(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=Hs(this.buf,this.pos)+4294967296*Js(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Ls(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Ls(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(i=(112&(n=o[r.pos++]))>>4,n<128)return Os(t,i,e);if(i|=(127&(n=o[r.pos++]))<<3,n<128)return Os(t,i,e);if(i|=(127&(n=o[r.pos++]))<<10,n<128)return Os(t,i,e);if(i|=(127&(n=o[r.pos++]))<<17,n<128)return Os(t,i,e);if(i|=(127&(n=o[r.pos++]))<<24,n<128)return Os(t,i,e);if(i|=(1&(n=o[r.pos++]))<<31,n<128)return Os(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=function(t,e,r){for(var i="",n=e;n<r;){var o,a,s,u=t[n],l=null,p=u>239?4:u>223?3:u>191?2:1;if(n+p>r)break;1===p?u<128&&(l=u):2===p?128==(192&(o=t[n+1]))&&(l=(31&u)<<6|63&o)<=127&&(l=null):3===p?(o=t[n+1],a=t[n+2],128==(192&o)&&128==(192&a)&&((l=(15&u)<<12|(63&o)<<6|63&a)<=2047||l>=55296&&l<=57343)&&(l=null)):4===p&&(o=t[n+1],a=t[n+2],s=t[n+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&((l=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,p=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=p}return i}(this.buf,this.pos,t);return this.pos=t,e},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){var r=Fs(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){var e=Fs(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Bs.Varint)for(;this.buf[this.pos++]>127;);else if(e===Bs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Bs.Fixed32)this.pos+=4;else{if(e!==Bs.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),Ys(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),Ys(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),Ys(this.buf,-1&t,this.pos),Ys(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),Ys(this.buf,-1&t,this.pos),Ys(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos]=127&t}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Us(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),Ds(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),Ds(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&Us(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,Bs.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){this.writeMessage(t,Vs,e)},writePackedSVarint:function(t,e){this.writeMessage(t,Ns,e)},writePackedBoolean:function(t,e){this.writeMessage(t,Zs,e)},writePackedFloat:function(t,e){this.writeMessage(t,js,e)},writePackedDouble:function(t,e){this.writeMessage(t,qs,e)},writePackedFixed32:function(t,e){this.writeMessage(t,Gs,e)},writePackedSFixed32:function(t,e){this.writeMessage(t,Xs,e)},writePackedFixed64:function(t,e){this.writeMessage(t,Ws,e)},writePackedSFixed64:function(t,e){this.writeMessage(t,Ks,e)},writeBytesField:function(t,e){this.writeTag(t,Bs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Bs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Bs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Bs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Bs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Bs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Bs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Bs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Bs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Bs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var $s=3;function Qs(t,e,r){1===t&&r.readMessage(tu,e)}function tu(t,e,r){if(3===t){var i=r.readMessage(eu,{}),n=i.id,o=i.bitmap,a=i.width,s=i.height,u=i.left,l=i.top,p=i.advance;e.push({id:n,bitmap:new Io({width:a+2*$s,height:s+2*$s},o),metrics:{width:a,height:s,left:u,top:l,advance:p}})}}function eu(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}var ru=$s,iu=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.callbackID=0,y(["receive"],this),this.target.addEventListener("message",this.receive,!1)};function nu(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}iu.prototype.send=function(t,e,r,i){var n=this,o=r?this.mapId+":"+this.callbackID++:null;r&&(this.callbacks[o]=r);var a=[];if(this.target.postMessage({targetMapId:i,sourceMapId:this.mapId,type:t,id:String(o),data:ui(e,a)},a),r)return{cancel:function(){return n.target.postMessage({targetMapId:i,sourceMapId:n.mapId,type:"<cancel>",id:String(o)})}}},iu.prototype.receive=function(t){var e,r=this,i=t.data,n=i.id;if(!i.targetMapId||this.mapId===i.targetMapId){var o=function(t,e){delete r.callbacks[n];var i=[];r.target.postMessage({sourceMapId:r.mapId,type:"<response>",id:String(n),error:t?ui(t):null,data:ui(e,i)},i)};if("<response>"===i.type||"<cancel>"===i.type)e=this.callbacks[i.id],delete this.callbacks[i.id],e&&i.error?e(li(i.error)):e&&e(null,li(i.data));else if(void 0!==i.id&&this.parent[i.type]){this.callbacks[i.id]=null;var a=this.parent[i.type](i.sourceMapId,li(i.data),o);a&&null===this.callbacks[i.id]&&(this.callbacks[i.id]=a)}else if(void 0!==i.id&&this.parent.getWorkerSource){var s=i.type.split("."),u=li(i.data);this.parent.getWorkerSource(i.sourceMapId,s[0],u.source)[s[1]](u,o)}else this.parent[i.type](li(i.data))}},iu.prototype.remove=function(){this.target.removeEventListener("message",this.receive,!1)};var ou=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};ou.prototype.setNorthEast=function(t){return this._ne=t instanceof au?new au(t.lng,t.lat):au.convert(t),this},ou.prototype.setSouthWest=function(t){return this._sw=t instanceof au?new au(t.lng,t.lat):au.convert(t),this},ou.prototype.extend=function(t){var e,r,i=this._sw,n=this._ne;if(t instanceof au)e=t,r=t;else{if(!(t instanceof ou))return Array.isArray(t)?t.every(Array.isArray)?this.extend(ou.convert(t)):this.extend(au.convert(t)):this;if(e=t._sw,r=t._ne,!e||!r)return this}return i||n?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),n.lng=Math.max(r.lng,n.lng),n.lat=Math.max(r.lat,n.lat)):(this._sw=new au(e.lng,e.lat),this._ne=new au(r.lng,r.lat)),this},ou.prototype.getCenter=function(){return new au((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ou.prototype.getSouthWest=function(){return this._sw},ou.prototype.getNorthEast=function(){return this._ne},ou.prototype.getNorthWest=function(){return new au(this.getWest(),this.getNorth())},ou.prototype.getSouthEast=function(){return new au(this.getEast(),this.getSouth())},ou.prototype.getWest=function(){return this._sw.lng},ou.prototype.getSouth=function(){return this._sw.lat},ou.prototype.getEast=function(){return this._ne.lng},ou.prototype.getNorth=function(){return this._ne.lat},ou.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ou.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ou.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ou.convert=function(t){return!t||t instanceof ou?t:new ou(t)};var au=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};function su(t){return 2*Math.PI*6378137*Math.cos(t*Math.PI/180)}function uu(t){return(180+t)/360}function lu(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function pu(t,e){return t/su(e)}function cu(t){var e=180-360*t;return 360/Math.PI*Math.atan(Math.exp(e*Math.PI/180))-90}au.prototype.wrap=function(){return new au(p(this.lng,-180,180),this.lat)},au.prototype.toArray=function(){return[this.lng,this.lat]},au.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},au.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new ou(new au(this.lng-r,this.lat-e),new au(this.lng+r,this.lat+e))},au.convert=function(t){if(t instanceof au)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new au(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new au(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var hu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};hu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=au.convert(t);return new hu(uu(r.lng),lu(r.lat),pu(e,r.lat))},hu.prototype.toLngLat=function(){return new au(360*this.x-180,cu(this.y))},hu.prototype.toAltitude=function(){return this.z*su(cu(this.y))};var fu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=yu(0,t,e,r)};fu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},fu.prototype.url=function(t,e){var r,i,n,o,a,s=(r=this.x,i=this.y,n=this.z,o=nu(256*r,256*(i=Math.pow(2,n)-i-1),n),a=nu(256*(r+1),256*(i+1),n),o[0]+","+o[1]+","+a[0]+","+a[1]),u=function(t,e,r){for(var i,n="",o=t;o>0;o--)n+=(e&(i=1<<o-1)?1:0)+(r&i?2:0);return n}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",u).replace("{bbox-epsg-3857}",s)},fu.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new n((t.x*e-this.x)*Hn,(t.y*e-this.y)*Hn)};var du=function(t,e){this.wrap=t,this.canonical=e,this.key=yu(t,e.z,e.x,e.y)},mu=function(t,e,r,i,n){this.overscaledZ=t,this.wrap=e,this.canonical=new fu(r,+i,+n),this.key=yu(e,t,i,n)};function yu(t,e,r,i){(t*=2)<0&&(t=-1*t-1);var n=1<<e;return 32*(n*n*t+n*i+r)+e}mu.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},mu.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new mu(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new mu(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},mu.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},mu.prototype.children=function(t){if(this.overscaledZ>=t)return[new mu(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new mu(e,this.wrap,e,r,i),new mu(e,this.wrap,e,r+1,i),new mu(e,this.wrap,e,r,i+1),new mu(e,this.wrap,e,r+1,i+1)]},mu.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},mu.prototype.wrapped=function(){return new mu(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},mu.prototype.unwrapTo=function(t){return new mu(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},mu.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},mu.prototype.toUnwrapped=function(){return new du(this.wrap,this.canonical)},mu.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},mu.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new hu(t.x-this.wrap,t.y))},ai("CanonicalTileID",fu),ai("OverscaledTileID",mu,{omit:["posMatrix"]});var _u=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return w('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');var i=this.dim=e.height;this.stride=this.dim+2,this.data=new Int32Array(this.stride*this.stride);for(var n=e.data,o="terrarium"===r?this._unpackTerrarium:this._unpackMapbox,a=0;a<i;a++)for(var s=0;s<i;s++){var u=4*(a*i+s);this.set(s,a,o(n[u],n[u+1],n[u+2]))}for(var l=0;l<i;l++)this.set(-1,l,this.get(0,l)),this.set(i,l,this.get(i-1,l)),this.set(l,-1,this.get(l,0)),this.set(l,i,this.get(l,i-1));this.set(-1,-1,this.get(0,0)),this.set(i,-1,this.get(i-1,0)),this.set(-1,i,this.get(0,i-1)),this.set(i,i,this.get(i-1,i-1))};_u.prototype.set=function(t,e,r){this.data[this._idx(t,e)]=r+65536},_u.prototype.get=function(t,e){return this.data[this._idx(t,e)]-65536},_u.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},_u.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},_u.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},_u.prototype.getPixels=function(){return new Co({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},_u.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,n=e*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(e){case-1:i=n-1;break;case 1:n=i+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,u=-r*this.dim,l=o;l<a;l++)for(var p=i;p<n;p++)this.set(p,l,t.get(p+s,l+u))},ai("DEMData",_u);var vu=ji([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),gu=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};gu.prototype.encode=function(t){return this._stringToNumber[t]},gu.prototype.decode=function(t){return this._numberToString[t]};var xu=function(t,e,r,i){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,null!=t.id&&(this.id=t.id)},bu={geometry:{configurable:!0}};bu.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},bu.geometry.set=function(t){this._geometry=t},xu.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(xu.prototype,bu);var wu=function(){this.state={},this.stateChanges={},this.deletedStates={}};wu.prototype.updateState=function(t,e,r){var i=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][i]=this.stateChanges[t][i]||{},c(this.stateChanges[t][i],r),null===this.deletedStates[t])for(var n in this.deletedStates[t]={},this.state[t])n!==i&&(this.deletedStates[t][n]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][i])for(var o in this.deletedStates[t][i]={},this.state[t][i])r[o]||(this.deletedStates[t][i][o]=null);else for(var a in r)this.deletedStates[t]&&this.deletedStates[t][i]&&null===this.deletedStates[t][i][a]&&delete this.deletedStates[t][i][a]},wu.prototype.removeFeatureState=function(t,e,r){if(null!==this.deletedStates[t]){var i=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&e)null!==this.deletedStates[t][i]&&(this.deletedStates[t][i]=this.deletedStates[t][i]||{},this.deletedStates[t][i][r]=null);else if(e)if(this.stateChanges[t]&&this.stateChanges[t][i])for(r in this.deletedStates[t][i]={},this.stateChanges[t][i])this.deletedStates[t][i][r]=null;else this.deletedStates[t][i]=null;else this.deletedStates[t]=null}},wu.prototype.getState=function(t,e){var r=String(e),i=this.state[t]||{},n=this.stateChanges[t]||{},o=c({},i[r],n[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var a=this.deletedStates[t][e];if(null===a)return{};for(var s in a)delete o[s]}return o},wu.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},wu.prototype.coalesceChanges=function(t,e){var r={};for(var i in this.stateChanges){this.state[i]=this.state[i]||{};var n={};for(var o in this.stateChanges[i])this.state[i][o]||(this.state[i][o]={}),c(this.state[i][o],this.stateChanges[i][o]),n[o]=this.state[i][o];r[i]=n}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a]){for(var u in this.state[a])s[u]={};this.state[a]={}}else for(var l in this.deletedStates[a]){if(null===this.deletedStates[a][l])this.state[a][l]={};else for(var p=0,h=Object.keys(this.deletedStates[a][l]);p<h.length;p+=1){var f=h[p];delete this.state[a][l][f]}s[l]=this.state[a][l]}r[a]=r[a]||{},c(r[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var d in t)t[d].setFeatureState(r,e)};var Eu=function(t,e,r){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=e||new ei(Hn,16,0),this.grid3D=new ei(Hn,16,0),this.featureIndexArray=r||new En};function Su(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];e=Math.min(e,s.x),r=Math.min(r,s.y),i=Math.max(i,s.x),n=Math.max(n,s.y)}return{minX:e,minY:r,maxX:i,maxY:n}}function Tu(t,e){return e-t}Eu.prototype.insert=function(t,e,r,i,n,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);for(var s=o?this.grid3D:this.grid,u=0;u<e.length;u++){for(var l=e[u],p=[1/0,1/0,-1/0,-1/0],c=0;c<l.length;c++){var h=l[c];p[0]=Math.min(p[0],h.x),p[1]=Math.min(p[1],h.y),p[2]=Math.max(p[2],h.x),p[3]=Math.max(p[3],h.y)}p[0]<Hn&&p[1]<Hn&&p[2]>=0&&p[3]>=0&&s.insert(a,p[0],p[1],p[2],p[3])}},Eu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ua.VectorTile(new Rs(this.rawTileData)).layers,this.sourceLayerCoder=new gu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Eu.prototype.query=function(t,e,r){var i=this;this.loadVTLayers();for(var o=t.params||{},a=Hn/t.tileSize/t.scale,s=Cr(o.filter),u=t.queryGeometry,l=t.queryPadding*a,p=Su(u),c=this.grid.query(p.minX-l,p.minY-l,p.maxX+l,p.maxY+l),h=Su(t.cameraQueryGeometry),f=0,d=this.grid3D.query(h.minX-l,h.minY-l,h.maxX+l,h.maxY+l,function(e,r,i,o){return function(t,e,r,i,o){for(var a=0,s=t;a<s.length;a+=1){var u=s[a];if(e<=u.x&&r<=u.y&&i>=u.x&&o>=u.y)return!0}var l=[new n(e,r),new n(e,o),new n(i,o),new n(i,r)];if(t.length>2)for(var p=0,c=l;p<c.length;p+=1)if(lo(t,c[p]))return!0;for(var h=0;h<t.length-1;h++)if(po(t[h],t[h+1],l))return!0;return!1}(t.cameraQueryGeometry,e-l,r-l,i+l,o+l)});f<d.length;f+=1){var m=d[f];c.push(m)}c.sort(Tu);for(var y,_={},v=function(n){var l=c[n];if(l!==y){y=l;var p=i.featureIndexArray.get(l),h=null;i.loadMatchingFeature(_,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,s,o.layers,e,function(e,n){h||(h=Jn(e));var o={};return e.id&&(o=r.getState(n.sourceLayer||"_geojsonTileLayer",e.id)),n.queryIntersectsFeature(u,e,o,h,i.z,t.transform,a,t.pixelPosMatrix)})}},g=0;g<c.length;g++)v(g);return _},Eu.prototype.loadMatchingFeature=function(t,e,r,i,n,o,a,s){var u=this.bucketLayerIDs[e];if(!o||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(o,u)){var l=this.sourceLayerCoder.decode(r),p=this.vtLayers[l].feature(i);if(n(new Ei(this.tileID.overscaledZ),p))for(var c=0;c<u.length;c++){var h=u[c];if(!(o&&o.indexOf(h)<0)){var f=a[h];if(f){var d=!s||s(p,f);if(d){var m=new xu(p,this.z,this.x,this.y);m.layer=f.serialize();var y=t[h];void 0===y&&(y=t[h]=[]),y.push({featureIndex:i,feature:m,intersectionZ:d})}}}}}},Eu.prototype.lookupSymbolFeatures=function(t,e,r,i,n,o){var a={};this.loadVTLayers();for(var s=Cr(i),u=0,l=t;u<l.length;u+=1){var p=l[u];this.loadMatchingFeature(a,e,r,p,s,n,o)}return a},Eu.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var i=0,n=r[e];i<n.length;i+=1)if(t===n[i])return!0;return!1},ai("FeatureIndex",Eu,{omit:["rawTileData","sourceLayerCoder"]});var Au=function(t,e){this.tileID=t,this.uid=f(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.expiredRequestCount=0,this.state="loading"};Au.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<P.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},Au.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},Au.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var i in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var i=function(){var t=o[n],i=t.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==i.length){t.layers=i,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map(function(t){return i.filter(function(e){return e.id===t})[0]}));for(var a=0,s=i;a<s.length;a+=1){var u=s[a];r[u.id]=t}}},n=0,o=t;n<o.length;n+=1)i();return r}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var n=this.buckets[i];if(n instanceof ds){if(this.hasSymbolBuckets=!0,!r)break;n.justReloaded=!0}}for(var o in this.queryPadding=0,this.buckets){var a=this.buckets[o];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(o).queryRadius(a))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new fn},Au.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},Au.prototype.unloadDEMData=function(){this.dem=null,this.neighboringTiles=null,this.state="unloaded"},Au.prototype.getBucket=function(t){return this.buckets[t.id]},Au.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var i=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Ms(t,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Ms(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)},Au.prototype.queryRenderedFeatures=function(t,e,r,i,n,o,a,s,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:r,cameraQueryGeometry:i,scale:n,tileSize:this.tileSize,pixelPosMatrix:u,transform:a,params:o,queryPadding:this.queryPadding*s},t,e):{}},Au.prototype.querySourceFeatures=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData){var r=this.latestFeatureIndex.loadVTLayers(),i=e?e.sourceLayer:"",n=r._geojsonTileLayer||r[i];if(n)for(var o=Cr(e&&e.filter),a=this.tileID.canonical,s=a.z,u=a.x,l=a.y,p={z:s,x:u,y:l},c=0;c<n.length;c++){var h=n.feature(c);if(o(new Ei(this.tileID.overscaledZ),h)){var f=new xu(h,s,u,l);f.tile=p,t.push(f)}}}},Au.prototype.clearMask=function(){this.segments&&(this.segments.destroy(),delete this.segments),this.maskedBoundsBuffer&&(this.maskedBoundsBuffer.destroy(),delete this.maskedBoundsBuffer),this.maskedIndexBuffer&&(this.maskedIndexBuffer.destroy(),delete this.maskedIndexBuffer)},Au.prototype.setMask=function(t,e){if(!a(this.mask,t)&&(this.mask=t,this.clearMask(),!a(t,{0:!0}))){var r=new Gi,i=new sn;this.segments=new An,this.segments.prepareSegment(0,r,i);for(var o=Object.keys(t),s=0;s<o.length;s++){var u=t[o[s]],l=Hn>>u.z,p=new n(u.x*l,u.y*l),c=new n(p.x+l,p.y+l),h=this.segments.prepareSegment(4,r,i);r.emplaceBack(p.x,p.y,p.x,p.y),r.emplaceBack(c.x,p.y,c.x,p.y),r.emplaceBack(p.x,c.y,p.x,c.y),r.emplaceBack(c.x,c.y,c.x,c.y);var f=h.vertexLength;i.emplaceBack(f,f+1,f+2),i.emplaceBack(f+1,f+2,f+3),h.vertexLength+=4,h.primitiveLength+=2}this.maskedBoundsBuffer=e.createVertexBuffer(r,vu.members),this.maskedIndexBuffer=e.createIndexBuffer(i)}},Au.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},Au.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},Au.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=function(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,r,i,n){var o=i||n;return e[r]=!o||o.toLowerCase(),""}),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var i=Date.now(),n=!1;if(this.expirationTime>i)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{var o=this.expirationTime-e;o?this.expirationTime=i+Math.max(o,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},Au.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},Au.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var i in this.buckets){var n=this.buckets[i],o=n.layers[0].sourceLayer||"_geojsonTileLayer",a=r[o],s=t[o];a&&s&&0!==Object.keys(s).length&&(n.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{}),e&&e.style&&(this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(i).queryRadius(n))))}}},Au.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},Au.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<P.now()},Au.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},Au.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=P.now()+t};var zu={horizontal:1,vertical:2,horizontalOnly:3},Iu=function(){this.text="",this.sectionIndex=[],this.sections=[]};Iu.fromFeature=function(t,e){for(var r=new Iu,i=0;i<t.sections.length;i++){var n=t.sections[i];r.sections.push({scale:n.scale||1,fontStack:n.fontStack||e}),r.text+=n.text;for(var o=0;o<n.text.length;o++)r.sectionIndex.push(i)}return r},Iu.prototype.length=function(){return this.text.length},Iu.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},Iu.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},Iu.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",r=0;r<t.length;r++){var i=t.charCodeAt(r+1)||null,n=t.charCodeAt(r-1)||null;i&&mi(i)&&!os[t[r+1]]||n&&mi(n)&&!os[t[r-1]]||!os[t[r]]?e+=t[r]:e+=os[t[r]]}return e}(this.text)},Iu.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&Cu[this.text.charCodeAt(e)];e++)t++;for(var r=this.text.length,i=this.text.length-1;i>=0&&i>=t&&Cu[this.text.charCodeAt(i)];i--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},Iu.prototype.substring=function(t,e){var r=new Iu;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},Iu.prototype.toString=function(){return this.text},Iu.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)};var Cu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},ku={};function Pu(t,e,r,i){var n=Math.pow(t-e,2);return i?t<e?n/2:2*n:n+Math.abs(r)*r}function Mu(t,e){var r=0;return 10===t&&(r-=1e4),40!==t&&65288!==t||(r+=50),41!==e&&65289!==e||(r+=50),r}function Lu(t,e,r,i,n,o){for(var a=null,s=Pu(e,r,n,o),u=0,l=i;u<l.length;u+=1){var p=l[u],c=Pu(e-p.x,r,n,o)+p.badness;c<=s&&(a=p,s=c)}return{index:t,x:e,priorBreak:a,badness:s}}function Du(t,e,r,i){if(!r)return[];if(!t)return[];for(var n,o=[],a=function(t,e,r,i){for(var n=0,o=0;o<t.length();o++){var a=t.getSection(o),s=i[a.fontStack],u=s&&s[t.getCharCode(o)];u&&(n+=u.metrics.advance*a.scale+e)}return n/Math.max(1,Math.ceil(n/r))}(t,e,r,i),s=0,u=0;u<t.length();u++){var l=t.getSection(u),p=t.getCharCode(u),c=i[l.fontStack],h=c&&c[p];h&&!Cu[p]&&(s+=h.metrics.advance*l.scale+e),u<t.length()-1&&(ku[p]||!((n=p)<11904)&&(ci["Bopomofo Extended"](n)||ci.Bopomofo(n)||ci["CJK Compatibility Forms"](n)||ci["CJK Compatibility Ideographs"](n)||ci["CJK Compatibility"](n)||ci["CJK Radicals Supplement"](n)||ci["CJK Strokes"](n)||ci["CJK Symbols and Punctuation"](n)||ci["CJK Unified Ideographs Extension A"](n)||ci["CJK Unified Ideographs"](n)||ci["Enclosed CJK Letters and Months"](n)||ci["Halfwidth and Fullwidth Forms"](n)||ci.Hiragana(n)||ci["Ideographic Description Characters"](n)||ci["Kangxi Radicals"](n)||ci["Katakana Phonetic Extensions"](n)||ci.Katakana(n)||ci["Vertical Forms"](n)||ci["Yi Radicals"](n)||ci["Yi Syllables"](n)))&&o.push(Lu(u+1,s,a,o,Mu(p,t.getCharCode(u+1)),!1))}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Lu(t.length(),s,a,o,0,!0))}function Ru(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function Bu(t,e,r,i,n){if(n){var o=t[i],a=e[o.fontStack],s=a&&a[o.glyph];if(s)for(var u=s.metrics.advance*o.scale,l=(t[i].x+u)*n,p=r;p<=i;p++)t[p].x-=l}}ku[10]=!0,ku[32]=!0,ku[38]=!0,ku[40]=!0,ku[41]=!0,ku[43]=!0,ku[45]=!0,ku[47]=!0,ku[173]=!0,ku[183]=!0,ku[8203]=!0,ku[8208]=!0,ku[8211]=!0,ku[8231]=!0,t.createCommonjsModule=e,t.window=self,t.Point=n,t.browser=P,t.getJSON=function(t,e){return st(c(t,{type:"json"}),e)},t.normalizeSpriteURL=function(t,e,r,i){var n=X(t);return U(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+r,O(n,i)):(n.path+=""+e+r,W(n))},t.ResourceType=et,t.getImage=pt,t.RGBAImage=Co,t.ImagePosition=Ts,t.Texture=Ms,t.potpack=Ss,t.normalizeGlyphsURL=function(t,e){if(!U(t))return t;var r=X(t);return r.path="/fonts/v1"+r.path,O(r,e)},t.getArrayBuffer=ut,t.parseGlyphPBF=function(t){return new Rs(t).readFields(Qs,[])},t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),n[a]=e,0==--i&&r(o,n)})})},t.isChar=ci,t.AlphaImage=Io,t.Properties=Fi,t.DataConstantProperty=Mi,t.styleSpec=yt,t.validateLight=Jr,t.endsWith=_,t.emitValidationErrors=ti,t.validateStyle=Yr,t.extend=c,t.Evented=mt,t.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(i),y:e*Math.sin(r)*Math.sin(i),z:e*Math.cos(i)}},t.number=le,t.Transitionable=Ai,t.warnOnce=w,t.uniqueId=f,t.Actor=iu,t.normalizeSourceURL=function(t,e){if(!U(t))return t;var r=X(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),O(r,e)},t.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r},t.canonicalizeTileset=function(t,e){if(!U(e))return t.tiles||[];for(var r=[],i=0,n=t.tiles;i<n.length;i+=1){var o=n[i],a=Z(o);r.push(a)}return r},t.LngLatBounds=ou,t.mercatorXfromLng=uu,t.mercatorYfromLat=lu,t.Event=ft,t.ErrorEvent=dt,t.postTurnstileEvent=$,t.postMapLoadEvent=tt,t.normalizeTileURL=function(t,e,r){if(!e||!U(e))return t;var i=X(t),n=P.devicePixelRatio>=2||512===r?"@2x":"",o=L.supported?".webp":"$1";return i.path=i.path.replace(j,""+n+o),i.path="/v4"+i.path,O(i)},t.OverscaledTileID=mu,t.EXTENT=Hn,t.MercatorCoordinate=hu,t.CanonicalTileID=fu,t.StructArrayLayout4i8=Gi,t.rasterBoundsAttributes=vu,t.SegmentVector=An,t.getVideo=function(t,e){var r,i,n=self.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");r=t[o],i=void 0,(i=self.document.createElement("a")).href=r,(i.protocol!==self.document.location.protocol||i.host!==self.document.location.host)&&(n.crossOrigin="Anonymous"),a.src=t[o],n.appendChild(a)}return{cancel:function(){}}},t.ValidationError=_t,t.bindAll=y,t.multiply=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],p=e[7],c=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],_=e[14],v=e[15],g=r[0],x=r[1],b=r[2],w=r[3];return t[0]=g*i+x*s+b*c+w*m,t[1]=g*n+x*u+b*h+w*y,t[2]=g*o+x*l+b*f+w*_,t[3]=g*a+x*p+b*d+w*v,g=r[4],x=r[5],b=r[6],w=r[7],t[4]=g*i+x*s+b*c+w*m,t[5]=g*n+x*u+b*h+w*y,t[6]=g*o+x*l+b*f+w*_,t[7]=g*a+x*p+b*d+w*v,g=r[8],x=r[9],b=r[10],w=r[11],t[8]=g*i+x*s+b*c+w*m,t[9]=g*n+x*u+b*h+w*y,t[10]=g*o+x*l+b*f+w*_,t[11]=g*a+x*p+b*d+w*v,g=r[12],x=r[13],b=r[14],w=r[15],t[12]=g*i+x*s+b*c+w*m,t[13]=g*n+x*u+b*h+w*y,t[14]=g*o+x*l+b*f+w*_,t[15]=g*a+x*p+b*d+w*v,t},t.identity=function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},t.translate=function(t,e,r){var i,n,o,a,s,u,l,p,c,h,f,d,m=r[0],y=r[1],_=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*_+e[12],t[13]=e[1]*m+e[5]*y+e[9]*_+e[13],t[14]=e[2]*m+e[6]*y+e[10]*_+e[14],t[15]=e[3]*m+e[7]*y+e[11]*_+e[15]):(i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],u=e[5],l=e[6],p=e[7],c=e[8],h=e[9],f=e[10],d=e[11],t[0]=i,t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=u,t[6]=l,t[7]=p,t[8]=c,t[9]=h,t[10]=f,t[11]=d,t[12]=i*m+s*y+c*_+e[12],t[13]=n*m+u*y+h*_+e[13],t[14]=o*m+l*y+f*_+e[14],t[15]=a*m+p*y+d*_+e[15]),t},t.scale=function(t,e,r){var i=r[0],n=r[1],o=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.Color=Ot,t.isEqual=a,t.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},t.Tile=Au,t.SourceFeatureState=wu,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.rotateZ=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[0],a=e[1],s=e[2],u=e[3],l=e[4],p=e[5],c=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+l*i,t[1]=a*n+p*i,t[2]=s*n+c*i,t[3]=u*n+h*i,t[4]=l*n-o*i,t[5]=p*n-a*i,t[6]=c*n-s*i,t[7]=h*n-u*i,t},t.evaluateSizeForZoom=function(t,e,r){if("constant"===t.functionType)return{uSizeT:0,uSize:t.layoutSize};if("source"===t.functionType)return{uSizeT:0,uSize:0};if("camera"===t.functionType){var i=t.propertyValue,n=t.zoomRange,o=t.sizeRange,a=l(xr(i,r.specification).interpolationFactor(e,n.min,n.max),0,1);return{uSizeT:0,uSize:o.min+a*(o.max-o.min)}}var s=t.propertyValue,u=t.zoomRange;return{uSizeT:l(xr(s,r.specification).interpolationFactor(e,u.min,u.max),0,1),uSize:0}},t.WritingMode=zu,t.transformMat4=xo,t.evaluateSizeForFeature=function(t,e,r){var i=e;return"source"===t.functionType?r.lowerSize/256:"composite"===t.functionType?le(r.lowerSize/256,r.upperSize/256,i.uSizeT):i.uSize},t.addDynamicAttributes=cs,t.properties=ys,t.polygonIntersectsPolygon=to,t.isMapboxURL=U,t.normalizeStyleURL=function(t,e){if(!U(t))return t;var r=X(t);return r.path="/styles/v1"+r.path,O(r,e)},t.createStyleLayer=function(t){return"custom"===t.type?new ws(t):new Es[t.type](t)},t.clone=x,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:"layers."+r+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+r+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),e},t.filterObject=g,t.mapObject=v,t.evented=bi,t.makeRequest=st,t.registerForPluginAvailability=function(t){return gi?t({pluginURL:gi,completionCallback:_i}):bi.once("pluginAvailable",t),t},t.ZoomHistory=pi,t.getReferrer=at,t.createLayout=ji,t.UniformMatrix4f=On,t.Uniform3f=Dn,t.Uniform1f=Mn,t.Uniform1i=Pn,t.Uniform2f=Ln,t.Uniform4f=Rn,t.create=_o,t.fromRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=-r,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.transformMat3=function(t,e,r){var i=e[0],n=e[1],o=e[2];return t[0]=i*r[0]+n*r[3]+o*r[6],t[1]=i*r[1]+n*r[4]+o*r[7],t[2]=i*r[2]+n*r[5]+o*r[8],t},t.create$1=function(){var t=new yo(16);return yo!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.ortho=function(t,e,r,i,n,o,a){var s=1/(e-r),u=1/(i-n),l=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+r)*s,t[13]=(n+i)*u,t[14]=(a+o)*l,t[15]=1,t},t.UniformColor=Bn,t.clamp=l,t.StructArrayLayout2i4=Zi,t.StructArrayLayout2ui4=un,t.ProgramConfiguration=Gn,t.StructArrayLayout1ui2=ln,t.StructArrayLayout3ui6=sn,t.wrap=p,t.create$2=function(){var t=new yo(4);return yo!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.rotate=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(r),u=Math.cos(r);return t[0]=i*u+o*s,t[1]=n*u+a*s,t[2]=i*-s+o*u,t[3]=n*-s+a*u,t},t.LngLat=au,t.UnwrappedTileID=du,t.perspective=function(t,e,r,i,n){var o,a=1/Math.tan(e/2);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(o=1/(i-n),t[10]=(n+i)*o,t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},t.rotateX=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[4],a=e[5],s=e[6],u=e[7],l=e[8],p=e[9],c=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+l*i,t[5]=a*n+p*i,t[6]=s*n+c*i,t[7]=u*n+h*i,t[8]=l*n-o*i,t[9]=p*n-a*i,t[10]=c*n-s*i,t[11]=h*n-u*i,t},t.mercatorZfromAltitude=pu,t.invert=function(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],u=e[6],l=e[7],p=e[8],c=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],_=e[15],v=r*s-i*a,g=r*u-n*a,x=r*l-o*a,b=i*u-n*s,w=i*l-o*s,E=n*l-o*u,S=p*m-c*d,T=p*y-h*d,A=p*_-f*d,z=c*y-h*m,I=c*_-f*m,C=h*_-f*y,k=v*C-g*I+x*z+b*A-w*T+E*S;return k?(k=1/k,t[0]=(s*C-u*I+l*z)*k,t[1]=(n*I-i*C-o*z)*k,t[2]=(m*E-y*w+_*b)*k,t[3]=(h*w-c*E-f*b)*k,t[4]=(u*A-a*C-l*T)*k,t[5]=(r*C-n*A+o*T)*k,t[6]=(y*x-d*E-_*g)*k,t[7]=(p*E-h*x+f*g)*k,t[8]=(a*I-s*A+l*S)*k,t[9]=(i*A-r*I-o*S)*k,t[10]=(d*w-m*x+_*v)*k,t[11]=(c*x-p*w-f*v)*k,t[12]=(s*T-a*z-u*S)*k,t[13]=(r*z-i*T+n*S)*k,t[14]=(m*g-d*b-y*v)*k,t[15]=(p*b-c*g+h*v)*k,t):null},t.ease=u,t.bezier=s,t.config=M,t.webpSupported=L,t.EvaluationParameters=Ei,t.version="0.53.1",t.setRTLTextPlugin=function(t,e){if(vi)throw new Error("setRTLTextPlugin cannot be called multiple times.");vi=!0,gi=P.resolveURL(t),_i=function(t){t?(vi=!1,gi=null,e&&e(t)):xi=!0},bi.fire(new ft("pluginAvailable",{pluginURL:gi,completionCallback:_i}))},t.featureFilter=Cr,t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.Anchor=as,t.GLYPH_PBF_BORDER=ru,t.distToSegmentSquared=so,t.allowsLetterSpacing=function(t){for(var e=0,r=t;e<r.length;e+=1)if(!fi(r[e].charCodeAt(0)))return!1;return!0},t.shapeText=function(t,e,r,i,n,o,a,s,u,l,p){var c=Iu.fromFeature(t,r);p===zu.vertical&&c.verticalizePunctuation();var h,f=[],d={positionedGlyphs:f,text:c,top:u[1],bottom:u[1],left:u[0],right:u[0],writingMode:p},m=wi.processBidirectionalText,y=wi.processStyledBidirectionalText;if(m&&1===c.sections.length){h=[];for(var _=0,v=m(c.toString(),Du(c,s,i,e));_<v.length;_+=1){var g=v[_],x=new Iu;x.text=g,x.sections=c.sections;for(var b=0;b<g.length;b++)x.sectionIndex.push(0);h.push(x)}}else if(y){h=[];for(var w=0,E=y(c.text,c.sectionIndex,Du(c,s,i,e));w<E.length;w+=1){var S=E[w],T=new Iu;T.text=S[0],T.sectionIndex=S[1],T.sections=c.sections,h.push(T)}}else h=function(t,e){for(var r=[],i=t.text,n=0,o=0,a=e;o<a.length;o+=1){var s=a[o];r.push(t.substring(n,s)),n=s}return n<i.length&&r.push(t.substring(n,i.length)),r}(c,Du(c,s,i,e));return function(t,e,r,i,n,o,a,s,u){for(var l=0,p=-17,c=0,h=t.positionedGlyphs,f="right"===o?1:"left"===o?0:.5,d=0,m=r;d<m.length;d+=1){var y=m[d];y.trim();var _=y.getMaxScale();if(y.length()){for(var v=h.length,g=0;g<y.length();g++){var x=y.getSection(g),b=y.getCharCode(g),w=24*(_-x.scale),E=e[x.fontStack],S=E&&E[b];S&&(di(b)&&a!==zu.horizontal?(h.push({glyph:b,x:l,y:w,vertical:!0,scale:x.scale,fontStack:x.fontStack}),l+=u*x.scale+s):(h.push({glyph:b,x:l,y:p+w,vertical:!1,scale:x.scale,fontStack:x.fontStack}),l+=S.metrics.advance*x.scale+s))}if(h.length!==v){var T=l-s;c=Math.max(T,c),Bu(h,e,v,h.length-1,f)}l=0,p+=i*_}else p+=i}var A=Ru(n),z=A.horizontalAlign,I=A.verticalAlign;!function(t,e,r,i,n,o,a){for(var s=(e-r)*n,u=(-i*a+.5)*o,l=0;l<t.length;l++)t[l].x+=s,t[l].y+=u}(h,f,z,I,c,i,r.length);var C=p- -17;t.top+=-I*C,t.bottom=t.top+C,t.left+=-z*c,t.right=t.left+c}(d,e,h,n,o,a,p,s,l),!!f.length&&(d.text=d.text.toString(),d)},t.allowsVerticalWritingMode=hi,t.shapeIcon=function(t,e,r){var i=Ru(r),n=i.horizontalAlign,o=i.verticalAlign,a=e[0],s=e[1],u=a-t.displaySize[0]*n,l=u+t.displaySize[0],p=s-t.displaySize[1]*o;return{image:t,top:p,bottom:p+t.displaySize[1],left:u,right:l}},t.classifyRings=ca,t.SIZE_PACK_FACTOR=256,t.SymbolBucket=ds,t.register=ai,t.CollisionBoxArray=fn,t.DictionaryCoder=gu,t.FeatureIndex=Eu,t.ImageAtlas=zs,t.LineBucket=Xa,t.FillBucket=ma,t.FillExtrusionBucket=wa,t.mvt=Ua,t.Protobuf=Rs,t.DEMData=_u,t.vectorTile=Ua,t.Point$1=n,t.pbf=Rs,t.createExpression=mr,t.plugin=wi}),i(0,function(t){function e(t){var r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var i="[",n=0,o=t;n<o.length;n+=1)i+=e(o[n])+",";return i+"]"}for(var a=Object.keys(t).sort(),s="{",u=0;u<a.length;u++)s+=JSON.stringify(a[u])+":"+e(t[a[u]])+",";return s+"}"}function r(r){for(var i="",n=0,o=t.refProperties;n<o.length;n+=1)i+="/"+e(r[o[n]]);return i}var i=function(t){t&&this.replace(t)};function n(t,e,r,i,n){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var u=[],l=0;s<r/2;){var p=t[a-1],c=t[a],h=t[a+1];if(!h)return!1;var f=p.angleTo(c)-c.angleTo(h);for(f=Math.abs((f+3*Math.PI)%(2*Math.PI)-Math.PI),u.push({distance:s,angleDelta:f}),l+=f;s-u[0].distance>i;)l-=u.shift().angleDelta;if(l>n)return!1;a++,s+=c.dist(h)}return!0}function o(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function a(t,e,r){return t?.6*e*r:0}function s(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function u(e,r,i,u,l,p){for(var c=a(i,l,p),h=s(i,u)*p,f=0,d=o(e)/2,m=0;m<e.length-1;m++){var y=e[m],_=e[m+1],v=y.dist(_);if(f+v>d){var g=(d-f)/v,x=t.number(y.x,_.x,g),b=t.number(y.y,_.y,g),w=new t.Anchor(x,b,_.angleTo(y),m);return w._round(),!c||n(e,w,h,c,r)?w:void 0}f+=v}}function l(e,r,i,u,l,p,c,h,f){var d=a(u,p,c),m=s(u,l),y=m*c,_=0===e[0].x||e[0].x===f||0===e[0].y||e[0].y===f;return r-y<r/4&&(r=y+r/4),function e(r,i,a,s,u,l,p,c,h){for(var f=l/2,d=o(r),m=0,y=i-a,_=[],v=0;v<r.length-1;v++){for(var g=r[v],x=r[v+1],b=g.dist(x),w=x.angleTo(g);y+a<m+b;){var E=((y+=a)-m)/b,S=t.number(g.x,x.x,E),T=t.number(g.y,x.y,E);if(S>=0&&S<h&&T>=0&&T<h&&y-f>=0&&y+f<=d){var A=new t.Anchor(S,T,w,v);A._round(),s&&!n(r,A,l,s,u)||_.push(A)}}m+=b}return c||_.length||p||(_=e(r,m/2,a,s,u,l,p,!0,h)),_}(e,_?r/2*h%r:(m/2+2*p)*c*h%r,r,d,i,y,_,!1,f)}i.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},i.prototype.update=function(e,i){for(var n=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var u=this._layers[s.id]=t.createStyleLayer(s);u._featureFilter=t.featureFilter(u.filter)}for(var l=0,p=i;l<p.length;l+=1){var c=p[l];delete this._layerConfigs[c],delete this._layers[c]}this.familiesBySource={};for(var h=0,f=function(t){for(var e={},i=0;i<t.length;i++){var n=r(t[i]),o=e[n];o||(o=e[n]=[]),o.push(t[i])}var a=[];for(var s in e)a.push(e[s]);return a}(t.values(this._layerConfigs));h<f.length;h+=1){var d=f[h].map(function(t){return n._layers[t.id]}),m=d[0];if("none"!==m.visibility){var y=m.source||"",_=this.familiesBySource[y];_||(_=this.familiesBySource[y]={});var v=m.sourceLayer||"_geojsonTileLayer",g=_[v];g||(g=_[v]=[]),g.push(d)}}};var p=function(e,r,i,n,o,a,s,u,l,p,c,h){var f=s.top*u-l,d=s.bottom*u+l,m=s.left*u-l,y=s.right*u+l;if(this.boxStartIndex=e.length,p){var _=d-f,v=y-m;_>0&&(_=Math.max(10*u,_),this._addLineCollisionCircles(e,r,i,i.segment,v,_,n,o,a,c))}else{if(h){var g=new t.Point(m,f),x=new t.Point(y,f),b=new t.Point(m,d),w=new t.Point(y,d),E=h*Math.PI/180;g._rotate(E),x._rotate(E),b._rotate(E),w._rotate(E),m=Math.min(g.x,x.x,b.x,w.x),y=Math.max(g.x,x.x,b.x,w.x),f=Math.min(g.y,x.y,b.y,w.y),d=Math.max(g.y,x.y,b.y,w.y)}e.emplaceBack(i.x,i.y,m,f,y,d,n,o,a,0,0)}this.boxEndIndex=e.length};p.prototype._addLineCollisionCircles=function(t,e,r,i,n,o,a,s,u,l){var p=o/2,c=Math.floor(n/p)||1,h=1+.4*Math.log(l)/Math.LN2,f=Math.floor(c*h/2),d=-o/2,m=r,y=i+1,_=d,v=-n/2,g=v-n/4;do{if(--y<0){if(_>v)return;y=0;break}_-=e[y].dist(m),m=e[y]}while(_>g);for(var x=e[y].dist(e[y+1]),b=-f;b<c+f;b++){var w=b*p,E=v+w;if(w<0&&(E+=w),w>n&&(E+=w-n),!(E<_)){for(;_+x<E;){if(_+=x,++y+1>=e.length)return;x=e[y].dist(e[y+1])}var S=E-_,T=e[y],A=e[y+1].sub(T)._unit()._mult(S)._add(T)._round(),z=Math.abs(E-d)<p?0:.8*(E-d);t.emplaceBack(A.x,A.y,-o/2,-o/2,o/2,o/2,a,s,u,o/2,z)}}};var c=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=h),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function h(t,e){return t<e?-1:t>e?1:0}function f(e,r,i){void 0===r&&(r=1),void 0===i&&(i=!1);for(var n=1/0,o=1/0,a=-1/0,s=-1/0,u=e[0],l=0;l<u.length;l++){var p=u[l];(!l||p.x<n)&&(n=p.x),(!l||p.y<o)&&(o=p.y),(!l||p.x>a)&&(a=p.x),(!l||p.y>s)&&(s=p.y)}var h=a-n,f=s-o,y=Math.min(h,f),_=y/2,v=new c([],d);if(0===y)return new t.Point(n,o);for(var g=n;g<a;g+=y)for(var x=o;x<s;x+=y)v.push(new m(g+_,x+_,_,e));for(var b=function(t){for(var e=0,r=0,i=0,n=t[0],o=0,a=n.length,s=a-1;o<a;s=o++){var u=n[o],l=n[s],p=u.x*l.y-l.x*u.y;r+=(u.x+l.x)*p,i+=(u.y+l.y)*p,e+=3*p}return new m(r/e,i/e,0,t)}(e),w=v.length;v.length;){var E=v.pop();(E.d>b.d||!b.d)&&(b=E,i&&console.log("found best %d after %d probes",Math.round(1e4*E.d)/1e4,w)),E.max-b.d<=r||(_=E.h/2,v.push(new m(E.p.x-_,E.p.y-_,_,e)),v.push(new m(E.p.x+_,E.p.y-_,_,e)),v.push(new m(E.p.x-_,E.p.y+_,_,e)),v.push(new m(E.p.x+_,E.p.y+_,_,e)),w+=4)}return i&&(console.log("num probes: "+w),console.log("best distance: "+b.d)),b.p}function d(t,e){return e.max-t.max}function m(e,r,i,n){this.p=new t.Point(e,r),this.h=i,this.d=function(e,r){for(var i=!1,n=1/0,o=0;o<r.length;o++)for(var a=r[o],s=0,u=a.length,l=u-1;s<u;l=s++){var p=a[s],c=a[l];p.y>e.y!=c.y>e.y&&e.x<(c.x-p.x)*(e.y-p.y)/(c.y-p.y)+p.x&&(i=!i),n=Math.min(n,t.distToSegmentSquared(e,p,c))}return(i?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}c.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},c.prototype.pop=function(){if(0!==this.length){var t=this.data[0];return this.length--,this.length>0&&(this.data[0]=this.data[this.length],this._down(0)),this.data.pop(),t}},c.prototype.peek=function(){return this.data[0]},c.prototype._up=function(t){for(var e=this.data,r=this.compare,i=e[t];t>0;){var n=t-1>>1,o=e[n];if(r(i,o)>=0)break;e[t]=o,t=n}e[t]=i},c.prototype._down=function(t){for(var e=this.data,r=this.compare,i=this.length>>1,n=e[t];t<i;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&r(e[s],a)<0&&(o=s,a=e[s]),r(a,n)>=0)break;e[t]=a,t=o}e[t]=n};var y=t.createCommonjsModule(function(t){t.exports=function(t,e){var r,i,n,o,a,s,u,l;for(r=3&t.length,i=t.length-r,n=e,a=3432918353,s=461845907,l=0;l<i;)u=255&t.charCodeAt(l)|(255&t.charCodeAt(++l))<<8|(255&t.charCodeAt(++l))<<16|(255&t.charCodeAt(++l))<<24,++l,n=27492+(65535&(o=5*(65535&(n=(n^=u=(65535&(u=(u=(65535&u)*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(u=0,r){case 3:u^=(255&t.charCodeAt(l+2))<<16;case 2:u^=(255&t.charCodeAt(l+1))<<8;case 1:n^=u=(65535&(u=(u=(65535&(u^=255&t.charCodeAt(l)))*a+(((u>>>16)*a&65535)<<16)&4294967295)<<15|u>>>17))*s+(((u>>>16)*s&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}}),_=t.createCommonjsModule(function(t){t.exports=function(t,e){for(var r,i=t.length,n=e^i,o=0;i>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:n^=(255&t.charCodeAt(o+2))<<16;case 2:n^=(255&t.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}}),v=y,g=y,x=_;function b(e,r,i,n,o,a){e.createArrays();var s=512*e.overscaling;e.tilePixelRatio=t.EXTENT/s,e.compareText={},e.iconsNeedLinear=!1;var u=e.layers[0].layout,l=e.layers[0]._unevaluatedLayout._values,p={};if("composite"===e.textSizeData.functionType){var c=e.textSizeData.zoomRange,h=c.min,f=c.max;p.compositeTextSizes=[l["text-size"].possiblyEvaluate(new t.EvaluationParameters(h)),l["text-size"].possiblyEvaluate(new t.EvaluationParameters(f))]}if("composite"===e.iconSizeData.functionType){var d=e.iconSizeData.zoomRange,m=d.min,y=d.max;p.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new t.EvaluationParameters(m)),l["icon-size"].possiblyEvaluate(new t.EvaluationParameters(y))]}p.layoutTextSize=l["text-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),p.layoutIconSize=l["icon-size"].possiblyEvaluate(new t.EvaluationParameters(e.zoom+1)),p.textMaxSize=l["text-size"].possiblyEvaluate(new t.EvaluationParameters(18));for(var _=24*u.get("text-line-height"),v="map"===u.get("text-rotation-alignment")&&"point"!==u.get("symbol-placement"),g=u.get("text-keep-upright"),x=0,b=e.features;x<b.length;x+=1){var E=b[x],S=u.get("text-font").evaluate(E,{}).join(","),T=i,A={},z=E.text;if(z){var I=z.toString(),C=u.get("text-offset").evaluate(E,{}).map(function(t){return 24*t}),k=24*u.get("text-letter-spacing").evaluate(E,{}),P=t.allowsLetterSpacing(I)?k:0,M=u.get("text-anchor").evaluate(E,{}),L=u.get("text-justify").evaluate(E,{}),D="point"===u.get("symbol-placement")?24*u.get("text-max-width").evaluate(E,{}):0;A.horizontal=t.shapeText(z,r,S,D,_,M,L,P,C,24,t.WritingMode.horizontal),t.allowsVerticalWritingMode(I)&&v&&g&&(A.vertical=t.shapeText(z,r,S,D,_,M,L,P,C,24,t.WritingMode.vertical))}var R=void 0;if(E.icon){var B=n[E.icon];B&&(R=t.shapeIcon(o[E.icon],u.get("icon-offset").evaluate(E,{}),u.get("icon-anchor").evaluate(E,{})),void 0===e.sdfIcons?e.sdfIcons=B.sdf:e.sdfIcons!==B.sdf&&t.warnOnce("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),B.pixelRatio!==e.pixelRatio?e.iconsNeedLinear=!0:0!==u.get("icon-rotate").constantOr(1)&&(e.iconsNeedLinear=!0))}(A.horizontal||R)&&w(e,E,A,R,T,p)}a&&e.generateCollisionDebugBuffers()}function w(e,r,i,n,o,a){var s=a.layoutTextSize.evaluate(r,{}),c=a.layoutIconSize.evaluate(r,{}),h=a.textMaxSize.evaluate(r,{});void 0===h&&(h=s);var d=e.layers[0].layout,m=d.get("text-offset").evaluate(r,{}),y=d.get("icon-offset").evaluate(r,{}),_=s/24,g=e.tilePixelRatio*_,x=e.tilePixelRatio*h/24,b=e.tilePixelRatio*c,w=e.tilePixelRatio*d.get("symbol-spacing"),A=d.get("text-padding")*e.tilePixelRatio,z=d.get("icon-padding")*e.tilePixelRatio,I=d.get("text-max-angle")/180*Math.PI,C="map"===d.get("text-rotation-alignment")&&"point"!==d.get("symbol-placement"),k="map"===d.get("icon-rotation-alignment")&&"point"!==d.get("symbol-placement"),P=d.get("symbol-placement"),M=w/2,L=function(s,u){u.x<0||u.x>=t.EXTENT||u.y<0||u.y>=t.EXTENT||function(e,r,i,n,o,a,s,u,l,c,h,f,d,m,y,_,g,x,b,w,T){var A,z,I=e.addToLineVertexArray(r,i),C=0,k=0,P=0,M=v(n.horizontal?n.horizontal.text:""),L=[];if(n.horizontal){var D=a.layout.get("text-rotate").evaluate(b,{});A=new p(s,i,r,u,l,c,n.horizontal,h,f,d,e.overscaling,D),k+=S(e,r,n.horizontal,a,d,b,m,I,n.vertical?t.WritingMode.horizontal:t.WritingMode.horizontalOnly,L,w,T),n.vertical&&(P+=S(e,r,n.vertical,a,d,b,m,I,t.WritingMode.vertical,L,w,T))}var R=A?A.boxStartIndex:e.collisionBoxArray.length,B=A?A.boxEndIndex:e.collisionBoxArray.length;if(o){var F=function(e,r,i,n,o,a){var s,u,l,p,c=r.image,h=i.layout,f=r.top-1/c.pixelRatio,d=r.left-1/c.pixelRatio,m=r.bottom+1/c.pixelRatio,y=r.right+1/c.pixelRatio;if("none"!==h.get("icon-text-fit")&&o){var _=y-d,v=m-f,g=h.get("text-size").evaluate(a,{})/24,x=o.left*g,b=o.right*g,w=o.top*g,E=b-x,S=o.bottom*g-w,T=h.get("icon-text-fit-padding")[0],A=h.get("icon-text-fit-padding")[1],z=h.get("icon-text-fit-padding")[2],I=h.get("icon-text-fit-padding")[3],C="width"===h.get("icon-text-fit")?.5*(S-v):0,k="height"===h.get("icon-text-fit")?.5*(E-_):0,P="width"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?E:_,M="height"===h.get("icon-text-fit")||"both"===h.get("icon-text-fit")?S:v;s=new t.Point(x+k-I,w+C-T),u=new t.Point(x+k+A+P,w+C-T),l=new t.Point(x+k+A+P,w+C+z+M),p=new t.Point(x+k-I,w+C+z+M)}else s=new t.Point(d,f),u=new t.Point(y,f),l=new t.Point(y,m),p=new t.Point(d,m);var L=i.layout.get("icon-rotate").evaluate(a,{})*Math.PI/180;if(L){var D=Math.sin(L),R=Math.cos(L),B=[R,-D,D,R];s._matMult(B),u._matMult(B),p._matMult(B),l._matMult(B)}return[{tl:s,tr:u,bl:p,br:l,tex:c.paddedRect,writingMode:void 0,glyphOffset:[0,0]}]}(0,o,a,0,n.horizontal,b),O=a.layout.get("icon-rotate").evaluate(b,{});z=new p(s,i,r,u,l,c,o,y,_,!1,e.overscaling,O),C=4*F.length;var U=e.iconSizeData,V=null;"source"===U.functionType?(V=[t.SIZE_PACK_FACTOR*a.layout.get("icon-size").evaluate(b,{})])[0]>E&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'):"composite"===U.functionType&&((V=[t.SIZE_PACK_FACTOR*T.compositeIconSizes[0].evaluate(b,{}),t.SIZE_PACK_FACTOR*T.compositeIconSizes[1].evaluate(b,{})])[0]>E||V[1]>E)&&t.warnOnce(e.layerIds[0]+': Value for "icon-size" is >= 256. Reduce your "icon-size".'),e.addSymbols(e.icon,F,V,x,g,b,!1,r,I.lineStartIndex,I.lineLength)}var N=z?z.boxStartIndex:e.collisionBoxArray.length,j=z?z.boxEndIndex:e.collisionBoxArray.length;e.glyphOffsetArray.length>=t.SymbolBucket.MAX_GLYPHS&&t.warnOnce("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),e.symbolInstances.emplaceBack(r.x,r.y,L.length>0?L[0]:-1,L.length>1?L[1]:-1,M,R,B,N,j,u,k,P,C,0)}(e,u,s,i,n,e.layers[0],e.collisionBoxArray,r.index,r.sourceLayerIndex,e.index,g,A,C,m,b,z,k,y,r,o,a)};if("line"===P)for(var D=0,R=function(e,r,i,n,o){for(var a=[],s=0;s<e.length;s++)for(var u=e[s],l=void 0,p=0;p<u.length-1;p++){var c=u[p],h=u[p+1];c.x<0&&h.x<0||(c.x<0?c=new t.Point(0,c.y+(h.y-c.y)*((0-c.x)/(h.x-c.x)))._round():h.x<0&&(h=new t.Point(0,c.y+(h.y-c.y)*((0-c.x)/(h.x-c.x)))._round()),c.y<0&&h.y<0||(c.y<0?c=new t.Point(c.x+(h.x-c.x)*((0-c.y)/(h.y-c.y)),0)._round():h.y<0&&(h=new t.Point(c.x+(h.x-c.x)*((0-c.y)/(h.y-c.y)),0)._round()),c.x>=n&&h.x>=n||(c.x>=n?c=new t.Point(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round():h.x>=n&&(h=new t.Point(n,c.y+(h.y-c.y)*((n-c.x)/(h.x-c.x)))._round()),c.y>=o&&h.y>=o||(c.y>=o?c=new t.Point(c.x+(h.x-c.x)*((o-c.y)/(h.y-c.y)),o)._round():h.y>=o&&(h=new t.Point(c.x+(h.x-c.x)*((o-c.y)/(h.y-c.y)),o)._round()),l&&c.equals(l[l.length-1])||(l=[c],a.push(l)),l.push(h)))))}return a}(r.geometry,0,0,t.EXTENT,t.EXTENT);D<R.length;D+=1)for(var B=R[D],F=0,O=l(B,w,I,i.vertical||i.horizontal,n,24,x,e.overscaling,t.EXTENT);F<O.length;F+=1){var U=O[F],V=i.horizontal;V&&T(e,V.text,M,U)||L(B,U)}else if("line-center"===P)for(var N=0,j=r.geometry;N<j.length;N+=1){var q=j[N];if(q.length>1){var Z=u(q,I,i.vertical||i.horizontal,n,24,x);Z&&L(q,Z)}}else if("Polygon"===r.type)for(var G=0,X=t.classifyRings(r.geometry,0);G<X.length;G+=1){var W=X[G],K=f(W,16);L(W[0],new t.Anchor(K.x,K.y,0))}else if("LineString"===r.type)for(var H=0,Y=r.geometry;H<Y.length;H+=1){var J=Y[H];L(J,new t.Anchor(J[0].x,J[0].y,0))}else if("Point"===r.type)for(var $=0,Q=r.geometry;$<Q.length;$+=1)for(var tt=0,et=Q[$];tt<et.length;tt+=1){var rt=et[tt];L([rt],new t.Anchor(rt.x,rt.y,0))}}v.murmur3=g,v.murmur2=x;var E=65535;function S(e,r,i,n,o,a,s,u,l,p,c,h){var f=function(e,r,i,n,o,a){for(var s=i.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=i.layout.get("text-offset").evaluate(o,{}).map(function(t){return 24*t}),l=r.positionedGlyphs,p=[],c=0;c<l.length;c++){var h=l[c],f=a[h.fontStack],d=f&&f[h.glyph];if(d){var m=d.rect;if(m){var y=t.GLYPH_PBF_BORDER+1,_=d.metrics.advance*h.scale/2,v=n?[h.x+_,h.y]:[0,0],g=n?[0,0]:[h.x+_+u[0],h.y+u[1]],x=(d.metrics.left-y)*h.scale-_+g[0],b=(-d.metrics.top-y)*h.scale+g[1],w=x+m.w*h.scale,E=b+m.h*h.scale,S=new t.Point(x,b),T=new t.Point(w,b),A=new t.Point(x,E),z=new t.Point(w,E);if(n&&h.vertical){var I=new t.Point(-_,_),C=-Math.PI/2,k=new t.Point(5,0);S._rotateAround(C,I)._add(k),T._rotateAround(C,I)._add(k),A._rotateAround(C,I)._add(k),z._rotateAround(C,I)._add(k)}if(s){var P=Math.sin(s),M=Math.cos(s),L=[M,-P,P,M];S._matMult(L),T._matMult(L),A._matMult(L),z._matMult(L)}p.push({tl:S,tr:T,bl:A,br:z,tex:m,writingMode:r.writingMode,glyphOffset:v})}}}return p}(0,i,n,o,a,c),d=e.textSizeData,m=null;return"source"===d.functionType?(m=[t.SIZE_PACK_FACTOR*n.layout.get("text-size").evaluate(a,{})])[0]>E&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'):"composite"===d.functionType&&((m=[t.SIZE_PACK_FACTOR*h.compositeTextSizes[0].evaluate(a,{}),t.SIZE_PACK_FACTOR*h.compositeTextSizes[1].evaluate(a,{})])[0]>E||m[1]>E)&&t.warnOnce(e.layerIds[0]+': Value for "text-size" is >= 256. Reduce your "text-size".'),e.addSymbols(e.text,f,m,s,o,a,l,r,u.lineStartIndex,u.lineLength),p.push(e.text.placedSymbolArray.length-1),4*f.length}function T(t,e,r,i){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;a>=0;a--)if(i.dist(o[a])<r)return!0}else n[e]=[];return n[e].push(i),!1}var A=function(e){var r={},i=[];for(var n in e){var o=e[n],a=r[n]={};for(var s in o){var u=o[+s];if(u&&0!==u.bitmap.width&&0!==u.bitmap.height){var l={x:0,y:0,w:u.bitmap.width+2,h:u.bitmap.height+2};i.push(l),a[s]={rect:l,metrics:u.metrics}}}}var p=t.potpack(i),c=p.w,h=p.h,f=new t.AlphaImage({width:c||1,height:h||1});for(var d in e){var m=e[d];for(var y in m){var _=m[+y];if(_&&0!==_.bitmap.width&&0!==_.bitmap.height){var v=r[d][y].rect;t.AlphaImage.copy(_.bitmap,f,{x:0,y:0},{x:v.x+1,y:v.y+1},_.bitmap)}}}this.image=f,this.positions=r};t.register("GlyphAtlas",A);var z=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies};function I(e,r){for(var i=new t.EvaluationParameters(r),n=0,o=e;n<o.length;n+=1)o[n].recalculate(i)}z.prototype.parse=function(e,r,i,n){var o=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var a=new t.DictionaryCoder(Object.keys(e.layers).sort()),s=new t.FeatureIndex(this.tileID);s.bucketLayerIDs=[];var u,l,p,c,h={},f={featureIndex:s,iconDependencies:{},patternDependencies:{},glyphDependencies:{}},d=r.familiesBySource[this.source];for(var m in d){var y=e.layers[m];if(y){1===y.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+m+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var _=a.encode(m),v=[],g=0;g<y.length;g++){var x=y.feature(g);v.push({feature:x,index:g,sourceLayerIndex:_})}for(var w=0,E=d[m];w<E.length;w+=1){var S=E[w],T=S[0];T.minzoom&&this.zoom<Math.floor(T.minzoom)||T.maxzoom&&this.zoom>=T.maxzoom||"none"!==T.visibility&&(I(S,this.zoom),(h[T.id]=T.createBucket({index:s.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:_,sourceID:this.source})).populate(v,f),s.bucketLayerIDs.push(S.map(function(t){return t.id})))}}}var z=t.mapObject(f.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(z).length?i.send("getGlyphs",{uid:this.uid,stacks:z},function(t,e){u||(u=t,l=e,P.call(o))}):l={};var C=Object.keys(f.iconDependencies);C.length?i.send("getImages",{icons:C},function(t,e){u||(u=t,p=e,P.call(o))}):p={};var k=Object.keys(f.patternDependencies);function P(){if(u)return n(u);if(l&&p&&c){var e=new A(l),r=new t.ImageAtlas(p,c);for(var i in h){var o=h[i];o instanceof t.SymbolBucket?(I(o.layers,this.zoom),b(o,l,e.positions,p,r.iconPositions,this.showCollisionBoxes)):o.hasPattern&&(o instanceof t.LineBucket||o instanceof t.FillBucket||o instanceof t.FillExtrusionBucket)&&(I(o.layers,this.zoom),o.addFeatures(f,r.patternPositions))}this.status="done",n(null,{buckets:t.values(h).filter(function(t){return!t.isEmpty()}),featureIndex:s,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?l:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}k.length?i.send("getImages",{icons:k},function(t,e){u||(u=t,c=e,P.call(o))}):c={},P.call(this)};var C="undefined"!=typeof performance,k={getEntriesByName:function(t){return!!(C&&performance&&performance.getEntriesByName)&&performance.getEntriesByName(t)},mark:function(t){return!!(C&&performance&&performance.mark)&&performance.mark(t)},measure:function(t,e,r){return!!(C&&performance&&performance.measure)&&performance.measure(t,e,r)},clearMarks:function(t){return!!(C&&performance&&performance.clearMarks)&&performance.clearMarks(t)},clearMeasures:function(t){return!!(C&&performance&&performance.clearMeasures)&&performance.clearMeasures(t)}},P=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},k.mark(this._marks.start)};function M(e,r){var i=t.getArrayBuffer(e.request,function(e,i,n,o){e?r(e):i&&r(null,{vectorTile:new t.mvt.VectorTile(new t.Protobuf(i)),rawData:i,cacheControl:n,expires:o})});return function(){i.cancel(),r()}}P.prototype.finish=function(){k.mark(this._marks.end);var t=k.getEntriesByName(this._marks.measure);return 0===t.length&&(k.measure(this._marks.measure,this._marks.start,this._marks.end),t=k.getEntriesByName(this._marks.measure),k.clearMarks(this._marks.start),k.clearMarks(this._marks.end),k.clearMeasures(this._marks.measure)),t},k.Performance=P;var L=function(t,e,r){this.actor=t,this.layerIndex=e,this.loadVectorData=r||M,this.loading={},this.loaded={}};L.prototype.loadTile=function(e,r){var i=this,n=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new k.Performance(e.request),a=this.loading[n]=new z(e);a.abort=this.loadVectorData(e,function(e,s){if(delete i.loading[n],e||!s)return a.status="done",i.loaded[n]=a,r(e);var u=s.rawData,l={};s.expires&&(l.expires=s.expires),s.cacheControl&&(l.cacheControl=s.cacheControl);var p={};if(o){var c=o.finish();c&&(p.resourceTiming=JSON.parse(JSON.stringify(c)))}a.vectorTile=s.vectorTile,a.parse(s.vectorTile,i.layerIndex,i.actor,function(e,i){if(e||!i)return r(e);r(null,t.extend({rawTileData:u.slice(0)},i,l,p))}),i.loaded=i.loaded||{},i.loaded[n]=a})},L.prototype.reloadTile=function(t,e){var r=this.loaded,i=t.uid,n=this;if(r&&r[i]){var o=r[i];o.showCollisionBoxes=t.showCollisionBoxes;var a=function(t,r){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,n.layerIndex,n.actor,i)),e(t,r)};"parsing"===o.status?o.reloadCallback=a:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.actor,a):a())}},L.prototype.abortTile=function(t,e){var r=this.loading,i=t.uid;r&&r[i]&&r[i].abort&&(r[i].abort(),delete r[i]),e()},L.prototype.removeTile=function(t,e){var r=this.loaded,i=t.uid;r&&r[i]&&delete r[i],e()};var D=function(){this.loaded={}};D.prototype.loadTile=function(e,r){var i=e.uid,n=e.encoding,o=e.rawImageData,a=new t.DEMData(i,o,n);this.loaded=this.loaded||{},this.loaded[i]=a,r(null,a)},D.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var R={RADIUS:6378137,FLATTENING:1/298.257223563,POLAR_RADIUS:6356752.3142};function B(t){var e=0;if(t&&t.length>0){e+=Math.abs(F(t[0]));for(var r=1;r<t.length;r++)e-=Math.abs(F(t[r]))}return e}function F(t){var e,r,i,n,o,a,s=0,u=t.length;if(u>2){for(a=0;a<u;a++)a===u-2?(i=u-2,n=u-1,o=0):a===u-1?(i=u-1,n=0,o=1):(i=a,n=a+1,o=a+2),e=t[i],r=t[n],s+=(O(t[o][0])-O(e[0]))*Math.sin(O(r[1]));s=s*R.RADIUS*R.RADIUS/2}return s}function O(t){return t*Math.PI/180}var U={geometry:function t(e){var r,i=0;switch(e.type){case"Polygon":return B(e.coordinates);case"MultiPolygon":for(r=0;r<e.coordinates.length;r++)i+=B(e.coordinates[r]);return i;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(r=0;r<e.geometries.length;r++)i+=t(e.geometries[r]);return i}},ring:F};function V(t,e){return function(r){return t(r,e)}}function N(t,e){e=!!e,t[0]=j(t[0],e);for(var r=1;r<t.length;r++)t[r]=j(t[r],!e);return t}function j(t,e){return function(t){return U.ring(t)>=0}(t)===e?t:t.reverse()}var q=t.mvt.VectorTileFeature.prototype.toGeoJSON,Z=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};Z.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,i=this._feature.geometry;r<i.length;r+=1){var n=i[r];e.push([new t.Point(n[0],n[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var u=[],l=0,p=s[a];l<p.length;l+=1){var c=p[l];u.push(new t.Point(c[0],c[1]))}o.push(u)}return o},Z.prototype.toGeoJSON=function(t,e,r){return q.call(this,t,e,r)};var G=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};G.prototype.feature=function(t){return new Z(this._features[t])};var X=t.vectorTile.VectorTileFeature,W=K;function K(t,e){this.options=e||{},this.features=t,this.length=t.length}function H(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}K.prototype.feature=function(t){return new H(this.features[t],this.options.extent)},H.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var i=e[r],n=[],o=0;o<i.length;o++)n.push(new t.Point$1(i[o][0],i[o][1]));this.geometry.push(n)}return this.geometry},H.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,i=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var u=a[s];e=Math.min(e,u.x),r=Math.max(r,u.x),i=Math.min(i,u.y),n=Math.max(n,u.y)}return[e,i,r,n]},H.prototype.toGeoJSON=X.prototype.toGeoJSON;var Y=Q,J=Q,$=W;function Q(e){var r=new t.pbf;return function(t,e){for(var r in t.layers)e.writeMessage(3,tt,t.layers[r])}(e,r),r.finish()}function tt(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var i={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,et,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,at,o[r])}function et(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,rt,t),e.writeVarintField(3,r.type),e.writeMessage(4,ot,r)}function rt(t,e){var r=t.feature,i=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var u=o[s];void 0===u&&(i.push(s),u=i.length-1,o[s]=u),e.writeVarint(u);var l=r.properties[s],p=typeof l;"string"!==p&&"boolean"!==p&&"number"!==p&&(l=JSON.stringify(l));var c=p+":"+l,h=a[c];void 0===h&&(n.push(l),h=n.length-1,a[c]=h),e.writeVarint(h)}}function it(t,e){return(e<<3)+(7&t)}function nt(t){return t<<1^t>>31}function ot(t,e){for(var r=t.loadGeometry(),i=t.type,n=0,o=0,a=r.length,s=0;s<a;s++){var u=r[s],l=1;1===i&&(l=u.length),e.writeVarint(it(1,l));for(var p=3===i?u.length-1:u.length,c=0;c<p;c++){1===c&&1!==i&&e.writeVarint(it(2,p-1));var h=u[c].x-n,f=u[c].y-o;e.writeVarint(nt(h)),e.writeVarint(nt(f)),n+=h,o+=f}3===i&&e.writeVarint(it(7,1))}}function at(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function st(t,e,r,i){ut(t,r,i),ut(e,2*r,2*i),ut(e,2*r+1,2*i+1)}function ut(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function lt(t,e,r,i){var n=t-r,o=e-i;return n*n+o*o}Y.fromVectorTileJs=J,Y.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var i in t)r[i]=new W(t[i].features,e),r[i].name=i,r[i].version=e.version,r[i].extent=e.extent;return Q({layers:r})},Y.GeoJSONWrapper=$;var pt=function(t){return t[0]},ct=function(t){return t[1]},ht=function(t,e,r,i,n){void 0===e&&(e=pt),void 0===r&&(r=ct),void 0===i&&(i=64),void 0===n&&(n=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new n(2*t.length),u=0;u<t.length;u++)a[u]=u,s[2*u]=e(t[u]),s[2*u+1]=r(t[u]);!function t(e,r,i,n,o,a){if(!(o-n<=i)){var s=n+o>>1;!function t(e,r,i,n,o,a){for(;o>n;){if(o-n>600){var s=o-n+1,u=i-n+1,l=Math.log(s),p=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*p*(s-p)/s)*(u-s/2<0?-1:1);t(e,r,i,Math.max(n,Math.floor(i-u*p/s+c)),Math.min(o,Math.floor(i+(s-u)*p/s+c)),a)}var h=r[2*i+a],f=n,d=o;for(st(e,r,n,i),r[2*o+a]>h&&st(e,r,n,o);f<d;){for(st(e,r,f,d),f++,d--;r[2*f+a]<h;)f++;for(;r[2*d+a]>h;)d--}r[2*n+a]===h?st(e,r,n,d):st(e,r,++d,o),d<=i&&(n=d+1),i<=d&&(o=d-1)}}(e,r,s,n,o,a%2),t(e,r,i,n,s-1,a+1),t(e,r,i,s+1,o,a+1)}}(a,s,i,0,a.length-1,0)};ht.prototype.range=function(t,e,r,i){return function(t,e,r,i,n,o,a){for(var s,u,l=[0,t.length-1,0],p=[];l.length;){var c=l.pop(),h=l.pop(),f=l.pop();if(h-f<=a)for(var d=f;d<=h;d++)s=e[2*d],u=e[2*d+1],s>=r&&s<=n&&u>=i&&u<=o&&p.push(t[d]);else{var m=Math.floor((f+h)/2);s=e[2*m],u=e[2*m+1],s>=r&&s<=n&&u>=i&&u<=o&&p.push(t[m]);var y=(c+1)%2;(0===c?r<=s:i<=u)&&(l.push(f),l.push(m-1),l.push(y)),(0===c?n>=s:o>=u)&&(l.push(m+1),l.push(h),l.push(y))}}return p}(this.ids,this.coords,t,e,r,i,this.nodeSize)},ht.prototype.within=function(t,e,r){return function(t,e,r,i,n,o){for(var a=[0,t.length-1,0],s=[],u=n*n;a.length;){var l=a.pop(),p=a.pop(),c=a.pop();if(p-c<=o)for(var h=c;h<=p;h++)lt(e[2*h],e[2*h+1],r,i)<=u&&s.push(t[h]);else{var f=Math.floor((c+p)/2),d=e[2*f],m=e[2*f+1];lt(d,m,r,i)<=u&&s.push(t[f]);var y=(l+1)%2;(0===l?r-n<=d:i-n<=m)&&(a.push(c),a.push(f-1),a.push(y)),(0===l?r+n>=d:i+n>=m)&&(a.push(f+1),a.push(p),a.push(y))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var ft={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,reduce:null,map:function(t){return t}},dt=function(t){this.options=bt(Object.create(ft),t),this.trees=new Array(this.options.maxZoom+1)};function mt(t,e,r,i,n){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:i,properties:n}}function yt(t,e){var r=t.geometry.coordinates,i=r[0],n=r[1];return{x:gt(i),y:xt(n),zoom:1/0,index:e,parentId:-1}}function _t(t){return{type:"Feature",id:t.id,properties:vt(t),geometry:{type:"Point",coordinates:[(i=t.x,360*(i-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,i}function vt(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return bt(bt({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function gt(t){return t/360+.5}function xt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function bt(t,e){for(var r in e)t[r]=e[r];return t}function wt(t){return t.x}function Et(t){return t.y}function St(t,e,r,i,n,o){var a=n-r,s=o-i;if(0!==a||0!==s){var u=((t-r)*a+(e-i)*s)/(a*a+s*s);u>1?(r=n,i=o):u>0&&(r+=a*u,i+=s*u)}return(a=t-r)*a+(s=e-i)*s}function Tt(t,e,r,i){var n={id:void 0===t?null:t,type:e,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)At(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var i=0;i<e.length;i++)At(t,e[i]);else if("MultiPolygon"===r)for(i=0;i<e.length;i++)for(var n=0;n<e[i].length;n++)At(t,e[i][n])}(n),n}function At(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function zt(t,e,r,i){if(e.geometry){var n=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],u=e.id;if(r.promoteId?u=e.properties[r.promoteId]:r.generateId&&(u=i||0),"Point"===o)It(n,s);else if("MultiPoint"===o)for(var l=0;l<n.length;l++)It(n[l],s);else if("LineString"===o)Ct(n,s,a,!1);else if("MultiLineString"===o){if(r.lineMetrics){for(l=0;l<n.length;l++)s=[],Ct(n[l],s,a,!1),t.push(Tt(u,"LineString",s,e.properties));return}kt(n,s,a,!1)}else if("Polygon"===o)kt(n,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(l=0;l<e.geometry.geometries.length;l++)zt(t,{id:u,geometry:e.geometry.geometries[l],properties:e.properties},r,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(l=0;l<n.length;l++){var p=[];kt(n[l],p,a,!0),s.push(p)}}t.push(Tt(u,o,s,e.properties))}}function It(t,e){e.push(Pt(t[0])),e.push(Mt(t[1])),e.push(0)}function Ct(t,e,r,i){for(var n,o,a=0,s=0;s<t.length;s++){var u=Pt(t[s][0]),l=Mt(t[s][1]);e.push(u),e.push(l),e.push(0),s>0&&(a+=i?(n*l-u*o)/2:Math.sqrt(Math.pow(u-n,2)+Math.pow(l-o,2))),n=u,o=l}var p=e.length-3;e[2]=1,function t(e,r,i,n){for(var o,a=n,s=i-r>>1,u=i-r,l=e[r],p=e[r+1],c=e[i],h=e[i+1],f=r+3;f<i;f+=3){var d=St(e[f],e[f+1],l,p,c,h);if(d>a)o=f,a=d;else if(d===a){var m=Math.abs(f-s);m<u&&(o=f,u=m)}}a>n&&(o-r>3&&t(e,r,o,n),e[o+2]=a,i-o>3&&t(e,o,i,n))}(e,0,p,r),e[p+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function kt(t,e,r,i){for(var n=0;n<t.length;n++){var o=[];Ct(t[n],o,r,i),e.push(o)}}function Pt(t){return t/360+.5}function Mt(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Lt(t,e,r,i,n,o,a,s){if(i/=e,o>=(r/=e)&&a<i)return t;if(a<r||o>=i)return null;for(var u=[],l=0;l<t.length;l++){var p=t[l],c=p.geometry,h=p.type,f=0===n?p.minX:p.minY,d=0===n?p.maxX:p.maxY;if(f>=r&&d<i)u.push(p);else if(!(d<r||f>=i)){var m=[];if("Point"===h||"MultiPoint"===h)Dt(c,m,r,i,n);else if("LineString"===h)Rt(c,m,r,i,n,!1,s.lineMetrics);else if("MultiLineString"===h)Ft(c,m,r,i,n,!1);else if("Polygon"===h)Ft(c,m,r,i,n,!0);else if("MultiPolygon"===h)for(var y=0;y<c.length;y++){var _=[];Ft(c[y],_,r,i,n,!0),_.length&&m.push(_)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(y=0;y<m.length;y++)u.push(Tt(p.id,h,m[y],p.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),u.push(Tt(p.id,h,m,p.tags))}}}return u.length?u:null}function Dt(t,e,r,i,n){for(var o=0;o<t.length;o+=3){var a=t[o+n];a>=r&&a<=i&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function Rt(t,e,r,i,n,o,a){for(var s,u,l=Bt(t),p=0===n?Ut:Vt,c=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],y=t[h+3],_=t[h+4],v=0===n?f:d,g=0===n?y:_,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-_,2))),v<r?g>r&&(u=p(l,f,d,y,_,r),a&&(l.start=c+s*u)):v>i?g<i&&(u=p(l,f,d,y,_,i),a&&(l.start=c+s*u)):Ot(l,f,d,m),g<r&&v>=r&&(u=p(l,f,d,y,_,r),x=!0),g>i&&v<=i&&(u=p(l,f,d,y,_,i),x=!0),!o&&x&&(a&&(l.end=c+s*u),e.push(l),l=Bt(t)),a&&(c+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(v=0===n?f:d)>=r&&v<=i&&Ot(l,f,d,m),b=l.length-3,o&&b>=3&&(l[b]!==l[0]||l[b+1]!==l[1])&&Ot(l,l[0],l[1],l[2]),l.length&&e.push(l)}function Bt(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function Ft(t,e,r,i,n,o){for(var a=0;a<t.length;a++)Rt(t[a],e,r,i,n,o,!1)}function Ot(t,e,r,i){t.push(e),t.push(r),t.push(i)}function Ut(t,e,r,i,n,o){var a=(o-e)/(i-e);return t.push(o),t.push(r+(n-r)*a),t.push(1),a}function Vt(t,e,r,i,n,o){var a=(o-r)/(n-r);return t.push(e+(i-e)*a),t.push(o),t.push(1),a}function Nt(t,e){for(var r=[],i=0;i<t.length;i++){var n,o=t[i],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)n=jt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(jt(o.geometry[s],e))}else if("MultiPolygon"===a)for(n=[],s=0;s<o.geometry.length;s++){for(var u=[],l=0;l<o.geometry[s].length;l++)u.push(jt(o.geometry[s][l],e));n.push(u)}r.push(Tt(o.id,a,n,o.tags))}return r}function jt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var i=0;i<t.length;i+=3)r.push(t[i]+e,t[i+1],t[i+2]);return r}function qt(t,e){if(t.transformed)return t;var r,i,n,o=1<<t.z,a=t.x,s=t.y;for(r=0;r<t.features.length;r++){var u=t.features[r],l=u.geometry,p=u.type;if(u.geometry=[],1===p)for(i=0;i<l.length;i+=2)u.geometry.push(Zt(l[i],l[i+1],e,o,a,s));else for(i=0;i<l.length;i++){var c=[];for(n=0;n<l[i].length;n+=2)c.push(Zt(l[i][n],l[i][n+1],e,o,a,s));u.geometry.push(c)}}return t.transformed=!0,t}function Zt(t,e,r,i,n,o){return[Math.round(r*(t*i-n)),Math.round(r*(e*i-o))]}function Gt(t,e,r,i,n){for(var o=e===n.maxZoom?0:n.tolerance/((1<<e)*n.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,Xt(a,t[s],o,n);var u=t[s].minX,l=t[s].minY,p=t[s].maxX,c=t[s].maxY;u<a.minX&&(a.minX=u),l<a.minY&&(a.minY=l),p>a.maxX&&(a.maxX=p),c>a.maxY&&(a.maxY=c)}return a}function Xt(t,e,r,i){var n=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<n.length;s+=3)a.push(n[s]),a.push(n[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)Wt(a,n,t,r,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)Wt(a,n[s],t,r,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var u=0;u<n.length;u++){var l=n[u];for(s=0;s<l.length;s++)Wt(a,l[s],t,r,!0,0===s)}if(a.length){var p=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var c in p={},e.tags)p[c]=e.tags[c];p.mapbox_clip_start=n.start/n.size,p.mapbox_clip_end=n.end/n.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:p};null!==e.id&&(h.id=e.id),t.features.push(h)}}function Wt(t,e,r,i,n,o){var a=i*i;if(i>0&&e.size<(n?a:i))r.numPoints+=e.length/3;else{for(var s=[],u=0;u<e.length;u+=3)(0===i||e[u+2]>a)&&(r.numSimplified++,s.push(e[u]),s.push(e[u+1])),r.numPoints++;n&&function(t,e){for(var r=0,i=0,n=t.length,o=n-2;i<n;o=i,i+=2)r+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(r>0===e)for(i=0,n=t.length;i<n/2;i+=2){var a=t[i],s=t[i+1];t[i]=t[n-2-i],t[i+1]=t[n-1-i],t[n-2-i]=a,t[n-1-i]=s}}(s,o),t.push(s)}}function Kt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)zt(r,t.features[i],e,i);else"Feature"===t.type?zt(r,t,e):zt(r,{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var r=e.buffer/e.extent,i=t,n=Lt(t,1,-1-r,r,0,-1,2,e),o=Lt(t,1,1-r,2+r,0,-1,2,e);return(n||o)&&(i=Lt(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=Nt(n,1).concat(i)),o&&(i=i.concat(Nt(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Ht(t,e,r){return 32*((1<<t)*r+e)+t}function Yt(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var i=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!i)return e(null,null);var n=new G(i.features),o=Y(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:n,rawData:o.buffer})}dt.prototype.load=function(t){var e=this.options,r=e.log,i=e.minZoom,n=e.maxZoom,o=e.nodeSize;r&&console.time("total time");var a="prepare "+t.length+" points";r&&console.time(a),this.points=t;for(var s=[],u=0;u<t.length;u++)t[u].geometry&&s.push(yt(t[u],u));this.trees[n+1]=new ht(s,wt,Et,o,Float32Array),r&&console.timeEnd(a);for(var l=n;l>=i;l--){var p=+Date.now();s=this._cluster(s,l),this.trees[l]=new ht(s,wt,Et,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",l,s.length,+Date.now()-p)}return r&&console.timeEnd("total time"),this},dt.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){var a=this.getClusters([r,i,180,o],e),s=this.getClusters([-180,i,n,o],e);return a.concat(s)}for(var u=this.trees[this._limitZoom(e)],l=[],p=0,c=u.range(gt(r),xt(o),gt(n),xt(i));p<c.length;p+=1){var h=c[p],f=u.points[h];l.push(f.numPoints?_t(f):this.points[f.index])}return l},dt.prototype.getChildren=function(t){var e=t>>5,r=t%32,i="No cluster with the specified id.",n=this.trees[r];if(!n)throw new Error(i);var o=n.points[e];if(!o)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],u=0,l=n.within(o.x,o.y,a);u<l.length;u+=1){var p=l[u],c=n.points[p];c.parentId===t&&s.push(c.numPoints?_t(c):this.points[c.index])}if(0===s.length)throw new Error(i);return s},dt.prototype.getLeaves=function(t,e,r){e=e||10,r=r||0;var i=[];return this._appendLeaves(i,t,e,r,0),i},dt.prototype.getTile=function(t,e,r){var i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options,a=o.extent,s=o.radius/a,u=(r-s)/n,l=(r+1+s)/n,p={features:[]};return this._addTileFeatures(i.range((e-s)/n,u,(e+1+s)/n,l),i.points,e,r,n,p),0===e&&this._addTileFeatures(i.range(1-s/n,u,1,l),i.points,n,r,n,p),e===n-1&&this._addTileFeatures(i.range(0,u,s/n,l),i.points,-1,r,n,p),p.features.length?p:null},dt.prototype.getClusterExpansionZoom=function(t){for(var e=t%32-1;e<=this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},dt.prototype._appendLeaves=function(t,e,r,i,n){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],u=s.properties;if(u&&u.cluster?n+u.point_count<=i?n+=u.point_count:n=this._appendLeaves(t,u.cluster_id,r,i,n):n<i?n++:t.push(s),t.length===r)break}return n},dt.prototype._addTileFeatures=function(t,e,r,i,n,o){for(var a=0,s=t;a<s.length;a+=1){var u=e[s[a]],l={type:1,geometry:[[Math.round(this.options.extent*(u.x*n-r)),Math.round(this.options.extent*(u.y*n-i))]],tags:u.numPoints?vt(u):this.points[u.index].properties},p=u.numPoints?u.id:this.points[u.index].id;void 0!==p&&(l.id=p),o.features.push(l)}},dt.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},dt.prototype._cluster=function(t,e){for(var r=[],i=this.options,n=i.radius,o=i.extent,a=i.reduce,s=n/(o*Math.pow(2,e)),u=0;u<t.length;u++){var l=t[u];if(!(l.zoom<=e)){l.zoom=e;for(var p=this.trees[e+1],c=p.within(l.x,l.y,s),h=l.numPoints||1,f=l.x*h,d=l.y*h,m=a?this._map(l,!0):null,y=(u<<5)+(e+1),_=0,v=c;_<v.length;_+=1){var g=v[_],x=p.points[g];if(!(x.zoom<=e)){x.zoom=e;var b=x.numPoints||1;f+=x.x*b,d+=x.y*b,h+=b,x.parentId=y,a&&a(m,this._map(x))}}1===h?r.push(l):(l.parentId=y,r.push(mt(f/h,d/h,y,h,m)))}}return r},dt.prototype._map=function(t,e){if(t.numPoints)return e?bt({},t.properties):t.properties;var r=this.points[t.index].properties,i=this.options.map(r);return e&&i===r?bt({},i):i},Kt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Kt.prototype.splitTile=function(t,e,r,i,n,o,a){for(var s=[t,e,r,i],u=this.options,l=u.debug;s.length;){i=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var p=1<<e,c=Ht(e,r,i),h=this.tiles[c];if(!h&&(l>1&&console.time("creation"),h=this.tiles[c]=Gt(t,e,r,i,u),this.tileCoords.push({z:e,x:r,y:i}),l)){l>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,n){if(e===u.maxZoom||e===n)continue;var d=1<<n-e;if(r!==Math.floor(o/d)||i!==Math.floor(a/d))continue}else if(e===u.indexMaxZoom||h.numPoints<=u.indexMaxPoints)continue;if(h.source=null,0!==t.length){l>1&&console.time("clipping");var m,y,_,v,g,x,b=.5*u.buffer/u.extent,w=.5-b,E=.5+b,S=1+b;m=y=_=v=null,g=Lt(t,p,r-b,r+E,0,h.minX,h.maxX,u),x=Lt(t,p,r+w,r+S,0,h.minX,h.maxX,u),t=null,g&&(m=Lt(g,p,i-b,i+E,1,h.minY,h.maxY,u),y=Lt(g,p,i+w,i+S,1,h.minY,h.maxY,u),g=null),x&&(_=Lt(x,p,i-b,i+E,1,h.minY,h.maxY,u),v=Lt(x,p,i+w,i+S,1,h.minY,h.maxY,u),x=null),l>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*r,2*i),s.push(y||[],e+1,2*r,2*i+1),s.push(_||[],e+1,2*r+1,2*i),s.push(v||[],e+1,2*r+1,2*i+1)}}},Kt.prototype.getTile=function(t,e,r){var i=this.options,n=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=Ht(t,e=(e%a+a)%a,r);if(this.tiles[s])return qt(this.tiles[s],n);o>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var u,l=t,p=e,c=r;!u&&l>0;)l--,p=Math.floor(p/2),c=Math.floor(c/2),u=this.tiles[Ht(l,p,c)];return u&&u.source?(o>1&&console.log("found parent tile z%d-%d-%d",l,p,c),o>1&&console.time("drilling down"),this.splitTile(u.source,l,p,c,t,e,r),o>1&&console.timeEnd("drilling down"),this.tiles[s]?qt(this.tiles[s],n):null):null};var Jt=function(e){function r(t,r,i){e.call(this,t,r,Yt),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var n=!!(i&&i.request&&i.request.collectResourceTiming)&&new k.Performance(i.request);this.loadGeoJSON(i,function(o,a){if(o||!a)return r(o);if("object"!=typeof a)return r(new Error("Input data is not a valid GeoJSON object."));!function t(e,r){switch(e&&e.type||null){case"FeatureCollection":return e.features=e.features.map(V(t,r)),e;case"GeometryCollection":return e.geometries=e.geometries.map(V(t,r)),e;case"Feature":return e.geometry=t(e.geometry,r),e;case"Polygon":case"MultiPolygon":return function(t,e){return"Polygon"===t.type?t.coordinates=N(t.coordinates,e):"MultiPolygon"===t.type&&(t.coordinates=t.coordinates.map(V(N,e))),t}(e,r);default:return e}}(a,!0);try{e._geoJSONIndex=i.cluster?new dt(function(e){var r=e.superclusterOptions,i=e.clusterProperties;if(!i||!r)return r;for(var n={},o={},a={accumulated:null,zoom:0},s={properties:null},u=Object.keys(i),l=0,p=u;l<p.length;l+=1){var c=p[l],h=i[c],f=h[0],d=h[1],m=t.createExpression(d),y=t.createExpression("string"==typeof f?[f,["accumulated"],["get",c]]:f);n[c]=m.value,o[c]=y.value}return r.map=function(t){s.properties=t;for(var e={},r=0,i=u;r<i.length;r+=1){var o=i[r];e[o]=n[o].evaluate(a,s)}return e},r.reduce=function(t,e){s.properties=e;for(var r=0,i=u;r<i.length;r+=1){var n=i[r];a.accumulated=t[n],t[n]=o[n].evaluate(a,s)}},r}(i)).load(a.features):new Kt(a,i.geojsonVtOptions)}catch(o){return r(o)}e.loaded={};var s={};if(n){var u=n.finish();u&&(s.resourceTiming={},s.resourceTiming[i.source]=JSON.parse(JSON.stringify(u)))}r(null,s)})}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(t,r){var i=this.loaded,n=t.uid;return i&&i[n]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if("string"!=typeof e.data)return r(new Error("Input data is not a valid GeoJSON object."));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error("Input data is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))},r.prototype.getClusterChildren=function(t,e){e(null,this._geoJSONIndex.getChildren(t.clusterId))},r.prototype.getClusterLeaves=function(t,e){e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))},r}(L),$t=function(e){var r=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.workerSourceTypes={vector:L,geojson:Jt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isLoaded())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return $t.prototype.setReferrer=function(t,e){this.referrer=e},$t.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},$t.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},$t.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},$t.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},$t.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},$t.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},$t.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},$t.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},$t.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var i=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==i.removeSource?i.removeSource(e,r):r()}},$t.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},$t.prototype.loadRTLTextPlugin=function(e,r,i){try{t.plugin.isLoaded()||(this.self.importScripts(r),i(t.plugin.isLoaded()?null:new Error("RTL Text Plugin failed to import scripts from "+r)))}catch(t){i(t.toString())}},$t.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i),e},$t.prototype.getWorkerSource=function(t,e,r){var i=this;if(this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),!this.workerSources[t][e][r]){var n={send:function(e,r,n){i.actor.send(e,r,n,t)}};this.workerSources[t][e][r]=new this.workerSourceTypes[e](n,this.getLayerIndex(t))}return this.workerSources[t][e][r]},$t.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new D),this.demWorkerSources[t][e]},"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope&&(self.worker=new $t(self)),$t}),i(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!!("undefined"!=typeof window&&"undefined"!=typeof document&&Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray&&Function.prototype&&Function.prototype.bind&&Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions&&"JSON"in window&&"parse"in JSON&&"stringify"in JSON&&function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(r);try{e=new Worker(i),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(i),t}()&&"Uint8ClampedArray"in window&&ArrayBuffer.isView&&function(t){return void 0===r[t]&&(r[t]=function(t){var r=document.createElement("canvas"),i=Object.create(e.webGLContextAttributes);return i.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",i)||r.probablySupportsContext("experimental-webgl",i):r.supportsContext?r.supportsContext("webgl",i)||r.supportsContext("experimental-webgl",i):r.getContext("webgl",i)||r.getContext("experimental-webgl",i)}(t)),r[t]}(t&&t.failIfMajorPerformanceCaveat))}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e);var r={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r={create:function(e,r,i){var n=t.window.document.createElement(e);return r&&(n.className=r),i&&i.appendChild(n),n},createNS:function(e,r){return t.window.document.createElementNS(e,r)}},i=t.window.document?t.window.document.documentElement.style:null;function n(t){if(!i)return null;for(var e=0;e<t.length;e++)if(t[e]in i)return t[e];return t[0]}var o,a=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){i&&a&&(o=i[a],i[a]="none")},r.enableDrag=function(){i&&a&&(i[a]=o)};var s=n(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[s]=e};var u=!1;try{var l=Object.defineProperty({},"passive",{get:function(){u=!0}});t.window.addEventListener("test",l,l),t.window.removeEventListener("test",l,l)}catch(t){u=!1}r.addEventListener=function(t,e,r,i){void 0===i&&(i={}),"passive"in i&&u?t.addEventListener(e,r,i):t.addEventListener(e,r,i.capture)},r.removeEventListener=function(t,e,r,i){void 0===i&&(i={}),"passive"in i&&u?t.removeEventListener(e,r,i):t.removeEventListener(e,r,i.capture)};var p=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",p,!0)};r.suppressClick=function(){t.window.addEventListener("click",p,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",p,!0)},0)},r.mousePos=function(e,r){var i=e.getBoundingClientRect();return r=r.touches?r.touches[0]:r,new t.Point(r.clientX-i.left-e.clientLeft,r.clientY-i.top-e.clientTop)},r.touchPos=function(e,r){for(var i=e.getBoundingClientRect(),n=[],o="touchend"===r.type?r.changedTouches:r.touches,a=0;a<o.length;a++)n.push(new t.Point(o[a].clientX-i.left-e.clientLeft,o[a].clientY-i.top-e.clientTop));return n},r.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var c=function(){this.images={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0};c.prototype.isLoaded=function(){return this.loaded},c.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var i=r[e],n=i.ids,o=i.callback;this._notify(n,o)}this.requestors=[]}},c.prototype.getImage=function(t){return this.images[t]},c.prototype.addImage=function(t,e){this.images[t]=e},c.prototype.removeImage=function(t){delete this.images[t],delete this.patterns[t]},c.prototype.listImages=function(){return Object.keys(this.images)},c.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var i=0,n=t;i<n.length;i+=1){var o=n[i];this.images[o]||(r=!1)}this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},c.prototype._notify=function(t,e){for(var r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=this.images[o];a&&(r[o]={data:a.data.clone(),pixelRatio:a.pixelRatio,sdf:a.sdf})}e(null,r)},c.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},c.prototype.getPattern=function(e){var r=this.patterns[e];if(r)return r.position;var i=this.getImage(e);if(!i)return null;var n={w:i.data.width+2,h:i.data.height+2,x:0,y:0},o=new t.ImagePosition(n,i);return this.patterns[e]={bin:n,position:o},this._updatePatternAtlas(),o},c.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},c.prototype._updatePatternAtlas=function(){var e=[];for(var r in this.patterns)e.push(this.patterns[r].bin);var i=t.potpack(e),n=i.w,o=i.h,a=this.atlasImage;for(var s in a.resize({width:n||1,height:o||1}),this.patterns){var u=this.patterns[s].bin,l=u.x+1,p=u.y+1,c=this.images[s].data,h=c.width,f=c.height;t.RGBAImage.copy(c,a,{x:0,y:0},{x:l,y:p},{width:h,height:f}),t.RGBAImage.copy(c,a,{x:0,y:f-1},{x:l,y:p-1},{width:h,height:1}),t.RGBAImage.copy(c,a,{x:0,y:0},{x:l,y:p+f},{width:h,height:1}),t.RGBAImage.copy(c,a,{x:h-1,y:0},{x:l-1,y:p},{width:1,height:f}),t.RGBAImage.copy(c,a,{x:0,y:0},{x:l+h,y:p},{width:1,height:f})}this.dirty=!0};var h=d,f=1e20;function d(t,e,r,i,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function m(t,e,r,i,n,o,a){for(var s=0;s<e;s++){for(var u=0;u<r;u++)i[u]=t[u*e+s];for(y(i,n,o,a,r),u=0;u<r;u++)t[u*e+s]=n[u]}for(u=0;u<r;u++){for(s=0;s<e;s++)i[s]=t[u*e+s];for(y(i,n,o,a,e),s=0;s<e;s++)t[u*e+s]=Math.sqrt(n[s])}}function y(t,e,r,i,n){r[0]=0,i[0]=-f,i[1]=+f;for(var o=1,a=0;o<n;o++){for(var s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);s<=i[a];)a--,s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);r[++a]=o,i[a]=s,i[a+1]=+f}for(o=0,a=0;o<n;o++){for(;i[a+1]<o;)a++;e[o]=(o-r[a])*(o-r[a])+t[r[a]]}}d.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var n=e.data[4*i+3]/255;this.gridOuter[i]=1===n?0:0===n?f:Math.pow(Math.max(0,.5-n),2),this.gridInner[i]=1===n?f:0===n?0:Math.pow(Math.max(0,n-.5),2)}for(m(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),m(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++){var o=this.gridOuter[i]-this.gridInner[i];r[i]=Math.max(0,Math.min(255,Math.round(255-255*(o/this.radius+this.cutoff))))}return r};var _=function(t,e){this.requestTransform=t,this.localIdeographFontFamily=e,this.entries={}};_.prototype.setURL=function(t){this.url=t},_.prototype.getGlyphs=function(e,r){var i=this,n=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1){var u=s[a];n.push({stack:o,id:u})}t.asyncAll(n,function(t,e){var r=t.stack,n=t.id,o=i.entries[r];o||(o=i.entries[r]={glyphs:{},requests:{}});var a=o.glyphs[n];if(void 0===a)if(a=i._tinySDF(o,r,n))e(null,{stack:r,id:n,glyph:a});else{var s=Math.floor(n/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else{var u=o.requests[s];u||(u=o.requests[s]=[],_.loadGlyphRange(r,s,i.url,i.requestTransform,function(t,e){if(e)for(var r in e)o.glyphs[+r]=e[+r];for(var i=0,n=u;i<n.length;i+=1)(0,n[i])(t,e);delete o.requests[s]})),u.push(function(t,i){t?e(t):i&&e(null,{stack:r,id:n,glyph:i[n]||null})})}}else e(null,{stack:r,id:n,glyph:a})},function(t,e){if(t)r(t);else if(e){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.stack,u=a.id,l=a.glyph;(i[s]||(i[s]={}))[u]=l&&{id:l.id,bitmap:l.bitmap.clone(),metrics:l.metrics}}r(null,i)}})},_.prototype._tinySDF=function(e,r,i){var n=this.localIdeographFontFamily;if(n&&(t.isChar["CJK Unified Ideographs"](i)||t.isChar["Hangul Syllables"](i))){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(r)?a="900":/medium/i.test(r)?a="500":/light/i.test(r)&&(a="200"),o=e.tinySDF=new _.TinySDF(24,3,8,.25,n,a)}return{id:i,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},_.loadGlyphRange=function(e,r,i,n,o){var a=256*r,s=a+255,u=n(t.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(u,function(e,r){if(e)o(e);else if(r){for(var i={},n=0,a=t.parseGlyphPBF(r);n<a.length;n+=1){var s=a[n];i[s.id]=s}o(null,i)}})},_.TinySDF=h;var v=function(){this.specification=t.styleSpec.light.position};v.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},v.prototype.interpolate=function(e,r,i){return{x:t.number(e.x,r.x,i),y:t.number(e.y,r.y,i),z:t.number(e.z,r.z,i)}};var g=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new v,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),x=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(g),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e,r){if(void 0===r&&(r={}),!this._validate(t.validateLight,e,r))for(var i in e){var n=e[i];t.endsWith(i,"-transition")?this._transitionable.setTransition(i.slice(0,-"-transition".length),n):this._transitionable.setValue(i,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r,i){return(!i||!1!==i.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},r}(t.Evented),b=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.bytes=4,this.data=new Uint8Array(this.width*this.height*this.bytes),this.positions={}};b.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.positions[r]||(this.positions[r]=this.addDash(t,e)),this.positions[r]},b.prototype.addDash=function(e,r){var i=r?7:0,n=2*i+1;if(this.nextRow+n>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];for(var s=this.width/o,u=s/2,l=e.length%2==1,p=-i;p<=i;p++)for(var c=this.nextRow+i+p,h=this.width*c,f=l?-e[e.length-1]:0,d=e[0],m=1,y=0;y<this.width;y++){for(;d<y/s;)f=d,d+=e[m],l&&m===e.length-1&&(d+=e[0]),m++;var _=Math.abs(y-f*s),v=Math.abs(y-d*s),g=Math.min(_,v),x=m%2==1,b=void 0;if(r){var w=i?p/i*(u+1):0;if(x){var E=u-Math.abs(w);b=Math.sqrt(g*g+E*E)}else b=u-Math.sqrt(g*g+w*w)}else b=(x?1:-1)*g;this.data[3+4*(h+y)]=Math.max(0,Math.min(255,b+128))}var S={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:o};return this.nextRow+=n,this.dirty=!0,S},b.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.RGBA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,this.data))};var w=function e(r,i){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var n=this.workerPool.acquire(this.id),o=0;o<n.length;o++){var a=n[o],s=new e.Actor(a,i,this.id);s.name="Worker "+o,this.actors.push(s)}};function E(e,r,i){var n=function(r,n){if(r)return i(r);if(n){var o=t.pick(n,["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds"]);n.vector_layers&&(o.vectorLayers=n.vector_layers,o.vectorLayerIds=o.vectorLayers.map(function(t){return t.id})),e.url&&(o.tiles=t.canonicalizeTileset(o,e.url)),i(null,o)}};return e.url?t.getJSON(r(t.normalizeSourceURL(e.url),t.ResourceType.Source),n):t.browser.frame(function(){return n(null,e)})}w.prototype.broadcast=function(e,r,i){i=i||function(){},t.asyncAll(this.actors,function(t,i){t.send(e,r,i)},i)},w.prototype.send=function(t,e,r,i){return("number"!=typeof i||isNaN(i))&&(i=this.currentActor=(this.currentActor+1)%this.actors.length),this.actors[i].send(t,e,r),i},w.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},w.Actor=t.Actor;var S=function(e,r,i){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=i||24};S.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},S.prototype.contains=function(e){var r=Math.pow(2,e.z),i=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*r),n=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*r),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*r),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*r);return e.x>=i&&e.x<o&&e.y>=n&&e.y<a};var T=function(e){function r(r,i,n,o){if(e.call(this),this.id=r,this.dispatcher=n,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,t.extend(this,t.pick(i,["url","scheme","tileSize"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._transformRequest,function(r,i){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new S(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var i=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url),n={request:this.map._transformRequest(i,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};function o(t,i){return e.aborted?r(null):t&&404!==t.status?r(t):(i&&i.resourceTiming&&(e.resourceTiming=i.resourceTiming),this.map._refreshExpiredTiles&&i&&e.setExpiryData(i),e.loadVectorData(i,this.map.painter),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}n.request.collectResourceTiming=this._collectResourceTiming,void 0===e.workerID||"expired"===e.state?e.workerID=this.dispatcher.send("loadTile",n,o.bind(this)):"loading"===e.state?e.reloadCallback=r:this.dispatcher.send("reloadTile",n,o.bind(this),e.workerID)},r.prototype.abortTile=function(t){this.dispatcher.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0,t.workerID)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),A=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=E(this._options,this.map._transformRequest,function(r,i){e._tileJSONRequest=null,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new S(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId()),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var i=this,n=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(n,t.ResourceType.Tile),function(n,o){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(n)e.state="errored",r(n);else if(o){i.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=i.map.painter.context,s=a.gl;e.texture=i.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",r(null)}})},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),z=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({},i),this.encoding=i.encoding||"mapbox"}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var i=t.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.url,this.tileSize);e.request=t.getImage(this.map._transformRequest(i,t.ResourceType.Tile),function(i,n){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(i)e.state="errored",r(i);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=t.browser.getImageData(n),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.workerID&&"expired"!==e.state||(e.workerID=this.dispatcher.send("loadDEMTile",a,function(t,i){t&&(e.state="errored",r(t)),i&&(e.dem=i,e.needsHillshadePrepare=!0,e.state="loaded",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,o=0===r.x?e.wrap-1:e.wrap,a=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,u={};return u[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(u[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1<i&&(u[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},u[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y+1).key]={backfilled:!1}),u},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",this.dispatcher.send("removeDEMTile",{uid:t.uid,source:this.id},void 0,t.workerID)},r}(A),I=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this.dispatcher=n,this.setEventedParent(o),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution);var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*a,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(i.clusterRadius||50)*a,log:!1},clusterProperties:i.clusterProperties},i.workerOptions)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var i={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",i))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(e){if(e)r.fire(new t.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(i.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",i))}}),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.dispatcher.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterChildren=function(t,e){return this.dispatcher.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e,this.workerID),this},r.prototype.getClusterLeaves=function(t,e,r,i){return this.dispatcher.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},i,this.workerID),this},r.prototype._updateWorkerData=function(e){var r=this,i=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(i.request=this.map._transformRequest(t.browser.resolveURL(n),t.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(n),this.workerID=this.dispatcher.send(this.type+".loadData",i,function(t,n){r._removed||n&&n.abandoned||(r._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[r.id]&&(r._resourceTiming=n.resourceTiming[r.id].slice(0)),r.dispatcher.send(r.type+".coalesce",{source:i.source},null,r.workerID),e(t))},this.workerID)},r.prototype.loadTile=function(e,r){var i=this,n=void 0===e.workerID?"loadTile":"reloadTile",o={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes};e.workerID=this.dispatcher.send(n,o,function(t,o){return e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(o,i.map.painter,"reloadTile"===n),r(null))},this.workerID)},r.prototype.abortTile=function(t){t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.dispatcher.send("removeTile",{uid:t.uid,type:this.type,source:this.id},null,t.workerID)},r.prototype.onRemove=function(){this._removed=!0,this.dispatcher.send("removeSource",{type:this.type,source:this.id},null,this.workerID)},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),C=function(e){function r(t,r,i,n){e.call(this),this.id=t,this.dispatcher=i,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this.setEventedParent(n),this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(e,r){var i=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._transformRequest(this.url,t.ResourceType.Image),function(n,o){n?i.fire(new t.ErrorEvent(n)):o&&(i.image=o,e&&(i.coordinates=e),r&&r(),i._finishLoading())})},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,function(){e.texture=null}),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var i=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,i=1/0,n=-1/0,o=-1/0,a=0,s=e;a<s.length;a+=1){var u=s[a];r=Math.min(r,u.x),i=Math.min(i,u.y),n=Math.max(n,u.x),o=Math.max(o,u.y)}var l=n-r,p=o-i,c=Math.max(l,p),h=Math.max(0,Math.floor(-Math.log(c)/Math.LN2)),f=Math.pow(2,h);return new t.CanonicalTileID(h,Math.floor((r+n)/2*f),Math.floor((i+o)/2*f))}(i),this.minzoom=this.maxzoom=this.tileID.z;var n=i.map(function(t){return r.tileID.getTilePoint(t)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),k={vector:T,raster:A,"raster-dem":z,geojson:I,video:function(e){function r(t,r,i,n){e.call(this,t,r,i,n),this.roundZoom=!0,this.type="video",this.options=r}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){var e=this,r=this.options;this.urls=[];for(var i=0,n=r.urls;i<n.length;i+=1){var o=n[i];this.urls.push(this.map._transformRequest(o,t.ResourceType.Source).url)}t.getVideo(this.urls,function(r,i){r?e.fire(new t.ErrorEvent(r)):i&&(e.video=i,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map.triggerRepaint()}),e.map&&e.video.play(),e._finishLoading())})},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(C),image:C,canvas:function(e){function r(r,i,n,o){e.call(this,r,i,n,o),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return"number"!=typeof t})})||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.load=function(){this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing=!1},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,i=r.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,t.rasterBoundsAttributes.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,i.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[n];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(C)},P=function(e,r,i,n){var o=new k[r.type](e,r,i,n);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o};function M(e,r){var i=t.identity([]);return t.translate(i,i,[1,1,0]),t.scale(i,i,[.5*e.width,.5*e.height,1]),t.multiply(i,i,e.calculatePosMatrix(r.toUnwrapped()))}function L(t,e,r,i,n){var o=function(t,e,r){if(t)for(var i=0,n=t;i<n.length;i+=1){var o=e[n[i]];if(o&&o.source===r&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===r&&"fill-extrusion"===s.type)return!0}return!1}(i&&i.layers,e,t.id),a=n.maxPitchScaleFactor(),s=t.tilesIn(r,a,o);s.sort(D);for(var u=[],l=0,p=s;l<p.length;l+=1){var c=p[l];u.push({wrappedTileID:c.tileID.wrapped().key,queryResults:c.tile.queryRenderedFeatures(e,t._state,c.queryGeometry,c.cameraQueryGeometry,c.scale,i,n,a,M(t.transform,c.tileID))})}var h=function(t){for(var e={},r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.queryResults,s=o.wrappedTileID,u=r[s]=r[s]||{};for(var l in a)for(var p=a[l],c=u[l]=u[l]||{},h=e[l]=e[l]||[],f=0,d=p;f<d.length;f+=1){var m=d[f];c[m.featureIndex]||(c[m.featureIndex]=!0,h.push(m))}}return e}(u);for(var f in h)h[f].forEach(function(e){var r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i});return h}function D(t,e){var r=t.tileID,i=e.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}var R=function(t,e){this.max=t,this.onRemove=e,this.reset()};R.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var i=r[e];i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value)}return this.data={},this.order=[],this},R.prototype.add=function(t,e,r){var i=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o={value:e,timeout:void 0};if(void 0!==r&&(o.timeout=setTimeout(function(){i.remove(t,o)},r)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},R.prototype.has=function(t){return t.wrapped().key in this.data},R.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},R.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},R.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},R.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,i=void 0===e?0:this.data[r].indexOf(e),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this},R.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this};var B=function(t,e,r){this.context=t;var i=t.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};B.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},B.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},B.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var F={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},O=function(t,e,r,i){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=i,this.context=t;var n=t.gl;this.buffer=n.createBuffer(),t.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};O.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},O.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},O.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var i=this.attributes[r],n=e.attributes[i.name];void 0!==n&&t.enableVertexAttribArray(n)}},O.prototype.setVertexAttribPointers=function(t,e,r){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],o=e.attributes[n.name];void 0!==o&&t.vertexAttribPointer(o,n.components,t[F[n.type]],!1,this.itemSize,n.offset+this.itemSize*(r||0))}},O.prototype.destroy=function(){var t=this.context.gl;this.buffer&&(t.deleteBuffer(this.buffer),delete this.buffer)};var U=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};U.prototype.get=function(){return this.current},U.prototype.set=function(t){},U.prototype.getDefault=function(){return this.default},U.prototype.setDefault=function(){this.set(this.default)};var V=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(U),N=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(U),j=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(U),q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(U),Z=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(U),G=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(U),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(U),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(U),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(U),H=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(U),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(U),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(U),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(U),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(U),tt=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(U),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(U),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(U),it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(U),nt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(U),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(U),at=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(U),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(U),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(U),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(U),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(U),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(U),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(U),ft=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(U),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(U),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(U),yt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(U),_t=function(t){function e(e,r){t.call(this,e),this.context=e,this.parent=r}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getDefault=function(){return null},e}(U),vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(_t),gt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(_t),xt=function(t,e,r){this.context=t,this.width=e,this.height=r;var i=t.gl,n=this.framebuffer=i.createFramebuffer();this.colorAttachment=new vt(t,n),this.depthAttachment=new gt(t,n)};xt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();e&&t.deleteTexture(e);var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r),t.deleteFramebuffer(this.framebuffer)};var bt=function(t,e,r){this.func=t,this.mask=e,this.range=r};bt.ReadOnly=!1,bt.ReadWrite=!0,bt.disabled=new bt(519,bt.ReadOnly,[0,1]);var wt=function(t,e,r,i,n,o){this.test=t,this.ref=e,this.mask=r,this.fail=i,this.depthFail=n,this.pass=o};wt.disabled=new wt({func:519,mask:0},0,0,7680,7680,7680);var Et=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};Et.disabled=new Et(Et.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),Et.unblended=new Et(Et.Replace,t.Color.transparent,[!0,!0,!0,!0]),Et.alphaBlended=new Et([1,771],t.Color.transparent,[!0,!0,!0,!0]);var St=function(t,e,r){this.enable=t,this.mode=e,this.frontFace=r};St.disabled=new St(!1,1029,2305),St.backCCW=new St(!0,1029,2305);var Tt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new V(this),this.clearDepth=new N(this),this.clearStencil=new j(this),this.colorMask=new q(this),this.depthMask=new Z(this),this.stencilMask=new G(this),this.stencilFunc=new X(this),this.stencilOp=new W(this),this.stencilTest=new K(this),this.depthRange=new H(this),this.depthTest=new Y(this),this.depthFunc=new J(this),this.blend=new $(this),this.blendFunc=new Q(this),this.blendColor=new tt(this),this.blendEquation=new et(this),this.cullFace=new rt(this),this.cullFaceSide=new it(this),this.frontFace=new nt(this),this.program=new ot(this),this.activeTexture=new at(this),this.viewport=new st(this),this.bindFramebuffer=new ut(this),this.bindRenderbuffer=new lt(this),this.bindTexture=new pt(this),this.bindVertexBuffer=new ct(this),this.bindElementBuffer=new ht(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ft(this),this.pixelStoreUnpack=new dt(this),this.pixelStoreUnpackPremultiplyAlpha=new mt(this),this.pixelStoreUnpackFlipY=new yt(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&t.getExtension("OES_texture_half_float_linear")};Tt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Tt.prototype.createIndexBuffer=function(t,e){return new B(this,t,e)},Tt.prototype.createVertexBuffer=function(t,e,r){return new O(this,t,e,r)},Tt.prototype.createRenderbuffer=function(t,e,r){var i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),n},Tt.prototype.createFramebuffer=function(t,e){return new xt(this,t,e)},Tt.prototype.clear=function(t){var e=t.color,r=t.depth,i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),i.clear(n)},Tt.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},Tt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Tt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Tt.prototype.setColorMode=function(e){t.isEqual(e.blendFunction,Et.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},Tt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var At=function(e){function r(r,i,n){var o=this;e.call(this),this.id=r,this.dispatcher=n,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))}),this.on("error",function(){o._sourceErrored=!0}),this._source=P(r,i,n,this),this._tiles={},this._cache=new R(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles)this._tiles[e].upload(t)},r.prototype.getIds=function(){return Object.keys(this._tiles).map(Number).sort(zt)},r.prototype.getRenderableIds=function(e){var r=this,i=[];for(var n in this._tiles)this._isIdRenderable(+n,e)&&i.push(+n);return e?i.sort(function(e,i){var n=r._tiles[e].tileID,o=r._tiles[i].tileID,a=new t.Point(n.canonical.x,n.canonical.y)._rotate(r.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(r.transform.angle);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}):i.sort(zt)},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,i,n){if(n)return e.state="errored",void(404!==n.status?this._source.fire(new t.ErrorEvent(n,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var i=e[r];if(t.neighboringTiles&&t.neighboringTiles[i]){var n=this.getTileByID(i);o(t,n),o(n,t)}}function o(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,i=e.tileID.canonical.y-t.tileID.canonical.y,n=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===r&&0===i||Math.abs(i)>1||(Math.abs(r)>1&&(1===Math.abs(r+n)?r+=n:1===Math.abs(r-n)&&(r-=n)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,i),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype.getZoom=function(t){return t.zoom+t.scaleZoom(t.tileSize/this._source.tileSize)},r.prototype._retainLoadedChildren=function(t,e,r,i){for(var n in this._tiles){var o=this._tiles[n];if(!(i[n]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var u=a;u.overscaledZ>e;)if(t[(u=u.scaledTo(u.overscaledZ-1)).key]){i[a.key]=a;break}}}},r.prototype.findLoadedParent=function(t,e){for(var r=t.overscaledZ-1;r>=e;r--){var i=t.scaledTo(r);if(!i)return;var n=String(i.key),o=this._tiles[n];if(o&&o.hasData())return o;if(this._cache.has(i))return this._cache.get(i)}},r.prototype.updateCacheSize=function(t){var e=(Math.ceil(t.width/this._source.tileSize)+1)*(Math.ceil(t.height/this._source.tileSize)+1),r=Math.floor(5*e),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(t){var e=(t-(void 0===this._prevLng?t:this._prevLng))/360,r=Math.round(e);if(this._prevLng=t,r){var i={};for(var n in this._tiles){var o=this._tiles[n];o.tileID=o.tileID.unwrapTo(o.tileID.wrap+r),i[o.tileID.key]=o}for(var a in this._tiles=i,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var s in this._tiles){var u=this._tiles[s];this._setTileReloadTimer(s,u)}}},r.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var n;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(n=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(n=n.filter(function(t){return i._source.hasTile(t)}))):n=[];var o=(this._source.roundZoom?Math.round:Math.floor)(this.getZoom(e)),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),u=this._updateRetainedTiles(n,o);if(It(this._source.type)){for(var l={},p={},c=0,h=Object.keys(u);c<h.length;c+=1){var f=h[c],d=u[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var y=this.findLoadedParent(d,a);y&&(this._addTile(y.tileID),l[y.tileID.key]=y.tileID),p[f]=d}}for(var _ in this._retainLoadedChildren(p,o,s,u),l)u[_]||(this._coveredTiles[_]=!0,u[_]=l[_])}for(var v in u)this._tiles[v].clearFadeHold();for(var g=0,x=t.keysDifference(this._tiles,u);g<x.length;g+=1){var b=x[g],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}}},r.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},r.prototype._updateRetainedTiles=function(t,e){for(var i={},n={},o=Math.max(e-r.maxOverzooming,this._source.minzoom),a=Math.max(e+r.maxUnderzooming,this._source.minzoom),s={},u=0,l=t;u<l.length;u+=1){var p=l[u],c=this._addTile(p);i[p.key]=p,c.hasData()||e<this._source.maxzoom&&(s[p.key]=p)}this._retainLoadedChildren(s,e,a,i);for(var h=0,f=t;h<f.length;h+=1){var d=f[h],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var y=d.children(this._source.maxzoom)[0],_=this.getTile(y);if(_&&_.hasData()){i[y.key]=y;continue}}else{var v=d.children(this._source.maxzoom);if(i[v[0].key]&&i[v[1].key]&&i[v[2].key]&&i[v[3].key])continue}for(var g=m.wasRequested(),x=d.overscaledZ-1;x>=o;--x){var b=d.scaledTo(x);if(n[b.key])break;if(n[b.key]=!0,!(m=this.getTile(b))&&g&&(m=this._addTile(b)),m&&(i[b.key]=b,g=m.wasRequested(),m.hasData()))break}}}return i},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var i=Boolean(r);return i||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,i||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},i))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,i){var n=this,o=[],a=this.transform;if(!a)return o;for(var s=i?a.getCameraQueryGeometry(e):e,u=e.map(function(t){return a.pointCoordinate(t)}),l=s.map(function(t){return a.pointCoordinate(t)}),p=this.getIds(),c=1/0,h=1/0,f=-1/0,d=-1/0,m=0,y=l;m<y.length;m+=1){var _=y[m];c=Math.min(c,_.x),h=Math.min(h,_.y),f=Math.max(f,_.x),d=Math.max(d,_.y)}for(var v=function(e){var i=n._tiles[p[e]];if(!i.holdingForFade()){var s=i.tileID,m=Math.pow(2,a.zoom-i.tileID.overscaledZ),y=r*i.queryPadding*t.EXTENT/i.tileSize/m,_=[s.getTilePoint(new t.MercatorCoordinate(c,h)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(_[0].x-y<t.EXTENT&&_[0].y-y<t.EXTENT&&_[1].x+y>=0&&_[1].y+y>=0){var v=u.map(function(t){return s.getTilePoint(t)}),g=l.map(function(t){return s.getTilePoint(t)});o.push({tile:i,tileID:s,queryGeometry:v,cameraQueryGeometry:g,scale:m})}}},g=0;g<p.length;g++)v(g);return o},r.prototype.getVisibleCoordinates=function(t){for(var e=this,r=this.getRenderableIds(t).map(function(t){return e._tiles[t].tileID}),i=0,n=r;i<n.length;i+=1){var o=n[i];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(It(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.updateState(t,e,r)},r.prototype.removeFeatureState=function(t,e,r){t=t||"_geojsonTileLayer",this._state.removeFeatureState(t,e,r)},r.prototype.getFeatureState=function(t,e){return t=t||"_geojsonTileLayer",this._state.getState(t,e)},r}(t.Evented);function zt(t,e){return t%32-e%32||e-t}function It(t){return"raster"===t||"image"===t||"video"===t}function Ct(){return new t.window.Worker(Hi.workerUrl)}At.maxOverzooming=10,At.maxUnderzooming=3;var kt=function(){this.active={}};kt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<kt.workerCount;)this.workers.push(new Ct);return this.active[t]=!0,this.workers.slice()},kt.prototype.release=function(t){delete this.active[t],0===Object.keys(this.active).length&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)};var Pt,Mt=Math.floor(t.browser.hardwareConcurrency/2);function Lt(e,r){var i={};for(var n in e)"ref"!==n&&(i[n]=e[n]);return t.refProperties.forEach(function(t){t in r&&(i[t]=r[t])}),i}function Dt(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=Lt(t[i],e[t[i].ref]));return t}kt.workerCount=Math.max(Math.min(Mt,6),1);var Rt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Bt(t,e,r){r.push({command:Rt.addSource,args:[t,e[t]]})}function Ft(t,e,r){e.push({command:Rt.removeSource,args:[t]}),r[t]=!0}function Ot(t,e,r,i){Ft(t,r,i),Bt(t,e,r)}function Ut(e,r,i){var n;for(n in e[i])if(e[i].hasOwnProperty(n)&&"data"!==n&&!t.isEqual(e[i][n],r[i][n]))return!1;for(n in r[i])if(r[i].hasOwnProperty(n)&&"data"!==n&&!t.isEqual(e[i][n],r[i][n]))return!1;return!0}function Vt(e,r,i,n,o,a){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.isEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.isEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}))}function Nt(t){return t.id}function jt(t,e){return t[e.id]=e,t}var qt=function(t,e,r){var i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o<this.xCellCount*this.yCellCount;o++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};qt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},qt.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},qt.prototype.insertCircle=function(t,e,r,i){this._forEachCell(e-i,r-i,e+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(i)},qt.prototype._insertBoxCell=function(t,e,r,i,n,o){this.boxCells[n].push(o)},qt.prototype._insertCircleCell=function(t,e,r,i,n,o){this.circleCells[n].push(o)},qt.prototype._query=function(t,e,r,i,n,o){if(r<0||t>this.width||i<0||e>this.height)return!n&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=i){if(n)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var u=0;u<this.circleKeys.length;u++){var l=this.circles[3*u],p=this.circles[3*u+1],c=this.circles[3*u+2];a.push({key:this.circleKeys[u],x1:l-c,y1:p-c,x2:l+c,y2:p+c})}return o?a.filter(o):a}var h={hitTest:n,seenUids:{box:{},circle:{}}};return this._forEachCell(t,e,r,i,this._queryCell,a,h,o),n?a.length>0:a},qt.prototype._queryCircle=function(t,e,r,i,n){var o=t-r,a=t+r,s=e-r,u=e+r;if(a<0||o>this.width||u<0||s>this.height)return!i&&[];var l=[],p={hitTest:i,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}};return this._forEachCell(o,s,a,u,this._queryCellCircle,l,p,n),i?l.length>0:l},qt.prototype.query=function(t,e,r,i,n){return this._query(t,e,r,i,!1,n)},qt.prototype.hitTest=function(t,e,r,i,n){return this._query(t,e,r,i,!0,n)},qt.prototype.hitTestCircle=function(t,e,r,i){return this._queryCircle(t,e,r,!0,i)},qt.prototype._queryCell=function(t,e,r,i,n,o,a,s){var u=a.seenUids,l=this.boxCells[n];if(null!==l)for(var p=this.bboxes,c=0,h=l;c<h.length;c+=1){var f=h[c];if(!u.box[f]){u.box[f]=!0;var d=4*f;if(t<=p[d+2]&&e<=p[d+3]&&r>=p[d+0]&&i>=p[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:p[d],y1:p[d+1],x2:p[d+2],y2:p[d+3]})}}}var m=this.circleCells[n];if(null!==m)for(var y=this.circles,_=0,v=m;_<v.length;_+=1){var g=v[_];if(!u.circle[g]){u.circle[g]=!0;var x=3*g;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,r,i)&&(!s||s(this.circleKeys[g]))){if(a.hitTest)return o.push(!0),!0;var b=y[x],w=y[x+1],E=y[x+2];o.push({key:this.circleKeys[g],x1:b-E,y1:w-E,x2:b+E,y2:w+E})}}}},qt.prototype._queryCellCircle=function(t,e,r,i,n,o,a,s){var u=a.circle,l=a.seenUids,p=this.boxCells[n];if(null!==p)for(var c=this.bboxes,h=0,f=p;h<f.length;h+=1){var d=f[h];if(!l.box[d]){l.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(u.x,u.y,u.radius,c[m+0],c[m+1],c[m+2],c[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var y=this.circleCells[n];if(null!==y)for(var _=this.circles,v=0,g=y;v<g.length;v+=1){var x=g[v];if(!l.circle[x]){l.circle[x]=!0;var b=3*x;if(this._circlesCollide(_[b],_[b+1],_[b+2],u.x,u.y,u.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},qt.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var u=this._convertToXCellCoord(t),l=this._convertToYCellCoord(e),p=this._convertToXCellCoord(r),c=this._convertToYCellCoord(i),h=u;h<=p;h++)for(var f=l;f<=c;f++){var d=this.xCellCount*f+h;if(n.call(this,t,e,r,i,d,o,a,s))return}},qt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},qt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},qt.prototype._circlesCollide=function(t,e,r,i,n,o){var a=i-t,s=n-e,u=r+o;return u*u>a*a+s*s},qt.prototype._circleAndRectCollide=function(t,e,r,i,n,o,a){var s=(o-i)/2,u=Math.abs(t-(i+s));if(u>s+r)return!1;var l=(a-n)/2,p=Math.abs(e-(n+l));if(p>l+r)return!1;if(u<=s||p<=l)return!0;var c=u-s,h=p-l;return c*c+h*h<=r*r};var Zt=t.properties.layout;function Gt(e,r,i,n,o){var a=t.identity(new Float32Array(16));return r?(t.identity(a),t.scale(a,a,[1/o,1/o,1]),i||t.rotateZ(a,a,n.angle)):(t.scale(a,a,[n.width/2,-n.height/2,1]),t.translate(a,a,[1,-1,0]),t.multiply(a,a,e)),a}function Xt(e,r,i,n,o){var a=t.identity(new Float32Array(16));return r?(t.multiply(a,a,e),t.scale(a,a,[o,o,1]),i||t.rotateZ(a,a,-n.angle)):(t.scale(a,a,[1,-1,1]),t.translate(a,a,[-1,-1,0]),t.scale(a,a,[2/n.width,2/n.height,1])),a}function Wt(e,r){var i=[e.x,e.y,0,1];ie(i,i,r);var n=i[3];return{point:new t.Point(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function Kt(t,e){var r=t[0]/t[3],i=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&i>=-e[1]&&i<=e[1]}function Ht(e,r,i,n,o,a,s,u){var l=n?e.textSizeData:e.iconSizeData,p=t.evaluateSizeForZoom(l,i.transform.zoom,Zt.properties[n?"text-size":"icon-size"]),c=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=i.transform.width/i.transform.height,y=!1,_=0;_<d.length;_++){var v=d.get(_);if(v.hidden||v.writingMode===t.WritingMode.vertical&&!y)re(v.numGlyphs,h);else{y=!1;var g=[v.anchorX,v.anchorY,0,1];if(t.transformMat4(g,g,r),Kt(g,c)){var x=.5+g[3]/i.transform.cameraToCenterDistance*.5,b=t.evaluateSizeForFeature(l,p,v),w=s?b*x:b/x,E=new t.Point(v.anchorX,v.anchorY),S=Wt(E,o).point,T={},A=$t(v,w,!1,u,r,o,a,e.glyphOffsetArray,f,h,S,E,T,m);y=A.useVertical,(A.notEnoughRoom||y||A.needsFlipping&&$t(v,w,!0,u,r,o,a,e.glyphOffsetArray,f,h,S,E,T,m).notEnoughRoom)&&re(v.numGlyphs,h)}else re(v.numGlyphs,h)}}n?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function Yt(t,e,r,i,n,o,a,s,u,l,p,c){var h=s.glyphStartIndex+s.numGlyphs,f=s.lineStartIndex,d=s.lineStartIndex+s.lineLength,m=e.getoffsetX(s.glyphStartIndex),y=e.getoffsetX(h-1),_=te(t*m,r,i,n,o,a,s.segment,f,d,u,l,p,c);if(!_)return null;var v=te(t*y,r,i,n,o,a,s.segment,f,d,u,l,p,c);return v?{first:_,last:v}:null}function Jt(e,r,i,n){return e===t.WritingMode.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<i.y:r.x>i.x)?{needsFlipping:!0}:null}function $t(e,r,i,n,o,a,s,u,l,p,c,h,f,d){var m,y=r/24,_=e.lineOffsetX*r,v=e.lineOffsetY*r;if(e.numGlyphs>1){var g=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=Yt(y,u,_,v,i,c,h,e,l,a,f,!1);if(!w)return{notEnoughRoom:!0};var E=Wt(w.first.point,s).point,S=Wt(w.last.point,s).point;if(n&&!i){var T=Jt(e.writingMode,E,S,d);if(T)return T}m=[w.first];for(var A=e.glyphStartIndex+1;A<g-1;A++)m.push(te(y*u.getoffsetX(A),_,v,i,c,h,e.segment,x,b,l,a,f,!1));m.push(w.last)}else{if(n&&!i){var z=Wt(h,o).point,I=e.lineStartIndex+e.segment+1,C=new t.Point(l.getx(I),l.gety(I)),k=Wt(C,o),P=k.signedDistanceFromCamera>0?k.point:Qt(h,C,z,1,o),M=Jt(e.writingMode,z,P,d);if(M)return M}var L=te(y*u.getoffsetX(e.glyphStartIndex),_,v,i,c,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,l,a,f,!1);if(!L)return{notEnoughRoom:!0};m=[L]}for(var D=0,R=m;D<R.length;D+=1){var B=R[D];t.addDynamicAttributes(p,B.point,B.angle)}return{}}function Qt(t,e,r,i,n){var o=Wt(t.add(t.sub(e)._unit()),n).point,a=r.sub(o);return r.add(a._mult(i/a.mag()))}function te(e,r,i,n,o,a,s,u,l,p,c,h,f){var d=n?e-r:e+r,m=d>0?1:-1,y=0;n&&(m*=-1,y=Math.PI),m<0&&(y+=Math.PI);for(var _=m>0?u+s:u+s+1,v=_,g=o,x=o,b=0,w=0,E=Math.abs(d);b+w<=E;){if((_+=m)<u||_>=l)return null;if(x=g,void 0===(g=h[_])){var S=new t.Point(p.getx(_),p.gety(_)),T=Wt(S,c);if(T.signedDistanceFromCamera>0)g=h[_]=T.point;else{var A=_-m;g=Qt(0===b?a:new t.Point(p.getx(A),p.gety(A)),S,x,E-b+1,c)}}b+=w,w=x.dist(g)}var z=(E-b)/w,I=g.sub(x),C=I.mult(z)._add(x);return C._add(I._unit()._perp()._mult(i*m)),{point:C,angle:y+Math.atan2(g.y-x.y,g.x-x.x),tileDistance:f?{prevTileDistance:_-m===v?0:p.gettileUnitDistanceFromAnchor(_-m),lastSegmentViewportDistance:E-b}:null}}var ee=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function re(t,e){for(var r=0;r<t;r++){var i=e.length;e.resize(i+4),e.float32.set(ee,3*i)}}function ie(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[4]*n+r[12],t[1]=r[1]*i+r[5]*n+r[13],t[3]=r[3]*i+r[7]*n+r[15],t}var ne=function(t,e,r){void 0===e&&(e=new qt(t.width+200,t.height+200,25)),void 0===r&&(r=new qt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function oe(t,e,r){t[e+4]=r?1:0}function ae(e,r,i){return r*(t.EXTENT/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}ne.prototype.placeCollisionBox=function(t,e,r,i,n){var o=this.projectAndGetPerspectiveRatio(i,t.anchorPointX,t.anchorPointY),a=r*o.perspectiveRatio,s=t.x1*a+o.point.x,u=t.y1*a+o.point.y,l=t.x2*a+o.point.x,p=t.y2*a+o.point.y;return!this.isInsideGrid(s,u,l,p)||!e&&this.grid.hitTest(s,u,l,p,n)?{box:[],offscreen:!1}:{box:[s,u,l,p],offscreen:this.isOffscreen(s,u,l,p)}},ne.prototype.approximateTileDistance=function(t,e,r,i,n){var o=n?1:i/this.pitchfactor,a=t.lastSegmentViewportDistance*r;return t.prevTileDistance+a+(o-1)*a*Math.abs(Math.sin(e))},ne.prototype.placeCollisionCircles=function(e,r,i,n,o,a,s,u,l,p,c,h,f){var d=[],m=this.projectAnchor(l,o.anchorX,o.anchorY),y=u/24,_=o.lineOffsetX*u,v=o.lineOffsetY*u,g=new t.Point(o.anchorX,o.anchorY),x=Yt(y,s,_,v,!1,Wt(g,p).point,g,o,a,p,{},!0),b=!1,w=!1,E=!0,S=m.perspectiveRatio*n,T=1/(n*i),A=0,z=0;x&&(A=this.approximateTileDistance(x.first.tileDistance,x.first.angle,T,m.cameraDistance,h),z=this.approximateTileDistance(x.last.tileDistance,x.last.angle,T,m.cameraDistance,h));for(var I=0;I<e.length;I+=5){var C=e[I],k=e[I+1],P=e[I+2],M=e[I+3];if(!x||M<-A||M>z)oe(e,I,!1);else{var L=this.projectPoint(l,C,k),D=P*S;if(d.length>0){var R=L.x-d[d.length-4],B=L.y-d[d.length-3];if(D*D*2>R*R+B*B&&I+8<e.length){var F=e[I+8];if(F>-A&&F<z){oe(e,I,!1);continue}}}var O=I/5;d.push(L.x,L.y,D,O),oe(e,I,!0);var U=L.x-D,V=L.y-D,N=L.x+D,j=L.y+D;if(E=E&&this.isOffscreen(U,V,N,j),w=w||this.isInsideGrid(U,V,N,j),!r&&this.grid.hitTestCircle(L.x,L.y,D,f)){if(!c)return{circles:[],offscreen:!1};b=!0}}}return{circles:b||!w?[]:d,offscreen:E}},ne.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],i=1/0,n=1/0,o=-1/0,a=-1/0,s=0,u=e;s<u.length;s+=1){var l=u[s],p=new t.Point(l.x+100,l.y+100);i=Math.min(i,p.x),n=Math.min(n,p.y),o=Math.max(o,p.x),a=Math.max(a,p.y),r.push(p)}for(var c={},h={},f=0,d=this.grid.query(i,n,o,a).concat(this.ignoredGrid.query(i,n,o,a));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===c[y.bucketInstanceId]&&(c[y.bucketInstanceId]={}),!c[y.bucketInstanceId][y.featureIndex]){var _=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(r,_)&&(c[y.bucketInstanceId][y.featureIndex]=!0,void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]=[]),h[y.bucketInstanceId].push(y.featureIndex))}}return h},ne.prototype.insertCollisionBox=function(t,e,r,i,n){var o={bucketInstanceId:r,featureIndex:i,collisionGroupID:n};(e?this.ignoredGrid:this.grid).insert(o,t[0],t[1],t[2],t[3])},ne.prototype.insertCollisionCircles=function(t,e,r,i,n){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:i,collisionGroupID:n},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},ne.prototype.projectAnchor=function(t,e,r){var i=[e,r,0,1];return ie(i,i,t),{perspectiveRatio:.5+this.transform.cameraToCenterDistance/i[3]*.5,cameraDistance:i[3]}},ne.prototype.projectPoint=function(e,r,i){var n=[r,i,0,1];return ie(n,n,e),new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100)},ne.prototype.projectAndGetPerspectiveRatio=function(e,r,i){var n=[r,i,0,1];return ie(n,n,e),{point:new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}},ne.prototype.isOffscreen=function(t,e,r,i){return r<100||t>=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},ne.prototype.isInsideGrid=function(t,e,r,i){return r>=0&&t<this.gridRightBoundary&&i>=0&&e<this.gridBottomBoundary};var se=function(t,e,r,i){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):i&&r?1:0,this.placed=r};se.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var ue=function(t,e,r,i,n){this.text=new se(t?t.text:null,e,r,n),this.icon=new se(t?t.icon:null,e,i,n)};ue.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var le=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},pe=function(t,e,r,i,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n},ce=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};ce.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var he=function(t,e,r){this.transform=t.clone(),this.collisionIndex=new ne(this.transform),this.placements={},this.opacities={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new ce(r)};function fe(t,e,r){t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0),t.emplaceBack(e?1:0,r?1:0)}he.prototype.placeLayerTile=function(e,r,i,n){var o=r.getBucket(e),a=r.latestFeatureIndex;if(o&&a&&e.id===o.layerIds[0]){var s=r.collisionBoxArray,u=o.layers[0].layout,l=Math.pow(2,this.transform.zoom-r.tileID.overscaledZ),p=r.tileSize/t.EXTENT,c=this.transform.calculatePosMatrix(r.tileID.toUnwrapped()),h=Gt(c,"map"===u.get("text-pitch-alignment"),"map"===u.get("text-rotation-alignment"),this.transform,ae(r,1,this.transform.zoom)),f=Gt(c,"map"===u.get("icon-pitch-alignment"),"map"===u.get("icon-rotation-alignment"),this.transform,ae(r,1,this.transform.zoom));this.retainedQueryData[o.bucketInstanceId]=new pe(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,r.tileID),this.placeLayerBucket(o,c,h,f,l,p,i,r.holdingForFade(),n,s)}},he.prototype.placeLayerBucket=function(e,r,i,n,o,a,s,u,l,p){var c=e.layers[0].layout,h=t.evaluateSizeForZoom(e.textSizeData,this.transform.zoom,t.properties.layout.properties["text-size"]),f=c.get("text-optional"),d=c.get("icon-optional"),m=c.get("text-allow-overlap"),y=c.get("icon-allow-overlap"),_=m&&(y||!e.hasIconData()||d),v=y&&(m||!e.hasTextData()||f),g=this.collisionGroups.get(e.sourceID);!e.collisionArrays&&p&&e.deserializeCollisionBoxes(p);for(var x=0;x<e.symbolInstances.length;x++){var b=e.symbolInstances.get(x);if(!l[b.crossTileID]){if(u){this.placements[b.crossTileID]=new le(!1,!1,!1);continue}var w=!1,E=!1,S=!0,T=null,A=null,z=null,I=0,C=0,k=e.collisionArrays[x];k.textFeatureIndex&&(I=k.textFeatureIndex),k.textBox&&(w=(T=this.collisionIndex.placeCollisionBox(k.textBox,c.get("text-allow-overlap"),a,r,g.predicate)).box.length>0,S=S&&T.offscreen);var P=k.textCircles;if(P){var M=e.text.placedSymbolArray.get(b.horizontalPlacedTextSymbolIndex),L=t.evaluateSizeForFeature(e.textSizeData,h,M);A=this.collisionIndex.placeCollisionCircles(P,c.get("text-allow-overlap"),o,a,M,e.lineVertexArray,e.glyphOffsetArray,L,r,i,s,"map"===c.get("text-pitch-alignment"),g.predicate),w=c.get("text-allow-overlap")||A.circles.length>0,S=S&&A.offscreen}k.iconFeatureIndex&&(C=k.iconFeatureIndex),k.iconBox&&(E=(z=this.collisionIndex.placeCollisionBox(k.iconBox,c.get("icon-allow-overlap"),a,r,g.predicate)).box.length>0,S=S&&z.offscreen);var D=f||0===b.numGlyphVertices&&0===b.numVerticalGlyphVertices,R=d||0===b.numIconVertices;D||R?R?D||(E=E&&w):w=E&&w:E=w=E&&w,w&&T&&this.collisionIndex.insertCollisionBox(T.box,c.get("text-ignore-placement"),e.bucketInstanceId,I,g.ID),E&&z&&this.collisionIndex.insertCollisionBox(z.box,c.get("icon-ignore-placement"),e.bucketInstanceId,C,g.ID),w&&A&&this.collisionIndex.insertCollisionCircles(A.circles,c.get("text-ignore-placement"),e.bucketInstanceId,I,g.ID),this.placements[b.crossTileID]=new le(w||_,E||v,S||e.justReloaded),l[b.crossTileID]=!0}}e.justReloaded=!1},he.prototype.commit=function(t,e){this.commitTime=e;var r=!1,i=t&&0!==this.fadeDuration?(this.commitTime-t.commitTime)/this.fadeDuration:1,n=t?t.opacities:{};for(var o in this.placements){var a=this.placements[o],s=n[o];s?(this.opacities[o]=new ue(s,i,a.text,a.icon),r=r||a.text!==s.text.placed||a.icon!==s.icon.placed):(this.opacities[o]=new ue(null,i,a.text,a.icon,a.skipFade),r=r||a.text||a.icon)}for(var u in n){var l=n[u];if(!this.opacities[u]){var p=new ue(l,i,!1,!1);p.isHidden()||(this.opacities[u]=p,r=r||l.text.placed||l.icon.placed)}}r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)},he.prototype.updateLayerOpacities=function(t,e){for(var r={},i=0,n=e;i<n.length;i+=1){var o=n[i],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,r,o.collisionBoxArray)}},he.prototype.updateBucketOpacities=function(t,e,r){t.hasTextData()&&t.text.opacityVertexArray.clear(),t.hasIconData()&&t.icon.opacityVertexArray.clear(),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexArray.clear(),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexArray.clear();var i=t.layers[0].layout,n=new ue(null,0,!1,!1,!0),o=i.get("text-allow-overlap"),a=i.get("icon-allow-overlap"),s=new ue(null,0,o&&(a||!t.hasIconData()||i.get("icon-optional")),a&&(o||!t.hasTextData()||i.get("text-optional")),!0);!t.collisionArrays&&r&&(t.hasCollisionBoxData()||t.hasCollisionCircleData())&&t.deserializeCollisionBoxes(r);for(var u=0;u<t.symbolInstances.length;u++){var l=t.symbolInstances.get(u),p=e[l.crossTileID],c=this.opacities[l.crossTileID];p?c=n:c||(c=s,this.opacities[l.crossTileID]=c),e[l.crossTileID]=!0;var h=l.numGlyphVertices>0||l.numVerticalGlyphVertices>0,f=l.numIconVertices>0;if(h){for(var d=be(c.text),m=(l.numGlyphVertices+l.numVerticalGlyphVertices)/4,y=0;y<m;y++)t.text.opacityVertexArray.emplaceBack(d);t.text.placedSymbolArray.get(l.horizontalPlacedTextSymbolIndex).hidden=c.text.isHidden(),l.verticalPlacedTextSymbolIndex>=0&&(t.text.placedSymbolArray.get(l.verticalPlacedTextSymbolIndex).hidden=c.text.isHidden())}if(f){for(var _=be(c.icon),v=0;v<l.numIconVertices/4;v++)t.icon.opacityVertexArray.emplaceBack(_);t.icon.placedSymbolArray.get(u).hidden=c.icon.isHidden()}if(t.hasCollisionBoxData()||t.hasCollisionCircleData()){var g=t.collisionArrays[u];if(g){g.textBox&&fe(t.collisionBox.collisionVertexArray,c.text.placed,!1),g.iconBox&&fe(t.collisionBox.collisionVertexArray,c.icon.placed,!1);var x=g.textCircles;if(x&&t.hasCollisionCircleData())for(var b=0;b<x.length;b+=5){var w=p||0===x[b+4];fe(t.collisionCircle.collisionVertexArray,c.text.placed,w)}}}}t.sortFeatures(this.transform.angle),this.retainedQueryData[t.bucketInstanceId]&&(this.retainedQueryData[t.bucketInstanceId].featureSortOrder=t.featureSortOrder),t.hasTextData()&&t.text.opacityVertexBuffer&&t.text.opacityVertexBuffer.updateData(t.text.opacityVertexArray),t.hasIconData()&&t.icon.opacityVertexBuffer&&t.icon.opacityVertexBuffer.updateData(t.icon.opacityVertexArray),t.hasCollisionBoxData()&&t.collisionBox.collisionVertexBuffer&&t.collisionBox.collisionVertexBuffer.updateData(t.collisionBox.collisionVertexArray),t.hasCollisionCircleData()&&t.collisionCircle.collisionVertexBuffer&&t.collisionCircle.collisionVertexBuffer.updateData(t.collisionCircle.collisionVertexArray)},he.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration},he.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},he.prototype.stillRecent=function(t){return this.commitTime+this.fadeDuration>t},he.prototype.setStale=function(){this.stale=!0};var de=Math.pow(2,25),me=Math.pow(2,24),ye=Math.pow(2,17),_e=Math.pow(2,16),ve=Math.pow(2,9),ge=Math.pow(2,8),xe=Math.pow(2,1);function be(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*de+e*me+r*ye+e*_e+r*ve+e*ge+r*xe+e}var we=function(){this._currentTileIndex=0,this._seenCrossTileIDs={}};we.prototype.continuePlacement=function(t,e,r,i,n){for(;this._currentTileIndex<t.length;){var o=t[this._currentTileIndex];if(e.placeLayerTile(i,o,r,this._seenCrossTileIDs),this._currentTileIndex++,n())return!0}};var Ee=function(t,e,r,i,n,o){this.placement=new he(t,n,o),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._done=!1};Ee.prototype.isDone=function(){return this._done},Ee.prototype.continuePlacement=function(e,r,i){for(var n=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!n._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],u=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=u)&&(!s.maxzoom||s.maxzoom>u)){if(this._inProgressLayer||(this._inProgressLayer=new we),this._inProgressLayer.continuePlacement(i[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},Ee.prototype.commit=function(t,e){return this.placement.commit(t,e),this.placement};var Se=512/t.EXTENT/2,Te=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var i=0;i<e.length;i++){var n=e.get(i),o=n.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}};Te.prototype.getScaledCoordinates=function(e,r){var i=r.canonical.z-this.tileID.canonical.z,n=Se/Math.pow(2,i);return{x:Math.floor((r.canonical.x*t.EXTENT+e.anchorX)*n),y:Math.floor((r.canonical.y*t.EXTENT+e.anchorY)*n)}},Te.prototype.findMatches=function(t,e,r){for(var i=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),n=0;n<t.length;n++){var o=t.get(n);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,e),u=0,l=a;u<l.length;u+=1){var p=l[u];if(Math.abs(p.coord.x-s.x)<=i&&Math.abs(p.coord.y-s.y)<=i&&!r[p.crossTileID]){r[p.crossTileID]=!0,o.crossTileID=p.crossTileID;break}}}}};var Ae=function(){this.maxCrossTileID=0};Ae.prototype.generate=function(){return++this.maxCrossTileID};var ze=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};ze.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var i=this.indexes[r],n={};for(var o in i){var a=i[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),n[a.tileID.key]=a}this.indexes[r]=n}this.lng=t},ze.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var i=0;i<e.symbolInstances.length;i++)e.symbolInstances.get(i).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var n=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var u=a[s];u.tileID.isChildOf(t)&&u.findMatches(e.symbolInstances,t,n)}else{var l=a[t.scaledTo(Number(o)).key];l&&l.findMatches(e.symbolInstances,t,n)}}for(var p=0;p<e.symbolInstances.length;p++){var c=e.symbolInstances.get(p);c.crossTileID||(c.crossTileID=r.generate(),n[c.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Te(t,e.symbolInstances,e.bucketInstanceId),!0},ze.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var i=0,n=e.indexedSymbolInstances[r];i<n.length;i+=1){var o=n[i];delete this.usedCrossTileIDs[t][o.crossTileID]}},ze.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var i=this.indexes[r];for(var n in i)t[i[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,i[n]),delete i[n],e=!0)}return e};var Ie=function(){this.layerIndexes={},this.crossTileIDs=new Ae,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Ie.prototype.addLayer=function(t,e,r){var i=this.layerIndexes[t.id];void 0===i&&(i=this.layerIndexes[t.id]=new ze);var n=!1,o={};i.handleWrapJump(r);for(var a=0,s=e;a<s.length;a+=1){var u=s[a],l=u.getBucket(t);l&&t.id===l.layerIds[0]&&(l.bucketInstanceId||(l.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(u.tileID,l,this.crossTileIDs)&&(n=!0),o[l.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(n=!0),n},Ie.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Ce=function(e,r){return t.emitValidationErrors(e,r&&r.filter(function(t){return"source.canvas"!==t.identifier}))},ke=t.pick(Rt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Pe=t.pick(Rt,["setCenter","setZoom","setBearing","setPitch"]),Me=function(e){function r(i,n){var o=this;void 0===n&&(n={}),e.call(this),this.map=i,this.dispatcher=new w((Pt||(Pt=new kt),Pt),this),this.imageManager=new c,this.glyphManager=new _(i._transformRequest,n.localIdeographFontFamily),this.lineAtlas=new b(256,512),this.crossTileSymbolIndex=new Ie,this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var a=this;this._rtlTextPluginCallback=r.registerForPluginAvailability(function(t){for(var e in a.dispatcher.broadcast("loadRTLTextPlugin",t.pluginURL,t.completionCallback),a.sourceCaches)a.sourceCaches[e].reload()}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=o.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var i in o._layers){var n=o._layers[i];n.source===r.id&&o._validateLayer(n)}}}})}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.loadURL=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var n="boolean"==typeof r.validate?r.validate:!t.isMapboxURL(e);e=t.normalizeStyleURL(e,r.accessToken);var o=this.map._transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,function(e,r){i._request=null,e?i.fire(new t.ErrorEvent(e)):r&&i._load(r,n)})},r.prototype.loadJSON=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){i._request=null,i._load(e,!1!==r.validate)})},r.prototype._load=function(e,r){var i=this;if(!r||!Ce(this,t.validateStyle(e))){for(var n in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(n,e.sources[n],{validate:!1});e.sprite?this._spriteRequest=function(e,r,i){var n,o,a,s=t.browser.devicePixelRatio>1?"@2x":"",u=t.getJSON(r(t.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),function(t,e){u=null,a||(a=t,n=e,p())}),l=t.getImage(r(t.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){l=null,a||(a=t,o=e,p())});function p(){if(a)i(a);else if(n&&o){var e=t.browser.getImageData(o),r={};for(var s in n){var u=n[s],l=u.width,p=u.height,c=u.x,h=u.y,f=u.sdf,d=u.pixelRatio,m=new t.RGBAImage({width:l,height:p});t.RGBAImage.copy(e,m,{x:c,y:h},{x:0,y:0},{width:l,height:p}),r[s]={data:m,pixelRatio:d,sdf:f}}i(null,r)}}return{cancel:function(){u&&(u.cancel(),u=null),l&&(l.cancel(),l=null)}}}(e.sprite,this.map._transformRequest,function(e,r){if(i._spriteRequest=null,e)i.fire(new t.ErrorEvent(e));else if(r)for(var n in r)i.imageManager.addImage(n,r[n]);i.imageManager.setLoaded(!0),i.fire(new t.Event("data",{dataType:"style"}))}):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var o=Dt(this.stylesheet.layers);this._order=o.map(function(t){return t.id}),this._layers={};for(var a=0,s=o;a<s.length;a+=1){var u=s[a];(u=t.createStyleLayer(u)).setEventedParent(this,{layer:{id:u.id}}),this._layers[u.id]=u}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new x(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var i=e.sourceLayer;if(i){var n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(i))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+i+'" does not exist on source "'+n.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,i=t;r<i.length;r+=1){var n=i[r],o=this._layers[n];"custom"!==o.type&&e.push(o.serialize())}return e},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(e){if(this._loaded){var r=this._changed;if(this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var o in(i.length||n.length)&&this._updateWorkerLayers(i,n),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var u in this.sourceCaches)this.sourceCaches[u].used=!1;for(var l=0,p=this._order;l<p.length;l+=1){var c=p[l],h=this._layers[c];h.recalculate(e),!h.isHidden(e.zoom)&&h.source&&(this.sourceCaches[h.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,r&&this.fire(new t.Event("data",{dataType:"style"}))}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Ce(this,t.validateStyle(e)))return!1;(e=t.clone(e)).layers=Dt(e.layers);var i=function(e,r){if(!e)return[{command:Rt.setStyle,args:[r]}];var i=[];try{if(!t.isEqual(e.version,r.version))return[{command:Rt.setStyle,args:[r]}];t.isEqual(e.center,r.center)||i.push({command:Rt.setCenter,args:[r.center]}),t.isEqual(e.zoom,r.zoom)||i.push({command:Rt.setZoom,args:[r.zoom]}),t.isEqual(e.bearing,r.bearing)||i.push({command:Rt.setBearing,args:[r.bearing]}),t.isEqual(e.pitch,r.pitch)||i.push({command:Rt.setPitch,args:[r.pitch]}),t.isEqual(e.sprite,r.sprite)||i.push({command:Rt.setSprite,args:[r.sprite]}),t.isEqual(e.glyphs,r.glyphs)||i.push({command:Rt.setGlyphs,args:[r.glyphs]}),t.isEqual(e.transition,r.transition)||i.push({command:Rt.setTransition,args:[r.transition]}),t.isEqual(e.light,r.light)||i.push({command:Rt.setLight,args:[r.light]});var n={},o=[];!function(e,r,i,n){var o;for(o in r=r||{},e=e||{})e.hasOwnProperty(o)&&(r.hasOwnProperty(o)||Ft(o,i,n));for(o in r)r.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.isEqual(e[o],r[o])||("geojson"===e[o].type&&"geojson"===r[o].type&&Ut(e,r,o)?i.push({command:Rt.setGeoJSONSourceData,args:[o,r[o].data]}):Ot(o,r,i,n)):Bt(o,r,i))}(e.sources,r.sources,o,n);var a=[];e.layers&&e.layers.forEach(function(t){n[t.source]?i.push({command:Rt.removeLayer,args:[t.id]}):a.push(t)}),i=i.concat(o),function(e,r,i){r=r||[];var n,o,a,s,u,l,p,c=(e=e||[]).map(Nt),h=r.map(Nt),f=e.reduce(jt,{}),d=r.reduce(jt,{}),m=c.slice(),y=Object.create(null);for(n=0,o=0;n<c.length;n++)a=c[n],d.hasOwnProperty(a)?o++:(i.push({command:Rt.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(n=0,o=0;n<h.length;n++)a=h[h.length-1-n],m[m.length-1-n]!==a&&(f.hasOwnProperty(a)?(i.push({command:Rt.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,l=m[m.length-n],i.push({command:Rt.addLayer,args:[d[a],l]}),m.splice(m.length-n,0,a),y[a]=!0);for(n=0;n<h.length;n++)if(s=f[a=h[n]],u=d[a],!y[a]&&!t.isEqual(s,u))if(t.isEqual(s.source,u.source)&&t.isEqual(s["source-layer"],u["source-layer"])&&t.isEqual(s.type,u.type)){for(p in Vt(s.layout,u.layout,i,a,null,Rt.setLayoutProperty),Vt(s.paint,u.paint,i,a,null,Rt.setPaintProperty),t.isEqual(s.filter,u.filter)||i.push({command:Rt.setFilter,args:[a,u.filter]}),t.isEqual(s.minzoom,u.minzoom)&&t.isEqual(s.maxzoom,u.maxzoom)||i.push({command:Rt.setLayerZoomRange,args:[a,u.minzoom,u.maxzoom]}),s)s.hasOwnProperty(p)&&"layout"!==p&&"paint"!==p&&"filter"!==p&&"metadata"!==p&&"minzoom"!==p&&"maxzoom"!==p&&(0===p.indexOf("paint.")?Vt(s[p],u[p],i,a,p.slice(6),Rt.setPaintProperty):t.isEqual(s[p],u[p])||i.push({command:Rt.setLayerProperty,args:[a,p,u[p]]}));for(p in u)u.hasOwnProperty(p)&&!s.hasOwnProperty(p)&&"layout"!==p&&"paint"!==p&&"filter"!==p&&"metadata"!==p&&"minzoom"!==p&&"maxzoom"!==p&&(0===p.indexOf("paint.")?Vt(s[p],u[p],i,a,p.slice(6),Rt.setPaintProperty):t.isEqual(s[p],u[p])||i.push({command:Rt.setLayerProperty,args:[a,p,u[p]]}))}else i.push({command:Rt.removeLayer,args:[a]}),l=m[m.lastIndexOf(a)+1],i.push({command:Rt.addLayer,args:[u,l]})}(a,r.layers,i)}catch(t){console.warn("Unable to compute style diff:",t),i=[{command:Rt.setStyle,args:[r]}]}return i}(this.serialize(),e).filter(function(t){return!(t.command in Pe)});if(0===i.length)return!1;var n=i.filter(function(t){return!(t.command in ke)});if(n.length>0)throw new Error("Unimplemented: "+n.map(function(t){return t.command}).join(", ")+".");return i.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,i){var n=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,i))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[e]=new At(e,r,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:n.loaded(),source:o.serialize(),sourceId:e}}),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=e.id;if(this.getLayer(n))this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" already exists on this map')));else{var o;if("custom"===e.type){if(Ce(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(n,e.source),e=t.clone(e),e=t.extend(e,{source:n})),this._validate(t.validateStyle.layer,"layers."+n,e,{arrayIndex:-1},i))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}})}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,n),this._layerOrderChanged=!0,this._layers[n]=o,this._removedLayers[n]&&o.source&&"custom"!==o.type){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var i=this._order.indexOf(e);this._order.splice(i,1);var n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.setLayerZoomRange=function(e,r,i){this._checkLoaded();var n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.isEqual(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,"layers."+n.id+".filter",r,null,i)||(n.filter=t.clone(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.isEqual(o.getLayoutProperty(r),i)||(o.setLayoutProperty(r,i,n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.isEqual(o.getPaintProperty(r),i)||(o.setPaintProperty(r,i,n)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=e.sourceLayer,o=this.sourceCaches[i],a=parseInt(e.id,10);if(void 0!==o){var s=o.getSource().type;"geojson"===s&&n?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==s||n?isNaN(a)||a<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative."))):o.setFeatureState(n,a,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=this.sourceCaches[i];if(void 0!==n){var o=n.getSource().type,a="vector"===o?e.sourceLayer:void 0,s=parseInt(e.id,10);"vector"!==o||a?e.id&&isNaN(s)||s<0?this.fire(new t.ErrorEvent(new Error("The feature id parameter must be non-negative."))):!r||e.id?n.removeFeatureState(a,s,r):this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,i=e.sourceLayer,n=this.sourceCaches[r],o=parseInt(e.id,10);if(void 0!==n)if("vector"!==n.getSource().type||i){if(!(isNaN(o)||o<0))return n.getFeatureState(i,o);this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided and non-negative.")))}else this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._serializeLayers(this._order)},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},i={},n=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){i[a]=o;for(var s=0,u=t;s<u.length;s+=1){var l=u[s][a];if(l)for(var p=0,c=l;p<c.length;p+=1){var h=c[p];n.push(h)}}}}n.sort(function(t,e){return e.intersectionZ-t.intersectionZ});for(var f=[],d=this._order.length-1;d>=0;d--){var m=this._order[d];if(r(m))for(var y=n.length-1;y>=0;y--){var _=n[y].feature;if(i[_.layer.id]<d)break;f.push(_),n.pop()}else for(var v=0,g=t;v<g.length;v+=1){var x=g[v][m];if(x)for(var b=0,w=x;b<w.length;b+=1){var E=w[b];f.push(E.feature)}}}return f},r.prototype.queryRenderedFeatures=function(e,r,i){r&&r.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",r.filter);var n={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=r.layers;o<a.length;o+=1){var s=a[o],u=this._layers[s];if(!u)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];n[u.source]=!0}}var l=[];for(var p in this.sourceCaches)r.layers&&!n[p]||l.push(L(this.sourceCaches[p],this._layers,e,r,i));return this.placement&&l.push(function(t,e,r,i,n,o){for(var a={},s=n.queryRenderedSymbols(r),u=[],l=0,p=Object.keys(s).map(Number);l<p.length;l+=1){var c=p[l];u.push(o[c])}u.sort(D);for(var h=function(){var e=d[f],r=e.featureIndex.lookupSymbolFeatures(s[e.bucketInstanceId],e.bucketIndex,e.sourceLayerIndex,i.filter,i.layers,t);for(var n in r){var o=a[n]=a[n]||[],u=r[n];u.sort(function(t,r){var i=e.featureSortOrder;if(i){var n=i.indexOf(t.featureIndex);return i.indexOf(r.featureIndex)-n}return r.featureIndex-t.featureIndex});for(var l=0,p=u;l<p.length;l+=1){var c=p[l];o.push(c)}}},f=0,d=u;f<d.length;f+=1)h();var m=function(r){a[r].forEach(function(i){var n=i.feature,o=t[r],a=e[o.source].getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=a})};for(var y in a)m(y);return a}(this._layers,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(l)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",r.filter);var i=this.sourceCaches[e];return i?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),i=[],n={},o=0;o<r.length;o++){var a=r[o],s=a.tileID.canonical.key;n[s]||(n[s]=!0,a.querySourceFeatures(i,e))}return i}(i,r):[]},r.prototype.addSourceType=function(t,e,i){return r.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e,r){void 0===r&&(r={}),this._checkLoaded();var i=this.light.getLight(),n=!1;for(var o in e)if(!t.isEqual(e[o],i[o])){n=!0;break}if(n){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}},r.prototype._validate=function(e,r,i,n,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&Ce(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:i,styleSpec:t.styleSpec},n)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginAvailable",this._rtlTextPluginCallback),this.sourceCaches)this.sourceCaches[e].clearTiles();this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,i,n){for(var o=!1,a=!1,s={},u=0,l=this._order;u<l.length;u+=1){var p=l[u],c=this._layers[p];if("symbol"===c.type){if(!s[c.source]){var h=this.sourceCaches[c.source];s[c.source]=h.getRenderableIds(!0).map(function(t){return h.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var f=this.crossTileSymbolIndex.addLayer(c,s[c.source],e.center.lng);o=o||f}}this.crossTileSymbolIndex.pruneUnusedLayers(this._order);var d=this._layerOrderChanged||0===i;if((d||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now()))&&(this.pauseablePlacement=new Ee(e,this._order,d,r,i,n),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(this.placement,t.browser.now()),a=!0),o&&this.pauseablePlacement.placement.setStale()),a||o)for(var m=0,y=this._order;m<y.length;m+=1){var _=y[m],v=this._layers[_];"symbol"===v.type&&this.placement.updateLayerOpacities(v,s[v.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r.prototype.getResource=function(e,r,i){return t.makeRequest(r,i)},r}(t.Evented);Me.getSourceType=function(t){return k[t]},Me.setSourceType=function(t,e){k[t]=e},Me.registerForPluginAvailability=t.registerForPluginAvailability;var Le=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),De=ar("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Re=ar("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Be=ar("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Fe=ar("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvarying vec3 v_data;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvarying vec3 v_data;void main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/DEVICE_PIXEL_RATIO/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),Oe=ar("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ue=ar("#pragma mapbox: define highp float weight\nuniform highp float u_intensity;varying vec2 v_extrude;\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nuniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;const highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ve=ar("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Ne=ar("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=a_extrude*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),je=ar("uniform float u_overscale_factor;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {float alpha=0.5;vec4 color=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {color=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {color*=.2;}float extrude_scale_length=length(v_extrude_scale);float extrude_length=length(v_extrude)*extrude_scale_length;float stroke_width=15.0*extrude_scale_length/u_overscale_factor;float radius=v_radius*extrude_scale_length;float distance_to_edge=abs(extrude_length-radius);float opacity_t=smoothstep(-stroke_width,0.0,-distance_to_edge);gl_FragColor=opacity_t*color;}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;varying float v_radius;varying vec2 v_extrude;varying vec2 v_extrude_scale;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);highp float padding_factor=1.2;gl_Position.xy+=a_extrude*u_extrude_scale*padding_factor*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;v_radius=abs(a_extrude.y);v_extrude=a_extrude*padding_factor;v_extrude_scale=u_extrude_scale*u_camera_to_center_distance*collision_perspective_ratio;}"),qe=ar("uniform highp vec4 u_color;void main() {gl_FragColor=u_color;}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Ze=ar("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),Ge=ar("#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_pos;void main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),Xe=ar("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),We=ar("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec4 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),Ke=ar("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);}"),He=ar("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec4 u_scale;uniform float u_vertical_gradient;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));}"),Ye=ar("uniform sampler2D u_image;uniform float u_opacity;varying vec2 v_pos;void main() {gl_FragColor=texture2D(u_image,v_pos)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Je=ar("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;return (data.r+data.g*256.0+data.b*256.0*256.0)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),$e=ar("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Qe=ar("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;void main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),tr=ar("#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nuniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;void main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\n#define scale 0.015873016\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),er=ar("uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec4 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float pixelRatio=u_scale.x;float tileZoomRatio=u_scale.y;float fromScale=u_scale.z;float toScale=u_scale.w;vec2 display_size_a=vec2((pattern_br_a.x-pattern_tl_a.x)/pixelRatio,(pattern_br_a.y-pattern_tl_a.y)/pixelRatio);vec2 display_size_b=vec2((pattern_br_b.x-pattern_tl_b.x)/pixelRatio,(pattern_br_b.y-pattern_tl_b.y)/pixelRatio);vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x,1.0);float x_b=mod(v_linesofar/pattern_size_b.x,1.0);float y_a=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_a.y+2.0)/2.0)/pattern_size_a.y);float y_b=0.5+(v_normal.y*clamp(v_width2.s,0.0,(pattern_size_b.y+2.0)/2.0)/pattern_size_b.y);vec2 pos_a=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,vec2(x_a,y_a));vec2 pos_b=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,vec2(x_b,y_b));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_gl_units_to_pixels;uniform mediump float u_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);}"),rr=ar("uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/DEVICE_PIXEL_RATIO)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\n#define ANTIALIASING 1.0/DEVICE_PIXEL_RATIO/2.0\nattribute vec4 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_gl_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nvec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=a_pos_normal.xy;mediump vec2 normal=a_pos_normal.zw;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_gl_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),ir=ar("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),nr=ar("uniform sampler2D u_texture;\n#pragma mapbox: define lowp float opacity\nvarying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;\n#pragma mapbox: define lowp float opacity\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;void main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),or=ar("#define SDF_PX 8.0\n#define EDGE_GAMMA 0.105/DEVICE_PIXEL_RATIO\nuniform bool u_is_halo;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nuniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nuniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_gl_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;void main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size[0],a_size[1],u_size_t)/256.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size[0]/256.0;} else if (!u_is_size_zoom_constant && u_is_size_feature_constant) {size=u_size;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_gl_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=vec2(tex.x,tex.y);v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}");function ar(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i={};return{fragmentSource:t=t.replace(r,function(t,e,r,n,o){return i[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"}),vertexSource:e=e.replace(r,function(t,e,r,n,o){var a="float"===n?"vec2":"vec4",s=o.match(/color/)?"color":a;return i[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float a_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = unpack_mix_"+s+"(a_"+o+", a_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"})}}var sr=Object.freeze({prelude:De,background:Re,backgroundPattern:Be,circle:Fe,clippingMask:Oe,heatmap:Ue,heatmapTexture:Ve,collisionBox:Ne,collisionCircle:je,debug:qe,fill:Ze,fillOutline:Ge,fillOutlinePattern:Xe,fillPattern:We,fillExtrusion:Ke,fillExtrusionPattern:He,extrusionTexture:Ye,hillshadePrepare:Je,hillshade:$e,line:Qe,lineGradient:tr,linePattern:er,lineSDF:rr,raster:ir,symbolIcon:nr,symbolSDF:or}),ur=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};ur.prototype.bind=function(t,e,r,i,n,o,a,s){this.context=t;for(var u=this.boundPaintVertexBuffers.length!==i.length,l=0;!u&&l<i.length;l++)this.boundPaintVertexBuffers[l]!==i[l]&&(u=!0);var p=!this.vao||this.boundProgram!==e||this.boundLayoutVertexBuffer!==r||u||this.boundIndexBuffer!==n||this.boundVertexOffset!==o||this.boundDynamicVertexBuffer!==a||this.boundDynamicVertexBuffer2!==s;!t.extVertexArrayObject||p?this.freshBind(e,r,i,n,o,a,s):(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),n&&n.dynamicDraw&&n.bind(),s&&s.bind())},ur.prototype.freshBind=function(t,e,r,i,n,o,a){var s,u=t.numAttributes,l=this.context,p=l.gl;if(l.extVertexArrayObject)this.vao&&this.destroy(),this.vao=l.extVertexArrayObject.createVertexArrayOES(),l.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=i,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=l.currentNumAttributes||0;for(var c=u;c<s;c++)p.disableVertexAttribArray(c)}e.enableAttributes(p,t);for(var h=0,f=r;h<f.length;h+=1)f[h].enableAttributes(p,t);o&&o.enableAttributes(p,t),a&&a.enableAttributes(p,t),e.bind(),e.setVertexAttribPointers(p,t,n);for(var d=0,m=r;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(p,t,n)}o&&(o.bind(),o.setVertexAttribPointers(p,t,n)),i&&i.bind(),a&&(a.bind(),a.setVertexAttribPointers(p,t,n)),l.currentNumAttributes=u},ur.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var lr=function(e,r,i,n,o){var a=e.gl;this.program=a.createProgram();var s=i.defines().concat("#define DEVICE_PIXEL_RATIO "+t.browser.devicePixelRatio.toFixed(1));o&&s.push("#define OVERDRAW_INSPECTOR;");var u=s.concat(De.fragmentSource,r.fragmentSource).join("\n"),l=s.concat(De.vertexSource,r.vertexSource).join("\n"),p=a.createShader(a.FRAGMENT_SHADER);a.shaderSource(p,u),a.compileShader(p),a.attachShader(this.program,p);var c=a.createShader(a.VERTEX_SHADER);a.shaderSource(c,l),a.compileShader(c),a.attachShader(this.program,c);for(var h=i.layoutAttributes||[],f=0;f<h.length;f++)a.bindAttribLocation(this.program,f,h[f].name);a.linkProgram(this.program),this.numAttributes=a.getProgramParameter(this.program,a.ACTIVE_ATTRIBUTES),this.attributes={};for(var d={},m=0;m<this.numAttributes;m++){var y=a.getActiveAttrib(this.program,m);y&&(this.attributes[y.name]=a.getAttribLocation(this.program,y.name))}for(var _=a.getProgramParameter(this.program,a.ACTIVE_UNIFORMS),v=0;v<_;v++){var g=a.getActiveUniform(this.program,v);g&&(d[g.name]=a.getUniformLocation(this.program,g.name))}this.fixedUniforms=n(e,d),this.binderUniforms=i.getUniforms(e,d)};function pr(e,r,i){var n=1/ae(i,1,r.transform.tileZoom),o=Math.pow(2,i.tileID.overscaledZ),a=i.tileSize*Math.pow(2,r.transform.tileZoom)/o,s=a*(i.tileID.canonical.x+i.tileID.wrap*o),u=a*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[t.browser.devicePixelRatio,n,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,u>>16],u_pixel_coord_lower:[65535&s,65535&u]}}lr.prototype.draw=function(t,e,r,i,n,o,a,s,u,l,p,c,h,f,d,m){var y,_=t.gl;for(var v in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(i),t.setColorMode(n),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[v].set(a[v]);f&&f.setUniforms(t,this.binderUniforms,c,{zoom:h});for(var g=(y={},y[_.LINES]=2,y[_.TRIANGLES]=3,y[_.LINE_STRIP]=1,y)[e],x=0,b=p.get();x<b.length;x+=1){var w=b[x],E=w.vaos||(w.vaos={});(E[s]||(E[s]=new ur)).bind(t,this,u,f?f.getPaintVertexBuffers():[],l,w.vertexOffset,d,m),_.drawElements(e,w.primitiveLength*g,_.UNSIGNED_SHORT,w.primitiveOffset*g*2)}};var cr=function(e,r,i){var n=r.style.light,o=n.properties.get("position"),a=[o.x,o.y,o.z],s=t.create();"viewport"===n.properties.get("anchor")&&t.fromRotation(s,-r.transform.angle),t.transformMat3(a,a,s);var u=n.properties.get("color");return{u_matrix:e,u_lightpos:a,u_lightintensity:n.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+i}},hr=function(e,r,i,n,o,a){return t.extend(cr(e,r,i),pr(o,r,a),{u_height_factor:-Math.pow(2,n.overscaledZ)/a.tileSize/8})},fr=function(e,r,i){var n=t.create$1();t.ortho(n,0,e.width,e.height,0,0,1);var o=e.context.gl;return{u_matrix:n,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:i,u_opacity:r}},dr=function(t){return{u_matrix:t}},mr=function(e,r,i,n){return t.extend(dr(e),pr(i,r,n))},yr=function(t,e){return{u_matrix:t,u_world:e}},_r=function(e,r,i,n,o){return t.extend(mr(e,r,i,n),{u_world:o})},vr=function(t,e,r,i){var n,o,a=t.transform;if("map"===i.paint.get("circle-pitch-alignment")){var s=ae(r,1,a.zoom);n=!0,o=[s,s]}else n=!1,o=a.pixelsToGLUnits;return{u_camera_to_center_distance:a.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:t.translatePosMatrix(e.posMatrix,r,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+n,u_extrude_scale:o}},gr=function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},xr=function(t,e,r){var i=ae(r,1,e.zoom),n=Math.pow(2,e.zoom-r.tileID.overscaledZ),o=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:i,u_extrude_scale:[e.pixelsToGLUnits[0]/(i*n),e.pixelsToGLUnits[1]/(i*n)],u_overscale_factor:o}},br=function(t,e){return{u_matrix:t,u_color:e}},wr=function(t){return{u_matrix:t}},Er=function(t,e,r,i){return{u_matrix:t,u_extrude_scale:ae(e,1,r),u_intensity:i}},Sr=function(t,e,r){var i=r.paint.get("hillshade-shadow-color"),n=r.paint.get("hillshade-highlight-color"),o=r.paint.get("hillshade-accent-color"),a=r.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===r.paint.get("hillshade-illumination-anchor")&&(a-=t.transform.angle);var s=!t.options.moving;return{u_matrix:t.transform.calculatePosMatrix(e.tileID.toUnwrapped(),s),u_image:0,u_latrange:Ar(0,e.tileID),u_light:[r.paint.get("hillshade-exaggeration"),a],u_shadow:i,u_highlight:n,u_accent:o}},Tr=function(e,r){var i=e.dem.stride,n=t.create$1();return t.ortho(n,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(n,n,[0,-t.EXTENT,0]),{u_matrix:n,u_image:1,u_dimension:[i,i],u_zoom:e.tileID.overscaledZ,u_maxzoom:r}};function Ar(e,r){var i=Math.pow(2,r.canonical.z),n=r.canonical.y;return[new t.MercatorCoordinate(0,n/i).toLngLat().lat,new t.MercatorCoordinate(0,(n+1)/i).toLngLat().lat]}var zr=function(t,e,r){var i=t.transform;return{u_matrix:Mr(t,e,r),u_ratio:1/ae(e,1,i.zoom),u_gl_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Ir=function(e,r,i){return t.extend(zr(e,r,i),{u_image:0})},Cr=function(e,r,i,n){var o=e.transform,a=Pr(r,o);return{u_matrix:Mr(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:1/ae(r,1,o.zoom),u_image:0,u_scale:[t.browser.devicePixelRatio,a,n.fromScale,n.toScale],u_fade:n.t,u_gl_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},kr=function(e,r,i,n,o){var a=e.transform,s=e.lineAtlas,u=Pr(r,a),l="round"===i.layout.get("line-cap"),p=s.getDash(n.from,l),c=s.getDash(n.to,l),h=p.width*o.fromScale,f=c.width*o.toScale;return t.extend(zr(e,r,i),{u_patternscale_a:[u/h,-p.height/2],u_patternscale_b:[u/f,-c.height/2],u_sdfgamma:s.width/(256*Math.min(h,f)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:p.y,u_tex_y_b:c.y,u_mix:o.t})};function Pr(t,e){return 1/ae(t,1,e.tileZoom)}function Mr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Lr=function(t,e,r,i,n){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*n.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:n.paint.get("raster-brightness-min"),u_brightness_high:n.paint.get("raster-brightness-max"),u_saturation_factor:(a=n.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=n.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Dr(n.paint.get("raster-hue-rotate"))};var o,a};function Dr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var Rr=function(t,e,r,i,n,o,a,s,u,l){var p=n.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:p.cameraToCenterDistance,u_pitch:p.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:p.width/p.height,u_fade_change:n.options.fadeDuration?n.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_gl_coord_matrix:s,u_is_text:+u,u_pitch_with_map:+i,u_texsize:l,u_texture:0}},Br=function(e,r,i,n,o,a,s,u,l,p,c){var h=o.transform;return t.extend(Rr(e,r,i,n,o,a,s,u,l,p),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_is_halo:+c})},Fr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Or=function(e,r,i,n,o,a){return t.extend(function(t,e,r,i){var n=r.imageManager.getPattern(t.from),o=r.imageManager.getPattern(t.to),a=r.imageManager.getPixelSize(),s=a.width,u=a.height,l=Math.pow(2,i.tileID.overscaledZ),p=i.tileSize*Math.pow(2,r.transform.tileZoom)/l,c=p*(i.tileID.canonical.x+i.tileID.wrap*l),h=p*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,u],u_mix:e.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/ae(i,1,r.transform.tileZoom),u_pixel_coord_upper:[c>>16,h>>16],u_pixel_coord_lower:[65535&c,65535&h]}}(n,a,i,o),{u_matrix:e,u_opacity:r})},Ur={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},extrusionTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:gr,collisionCircle:gr,debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_image:new t.Uniform1i(e,r.u_image),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_scale:new t.Uniform4f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_gl_units_to_pixels:new t.Uniform2f(e,r.u_gl_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,r.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_gl_coord_matrix:new t.UniformMatrix4f(e,r.u_gl_coord_matrix),u_is_text:new t.Uniform1f(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_is_halo:new t.Uniform1f(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Vr(e,r){for(var i=e.sort(function(t,e){return t.tileID.isLessThan(e.tileID)?-1:e.tileID.isLessThan(t.tileID)?1:0}),n=0;n<i.length;n++){var o={},a=i[n],s=i.slice(n+1);Nr(a.tileID.wrapped(),a.tileID,s,new t.OverscaledTileID(0,a.tileID.wrap+1,0,0,0),o),a.setMask(o,r)}}function Nr(e,r,i,n,o){for(var a=0;a<i.length;a++){var s=i[a];if(n.isLessThan(s.tileID))break;if(r.key===s.tileID.key)return;if(s.tileID.isChildOf(r)){for(var u=r.children(1/0),l=0;l<u.length;l++)Nr(e,u[l],i.slice(a),n,o);return}}var p=r.overscaledZ-e.overscaledZ,c=new t.CanonicalTileID(p,r.canonical.x-(e.canonical.x<<p),r.canonical.y-(e.canonical.y<<p));o[c.key]=o[c.key]||c}function jr(t,e,r,i,n){for(var o=t.context,a=o.gl,s=n?t.useProgram("collisionCircle"):t.useProgram("collisionBox"),u=0;u<i.length;u++){var l=i[u],p=e.getTile(l),c=p.getBucket(r);if(c){var h=n?c.collisionCircle:c.collisionBox;h&&s.draw(o,n?a.TRIANGLES:a.LINES,bt.disabled,wt.disabled,t.colorModeForRenderPass(),St.disabled,xr(l.posMatrix,t.transform,p),r.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,null,t.transform.zoom,null,null,h.collisionVertexBuffer)}}}var qr=t.identity(new Float32Array(16)),Zr=t.properties.layout;function Gr(e,r,i,n,o,a,s,u,l,p,c,h){for(var f,d,m=e.context,y=m.gl,_=e.transform,v="map"===u,g="map"===l,x=v&&"point"!==i.layout.get("symbol-placement"),b=v&&!g&&!x,w=void 0!==i.layout.get("symbol-sort-key").constantOr(1),E=e.depthModeForSublayer(0,bt.ReadOnly),S=[],T=0,A=n;T<A.length;T+=1){var z=A[T],I=r.getTile(z),C=I.getBucket(i);if(C){var k=o?C.text:C.icon;if(k&&k.segments.get().length){var P=k.programConfigurations.get(i.id),M=o||C.sdfIcons,L=o?C.textSizeData:C.iconSizeData;f||(f=e.useProgram(M?"symbolSDF":"symbolIcon",P),d=t.evaluateSizeForZoom(L,_.zoom,Zr.properties[o?"text-size":"icon-size"])),m.activeTexture.set(y.TEXTURE0);var D=void 0,R=void 0,B=void 0;if(o)R=I.glyphAtlasTexture,B=y.LINEAR,D=I.glyphAtlasTexture.size;else{var F=1!==i.layout.get("icon-size").constantOr(0)||C.iconsNeedLinear,O=g||0!==_.pitch;R=I.imageAtlasTexture,B=M||e.options.rotating||e.options.zooming||F||O?y.LINEAR:y.NEAREST,D=I.imageAtlasTexture.size}var U=ae(I,1,e.transform.zoom),V=Gt(z.posMatrix,g,v,e.transform,U),N=Xt(z.posMatrix,g,v,e.transform,U);x&&Ht(C,z.posMatrix,e,o,V,N,g,p);var j=e.translatePosMatrix(z.posMatrix,I,a,s),q=x?qr:V,Z=e.translatePosMatrix(N,I,a,s,!0),G=M&&0!==i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),X={program:f,buffers:k,uniformValues:M?Br(L.functionType,d,b,g,e,j,q,Z,o,D,!0):Rr(L.functionType,d,b,g,e,j,q,Z,o,D),atlasTexture:R,atlasInterpolation:B,isSDF:M,hasHalo:G};if(w)for(var W=0,K=k.segments.get();W<K.length;W+=1){var H=K[W];S.push({segments:new t.SegmentVector([H]),sortKey:H.sortKey,state:X})}else S.push({segments:k.segments,sortKey:0,state:X})}}}w&&S.sort(function(t,e){return t.sortKey-e.sortKey});for(var Y=0,J=S;Y<J.length;Y+=1){var $=J[Y],Q=$.state;if(Q.atlasTexture.bind(Q.atlasInterpolation,y.CLAMP_TO_EDGE),Q.isSDF){var tt=Q.uniformValues;Q.hasHalo&&(tt.u_is_halo=1,Xr(Q.buffers,$.segments,i,e,Q.program,E,c,h,tt)),tt.u_is_halo=0}Xr(Q.buffers,$.segments,i,e,Q.program,E,c,h,Q.uniformValues)}}function Xr(t,e,r,i,n,o,a,s,u){var l=i.context,p=l.gl;n.draw(l,p.TRIANGLES,o,a,s,St.disabled,u,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,i.transform.zoom,t.programConfigurations.get(r.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function Wr(t,e,r,i,n,o,a){var s,u,l,p,c,h=t.context.gl,f=r.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=r.getCrossfadeParameters();a?(u=d&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=h.LINES):(u=d?"fillPattern":"fill",s=h.TRIANGLES);for(var y=0,_=i;y<_.length;y+=1){var v=_[y],g=e.getTile(v);if(!d||g.patternsLoaded()){var x=g.getBucket(r);if(x){var b=x.programConfigurations.get(r.id),w=t.useProgram(u,b);d&&(t.context.activeTexture.set(h.TEXTURE0),g.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePatternPaintBuffers(m));var E=f.constantOr(null);if(E&&g.imageAtlas){var S=g.imageAtlas.patternPositions[E.to],T=g.imageAtlas.patternPositions[E.from];S&&T&&b.setConstantPatternPositions(S,T)}var A=t.translatePosMatrix(v.posMatrix,g,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(a){p=x.indexBuffer2,c=x.segments2;var z=[h.drawingBufferWidth,h.drawingBufferHeight];l="fillOutlinePattern"===u&&d?_r(A,t,m,g,z):yr(A,z)}else p=x.indexBuffer,c=x.segments,l=d?mr(A,t,m,g):dr(A);w.draw(t.context,s,n,t.stencilModeForClipping(v),o,St.disabled,l,r.id,x.layoutVertexBuffer,p,c,r.paint,t.transform.zoom,b)}}}}function Kr(e,r){var i=e.context,n=i.gl,o=r.viewportFrame;if(e.depthRboNeedsClear&&e.setupOffscreenDepthRenderbuffer(),!o){var a=new t.Texture(i,{width:e.width,height:e.height,data:null},n.RGBA);a.bind(n.LINEAR,n.CLAMP_TO_EDGE),(o=r.viewportFrame=i.createFramebuffer(e.width,e.height)).colorAttachment.set(a.texture)}i.bindFramebuffer.set(o.framebuffer),o.depthAttachment.set(e.depthRbo),e.depthRboNeedsClear&&(i.clear({depth:1}),e.depthRboNeedsClear=!1),i.clear({color:t.Color.transparent}),i.setStencilMode(wt.disabled),i.setDepthMode(new bt(n.LEQUAL,bt.ReadWrite,[0,1])),i.setColorMode(e.colorModeForRenderPass())}function Hr(t,e,r){var i=e.viewportFrame;if(i){var n=t.context,o=n.gl;n.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,i.colorAttachment.get()),t.useProgram("extrusionTexture").draw(n,o.TRIANGLES,bt.disabled,wt.disabled,t.colorModeForRenderPass(),St.disabled,fr(t,r,0),e.id,t.viewportBuffer,t.quadTriangleIndexBuffer,t.viewportSegments,e.paint,t.transform.zoom)}}function Yr(t,e,r,i,n,o){var a=t.context,s=a.gl,u=e.fbo;if(u){var l=t.useProgram("hillshade");a.activeTexture.set(s.TEXTURE0),s.bindTexture(s.TEXTURE_2D,u.colorAttachment.get());var p=Sr(t,e,r);e.maskedBoundsBuffer&&e.maskedIndexBuffer&&e.segments?l.draw(a,s.TRIANGLES,i,n,o,St.disabled,p,r.id,e.maskedBoundsBuffer,e.maskedIndexBuffer,e.segments):l.draw(a,s.TRIANGLES,i,n,o,St.disabled,p,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}}function Jr(e,r,i,n,o,a,s){var u=e.context,l=u.gl;if(r.dem&&r.dem.data){var p=r.dem.dim,c=r.dem.stride,h=r.dem.getPixels();if(u.activeTexture.set(l.TEXTURE1),u.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(c),r.demTexture){var f=r.demTexture;f.update(h,{premultiply:!1}),f.bind(l.NEAREST,l.CLAMP_TO_EDGE)}else r.demTexture=new t.Texture(u,h,l.RGBA,{premultiply:!1}),r.demTexture.bind(l.NEAREST,l.CLAMP_TO_EDGE);u.activeTexture.set(l.TEXTURE0);var d=r.fbo;if(!d){var m=new t.Texture(u,{width:p,height:p,data:null},l.RGBA);m.bind(l.LINEAR,l.CLAMP_TO_EDGE),(d=r.fbo=u.createFramebuffer(p,p)).colorAttachment.set(m.texture)}u.bindFramebuffer.set(d.framebuffer),u.viewport.set([0,0,p,p]),e.useProgram("hillshadePrepare").draw(u,l.TRIANGLES,o,a,s,St.disabled,Tr(r,n),i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function $r(e,r,i,n,o){var a=n.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),u=(s-e.timeAdded)/a,l=r?(s-r.timeAdded)/a:-1,p=i.getSource(),c=o.coveringZoomLevel({tileSize:p.tileSize,roundZoom:p.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-c)>Math.abs(e.tileID.overscaledZ-c),f=h&&e.refreshedUponExpiration?1:t.clamp(h?u:1-l,0,1);return e.refreshedUponExpiration&&u>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}function Qr(e,r,i){var n=e.context,o=n.gl,a=i.posMatrix,s=e.useProgram("debug"),u=bt.disabled,l=wt.disabled,p=e.colorModeForRenderPass(),c="$debug";s.draw(n,o.LINE_STRIP,u,l,p,St.disabled,br(a,t.Color.red),c,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);for(var h=function(t,e,r,i){i=i||1;var n,o,a,s,u,l,p,c,h=[];for(n=0,o=t.length;n<o;n++)if(u=ti[t[n]]){for(c=null,a=0,s=u[1].length;a<s;a+=2)-1===u[1][a]&&-1===u[1][a+1]?c=null:(l=e+u[1][a]*i,p=200-u[1][a+1]*i,c&&h.push(c.x,c.y,l,p),c={x:l,y:p});e+=u[0]*i}return h}(i.toString(),50,0,5),f=new t.StructArrayLayout2i4,d=new t.StructArrayLayout2ui4,m=0;m<h.length;m+=2)f.emplaceBack(h[m],h[m+1]),d.emplaceBack(m,m+1);for(var y=n.createVertexBuffer(f,Le.members),_=n.createIndexBuffer(d),v=t.SegmentVector.simpleSegment(0,0,f.length/2,f.length/2),g=r.getTile(i).tileSize,x=t.EXTENT/(Math.pow(2,e.transform.zoom-i.overscaledZ)*g),b=[[-1,-1],[-1,1],[1,-1],[1,1]],w=0;w<b.length;w++){var E=b[w];s.draw(n,o.LINES,u,l,p,St.disabled,br(t.translate([],a,[x*E[0],x*E[1],0]),t.Color.white),c,y,_,v)}s.draw(n,o.LINES,u,l,p,St.disabled,br(a,t.Color.black),c,y,_,v)}var ti={" ":[16,[]],"!":[10,[5,21,5,7,-1,-1,5,2,4,1,5,0,6,1,5,2]],'"':[16,[4,21,4,14,-1,-1,12,21,12,14]],"#":[21,[11,25,4,-7,-1,-1,17,25,10,-7,-1,-1,4,12,18,12,-1,-1,3,6,17,6]],$:[20,[8,25,8,-4,-1,-1,12,25,12,-4,-1,-1,17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],"%":[24,[21,21,3,0,-1,-1,8,21,10,19,10,17,9,15,7,14,5,14,3,16,3,18,4,20,6,21,8,21,10,20,13,19,16,19,19,20,21,21,-1,-1,17,7,15,6,14,4,14,2,16,0,18,0,20,1,21,3,21,5,19,7,17,7]],"&":[26,[23,12,23,13,22,14,21,14,20,13,19,11,17,6,15,3,13,1,11,0,7,0,5,1,4,2,3,4,3,6,4,8,5,9,12,13,13,14,14,16,14,18,13,20,11,21,9,20,8,18,8,16,9,13,11,10,16,3,18,1,20,0,22,0,23,1,23,2]],"'":[10,[5,19,4,20,5,21,6,20,6,18,5,16,4,15]],"(":[14,[11,25,9,23,7,20,5,16,4,11,4,7,5,2,7,-2,9,-5,11,-7]],")":[14,[3,25,5,23,7,20,9,16,10,11,10,7,9,2,7,-2,5,-5,3,-7]],"*":[16,[8,21,8,9,-1,-1,3,18,13,12,-1,-1,13,18,3,12]],"+":[26,[13,18,13,0,-1,-1,4,9,22,9]],",":[10,[6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"-":[26,[4,9,22,9]],".":[10,[5,2,4,1,5,0,6,1,5,2]],"/":[22,[20,25,2,-7]],0:[20,[9,21,6,20,4,17,3,12,3,9,4,4,6,1,9,0,11,0,14,1,16,4,17,9,17,12,16,17,14,20,11,21,9,21]],1:[20,[6,17,8,18,11,21,11,0]],2:[20,[4,16,4,17,5,19,6,20,8,21,12,21,14,20,15,19,16,17,16,15,15,13,13,10,3,0,17,0]],3:[20,[5,21,16,21,10,13,13,13,15,12,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],4:[20,[13,21,3,7,18,7,-1,-1,13,21,13,0]],5:[20,[15,21,5,21,4,12,5,13,8,14,11,14,14,13,16,11,17,8,17,6,16,3,14,1,11,0,8,0,5,1,4,2,3,4]],6:[20,[16,18,15,20,12,21,10,21,7,20,5,17,4,12,4,7,5,3,7,1,10,0,11,0,14,1,16,3,17,6,17,7,16,10,14,12,11,13,10,13,7,12,5,10,4,7]],7:[20,[17,21,7,0,-1,-1,3,21,17,21]],8:[20,[8,21,5,20,4,18,4,16,5,14,7,13,11,12,14,11,16,9,17,7,17,4,16,2,15,1,12,0,8,0,5,1,4,2,3,4,3,7,4,9,6,11,9,12,13,13,15,14,16,16,16,18,15,20,12,21,8,21]],9:[20,[16,14,15,11,13,9,10,8,9,8,6,9,4,11,3,14,3,15,4,18,6,20,9,21,10,21,13,20,15,18,16,14,16,9,15,4,13,1,10,0,8,0,5,1,4,3]],":":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,5,2,4,1,5,0,6,1,5,2]],";":[10,[5,14,4,13,5,12,6,13,5,14,-1,-1,6,1,5,0,4,1,5,2,6,1,6,-1,5,-3,4,-4]],"<":[24,[20,18,4,9,20,0]],"=":[26,[4,12,22,12,-1,-1,4,6,22,6]],">":[24,[4,18,20,9,4,0]],"?":[18,[3,16,3,17,4,19,5,20,7,21,11,21,13,20,14,19,15,17,15,15,14,13,13,12,9,10,9,7,-1,-1,9,2,8,1,9,0,10,1,9,2]],"@":[27,[18,13,17,15,15,16,12,16,10,15,9,14,8,11,8,8,9,6,11,5,14,5,16,6,17,8,-1,-1,12,16,10,14,9,11,9,8,10,6,11,5,-1,-1,18,16,17,8,17,6,19,5,21,5,23,7,24,10,24,12,23,15,22,17,20,19,18,20,15,21,12,21,9,20,7,19,5,17,4,15,3,12,3,9,4,6,5,4,7,2,9,1,12,0,15,0,18,1,20,2,21,3,-1,-1,19,16,18,8,18,6,19,5]],A:[18,[9,21,1,0,-1,-1,9,21,17,0,-1,-1,4,7,14,7]],B:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,-1,-1,4,11,13,11,16,10,17,9,18,7,18,4,17,2,16,1,13,0,4,0]],C:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5]],D:[21,[4,21,4,0,-1,-1,4,21,11,21,14,20,16,18,17,16,18,13,18,8,17,5,16,3,14,1,11,0,4,0]],E:[19,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11,-1,-1,4,0,17,0]],F:[18,[4,21,4,0,-1,-1,4,21,17,21,-1,-1,4,11,12,11]],G:[21,[18,16,17,18,15,20,13,21,9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,18,8,-1,-1,13,8,18,8]],H:[22,[4,21,4,0,-1,-1,18,21,18,0,-1,-1,4,11,18,11]],I:[8,[4,21,4,0]],J:[16,[12,21,12,5,11,2,10,1,8,0,6,0,4,1,3,2,2,5,2,7]],K:[21,[4,21,4,0,-1,-1,18,21,4,7,-1,-1,9,12,18,0]],L:[17,[4,21,4,0,-1,-1,4,0,16,0]],M:[24,[4,21,4,0,-1,-1,4,21,12,0,-1,-1,20,21,12,0,-1,-1,20,21,20,0]],N:[22,[4,21,4,0,-1,-1,4,21,18,0,-1,-1,18,21,18,0]],O:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21]],P:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,14,17,12,16,11,13,10,4,10]],Q:[22,[9,21,7,20,5,18,4,16,3,13,3,8,4,5,5,3,7,1,9,0,13,0,15,1,17,3,18,5,19,8,19,13,18,16,17,18,15,20,13,21,9,21,-1,-1,12,4,18,-2]],R:[21,[4,21,4,0,-1,-1,4,21,13,21,16,20,17,19,18,17,18,15,17,13,16,12,13,11,4,11,-1,-1,11,11,18,0]],S:[20,[17,18,15,20,12,21,8,21,5,20,3,18,3,16,4,14,5,13,7,12,13,10,15,9,16,8,17,6,17,3,15,1,12,0,8,0,5,1,3,3]],T:[16,[8,21,8,0,-1,-1,1,21,15,21]],U:[22,[4,21,4,6,5,3,7,1,10,0,12,0,15,1,17,3,18,6,18,21]],V:[18,[1,21,9,0,-1,-1,17,21,9,0]],W:[24,[2,21,7,0,-1,-1,12,21,7,0,-1,-1,12,21,17,0,-1,-1,22,21,17,0]],X:[20,[3,21,17,0,-1,-1,17,21,3,0]],Y:[18,[1,21,9,11,9,0,-1,-1,17,21,9,11]],Z:[20,[17,21,3,0,-1,-1,3,21,17,21,-1,-1,3,0,17,0]],"[":[14,[4,25,4,-7,-1,-1,5,25,5,-7,-1,-1,4,25,11,25,-1,-1,4,-7,11,-7]],"\\":[14,[0,21,14,-3]],"]":[14,[9,25,9,-7,-1,-1,10,25,10,-7,-1,-1,3,25,10,25,-1,-1,3,-7,10,-7]],"^":[16,[6,15,8,18,10,15,-1,-1,3,12,8,17,13,12,-1,-1,8,17,8,0]],_:[16,[0,-2,16,-2]],"`":[10,[6,21,5,20,4,18,4,16,5,15,6,16,5,17]],a:[19,[15,14,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],b:[19,[4,21,4,0,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],c:[18,[15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],d:[19,[15,21,15,0,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],e:[18,[3,8,15,8,15,10,14,12,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],f:[12,[10,21,8,21,6,20,5,17,5,0,-1,-1,2,14,9,14]],g:[19,[15,14,15,-2,14,-5,13,-6,11,-7,8,-7,6,-6,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],h:[19,[4,21,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],i:[8,[3,21,4,20,5,21,4,22,3,21,-1,-1,4,14,4,0]],j:[10,[5,21,6,20,7,21,6,22,5,21,-1,-1,6,14,6,-3,5,-6,3,-7,1,-7]],k:[17,[4,21,4,0,-1,-1,14,14,4,4,-1,-1,8,8,15,0]],l:[8,[4,21,4,0]],m:[30,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0,-1,-1,15,10,18,13,20,14,23,14,25,13,26,10,26,0]],n:[19,[4,14,4,0,-1,-1,4,10,7,13,9,14,12,14,14,13,15,10,15,0]],o:[19,[8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3,16,6,16,8,15,11,13,13,11,14,8,14]],p:[19,[4,14,4,-7,-1,-1,4,11,6,13,8,14,11,14,13,13,15,11,16,8,16,6,15,3,13,1,11,0,8,0,6,1,4,3]],q:[19,[15,14,15,-7,-1,-1,15,11,13,13,11,14,8,14,6,13,4,11,3,8,3,6,4,3,6,1,8,0,11,0,13,1,15,3]],r:[13,[4,14,4,0,-1,-1,4,8,5,11,7,13,9,14,12,14]],s:[17,[14,11,13,13,10,14,7,14,4,13,3,11,4,9,6,8,11,7,13,6,14,4,14,3,13,1,10,0,7,0,4,1,3,3]],t:[12,[5,21,5,4,6,1,8,0,10,0,-1,-1,2,14,9,14]],u:[19,[4,14,4,4,5,1,7,0,10,0,12,1,15,4,-1,-1,15,14,15,0]],v:[16,[2,14,8,0,-1,-1,14,14,8,0]],w:[22,[3,14,7,0,-1,-1,11,14,7,0,-1,-1,11,14,15,0,-1,-1,19,14,15,0]],x:[17,[3,14,14,0,-1,-1,14,14,3,0]],y:[16,[2,14,8,0,-1,-1,14,14,8,0,6,-4,4,-6,2,-7,1,-7]],z:[17,[14,14,3,0,-1,-1,3,14,14,14,-1,-1,3,0,14,0]],"{":[14,[9,25,7,24,6,23,5,21,5,19,6,17,7,16,8,14,8,12,6,10,-1,-1,7,24,6,22,6,20,7,18,8,17,9,15,9,13,8,11,4,9,8,7,9,5,9,3,8,1,7,0,6,-2,6,-4,7,-6,-1,-1,6,8,8,6,8,4,7,2,6,1,5,-1,5,-3,6,-5,7,-6,9,-7]],"|":[8,[4,25,4,-7]],"}":[14,[5,25,7,24,8,23,9,21,9,19,8,17,7,16,6,14,6,12,8,10,-1,-1,7,24,8,22,8,20,7,18,6,17,5,15,5,13,6,11,10,9,6,7,5,5,5,3,6,1,7,0,8,-2,8,-4,7,-6,-1,-1,8,8,6,6,6,4,7,2,8,1,9,-1,9,-3,8,-5,7,-6,5,-7]],"~":[24,[3,6,3,8,4,11,6,12,8,12,10,11,14,8,16,7,18,7,20,8,21,10,-1,-1,3,8,4,10,6,11,8,11,10,10,14,7,16,6,18,6,20,7,21,10,21,12]]},ei={symbol:function(t,e,r,i){if("translucent"===t.renderPass){var n=wt.disabled,o=t.colorModeForRenderPass();0!==r.paint.get("icon-opacity").constantOr(1)&&Gr(t,e,r,i,!1,r.paint.get("icon-translate"),r.paint.get("icon-translate-anchor"),r.layout.get("icon-rotation-alignment"),r.layout.get("icon-pitch-alignment"),r.layout.get("icon-keep-upright"),n,o),0!==r.paint.get("text-opacity").constantOr(1)&&Gr(t,e,r,i,!0,r.paint.get("text-translate"),r.paint.get("text-translate-anchor"),r.layout.get("text-rotation-alignment"),r.layout.get("text-pitch-alignment"),r.layout.get("text-keep-upright"),n,o),e.map.showCollisionBoxes&&function(t,e,r,i){jr(t,e,r,i,!1),jr(t,e,r,i,!0)}(t,e,r,i)}},circle:function(t,e,r,i){if("translucent"===t.renderPass){var n=r.paint.get("circle-opacity"),o=r.paint.get("circle-stroke-width"),a=r.paint.get("circle-stroke-opacity");if(0!==n.constantOr(1)||0!==o.constantOr(1)&&0!==a.constantOr(1))for(var s=t.context,u=s.gl,l=t.depthModeForSublayer(0,bt.ReadOnly),p=wt.disabled,c=t.colorModeForRenderPass(),h=0;h<i.length;h++){var f=i[h],d=e.getTile(f),m=d.getBucket(r);if(m){var y=m.programConfigurations.get(r.id);t.useProgram("circle",y).draw(s,u.TRIANGLES,l,p,c,St.disabled,vr(t,f,d,r),r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,r.paint,t.transform.zoom,y)}}}},heatmap:function(e,r,i,n){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=e.depthModeForSublayer(0,bt.ReadOnly),u=wt.disabled,l=new Et([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,r){var i=t.gl;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var n=r.heatmapFbo;if(n)i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),t.bindFramebuffer.set(n.framebuffer);else{var o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),n=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4),function t(e,r,i,n){var o=e.gl;o.texImage2D(o.TEXTURE_2D,0,o.RGBA,r.width/4,r.height/4,0,o.RGBA,e.extTextureHalfFloat?e.extTextureHalfFloat.HALF_FLOAT_OES:o.UNSIGNED_BYTE,null),n.colorAttachment.set(i),e.extTextureHalfFloat&&o.checkFramebufferStatus(o.FRAMEBUFFER)!==o.FRAMEBUFFER_COMPLETE&&(e.extTextureHalfFloat=null,n.colorAttachment.setDirty(),t(e,r,i,n))}(t,e,o,n)}}(o,e,i),o.clear({color:t.Color.transparent});for(var p=0;p<n.length;p++){var c=n[p];if(!r.hasRenderableParent(c)){var h=r.getTile(c),f=h.getBucket(i);if(f){var d=f.programConfigurations.get(i.id),m=e.useProgram("heatmap",d),y=e.transform.zoom;m.draw(o,a.TRIANGLES,s,u,l,St.disabled,Er(c.posMatrix,h,y,i.paint.get("heatmap-intensity")),i.id,f.layoutVertexBuffer,f.indexBuffer,f.segments,i.paint,e.transform.zoom,d)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var i=e.context,n=i.gl,o=r.heatmapFbo;if(o){i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),i.activeTexture.set(n.TEXTURE1);var a=r.colorRampTexture;a||(a=r.colorRampTexture=new t.Texture(i,r.colorRamp,n.RGBA)),a.bind(n.LINEAR,n.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(i,n.TRIANGLES,bt.disabled,wt.disabled,e.colorModeForRenderPass(),St.disabled,function(e,r,i,n){var o=t.create$1();t.ortho(o,0,e.width,e.height,0,0,1);var a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:i,u_color_ramp:n,u_opacity:r.paint.get("heatmap-opacity")}}(e,r,0,1),r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom)}}(e,i))},line:function(e,r,i,n){if("translucent"===e.renderPass){var o=i.paint.get("line-opacity"),a=i.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,bt.ReadOnly),u=e.colorModeForRenderPass(),l=i.paint.get("line-dasharray"),p=i.paint.get("line-pattern"),c=p.constantOr(1),h=i.paint.get("line-gradient"),f=i.getCrossfadeParameters(),d=l?"lineSDF":c?"linePattern":h?"lineGradient":"line",m=e.context,y=m.gl,_=!0;if(h){m.activeTexture.set(y.TEXTURE0);var v=i.gradientTexture;if(!i.gradient)return;v||(v=i.gradientTexture=new t.Texture(m,i.gradient,y.RGBA)),v.bind(y.LINEAR,y.CLAMP_TO_EDGE)}for(var g=0,x=n;g<x.length;g+=1){var b=x[g],w=r.getTile(b);if(!c||w.patternsLoaded()){var E=w.getBucket(i);if(E){var S=E.programConfigurations.get(i.id),T=e.context.program.get(),A=e.useProgram(d,S),z=_||A.program!==T,I=p.constantOr(null);if(I&&w.imageAtlas){var C=w.imageAtlas.patternPositions[I.to],k=w.imageAtlas.patternPositions[I.from];C&&k&&S.setConstantPatternPositions(C,k)}var P=l?kr(e,w,i,l,f):c?Cr(e,w,i,f):h?Ir(e,w,i):zr(e,w,i);l&&(z||e.lineAtlas.dirty)?(m.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(m)):c&&(m.activeTexture.set(y.TEXTURE0),w.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),S.updatePatternPaintBuffers(f)),A.draw(m,y.TRIANGLES,s,e.stencilModeForClipping(b),u,St.disabled,P,i.id,E.layoutVertexBuffer,E.indexBuffer,E.segments,i.paint,e.transform.zoom,S),_=!1}}}}}},fill:function(e,r,i,n){var o=i.paint.get("fill-color"),a=i.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),u=i.paint.get("fill-pattern").constantOr(1)||1!==o.constantOr(t.Color.transparent).a||1!==a.constantOr(0)?"translucent":"opaque";if(e.renderPass===u){var l=e.depthModeForSublayer(1,"opaque"===e.renderPass?bt.ReadWrite:bt.ReadOnly);Wr(e,r,i,n,l,s,!1)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var p=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,bt.ReadOnly);Wr(e,r,i,n,p,s,!0)}}},"fill-extrusion":function(t,e,r,i){if(0!==r.paint.get("fill-extrusion-opacity"))if("offscreen"===t.renderPass){Kr(t,r);var n=new bt(t.context.gl.LEQUAL,bt.ReadWrite,[0,1]),o=wt.disabled,a=t.colorModeForRenderPass();!function(t,e,r,i,n,o,a){for(var s=t.context,u=s.gl,l=r.paint.get("fill-extrusion-pattern"),p=l.constantOr(1),c=r.getCrossfadeParameters(),h=0,f=i;h<f.length;h+=1){var d=f[h],m=e.getTile(d),y=m.getBucket(r);if(y){var _=y.programConfigurations.get(r.id),v=t.useProgram(p?"fillExtrusionPattern":"fillExtrusion",_);p&&(t.context.activeTexture.set(u.TEXTURE0),m.imageAtlasTexture.bind(u.LINEAR,u.CLAMP_TO_EDGE),_.updatePatternPaintBuffers(c));var g=l.constantOr(null);if(g&&m.imageAtlas){var x=m.imageAtlas.patternPositions[g.to],b=m.imageAtlas.patternPositions[g.from];x&&b&&_.setConstantPatternPositions(x,b)}var w=t.translatePosMatrix(d.posMatrix,m,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),E=r.paint.get("fill-extrusion-vertical-gradient"),S=p?hr(w,t,E,d,c,m):cr(w,t,E);v.draw(s,s.gl.TRIANGLES,n,o,a,St.backCCW,S,r.id,y.layoutVertexBuffer,y.indexBuffer,y.segments,r.paint,t.transform.zoom,_)}}}(t,e,r,i,n,o,a)}else"translucent"===t.renderPass&&Hr(t,r,r.paint.get("fill-extrusion-opacity"))},hillshade:function(t,e,r,i){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var n=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,bt.ReadOnly),s=wt.disabled,u=t.colorModeForRenderPass(),l=0,p=i;l<p.length;l+=1){var c=p[l],h=e.getTile(c);h.needsHillshadePrepare&&"offscreen"===t.renderPass?Jr(t,h,r,o,a,s,u):"translucent"===t.renderPass&&Yr(t,h,r,a,s,u)}n.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,i){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity"))for(var n=t.context,o=n.gl,a=e.getSource(),s=t.useProgram("raster"),u=wt.disabled,l=t.colorModeForRenderPass(),p=i.length&&i[0].overscaledZ,c=!t.options.moving,h=0,f=i;h<f.length;h+=1){var d=f[h],m=t.depthModeForSublayer(d.overscaledZ-p,1===r.paint.get("raster-opacity")?bt.ReadWrite:bt.ReadOnly,o.LESS),y=e.getTile(d),_=t.transform.calculatePosMatrix(d.toUnwrapped(),c);y.registerFadeDuration(r.paint.get("raster-fade-duration"));var v=e.findLoadedParent(d,0),g=$r(y,v,e,r,t.transform),x=void 0,b=void 0,w="nearest"===r.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;n.activeTexture.set(o.TEXTURE0),y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.activeTexture.set(o.TEXTURE1),v?(v.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),x=Math.pow(2,v.tileID.overscaledZ-y.tileID.overscaledZ),b=[y.tileID.canonical.x*x%1,y.tileID.canonical.y*x%1]):y.texture.bind(w,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var E=Lr(_,b||[0,0],x||1,g,r);a instanceof C?s.draw(n,o.TRIANGLES,m,u,l,St.disabled,E,r.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):y.maskedBoundsBuffer&&y.maskedIndexBuffer&&y.segments?s.draw(n,o.TRIANGLES,m,u,l,St.disabled,E,r.id,y.maskedBoundsBuffer,y.maskedIndexBuffer,y.segments,r.paint,t.transform.zoom):s.draw(n,o.TRIANGLES,m,u,l,St.disabled,E,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,r){var i=r.paint.get("background-color"),n=r.paint.get("background-opacity");if(0!==n){var o=t.context,a=o.gl,s=t.transform,u=s.tileSize,l=r.paint.get("background-pattern");if(!t.isPatternMissing(l)){var p=l||1!==i.a||1!==n?"translucent":"opaque";if(t.renderPass===p){var c=wt.disabled,h=t.depthModeForSublayer(0,"opaque"===p?bt.ReadWrite:bt.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(l?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:u});l&&(o.activeTexture.set(a.TEXTURE0),t.imageManager.bind(t.context));for(var y=r.getCrossfadeParameters(),_=0,v=m;_<v.length;_+=1){var g=v[_],x=t.transform.calculatePosMatrix(g.toUnwrapped()),b=l?Or(x,n,t,l,{tileID:g,tileSize:u},y):Fr(x,n,i);d.draw(o,a.TRIANGLES,h,c,f,St.disabled,b,r.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,r){for(var i=0;i<r.length;i++)Qr(t,e,r[i])},custom:function(t,e,r){var i=t.context,n=r.implementation;if("offscreen"===t.renderPass){var o=n.prerender;o&&(t.setCustomLayerDefaults(),o.call(n,i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState()),"3d"===n.renderingMode&&(t.setCustomLayerDefaults(),Kr(t,r),n.render(i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass)if("3d"===n.renderingMode)Hr(t,r,1);else{t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),i.setStencilMode(wt.disabled);var a=t.depthModeForSublayer(0,bt.ReadOnly);i.setDepthMode(a),n.render(i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState(),i.bindFramebuffer.set(null)}}},ri=function(e,r){this.context=new Tt(e),this.transform=r,this._tileTextures={},this.setup(),this.numSublayers=At.maxUnderzooming+At.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.depthRboNeedsClear=!0,this.emptyProgramConfiguration=new t.ProgramConfiguration,this.crossTileSymbolIndex=new Ie};function ii(t,e){if(t.y>e.y){var r=t;t=e,e=r}return{x0:t.x,y0:t.y,x1:e.x,y1:e.y,dx:e.x-t.x,dy:e.y-t.y}}function ni(t,e,r,i,n){var o=Math.max(r,Math.floor(e.y0)),a=Math.min(i,Math.ceil(e.y1));if(t.x0===e.x0&&t.y0===e.y0?t.x0+e.dy/t.dy*t.dx<e.x1:t.x1-e.dy/t.dy*t.dx<e.x0){var s=t;t=e,e=s}for(var u=t.dx/t.dy,l=e.dx/e.dy,p=t.dx>0,c=e.dx<0,h=o;h<a;h++){var f=u*Math.max(0,Math.min(t.dy,h+p-t.y0))+t.x0,d=l*Math.max(0,Math.min(e.dy,h+c-e.y0))+e.x0;n(Math.floor(d),Math.ceil(f),h)}}function oi(t,e,r,i,n,o){var a,s=ii(t,e),u=ii(e,r),l=ii(r,t);s.dy>u.dy&&(a=s,s=u,u=a),s.dy>l.dy&&(a=s,s=l,l=a),u.dy>l.dy&&(a=u,u=l,l=a),s.dy&&ni(l,s,i,n,o),u.dy&&ni(l,u,i,n,o)}ri.prototype.resize=function(e,r){var i=this.context.gl;if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var n=0,o=this.style._order;n<o.length;n+=1){var a=o[n];this.style._layers[a].resize()}this.depthRbo&&(i.deleteRenderbuffer(this.depthRbo),this.depthRbo=null)},ri.prototype.setup=function(){var e=this.context,r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(r,Le.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var i=new t.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(t.EXTENT,0),i.emplaceBack(0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(i,Le.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var n=new t.StructArrayLayout4i8;n.emplaceBack(0,0,0,0),n.emplaceBack(t.EXTENT,0,t.EXTENT,0),n.emplaceBack(0,t.EXTENT,0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(n,t.rasterBoundsAttributes.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Le.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);var u=this.context.gl;this.stencilClearMode=new wt({func:u.ALWAYS,mask:0},0,255,u.ZERO,u.ZERO,u.ZERO)},ri.prototype.clearStencil=function(){var e=this.context,r=e.gl,i=t.create$1();t.ortho(i,0,this.width,this.height,0,0,1),t.scale(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,bt.disabled,this.stencilClearMode,Et.disabled,St.disabled,wr(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},ri.prototype._renderTileClippingMasks=function(t){var e=this.context,r=e.gl;e.setColorMode(Et.disabled),e.setDepthMode(bt.disabled);var i=this.useProgram("clippingMask"),n=1;this._tileClippingMaskIDs={};for(var o=0,a=t;o<a.length;o+=1){var s=a[o],u=this._tileClippingMaskIDs[s.key]=n++;i.draw(e,r.TRIANGLES,bt.disabled,new wt({func:r.ALWAYS,mask:0},u,255,r.KEEP,r.KEEP,r.REPLACE),Et.disabled,St.disabled,wr(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}},ri.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new wt({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},ri.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new Et([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?Et.unblended:Et.alphaBlended},ri.prototype.depthModeForSublayer=function(t,e,r){var i=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new bt(r||this.context.gl.LEQUAL,e,[i,i])},ri.prototype.render=function(e,r){this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now());var i=this.style._order,n=this.style.sourceCaches;for(var o in n){var a=n[o];a.used&&a.prepare(this.context)}var s,u={},l={},p={};for(var c in n){var h=n[c];u[c]=h.getVisibleCoordinates(),l[c]=u[c].slice().reverse(),p[c]=h.getVisibleCoordinates(!0).reverse()}for(var f in n){var d=n[f],m=d.getSource();if("raster"===m.type||"raster-dem"===m.type){for(var y=[],_=0,v=u[f];_<v.length;_+=1){var g=v[_];y.push(d.getTile(g))}Vr(y,this.context)}}this.renderPass="offscreen",this.depthRboNeedsClear=!0;for(var x=0,b=i;x<b.length;x+=1){var w=b[x],E=this.style._layers[w];if(E.hasOffscreenPass()&&!E.isHidden(this.transform.zoom)){var S=l[E.source];("custom"===E.type||S.length)&&this.renderLayer(this,n[E.source],E,S)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRange=(e._order.length+2)*this.numSublayers*this.depthEpsilon,this.renderPass="opaque",this.currentLayer=i.length-1;this.currentLayer>=0;this.currentLayer--){var T=this.style._layers[i[this.currentLayer]],A=n[T.source],z=u[T.source];T.source!==s&&A&&(this.clearStencil(),A.getSource().isTileClipped&&this._renderTileClippingMasks(z)),this.renderLayer(this,A,T,z),s=T.source}for(this.renderPass="translucent",this.currentLayer=0,s=null;this.currentLayer<i.length;this.currentLayer++){var I=this.style._layers[i[this.currentLayer]],C=n[I.source],k=("symbol"===I.type?p:l)[I.source];I.source!==s&&C&&(this.clearStencil(),C.getSource().isTileClipped&&this._renderTileClippingMasks(u[I.source])),this.renderLayer(this,C,I,k),s=I.source}if(this.options.showTileBoundaries)for(var P in n){ei.debug(this,n[P],u[P]);break}this.setCustomLayerDefaults()},ri.prototype.setupOffscreenDepthRenderbuffer=function(){var t=this.context;this.depthRbo||(this.depthRbo=t.createRenderbuffer(t.gl.DEPTH_COMPONENT16,this.width,this.height))},ri.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||i.length)&&(this.id=r.id,ei[r.type](t,e,r,i))},ri.prototype.translatePosMatrix=function(e,r,i,n,o){if(!i[0]&&!i[1])return e;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),u=Math.cos(a);i=[i[0]*u-i[1]*s,i[0]*s+i[1]*u]}var l=[o?i[0]:ae(r,i[0],this.transform.zoom),o?i[1]:ae(r,i[1],this.transform.zoom),0],p=new Float32Array(16);return t.translate(p,e,l),p},ri.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},ri.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},ri.prototype.isPatternMissing=function(t){if(!t)return!1;var e=this.imageManager.getPattern(t.from),r=this.imageManager.getPattern(t.to);return!e||!r},ri.prototype.useProgram=function(t,e){void 0===e&&(e=this.emptyProgramConfiguration),this.cache=this.cache||{};var r=""+t+(e.cacheKey||"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new lr(this.context,sr[t],e,Ur[t],this._showOverdrawInspector)),this.cache[r]},ri.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},ri.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)};var ai=function(e,r,i){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===i||i,this._minZoom=e||0,this._maxZoom=r||22,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._posMatrixCache={},this._alignedPosMatrixCache={}},si={minZoom:{configurable:!0},maxZoom:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerPoint:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};ai.prototype.clone=function(){var t=new ai(this._minZoom,this._maxZoom,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._calcMatrices(),t},si.minZoom.get=function(){return this._minZoom},si.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},si.maxZoom.get=function(){return this._maxZoom},si.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},si.renderWorldCopies.get=function(){return this._renderWorldCopies},si.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},si.worldSize.get=function(){return this.tileSize*this.scale},si.centerPoint.get=function(){return this.size._div(2)},si.size.get=function(){return new t.Point(this.width,this.height)},si.bearing.get=function(){return-this.angle/Math.PI*180},si.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},si.pitch.get=function(){return this._pitch/Math.PI*180},si.pitch.set=function(e){var r=t.clamp(e,0,60)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},si.fov.get=function(){return this._fov/Math.PI*180},si.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},si.zoom.get=function(){return this._zoom},si.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},si.center.get=function(){return this._center},si.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},ai.prototype.coveringZoomLevel=function(t){return(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize))},ai.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new t.Point(0,0)),n=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(i.x,n.x,o.x,a.x)),u=Math.floor(Math.max(i.x,n.x,o.x,a.x)),l=s-1;l<=u+1;l++)0!==l&&r.push(new t.UnwrappedTileID(l,e));return r},ai.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),i=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var n=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=new t.Point(o*n.x-.5,o*n.y-.5);return function(e,r,i,n){void 0===n&&(n=!0);var o=1<<e,a={};function s(r,s,u){var l,p,c,h;if(u>=0&&u<=o)for(l=r;l<s;l++)p=Math.floor(l/o),c=(l%o+o)%o,0!==p&&!0!==n||(h=new t.OverscaledTileID(i,p,e,c,u),a[h.key]=h)}var u=r.map(function(e){return new t.Point(e.x,e.y)._mult(o)});return oi(u[0],u[1],u[2],0,o,s),oi(u[2],u[3],u[0],0,o,s),Object.keys(a).map(function(t){return a[t]})}(r,[this.pointCoordinate(new t.Point(0,0)),this.pointCoordinate(new t.Point(this.width,0)),this.pointCoordinate(new t.Point(this.width,this.height)),this.pointCoordinate(new t.Point(0,this.height))],e.reparseOverscaled?i:r,this._renderWorldCopies).sort(function(t,e){return a.dist(t.canonical)-a.dist(e.canonical)})},ai.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},si.unmodified.get=function(){return this._unmodified},ai.prototype.zoomScale=function(t){return Math.pow(2,t)},ai.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},ai.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},ai.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},si.point.get=function(){return this.project(this.center)},ai.prototype.setLocationAtPoint=function(e,r){var i=this.pointCoordinate(r),n=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(i.x-n.x),o.y-(i.y-n.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},ai.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},ai.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},ai.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},ai.prototype.coordinateLocation=function(t){return t.toLngLat()},ai.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(i,i,this.pixelMatrixInverse);var n=r[3],o=i[3],a=r[0]/n,s=i[0]/o,u=r[1]/n,l=i[1]/o,p=r[2]/n,c=i[2]/o,h=p===c?0:(0-p)/(c-p);return new t.MercatorCoordinate(t.number(a,s,h)/this.worldSize,t.number(u,l,h)/this.worldSize)},ai.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},ai.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},ai.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},ai.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},ai.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var i=e.key,n=r?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,u=t.identity(new Float64Array(16));return t.translate(u,u,[s*a,o.y*a,0]),t.scale(u,u,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(u,r?this.alignedProjMatrix:this.projMatrix,u),n[i]=new Float32Array(u),n[i]},ai.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},ai.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,i,n,o=-90,a=90,s=-180,u=180,l=this.size,p=this._unmodified;if(this.latRange){var c=this.latRange;o=t.mercatorYfromLat(c[1])*this.worldSize,e=(a=t.mercatorYfromLat(c[0])*this.worldSize)-o<l.y?l.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,r=(u=t.mercatorXfromLng(h[1])*this.worldSize)-s<l.x?l.x/(u-s):0}var f=this.point,d=Math.max(r||0,e||0);if(d)return this.center=this.unproject(new t.Point(r?(u+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=p,void(this._constraining=!1);if(this.latRange){var m=f.y,y=l.y/2;m-y<o&&(n=o+y),m+y>a&&(n=a-y)}if(this.lngRange){var _=f.x,v=l.x/2;_-v<s&&(i=s+v),_+v>u&&(i=u-v)}void 0===i&&void 0===n||(this.center=this.unproject(new t.Point(void 0!==i?i:f.x,void 0!==n?n:f.y))),this._unmodified=p,this._constraining=!1}},ai.prototype._calcMatrices=function(){if(this.height){this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var e=this._fov/2,r=Math.PI/2+this._pitch,i=Math.sin(e)*this.cameraToCenterDistance/Math.sin(Math.PI-r-e),n=this.point,o=n.x,a=n.y,s=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),u=new Float64Array(16);t.perspective(u,this._fov,this.width/this.height,1,s),t.scale(u,u,[1,-1,1]),t.translate(u,u,[0,0,-this.cameraToCenterDistance]),t.rotateX(u,u,this._pitch),t.rotateZ(u,u,this.angle),t.translate(u,u,[-o,-a,0]),this.mercatorMatrix=t.scale([],u,[this.worldSize,this.worldSize,this.worldSize]),t.scale(u,u,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=u;var l=this.width%2/2,p=this.height%2/2,c=Math.cos(this.angle),h=Math.sin(this.angle),f=o-Math.round(o)+c*l+h*p,d=a-Math.round(a)+c*p+h*l,m=new Float64Array(u);if(t.translate(m,m,[f>.5?f-1:f,d>.5?d-1:d,0]),this.alignedProjMatrix=m,u=t.create$1(),t.scale(u,u,[this.width/2,-this.height/2,1]),t.translate(u,u,[1,-1,0]),this.pixelMatrix=t.multiply(new Float64Array(16),u,this.projMatrix),!(u=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=u,this._posMatrixCache={},this._alignedPosMatrixCache={}}},ai.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},ai.prototype.getCameraPoint=function(){var e=this._pitch,r=Math.tan(e)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,r))},ai.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var i=r.x,n=r.y,o=r.x,a=r.y,s=0,u=e;s<u.length;s+=1){var l=u[s];i=Math.min(i,l.x),n=Math.min(n,l.y),o=Math.max(o,l.x),a=Math.max(a,l.y)}return[new t.Point(i,n),new t.Point(o,n),new t.Point(o,a),new t.Point(i,a),new t.Point(i,n)]},Object.defineProperties(ai.prototype,si);var ui=function(){var e,r,i,n;t.bindAll(["_onHashChange","_updateHash"],this),this._updateHash=(e=this._updateHashUnthrottled.bind(this),r=!1,i=0,n=function(){i=0,r&&(e(),i=setTimeout(n,300),r=!1)},function(){return r=!0,i||n(),i})};ui.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},ui.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},ui.prototype.getHashString=function(t){var e=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10),n=Math.pow(10,i),o=Math.round(e.lng*n)/n,a=Math.round(e.lat*n)/n,s=this._map.getBearing(),u=this._map.getPitch(),l="";return l+=t?"#/"+o+"/"+a+"/"+r:"#"+r+"/"+a+"/"+o,(s||u)&&(l+="/"+Math.round(10*s)/10),u&&(l+="/"+Math.round(u)),l},ui.prototype._onHashChange=function(){var e=t.window.location.hash.replace("#","").split("/");return e.length>=3&&(this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:+(e[3]||0),pitch:+(e[4]||0)}),!0)},ui.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var li=function(e){function i(i,n,o,a){void 0===a&&(a={});var s=r.mousePos(n.getCanvasContainer(),o),u=n.unproject(s);e.call(this,i,t.extend({point:s,lngLat:u,originalEvent:o},a)),this._defaultPrevented=!1,this.target=n}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),pi=function(e){function i(i,n,o){var a=r.touchPos(n.getCanvasContainer(),o),s=a.map(function(t){return n.unproject(t)}),u=a.reduce(function(t,e,r,i){return t.add(e.div(i.length))},new t.Point(0,0)),l=n.unproject(u);e.call(this,i,{points:a,point:u,lngLats:s,lngLat:l,originalEvent:o}),this._defaultPrevented=!1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),ci=function(t){function e(e,r,i){t.call(this,e,{originalEvent:i}),this._defaultPrevented=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),hi=function(e){this._map=e,this._el=e.getCanvasContainer(),this._delta=0,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};hi.prototype.isEnabled=function(){return!!this._enabled},hi.prototype.isActive=function(){return!!this._active},hi.prototype.isZooming=function(){return!!this._zooming},hi.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},hi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},hi.prototype.onWheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=t.browser.now(),n=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this.isActive()||this._start(e)),e.preventDefault()}},hi.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this.isActive()||this._start(t)},hi.prototype._start=function(e){if(this._delta){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),this._active=!0,this._zooming=!0,this._map.fire(new t.Event("movestart",{originalEvent:e})),this._map.fire(new t.Event("zoomstart",{originalEvent:e})),this._finishTimeout&&clearTimeout(this._finishTimeout);var i=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame))}},hi.prototype._onScrollFrame=function(){var e=this;if(this._frameId=null,this.isActive()){var r=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?1/450:.01,n=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==n&&(n=1/n);var o="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*n))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a="number"==typeof this._targetZoom?this._targetZoom:r.zoom,s=this._startZoom,u=this._easing,l=!1;if("wheel"===this._type&&s&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),c=u(p);r.zoom=t.number(s,a,c),p<1?this._frameId||(this._frameId=this._map._requestRenderFrame(this._onScrollFrame)):l=!0}else r.zoom=a,l=!0;r.setLocationAtPoint(this._around,this._aroundPoint),this._map.fire(new t.Event("move",{originalEvent:this._lastWheelEvent})),this._map.fire(new t.Event("zoom",{originalEvent:this._lastWheelEvent})),l&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._map.fire(new t.Event("zoomend",{originalEvent:e._lastWheelEvent})),e._map.fire(new t.Event("moveend",{originalEvent:e._lastWheelEvent})),delete e._targetZoom},200))}},hi.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var i=this._prevEase,n=(t.browser.now()-i.start)/i.duration,o=i.easing(n+.01)-i.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r};var fi=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMouseMove","_onMouseUp","_onKeyDown"],this)};fi.prototype.isEnabled=function(){return!!this._enabled},fi.prototype.isActive=function(){return!!this._active},fi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},fi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},fi.prototype.onMouseDown=function(e){this.isEnabled()&&e.shiftKey&&0===e.button&&(t.window.document.addEventListener("mousemove",this._onMouseMove,!1),t.window.document.addEventListener("keydown",this._onKeyDown,!1),t.window.document.addEventListener("mouseup",this._onMouseUp,!1),r.disableDrag(),this._startPos=this._lastPos=r.mousePos(this._el,e),this._active=!0)},fi.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);if(!(this._lastPos.equals(e)||!this._box&&e.dist(this._startPos)<this._clickTolerance)){var i=this._startPos;this._lastPos=e,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var n=Math.min(i.x,e.x),o=Math.max(i.x,e.x),a=Math.min(i.y,e.y),s=Math.max(i.y,e.y);r.setTransform(this._box,"translate("+n+"px,"+a+"px)"),this._box.style.width=o-n+"px",this._box.style.height=s-a+"px"}},fi.prototype._onMouseUp=function(e){if(0===e.button){var i=this._startPos,n=r.mousePos(this._el,e);this._finish(),r.suppressClick(),i.x===n.x&&i.y===n.y?this._fireEvent("boxzoomcancel",e):this._map.fitScreenCoordinates(i,n,this._map.getBearing(),{linear:!0}).fire(new t.Event("boxzoomend",{originalEvent:e}))}},fi.prototype._onKeyDown=function(t){27===t.keyCode&&(this._finish(),this._fireEvent("boxzoomcancel",t))},fi.prototype._finish=function(){this._active=!1,t.window.document.removeEventListener("mousemove",this._onMouseMove,!1),t.window.document.removeEventListener("keydown",this._onKeyDown,!1),t.window.document.removeEventListener("mouseup",this._onMouseUp,!1),this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},fi.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var di=t.bezier(0,0,.25,1),mi=function(e,r){this._map=e,this._el=r.element||e.getCanvasContainer(),this._state="disabled",this._button=r.button||"right",this._bearingSnap=r.bearingSnap||0,this._pitchWithRotate=!1!==r.pitchWithRotate,t.bindAll(["onMouseDown","_onMouseMove","_onMouseUp","_onBlur","_onDragFrame"],this)};mi.prototype.isEnabled=function(){return"disabled"!==this._state},mi.prototype.isActive=function(){return"active"===this._state},mi.prototype.enable=function(){this.isEnabled()||(this._state="enabled")},mi.prototype.disable=function(){if(this.isEnabled())switch(this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend"),this._pitchWithRotate&&this._fireEvent("pitchend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},mi.prototype.onMouseDown=function(e){if("enabled"===this._state){if("right"===this._button){if(this._eventButton=r.mouseButton(e),this._eventButton!==(e.ctrlKey?0:2))return}else{if(e.ctrlKey||0!==r.mouseButton(e))return;this._eventButton=0}r.disableDrag(),t.window.document.addEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.addEventListener("mouseup",this._onMouseUp),t.window.addEventListener("blur",this._onBlur),this._state="pending",this._inertia=[[t.browser.now(),this._map.getBearing()]],this._startPos=this._lastPos=r.mousePos(this._el,e),this._center=this._map.transform.centerPoint,e.preventDefault()}},mi.prototype._onMouseMove=function(t){var e=r.mousePos(this._el,t);this._lastPos.equals(e)||(this._lastMoveEvent=t,this._lastPos=e,"pending"===this._state&&(this._state="active",this._fireEvent("rotatestart",t),this._fireEvent("movestart",t),this._pitchWithRotate&&this._fireEvent("pitchstart",t)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},mi.prototype._onDragFrame=function(){this._frameId=null;var e=this._lastMoveEvent;if(e){var r=this._map.transform,i=this._startPos,n=this._lastPos,o=.8*(i.x-n.x),a=-.5*(i.y-n.y),s=r.bearing-o,u=r.pitch-a,l=this._inertia,p=l[l.length-1];this._drainInertiaBuffer(),l.push([t.browser.now(),this._map._normalizeBearing(s,p[1])]),r.bearing=s,this._pitchWithRotate&&(this._fireEvent("pitch",e),r.pitch=u),this._fireEvent("rotate",e),this._fireEvent("move",e),delete this._lastMoveEvent,this._startPos=this._lastPos}},mi.prototype._onMouseUp=function(t){if(r.mouseButton(t)===this._eventButton)switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialRotate(t);break;case"pending":this._state="enabled",this._unbind()}},mi.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("rotateend",t),this._pitchWithRotate&&this._fireEvent("pitchend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},mi.prototype._unbind=function(){t.window.document.removeEventListener("mousemove",this._onMouseMove,{capture:!0}),t.window.document.removeEventListener("mouseup",this._onMouseUp),t.window.removeEventListener("blur",this._onBlur),r.enableDrag()},mi.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._lastPos},mi.prototype._inertialRotate=function(t){var e=this;this._fireEvent("rotateend",t),this._drainInertiaBuffer();var r=this._map,i=r.getBearing(),n=this._inertia,o=function(){Math.abs(i)<e._bearingSnap?r.resetNorth({noMoveStart:!0},{originalEvent:t}):e._fireEvent("moveend",t),e._pitchWithRotate&&e._fireEvent("pitchend",t)};if(n.length<2)o();else{var a=n[0],s=n[n.length-1],u=n[n.length-2],l=r._normalizeBearing(i,u[1]),p=s[1]-a[1],c=p<0?-1:1,h=(s[0]-a[0])/1e3;if(0!==p&&0!==h){var f=Math.abs(p*(.25/h));f>180&&(f=180);var d=f/180;l+=c*f*(d/2),Math.abs(r._normalizeBearing(l,0))<this._bearingSnap&&(l=r._normalizeBearing(0,l)),r.rotateTo(l,{duration:1e3*d,easing:di,noMoveStart:!0},{originalEvent:t})}else o()}},mi.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},mi.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var yi=t.bezier(0,0,.3,1),_i=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._state="disabled",this._clickTolerance=r.clickTolerance||1,t.bindAll(["_onMove","_onMouseUp","_onTouchEnd","_onBlur","_onDragFrame"],this)};_i.prototype.isEnabled=function(){return"disabled"!==this._state},_i.prototype.isActive=function(){return"active"===this._state},_i.prototype.enable=function(){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-drag-pan"),this._state="enabled")},_i.prototype.disable=function(){if(this.isEnabled())switch(this._el.classList.remove("mapboxgl-touch-drag-pan"),this._state){case"active":this._state="disabled",this._unbind(),this._deactivate(),this._fireEvent("dragend"),this._fireEvent("moveend");break;case"pending":this._state="disabled",this._unbind();break;default:this._state="disabled"}},_i.prototype.onMouseDown=function(e){"enabled"===this._state&&(e.ctrlKey||0!==r.mouseButton(e)||(r.addEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.addEventListener(t.window.document,"mouseup",this._onMouseUp),this._start(e)))},_i.prototype.onTouchStart=function(e){"enabled"===this._state&&(e.touches.length>1||(r.addEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.addEventListener(t.window.document,"touchend",this._onTouchEnd),this._start(e)))},_i.prototype._start=function(e){t.window.addEventListener("blur",this._onBlur),this._state="pending",this._startPos=this._mouseDownPos=this._lastPos=r.mousePos(this._el,e),this._inertia=[[t.browser.now(),this._startPos]]},_i.prototype._onMove=function(e){e.preventDefault();var i=r.mousePos(this._el,e);this._lastPos.equals(i)||"pending"===this._state&&i.dist(this._mouseDownPos)<this._clickTolerance||(this._lastMoveEvent=e,this._lastPos=i,this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),this._lastPos]),"pending"===this._state&&(this._state="active",this._fireEvent("dragstart",e),this._fireEvent("movestart",e)),this._frameId||(this._frameId=this._map._requestRenderFrame(this._onDragFrame)))},_i.prototype._onDragFrame=function(){this._frameId=null;var t=this._lastMoveEvent;if(t){var e=this._map.transform;e.setLocationAtPoint(e.pointLocation(this._startPos),this._lastPos),this._fireEvent("drag",t),this._fireEvent("move",t),this._startPos=this._lastPos,delete this._lastMoveEvent}},_i.prototype._onMouseUp=function(t){if(0===r.mouseButton(t))switch(this._state){case"active":this._state="enabled",r.suppressClick(),this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},_i.prototype._onTouchEnd=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._inertialPan(t);break;case"pending":this._state="enabled",this._unbind()}},_i.prototype._onBlur=function(t){switch(this._state){case"active":this._state="enabled",this._unbind(),this._deactivate(),this._fireEvent("dragend",t),this._fireEvent("moveend",t);break;case"pending":this._state="enabled",this._unbind()}},_i.prototype._unbind=function(){r.removeEventListener(t.window.document,"touchmove",this._onMove,{capture:!0,passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onTouchEnd),r.removeEventListener(t.window.document,"mousemove",this._onMove,{capture:!0}),r.removeEventListener(t.window.document,"mouseup",this._onMouseUp),r.removeEventListener(t.window,"blur",this._onBlur)},_i.prototype._deactivate=function(){this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._lastMoveEvent,delete this._startPos,delete this._mouseDownPos,delete this._lastPos},_i.prototype._inertialPan=function(t){this._fireEvent("dragend",t),this._drainInertiaBuffer();var e=this._inertia;if(e.length<2)this._fireEvent("moveend",t);else{var r=e[e.length-1],i=e[0],n=r[1].sub(i[1]),o=(r[0]-i[0])/1e3;if(0===o||r[1].equals(i[1]))this._fireEvent("moveend",t);else{var a=n.mult(.3/o),s=a.mag();s>1400&&(s=1400,a._unit()._mult(s));var u=s/750,l=a.mult(-u/2);this._map.panBy(l,{duration:1e3*u,easing:yi,noMoveStart:!0},{originalEvent:t})}}},_i.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},_i.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>0&&r-e[0][0]>160;)e.shift()};var vi=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onKeyDown"],this)};function gi(t){return t*(2-t)}vi.prototype.isEnabled=function(){return!!this._enabled},vi.prototype.enable=function(){this.isEnabled()||(this._el.addEventListener("keydown",this._onKeyDown,!1),this._enabled=!0)},vi.prototype.disable=function(){this.isEnabled()&&(this._el.removeEventListener("keydown",this._onKeyDown),this._enabled=!1)},vi.prototype._onKeyDown=function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e=0,r=0,i=0,n=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:e=1;break;case 189:case 109:case 173:e=-1;break;case 37:t.shiftKey?r=-1:(t.preventDefault(),n=-1);break;case 39:t.shiftKey?r=1:(t.preventDefault(),n=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(o=1,t.preventDefault());break;default:return}var a=this._map,s=a.getZoom(),u={duration:300,delayEndEvents:500,easing:gi,zoom:e?Math.round(s)+e*(t.shiftKey?2:1):s,bearing:a.getBearing()+15*r,pitch:a.getPitch()+10*i,offset:[100*-n,100*-o],center:a.getCenter()};a.easeTo(u,{originalEvent:t})}};var xi=function(e){this._map=e,t.bindAll(["_onDblClick","_onZoomEnd"],this)};xi.prototype.isEnabled=function(){return!!this._enabled},xi.prototype.isActive=function(){return!!this._active},xi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},xi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},xi.prototype.onTouchStart=function(t){var e=this;this.isEnabled()&&(t.points.length>1||(this._tapped?(clearTimeout(this._tapped),this._tapped=null,this._zoom(t)):this._tapped=setTimeout(function(){e._tapped=null},300)))},xi.prototype.onDblClick=function(t){this.isEnabled()&&(t.originalEvent.preventDefault(),this._zoom(t))},xi.prototype._zoom=function(t){this._active=!0,this._map.on("zoomend",this._onZoomEnd),this._map.zoomTo(this._map.getZoom()+(t.originalEvent.shiftKey?-1:1),{around:t.lngLat},t)},xi.prototype._onZoomEnd=function(){this._active=!1,this._map.off("zoomend",this._onZoomEnd)};var bi=t.bezier(0,0,.15,1),wi=function(e){this._map=e,this._el=e.getCanvasContainer(),t.bindAll(["_onMove","_onEnd","_onTouchFrame"],this)};wi.prototype.isEnabled=function(){return!!this._enabled},wi.prototype.enable=function(t){this.isEnabled()||(this._el.classList.add("mapboxgl-touch-zoom-rotate"),this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around)},wi.prototype.disable=function(){this.isEnabled()&&(this._el.classList.remove("mapboxgl-touch-zoom-rotate"),this._enabled=!1)},wi.prototype.disableRotation=function(){this._rotationDisabled=!0},wi.prototype.enableRotation=function(){this._rotationDisabled=!1},wi.prototype.onStart=function(e){if(this.isEnabled()&&2===e.touches.length){var i=r.mousePos(this._el,e.touches[0]),n=r.mousePos(this._el,e.touches[1]),o=i.add(n).div(2);this._startVec=i.sub(n),this._startAround=this._map.transform.pointLocation(o),this._gestureIntent=void 0,this._inertia=[],r.addEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.addEventListener(t.window.document,"touchend",this._onEnd)}},wi.prototype._getTouchEventData=function(t){var e=r.mousePos(this._el,t.touches[0]),i=r.mousePos(this._el,t.touches[1]),n=e.sub(i);return{vec:n,center:e.add(i).div(2),scale:n.mag()/this._startVec.mag(),bearing:this._rotationDisabled?0:180*n.angleWith(this._startVec)/Math.PI}},wi.prototype._onMove=function(e){if(2===e.touches.length){var r=this._getTouchEventData(e),i=r.vec,n=r.scale,o=r.bearing;if(!this._gestureIntent){var a=this._rotationDisabled&&1!==n||Math.abs(1-n)>.15;Math.abs(o)>10?this._gestureIntent="rotate":a&&(this._gestureIntent="zoom"),this._gestureIntent&&(this._map.fire(new t.Event(this._gestureIntent+"start",{originalEvent:e})),this._map.fire(new t.Event("movestart",{originalEvent:e})),this._startVec=i)}this._lastTouchEvent=e,this._frameId||(this._frameId=this._map._requestRenderFrame(this._onTouchFrame)),e.preventDefault()}},wi.prototype._onTouchFrame=function(){this._frameId=null;var e=this._gestureIntent;if(e){var r=this._map.transform;this._startScale||(this._startScale=r.scale,this._startBearing=r.bearing);var i=this._getTouchEventData(this._lastTouchEvent),n=i.center,o=i.bearing,a=i.scale,s=r.pointLocation(n),u=r.locationPoint(s);"rotate"===e&&(r.bearing=this._startBearing+o),r.zoom=r.scaleZoom(this._startScale*a),r.setLocationAtPoint(this._startAround,u),this._map.fire(new t.Event(e,{originalEvent:this._lastTouchEvent})),this._map.fire(new t.Event("move",{originalEvent:this._lastTouchEvent})),this._drainInertiaBuffer(),this._inertia.push([t.browser.now(),a,n])}},wi.prototype._onEnd=function(e){r.removeEventListener(t.window.document,"touchmove",this._onMove,{passive:!1}),r.removeEventListener(t.window.document,"touchend",this._onEnd);var i=this._gestureIntent,n=this._startScale;if(this._frameId&&(this._map._cancelRenderFrame(this._frameId),this._frameId=null),delete this._gestureIntent,delete this._startScale,delete this._startBearing,delete this._lastTouchEvent,i){this._map.fire(new t.Event(i+"end",{originalEvent:e})),this._drainInertiaBuffer();var o=this._inertia,a=this._map;if(o.length<2)a.snapToNorth({},{originalEvent:e});else{var s=o[o.length-1],u=o[0],l=a.transform.scaleZoom(n*s[1]),p=a.transform.scaleZoom(n*u[1]),c=l-p,h=(s[0]-u[0])/1e3,f=s[2];if(0!==h&&l!==p){var d=.15*c/h;Math.abs(d)>2.5&&(d=d>0?2.5:-2.5);var m=1e3*Math.abs(d/(12*.15)),y=l+d*m/2e3;y<0&&(y=0),a.easeTo({zoom:y,duration:m,easing:bi,around:this._aroundCenter?a.getCenter():a.unproject(f),noMoveStart:!0},{originalEvent:e})}else a.snapToNorth({},{originalEvent:e})}}},wi.prototype._drainInertiaBuffer=function(){for(var e=this._inertia,r=t.browser.now();e.length>2&&r-e[0][0]>160;)e.shift()};var Ei={scrollZoom:hi,boxZoom:fi,dragRotate:mi,dragPan:_i,keyboard:vi,doubleClickZoom:xi,touchZoomRotate:wi},Si=function(e){function r(r,i){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r,r.prototype.getCenter=function(){return this.transform.center},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,i){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),i)},r.prototype.panTo=function(e,r,i){return this.easeTo(t.extend({center:e},r),i)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,i){return this.easeTo(t.extend({zoom:e},r),i)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.rotateTo=function(e,r,i){return this.easeTo(t.extend({bearing:e},r),i)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,r)},r.prototype._cameraForBoxAndBearing=function(e,r,i,n){if("number"==typeof(n=t.extend({padding:{top:0,bottom:0,right:0,left:0},offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var o=n.padding;n.padding={top:o,bottom:o,right:o,left:o}}if(t.isEqual(Object.keys(n.padding).sort(function(t,e){return t<e?-1:t>e?1:0}),["bottom","left","right","top"])){var a=this.transform,s=a.project(t.LngLat.convert(e)),u=a.project(t.LngLat.convert(r)),l=s.rotate(-i*Math.PI/180),p=u.rotate(-i*Math.PI/180),c=new t.Point(Math.max(l.x,p.x),Math.max(l.y,p.y)),h=new t.Point(Math.min(l.x,p.x),Math.min(l.y,p.y)),f=c.sub(h),d=(a.width-n.padding.left-n.padding.right)/f.x,m=(a.height-n.padding.top-n.padding.bottom)/f.y;if(!(m<0||d<0)){var y=Math.min(a.scaleZoom(a.scale*Math.min(d,m)),n.maxZoom),_=t.Point.convert(n.offset),v=(n.padding.left-n.padding.right)/2,g=(n.padding.top-n.padding.bottom)/2,x=new t.Point(_.x+v,_.y+g).mult(a.scale/a.zoomScale(y));return{center:a.unproject(s.add(u).div(2).sub(x)),zoom:y,bearing:i}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}else t.warnOnce("options.padding must be a positive number, or an Object with keys 'bottom', 'left', 'right', 'top'")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,i,n,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),i,n),n,o)},r.prototype._fitInternal=function(e,r,i){return e?(r=t.extend(e,r)).linear?this.easeTo(r,i):this.flyTo(r,i):this},r.prototype.jumpTo=function(e,r){this.stop();var i=this.transform,n=!1,o=!1,a=!1;return"zoom"in e&&i.zoom!==+e.zoom&&(n=!0,i.zoom=+e.zoom),void 0!==e.center&&(i.center=t.LngLat.convert(e.center)),"bearing"in e&&i.bearing!==+e.bearing&&(o=!0,i.bearing=+e.bearing),"pitch"in e&&i.pitch!==+e.pitch&&(a=!0,i.pitch=+e.pitch),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),n&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),o&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),a&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var i=this;this.stop(),!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate&&(e.duration=0);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),u="zoom"in e?+e.zoom:o,l="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,c=n.centerPoint.add(t.Point.convert(e.offset)),h=n.pointLocation(c),f=t.LngLat.convert(e.center||h);this._normalizeCenter(f);var d,m,y=n.project(h),_=n.project(f).sub(y),v=n.zoomScale(u-o);return e.around&&(d=t.LngLat.convert(e.around),m=n.locationPoint(d)),this._zooming=u!==o,this._rotating=a!==l,this._pitching=p!==s,this._prepareEase(r,e.noMoveStart),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(i._zooming&&(n.zoom=t.number(o,u,e)),i._rotating&&(n.bearing=t.number(a,l,e)),i._pitching&&(n.pitch=t.number(s,p,e)),d)n.setLocationAtPoint(d,m);else{var h=n.zoomScale(n.zoom-o),f=u>o?Math.min(2,v):Math.max(.5,v),g=Math.pow(f,1-e),x=n.unproject(y.add(_.mult(e*g)).mult(h));n.setLocationAtPoint(n.renderWorldCopies?x.wrap():x,c)}i._fireMoveEvents(r)},function(){e.delayEndEvents?i._easeEndTimeoutID=setTimeout(function(){return i._afterEase(r)},e.delayEndEvents):i._afterEase(r)},e),this},r.prototype._prepareEase=function(e,r){this._moving=!0,r||this.fire(new t.Event("movestart",e)),this._zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e){var r=this._zooming,i=this._rotating,n=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,r&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),n&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))},r.prototype.flyTo=function(e,r){var i=this;this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),u="zoom"in e?t.clamp(+e.zoom,n.minZoom,n.maxZoom):o,l="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,c=n.zoomScale(u-o),h=n.centerPoint.add(t.Point.convert(e.offset)),f=n.pointLocation(h),d=t.LngLat.convert(e.center||f);this._normalizeCenter(d);var m=n.project(f),y=n.project(d).sub(m),_=e.curve,v=Math.max(n.width,n.height),g=v/c,x=y.mag();if("minZoom"in e){var b=t.clamp(Math.min(e.minZoom,o,u),n.minZoom,n.maxZoom),w=v/n.zoomScale(b-o);_=Math.sqrt(w/x*2)}var E=_*_;function S(t){var e=(g*g-v*v+(t?-1:1)*E*E*x*x)/(2*(t?g:v)*E*x);return Math.log(Math.sqrt(e*e+1)-e)}function T(t){return(Math.exp(t)-Math.exp(-t))/2}function A(t){return(Math.exp(t)+Math.exp(-t))/2}var z=S(0),I=function(t){return A(z)/A(z+_*t)},C=function(t){return v*((A(z)*(T(e=z+_*t)/A(e))-T(z))/E)/x;var e},k=(S(1)-z)/_;if(Math.abs(x)<1e-6||!isFinite(k)){if(Math.abs(v-g)<1e-6)return this.easeTo(e,r);var P=g<v?-1:1;k=Math.abs(Math.log(g/v))/_,C=function(){return 0},I=function(t){return Math.exp(P*_*t)}}if("duration"in e)e.duration=+e.duration;else{var M="screenSpeed"in e?+e.screenSpeed/_:+e.speed;e.duration=1e3*k/M}return e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=a!==l,this._pitching=p!==s,this._prepareEase(r,!1),this._ease(function(e){var c=e*k,f=1/I(c);n.zoom=1===e?u:o+n.scaleZoom(f),i._rotating&&(n.bearing=t.number(a,l,e)),i._pitching&&(n.pitch=t.number(s,p,e));var _=1===e?d:n.unproject(m.add(y.mult(C(c))).mult(f));n.setLocationAtPoint(n.renderWorldCopies?_.wrap():_,h),i._fireMoveEvents(r)},function(){return i._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var t=this._onEaseEnd;delete this._onEaseEnd,t.call(this)}return this},r.prototype._ease=function(e,r,i){!1===i.animate||0===i.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var i=Math.abs(e-r);return Math.abs(e-360-r)<i&&(e-=360),Math.abs(e+360-r)<i&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),Ti=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Ti.prototype.getDefaultPosition=function(){return"bottom-right"},Ti.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Ti.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0},Ti.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:t.config.ACCESS_TOKEN}];if(e){var i=r.reduce(function(t,e,i){return e.value&&(t+=e.key+"="+e.value+(i<r.length-1?"&":"")),t},"?");e.href=t.config.FEEDBACK_URL+"/"+i+(this._map._hash?this._map._hash.getHashString(!0):"")}},Ti.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},Ti.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(function(t){return"string"!=typeof t?"":t})):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var i in r){var n=r[i];if(n.used){var o=n.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort(function(t,e){return t.length-e.length}),(t=t.filter(function(e,r){for(var i=r+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0})).length?(this._innerContainer.innerHTML=t.join(" | "),this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null}},Ti.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Ai=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};Ai.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.href="https://www.mapbox.com/",e.setAttribute("aria-label","Mapbox logo"),e.setAttribute("rel","noopener"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Ai.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Ai.prototype.getDefaultPosition=function(){return"bottom-left"},Ai.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Ai.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},Ai.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var zi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};zi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},zi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,i=e?this._queue.concat(e):this._queue;r<i.length;r+=1){var n=i[r];if(n.id===t)return void(n.cancelled=!0)}},zi.prototype.run=function(){var t=this._currentlyRunning=this._queue;this._queue=[];for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(!i.cancelled&&(i.callback(),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},zi.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var Ii=t.window.HTMLImageElement,Ci=t.window.HTMLElement,ki={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:0,maxZoom:22,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,bearingSnap:7,clickTolerance:3,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,transformRequest:null,fadeDuration:300,crossSourceCollisions:!0},Pi=function(i){function n(e){var n=this;if(null!=(e=t.extend({},ki,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than minZoom");var o=new ai(e.minZoom,e.maxZoom,e.renderWorldCopies);i.call(this,o,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new zi,this._controls=[],this._mapId=t.uniqueId();var a=e.transformRequest;if(this._transformRequest=a?function(t,e){return a(t,e)||{url:t}}:function(t){return{url:t}},"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof Ci))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return n._update(!1)}),this.on("moveend",function(){return n._update(!1)}),this.on("zoom",function(){return n._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),function(t,e){var i=t.getCanvasContainer(),n=null,o=!1,a=null;for(var s in Ei)t[s]=new Ei[s](t,e),e.interactive&&e[s]&&t[s].enable(e[s]);r.addEventListener(i,"mouseout",function(e){t.fire(new li("mouseout",t,e))}),r.addEventListener(i,"mousedown",function(n){o=!0,a=r.mousePos(i,n);var s=new li("mousedown",t,n);t.fire(s),s.defaultPrevented||(e.interactive&&!t.doubleClickZoom.isActive()&&t.stop(),t.boxZoom.onMouseDown(n),t.boxZoom.isActive()||t.dragPan.isActive()||t.dragRotate.onMouseDown(n),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onMouseDown(n))}),r.addEventListener(i,"mouseup",function(e){var r=t.dragRotate.isActive();n&&!r&&t.fire(new li("contextmenu",t,n)),n=null,o=!1,t.fire(new li("mouseup",t,e))}),r.addEventListener(i,"mousemove",function(e){if(!t.dragPan.isActive()&&!t.dragRotate.isActive()){for(var r=e.target;r&&r!==i;)r=r.parentNode;r===i&&t.fire(new li("mousemove",t,e))}}),r.addEventListener(i,"mouseover",function(e){for(var r=e.target;r&&r!==i;)r=r.parentNode;r===i&&t.fire(new li("mouseover",t,e))}),r.addEventListener(i,"touchstart",function(r){var i=new pi("touchstart",t,r);t.fire(i),i.defaultPrevented||(e.interactive&&t.stop(),t.boxZoom.isActive()||t.dragRotate.isActive()||t.dragPan.onTouchStart(r),t.touchZoomRotate.onStart(r),t.doubleClickZoom.onTouchStart(i))},{passive:!1}),r.addEventListener(i,"touchmove",function(e){t.fire(new pi("touchmove",t,e))},{passive:!1}),r.addEventListener(i,"touchend",function(e){t.fire(new pi("touchend",t,e))}),r.addEventListener(i,"touchcancel",function(e){t.fire(new pi("touchcancel",t,e))}),r.addEventListener(i,"click",function(n){var o=r.mousePos(i,n);(o.equals(a)||o.dist(a)<e.clickTolerance)&&t.fire(new li("click",t,n))}),r.addEventListener(i,"dblclick",function(e){var r=new li("dblclick",t,e);t.fire(r),r.defaultPrevented||t.doubleClickZoom.onDblClick(r)}),r.addEventListener(i,"contextmenu",function(e){var r=t.dragRotate.isActive();o||r?o&&(n=e):t.fire(new li("contextmenu",t,e)),(t.dragRotate.isEnabled()||t.listens("contextmenu"))&&e.preventDefault()}),r.addEventListener(i,"wheel",function(r){e.interactive&&t.stop();var i=new ci("wheel",t,r);t.fire(i),i.defaultPrevented||t.scrollZoom.onWheel(r)},{passive:!1})}(this,e),this._hash=e.hash&&(new ui).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new Ti({customAttribution:e.customAttribution})),this.addControl(new Ai,e.logoPosition),this.on("style.load",function(){n.transform.unmodified&&n.jumpTo(n.style.stylesheet)}),this.on("data",function(e){n._update("style"===e.dataType),n.fire(new t.Event(e.dataType+"data",e))}),this.on("dataloading",function(e){n.fire(new t.Event(e.dataType+"dataloading",e))})}i&&(n.__proto__=i),n.prototype=Object.create(i&&i.prototype),n.prototype.constructor=n;var o={showTileBoundaries:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0}};return n.prototype._getMapId=function(){return this._mapId},n.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=e.onAdd(this);this._controls.push(e);var n=this._controlPositions[r];return-1!==r.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},n.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),i=r[0],n=r[1];return this._resizeCanvas(i,n),this.transform.resize(i,n),this.painter.resize(i,n),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e)).fire(new t.Event("resize",e)).fire(new t.Event("moveend",e)),this},n.prototype.getBounds=function(){return this.transform.getBounds()},n.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},n.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},n.prototype.setMinZoom=function(t){if((t=null==t?0:t)>=0&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between 0 and the current maxZoom, inclusive")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},n.prototype.isMoving=function(){return this._moving||this.dragPan.isActive()||this.dragRotate.isActive()||this.scrollZoom.isActive()},n.prototype.isZooming=function(){return this._zooming||this.scrollZoom.isZooming()},n.prototype.isRotating=function(){return this._rotating||this.dragRotate.isActive()},n.prototype.on=function(t,e,r){var n=this;if(void 0===r)return i.prototype.on.call(this,t,e);var o=function(){var i;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){var a=n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[];a.length?o||(o=!0,r.call(n,new li(t,n,i.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){(n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,r.call(n,new li(t,n,i.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(n,new li(t,n,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(i={},i[t]=function(t){var i=n.getLayer(e)?n.queryRenderedFeatures(t.point,{layers:[e]}):[];i.length&&(t.features=i,r.call(n,t),delete t.features)},i)}}();for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(o),o.delegates)this.on(a,o.delegates[a]);return this},n.prototype.off=function(t,e,r){if(void 0===r)return i.prototype.off.call(this,t,e);if(this._delegatedListeners&&this._delegatedListeners[t])for(var n=this._delegatedListeners[t],o=0;o<n.length;o++){var a=n[o];if(a.layer===e&&a.listener===r){for(var s in a.delegates)this.off(s,a.delegates[s]);return n.splice(o,1),this}}return this},n.prototype.queryRenderedFeatures=function(e,r){if(!this.style)return[];var i;if(void 0!==r||void 0===e||e instanceof t.Point||Array.isArray(e)||(r=e,e=void 0),r=r||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])i=[t.Point.convert(e)];else{var n=t.Point.convert(e[0]),o=t.Point.convert(e[1]);i=[n,new t.Point(o.x,n.y),o,new t.Point(n.x,o.y),n]}return this.style.queryRenderedFeatures(i,r,this.transform)},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(t,e){return(!e||!1!==e.diff&&!e.localIdeographFontFamily)&&this.style&&t?(this._diffStyle(t,e),this):this._updateStyle(t,e)},n.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new Me(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},n.prototype._diffStyle=function(e,r){var i=this;if("string"==typeof e){var n=t.normalizeStyleURL(e),o=this._transformRequest(n,t.ResourceType.Style);t.getJSON(o,function(e,n){e?i.fire(new t.ErrorEvent(e)):n&&i._updateDiff(n,r)})}else"object"==typeof e&&this._updateDiff(e,r)},n.prototype._updateDiff=function(e,r){try{this.style.setState(e)&&this._update(!0)}catch(i){t.warnOnce("Unable to perform style diff: "+(i.message||i.error||i)+". Rebuilding the style from scratch."),this._updateStyle(e,r)}},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this.style.addSource(t,e),this._update(!0)},n.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var i in r){var n=r[i];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,i){void 0===i&&(i={});var n=i.pixelRatio;void 0===n&&(n=1);var o=i.sdf;if(void 0===o&&(o=!1),r instanceof Ii){var a=t.browser.getImageData(r),s=a.width,u=a.height,l=a.data;this.style.addImage(e,{data:new t.RGBAImage({width:s,height:u},l),pixelRatio:n,sdf:o})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var p=r.width,c=r.height,h=r.data;this.style.addImage(e,{data:new t.RGBAImage({width:p,height:c},new Uint8Array(h)),pixelRatio:n,sdf:o})}},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._transformRequest(e,t.ResourceType.Image),r)},n.prototype.listImages=function(){return this.style.listImages()},n.prototype.addLayer=function(t,e){return this.style.addLayer(t,e),this._update(!0)},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setFilter=function(t,e,r){return void 0===r&&(r={}),this.style.setFilter(t,e,r),this._update(!0)},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0)},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setPaintProperty(t,e,r,i),this._update(!0)},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setLayoutProperty(t,e,r,i),this._update(!0)},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t,e){return void 0===e&&(e={}),this.style.setLight(t,e),this._update(!0)},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},n.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},n.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},n.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=r.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",e),this._canvas.style.position="absolute",this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var i=this._containerDimensions();this._resizeCanvas(i[0],i[1]);var n=this._controlContainer=r.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){o[t]=r.create("div","mapboxgl-ctrl-"+t,n)})},n.prototype._resizeCanvas=function(e,r){var i=t.window.devicePixelRatio||1;this._canvas.width=i*e,this._canvas.height=i*r,this._canvas.style.width=e+"px",this._canvas.style.height=r+"px"},n.prototype._setupPainter=function(){var r=t.extend({failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer},e.webGLContextAttributes),i=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);i?(this.painter=new ri(i,this.transform),t.webpSupported.testSupport(i)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},n.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(){this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run();var e=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var r=this.transform.zoom,i=t.browser.now();this.style.zoomHistory.update(r,i);var n=new t.EvaluationParameters(r,{now:i,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=n.crossFadingFactor();1===o&&o===this._crossFadingFactor||(e=!0,this._crossFadingFactor=o),this.style.update(n)}return this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||e)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this._sourcesDirty||this._repaint||this._styleDirty||this._placementDirty?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.Event("idle")),this},n.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,r=this._controls;e<r.length;e+=1)r[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var i=this.painter.context.gl.getExtension("WEBGL_lose_context");i&&i.loseContext(),Mi(this._canvasContainer),Mi(this._controlContainer),Mi(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this.fire(new t.Event("remove"))},n.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame(function(){e._frame=null,e._render()}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(){this._trackResize&&this.resize()._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},Object.defineProperties(n.prototype,o),n}(Si);function Mi(t){t.parentNode&&t.parentNode.removeChild(t)}var Li={showCompass:!0,showZoom:!0},Di=function(e){var i=this;this.options=t.extend({},Li,e),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(this._zoomInButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-in","Zoom in",function(){return i._map.zoomIn()}),this._zoomOutButton=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-zoom-out","Zoom out",function(){return i._map.zoomOut()})),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-icon mapboxgl-ctrl-compass","Reset bearing to north",function(){return i._map.resetNorth()}),this._compassArrow=r.create("span","mapboxgl-ctrl-compass-arrow",this._compass))};function Ri(e,r,i){if(e=new t.LngLat(e.lng,e.lat),r){var n=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=i.locationPoint(e).distSqr(r);i.locationPoint(n).distSqr(r)<a?e=n:i.locationPoint(o).distSqr(r)<a&&(e=o)}for(;Math.abs(e.lng-i.center.lng)>180;){var s=i.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=i.width&&s.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e}Di.prototype._rotateCompassArrow=function(){var t="rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassArrow.style.transform=t},Di.prototype.onAdd=function(t){return this._map=t,this.options.showCompass&&(this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new mi(t,{button:"left",element:this._compass}),r.addEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.enable()),this._container},Di.prototype.onRemove=function(){r.remove(this._container),this.options.showCompass&&(this._map.off("rotate",this._rotateCompassArrow),r.removeEventListener(this._compass,"mousedown",this._handler.onMouseDown),this._handler.disable(),delete this._handler),delete this._map},Di.prototype._createButton=function(t,e,i){var n=r.create("button",t,this._container);return n.type="button",n.title=e,n.setAttribute("aria-label",e),n.addEventListener("click",i),n};var Bi={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Fi(t,e,r){var i=t.classList;for(var n in Bi)i.remove("mapboxgl-"+r+"-anchor-"+n);i.add("mapboxgl-"+r+"-anchor-"+e)}var Oi,Ui=function(e){function i(i,n){if(e.call(this),(i instanceof t.window.HTMLElement||n)&&(i=t.extend({element:i},n)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick"],this),this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._draggable=i&&i.draggable||!1,this._state="inactive",i&&i.element)this._element=i.element,this._offset=t.Point.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div");var o=r.createNS("http://www.w3.org/2000/svg","svg");o.setAttributeNS(null,"height","41px"),o.setAttributeNS(null,"width","27px"),o.setAttributeNS(null,"viewBox","0 0 27 41");var a=r.createNS("http://www.w3.org/2000/svg","g");a.setAttributeNS(null,"stroke","none"),a.setAttributeNS(null,"stroke-width","1"),a.setAttributeNS(null,"fill","none"),a.setAttributeNS(null,"fill-rule","evenodd");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"fill-rule","nonzero");var u=r.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(3.0, 29.0)"),u.setAttributeNS(null,"fill","#000000");for(var l=0,p=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];l<p.length;l+=1){var c=p[l],h=r.createNS("http://www.w3.org/2000/svg","ellipse");h.setAttributeNS(null,"opacity","0.04"),h.setAttributeNS(null,"cx","10.5"),h.setAttributeNS(null,"cy","5.80029008"),h.setAttributeNS(null,"rx",c.rx),h.setAttributeNS(null,"ry",c.ry),u.appendChild(h)}var f=r.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"fill",this._color);var d=r.createNS("http://www.w3.org/2000/svg","path");d.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),f.appendChild(d);var m=r.createNS("http://www.w3.org/2000/svg","g");m.setAttributeNS(null,"opacity","0.25"),m.setAttributeNS(null,"fill","#000000");var y=r.createNS("http://www.w3.org/2000/svg","path");y.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),m.appendChild(y);var _=r.createNS("http://www.w3.org/2000/svg","g");_.setAttributeNS(null,"transform","translate(6.0, 7.0)"),_.setAttributeNS(null,"fill","#FFFFFF");var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var g=r.createNS("http://www.w3.org/2000/svg","circle");g.setAttributeNS(null,"fill","#000000"),g.setAttributeNS(null,"opacity","0.25"),g.setAttributeNS(null,"cx","5.5"),g.setAttributeNS(null,"cy","5.5"),g.setAttributeNS(null,"r","5.4999962");var x=r.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#FFFFFF"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962"),v.appendChild(g),v.appendChild(x),s.appendChild(u),s.appendChild(f),s.appendChild(m),s.appendChild(_),s.appendChild(v),o.appendChild(s),this._element.appendChild(o),this._offset=t.Point.convert(i&&i.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._popup=null}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},i.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},i.prototype.getElement=function(){return this._element},i.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat)}return this},i.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},i.prototype.getPopup=function(){return this._popup},i.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},i.prototype._update=function(t){this._map&&(this._map.transform.renderWorldCopies&&(this._lngLat=Ri(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset),t&&"moveend"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,Bi[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px)"),Fi(this._element,this._anchor,"marker"))},i.prototype.getOffset=function(){return this._offset},i.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},i.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},i.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},i.prototype.isDraggable=function(){return this._draggable},i}(t.Evented),Vi={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0},Ni=function(e){function i(r){e.call(this),this.options=t.extend({},Vi,r),t.bindAll(["_onSuccess","_onError","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.onAdd=function(e){var i;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i=this._setupUI,void 0!==Oi?i(Oi):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then(function(t){Oi="denied"!==t.state,i(Oi)}):(Oi=!!t.window.navigator.geolocation,i(Oi)),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),r.remove(this._container),this._map=void 0},i.prototype._onSuccess=function(e){if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()},i.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy;this._map.fitBounds(r.toBounds(i),this.options.fitBoundsOptions,{geolocateSource:!0})},i.prototype._updateMarker=function(t){t?this._userLocationDotMarker.setLngLat([t.coords.longitude,t.coords.latitude]).addTo(this._map):this._userLocationDotMarker.remove()},i.prototype._onError=function(e){if(this.options.trackUserLocation)if(1===e.code)this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),void 0!==this._geolocationWatchID&&this._clearWatch();else switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;!1!==e?(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",this._container),this._geolocateButton.type="button",this._geolocateButton.setAttribute("aria-label","Geolocate"),this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ui(this._dotElement),this.options.trackUserLocation&&(this._watchState="OFF")),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(e){e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new t.Event("trackuserlocationend")))})):t.warnOnce("Geolocation support is not available, the GeolocateControl will not be visible.")},i.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}"OFF"===this._watchState&&void 0!==this._geolocationWatchID?this._clearWatch():void 0===this._geolocationWatchID&&(this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,this.options.positionOptions))}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},i}(t.Evented),ji={maxWidth:100,unit:"metric"},qi=function(e){this.options=t.extend({},ji,e),t.bindAll(["_onMove","setUnit"],this)};function Zi(t,e,r){var i,n,o,a,s,u,l=r&&r.maxWidth||100,p=t._container.clientHeight/2,c=(i=t.unproject([0,p]),n=t.unproject([l,p]),o=Math.PI/180,a=i.lat*o,s=n.lat*o,u=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos((n.lng-i.lng)*o),6371e3*Math.acos(Math.min(u,1)));if(r&&"imperial"===r.unit){var h=3.2808*c;h>5280?Gi(e,l,h/5280,"mi"):Gi(e,l,h,"ft")}else r&&"nautical"===r.unit?Gi(e,l,c/1852,"nm"):Gi(e,l,c,"m")}function Gi(t,e,r,i){var n,o,a,s=(n=r,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=(a=n/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a))),u=s/r;"m"===i&&s>=1e3&&(s/=1e3,i="km"),t.style.width=e*u+"px",t.innerHTML=s+i}qi.prototype.getDefaultPosition=function(){return"bottom-left"},qi.prototype._onMove=function(){Zi(this._map,this._container,this.options)},qi.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},qi.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},qi.prototype.setUnit=function(t){this.options.unit=t,Zi(this._map,this._container,this.options)};var Xi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange"),this._className="mapboxgl-ctrl"};Xi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div",this._className+" mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Xi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Xi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},Xi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button",this._className+"-icon "+this._className+"-fullscreen",this._controlContainer);e.setAttribute("aria-label","Toggle fullscreen"),e.type="button",this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Xi.prototype._isFullscreen=function(){return this._fullscreen},Xi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle(this._className+"-shrink"),this._fullscreenButton.classList.toggle(this._className+"-fullscreen"))},Xi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Wi={closeButton:!0,closeOnClick:!0,className:""},Ki=function(e){function i(r){e.call(this),this.options=t.extend(Object.create(Wi),r),t.bindAll(["_update","_onClickClose","remove"],this)}return e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i,i.prototype.addTo=function(e){return this._map=e,this._map.on("move",this._update),this.options.closeOnClick&&this._map.on("click",this._onClickClose),this._map.on("remove",this.remove),this._update(),this.fire(new t.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("click",this._onClickClose),this._map.off("remove",this.remove),delete this._map),this.fire(new t.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._update(),this},i.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},i.prototype.setHTML=function(e){var r,i=t.window.document.createDocumentFragment(),n=t.window.document.createElement("body");for(n.innerHTML=e;r=n.firstChild;)i.appendChild(r);return this.setDOMContent(i)},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClickClose))},i.prototype._update=function(){var e=this;if(this._map&&this._lngLat&&this._content){this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return e._container.classList.add(t)})),this._map.transform.renderWorldCopies&&(this._lngLat=Ri(this._lngLat,this._pos,this._map.transform));var i=this._pos=this._map.project(this._lngLat),n=this.options.anchor,o=function e(r){if(r){if("number"==typeof r){var i=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(i,i),"top-right":new t.Point(-i,i),bottom:new t.Point(0,-r),"bottom-left":new t.Point(i,-i),"bottom-right":new t.Point(-i,-i),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var n=t.Point.convert(r);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!n){var a,s=this._container.offsetWidth,u=this._container.offsetHeight;a=i.y+o.bottom.y<u?["top"]:i.y>this._map.transform.height-u?["bottom"]:[],i.x<s/2?a.push("left"):i.x>this._map.transform.width-s/2&&a.push("right"),n=0===a.length?"bottom":a.join("-")}var l=i.add(o[n]).round();r.setTransform(this._container,Bi[n]+" translate("+l.x+"px,"+l.y+"px)"),Fi(this._container,n,"popup")}},i.prototype._onClickClose=function(){this.remove()},i}(t.Evented),Hi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,Map:Pi,NavigationControl:Di,GeolocateControl:Ni,AttributionControl:Ti,ScaleControl:qi,FullscreenControl:Xi,Popup:Ki,Marker:Ui,Style:Me,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return kt.workerCount},set workerCount(t){kt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},workerUrl:""};return Hi}),r}()},276:function(t,e,r){}}]); \ No newline at end of file
diff --git a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.rtl.css b/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.rtl.css
deleted file mode 100644
index 918f0894..00000000
--- a/plugins/jetpack/_inc/blocks/vendors~map/mapbox-gl.f81f5e1d3c950198407d.rtl.css
+++ /dev/null
@@ -1 +0,0 @@
-.mapboxgl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mapboxgl-map:-webkit-full-screen{width:100%;height:100%}.mapboxgl-canary{background-color:salmon}.mapboxgl-canvas-container.mapboxgl-interactive,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass{cursor:grab;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.mapboxgl-canvas-container.mapboxgl-interactive:active,.mapboxgl-ctrl-group>button.mapboxgl-ctrl-compass:active{cursor:grabbing}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate .mapboxgl-canvas{touch-action:pan-x pan-y}.mapboxgl-canvas-container.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:pinch-zoom}.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan,.mapboxgl-canvas-container.mapboxgl-touch-zoom-rotate.mapboxgl-touch-drag-pan .mapboxgl-canvas{touch-action:none}.mapboxgl-ctrl-bottom-left,.mapboxgl-ctrl-bottom-right,.mapboxgl-ctrl-top-left,.mapboxgl-ctrl-top-right{position:absolute;pointer-events:none;z-index:2}.mapboxgl-ctrl-top-left{top:0;right:0}.mapboxgl-ctrl-top-right{top:0;left:0}.mapboxgl-ctrl-bottom-left{bottom:0;right:0}.mapboxgl-ctrl-bottom-right{left:0;bottom:0}.mapboxgl-ctrl{clear:both;pointer-events:auto}.mapboxgl-ctrl-top-left .mapboxgl-ctrl{margin:10px 10px 0 0;float:right}.mapboxgl-ctrl-top-right .mapboxgl-ctrl{margin:10px 0 0 10px;float:left}.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl{margin:0 10px 10px 0;float:right}.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl{margin:0 0 10px 10px;float:left}.mapboxgl-ctrl-group{border-radius:4px;overflow:hidden;background:#fff}.mapboxgl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}.mapboxgl-ctrl-group>button{width:30px;height:30px;display:block;padding:0;outline:none;border:0;box-sizing:border-box;background-color:transparent;cursor:pointer}.mapboxgl-ctrl-group>button+button{border-top:1px solid #ddd}.mapboxgl-ctrl>button::-moz-focus-inner{border:0;padding:0}.mapboxgl-ctrl>button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-ctrl-icon,.mapboxgl-ctrl-icon>.mapboxgl-ctrl-compass-arrow{speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.mapboxgl-ctrl-icon{padding:5px}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-out{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 9c-.554 0-1 .446-1 1s.446 1 1 1h6c.554 0 1-.446 1-1s-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-zoom-in{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 6c-.554 0-1 .446-1 1v2H7c-.554 0-1 .446-1 1s.446 1 1 1h2v2c0 .554.446 1 1 1s1-.446 1-1v-2h2c.554 0 1-.446 1-1s-.446-1-1-1h-2V7c0-.554-.446-1-1-1z' fill='%23333'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23333'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate:disabled{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23aaa'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-active-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e58978'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 0 1 3.5 3.5 3.5 3.5 0 0 1-3.5 3.5A3.5 3.5 0 0 1 6.5 10 3.5 3.5 0 0 1 10 6.5zm0 1.8A1.8 1.8 0 0 0 8.3 10a1.8 1.8 0 0 0 1.7 1.8 1.8 1.8 0 0 0 1.8-1.8A1.8 1.8 0 0 0 10 8.3z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%2333b5e5'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-background-error{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg' fill='%23e54e33'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1zm0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 0 1 0-7z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-geolocate.mapboxgl-ctrl-geolocate-waiting{animation:mapboxgl-spin 2s linear infinite}@keyframes mapboxgl-spin{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}.mapboxgl-ctrl-icon.mapboxgl-ctrl-fullscreen{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 4c-.5 0-1 .5-1 1v4h.5l1.277-1.703c1 .763 2.059 1.66 3.114 2.703a30.38 30.38 0 0 1-3.11 2.707L4.5 11H4v4c0 .5.5 1 1 1h4v-.5l-1.727-1.295a35.498 35.498 0 0 1 2.688-3.137 30.312 30.312 0 0 1 2.746 3.15L11 15.5v.5h4c.5 0 1-.5 1-1v-4h-.5l-1.295 1.727a35.513 35.513 0 0 1-3.168-2.717 47.787 47.787 0 0 1 3.192-2.705L15.5 9h.5V5c0-.5-.5-1-1-1h-4v.5l1.703 1.277A32.243 32.243 0 0 1 9.971 8.92 47.761 47.761 0 0 1 7.305 5.77L9 4.5V4H5z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-shrink{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.242 3.492a.75.75 0 0 0-.523 1.29l2.246 2.245L4 8.5V9h4c.5 0 1-.5 1-1V4h-.5L7.018 5.955 4.78 3.72a.75.75 0 0 0-.539-.227zm11.492 0a.75.75 0 0 0-.515.227l-2.235 2.234L11.5 4H11v4c0 .5.5 1 1 1h4v-.5l-1.965-1.473 2.246-2.246a.75.75 0 0 0-.547-1.289zM4 11v.5l1.965 1.473-2.246 2.246A.751.751 0 1 0 4.78 16.28l2.246-2.246L8.5 16H9v-4c0-.5-.5-1-1-1H4zm8 0c-.5 0-1 .5-1 1v4h.5l1.473-1.965 2.246 2.246a.751.751 0 1 0 1.062-1.062l-2.246-2.246L16 11.5V11h-4z'/%3E%3C/svg%3E")}.mapboxgl-ctrl-icon.mapboxgl-ctrl-compass>.mapboxgl-ctrl-compass-arrow{width:20px;height:20px;margin:5px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' d='M6 9l4-8 4 8z'/%3E%3Cpath fill='%23CCC' d='M6 11l4 8 4-8z'/%3E%3C/svg%3E");background-repeat:no-repeat;display:inline-block}a.mapboxgl-ctrl-logo{width:85px;height:21px;margin:0 -3px -3px 0;display:block;background-repeat:no-repeat;cursor:pointer;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84.49 21'%3E%3Cpath class='st0' d='M83.25 14.26c0 .12-.09.21-.21.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 0 1-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.4-2.35a.34.34 0 0 1 .3-.17H83c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.37 3.63 2.43 3.67c0 .05.01.09.01.13zM66.24 9.59c-.39-1.88-1.96-3.28-3.84-3.28-1.03 0-2.03.42-2.73 1.18V3.51c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23v-.73c.71.75 1.7 1.18 2.73 1.18 1.88 0 3.45-1.41 3.84-3.29.13-.6.13-1.21 0-1.8zM62.08 13c-1.32 0-2.39-1.11-2.41-2.48v-.06c.02-1.38 1.09-2.48 2.41-2.48s2.42 1.12 2.42 2.51S63.41 13 62.08 13zM71.67 6.32a4.24 4.24 0 0 0-4.16 3.29c-.13.59-.13 1.19 0 1.77a4.233 4.233 0 0 0 4.17 3.3c2.35 0 4.26-1.87 4.26-4.19s-1.9-4.17-4.27-4.17zm-.02 6.69c-1.33 0-2.42-1.12-2.42-2.51s1.08-2.52 2.42-2.52c1.33 0 2.42 1.12 2.42 2.51s-1.08 2.51-2.42 2.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M62.08 7.98c-1.32 0-2.39 1.11-2.41 2.48v.06c.01 1.38 1.08 2.48 2.41 2.48s2.42-1.12 2.42-2.51-1.09-2.51-2.42-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.57 1.17 1.27-.01.71-.52 1.27-1.17 1.27zM71.65 7.98c-1.33 0-2.42 1.12-2.42 2.51S70.32 13 71.65 13s2.42-1.12 2.42-2.51-1.08-2.51-2.42-2.51zm0 3.78c-.64 0-1.17-.57-1.17-1.27 0-.7.53-1.26 1.17-1.26s1.17.57 1.17 1.27c0 .71-.53 1.26-1.17 1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M45.74 6.53h-1.4c-.13 0-.23.11-.23.23v.73c-.71-.75-1.7-1.18-2.73-1.18-2.17 0-3.94 1.87-3.94 4.19s1.77 4.19 3.94 4.19c1.04 0 2.03-.43 2.73-1.19v.73c0 .13.1.23.23.23h1.4c.13 0 .23-.11.23-.23V6.74c0-.12-.09-.22-.22-.22 0 .01 0 .01-.01.01zm-1.62 4C44.11 11.9 43.03 13 41.71 13s-2.42-1.12-2.42-2.51 1.08-2.52 2.4-2.52c1.33 0 2.39 1.11 2.41 2.48l.02.08z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M41.71 7.98c-1.33 0-2.42 1.12-2.42 2.51S40.37 13 41.71 13s2.39-1.11 2.41-2.48v-.06c-.02-1.37-1.09-2.48-2.41-2.48zm-1.16 2.51c0-.7.52-1.27 1.17-1.27.64 0 1.14.56 1.17 1.25v.04c-.01.68-.53 1.24-1.17 1.24-.64 0-1.17-.56-1.17-1.26z' opacity='.35'/%3E%3Cpath class='st0' d='M52.41 6.32c-1.03 0-2.03.42-2.73 1.18v-.75c0-.13-.1-.23-.23-.23h-1.4c-.13 0-.23.11-.23.23v10.72c0 .13.1.23.23.23h1.4c.13 0 .23-.1.23-.23V13.5c.71.75 1.7 1.18 2.74 1.18 2.17 0 3.94-1.87 3.94-4.19s-1.78-4.17-3.95-4.17zm-.33 6.69c-1.32 0-2.39-1.11-2.42-2.48v-.07c.02-1.38 1.09-2.49 2.4-2.49 1.32 0 2.41 1.12 2.41 2.51S53.4 13 52.08 13.01z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M52.08 7.98c-1.32 0-2.39 1.11-2.42 2.48v.06c.03 1.38 1.1 2.48 2.42 2.48s2.41-1.12 2.41-2.51-1.09-2.51-2.41-2.51zm0 3.78c-.63 0-1.14-.56-1.17-1.25v-.04c.01-.69.54-1.25 1.17-1.25.63 0 1.17.58 1.17 1.27s-.53 1.27-1.17 1.27z' opacity='.35'/%3E%3Cpath class='st0' d='M36.08 14.24c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.11.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74c.01-.13.1-.22.23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.03 5.17z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M84.34 13.59l-.07-.13-1.96-2.99 1.94-2.95c.44-.67.26-1.56-.41-2.02-.02 0-.03 0-.04-.01-.23-.15-.5-.22-.78-.22h-1.61c-.56 0-1.08.29-1.37.78l-.32.55-.34-.56c-.29-.48-.81-.77-1.38-.77h-1.6c-.6 0-1.13.37-1.35.92a5.59 5.59 0 0 0-7.26.45c-.35.34-.65.72-.89 1.14-.9-1.62-2.58-2.72-4.5-2.72-.5 0-1.01.07-1.48.23V3.51c0-.82-.66-1.48-1.47-1.48h-1.4c-.81 0-1.47.66-1.47 1.47v3.75a5.12 5.12 0 0 0-4.17-2.19c-.74 0-1.46.16-2.12.47-.24-.17-.54-.26-.84-.26h-1.4c-.45 0-.87.21-1.15.56a1.498 1.498 0 0 0-1.16-.55h-1.39c-.3 0-.6.09-.84.26-.67-.3-1.39-.46-2.12-.46-1.83 0-3.43 1-4.37 2.5-.2-.46-.48-.89-.83-1.25-.8-.81-1.89-1.25-3.02-1.25h-.01c-.89.01-1.75.33-2.46.88-.74-.57-1.64-.88-2.57-.88h-.03c-.29 0-.58.03-.86.11-.28.06-.56.16-.82.28-.21-.12-.45-.18-.7-.18h-1.4c-.82 0-1.47.66-1.47 1.47v7.5c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.48-.66 1.48-1.48V9.79c.03-.36.23-.59.36-.59.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47l-.01-4.57c.06-.32.25-.47.35-.47.18 0 .38.18.38.47v4.57c0 .82.66 1.47 1.47 1.47h1.41c.82 0 1.47-.66 1.47-1.47v-.38a5.068 5.068 0 0 0 4.06 2.06c.74 0 1.46-.16 2.12-.47.24.17.54.26.84.26h1.39c.3 0 .6-.09.84-.26v2.01c0 .82.66 1.47 1.47 1.47h1.4c.82 0 1.47-.66 1.47-1.47v-1.77c.48.15.99.23 1.49.22 1.7 0 3.22-.87 4.17-2.2v.52c0 .82.66 1.47 1.47 1.47h1.4c.3 0 .6-.09.84-.26.66.31 1.39.47 2.12.47 1.92 0 3.6-1.1 4.49-2.73 1.54 2.65 4.95 3.53 7.58 1.98.18-.11.36-.22.53-.36.22.55.76.91 1.35.9H78c.56 0 1.08-.29 1.37-.78l.37-.61.37.61c.29.48.81.78 1.38.78h1.6c.81 0 1.46-.66 1.45-1.46-.05-.22-.1-.44-.2-.65zm-48.48.88h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.8 0-1.46.7-1.59 1.62l.01 4.66c0 .13-.1.23-.23.23h-1.41c-.13 0-.23-.11-.23-.23V9.68c0-.98-.74-1.71-1.62-1.71-.85 0-1.54.79-1.6 1.8v4.48c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V6.74a.23.23 0 0 1 .23-.22h1.4c.13 0 .22.11.23.22v.66c.5-.68 1.3-1.09 2.16-1.1h.03c1.09 0 2.09.6 2.6 1.55.45-.95 1.4-1.55 2.44-1.56 1.62 0 2.93 1.25 2.9 2.78l.01 5.16c.02.13-.09.23-.21.24zm10.11-.23c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23v-.74c-.7.76-1.69 1.18-2.72 1.18-2.17 0-3.94-1.87-3.94-4.19s1.77-4.19 3.94-4.19c1.03 0 2.02.43 2.73 1.18v-.74c0-.13.1-.23.23-.23h1.4c.12-.01.22.08.23.21V14.25h-.01v-.01zm6.44.43c-1.03 0-2.02-.43-2.73-1.18v3.97c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.1-.23-.23V6.75c0-.13.1-.22.23-.22h1.4c.13 0 .23.11.23.23v.73a3.73 3.73 0 0 1 2.73-1.18c2.17 0 3.94 1.86 3.94 4.18s-1.77 4.18-3.94 4.18zm13.83-3.28c-.39 1.87-1.96 3.29-3.84 3.29-1.03 0-2.02-.43-2.73-1.18v.73c0 .13-.1.23-.23.23h-1.4c-.13 0-.23-.11-.23-.23V3.51c0-.13.1-.23.23-.23h1.4c.13 0 .23.11.23.23v3.97a3.72 3.72 0 0 1 2.73-1.17c1.88 0 3.45 1.4 3.84 3.28.13.6.13 1.21 0 1.8zm5.43 3.29c-2 .01-3.73-1.35-4.17-3.3-.13-.59-.13-1.19 0-1.77a4.243 4.243 0 0 1 4.17-3.3c2.36 0 4.26 1.87 4.26 4.19s-1.9 4.18-4.26 4.18zm11.37-.21h-1.61c-.13 0-.24-.06-.3-.17l-1.44-2.39-1.44 2.39a.34.34 0 0 1-.3.17h-1.61c-.04 0-.08-.01-.12-.03-.09-.06-.13-.19-.06-.28l2.43-3.68-2.39-3.64a.213.213 0 0 1-.03-.12c0-.12.09-.21.21-.21h1.61c.13 0 .24.06.3.17l1.41 2.36 1.41-2.36a.34.34 0 0 1 .3-.17h1.61c.04 0 .08.01.12.03.09.06.13.19.06.28l-2.38 3.64 2.43 3.67c.02.03.03.07.03.12-.03.13-.12.22-.24.22z' opacity='.35'/%3E%3Cpath class='st0' d='M10.5 1.24c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' opacity='.9' fill='%23fff'/%3E%3Cpath class='st1' d='M10.5-.01C4.7-.01 0 4.7 0 10.49s4.7 10.5 10.5 10.5S21 16.29 21 10.49C20.99 4.7 16.3-.01 10.5-.01zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' opacity='.35'/%3E%3Cpath class='st1' d='M14.74 6.25c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M14.33 9.43l-1.86.91-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87z'/%3E%3C/svg%3E")}a.mapboxgl-ctrl-logo.mapboxgl-compact{width:21px;height:21px;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 21 21'%3E%3Cpath d='M10.5 1.25c-5.11 0-9.25 4.15-9.25 9.25s4.15 9.25 9.25 9.25 9.25-4.15 9.25-9.25c0-5.11-4.14-9.25-9.25-9.25zm4.39 11.53c-1.93 1.93-4.78 2.31-6.7 2.31-.7 0-1.41-.05-2.1-.16 0 0-1.02-5.64 2.14-8.81a4.4 4.4 0 0 1 3.13-1.28c1.27 0 2.49.51 3.39 1.42 1.84 1.84 1.89 4.75.14 6.52z' class='st0' opacity='.9' fill='%23fff'/%3E%3Cpath d='M10.5 0C4.7 0 0 4.71 0 10.5S4.7 21 10.5 21 21 16.3 21 10.5C20.99 4.71 16.3 0 10.5 0zm0 19.75c-5.11 0-9.25-4.15-9.25-9.25s4.14-9.26 9.25-9.26 9.25 4.15 9.25 9.25c0 5.13-4.14 9.26-9.25 9.26z' class='st1' opacity='.35'/%3E%3Cpath d='M14.74 6.26c-1.84-1.84-4.76-1.9-6.51-.15-3.16 3.17-2.14 8.81-2.14 8.81s5.64 1.02 8.81-2.14c1.74-1.77 1.69-4.68-.16-6.52zm-2.27 4.09l-.91 1.87-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9z' class='st1' opacity='.35'/%3E%3Cpath class='st0' opacity='.9' fill='%23fff' d='M11.56 12.22l-.9-1.87-1.86-.91 1.86-.9.9-1.87.91 1.87 1.86.9-1.86.91z'/%3E%3C/svg%3E")}.mapboxgl-ctrl.mapboxgl-ctrl-attrib{padding:0 5px;background-color:hsla(0,0%,100%,.5);margin:0}@media screen{.mapboxgl-ctrl-attrib.mapboxgl-compact{margin:10px;position:relative;background-color:#fff;border-radius:12px 3px 3px 12px}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 4px 2px 24px;visibility:visible}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover,.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:hover{padding:2px 24px 2px 4px;border-radius:3px 12px 12px 3px}.mapboxgl-ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner{display:none}.mapboxgl-ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner{display:block}.mapboxgl-ctrl-attrib.mapboxgl-compact:after{content:"";cursor:pointer;position:absolute;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23333' fill-rule='evenodd' d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");background-color:hsla(0,0%,100%,.5);width:24px;height:24px;box-sizing:border-box;border-radius:12px}.mapboxgl-ctrl-bottom-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;left:0}.mapboxgl-ctrl-top-right>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;left:0}.mapboxgl-ctrl-top-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{top:0;right:0}.mapboxgl-ctrl-bottom-left>.mapboxgl-ctrl-attrib.mapboxgl-compact:after{bottom:0;right:0}}.mapboxgl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.mapboxgl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.mapboxgl-ctrl-attrib .mapbox-improve-map{font-weight:700;margin-right:2px}.mapboxgl-attrib-empty{display:none}.mapboxgl-ctrl-scale{background-color:hsla(0,0%,100%,.75);font-size:10px;border:2px solid #333;border-top:#333;padding:0 5px;color:#333;box-sizing:border-box}.mapboxgl-popup{position:absolute;top:0;right:0;display:flex;will-change:transform;pointer-events:none}.mapboxgl-popup-anchor-top,.mapboxgl-popup-anchor-top-left,.mapboxgl-popup-anchor-top-right{flex-direction:column}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-anchor-left{flex-direction:row}.mapboxgl-popup-anchor-right{flex-direction:row-reverse}.mapboxgl-popup-tip{width:0;height:0;border:10px solid transparent;z-index:1}.mapboxgl-popup-anchor-top .mapboxgl-popup-tip{align-self:center;border-top:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip{align-self:flex-start;border-top:none;border-right:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip{align-self:flex-end;border-top:none;border-left:none;border-bottom-color:#fff}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip{align-self:flex-start;border-bottom:none;border-right:none;border-top-color:#fff}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip{align-self:flex-end;border-bottom:none;border-left:none;border-top-color:#fff}.mapboxgl-popup-anchor-left .mapboxgl-popup-tip{align-self:center;border-right:none;border-left-color:#fff}.mapboxgl-popup-anchor-right .mapboxgl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.mapboxgl-popup-close-button{position:absolute;left:0;top:0;border:0;border-radius:3px 0 0 0;cursor:pointer;background-color:transparent}.mapboxgl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.mapboxgl-popup-content{position:relative;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:10px 10px 15px;pointer-events:auto}.mapboxgl-popup-anchor-top-left .mapboxgl-popup-content{border-top-right-radius:0}.mapboxgl-popup-anchor-top-right .mapboxgl-popup-content{border-top-left-radius:0}.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-content{border-bottom-right-radius:0}.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-content{border-bottom-left-radius:0}.mapboxgl-marker{position:absolute;top:0;right:0;will-change:transform}.mapboxgl-user-location-dot{box-shadow:0 0 2px rgba(0,0,0,.25)}.mapboxgl-user-location-dot,.mapboxgl-user-location-dot:before{background-color:#1da1f2;width:15px;height:15px;border-radius:50%}.mapboxgl-user-location-dot:before{content:"";position:absolute;animation:mapboxgl-user-location-dot-pulse 2s infinite}.mapboxgl-user-location-dot:after{border-radius:50%;border:2px solid #fff;content:"";height:19px;right:-2px;position:absolute;top:-2px;width:19px;box-sizing:border-box}@keyframes mapboxgl-user-location-dot-pulse{0%{transform:scale(1);opacity:1}70%{transform:scale(3);opacity:0}to{transform:scale(1);opacity:0}}.mapboxgl-user-location-dot-stale{background-color:#aaa}.mapboxgl-user-location-dot-stale:after{display:none}.mapboxgl-crosshair,.mapboxgl-crosshair .mapboxgl-interactive,.mapboxgl-crosshair .mapboxgl-interactive:active{cursor:crosshair}.mapboxgl-boxzoom{position:absolute;top:0;right:0;width:0;height:0;background:#fff;border:2px dotted #202020;opacity:.5}@media print{.mapbox-improve-map{display:none}} \ No newline at end of file