azure-maps-control 3.0.0-preview.1 → 3.0.0-preview.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,4 +52,4 @@ Elle s’applique également, même si Microsoft connaissait ou devrait connaît
52
52
  EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous pourriez avoir d’autres droits prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois de votre pays si celles-ci ne le permettent pas.
53
53
  */
54
54
 
55
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("azuremaps-maplibre-gl")):"function"==typeof define&&define.amd?define(["exports","azuremaps-maplibre-gl"],e):e((t=t||self).atlas=t.atlas||{},t.maplibregl)}(this,function(u,p){"use strict";p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;var t="atlas.microsoft.com",e="atlas.microsoft.com",o="styling",n="2022-08-05",l="api-version",r="{{azMapsDomain}}",h="{azMapsDomain}",i="{{azMapsView}}",s="view",a="{{azMapsLanguage}}",c="{{azMapsStylingPath}}",d="{{azMapsStylePath}}",f="styling",m="styles",y="2.0",g=function(t,e){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)};function v(t,e){function o(){this.constructor=t}g(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var b=function(){return(b=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function w(t,s,a,l){return new(a=a||Promise)(function(o,e){function n(t){try{i(l.next(t))}catch(t){e(t)}}function r(t){try{i(l.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((l=l.apply(t,s||[])).next())})}function _(o,n){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(o,a)}catch(t){e=[6,t],i=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}function x(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s}function L(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(C(arguments[e]));return t}var S=(k.prototype.merge=function(){for(var e,t,o,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{for(var i=x(n),s=i.next();!s.done;s=i.next()){var a=s.value;if(a)for(var l in a)a.hasOwnProperty(l)&&this.hasOwnProperty(l)&&(void 0!==a[l]&&null!=a[l]?this[l]instanceof k?this[l].merge(a[l]):this[l]=a[l]:(o=o||new(Object.getPrototypeOf(this).constructor),this[l]=o[l]))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return this},k);function k(){}var M,P=(v(I,M=S),I);function I(){var t=null!==M&&M.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}var O=(A.prototype.get=function(){return fetch(this.toString(),{method:"GET",mode:"cors",headers:new Headers(this.options.headers)}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)})},A.prototype.toString=function(){var t=this,e=Object.entries(t.options.queryParams).map(function(t){t=C(t,2);return t[0]+"="+t[1]}).join("&"),o=[],n=t.options.path||"";return A.protoRegEx.test(n)?o.push(n):(t.options.domain&&(A.protoRegEx.test(t.options.domain)||(o.push(t.options.protocol+"://"),o.push(t.options.subdomain?t.options.subdomain+".":"")),o.push(t.options.domain)),o.push(t.options.path?"/"+n:"")),o.push(e?"?"+e:""),o.join("")},A.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i),A);function A(t){this.options=(new P).merge(t)}var E="3.0.0-preview.1",T=(D.getFullVersion=function(){return E},D.getEndpointVersion=function(){var t=E.indexOf(".");return-1===(t=E.indexOf(".",t+1))?E:E.substring(0,t)},D);function D(){}function z(t){var e=document.createElement("span");e.innerText=t,e.classList.add("tooltiptext"),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&e.classList.add("dark");var o=window.matchMedia("(prefers-color-scheme: dark)"),t=function(t){t=t.matches;t&&!e.classList.contains("dark")?e.classList.add("dark"):!t&&e.classList.contains("dark")&&e.classList.remove("dark")};return"function"==typeof o.addEventListener?o.addEventListener("change",t):"function"==typeof o.addListener&&o.addListener(t),-1!=navigator.userAgent.indexOf("Edg")?e.classList.add("edge"):-1!=navigator.userAgent.indexOf("Chrome")?e.classList.add("chrome"):-1!=navigator.userAgent.indexOf("Safari")?e.classList.add("safari"):-1!=navigator.userAgent.indexOf("Firefox")&&e.classList.add("firefox"),-1!=navigator.userAgent.indexOf("Windows")?e.classList.add("win"):-1!=navigator.userAgent.indexOf("Macintosh")&&e.classList.add("mac"),e}function R(r,i,s){function t(t){var e=i.getBoundingClientRect(),o=r.getBoundingClientRect(),n=e.x+o.width>window.innerWidth?window.innerWidth-o.width:e.x,o=e.y+e.height+o.height+4>window.innerHeight?e.y-o.height-4:e.y+e.height+4;s&&i.parentElement&&(e=i.parentElement?i.parentElement.getBoundingClientRect():null,r.style.position="absolute",n-=e.x,o-=e.y),r.style.transform="translate("+n+"px, "+o+"px)"}void 0===s&&(s=!1),i.addEventListener("mouseover",t),i.addEventListener("focusin",t)}(wt=u.ControlPosition||(u.ControlPosition={})).TopLeft="top-left",wt.TopRight="top-right",wt.BottomLeft="bottom-left",wt.BottomRight="bottom-right",wt.NonFixed="non-fixed";var B,j=(v(F,B=S),F);function F(){var t=null!==B&&B.apply(this,arguments)||this;return t.position=u.ControlPosition.NonFixed,t}var N=(Z.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],o=0;o<t.length;o++){var n=t[o]/255;e[o]=n<=.03928?n/12.92:Math.pow((.055+n)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},Z.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d");e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1);e=e.getImageData(0,0,1,1).data;return[e[0],e[1],e[2],e[3]]},Z);function Z(t){var e;t&&(e=void 0,3<=(e="string"==typeof t?this.getRBGA(t):t).length&&(this.r=e[0],this.g=e[1],this.b=e[2],3<e.length&&(this.a=e[3])))}(Ct=u.ControlStyle||(u.ControlStyle={})).light="light",Ct.dark="dark",Ct.auto="auto";var q=Map,H=(U.prototype._addEventListener=function(t,e,o){this.listeners.has(t)||this.listeners.set(t,new q),this.listeners.get(t).set(e,o)},U.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},U.prototype._invokeEvent=function(o,n){var r=this;this.listeners.has(o)&&this.listeners.get(o).forEach(function(t,e){t&&r._removeEventListener(o,e);try{e(n)}catch(t){console.error(t)}})},U);function U(){this.listeners=new q}var W,G=Object.freeze({__proto__:null,EventEmitter:H}),K=(v(V,W=H),V.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.events.remove("stylechanged",this._onStyleChange),delete this._map),this._observer&&(this._observer.disconnect(),delete this._observer),delete this._theme},V.prototype.buildContainer=function(t,e,o,n){var r=this;return this._map=t,this._container=document.createElement(n||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof o&&this._container.setAttribute("aria-label",o),e.toLowerCase()===u.ControlStyle.auto?this._map.styles.definitions().then(function(t){r._map&&r._map.events.add("stylechanged",r._onStyleChange)}):this._container.classList.add(e),this._container},V.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},V.activateClickDelay=100,V);function V(){var e=null!==W&&W.apply(this,arguments)||this;return e._onStyleChange=function(){e._map.getStyle().style.toLowerCase().startsWith("blank")?e._observer||(e._onBackgroundChange(),e._observer=new MutationObserver(e._onBackgroundChange),e._observer.observe(e._map.getMapContainer(),{attributes:!0,attributeFilter:["style"]})):(e._observer&&(e._observer.disconnect(),delete e._observer),e._map.styles.getThemeAsync(e._map.getStyle()).then(function(t){e._setTheme(t)}))},e._onBackgroundChange=function(){var t=new N(e._map.getMapContainer().style.backgroundColor).getLuminosity(),t=isNaN(t)||.5<t?u.ControlStyle.light:u.ControlStyle.dark;e._setTheme(t)},e}var Y,J=(v($,Y=S),$);function $(){var t=null!==Y&&Y.apply(this,arguments)||this;return t.rotationDegreesDelta=15,t.style=u.ControlStyle.light,t.inverted=!1,t}var X,Q=(v(tt,X=K),tt.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Rotation Control"),r=this.constructRotationButton(t),i=this.constructRotationGrid(t,e),t=z("Reset to Default Rotation");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element")))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&tt.InvertOrderPositions.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(t),R(t,r)):(n.appendChild(r),n.appendChild(t),R(t,r),n.appendChild(i)),n},tt.prototype.constructRotationGrid=function(t,e){var o=document.createElement("div");o.classList.add("sub-container"),o.classList.add("hidden-accessible-element");var n=this.constructRightRotationButton(t),r=this.constructLeftRotationButton(t),i=z("Rotate Left"),t=z("Rotate Right");return e&&tt.InvertOrderPositions.includes(e.position)?(o.appendChild(n),o.appendChild(t),R(t,n),o.appendChild(r),o.appendChild(i),R(i,r)):(o.appendChild(r),o.appendChild(i),R(i,r),o.appendChild(n),o.appendChild(t),R(t,n)),o},tt.prototype.constructRotationButton=function(e){var o=this,t=document.createElement("button");t.classList.add("azure-maps-control-button"),t.classList.add("rotation"),t.setAttribute("aria-label","Reset to Default Rotation"),t.setAttribute("alt","Reset to Default Rotation"),t.setAttribute("type","button");var n=document.createElement("div");return t.appendChild(n),t.addEventListener("click",function(t){t.timeStamp-o.lastActiveTime>K.activateClickDelay&&e.setCamera({bearing:tt.DefaultRotation},!0)}),e.events.add("rotate",function(t){n.style.transform="rotate("+-t.map.getCamera().bearing+"deg)"}),t},tt.prototype.constructRightRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-right"),o.setAttribute("aria-label","Rotate Right"),o.setAttribute("alt","Rotate Right"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing-(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:tt.RotationDuration,type:"ease"},!0)}),o},tt.prototype.constructLeftRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-left"),o.setAttribute("aria-label","Rotate Left"),o.setAttribute("alt","Rotate Left"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing+(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:tt.RotationDuration,type:"ease"},!0)}),o},tt.DefaultRotation=0,tt.RotationDuration=100,tt.InvertOrderPositions=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],tt);function tt(t){var e=X.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new J).merge(t),e}var et,ot=(v(nt,et=S),nt);function nt(){var t=null!==et&&et.apply(this,arguments)||this;return t.pitchDegreesDelta=10,t.style=u.ControlStyle.light,t.inverted=!1,t}var rt,it=(v(st,rt=K),st.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Pitch Control"),r=this.constructPitchButton(t),i=this.constructPitchGrid(t,e),s=z("Reset to Default Pitch");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element")))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&st.INVERT_ORDER_POSITIONS.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(s),R(s,n)):(n.appendChild(r),n.appendChild(s),R(s,n),n.appendChild(i)),this.map=t,this.container=n,this.pitchButton=r,t.events.add("pitch",this.pitchChanged),this.updatePitchButtonsState(),n},st.prototype.onRemove=function(){this.container&&(this.container.remove(),this.container=null,this.pitchButton=null,this.pitchIncrementButton=null,this.pitchDecrementButton=null),this.map&&(this.map.events.remove("pitch",this.pitchChanged),this.map=null)},st.prototype.constructPitchGrid=function(t,e){var o=document.createElement("div");o.classList.add("sub-container"),o.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(t),this.pitchDecrementButton=this.constructPitchDecrementButton(t);var n=z("Increase Pitch"),t=z("Decrease Pitch");return e&&st.INVERT_ORDER_POSITIONS.includes(e.position)?(o.appendChild(this.pitchDecrementButton),o.appendChild(t),R(t,this.pitchDecrementButton),o.appendChild(this.pitchIncrementButton),o.appendChild(n),R(n,this.pitchIncrementButton)):(o.appendChild(this.pitchIncrementButton),o.appendChild(n),R(n,this.pitchIncrementButton),o.appendChild(this.pitchDecrementButton),o.appendChild(t),R(t,this.pitchDecrementButton)),o},st.prototype.constructPitchButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch"),o.setAttribute("aria-label","Reset to Default Pitch"),o.setAttribute("alt","Reset to Default Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){event.timeStamp-e.lastActiveTime>K.activateClickDelay&&t.setCamera({pitch:st.DEFAULT_PITCH},!0)}),o},st.prototype.constructPitchDecrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-down"),o.setAttribute("aria-label","Decrease Pitch"),o.setAttribute("alt","Decrease Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch-(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:st.PITCH_DURATION_MS,type:"ease"},!0)}),o},st.prototype.constructPitchIncrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-up"),o.setAttribute("aria-label","Increase Pitch"),o.setAttribute("alt","Increase Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch+(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:st.PITCH_DURATION_MS,type:"ease"},!0)}),o},st.PITCH_DURATION_MS=100,st.DEFAULT_PITCH=0,st.INVERT_ORDER_POSITIONS=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],st);function st(t){var o=rt.call(this)||this;return o.container=null,o.map=null,o.pitchButton=null,o.pitchIncrementButton=null,o.pitchDecrementButton=null,o.hasMouse=!1,o.hasFocus=!1,o.pitchChanged=function(t){return o.updatePitchButtonsState()},o.updatePitchButtonsState=function(){var t=o.map.getCamera().pitch<=0,e=60<=o.map.getCamera().pitch;o.hasFocus&&o.pitchButton&&(t||e)&&o.pitchButton.focus(),o.options.inverted?(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=t&&(o.pitchIncrementButton.disabled=t),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=e&&(o.pitchDecrementButton.disabled=e)):(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=e&&(o.pitchIncrementButton.disabled=e),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=t&&(o.pitchDecrementButton.disabled=t))},o.options=(new ot).merge(t),o}var at=function(t,e){return t===e||t!=t&&e!=e};var lt=function(t,e){for(var o=t.length;o--;)if(at(t[o][0],e))return o;return-1},ct=Array.prototype.splice;var ut=function(t){var e=this.__data__;return!((t=lt(e,t))<0)&&(t==e.length-1?e.pop():ct.call(e,t,1),--this.size,!0)};var pt=function(t){var e=this.__data__;return(t=lt(e,t))<0?void 0:e[t][1]};var ht=function(t){return-1<lt(this.__data__,t)};var dt=function(t,e){var o=this.__data__,n=lt(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this};function ft(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=function(){this.__data__=[],this.size=0},ft.prototype.delete=ut,ft.prototype.get=pt,ft.prototype.has=ht,ft.prototype.set=dt;var mt=ft;var yt=function(){this.__data__=new mt,this.size=0};var gt=function(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t};var vt=function(t){return this.__data__.get(t)};var bt=function(t){return this.__data__.has(t)},wt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _t(t,e){return t(e={exports:{}},e.exports),e.exports}var xt="object"==typeof wt&&wt&&wt.Object===Object&&wt,Ct="object"==typeof self&&self&&self.Object===Object&&self,Lt=xt||Ct||Function("return this")(),ut=Lt.Symbol,pt=Object.prototype,St=pt.hasOwnProperty,kt=pt.toString,Mt=ut?ut.toStringTag:void 0;var Pt=function(t){var e=St.call(t,Mt),o=t[Mt];try{var n=!(t[Mt]=void 0)}catch(t){}var r=kt.call(t);return n&&(e?t[Mt]=o:delete t[Mt]),r},It=Object.prototype.toString;var Ot=function(t){return It.call(t)},At=ut?ut.toStringTag:void 0;var Et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(At&&At in Object(t)?Pt:Ot)(t)};var Tt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var Dt=function(t){return!!Tt(t)&&("[object Function]"==(t=Et(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)},ht=Lt["__core-js_shared__"],zt=(dt=/[^.]+$/.exec(ht&&ht.keys&&ht.keys.IE_PROTO||""))?"Symbol(src)_1."+dt:"";var Rt=function(t){return!!zt&&zt in t},Bt=Function.prototype.toString;var jt=function(t){if(null!=t){try{return Bt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Ft=/^\[object .+?Constructor\]$/,wt=Function.prototype,Ct=Object.prototype,pt=wt.toString,ht=Ct.hasOwnProperty,Nt=RegExp("^"+pt.call(ht).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Zt=function(t){return!(!Tt(t)||Rt(t))&&(Dt(t)?Nt:Ft).test(jt(t))};var qt=function(t,e){return null==t?void 0:t[e]};var Ht=function(t,e){return e=qt(t,e),Zt(e)?e:void 0},Ut=Ht(Lt,"Map"),Wt=Ht(Object,"create");var dt=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},Gt=Object.prototype.hasOwnProperty;var wt=function(t){var e=this.__data__;if(Wt){var o=e[t];return"__lodash_hash_undefined__"===o?void 0:o}return Gt.call(e,t)?e[t]:void 0},Kt=Object.prototype.hasOwnProperty;Ct=function(t){var e=this.__data__;return Wt?void 0!==e[t]:Kt.call(e,t)};pt=function(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=Wt&&void 0===e?"__lodash_hash_undefined__":e,this};function Vt(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Vt.prototype.clear=function(){this.__data__=Wt?Wt(null):{},this.size=0},Vt.prototype.delete=dt,Vt.prototype.get=wt,Vt.prototype.has=Ct,Vt.prototype.set=pt;var Yt=Vt;ht=function(){this.size=0,this.__data__={hash:new Yt,map:new(Ut||mt),string:new Yt}};var Jt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var $t=function(t,e){return t=t.__data__,Jt(e)?t["string"==typeof e?"string":"hash"]:t.map};dt=function(t){return t=$t(this,t).delete(t),this.size-=t?1:0,t};wt=function(t){return $t(this,t).get(t)};Ct=function(t){return $t(this,t).has(t)};pt=function(t,e){var o=$t(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this};function Xt(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Xt.prototype.clear=ht,Xt.prototype.delete=dt,Xt.prototype.get=wt,Xt.prototype.has=Ct,Xt.prototype.set=pt;var Qt=Xt;wt=function(t,e){var o=this.__data__;if(o instanceof mt){var n=o.__data__;if(!Ut||n.length<199)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new Qt(n)}return o.set(t,e),this.size=o.size,this};function te(t){t=this.__data__=new mt(t);this.size=t.size}te.prototype.clear=yt,te.prototype.delete=gt,te.prototype.get=vt,te.prototype.has=bt,te.prototype.set=wt;var ee=te;var oe=function(t,e){for(var o=-1,n=null==t?0:t.length;++o<n&&!1!==e(t[o],o,t););return t},ne=function(){try{var t=Ht(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var re=function(t,e,o){"__proto__"==e&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o},ie=Object.prototype.hasOwnProperty;var se=function(t,e,o){var n=t[e];ie.call(t,e)&&at(n,o)&&(void 0!==o||e in t)||re(t,e,o)};var ae=function(t,e,o,n){var r=!o;o=o||{};for(var i=-1,s=e.length;++i<s;){var a=e[i],l=n?n(o[a],t[a],a,o,t):void 0;void 0===l&&(l=t[a]),(r?re:se)(o,a,l)}return o};var le=function(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n};var ce=function(t){return null!=t&&"object"==typeof t};var Ct=function(t){return ce(t)&&"[object Arguments]"==Et(t)},pt=Object.prototype,ue=pt.hasOwnProperty,pe=pt.propertyIsEnumerable,he=Ct(function(){return arguments}())?Ct:function(t){return ce(t)&&ue.call(t,"callee")&&!pe.call(t,"callee")},de=Array.isArray;function fe(){return!1}var me=_t(function(t,e){var o=e&&!e.nodeType&&e,e=o&&t&&!t.nodeType&&t,o=e&&e.exports===o?Lt.Buffer:void 0,o=o?o.isBuffer:void 0;t.exports=o||fe}),ye=/^(?:0|[1-9]\d*)$/;var ge=function(t,e){var o=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&ye.test(t))&&-1<t&&t%1==0&&t<e};var ve=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},be={};be["[object Float32Array]"]=be["[object Float64Array]"]=be["[object Int8Array]"]=be["[object Int16Array]"]=be["[object Int32Array]"]=be["[object Uint8Array]"]=be["[object Uint8ClampedArray]"]=be["[object Uint16Array]"]=be["[object Uint32Array]"]=!0,be["[object Arguments]"]=be["[object Array]"]=be["[object ArrayBuffer]"]=be["[object Boolean]"]=be["[object DataView]"]=be["[object Date]"]=be["[object Error]"]=be["[object Function]"]=be["[object Map]"]=be["[object Number]"]=be["[object Object]"]=be["[object RegExp]"]=be["[object Set]"]=be["[object String]"]=be["[object WeakMap]"]=!1;yt=function(t){return ce(t)&&ve(t.length)&&!!be[Et(t)]};var gt=function(e){return function(t){return e(t)}},vt=_t(function(t,e){var e=e&&!e.nodeType&&e,o=e&&t&&!t.nodeType&&t,n=o&&o.exports===e&&xt.process,e=function(){try{var t=o&&o.require&&o.require("util").types;return t?t:n&&n.binding&&n.binding("util")}catch(t){}}();t.exports=e}),bt=vt&&vt.isTypedArray,we=bt?gt(bt):yt,_e=Object.prototype.hasOwnProperty;var xe=function(t,e){var o,n=de(t),r=!n&&he(t),i=!n&&!r&&me(t),s=!n&&!r&&!i&&we(t),a=n||r||i||s,l=a?le(t.length,String):[],c=l.length;for(o in t)!e&&!_e.call(t,o)||a&&("length"==o||i&&("offset"==o||"parent"==o)||s&&("buffer"==o||"byteLength"==o||"byteOffset"==o)||ge(o,c))||l.push(o);return l},Ce=Object.prototype;var Le=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ce)};var wt=function(e,o){return function(t){return e(o(t))}},Se=wt(Object.keys,Object),ke=Object.prototype.hasOwnProperty;var Me=function(t){if(!Le(t))return Se(t);var e,o=[];for(e in Object(t))ke.call(t,e)&&"constructor"!=e&&o.push(e);return o};var Pe=function(t){return null!=t&&ve(t.length)&&!Dt(t)};var Ie=function(t){return(Pe(t)?xe:Me)(t)};var Oe=function(t,e){return t&&ae(e,Ie(e),t)};var Ae=function(t){var e=[];if(null!=t)for(var o in Object(t))e.push(o);return e},Ee=Object.prototype.hasOwnProperty;var Te=function(t){if(!Tt(t))return Ae(t);var e,o=Le(t),n=[];for(e in t)("constructor"!=e||!o&&Ee.call(t,e))&&n.push(e);return n};var De=function(t){return Pe(t)?xe(t,!0):Te(t)};var ze=function(t,e){return t&&ae(e,De(e),t)},Re=_t(function(t,e){var o=e&&!e.nodeType&&e,e=o&&t&&!t.nodeType&&t,o=e&&e.exports===o?Lt.Buffer:void 0,n=o?o.allocUnsafe:void 0;t.exports=function(t,e){return e?t.slice():(e=t.length,e=n?n(e):new t.constructor(e),t.copy(e),e)}});var Be=function(t,e){var o=-1,n=t.length;for(e=e||Array(n);++o<n;)e[o]=t[o];return e};var je=function(t,e){for(var o=-1,n=null==t?0:t.length,r=0,i=[];++o<n;){var s=t[o];e(s,o,t)&&(i[r++]=s)}return i};var pt=function(){return[]},Fe=Object.prototype.propertyIsEnumerable,Ne=Object.getOwnPropertySymbols,Ze=Ne?function(e){return null==e?[]:(e=Object(e),je(Ne(e),function(t){return Fe.call(e,t)}))}:pt;var qe=function(t,e){return ae(t,Ze(t),e)};var He=function(t,e){for(var o=-1,n=e.length,r=t.length;++o<n;)t[r+o]=e[o];return t},Ue=wt(Object.getPrototypeOf,Object),We=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)He(e,Ze(t)),t=Ue(t);return e}:pt;var Ge=function(t,e){return ae(t,We(t),e)};var Ke=function(t,e,o){return e=e(t),de(t)?e:He(e,o(t))};var Ve=function(t){return Ke(t,Ie,Ze)};function Ye(t){return Ke(t,De,We)}var Ct=Ht(Lt,"DataView"),bt=Ht(Lt,"Promise"),yt=Ht(Lt,"Set"),wt=Ht(Lt,"WeakMap"),Je="[object Map]",$e="[object Promise]",Xe="[object Set]",Qe="[object WeakMap]",to="[object DataView]",eo=jt(Ct),oo=jt(Ut),no=jt(bt),ro=jt(yt),io=jt(wt),pt=Et,so=pt=Ct&&pt(new Ct(new ArrayBuffer(1)))!=to||Ut&&pt(new Ut)!=Je||bt&&pt(bt.resolve())!=$e||yt&&pt(new yt)!=Xe||wt&&pt(new wt)!=Qe?function(t){var e=Et(t),t="[object Object]"==e?t.constructor:void 0,t=t?jt(t):"";if(t)switch(t){case eo:return to;case oo:return Je;case no:return $e;case ro:return Xe;case io:return Qe}return e}:pt,ao=Object.prototype.hasOwnProperty;var lo=function(t){var e=t.length,o=new t.constructor(e);return e&&"string"==typeof t[0]&&ao.call(t,"index")&&(o.index=t.index,o.input=t.input),o},co=Lt.Uint8Array;var uo=function(t){var e=new t.constructor(t.byteLength);return new co(e).set(new co(t)),e};var po=function(t,e){return e=e?uo(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)},ho=/\w*$/;var fo=function(t){var e=new t.constructor(t.source,ho.exec(t));return e.lastIndex=t.lastIndex,e},Ct=ut?ut.prototype:void 0,mo=Ct?Ct.valueOf:void 0;var yo=function(t){return mo?Object(mo.call(t)):{}};var go=function(t,e){return e=e?uo(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)};var vo=function(t,e,o){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return uo(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return po(t,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return go(t,o);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return fo(t);case"[object Set]":return new n;case"[object Symbol]":return yo(t)}},bo=Object.create;function wo(){}var _o=function(t){if(!Tt(t))return{};if(bo)return bo(t);wo.prototype=t;t=new wo;return wo.prototype=void 0,t};var xo=function(t){return"function"!=typeof t.constructor||Le(t)?{}:_o(Ue(t))};var bt=function(t){return ce(t)&&"[object Map]"==so(t)},yt=vt&&vt.isMap,Co=yt?gt(yt):bt;var wt=function(t){return ce(t)&&"[object Set]"==so(t)},pt=vt&&vt.isSet,Lo=pt?gt(pt):wt,So="[object Arguments]",ko="[object Function]",Mo="[object Object]",Po={};Po[So]=Po["[object Array]"]=Po["[object ArrayBuffer]"]=Po["[object DataView]"]=Po["[object Boolean]"]=Po["[object Date]"]=Po["[object Float32Array]"]=Po["[object Float64Array]"]=Po["[object Int8Array]"]=Po["[object Int16Array]"]=Po["[object Int32Array]"]=Po["[object Map]"]=Po["[object Number]"]=Po[Mo]=Po["[object RegExp]"]=Po["[object Set]"]=Po["[object String]"]=Po["[object Symbol]"]=Po["[object Uint8Array]"]=Po["[object Uint8ClampedArray]"]=Po["[object Uint16Array]"]=Po["[object Uint32Array]"]=!0,Po["[object Error]"]=Po[ko]=Po["[object WeakMap]"]=!1;var Io=function o(n,r,i,t,e,s){var a,l=1&r,c=2&r,u=4&r;if(void 0!==(a=i?e?i(n,t,e,s):i(n):a))return a;if(!Tt(n))return n;var p=de(n);if(p){if(a=lo(n),!l)return Be(n,a)}else{var h=so(n),t=h==ko||"[object GeneratorFunction]"==h;if(me(n))return Re(n,l);if(h==Mo||h==So||t&&!e){if(a=c||t?{}:xo(n),!l)return c?Ge(n,ze(a,n)):qe(n,Oe(a,n))}else{if(!Po[h])return e?n:{};a=vo(n,h,l)}}l=(s=s||new ee).get(n);if(l)return l;s.set(n,a),Lo(n)?n.forEach(function(t){a.add(o(t,r,i,t,n,s))}):Co(n)&&n.forEach(function(t,e){a.set(e,o(t,r,i,e,n,s))});var c=u?c?Ye:Ve:c?keysIn:Ie,d=p?void 0:c(n);return oe(d||n,function(t,e){d&&(t=n[e=t]),se(a,e,o(t,r,i,e,n,s))}),a};var Oo=function(t){return Io(t,5)};var Ao=function(t,e,o){(void 0===o||at(t[e],o))&&(void 0!==o||e in t)||re(t,e,o)};var Eo=function(l){return function(t,e,o){for(var n=-1,r=Object(t),i=o(t),s=i.length;s--;){var a=i[l?s:++n];if(!1===e(r[a],a,r))break}return t}}();var To=function(t){return ce(t)&&Pe(t)},Ct=Function.prototype,yt=Object.prototype,Do=Ct.toString,zo=yt.hasOwnProperty,Ro=Do.call(Object);var Bo=function(t){return!(!ce(t)||"[object Object]"!=Et(t))&&(null===(t=Ue(t))||"function"==typeof(t=zo.call(t,"constructor")&&t.constructor)&&t instanceof t&&Do.call(t)==Ro)};var jo=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var Fo=function(t){return ae(t,De(t))};var No=function(t,e,o,n,r,i,s){var a,l,c,u=jo(t,o),p=jo(e,o),h=s.get(p);h?Ao(t,o,h):((a=void 0===(c=i?i(u,p,o+"",t,e,s):void 0))&&(h=!(l=de(p))&&me(p),e=!l&&!h&&we(p),c=p,l||h||e?c=de(u)?u:To(u)?Be(u):h?Re(p,!(a=!1)):e?go(p,!(a=!1)):[]:Bo(p)||he(p)?he(c=u)?c=Fo(u):Tt(u)&&!Dt(u)||(c=xo(p)):a=!1),a&&(s.set(p,c),r(c,p,n,i,s),s.delete(p)),Ao(t,o,c))};var Zo=function n(r,i,s,a,l){r!==i&&Eo(i,function(t,e){var o;l=l||new ee,Tt(t)?No(r,i,e,s,n,a,l):(o=a?a(jo(r,e),t,e+"",r,i,l):void 0,Ao(r,e,o=void 0===o?t:o))},De)};function qo(t){return t}var Ho=function(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)},Uo=Math.max;var Wo=function(i,s,a){return s=Uo(void 0===s?i.length-1:s,0),function(){for(var t=arguments,e=-1,o=Uo(t.length-s,0),n=Array(o);++e<o;)n[e]=t[s+e];for(var e=-1,r=Array(s+1);++e<s;)r[e]=t[e];return r[s]=a(n),Ho(i,this,r)}};var Go=function(t){return function(){return t}},Ko=Date.now;var Vo=function(o){var n=0,r=0;return function(){var t=Ko(),e=16-(t-r);if(r=t,0<e){if(800<=++n)return arguments[0]}else n=0;return o.apply(void 0,arguments)}}(ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:Go(e),writable:!0})}:qo);var Yo=function(t,e){return Vo(Wo(t,e,qo),t+"")};var Jo=function(t,e,o){if(!Tt(o))return!1;var n=typeof e;return!!("number"==n?Pe(o)&&ge(e,o.length):"string"==n&&e in o)&&at(o[e],t)};var $o,Xo=function(a){return Yo(function(t,e){var o=-1,n=e.length,r=1<n?e[n-1]:void 0,i=2<n?e[2]:void 0,r=3<a.length&&"function"==typeof r?(n--,r):void 0;for(i&&Jo(e[0],e[1],i)&&(r=n<3?void 0:r,n=1),t=Object(t);++o<n;){var s=e[o];s&&a(t,s,o,r)}return t})}(function(t,e,o){Zo(t,e,o)}),Qo=(v(tn,$o=S),tn);function tn(){var t=null!==$o&&$o.apply(this,arguments)||this;return t.layout="icons",t.mapStyles=["road","grayscale_light","grayscale_dark","night","road_shaded_relief"],t.style=u.ControlStyle.light,t.autoSelectionMode=!0,t}var en,bt=(v(on,en=K),on.prototype.onAdd=function(t,e){var o=this;this.map=t;var n=this.buildContainer(t,this.options.style,"Map Style Control"),r=this.buildStyleOpsGrid();this.styleOpsGrid=r;var i=this.buildCurrStyleBtn(),t=z("Select Style");return r.classList.add(e&&e.position||"top-right"),n.addEventListener("mouseover",function(){o.hasMouse=!0,n.classList.add(on.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(){o.hasFocus=!0,n.classList.add(on.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(n.classList.remove(on.Css.inUse),r.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse||(n.classList.remove(on.Css.inUse),r.classList.add("hidden-accessible-element")))}),r.addEventListener("keydown",function(t){27===t.keyCode&&(t.stopPropagation(),i.focus(),n.classList.contains(on.Css.inUse)&&(n.classList.remove(on.Css.inUse),r.classList.add("hidden-accessible-element")))}),i.addEventListener("click",function(t){n.classList.contains(on.Css.inUse)?(n.classList.remove(on.Css.inUse),r.classList.add("hidden-accessible-element")):(n.classList.add(on.Css.inUse),r.classList.remove("hidden-accessible-element"),r.firstElementChild&&r.firstElementChild.focus())}),e&&on.InvertOrderPositions.includes(e.position)?(n.appendChild(r),n.appendChild(i),n.appendChild(t),R(t,i)):(n.appendChild(i),n.appendChild(t),R(t,i),n.appendChild(r)),n},on.prototype.onRemove=function(){en.prototype.onRemove.call(this),this.styleOpsGrid=null,this.styleButtons.clear(),this.map.events.remove("stylechanged",this.onStyleChange),this.map.events.remove("mapconfigurationchanged",this.onMapConfigurationChange)},on.prototype.setSelectedStyle=function(o){var e,t,n=this;this.styleIcons.has(o)&&(e=this.currStyleImage,t=this.styleIcons.get(o),e.src!==t&&(e.src=t),Object.entries(this.styleButtons).forEach(function(t){var e=C(t,2),t=e[0];return e[1].setAttribute("aria-current",t===o?"true":"false")}),this.map.styles.definitions().then(function(t){t=n.mapToFriendlyStyleName(o,t);e.alt!==t&&(e.alt=t),e.parentElement.lastChild instanceof Text&&(e.parentElement.lastChild.textContent=t)}))},on.prototype.disableStyle=function(t){t=this.styleButtons[t];t&&t.setAttribute("disabled","true")},on.prototype.enableStyle=function(t){t=this.styleButtons[t];t&&t.removeAttribute("disabled")},on.prototype.buildSelectStyleBtn=function(o,t,e){var n=this,r=document.createElement("button"),i=this.mapToFriendlyStyleName(o,t);r.setAttribute("aria-label",i),r.setAttribute("type","button");var s=new Image;e.then(function(t){return t.blob()}).then(function(t){t=URL.createObjectURL(t);s.src=t,o===n.map.getStyle().style&&(n.currStyleImage.src=t,n.currStyleImage.alt=i,n.currStyleImage.parentElement.lastChild.nodeType==Node.TEXT_NODE?n.currStyleImage.parentElement.lastChild.textContent=i:n.currStyleImage.parentElement.appendChild(document.createTextNode(i))),n.styleIcons.set(o,t)}),s.setAttribute("aria-hidden","true"),r.appendChild(s),"icons"===this.options.layout?r.classList.add(on.Css.button):(r.classList.add(on.Css.listButton),r.classList.add(on.Css.expanded),r.appendChild(document.createTextNode(i))),r.addEventListener("click",function(){n.hasMouse=!1,n.hasFocus=!1;var t=n.styleButtons[o];t&&!t.hasAttribute("disabled")&&(n._invokeEvent("styleselected",o),n.options.autoSelectionMode&&n.map.setStyle({style:o}),Object.entries(n.styleButtons).forEach(function(t){var e=C(t,2),t=e[0];return e[1].setAttribute("aria-current",t===o?"true":"false")}))});e=document.createElement("div");return e.classList.add("selected-icon"),r.appendChild(e),r},on.prototype.buildCurrStyleBtn=function(){var t=document.createElement("button");"icons"==this.options.layout?t.classList.add(on.Css.button):t.classList.add(on.Css.listButton),t.classList.add(on.Css.currentStyle),t.setAttribute("aria-label","Select Style"),t.setAttribute("tabindex","-1"),this.currStyleImage=new Image,t.appendChild(this.currStyleImage);var e=document.createElement("div");return e.classList.add("icon"),t.appendChild(e),t},on.prototype.buildStyleOpsGrid=function(){var t=this,e=document.createElement("div");return e.classList.add(on.Css.styleOptions),"icons"===this.options.layout?e.classList.add(this.options.layout):e.classList.add(on.Css.dropdown),e.setAttribute("aria-label","Style Options"),e.classList.add("hidden-accessible-element"),this.map.styles.definitions().then(function(e){return w(t,void 0,void 0,function(){return _(this,function(t){return this.onMapConfigurationChange(e),this.map.events.add("stylechanged",this.onStyleChange),[2]})})}),this.map.events.add("mapconfigurationchanged",this.onMapConfigurationChange),e},on.prototype.populateOpsGridFromDefinitions=function(n){var t,o,r=this;this.styleOpsGrid&&(t=n.configurations,(t=Array.isArray(this.options.mapStyles)?t.filter(function(t){return r.options.mapStyles.includes(t.name.split("_indoor")[0])}):t).forEach(function(t){var e={url:t.thumbnail};t.thumbnail&&r.map.styles._transformStyleRequest(t.thumbnail,e);var o=r.map.getServiceOptions();o.transformRequest&&Xo(e,o.transformRequest(e.url,"Thumbnail"));e=fetch(e.url,{headers:e.headers}),e=r.buildSelectStyleBtn(t.name,n,e);r.styleOpsGrid.appendChild(e),r.styleButtons[t.name]=e,"icons"===r.options.layout&&(t=z(r.mapToFriendlyStyleName(t.name,n)),r.styleOpsGrid.appendChild(t),R(t,e))}),o=this.map.getStyle().style,Object.entries(this.styleButtons).forEach(function(t){var e=C(t,2),t=e[0];return e[1].setAttribute("aria-current",t===o?"true":"false")}))},on.InvertOrderPositions=[u.ControlPosition.TopRight,u.ControlPosition.BottomRight],on.Css={button:"azure-maps-control-button",listButton:"azure-maps-control-list-button",expanded:"expanded",currentStyle:"curr-style",inUse:"in-use",styleOptions:"style-options",dropdown:"azure-maps-control-dropdown"},on);function on(t){var e=en.call(this)||this;return e.styleOpsGrid=null,e.hasMouse=!1,e.hasFocus=!1,e.styleButtons=new q,e.styleIcons=new q,e.onStyleChange=function(){var t;e.options.autoSelectionMode&&(t=e.map.getStyle().style,e.setSelectedStyle(t))},e.onMapConfigurationChange=function(t){e.styleOpsGrid&&(Array.from(e.styleOpsGrid.children).forEach(function(t){return t.remove()}),e.styleButtons.clear(),e.populateOpsGridFromDefinitions(t))},e.mapToFriendlyStyleName=function(e,t){t=t.configurations.find(function(t){return t.name===e});return(null==t?void 0:t.displayName)||e},e.options=(new Qo).merge(Oo(t)),e}var nn,rn=(v(sn,nn=S),sn);function sn(){var t=null!==nn&&nn.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}var an,ln=(v(cn,an=rn),cn);function cn(){var t=null!==an&&an.apply(this,arguments)||this;return t.isActive=!1,t.style=u.ControlStyle.light,t}var un,pn=(v(hn,un=K),Object.defineProperty(hn.prototype,"isActive",{get:function(){if(!this.map)return!1;var t=this.map.getTraffic();return"none"!==t.flow||t.incidents},set:function(t){this.map&&this.map.setTraffic({flow:t?this.options.flow:"none",incidents:!!t&&this.options.incidents})},enumerable:!1,configurable:!0}),hn.prototype.onAdd=function(t){(this.map=t).getTraffic();void 0!==this.initIsActive&&(this.isActive=this.initIsActive),this.container=this.buildContainer(t,this.style,"Traffic Control"),this.container.style.flexDirection="column";var e=this.constructTrafficButton(t);this.container.appendChild(e);t=z("Toggle Traffic Display");return this.container.appendChild(t),R(t,e),this.container},hn.prototype.onRemove=function(){un.prototype.onRemove.call(this),this.map=null},hn.prototype.getOptions=function(){return(new ln).merge({isActive:this.isActive,flow:this.options.flow,incidents:this.options.incidents,style:this.style})},hn.prototype.updateButtonState=function(){this.trafficButton&&(this.isActive?this.container.classList.add("in-use"):this.container.classList.remove("in-use"),this.trafficButton.setAttribute("aria-pressed",this.isActive?"true":"false"))},hn.prototype.constructTrafficButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("traffic"),o.setAttribute("aria-label","Toggle Traffic Display"),o.setAttribute("alt","Toggle Traffic Display"),o.setAttribute("type","button"),this.trafficButton=o,this.updateButtonState(),o.addEventListener("click",function(){e.isActive=!e.isActive}),o},hn);function hn(t){var e=un.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new rn).merge({flow:"relative",incidents:!0}),e.style=u.ControlStyle.light,e.container=null,e.trafficButton=null,e.map=null,t&&(e.initIsActive=t.isActive||!1,e.options.flow=t.flow||"relative",e.options.incidents=t.incidents||!0,e.style=t.style||u.ControlStyle.light),e}var dn,vt=(v(fn,dn=K),fn.prototype.onAdd=function(t){this.map=t;var e=this.buildContainer(t,u.ControlStyle.auto,"Traffic Legend"),t=this.buildTrafficLegendDiv(t);return e.setAttribute("role","definition"),e.appendChild(t),e},fn.prototype.onRemove=function(){dn.prototype.onRemove.call(this),this.syncHiddenState&&(this.map.events.remove("styledata",this.syncHiddenState),this.syncHiddenState=null),this.map=null},fn.prototype.buildTrafficLegendDiv=function(e){var o,t,n,r,i=document.createElement("div");i.classList.add("traffic-legend","hidden"),i.setAttribute("alt","Traffic Legend");var s=document.createElement("table"),a=document.createElement("tr"),l=document.createElement("td");l.setAttribute("alt","Traffic"),l.appendChild(document.createTextNode("Traffic"));var c=z("Traffic");l.classList.add("traffic-legend-title"),l.colSpan=6,a.appendChild(l),a.appendChild(c),R(c,l),s.appendChild(a);var u=document.createElement("tr");try{for(var p=x(this.table),h=p.next();!h.done;h=p.next()){var d=h.value,f=document.createElement("td");if("Fast"===d||"Slow"===d)f.setAttribute("alt",d),f.appendChild(document.createTextNode(d)),f.classList.add("traffic-legend-text");else{f.classList.add("traffic-legend-colors"),f.setAttribute("aria-label","Traffic Legend"),f.setAttribute("role","img");try{for(var m=(n=void 0,x(d)),y=m.next();!y.done;y=m.next()){var g=y.value,v=document.createElement("div");v.classList.add(g),f.appendChild(v)}}catch(t){n={error:t}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}u.appendChild(f);var b=z(d instanceof Array?"Traffic Legend":d);u.appendChild(b),R(b,f)}}catch(t){o={error:t}}finally{try{h&&!h.done&&(t=p.return)&&t.call(p)}finally{if(o)throw o.error}}return s.appendChild(u),i.appendChild(s),this.syncHiddenState=function(t){"style"===t.dataType&&((t=e.getTraffic()).flow&&"none"!==t.flow?i.classList.remove("hidden"):i.classList.add("hidden"))},this.syncHiddenState({dataType:"style"}),e.events.add("styledata",this.syncHiddenState),i},fn);function fn(){var t=dn.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t.map=null,t.syncHiddenState=null,t}gt=function(t){return this.__data__.has(t)};function mn(t){var e=-1,o=null==t?0:t.length;for(this.__data__=new Qt;++e<o;)this.add(t[e])}mn.prototype.add=mn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},mn.prototype.has=gt;var yn=mn;var gn=function(t,e){for(var o=-1,n=null==t?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1};var vn=function(t,e){return t.has(e)};var bn=function(t,e,o,n,r,i){var s=1&o,a=t.length,l=e.length;if(a!=l&&!(s&&a<l))return!1;if((l=i.get(t))&&i.get(e))return l==e;var c=-1,u=!0,p=2&o?new yn:void 0;for(i.set(t,e),i.set(e,t);++c<a;){var h,d=t[c],f=e[c];if(void 0!==(h=n?s?n(f,d,c,e,t,i):n(d,f,c,t,e,i):h)){if(h)continue;u=!1;break}if(p){if(!gn(e,function(t,e){if(!vn(p,e)&&(d===t||r(d,t,o,n,i)))return p.push(e)})){u=!1;break}}else if(d!==f&&!r(d,f,o,n,i)){u=!1;break}}return i.delete(t),i.delete(e),u};function wn(t){var o=-1,n=Array(t.size);return t.forEach(function(t,e){n[++o]=[e,t]}),n}function _n(t){var e=-1,o=Array(t.size);return t.forEach(function(t){o[++e]=t}),o}var pt=ut?ut.prototype:void 0,xn=pt?pt.valueOf:void 0;var Cn=function(t,e,o,n,r,i,s){switch(o){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return t.byteLength==e.byteLength&&i(new co(t),new co(e))?!0:!1;case"[object Boolean]":case"[object Date]":case"[object Number]":return at(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=wn;case"[object Set]":a=a||_n;if(t.size!=e.size&&!(1&n))return!1;var l=s.get(t);if(l)return l==e;n|=2,s.set(t,e);a=bn(a(t),a(e),n,r,i,s);return s.delete(t),a;case"[object Symbol]":if(xn)return xn.call(t)==xn.call(e)}return!1},Ln=Object.prototype.hasOwnProperty;var Sn=function(t,e,o,n,r,i){var s=1&o,a=Ve(t),l=a.length;if(l!=Ve(e).length&&!s)return!1;for(var c=l;c--;){var u=a[c];if(!(s?u in e:Ln.call(e,u)))return!1}var p=i.get(t);if(p&&i.get(e))return p==e;var h=!0;i.set(t,e),i.set(e,t);for(var d,f=s;++c<l;){var m,y=t[u=a[c]],g=e[u];if(!(void 0===(m=n?s?n(g,y,u,e,t,i):n(y,g,u,t,e,i):m)?y===g||r(y,g,o,n,i):m)){h=!1;break}f=f||"constructor"==u}return!h||f||(d=t.constructor)!=(p=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof d&&d instanceof d&&"function"==typeof p&&p instanceof p)&&(h=!1),i.delete(t),i.delete(e),h},kn="[object Arguments]",Mn="[object Array]",Pn="[object Object]",In=Object.prototype.hasOwnProperty;var On=function(t,e,o,n,r,i){var s=de(t),a=de(e),l=s?Mn:so(t),c=a?Mn:so(e),u=(l=l==kn?Pn:l)==Pn,a=(c=c==kn?Pn:c)==Pn;if((c=l==c)&&me(t)){if(!me(e))return!1;u=!(s=!0)}if(c&&!u)return i=i||new ee,s||we(t)?bn(t,e,o,n,r,i):Cn(t,e,l,o,n,r,i);if(!(1&o)){u=u&&In.call(t,"__wrapped__"),a=a&&In.call(e,"__wrapped__");if(u||a)return r(u?t.value():t,a?e.value():e,o,n,i=i||new ee)}return!!c&&(i=i||new ee,Sn(t,e,o,n,r,i))};var An=function t(e,o,n,r,i){return e===o||(null==e||null==o||!ce(e)&&!ce(o)?e!=e&&o!=o:On(e,o,n,r,t,i))};var En,Tn=function(t,e){return An(t,e)},Dn=(En=Object.freeze({__proto__:null,default:{}}))&&En.default||En,zn=_t(function(a){!function(){for(var e,o,n=0,r=[],t=0;t<256;t++)r[t]=(t+256).toString(16).substr(1);function i(){var t,t=(t=16,(!e||s.BUFFER_SIZE<n+t)&&(n=0,e=s.randomBytes(s.BUFFER_SIZE)),e.slice(n,n+=t));return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function s(){var t=i();return r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}s.BUFFER_SIZE=4096,s.bin=i,s.clearBuffer=function(){e=null,n=0},s.test=function(t){return"string"==typeof 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)},"undefined"!=typeof crypto?o=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(o=window.msCrypto),o=o||Dn,(a.exports=s).randomBytes=function(){if(o){if(o.randomBytes)return o.randomBytes;if(o.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){t=new Uint8Array(t);return o.getRandomValues(t),Array.from(t)}:function(t){t=new Uint8Array(t);return o.getRandomValues(t),t}}return function(t){for(var e=[],o=0;o<t;o++)e.push(Math.floor(256*Math.random()));return e}}()}()}),Rn=(Bn.TYPE="Feature",Bn);function Bn(t,e,o,n){this.type="Feature",this.type=Bn.TYPE,this.properties=e||{},this.id=o,this.geometry=t,this.bbox=n}var jn,Fn=(v(Nn,jn=Array),Nn.fromData=function(o){var n=NaN,r=NaN,i=new Set(["y"]),s=new Set(["x"]);return Object.keys(o).forEach(function(t){var e=t.toLowerCase();isNaN(n)&&i.has(e)&&"number"==typeof o[t]?n=o[t]:isNaN(r)&&s.has(e)&&"number"==typeof o[t]&&(r=o[t])}),isNaN(n)||isNaN(r)?null:new Nn(n,r)},Nn.getX=function(t){return 0<t.length?t[0]:NaN},Nn.getY=function(t){return 1<t.length?t[1]:NaN},Nn.getDestination=function(t,e,o){return new Nn(Nn.getX(t)+o*Math.cos((e+270)*Math.PI/180),Nn.getY(t)+o*Math.sin((e+270)*Math.PI/180))},Nn.getDistance=function(t,e){var o=Nn.getX(t)-Nn.getX(e),e=Nn.getY(t)-Nn.getY(e);return Math.sqrt(o*o+e*e)},Nn.getHeading=function(t,e){var o=Nn.getX(e)-Nn.getX(t),e=Nn.getY(t)-Nn.getY(e);return 180*(2.5*Math.PI-Math.atan2(e,o))/Math.PI%360},Nn);function Nn(t,e){return jn.call(this,t,e)||this}var Zn=(qn.TYPE="Point",qn);function qn(t){this.type="Point",this.type=qn.TYPE,this.coordinates=t}var Hn,Un,Wn,Gn,Kn,Vn=6378137,Yn=Math.PI/180,Jn=180/Math.PI,$n=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],Xn=85.0511;function Qn(t){return t*Yn}function tr(t){return t*Jn}function er(t,e,o){return Math.min(Math.max(t,e),o)}function or(t,e){var o=Qn(e[1]-t[1]),n=Qn(e[0]-t[0]),n=Math.pow(Math.sin(o/2),2)+Math.cos(Qn(t[1]))*Math.cos(Qn(e[1]))*Math.pow(Math.sin(n/2),2),n=2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n));return Math.round(Vn*n*100)/100}function nr(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return Un.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return Un.kilometers;case"miles":case"mile":case"mi":return Un.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return Un.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return Un.yards;default:return Un.meters}return Un.meters}function rr(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return Kn.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return Kn.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return Kn.knotsPerSecond;case"standardgravity":case"g":return Kn.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return Kn.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return Kn.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return Kn.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return Kn.kilometersPerHourSecond;default:return Kn.metersPerSecondSquared}return Kn.metersPerSecondSquared}function ir(t){if(t)switch(t){case"acres":case"ac":return Hn.acres;case"hectares":case"ha":return Hn.hectares;case"squareFeet":case"ft^2":case"ft2":return Hn.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return Hn.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return Hn.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return Hn.squareMiles;default:return Hn.squareMeters}return Hn.squareMeters}function sr(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return Gn.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return Gn.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return Gn.knots;case"mach":case"m":return Gn.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return Gn.kilometersPerHour;default:return Gn.metersPerSecond}return Gn.metersPerSecond}function ar(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return Wn.ms;case"minutes":case"minute":case"mins":case"min":return Wn.minutes;case"hours":case"hour":case"hr":case"h":return Wn.hours;case"days":case"day":case"d":return Wn.days;default:return Wn.seconds}return Wn.seconds}function lr(t){var e=0;if(t&&0<t.length)for(var e=Math.abs(cr(t[0])),o=1,n=t.length;o<n;o++)e-=Math.abs(cr(t[o]));return e}function cr(t){var e=0;if(3<=t.length){for(var o=void 0,n=void 0,r=0,i=t.length;r<i;r++)e+=(Qn(t[r===i-2?(o=i-2,n=i-1,0):r===i-1?(o=i-1,n=0,1):(n=(o=r)+1,r+2)][0])-Qn(t[o][0]))*Math.sin(Qn(t[n][1]));e=e*Vn*Vn/2}return e}function ur(t,e,o){return(t[0]-o[0])*(e[1]-o[1])-(t[1]-o[1])*(e[0]-o[0])}function pr(t,e,o){if(2<=o.length){for(var n,r,i=1/0,s=null,a=Ir(o,22),l=0,c=a.length-1;l<c;l++)r=function(t,e,o){if(e[0]===o[0]&&e[1]===o[1])return e;var n=t[0]-e[0],r=t[1]-e[1],i=o[0]-e[0],t=o[1]-e[1],r=(i*n+t*r)/(i*i+t*t);return r<0?e:1<r?o:[e[0]+i*r,e[1]+t*r]}(e,a[l],a[l+1]),(n=Fn.getDistance(e,r))<i&&(i=n,s=r);if(s){var u=Pr([s],22)[0];return new Rn(new Zn(u),{distance:mr(t,u)})}}else if(1===o.length)return new Rn(new Zn(o[0]),{distance:mr(t,o[0])});return null}function hr(t,e){var o;return!isNaN(t)&&"number"==typeof e&&0<=e&&(o=void 0,o=e<$n.length?$n[e]:Math.pow(10,e),t=Math.round(t*o)/o),t}function dr(t,e,o,n){switch(nr(e)){case Un.meters:t/=1e3;break;case Un.feet:t/=3280.8399;break;case Un.miles:t/=.62137119;break;case Un.yards:t/=1093.6133;break;case Un.nauticalMiles:t/=.5399568;break;case Un.kilometers:}switch(nr(o)){case Un.meters:t*=1e3;break;case Un.feet:t*=3280.8399;break;case Un.miles:t*=.62137119;break;case Un.yards:t*=1093.6133;break;case Un.nauticalMiles:t*=.5399568;break;case Un.kilometers:}return"number"==typeof n&&0<=n&&(n=Math.pow(10,n),t=Math.round(t*n)/n),t}function fr(t,e,o,n){n=n||"meters",t=Fr(t);var r=yr(n),n=Qn(t[1]),t=Qn(t[0]),e=e*Yn,o=o/r,r=Math.asin(Math.sin(n)*Math.cos(o)+Math.cos(n)*Math.sin(o)*Math.cos(e)),n=t+Math.atan2(Math.sin(e)*Math.sin(o)*Math.cos(n),Math.cos(o)-Math.sin(n)*Math.sin(r)),r=er(Sr(r*Jn),-85,85);return[kr(n*Jn),r]}function mr(t,e,o){e=or(t=Fr(t),e=Fr(e));return"meters"===o?e:dr(e,"meters",o||"meters")}function yr(t){t=nr(t);return dr(Vn,Un.meters,t)}function gr(t,e,o){for(var n=[],r=Qn(t[1]),i=Qn(t[0]),s=Qn(e[1]),a=Qn(e[0]),l=2*Math.asin(Math.sqrt(Math.pow(Math.sin((r-s)/2),2)+Math.cos(r)*Math.cos(s)*Math.pow(Math.sin((i-a)/2),2))),c=0;c<=o;c++){var u=c/o,p=Math.sin((1-u)*l)/Math.sin(l),h=Math.sin(u*l)/Math.sin(l),d=p*Math.cos(r)*Math.cos(i)+h*Math.cos(s)*Math.cos(a),u=p*Math.cos(r)*Math.sin(i)+h*Math.cos(s)*Math.sin(a),h=p*Math.sin(r)+h*Math.sin(s),h=Math.atan2(h,Math.sqrt(Math.pow(d,2)+Math.pow(u,2))),d=Math.atan2(u,d),h=er(h*Jn,-85,85);d*=Jn,n.push([d,h])}return n}function vr(t){return(Array.isArray(t)?t:t.coordinates).reduce(function(t,e){var o=0<t.length?t[t.length-1]:null;return o&&180<Math.abs(e[0]-o[0])?(o=o[0]<0?e[0]-360:e[0]+360,t.push([o,e[1]])):t.push(e),t},[])}function br(t){for(var e,o,n,r,i,s=Array.isArray(t)?t:t.coordinates,a=[],l=[],c=0;c<s.length;c++)a.push(s[c]),c+1>=s.length||(e=(n=C(s[c],2))[0],o=n[1],i=(r=C(s[c+1],2))[0],n=r[1],180<Math.abs(i-e)&&(r=0<e?180:-180,i=Math.abs((0<e?i+360:i-360)-e),i=o+(n-o)*(Math.abs(r-e)/i),a.push([r,i]),l.push(a),a=[[-r,i]]));return l.push(a),l}function wr(t,e){if(t=Fr(t),e=Fr(e),t&&2<=t.length&&e&&2<=e.length){var o=Qn(t[1]),n=Qn(e[1]),e=Qn(e[0]-t[0]),t=Math.sin(e)*Math.cos(n),e=Math.cos(o)*Math.sin(n)-Math.sin(o)*Math.cos(n)*Math.cos(e);return(tr(Math.atan2(t,e))+360)%360}return NaN}function _r(t,e){var o,n=0;Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var r=0,i=o.length-1;r<i;r++)n+=or(o[r],o[r+1]);return dr(n,"meters",e||"meters")}function xr(t,e,o){o=o||"meters";var n,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(n=mr(r[a-1],r[a],o))){var l=wr(r[a-1],r[a]);return fr(r[a-1],l,e-i,o)}i+=n}return i<=e?r[s-1]:r[0]}return null}function Cr(t,e,o,n,r){n=n||"meters",r=r||0,t=Fr(t);for(var i=[],s=360/o,a=0;a<=o;a++)i.push(fr(t,(a*s+r)%360,e,n));return i}function Lr(t,e,o,n,r){return vr(Cr(t,e,o,n,r))}function Sr(t){return 90<t?180<(t=(t+90)%360)?90-(t-180):t-90:t<-90?(t=(t-90)%360)<-180?-90-(t+180):t+90:t}function kr(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function Mr(t,e,o){if(0===o)return Object.assign({},t);e=Fr(e);for(var n,r,i=[],s=0,a=t.length;s<a;s++)n=mr(e,t[s]),r=wr(e,t[s]),i.push(fr(e,r+o,n));return i}function Pr(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)o=t[s][0]/r-.5,n=.5-t[s][1]/r,i.push([360*o,90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI]);return i}function Ir(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)n=Math.sin(t[s][1]*Math.PI/180),o=(t[s][0]+180)/360,n=.5-Math.log((1+n)/(1-n))/(4*Math.PI),i.push([Math.round(o*r),Math.round(n*r)]);return i}function Or(t,e,o,n){switch(rr(e)){case Kn.kilometersPerHourSecond:t/=3.6;break;case Kn.milesPerHourSecond:t/=2.236936292054;break;case Kn.knotsPerSecond:t/=1.943844492441;break;case Kn.standardGravity:t/=.1019716212978;break;case Kn.kilometersPerSecondSquared:t/=.001;break;case Kn.milesPerSecondSquared:t/=.000621371192;break;case Kn.feetPerSecondSquared:t/=3.280839895012;break;case Kn.yardsPerSecondSquared:t/=1.093613298338;break;case Kn.metersPerSecondSquared:}switch(rr(o)){case Kn.kilometersPerHourSecond:t*=3.6;break;case Kn.milesPerHourSecond:t*=2.236936292054;break;case Kn.knotsPerSecond:t*=1.943844492441;break;case Kn.standardGravity:t*=.1019716212978;break;case Kn.kilometersPerSecondSquared:t*=.001;break;case Kn.milesPerSecondSquared:t*=.000621371192;break;case Kn.feetPerSecondSquared:t*=3.280839895012;break;case Kn.yardsPerSecondSquared:t*=1.093613298338;break;case Kn.metersPerSecondSquared:}return hr(t,n)}function Ar(t,e,o,n){switch(ir(e)){case Hn.acres:t*=4046.8564224;break;case Hn.hectares:t*=1e4;break;case Hn.squareFeet:t*=.09290304;break;case Hn.squareKilometers:t*=1e6;break;case Hn.squareMiles:t*=259e4;break;case Hn.squareYards:t*=.83612736;break;case Hn.squareMeters:}switch(ir(o)){case Hn.acres:t/=4046.8564224;break;case Hn.hectares:t/=1e4;break;case Hn.squareFeet:t/=.09290304;break;case Hn.squareKilometers:t/=1e6;break;case Hn.squareMiles:t/=259e4;break;case Hn.squareYards:t/=.83612736;break;case Hn.squareMeters:}return hr(t,n)}function Er(t,e,o,n){switch(sr(e)){case Gn.feetPerSecond:t*=1.09728;break;case Gn.milesPerHour:t*=1.6093;break;case Gn.knots:t*=1.852;break;case Gn.metersPerSecond:t*=3.6;break;case Gn.mach:t*=1234.8;break;case Gn.kilometersPerHour:}switch(sr(o)){case Gn.feetPerSecond:t/=1.09728;break;case Gn.milesPerHour:t/=1.6093;break;case Gn.knots:t/=1.852;break;case Gn.metersPerSecond:t/=3.6;break;case Gn.mach:t/=1234.8;break;case Gn.kilometersPerHour:}return hr(t,n)}function Tr(t,e,o,n){switch(ar(e)){case Wn.ms:t/=1e3;break;case Wn.hours:t*=3600;break;case Wn.minutes:t*=60;break;case Wn.days:t*=86400;break;case Wn.seconds:}switch(ar(o)){case Wn.ms:t*=1e3;break;case Wn.hours:t/=3600;break;case Wn.minutes:t/=60;break;case Wn.days:t/=86400;break;case Wn.seconds:}return hr(t,n)}function Dr(t,e,o,n,r,i,s,a){r=dr(e,r,Un.meters),i=Tr(o,i,Wn.seconds);return Or(2*(r-Er(t,n,Gn.metersPerSecond)*i)/(i*i),Kn.metersPerSecondSquared,s,a)}function zr(t,e,o,n,r,i,s){t=Er(t,n,Gn.metersPerSecond);return Or((Er(e,n,Gn.metersPerSecond)-t)/Tr(o,r,Wn.seconds),Kn.metersPerSecondSquared,i,s)}function Rr(t,e,o,n){t=Br(t),e=Br(e);return null!=t&&null!=e?Tr(e.getTime()-t.getTime(),Wn.ms,o,n):NaN}function Br(t){if("[object Date]"===Object.prototype.toString.call(t))return t;if("string"==typeof t){var e=Date.parse(t);if(!isNaN(e))return new Date(e);if(0<=t.indexOf("Date(")){e=0,e=0<(t=t.replace("/Date(","").replace(")/","")).indexOf("+")?parseInt(t.substr(0,t.indexOf("+")),10):0<t.indexOf("-")?parseInt(t.substr(0,t.indexOf("-")),10):parseInt(t,10);return new Date(e)}}else if("number"==typeof t)return new Date(t);return null}function jr(t){var e=[],o=null,n=null;if(Array.isArray(t)&&0<t.length)if(Array.isArray(t[0])&&"number"==typeof t[0][0])e=t;else for(var r=t.length,i=0;i<r;i++)e=e.concat(jr(t[i]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":e=t.coordinates;break;case"Polygon":o=t.coordinates;break;case"MultiPoint":e=t.coordinates;break;case"MultiLineString":o=t.coordinates;break;case"MultiPolygon":n=t.coordinates;break;case"Feature":var s=t,e=Kr._isCircle(s)?Kr._getCirclePositions(s):jr(s.geometry);break;case"FeatureCollection":e=jr(t.features);break;case"GeometryCollection":e=jr(t.geometries)}else if(t instanceof Kr)return jr(t.toJson());if(o)for(r=o.length,i=0;i<r;i++)e=e.concat(o[i]);else if(n)for(var a=n.length,i=0;i<a;i++)for(var l=n[i].length,c=0;c<l;c++)e=e.concat(n[i][c]);return e}function Fr(t){if(Array.isArray(t)&&"number"==typeof t[0])return t;if(t.type){if("Point"===t.type)return t.coordinates;if("Feature"===t.type&&"Point"===t.geometry.type)return t.geometry.coordinates}else if(t instanceof Kr&&"Point"===t.getType())return t.getCoordinates();return null}function Nr(t,e,o){o=o||"meters";var n,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(n=mr(r[a-1],r[a],o))){var l=wr(r[a-1],r[a]),c=fr(r[a-1],l,e-i,o);return new Rn(new Zn(c),{heading:l})}i+=n}return i<=e?new Rn(new Zn(r[s-1]),{heading:wr(r[s-2],r[s-1])}):new Rn(new Zn(r[0]),{heading:wr(r[0],r[1])})}return null}(wt=Hn=Hn||{}).squareMeters="squareMeters",wt.acres="acres",wt.hectares="hectares",wt.squareFeet="squareFeet",wt.squareKilometers="squareKilometers",wt.squareMiles="squareMiles",wt.squareYards="squareYards",(Ct=Un=Un||{}).meters="meters",Ct.kilometers="kilometers",Ct.feet="feet",Ct.miles="miles",Ct.nauticalMiles="nauticalMiles",Ct.yards="yards",(yt=Wn=Wn||{}).seconds="seconds",yt.hours="hours",yt.ms="ms",yt.minutes="minutes",yt.days="days",(gt=Gn=Gn||{}).metersPerSecond="metersPerSecond",gt.kilometersPerHour="kilometersPerHour",gt.feetPerSecond="feetPerSecond",gt.milesPerHour="milesPerHour",gt.knots="knots",gt.mach="mach",(ut=Kn=Kn||{}).milesPerSecondSquared="milesPerSecondSquared",ut.kilometersPerSecondSquared="kilometersPerSecondSquared",ut.knotsPerSecond="knotsPerSecond",ut.standardGravity="standardGravity",ut.feetPerSecondSquared="feetPerSecondSquared",ut.yardsPerSecondSquared="yardsPerSecondSquared",ut.milesPerHourSecond="milesPerHourSecond",ut.kilometersPerHourSecond="kilometersPerHourSecond",ut.metersPerSecondSquared="metersPerSecondSquared";var Zr,qr=(v(Hr,Zr=Array),Hr.fromPosition=function(t){return 2===t.length?new Hr(t[0],t[1]):2<t.length?new Hr(t[0],t[1],t[2]):null},Hr.areEqual=function(t,e,o){if(void 0===o&&(o=6),t&&2<=t.length&&e&&2<=e.length){var n=Math.pow(10,o),r=Sr(t[1]),o=Sr(e[1]),t=kr(t[0]),e=kr(e[0]);if(0!=Math.round((r-o)*n)/n)return!1;n=Math.round((t-e)*n)/n;return 0!=n&&360!=n?!1:!0}return!1},Hr.fromLatLng=function(r,t,e){var i,s,a,l,c,u,o=[];return"number"==typeof r?(o.push(r),"number"==typeof t&&o.push(t),"number"==typeof e&&o.push(e)):Array.isArray(r)?2<=r.length&&"number"==typeof r[0]&&"number"==typeof r[1]&&(3<=r.length&&"number"==typeof r[2]?o.push(r[0],r[1],r[2]):o.push(r[0],r[1])):"object"==typeof r&&(i=["lat","latitude","y"],s=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],u=c=l=NaN,Object.keys(r).forEach(function(t,e,o){var n=t.toLowerCase();isNaN(l)&&0<=i.indexOf(n)&&"number"==typeof r[t]?l=r[t]:isNaN(c)&&0<=s.indexOf(n)&&"number"==typeof r[t]?c=r[t]:isNaN(u)&&0<=a.indexOf(n)&&"number"==typeof r[t]&&(u=r[t])}),isNaN(l)||isNaN(c)||(o.push(c,l),isNaN(u)||o.push(u))),2<=o.length?o:null},Hr.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var o=0,n=t.length;o<n;o++){var r=Hr.fromLatLng(t[o]);r&&e.push(r)}return e},Hr._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},Hr);function Hr(t,e,o){return o?Zr.call(this,t,e,o)||this:Zr.call(this,t,e)||this}var Ur=(Wr.TYPE="Polygon",Wr);function Wr(t,e){this.type="Polygon",this.type=Wr.TYPE,1===qr._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var Gr,Kr=(v(Vr,Gr=H),Vr.prototype.addProperty=function(t,e){Tn(this.data.properties[t],e)||(this.data.properties[t]=Oo(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Vr.prototype.getBounds=function(){var e,t,o,n,r,i=this.getCoordinates(),s=this.getType();if("Point"===s)r=this.circlePolygon?(a=this.circlePolygon.geometry.coordinates,Jr.fromPositions(a[0])):new Jr(a=i,a);else if("MultiPoint"===s||"LineString"===s){var a=i;r=Jr.fromPositions(a)}else if("Polygon"===s){a=i;r=Jr.fromPositions(a[0])}else if("MultiLineString"===s){a=i;try{for(var l=x(a),c=l.next();!c.done;c=l.next()){var u=c.value;r=Jr.merge(r,Jr.fromPositions(u))}}catch(t){e={error:t}}finally{try{c&&!c.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}}else if("MultiPolygon"===s){a=i;try{for(var p=x(a),h=p.next();!h.done;h=p.next()){var d=h.value;r=Jr.merge(r,Jr.fromPositions(d[0]))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(o)throw o.error}}}return r},Vr.prototype.getCoordinates=function(){return Oo(this.data.geometry.coordinates)},Vr.prototype.getCircleCoordinates=function(){return this.circlePolygon?Oo(this.circlePolygon.geometry.coordinates[0]):null},Vr.prototype.getId=function(){return this.data.id},Vr.prototype.getProperties=function(){return Oo(this.data.properties)},Vr.prototype.getType=function(){return this.data.geometry.type},Vr.prototype.isCircle=function(){return Vr._isCircle(this.data)},Vr.prototype.isRectangle=function(){return Vr._isRectangle(this.data)},Vr.prototype.setCoordinates=function(t){t="Polygon"===this.getType()&&1===qr._getDimensions(t)?[t]:t;Tn(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=Oo(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Vr.prototype.setProperties=function(t){t[Vr._shapeIdPropName]=this.data.id,Tn(this.data.properties,t)||(this.data.properties=Oo(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},Vr.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},Vr.prototype._toJson=function(){return this.circlePolygon||this.data},Vr.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},Vr.prototype._handleCircle=function(){var t;this.isCircle()?(t=Vr._getCirclePositions(this.data),this.circlePolygon=new Rn(new Ur([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"):delete this.circlePolygon},Vr._isCircle=function(t){return t&&t.geometry&&"Point"===t.geometry.type&&t.geometry.coordinates&&t.properties&&"string"==typeof t.properties.subType&&"circle"===t.properties.subType.toLowerCase()&&"number"==typeof t.properties.radius},Vr._isRectangle=function(t){if("Polygon"===t.geometry.type&&t.geometry.coordinates&&"string"==typeof t.properties.subType&&"rectangle"===t.properties.subType.toLowerCase()){t=t.geometry.coordinates;if(1===t.length){t=t[0];if(5===t.length)return t[0][0]===t[4][0]&&t[0][1]===t[4][1];if(4===t.length)return!0}}return!1},Vr._getCirclePositions=function(t){return Lr(t.geometry.coordinates,t.properties.radius,72,"meters")},Vr._shapeIdPropName="_azureMapsShapeId",Vr);function Vr(t,e,o){var n,r,i=Gr.call(this)||this;return"Feature"===t.type?(r=Oo((n=t).geometry),o=n.properties?Oo(n.properties):{},e=null==n.id||""===n.id?zn():n.id):(r=Oo(t),e=null==e||""===e?zn():e,o=o?Oo(o):{}),o[Vr._shapeIdPropName]=e,i.data=new Rn(r,o,e),i._handleCircle(),i}var Yr,Jr=(v($r,Yr=Array),$r.fromBoundingBox=function(t){var e=$r.getWest(t),o=$r.getSouth(t),n=$r.getEast(t),t=$r.getNorth(t);return new $r([e,o,n,t])},$r.fromDimensions=function(t,e,o){var n=t[0],r=t[1],t=Math.min(Math.max(r+o/2,-85.5),85.5),r=Math.min(Math.max(r-o/2,-85.5),85.5),o=kr(n+e/2);return new $r([kr(n-e/2),r,o,t])},$r.fromEdges=function(t,e,o,n){return new $r([t,e,o,n])},$r.containsPosition=function(t,e){var o=$r.getCenter(t),n=Math.abs(o[1]-e[1]),o=Math.abs(o[0]-e[0]);180<o&&(o=360-o);e=$r.getHeight(t),t=$r.getWidth(t);return n<=e/2+1e-8&&o<=t/2+1e-8},$r.containsBoundingBox=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;return!(!o||!n)&&($r.getWest(t)<$r.getWest(e)&&$r.getWest(e)<$r.getEast(t)&&$r.getWest(t)<$r.getEast(e)&&$r.getEast(e)<$r.getEast(t)&&$r.getSouth(t)<$r.getSouth(e)&&$r.getSouth(e)<$r.getNorth(t)&&$r.getSouth(t)<$r.getNorth(e)&&$r.getNorth(e)<$r.getNorth(t))},$r.crossesAntimeridian=function(t){return kr($r.getEast(t))-kr($r.getWest(t))<0||$r.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)||$r.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)},$r.getCenter=function(t){var e=kr($r.getEast(t)),o=kr($r.getWest(t));e<o&&(e+=360);o=kr((o+e)/2),e=Sr($r.getSouth(t)),t=Sr($r.getNorth(t));return[o,Sr((e+t)/2)]},$r.getHeight=function(t){t=Sr($r.getNorth(t))-Sr($r.getSouth(t));return isNaN(t)?0:t},$r.getWidth=function(t){t=kr($r.getEast(t))-kr($r.getWest(t));return isNaN(t)?0:t<0?t+360:t},$r.getSouthWest=function(t){var e=this.getSouth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},$r.getNorthEast=function(t){var e=this.getNorth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},$r.getNorthWest=function(t){var e=this.getNorth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},$r.getSouthEast=function(t){var e=this.getSouth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},$r.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},$r.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},$r.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},$r.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},$r.intersect=function(t,e){var o=$r.getCenter(t),n=$r.getCenter(e),r=Math.abs(o[1]-n[1]),i=Math.abs(o[0]-n[0]);180<i&&(i=360-i);o=$r.getHeight(t),n=$r.getWidth(t),t=$r.getHeight(e),e=$r.getWidth(e);return r<=o/2+t/2&&i<=n/2+e/2},$r.merge=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;if(o&&!n)return t;if(n&&!o)return e;if(!o&&!n)return null;for(var o=Math.max(Sr($r.getNorth(t)),Sr($r.getNorth(e))),n=Math.min(Sr($r.getSouth(t)),Sr($r.getSouth(e))),r=[t,e],i=[],s=0,s=0;s<r.length;s++){var a=r[s],l=kr($r.getWest(a)),c=kr($r.getEast(a));$r.crossesAntimeridian(a)?(i.push([l,180]),i.push([-180,c])):i.push([l,c])}i.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var u=[],p=i[0];for(s=1;s<i.length;){var h=i[s];p[1]>=h[0]?p[1]=Math.max(p[1],h[1]):(u.push(p),p=h),s++}u.push(p);var d=u.length,f=u[0][0]+360-u[d-1][1],m=[u[d-1][1],u[0][0]];for(s=1;s<d;s++){var y=u[s][0]-u[s-1][1];f<y&&(f=y,m=[u[s-1][1],u[s][0]])}return new $r([m[1],n],[m[0],o])},$r.fromPositions=function(t){for(var e,o,n=NaN,r=NaN,i=NaN,s=NaN,a=t.length,l=new Array(a),c=0;a--;)(o=t[a])&&2<=o.length&&(e=Sr(o[1]),n=isNaN(n)?e:Math.max(n,e),r=isNaN(r)?e:Math.min(r,e),l[c++]=kr(o[0]));if(c){l.length=c,l.sort(function(t,e){return t-e});for(var u=l[0]+360-l[c-1],p=0,a=1;a<c;a++){var h=l[a]-l[a-1];u<h&&(u=h,p=a)}i=l[p],s=l[(p||c)-1]}return isNaN(i)||isNaN(r)||isNaN(s)||isNaN(n)?null:new $r([i,r,s,n])},$r.fromLatLngs=function(t){return $r.fromPositions(qr.fromLatLngs(t))},$r.fromData=function(t){var e,o,n=null;if(Array.isArray(t)&&0<t.length){try{for(var r=x(t),i=r.next();!i.done;i=r.next()){var s,a=i.value;null!=(s=$r.fromData(a))&&(n=null===n?s:$r.merge(n,s))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n}if(t instanceof Kr)return t.getBounds();if(t&&t.type){var l=t;if(l.bbox&&4===l.bbox.length)return l.bbox;switch(l.type){case"FeatureCollection":return $r.fromData(l.features);case"Feature":return Kr._isCircle(l)?$r.fromPositions(Kr._getCirclePositions(l)):$r.fromData(l.geometry);case"GeometryCollection":return $r.fromData(l.geometries);case"Point":var c=l.coordinates;if(c&&2<=c.length)return[c[0],c[1],c[0],c[1]];break;case"LineString":case"MultiPoint":return $r.fromPositions(l.coordinates);case"Polygon":case"MultiLineString":var u=l.coordinates;if(u&&0<u.length){for(var p=0,h=u.length;p<h;p++)null!=(s=$r.fromPositions(u[p]))&&(n=null===n?s:$r.merge(n,s));if(null!=n)return n}break;case"MultiPolygon":var d=l.coordinates;if(d&&0<d.length){for(p=0,h=d.length;p<h;p++)for(var f=0,m=d[p].length;f<m;f++)null!=(s=$r.fromPositions(d[p][f]))&&(n=null===n?s:$r.merge(n,s));return n}}}return null},$r.splitOnAntimeridian=function(t){var e,o,n,r,i,s,a=[];return $r.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)?[[-180,t[1],t[2],180,t[4],t[5]]]:$r.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)?[[-180,t[1],180,t[3]]]:($r.crossesAntimeridian(t)?(s=e=void 0,o=kr($r.getWest(t)),n=kr($r.getEast(t)),r=Sr($r.getNorth(t)),i=Sr($r.getSouth(t)),s=6<=t.length?(e=[o,i,t[2],180,r,t[5]],[-180,i,t[2],n,r,t[5]]):(e=[o,i,180,r],[-180,i,n,r]),a.push(e,s)):a.push(t),a)},$r.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(t){return 6<=t.length&&360<t[3]-t[0]},$r.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(t){return t.length<6&&360<t[2]-t[0]},$r);function $r(t,e){var o,n=this;return t&&e?n=(o=t)[2]&&e[2]?Yr.call(this,o[0],o[1],o[2]||0,e[0],e[1],e[2]||0)||this:Yr.call(this,o[0],o[1],e[0],e[1])||this:!t||(t=t)&&(4===t.length?n=Yr.call(this,t[0],t[1],t[2],t[3])||this:6<=t.length&&(n=Yr.call(this,t[0],t[1],t[2],t[3],t[4],t[5])||this)),n}var Xr=(Qr.TYPE="FeatureCollection",Qr);function Qr(t,e){this.type="FeatureCollection",this.type=Qr.TYPE,this.features=t,this.bbox=e}ti.TYPE="GeometryCollection",pt=ti;function ti(t){this.type="GeometryCollection",this.type=ti.TYPE,this.geometries=t}ei.TYPE="LineString",wt=ei;function ei(t,e){this.type="LineString",this.type=ei.TYPE,this.coordinates=t,this.bbox=e}oi.TYPE="MultiLineString",Ct=oi;function oi(t,e){this.type="MultiLineString",this.type=oi.TYPE,this.coordinates=t,this.bbox=e}ni.TYPE="MultiPoint",yt=ni;function ni(t,e){this.type="MultiPoint",this.type=ni.TYPE,this.coordinates=t,this.bbox=e}ri.TYPE="MultiPolygon",gt=ri;function ri(t,e){this.type="MultiPolygon",this.type=ri.TYPE,this.coordinates=t,this.bbox=e}var ii,ut=(v(si,ii=Array),si.fromPosition=function(t){return 2<=t.length?new si((180+t[0])/360,si._latToMercatorY(t[1]),3<=t.length?si._altitudeToMercatorZ(t[2],t[1]):0):[0,0,0]},si.fromPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.fromPosition(t[o]));return e},si.toFloat32Array=function(t){for(var e=new Float32Array(3*t.length),o=0,n=t.length;o<n;o++){var r=3*o,i=t[o];e[r]=(180+i[0])/360,e[1+r]=si._latToMercatorY(i[1]),e[2+r]=3<=i.length?si._altitudeToMercatorZ(i[2],i[1]):0}return e},si.toPosition=function(t){if(2<=t.length){var e=360/Math.PI*Math.atan(Math.exp((180-360*t[1])*Math.PI/180))-90;return new qr(360*t[0]-180,e,3<=t.length?si._mercatorZToAltitude(t[2],t[1]):0)}return[0,0,0]},si.toPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.toPosition(t[o]));return e},si.mercatorScale=function(t){return 1/Math.cos(t*Math.PI/180)},si.meterInMercatorUnits=function(t){return 1/si.earthCircumference*si.mercatorScale(si._latToMercatorY(t))},si._circumferenceAtLatitude=function(t){return si.earthCircumference*Math.cos(t*Math.PI/180)},si._altitudeToMercatorZ=function(t,e){return t/si._circumferenceAtLatitude(e)},si._mercatorZToAltitude=function(t,e){return t*si._circumferenceAtLatitude(si._latToMercatorY(e))},si._latToMercatorY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360},si.earthCircumference=2*Math.PI*yr(),si);function si(t,e,o){return ii.call(this,t,e,o||0)||this}var ai,ut=Object.freeze({__proto__:null,Feature:Rn,FeatureCollection:Xr,LineString:wt,Point:Zn,Polygon:Ur,Position:qr,BoundingBox:Jr,MercatorPoint:ut,MultiLineString:Ct,MultiPoint:yt,MultiPolygon:gt,GeometryCollection:pt}),li=_t(function(t,e){function m(t,e){return t*t+e*e}function i(t,e){for(var o,n,r,i=t[0],s=[i],a=1,l=t.length;a<l;a++)o=t[a],r=i,m((n=o)[0]-r[0],n[1]-r[1])>e&&(s.push(o),i=o);return i!==o&&s.push(o),s}function y(t,e,o,n,r){for(var i,s,a,l,c,u,p,h=n,d=e+1;d<o;d++){var f=(s=t[d],a=t[e],l=t[o],p=u=f=c=void 0,c=a[0],f=a[1],u=l[0]-c,p=l[1]-f,0==u&&0==p||(1<(a=((s[0]-c)*u+(s[1]-f)*p)/m(u,p))?(c=l[0],f=l[1]):0<a&&(c+=u*a,f+=p*a)),m(s[0]-c,s[1]-f));h<f&&(i=d,h=f)}n<h&&(1<i-e&&y(t,e,i,n,r),r.push(t[i]),1<o-i&&y(t,i,o,n,r))}e.__esModule=!0,e.SimplifyAP=function(t,e,o){if(t.length<=2)return t;var n,r=(e=void 0===e?1:e)*e;return t=(o=void 0===o?!1:o)?t:i(t,r),e=(n=t).length-1,o=[n[0]],y(n,0,e,r,o),o.push(n[e]),t=o}});(ai=li)&&ai.__esModule&&Object.prototype.hasOwnProperty.call(ai,"default")&&ai.default;var ci=li.SimplifyAP;var ui=(pi.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},pi.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},pi.prototype.transformArray=function(t,e,o){var n,r;if(t&&Array.isArray(t)&&Array.isArray(t[0])){var i=[];try{for(var s=x(t),a=s.next();!a.done;a=s.next()){var l=a.value;i.push(this.transform(l,e,o))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}return null},pi.prototype.transform=function(t,e,o){var n=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],e=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof o&&0<=o?[hr(n,o),hr(e,o)]:[hr(n,6),hr(e,6)]},pi._calculateAffineTransform=function(t,e){if(t.length!==e.length||t.length<1)throw new Error("Error: source and target arrays must have the same length.");var o=Math.min(t[0].length,e[0].length),n=o+1;if(t.length<o)throw new Error("Erorr: At least "+o+" reference points required.");for(var r=[],i=[],s=0;s<n;s++){i[s]=[];for(var a=0;a<n;a++){a<o&&(r[a]=0);for(var l=i[s][a]=0;l<t.length;l++)a<o&&(r[a]+=s<o?t[l][s]*e[l][a]:e[l][a]),i[s][a]+=o<=s&&o<=a?1:o<=s?t[l][a]:o<=a?t[l][s]:t[l][s]*t[l][a]}i[s]=i[s].concat(r)}if(!this._gaussJordanElimination(i))throw new Error("Error: Singular matrix. Points are likely coplanar.");return i},pi._gaussJordanElimination=function(t){for(var e,o=t.length,n=2*o-1,r=0;r<o;r++){for(var i=r,s=r+1;s<o;s++)Math.abs(t[s][r])>Math.abs(t[i][r])&&(i=s);if(e=t[i],t[i]=t[r],t[r]=e,Math.abs(t[r][r])<=1e-12)return!1;for(var a=r+1;a<o;a++)for(var l=t[a][r]/t[r][r],c=r;c<n;c++)t[a][c]-=t[r][c]*l}for(r=o-1;-1<r;r--){l=t[r][r];for(s=0;s<r;s++)for(var u=n-1;r-1<u;u--)t[s][u]-=t[r][u]*t[s][r]/l;t[r][r]/=l;for(var p=o;p<n;p++)t[r][p]/=l}return!0},pi);function pi(t,e){this.M=pi._calculateAffineTransform(t,e),this.inverseM=pi._calculateAffineTransform(e,t)}var hi,Ct=Object.freeze({__proto__:null,AffineTransform:ui,WEBMERCATOR_MAXLAT:Xn,_precision:hr,get AreaUnits(){return Hn},get DistanceUnits(){return Un},get TimeUnits(){return Wn},get SpeedUnits(){return Gn},get AccelerationUnits(){return Kn},boundingBoxToPolygon:function(t){var e=kr(Jr.getWest(t)),o=kr(Jr.getEast(t)),n=Sr(Jr.getNorth(t)),r=Sr(Jr.getSouth(t)),t=Jr.getCenter(t),n=[[e,n],[e,r],[t[0],r],[o,r],[o,n],[t[0],n],[e,n]];return new Ur([n])},convertDistance:dr,getCardinalSpline:function(t,e,o,n){if(!t||t.length<=2)return i;"number"!=typeof e&&(e=.5),("number"!=typeof o||o<=0)&&(o=15);var r=t.length,i=t.slice(0);n?(qr.areEqual(i[0],i[r-1])&&(i.pop(),r--),i.unshift(t[r-1]),i.push(t[0]),i.push(t[1]),r++):(i.unshift(t[0]),i.push(t[r-1]));var s,a,l,c=[];c.push([1,0,0,0]);for(var u=1;u<o-1;u++)c.push([2*(l=(s=u/o)*(a=s*s))-3*a+1,-2*l+3*a,l-2*a+s,l-a]);c.push([0,1,0,0]);for(var p,h,d,f,m,y,g=[],u=1;u<r;u++)for(p=e*(i[u+1][0]-i[u-1][0]),h=e*(i[u+1][1]-i[u-1][1]),d=e*(i[u+2][0]-i[u][0]),f=e*(i[u+2][1]-i[u][1]),s=0;s<o;s++)y=(m=c[s])[0]*i[u][0]+m[1]*i[u+1][0]+m[2]*p+m[3]*d,m=er(m[0]*i[u][1]+m[1]*i[u+1][1]+m[2]*h+m[3]*f,-85,85),g.push([y,m]);return g},getDestination:fr,getDistanceTo:mr,getEarthRadius:yr,getPathDenormalizedAtAntimerian:vr,getPathSplitByAntimeridian:br,getGeodesicPath:function(t,e){var o;(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var n=o.length-1,r=[],i=0;i<n;i++)r=r.concat(gr(o[i],o[i+1],e));return vr(r)},getGeodesicPaths:function(t,e){var o;(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var n=o.length-1,r=[],i=[],s=0;s<n;s++)for(var a,l,c,u,p,h=gr(o[s],o[s+1],e),d=0;d<h.length;d++)r.push(h[d]),d+1>=h.length||(a=(c=C(h[d],2))[0],l=c[1],p=(u=C(h[d+1],2))[0],c=u[1],180<Math.abs(p-a)&&(u=0<a?180:-180,p=Math.abs((0<a?p+360:p-360)-a),p=l+(c-l)*(Math.abs(u-a)/p),r.push([u,p]),i.push(r),r=[[-u,p]]));return i.push(r),i},getHeading:wr,getLengthOfPath:_r,getPositionAlongPath:xr,getRegularPolygonPath:Lr,getRegularPolygonPaths:function(t,e,o,n,r){return br(Cr(t,e,o,n,r))},interpolate:function(t,e,o){o=void 0===o?.5:o;var n=mr(t=Fr(t),e=Fr(e),"kilometers");return fr(t,wr(t,e),n*o,"kilometers")},normalizeLatitude:Sr,normalizeLongitude:kr,rotatePositions:Mr,getPixelHeading:function(t,e){var t=(o=C(Ir([t=Fr(t),e=Fr(e)],21),2))[0],o=(e=o[1])[0]-t[0],e=t[1]-e[1];return(2.5*Math.PI-Math.atan2(e,o))*Jn%360},mercatorPixelsToPositions:Pr,mercatorPositionsToPixels:Ir,convertAcceleration:Or,convertArea:Ar,convertSpeed:Er,convertTimespan:Tr,getAcceleration:Dr,getAccelerationFromSpeeds:zr,getAccelerationFromFeatures:function(t,e,o,n,r,i,s){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var a=Rr(t.properties[o],e.properties[o],Wn.seconds);if(!isNaN(a)){var l=0;if(n&&"string"==typeof n){o=t.properties[n],n=e.properties[n];if("number"==typeof o&&(l=o,"number"==typeof n))return zr(o,n,a,r,Wn.seconds,i,s)}return Dr(l,mr(t.geometry.coordinates,e.geometry.coordinates,Un.meters),a,r,Un.meters,Wn.seconds,i,s)}}return NaN},getArea:function t(e,o,n){if(e){var r=0;switch((e=e instanceof Kr?e.toJson():e).type){case"Feature":var i=e;if(e.geometry)return t(i.geometry,o,n);break;case"Polygon":(i=e).coordinates&&(r=lr(i.coordinates));break;case"MultiPolygon":var s=e;if(s.coordinates)for(var a=0,l=s.coordinates.length;a<l;a++)r+=lr(s.coordinates[a])}return Ar(r,Hn.squareMeters,o,n)}return 0},getSpeed:function(t,e,o,n,r,i){if(t=Fr(t),e=Fr(e),t&&e){n=Tr(o,n,Wn.seconds);return Er(mr(t,e,Un.meters)/n,Gn.metersPerSecond,r,i)}return 0},getSpeedFromFeatures:function(t,e,o,n,r){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){o=this.getTimespan(t.properties[o],e.properties[o],Wn.seconds);if(!isNaN(o)){e=this.getDistanceTo(t.geometry.coordinates,e.geometry.coordinates,Un.meters);return this.convertSpeed(e/o,Gn.metersPerSecond,n,r)}}return NaN},getTimespan:Rr,getTravelDistance:function(t,e,o,n,r,i,s,a){return e=this.convertTimespan(e,r,Wn.seconds),o=(o=this.convertSpeed(o,i,Gn.metersPerSecond))*e,"number"==typeof n&&(o+=.5*this.convertAcceleration(n,s,Kn.metersPerSecondSquared)*e*e),this.convertDistance(o,Un.meters,t,a)},parseTimestamp:Br,getConvexHull:function(t){var e,o,n=jr(t).map(function(t){return[kr(t[0]),Sr(t[1])]});n.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var r=[];try{for(var i=x(n),s=i.next();!s.done;s=i.next()){for(var a=s.value;2<=r.length&&ur(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}for(var l=[],c=n.length-1;0<=c;c--){for(;2<=l.length&&ur(l[l.length-2],l[l.length-1],n[c])<=0;)l.pop();l.push(n[c])}return new Ur([r.concat(l)])},getPositions:jr,getPosition:Fr,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var o=[],n=_r(t,Un.meters)/(e-1),r=0;r<e;r++){var i=xr(t,n*r,Un.meters);null!=i&&o.push(i)}return o},getPointWithHeadingAlongPath:Nr,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var o=[],n=_r(t,Un.meters)/(e-1),r=0;r<e;r++){var i=Nr(t,n*r,Un.meters);null!=i&&o.push(i)}return o},getClosestPointOnGeometry:function t(e,o,n,r){var i=Fr(e),s=Ir([i],22)[0],a=null,l=1/0;switch((o=o instanceof Kr?o.toJson():o).type){case"Feature":return t(e,o.geometry,n);case"Point":f=[[o.coordinates]];break;case"MultiPoint":for(var c,u=o.coordinates,p=0,h=u.length;p<h;p++)(c=mr(i,u[p]))<l&&(l=c,a=new Rn(new Zn(u[p]),{distance:c}));break;case"LineString":f=[o.coordinates];break;case"Polygon":case"MultiLineString":f=o.coordinates;break;case"MultiPolygon":var d=o.coordinates;if(0<d.length)for(var f=d[0],p=1,h=d.length;p<h;p++)f=f.concat(d[p])}if(f)for(var m,p=0,h=f.length;p<h;p++)(m=pr(i,s,f[p]))&&m.properties.distance<l&&(l=m.properties.distance,a=m);return a&&(a.properties.distance=dr(a.properties.distance,"meters",n,r)),a},simplify:function(t,e){return ci(t,e,!0)}}),di=(v(fi,hi=S),fi);function fi(){var t=null!==hi&&hi.apply(this,arguments)||this;return t.zoomDelta=1,t.style=u.ControlStyle.light,t}var mi,yt=(v(yi,mi=K),yi.prototype.onAdd=function(t){this.container=this.buildContainer(t,this.options.style,"Zoom Control"),this.container.style.flexDirection="column",this.zoomInButton=this.constructZoomInButton(t),this.zoomOutButton=this.constructZoomOutButton(t);var e=z("Zoom In"),o=z("Zoom Out");return this.container.appendChild(this.zoomInButton),this.container.appendChild(e),this.container.appendChild(this.zoomOutButton),this.container.appendChild(o),R(e,this.zoomInButton),R(o,this.zoomOutButton),t.events.add("zoom",this.zoomChanged),t.events.add("minzoomchanged",this.minZoomChanged),t.events.add("maxzoomchanged",this.maxZoomChanged),this.map=t,this.container},yi.prototype.onRemove=function(){mi.prototype.onRemove.call(this),this.map&&(this.map.events.remove("zoom",this.zoomChanged),this.map.events.remove("minzoomchanged",this.minZoomChanged),this.map.events.remove("maxzoomchanged",this.maxZoomChanged),this.map=null),this.container&&(this.container.remove(),this.container=null,this.zoomInButton=null,this.zoomOutButton=null)},yi.prototype.updateZoomButtonsState=function(){var t=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),e=Jr.getSouth(this.map.getCamera().bounds)<=-Xn&&Jr.getNorth(this.map.getCamera().bounds)>=Xn,e=this.map.getCamera().zoom<=this.map._getMap().getMinZoom()||e;this.zoomInButton&&this.zoomInButton.disabled!=t&&(this.zoomInButton.disabled=t,this.zoomInButton.setAttribute("aria-label",t?"Zoom In disabled":"Zoom In")),this.zoomOutButton&&this.zoomOutButton.disabled!=e&&(this.zoomOutButton.disabled=e,this.zoomInButton.setAttribute("aria-label",t?"Zoom Out disabled":"Zoom Out"))},yi.prototype.constructZoomInButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("zoom-in"),o.setAttribute("aria-label","Zoom In"),o.setAttribute("alt","Zoom In"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom+e.options.zoomDelta,duration:yi.ZOOM_DURATION_MS,type:"ease"},!0)}),o},yi.prototype.constructZoomOutButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("zoom-out"),o.setAttribute("aria-label","Zoom Out"),o.setAttribute("alt","Zoom Out"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom-e.options.zoomDelta,duration:yi.ZOOM_DURATION_MS,type:"ease"},!0)}),o},yi.ZOOM_DURATION_MS=200,yi);function yi(t){var e=mi.call(this)||this;return e.container=null,e.zoomInButton=null,e.zoomOutButton=null,e.zoomChanged=function(t){return e.updateZoomButtonsState()},e.minZoomChanged=function(t){return e.updateZoomButtonsState()},e.maxZoomChanged=function(t){return e.updateZoomButtonsState()},e.options=(new di).merge(t),e}gt=Object.freeze({__proto__:null,ControlBase:K,PitchControl:it,CompassControl:Q,ZoomControl:yt,StyleControl:bt,TrafficControl:pn,TrafficLegendControl:vt});var gi,vi=function(t,e){return Io(t,5,e="function"==typeof e?e:void 0)},bi=(v(wi,gi=S),wi);function wi(){var t=null!==gi&&gi.apply(this,arguments)||this;return t.buffer=128,t.maxZoom=18,t.cluster=!1,t.clusterRadius=50,t.clusterMaxZoom=void 0,t.clusterProperties=void 0,t.lineMetrics=!1,t.tolerance=.375,t}var _i,xi=(v(Ci,_i=H),Ci.prototype.getId=function(){return this.id},Ci.prototype._setMap=function(t){var e;null==t||void 0===t?(e=this.map,delete this.map,this._invokeEvent("sourceremoved",this),e&&e.events.invoke("sourceremoved",this)):(this.map=t,this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this))},Ci);function Ci(t){var e=_i.call(this)||this;return e.id=t||zn(),e}var Li,Si=(v(ki,Li=xi),ki.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},ki.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},ki.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},ki.prototype.getClusterExpansionZoom=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterExpansionZoom(e,function(t,e){t?n(t):"number"==typeof e&&o(e)}):n("The DataSource hasn't been added to a map.")})},ki.prototype.getClusterChildren=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterChildren(e,function(t,e){t?n(t):e&&o(r.map.sources._mapFeaturesToShapes(e,!1,r))}):n("The DataSource hasn't been added to a map.")})},ki.prototype.getClusterLeaves=function(e,r,i){var s=this;return new Promise(function(o,n){var t;s.map?(t=s.map._getMap().getSource(s.getId()))&&"geojson"===t.type&&t.getClusterLeaves(e,r,i,function(t,e){t?n(t):e&&o(s.map.sources._mapFeaturesToShapes(e,!1,s))}):n("The DataSource hasn't been added to a map.")})},ki.prototype.getOptions=function(){return Oo(this.options)},ki.prototype.getShapes=function(){return Array.from(this.shapes)},ki.prototype.importDataFromUrl=function(t){var e=this;return fetch(t,{method:"GET",mode:"cors"}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)}).then(function(t){e.add(t)})},ki.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},ki.prototype.remove=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i=r.value;"number"==typeof i?this._removeByIndex(i):this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},ki.prototype.removeById=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},ki.prototype.setOptions=function(t){t=(new bi).merge(this.options,Oo(t));Tn(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},ki.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},ki.prototype.toJson=function(){return new Xr(this.shapes.map(function(t){return t.toJson()}))},ki.prototype._toJson=function(){return new Xr(this.shapes.map(function(t){return t._toJson()}))},ki.prototype._buildSource=function(){var t={type:"geojson",data:this._toJson(),maxzoom:this.options.maxZoom,cluster:this.options.cluster,clusterRadius:this.options.clusterRadius,tolerance:this.options.tolerance,lineMetrics:this.options.lineMetrics,clusterProperties:this.options.clusterProperties,buffer:this.options.buffer};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},ki.prototype._addNoUpdate=function(t,e){var o;t instanceof Kr?(this._addToSources(t,e),o=[t]):Array.isArray(t)?(o=t.map(function(t){return t instanceof Kr?t:new Kr(t)}),this._addToSources(o,e)):"FeatureCollection"===t.type?(o=t.features.map(function(t){return new Kr(t)}),this._addToSources(o,e)):"GeometryCollection"===t.type?(o=t.geometries.map(function(t){return new Kr(t)}),this._addToSources(o,e)):(t=new Kr(t),this._addToSources(t,e),o=[t]),this._invokeEvent("dataadded",o)},ki.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new q,t&&0<t.length&&this._invokeEvent("dataremoved",t)},ki.prototype._updateSource=function(){var t=this;void 0!==this.requestId||(this.requestId=requestAnimationFrame(function(){t._updateMboxSource(),t.requestId=void 0}))},ki.prototype._addToSources=function(t,e){var o,n,r,i;if(t=Array.isArray(t)?t:[t],"number"!=typeof e)try{for(var s=x(t),a=s.next();!a.done;a=s.next()){var l=a.value;this.shapes.push(l),this.shapesMap.set(l.getId(),this.shapes.length-1)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}else for(var c=t.length-1;0<=c;c--)this.shapes.splice(e,0,t[c]),this._updateShapesMap(e);try{for(var u=x(t),p=u.next();!p.done;p=u.next())(l=p.value)._setDataSource(this)}catch(t){r={error:t}}finally{try{p&&!p.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},ki.prototype._removeById=function(t){var e=t instanceof Kr?t.getId():"string"==typeof t||"number"==typeof t?t:t.id,t=this.shapes[this.shapesMap.get(e)];t&&(t._setDataSource(null),this.shapes.splice(this.shapesMap.get(e),1),this._updateShapesMap(this.shapesMap.get(e)),this.shapesMap.delete(e),this._invokeEvent("dataremoved",[t]))},ki.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '"+t+"' is greater than the maximum possible index '"+(this.shapes.length-1)+"'");e=this.shapes[t],this.shapesMap.delete(e.getId()),e._setDataSource(null),this.shapes.splice(t,1),this._updateShapesMap(t),this._invokeEvent("dataremoved",[e])},ki.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},ki.prototype._updateMboxSource=function(){var t;this.map&&this.map._getMap()&&((t=this.map._getMap().getSource(this.getId()))&&"geojson"===t.type&&t.setData(this._toJson()))},ki);function ki(t,e){t=Li.call(this,t)||this;return t.requestId=void 0,t.options=(new bi).merge(Oo(e)),t.shapes=[],t.shapesMap=new q,t}var Mi,Pi=(v(Ii,Mi=S),Ii);function Ii(){var t=null!==Mi&&Mi.apply(this,arguments)||this;return t.bounds=void 0,t.minZoom=0,t.maxZoom=22,t.isTMS=!1,t.tiles=void 0,t.url=void 0,t}var Oi,pt=(v(Ai,Oi=xi),Ai.prototype.getOptions=function(){return Oo(this.options)},Ai.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},Ai.prototype._buildSource=function(){var t={type:"vector"};return this.options.bounds&&(t.bounds=this.options.bounds),this.options.tiles?(t.tiles=this.options.tiles,t.minzoom=this.options.minZoom,t.maxzoom=this.options.maxZoom):this.options.url&&(t.url=this.options.url),this.options.isTMS&&(t.scheme="tms"),t},Ai);function Ai(t,e){t=Oi.call(this,t)||this;return t.options=(new Pi).merge(Oo(e)),t}var Ei,it=Object.freeze({__proto__:null,Source:xi,DataSource:Si,VectorTileSource:pt}),Ti=(v(Di,Ei=H),Di.prototype.getId=function(){return this.id},Di.prototype.getMap=function(){return this.map||null},Di.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},Di.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},Di._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},Di.prototype._updateBaseProperties=function(t,e){this._updateFilter(t.filter,e.filter),this._updateZoomRange(t.minZoom,e.minZoom,t.maxZoom,e.maxZoom),this._updateLayoutProperty("visibility",t.visible,e.visible,t.visible?"visible":"none")},Di.prototype._updateFilter=function(t,e){Tn(t,e)||this.map._getMap().setFilter(this.id,t)},Di.prototype._updatePaintProperty=function(t,e,o,n){Tn(e,o)||this.map._getMap().setPaintProperty(this.id,t,n||e)},Di.prototype._updateLayoutProperty=function(t,e,o,n){Tn(e,o)||this.map._getMap().setLayoutProperty(this.id,t,n||e)},Di.prototype._updateZoomRange=function(t,e,o,n){t===e&&n===o||this.map._getMap().setLayerZoomRange(this.id,t,o)},Di.LayerEvents={layeradded:void 0,layerremoved:void 0},Di);function Di(t){var e=Ei.call(this)||this;return e.id=t||zn(),e}var zi,Q=(v(Ri,zi=S),Ri._cloneCustomizer=function(t){if(t instanceof xi)return t},Ri);function Ri(){var t=null!==zi&&zi.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}var Bi,ji=(v(Fi,Bi=Q),Fi);function Fi(){var t=null!==Bi&&Bi.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color="#1A73AA",t.blur=0,t.opacity=1,t.strokeColor="#FFFFFF",t.strokeOpacity=1,t.strokeWidth=2,t.pitchAlignment="viewport",t.radius=8,t}var Ni,Zi=(v(qi,Ni=Ti),qi.prototype.getOptions=function(){return vi(this.options,ji._cloneCustomizer)},qi.prototype.getSource=function(){return this.options.source},qi.prototype.setOptions=function(t){t=(new ji).merge(this.options,vi(t,ji._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("circle-blur",t.blur,this.options.blur),this._updatePaintProperty("circle-color",t.color,this.options.color),this._updatePaintProperty("circle-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("circle-radius",t.radius,this.options.radius),this._updatePaintProperty("circle-stroke-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("circle-stroke-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("circle-stroke-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("circle-pitch-alignment",t.pitchAlignment,this.options.pitchAlignment)}this.options=t},qi.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof xi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"circle-color":this.options.color,"circle-blur":this.options.blur,"circle-opacity":this.options.opacity,"circle-stroke-color":this.options.strokeColor,"circle-stroke-opacity":this.options.strokeOpacity,"circle-stroke-width":this.options.strokeWidth,"circle-pitch-alignment":this.options.pitchAlignment,"circle-radius":this.options.radius},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},qi.prototype._getLayerIds=function(){return[this.id]},qi.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof xi?t.add(this.options.source.getId()):t.add(this.options.source),t},qi);function qi(t,e,o){e=Ni.call(this,e)||this;return e.options=(new ji).merge(vi(o,ji._cloneCustomizer)),e.options.source=t||e.options.source,e}var Hi,Ui=(v(Wi,Hi=Q),Wi._cloneCustomizer=function(t){if(t instanceof xi)return t},Wi);function Wi(){var t=null!==Hi&&Hi.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color=["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],t.intensity=1,t.opacity=1,t.radius=30,t.weight=1,t}var Gi,yt=(v(Ki,Gi=Ti),Ki.prototype.getOptions=function(){return vi(this.options,Ui._cloneCustomizer)},Ki.prototype.getSource=function(){return this.options.source},Ki.prototype.setOptions=function(t){t=(new Ui).merge(this.options,vi(t,Ui._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("heatmap-color",t.color,this.options.color),this._updatePaintProperty("heatmap-intensity",t.intensity,this.options.intensity),this._updatePaintProperty("heatmap-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("heatmap-radius",t.radius,this.options.radius),this._updatePaintProperty("heatmap-weight",t.weight,this.options.weight)}this.options=t},Ki.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof xi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"heatmap-color":this.options.color,"heatmap-intensity":this.options.intensity,"heatmap-opacity":this.options.opacity,"heatmap-radius":this.options.radius,"heatmap-weight":this.options.weight},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},Ki.prototype._getLayerIds=function(){return[this.id]},Ki.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof xi?t.add(this.options.source.getId()):t.add(this.options.source),t},Ki);function Ki(t,e,o){e=Gi.call(this,e)||this;return e.options=(new Ui).merge(vi(o,Ui._cloneCustomizer)),e.options.source=t||e.options.source,e}var Vi,bt=(v(Yi,Vi=Q),Yi);function Yi(){var t=null!==Vi&&Vi.apply(this,arguments)||this;return t.contrast=0,t.fadeDuration=300,t.hueRotation=0,t.maxBrightness=1,t.minBrightness=0,t.opacity=1,t.saturation=0,t}var Ji,$i=(v(Xi,Ji=bt),Xi._cloneCustomizer=function(t){if(t instanceof xi)return t},Xi);function Xi(){var t=null!==Ji&&Ji.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}var Qi,ts=(v(es,Qi=Ti),es.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},es);function es(){return null!==Qi&&Qi.apply(this,arguments)||this}var os,vt=(v(ns,os=ts),ns.prototype.getOptions=function(){return vi(this.options,$i._cloneCustomizer)},ns.prototype.setOptions=function(t){var e=(new $i).merge(this.options,vi(t,$i._cloneCustomizer)),o="string"==typeof t.url&&t.url!==this.getOptions().url,n=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;this.map&&(this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation),(t=this.map._getMap().getSource(this._getSourceId()))&&t.updateImage(e)),this.options=e,o?this.reloadImage():n&&this.updateTransform()},ns.prototype.getPositions=function(e){return this.transform.then(function(t){return t.toTarget(e)})},ns.prototype.getPixels=function(e){return this.transform.then(function(t){return t.toSource(e)})},ns.getCoordinatesFromRefPoints=function(t,e,o,n){return new ui(o,n).toTarget([[0,0],[t,0],[t,e],[0,e]])},ns.getCoordinatesFromEdges=function(t,e,o,n,r){"number"!=typeof r&&(r=0);o=[Math.min(n,o),e,Math.max(n,o),t],t=Jr.getCenter(o);return Mr([Jr.getNorthWest(o),Jr.getNorthEast(o),Jr.getSouthEast(o),Jr.getSouthWest(o)],t,r)},ns.prototype._buildLayers=function(){var t={id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-opacity":this.options.opacity,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-min":this.options.minBrightness,"raster-brightness-max":this.options.maxBrightness,"raster-saturation":this.options.saturation,"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),[t]},ns.prototype._getLayerIds=function(){return[this.id]},ns.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},ns.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},ns.prototype.reloadImage=function(){var o=this;this.options.url&&(this.transform=new Promise(function(e,t){o.img.onload=function(){var t=[[0,0],[o.img.width,0],[o.img.width,o.img.height],[0,o.img.height]];e(new ui(t,o.options.coordinates)),o.isLoading=!1},o.img.onerror=o.img.onabort=function(){t("Failed to load image")},o.isLoading=!0,o.img.src=o.options.url}))},ns.prototype.updateTransform=function(){var t;this.isLoading||(t=[[0,0],[this.img.width,0],[this.img.width,this.img.height],[0,this.img.height]],this.transform=Promise.resolve(new ui(t,this.options.coordinates)))},ns);function ns(t,e){e=os.call(this,e)||this;return e.isLoading=!1,e.options=(new $i).merge(vi(t,$i._cloneCustomizer)),e.img=new Image,e.reloadImage(),e}var rs,is=(v(ss,rs=Q),ss);function ss(){var t=null!==rs&&rs.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.lineCap="round",t.lineJoin="round",t.blur=0,t.strokeColor="#1E90FF",t.strokeDashArray=void 0,t.strokeGradient=void 0,t.offset=0,t.strokeOpacity=1,t.translate=new Fn(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var as,ls=(v(cs,as=Ti),cs.prototype.getOptions=function(){return vi(this.options,is._cloneCustomizer)},cs.prototype.getSource=function(){return this.options.source},cs.prototype.setOptions=function(t){t=(new is).merge(this.options,vi(t,is._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("line-blur",t.blur,this.options.blur),this._updateLayoutProperty("line-cap",t.lineCap,this.options.lineCap),this._updateLayoutProperty("line-join",t.lineJoin,this.options.lineJoin),this._updatePaintProperty("line-offset",t.offset,this.options.offset),this._updatePaintProperty("line-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("line-dasharray",t.strokeDashArray,this.options.strokeDashArray),this._updatePaintProperty("line-gradient",t.strokeGradient,this.options.strokeGradient),this._updatePaintProperty("line-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("line-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("line-translate",t.translate,this.options.translate),this._updatePaintProperty("line-translate-anchor",t.translateAnchor,this.options.translateAnchor)}this.options=t},cs.prototype._buildLayers=function(){return[b(b(b(b({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof xi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none","line-cap":this.options.lineCap,"line-join":this.options.lineJoin},paint:b(b(b({"line-blur":this.options.blur,"line-color":this.options.strokeColor},this.options.strokeDashArray&&{"line-dasharray":this.options.strokeDashArray}),this.options.strokeGradient&&{"line-gradient":this.options.strokeGradient}),{"line-offset":this.options.offset,"line-opacity":this.options.strokeOpacity,"line-translate":this.options.translate,"line-translate-anchor":this.options.translateAnchor,"line-width":this.options.strokeWidth})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},cs.prototype._getLayerIds=function(){return[this.id]},cs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof xi?t.add(this.options.source.getId()):t.add(this.options.source),t},cs);function cs(t,e,o){e=as.call(this,e)||this;return e.options=(new is).merge(vi(o,is._cloneCustomizer)),e.options.source=t||e.options.source,e}var us,ps=(v(hs,us=Q),hs);function hs(){var t=null!==us&&us.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.base=0,t.fillColor="#1E90FF",t.height=0,t.fillOpacity=1,t.fillPattern=void 0,t.translate=new Fn(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var ds,pt=(v(fs,ds=Ti),fs.prototype.getOptions=function(){return vi(this.options,ps._cloneCustomizer)},fs.prototype.getSource=function(){return this.options.source},fs.prototype.setOptions=function(t){t=(new ps).merge(this.options,vi(t,ps._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-extrusion-base",t.base,this.options.base),this._updatePaintProperty("fill-extrusion-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-extrusion-height",t.height,this.options.height),this._updatePaintProperty("fill-extrusion-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-extrusion-pattern",t.fillPattern,this.options.fillPattern),this._updatePaintProperty("fill-extrusion-translate",t.translate,this.options.translate),this._updatePaintProperty("fill-extrusion-translate-anchor",t.translateAnchor,this.options.translateAnchor),this._updatePaintProperty("fill-extrusion-vertical-gradient",t.verticalGradient,this.options.verticalGradient)}this.options=t},fs.prototype._buildLayers=function(){return[b(b(b(b({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof xi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:b(b({"fill-extrusion-base":this.options.base,"fill-extrusion-height":this.options.height,"fill-extrusion-opacity":this.options.fillOpacity},this.options.fillPattern?{"fill-extrusion-pattern":this.options.fillPattern}:{"fill-extrusion-color":this.options.fillColor}),{"fill-extrusion-translate":this.options.translate,"fill-extrusion-translate-anchor":this.options.translateAnchor,"fill-extrusion-vertical-gradient":this.options.verticalGradient})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},fs.prototype._getLayerIds=function(){return[this.id]},fs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof xi?t.add(this.options.source.getId()):t.add(this.options.source),t},fs);function fs(t,e,o){e=ds.call(this,e)||this;return e.options=(new ps).merge(vi(o,ps._cloneCustomizer)),e.options.source=t||e.options.source,e}var ms,ys=(v(gs,ms=Q),gs.prototype.merge=function(){for(var t,e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var n=!1,r=!1;try{for(var i=x(e),s=i.next();!s.done;s=i.next()){var a=s.value;a&&(a.hasOwnProperty("fillColor")?r=!(n=!0):a.hasOwnProperty("fillPattern")&&(n=!(r=!0)))}}catch(t){l={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(l)throw l.error}}var l=ms.prototype.merge.apply(this,L(e));return n?l.fillPattern=void 0:r&&(l.fillColor=void 0),l},gs);function gs(){var t=null!==ms&&ms.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}var vs,bs=(v(ws,vs=Ti),ws.prototype.getOptions=function(){return vi(this.options,ys._cloneCustomizer)},ws.prototype.getSource=function(){return this.options.source},ws.prototype.setOptions=function(t){t=(new ys).merge(this.options,vi(t,ys._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-pattern",t.fillPattern,this.options.fillPattern)}this.options=t},ws.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof xi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"fill-opacity":this.options.fillOpacity},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),this.options.fillPattern?t.paint["fill-pattern"]=this.options.fillPattern:t.paint["fill-color"]=this.options.fillColor,[t]},ws.prototype._getLayerIds=function(){return[this.id]},ws.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof xi?t.add(this.options.source.getId()):t.add(this.options.source),t},ws);function ws(t,e,o){e=vs.call(this,e)||this;return e.options=(new ys).merge(vi(o,ys._cloneCustomizer)),e.options.source=t||e.options.source,e}var _s,xs=(v(Cs,_s=S),Cs);function Cs(){var t=null!==_s&&_s.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new Fn(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}var Ls,Ss=(v(ks,Ls=S),ks);function ks(){var t=null!==Ls&&Ls.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="center",t.textField=void 0,t.font=["StandardFont-Regular"],t.ignorePlacement=!1,t.justify="center",t.offset=new Fn(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}var Ms,Ps=(v(Is,Ms=Q),Is);function Is(){var t=null!==Ms&&Ms.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new xs,t.textOptions=new Ss,t.placement="point",t.zOrder="auto",t.lineSpacing=250,t}var Os,As=(v(Es,Os=Ti),Es.prototype.getOptions=function(){return vi(this.options,Ps._cloneCustomizer)},Es.prototype.getSource=function(){return this.options.source},Es.prototype.setOptions=function(t){var e=(new Ps).merge(this.options,vi(t,Ps._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);var o=this.options,n=e.iconOptions,r=o.iconOptions,i=e.textOptions,t=o.textOptions;this._updateBaseProperties(e,o),this._updateLayoutProperty("symbol-spacing",e.lineSpacing,o.lineSpacing),this._updateLayoutProperty("symbol-placement",e.placement,o.placement),this._updateLayoutProperty("symbol-sort-key",e.sortKey,o.sortKey),this._updateLayoutProperty("symbol-z-order",e.zOrder,o.zOrder),this._updateLayoutProperty("icon-allow-overlap",n.allowOverlap,r.allowOverlap),this._updateLayoutProperty("icon-anchor",n.anchor,r.anchor),this._updateLayoutProperty("icon-ignore-placement",n.ignorePlacement,r.ignorePlacement),this._updateLayoutProperty("icon-image",n.image,r.image),this._updateLayoutProperty("icon-offset",n.offset,r.offset),this._updatePaintProperty("icon-opacity",n.opacity,r.opacity),this._updateLayoutProperty("icon-optional",n.optional,r.optional),this._updateLayoutProperty("icon-padding",n.padding,r.padding),this._updateLayoutProperty("icon-pitch-alignment",n.pitchAlignment,r.pitchAlignment),this._updateLayoutProperty("icon-rotate",n.rotation,r.rotation),this._updateLayoutProperty("icon-rotation-alignment",n.rotationAlignment,r.rotationAlignment),this._updateLayoutProperty("icon-size",n.size,r.size),this._updateLayoutProperty("text-allow-overlap",i.allowOverlap,t.allowOverlap),this._updateLayoutProperty("text-anchor",i.anchor,t.anchor),this._updatePaintProperty("text-color",i.color,t.color),this._updateLayoutProperty("text-font",i.font,t.font),this._updateLayoutProperty("text-ignore-placement",i.ignorePlacement,t.ignorePlacement),this._updateLayoutProperty("text-justify",i.justify,t.justify),this._updatePaintProperty("text-halo-blur",i.haloBlur,t.haloBlur),this._updatePaintProperty("text-halo-color",i.haloColor,t.haloColor),this._updatePaintProperty("text-halo-width",i.haloWidth,t.haloWidth),this._updateLayoutProperty("text-offset",i.offset,t.offset),this._updatePaintProperty("text-opacity",i.opacity,t.opacity),this._updateLayoutProperty("text-optional",i.optional,t.optional),this._updateLayoutProperty("text-padding",i.padding,t.padding),this._updateLayoutProperty("text-pitch-alignment",i.pitchAlignment,t.pitchAlignment),this._updateLayoutProperty("text-radial-offset",i.radialOffset,t.radialOffset),this._updateLayoutProperty("text-rotate",i.rotation,t.rotation),this._updateLayoutProperty("text-rotation-alignment",i.rotationAlignment,t.rotationAlignment),this._updateLayoutProperty("text-size",i.size,t.size),this._updateLayoutProperty("text-variable-anchor",i.variableAnchor,t.variableAnchor),this._updateLayoutProperty("text-field",i.textField,t.textField)}this.options=e},Es.prototype._buildLayers=function(){var t=b(b(b(b({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof xi?this.options.source.getId():this.options.source,layout:b(b({visibility:this.options.visible?"visible":"none","symbol-placement":this.options.placement,"symbol-spacing":this.options.lineSpacing,"symbol-z-order":this.options.zOrder,"text-allow-overlap":this.options.textOptions.allowOverlap,"text-anchor":this.options.textOptions.anchor},this.options.textOptions.textField&&{"text-field":this.options.textOptions.textField}),{"text-font":this.options.textOptions.font,"text-ignore-placement":this.options.textOptions.ignorePlacement,"text-justify":this.options.textOptions.justify,"text-offset":this.options.textOptions.offset,"text-optional":this.options.textOptions.optional,"text-padding":this.options.textOptions.padding,"text-pitch-alignment":this.options.textOptions.pitchAlignment,"text-rotate":this.options.textOptions.rotation,"text-rotation-alignment":this.options.textOptions.rotationAlignment,"text-size":this.options.textOptions.size,"icon-allow-overlap":this.options.iconOptions.allowOverlap,"icon-anchor":this.options.iconOptions.anchor,"icon-ignore-placement":this.options.iconOptions.ignorePlacement,"icon-image":this.options.iconOptions.image,"icon-offset":this.options.iconOptions.offset,"icon-optional":this.options.iconOptions.optional,"icon-padding":this.options.iconOptions.padding,"icon-pitch-alignment":this.options.iconOptions.pitchAlignment,"icon-rotate":this.options.iconOptions.rotation,"icon-rotation-alignment":this.options.iconOptions.rotationAlignment,"icon-size":this.options.iconOptions.size}),paint:{"text-color":this.options.textOptions.color,"text-halo-blur":this.options.textOptions.haloBlur,"text-halo-color":this.options.textOptions.haloColor,"text-halo-width":this.options.textOptions.haloWidth,"text-opacity":this.options.textOptions.opacity,"icon-opacity":this.options.iconOptions.opacity}}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return void 0!==this.options.sortKey&&(t.layout["symbol-sort-key"]=this.options.sortKey),void 0!==this.options.textOptions.radialOffset&&(t.layout["text-radial-offset"]=this.options.textOptions.radialOffset),void 0!==this.options.textOptions.variableAnchor&&(t.layout["text-variable-anchor"]=this.options.textOptions.variableAnchor),[t]},Es.prototype._getLayerIds=function(){return[this.id]},Es.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof xi?t.add(this.options.source.getId()):t.add(this.options.source),t},Es);function Es(t,e,o){e=Os.call(this,e)||this;return e.options=(new Ps).merge(vi(o,Ps._cloneCustomizer)),e.options.source=t||e.options.source,e}var Ts,Ds=(v(zs,Ts=bt),zs);function zs(){var t=null!==Ts&&Ts.apply(this,arguments)||this;return t.bounds=[-180,-85.0511,180,85.0511],t.minSourceZoom=0,t.maxSourceZoom=22,t.tileSize=512,t.isTMS=!1,t.subdomains=void 0,t.tileUrl=void 0,t}var Rs,Bs=(v(js,Rs=ts),js.prototype.getOptions=function(){return vi(this.options,Ds._cloneCustomizer)},js.prototype.setOptions=function(t){t=(new Ds).merge(this.options,vi(t,Ds._cloneCustomizer));if(this.map){if(!Tn(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!Tn(t.subdomains,this.options.subdomains)||t.tileSize!==this.options.tileSize||t.tileUrl!==this.options.tileUrl)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("raster-contrast",t.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",t.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",t.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",t.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",t.saturation,this.options.saturation)}this.options=t},js.prototype._setOptionsNoUpdate=function(t){this.options=(new Ds).merge(this.options,vi(t,Ds._cloneCustomizer))},js.prototype._buildLayers=function(){return[b(b({id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-max":this.options.maxBrightness,"raster-brightness-min":this.options.minBrightness,"raster-opacity":this.options.opacity,"raster-saturation":this.options.saturation}},this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},js.prototype._getLayerIds=function(){return[this.id]},js.prototype._buildSource=function(){var t,e;if(this.options.tileUrl){if(-1===this.options.tileUrl.indexOf("{"))return{type:"raster",url:this.options.tileUrl};if(-1!==this.options.tileUrl.indexOf("{subdomain}")){if(!(this.options.subdomains&&0<this.options.subdomains.length))throw new Error("The {subdomain} placeholder was included in the tileUrl but no subdomains were specified");var o=[];try{for(var n=x(this.options.subdomains),r=n.next();!r.done;r=n.next()){var i=r.value;o.push(this.options.tileUrl.replace(/{subdomain}/g,i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}e=o}else e=[this.options.tileUrl]}return b({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},e&&{tiles:e})},js.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},js);function js(t,e){e=Rs.call(this,e)||this;return t&&e.setOptions(t),e}var Fs,Ns=(v(Zs,Fs=Q),Zs);function Zs(){var t=null!==Fs&&Fs.apply(this,arguments)||this;return t.renderer=void 0,t}var qs,Hs=(v(Us,qs=Ti),Us.prototype.getOptions=function(){return vi(this.options,Ns._cloneCustomizer)},Us.prototype.setOptions=function(t){t=(new Ns).merge(this.options,vi(t,Ns._cloneCustomizer));this.map&&this.map.triggerRepaint(),this.options=t},Us.prototype.onAdd=function(t){var e,o;qs.prototype.onAdd.call(this,t),this.map.events.add("stylechanged",this._onStyleChange),this.options.renderer&&this.glContext&&null!==(o=(e=this.options.renderer).onAdd)&&void 0!==o&&o.call(e,t,this.glContext)},Us.prototype.onRemove=function(){var t,e;this.options.renderer&&this.glContext&&null!==(e=(t=this.options.renderer).onRemove)&&void 0!==e&&e.call(t,this.map,this.glContext),this.map.events.remove("stylechanged",this._onStyleChange),this.glContext=null,qs.prototype.onRemove.call(this)},Us.prototype._buildLayers=function(){var r=this;if(!this.options.renderer)throw new Error("Cannot build the WebGL layer because renderer was not set.");return[{id:this.id,type:"custom",renderingMode:this.options.renderer.renderingMode,onAdd:function(t,e){r.glContext=e},onRemove:function(t,e){},prerender:function(t,e){var o,n;r._shouldRender()&&null!==(n=(o=r.options.renderer).prerender)&&void 0!==n&&n.call(o,t,e)},render:function(t,e){r._shouldRender()&&r.options.renderer.render(t,e)}}]},Us.prototype._getLayerIds=function(){return[this.id]},Us.prototype._getSourceIds=function(){return(new Set).add(this.source.getId())},Us.prototype._shouldRender=function(){if(this.map){var t=this.map.getCamera().zoom;return this.options.visible&&this.options.minZoom<=t&&this.options.maxZoom>t}return!1},Us);function Us(t,e){var o=qs.call(this,t)||this;return o._onStyleChange=function(){var t,e;o.map._getMap().getLayer(o.id)||(t=o.map,e=null===(e=o.map.layers._getUserLayers().find(function(t){return t.layer.getId()==o.id}))||void 0===e?void 0:e.before,t.layers.remove(o),t.layers.add(o,e))},o.options=(new Ns).merge(vi(e,Ns._cloneCustomizer)),o.source=new Si,o}var yt=Object.freeze({__proto__:null,BubbleLayer:Zi,Layer:Ti,LineLayer:ls,PolygonExtrusionLayer:pt,PolygonLayer:bs,SymbolLayer:As,TileLayer:Bs,HeatMapLayer:yt,ImageLayer:vt,WebGLLayer:Hs}),Ws=(Gs.convertHtmlString=function(t){if("string"!=typeof t)return t;var e=document.createElement("div");return e.innerHTML=t,e},Gs.parseWithFilter=function(t,e,o,n){var r=this;if(void 0===e&&(e=function(t){return!0}),void 0===o&&(o=function(t){return t}),void 0===n&&(n=function(){return document.createElement("div")}),"string"==typeof t){var i=(new DOMParser).parseFromString(t,"text/html").body;if(0==i.children.length)return o(i.innerHTML);var s,i=1==i.children.length&&1==i.childNodes.length?i.children[0]:(s=n(),Array.from(i.childNodes).map(function(t){return s.append(t)}),s)}else i=t;return Array.from(i.children).forEach(function(t){return r.parseWithFilter(t,e,o)}),e(i)?o(i):(i.parentNode&&i.parentNode.removeChild(i),null)},Gs);function Gs(){}var Ks,Vs=function(t){return ce(t)&&1===t.nodeType&&!Bo(t)},Ys=(v(Js,Ks=S),Js._cloneCustomizer=function(t){if(Vs(t))return t},Js);function Js(){var t=null!==Ks&&Ks.apply(this,arguments)||this;return t.anchor="none",t.draggable=!1,t.closeButton=!0,t.content=document.createElement("span"),t.fillColor="#FFFFFF",t.pixelOffset=new Fn(0,0),t.position=new qr(0,0),t.showPointer=!0,t}var $s,Xs=(v(Qs,$s=H),Qs.prototype.setPopupOptions=function(t){this.setOptions(t)},Qs.prototype.setOptions=function(t){var e=(new Ys).merge(this.options,vi(t,Ys._cloneCustomizer));e.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(e),this.contentDiv.prepend(this.htmlContent)):e.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,e.draggable),e.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn),t=z("close"),this.contentDiv.appendChild(t),R(t,this.closeBtn,!0)):!e.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),e.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!e.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),e.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=e.fillColor,this.contentDiv.style.backgroundColor=e.fillColor),this.marker&&(e.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==e.anchor&&this._replaceMarker(this.map,e),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,e),"none"===e.anchor&&this.map.events.add("move",this._onMove)):(Tn(e.position,this.options.position)||this.marker.setLngLat(e.position),Tn(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset))),this.options=e},Qs.prototype.getPopupOptions=function(){return this.getOptions()},Qs.prototype.getOptions=function(){return vi(this.options,Ys._cloneCustomizer)},Qs.prototype.getPopupContainer=function(){return this.containerDiv},Qs.prototype._dragToPixel=function(t){this.dragging||(this.dragging=!0,this.contentDiv.style.pointerEvents="none",this._invokeEvent("dragstart",{type:"dragstart",target:this}));t=[t[0]+this.dragOffset[0],t[1]+this.dragOffset[1]],t=C(this.map.pixelsToPositions([t]),1)[0];this.options.position=t,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},Qs.prototype._onUp=function(){this.dragging&&(this.contentDiv.style.pointerEvents="",this._invokeEvent("dragend",{type:"dragend",target:this}),"none"===this.options.anchor&&this._onMove()),delete this.dragOffset,delete this.dragging},Qs.prototype._createContainerDiv=function(t){var e=this,o=document.createElement("div");o.classList.add(Qs.Css.container),o.classList.add(Qs.Css.hidden),o.style.borderColor=t.fillColor,o.setAttribute("role","dialog"),o.setAttribute("aria-label","Map Information Window");var n=!1;return o.addEventListener("keydown",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!0)}),o.addEventListener("keyup",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!1)}),o.addEventListener("focusin",function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement&&t.target.focus())}),o.addEventListener("focusout",function(t){n&&t.relatedTarget instanceof Node&&!o.contains(t.relatedTarget)&&(n=!1,e.isOpen()&&e.close())}),o},Qs.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(Qs.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},Qs.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(Qs.Css.arrow),t},Qs.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(Qs.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("tabindex","0"),t.innerHTML="&times;",t},Qs.prototype._createHtmlContent=function(t){var e=Ws.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},Qs.prototype._createMarker=function(t,e){var o=this.marker?this.marker.getLngLat():t.position,o="none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new p.Marker({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(o)):(this.containerDiv.classList.add(t.anchor),new p.Marker({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(o));return o},Qs.prototype._getAutoAnchor=function(t,e){var o,n,r,i=this.containerDiv.offsetWidth,s=this.containerDiv.offsetHeight,a=[];return(r=this.marker?(n=(o=t._getMap().project(this.marker.getLngLat())).x,o.y):(r=C(t.positionsToPixels([e.position]),1),n=(r=C(r[0],2))[0],r[1]))<s?a.push("top"):r>t.getCanvas().offsetHeight-s&&a.push("bottom"),n<i/2?a.push("left"):n>t.getCanvas().offsetWidth-i/2&&a.push("right"),0<a.length?a.join("-"):"bottom"},Qs.prototype._replaceMarker=function(t,e,o){var n=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,o),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,n||null)},Qs.prototype._setDraggable=function(t,e){e?(t.addEventListener("mousedown",this._onDown),t.addEventListener("touchstart",this._onDown),t.addEventListener("dragstart",this._onDragStart)):(t.removeEventListener("mousedown",this._onDown),t.removeEventListener("touchstart",this._onDown),t.removeEventListener("dragstart",this._onDragStart))},Qs.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},Qs);function Qs(t){var o=$s.call(this)||this;return o.attach=function(t){o.map!==t&&(o.map&&o.remove(),o.map=t,o.marker=o._createMarker(o.options),o.marker.addTo(o.map._getMap()),o.map.popups._getCollectionDiv().appendChild(o.containerDiv),o.map.popups.add(o))},o.open=function(t){if(!t&&!o.map)throw new Error("Must specify a map to open on or attach to a map in advance");o.attach(t||o.map),o.containerDiv.classList.remove(Qs.Css.hidden),o.map.events.add("move",o._onMove),o._onMove(),o._invokeEvent("open",{target:o,type:"open"})},o.close=function(){o.map&&o.map.events.remove("move",o._onMove),o.containerDiv.classList.add(Qs.Css.hidden),o._invokeEvent("close",{target:o,type:"close"})},o.remove=function(){o.map&&(o.marker.remove(),o.containerDiv.classList.remove(o.autoAnchor||o.options.anchor),o.map.events.remove("move",o._onMove),o.map.popups.remove(o),delete o.map,delete o.marker,delete o.autoAnchor)},o.isOpen=function(){return o.map&&!o.containerDiv.classList.contains(Qs.Css.hidden)},o._onMove=function(){var t=o._getAutoAnchor(o.map,o.options);t!==o.autoAnchor&&(o._replaceMarker(o.map,o.options,t),o.map.events.add("move",o._onMove))},o._onDown=function(t){o.map.popups._addDraggedPopup(o);var e=C(o.map.positionsToPixels([o.options.position]),1)[0];"mousedown"===t.type?o.dragOffset=[e[0]-t.clientX,e[1]-t.clientY]:"touchstart"===t.type&&(o.dragOffset=[e[0]-t.touches[0].clientX,e[1]-t.touches[0].clientY])},o._onDragStart=function(t){t.preventDefault()},o.options=(new Ys).merge(vi(t,Ys._cloneCustomizer)),o.containerDiv=o._createContainerDiv(o.options),o.contentDiv=o._createContentDiv(o.options),o.containerDiv.appendChild(o.contentDiv),o.options.showPointer&&(o.arrowDiv=o._createArrowDiv(),o.containerDiv.appendChild(o.arrowDiv)),o.options.closeButton&&(o.closeBtn=o._createCloseButton(),o.contentDiv.appendChild(o.closeBtn),t=z("close"),o.contentDiv.appendChild(t),R(t,o.closeBtn,!0)),o}var ta,ea=(v(oa,ta=S),oa._cloneCustomizer=function(t){if(t instanceof Xs||Vs(t))return t},oa);function oa(){var t=null!==ta&&ta.apply(this,arguments)||this;return t.anchor="bottom",t.color="#1A73AA",t.draggable=!1,t.htmlContent='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.5 36.5" id="marker_'+zn()+'" width="24.5" height="36.5" display="block"><path d="M12.25.25a12.2543,12.2543,0,0,0-12,12.4937c0,6.4436,6.4879,12.1093,11.059,22.5641.5493,1.2563,1.3327,1.2563,1.882,0C17.7621,24.8529,24.25,19.1857,24.25,12.7437A12.2543,12.2543,0,0,0,12.25.25Z" fill="{color}" stroke="{secondaryColor}" stroke-width="0.5"/><text style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; fill: white;" text-anchor="middle" x="12" y="18">{text}</text></svg>',t.pixelOffset=new Fn(0,0),t.position=new qr(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}var na,ra=(v(ia,na=H),ia.prototype.getOptions=function(){return vi(this.options,ea._cloneCustomizer)},ia.prototype.getElement=function(){return this.marker.getElement()},ia.prototype.setOptions=function(t){t=(new ea).merge(this.options,vi(t,ea._cloneCustomizer));Tn(t.htmlContent,this.options.htmlContent)&&t.anchor===this.options.anchor?("string"!=typeof t.htmlContent||t.color===this.options.color&&t.text===this.options.text&&t.secondaryColor===this.options.secondaryColor||(this.element.innerHTML=this._getSubbedHtmlString(t)||""),t.draggable!==this.options.draggable&&(this._setDraggable(t.draggable),this.marker.setDraggable(t.draggable)),Tn(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset),Tn(t.position,this.options.position)||this.marker.setLngLat(t.position),t.visible!==this.options.visible&&(t.visible?this.element.classList.remove(ia.hiddenClass):this.element.classList.add(ia.hiddenClass))):(this.marker.remove(),this._buildMarker(t),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=t},ia.prototype.togglePopup=function(){if(this.options.popup)if(this.options.popup.isOpen())this.options.popup.close();else{if(!this.map)throw new Error("The marker must be added to a map before calling togglePopup().");this.options.popup.setOptions({position:this.options.position}),this.options.popup.open(this.map)}},ia.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=Oo(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},ia.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},ia.prototype._getId=function(){if(this.element)return("string"==typeof this.options.htmlContent?this.element.firstChild:this.element).id},ia.prototype._buildMarker=function(t){var e;"string"==typeof t.htmlContent?(e=this._getSubbedHtmlString(t)||"",this.element=Ws.convertHtmlString(e)):this.element=t.htmlContent,this.element.classList.add(ia.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(ia.hiddenClass),this.marker=new p.Marker({element:this.element,offset:t.pixelOffset,draggable:t.draggable,anchor:t.anchor}).setLngLat(t.position),this.marker.on("drag",this._onDrag),this.marker.on("dragstart",this._onDragStart),this.marker.on("dragend",this._onDragEnd),this.element.addEventListener("click",this._bubbleElementEvent),this.element.addEventListener("dblclick",this._bubbleElementEvent),this.element.addEventListener("contextmenu",this._bubbleElementEvent),this.element.addEventListener("keydown",this._bubbleElementEvent),this.element.addEventListener("keypress",this._bubbleElementEvent),this.element.addEventListener("keyup",this._bubbleElementEvent),this.element.addEventListener("mousedown",this._bubbleElementEvent),this.element.addEventListener("mouseenter",this._bubbleElementEvent),this.element.addEventListener("mouseleave",this._bubbleElementEvent),this.element.addEventListener("mousemove",this._bubbleElementEvent),this.element.addEventListener("mouseout",this._bubbleElementEvent),this.element.addEventListener("mouseover",this._bubbleElementEvent),this.element.addEventListener("mouseup",this._bubbleElementEvent)},ia.prototype._getSubbedHtmlString=function(t){return"string"==typeof t.htmlContent?t.htmlContent.replace(/{color}/gi,t.color||"").replace(/{secondaryColor}/gi,t.secondaryColor||"").replace(/{text}/gi,t.text||""):null},ia.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector("."+ia.collectionContainerClass);return t||((t=document.createElement("div")).classList.add(ia.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},ia.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},ia.collectionContainerClass="marker-collection-container",ia.hiddenClass="hidden-accessible-element",ia.containerClass="marker-container",ia);function ia(t){var e=na.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new qr(t.lng,t.lat),e._invokeEvent("drag",{type:"drag",target:e})},e._onDragStart=function(){e._invokeEvent("dragstart",{type:"dragstart",target:e})},e._onDragEnd=function(){e._invokeEvent("dragend",{type:"dragend",target:e})},e._bubbleElementEvent=function(t){e._invokeEvent(t.type,{type:t.type,target:e})},e._onEleDragStart=function(t){t.preventDefault()},e.options=(new ea).merge(vi(t,ea._cloneCustomizer)),e._buildMarker(e.options),e}var sa=(aa.parse=function(t){var e=(t=t.toLowerCase()).lastIndexOf("-");return-1!==e?{code:t,language:t.substring(0,e),region:t.substring(e+1)}:{code:t,language:t}},aa);function aa(){}var la={localizationsPath:"locs/mapcontrol/2019-3-12",sensitiveUserRegions:["il","kr","pk","in","cn","ar","bh","eg","jo","sa","kw","om","qa","ma","ae"],locales:{defaultLanguage:{defaultRegion:{code:"NGT",strings:"en/resource.json"}},ar:{defaultRegion:{code:"ar",strings:"ar-sa/resource.json"}},bg:{defaultRegion:{code:"bg-BG",strings:"bg-bg/resource.json"}},cs:{defaultRegion:{code:"cs-CZ",strings:"cs-cz/resource.json"}},da:{defaultRegion:{code:"da-DK",strings:"da-dk/resource.json"}},de:{defaultRegion:{code:"de-DE",strings:"de-de/resource.json"}},el:{defaultRegion:{code:"el-GR",strings:"el-gr/resource.json"}},en:{defaultRegion:{code:"en",strings:"en/resource.json"},us:{code:"en-US",strings:"en/resource.json"}},es:{defaultRegion:{code:"es-ES",strings:"es-es/resource.json"},mx:{code:"es-MX",strings:"es-mx/resource.json"}},fi:{defaultRegion:{code:"fi-FI",strings:"fi-fi/resource.json"}},fr:{defaultRegion:{code:"fr-FR",strings:"fr-fr/resource.json"}},hu:{defaultRegion:{code:"hu-HU",strings:"hu-hu/resource.json"}},id:{defaultRegion:{code:"id-ID",strings:"id-id/resource.json"}},it:{defaultRegion:{code:"it-IT",strings:"it-it/resource.json"}},ko:{defaultRegion:{code:"ko-KR",strings:"ko-kr/resource.json"}},lt:{defaultRegion:{code:"lt-LT",strings:"lt-lt/resource.json"}},ms:{defaultRegion:{code:"ms-MY",strings:"ms-my/resource.json"}},nb:{defaultRegion:{code:"nb-NO",strings:"nb-no/resource.json"}},nl:{defaultRegion:{code:"nl-NL",strings:"nl-nl/resource.json"}},pl:{defaultRegion:{code:"pl-PL",strings:"pl-pl/resource.json"}},pt:{defaultRegion:{code:"pt-PT",strings:"pt-pt/resource.json"},br:{code:"pt-BR",strings:"pt-br/resource.json"}},ru:{defaultRegion:{code:"ru-RU",strings:"ru-ru/resource.json"}},sk:{defaultRegion:{code:"sk-SK",strings:"sk-sk/resource.json"}},sl:{defaultRegion:{code:"sl-SL",strings:"sl-sl/resource.json"}},sv:{defaultRegion:{code:"sv-SE",strings:"sv-se/resource.json"}},th:{defaultRegion:{code:"th-TH",strings:"th-th/resource.json"}},tr:{defaultRegion:{code:"tr-TR",strings:"tr-tr/resource.json"}},zh:{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"zh-tw/resource.json"}}}},ca=function(){this.Unknown="Unknown",this.Accident="Accident",this.Fog="Fog",this.Danger="Danger",this.Rain="Rain",this.Ice="Ice",this.Jam="Jam",this.LaneClosed="Lane Closed",this.RoadClosed="Road Closed",this.RoadWorks="Road Works",this.Wind="Wind",this.Flood="Flood",this.Detour="Detour"},ua=(pa.getCode=function(t){var e=sa.parse(t);return-1===la.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},pa.getStrings=function(t){t=this.getLocaleData(t);return la.locales.defaultLanguage.defaultRegion.code===t.code?new Promise(function(t){t(new ca)}):new O({domain:e,path:la.localizationsPath+"/"+t.strings}).get().then(function(t){return t},function(){return new ca})},pa.getLocaleData=function(t){if("string"==typeof t&&(t=sa.parse(t)),la.locales[t.code])return la.locales[t.code].defaultRegion;var e;if(la.locales[t.language])e=la.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=la.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},pa);function pa(){}var ha=(da.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}o=t.indexOf("Edge/");return 0<o?parseInt(t.substring(o+5,t.indexOf(".",o)),10):-1},da.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},da.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11},da);function da(){}(vt=u.AuthenticationType||(u.AuthenticationType={})).subscriptionKey="subscriptionKey",vt.aad="aad",vt.anonymous="anonymous",vt.sas="sas";var fa,ma,ya=(v(ga,fa=S),ga.prototype.setSubscriptionKey=function(t){this.authType=u.AuthenticationType.subscriptionKey,this.subscriptionKey=t},ga.prototype.setAadProperties=function(t,e,o,n,r){this.authType=u.AuthenticationType.aad,this.authContext=r||this.authContext,this.aadInstance=n||this.aadInstance,this.clientId=t,this.aadAppId=e,this.aadTenant=o},ga.prototype.setTokenCallbackFunction=function(t){this.authType=u.AuthenticationType.anonymous,this.getToken=t},ga.prototype.setSasCallbackFunction=function(t){this.authType=u.AuthenticationType.sas,this.getToken=t},ga.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=fa.prototype.merge.apply(this,L(t));return o.authType===u.AuthenticationType.subscriptionKey?o.authContext=o.aadAppId=o.getToken=void 0:o.authType===u.AuthenticationType.aad?o.subscriptionKey=o.getToken=void 0:o.authType===u.AuthenticationType.anonymous?o.subscriptionKey=o.authContext=o.aadAppId=void 0:o.authType===u.AuthenticationType.sas&&(o.authContext=o.subscriptionKey=o.aadAppId=void 0),o},ga);function ga(){var t=null!==fa&&fa.apply(this,arguments)||this;return t.authType=void 0,t.subscriptionKey=void 0,t.clientId=void 0,t.aadAppId=void 0,t.aadTenant=void 0,t.aadInstance=void 0,t.getToken=void 0,t.sasToken=void 0,t.authContext=void 0,t}var va="NGT",ba=zn(),wa=t,_a=e,xa=o,Ca=n,La=y,Sa=new ya,ka=!1,Ma=!1,Pa=!1,Ia=!1,Oa=!1,Aa=!1,Ea=!1,Ta=!1,Da=!1;function za(){return Object.assign({},Sa)}function Ra(){return _a}function Ba(){return wa}function ja(){return xa}function Fa(){return Ca}function Na(){return La}function Za(){return p.workerCount}function qa(){return p.maxParallelImageRequests}function Ha(){return va}function Ua(){return ba}function Wa(){return Sa.authType===u.AuthenticationType.subscriptionKey?Sa.subscriptionKey:void 0}function Ga(){return ma}function Ka(t){return!ha.isIE()&&p.supported({failIfMajorPerformanceCaveat:t})}function Va(t){Sa=(new ya).merge(Sa,t),Da=!0}function Ya(t){wa=t,Ma=!0}function Ja(t){xa=t,Pa=!0}function $a(t){0<t&&(p.workerCount=t,Oa=!0)}function Xa(t){0<t&&(p.maxParallelImageRequests=t,Aa=!0)}function Qa(t){va=ua.getCode(t),Ea=!0}function tl(t){ba=t,Ta=!0}function el(t){Sa.setSubscriptionKey(t),Da=!0}function ol(t){ma=t,ka=!0}function nl(t,e){if(e=Math.abs(e||1),"string"==typeof t&&hl[t.toLowerCase()]){for(var o=hl[t.toLowerCase()],n=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,r=o,i=n.exec(o);i;)r=r.replace(i[0],parseFloat(i[1])*e+""),i=n.exec(o);return r=r.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function rl(){return Da}function il(){return Ma}function sl(){return Pa}function al(){return Oa}function ll(){return Aa}function cl(){return Ea}function ul(){return Ta}function pl(){return ka}var hl={marker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 26 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><text x="12.5" y="17.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:2"/><text x="12.5" y="18.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-circle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><circle cx="12.5" cy="12.5" r="9" fill="{secondaryColor}"/><text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',pin:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(24 * {scale})" height="calc(28 * {scale})" viewBox="0 0 24 28"><path d="m11.988 16.615a5.15 5.15 0 0 1-2.268-.525 4.909 4.909 0 0 1-2.805-4.442 5.019 5.019 0 0 1 5.072-4.936h.012a5.03 5.03 0 0 1 5.085 4.961 4.907 4.907 0 0 1-.549 2.224 5.114 5.114 0 0 1-4.548 2.718zm0-8.06a3.173 3.173 0 0 0-3.226 3.099 3.081 3.081 0 0 0 1.77 2.782 3.299 3.299 0 0 0 4.365-1.386 3.049 3.049 0 0 0 .342-1.381 3.184 3.184 0 0 0-3.239-3.114h-.012z" fill="{secondaryColor}"/><path d="m11.999.922a10.908 10.908 0 0 0-11.076 10.732 10.639 10.639 0 0 0 4.418 8.598l6.658 6.464 6.658-6.463a10.537 10.537 0 0 0 2.198-15.041 11.182 11.182 0 0 0-8.856-4.289zm1.873 14.341a4.221 4.221 0 0 1-5.589-1.789 3.945 3.945 0 0 1-.445-1.8 4.164 4.164 0 0 1 8.323-.037 4.028 4.028 0 0 1-2.289 3.626Z" fill="{color}"/><path d="m11.999 28-7.256-7.044a11.611 11.611 0 0 1-4.743-9.303 11.844 11.844 0 0 1 11.988-11.652.102 .102 0 0 1 .02 0 12.164 12.164 0 0 1 9.577 4.647 11.357 11.357 0 0 1 2.299 8.614 11.521 11.521 0 0 1-4.63 7.695zm-.01-26.157a9.997 9.997 0 0 0-10.143 9.812 9.769 9.769 0 0 0 4.04 7.853l.099.083 6.014 5.838 6.113-5.922a9.7 9.7 0 0 0 3.945-6.505 9.533 9.533 0 0 0-1.933-7.229 10.305 10.305 0 0 0-8.116-3.931h-.021zm.021 14.772a5.11 5.11 0 0 1-4.547-2.718 4.868 4.868 0 0 1 .932-5.743 5.118 5.118 0 0 1 3.58-1.46h.024a5.031 5.031 0 0 1 5.084 4.938 4.92 4.92 0 0 1-2.805 4.457h0a5.152 5.152 0 0 1-2.269.525zm-.011-8.079h-.015a3.277 3.277 0 0 0-2.295.933 3.029 3.029 0 0 0-.587 3.58 3.297 3.297 0 0 0 4.364 1.386h0a3.092 3.092 0 0 0 1.772-2.795 3.185 3.185 0 0 0-3.239-3.105z" fill="{secondaryColor}"/><text x="12" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"pin-round":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25 * {scale})" height="calc(25 * {scale})" viewBox="0 0 25 25"><g transform="translate(0 1)"><circle cx="12.25" cy="11.5833" r="11" fill="{color}"/><path d="m12.25 23.583a12 12 0 1 1 12-12 12 12 0 0 1-12 12zm0-22a10 10 0 1 0 10 10 10 10 0 0 0-10-10z" fill="{secondaryColor}"/><circle cx="12.25" cy="11.5833" r="4.2386" fill="{secondaryColor}"/></g><text x="12.5" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-flat":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(42.8 * {scale})" viewBox="0 0 1600 2570"><g fill="{color}"><path d="M691 2419c-409-575-641-1086-683-1504-10-106-10-136 5-224 31-188 105-330 241-458 129-124 270-190 453-214 69-9 113-10 182-1 373 46 655 326 703 698 40 308-120 801-424 1309-134 224-348 535-369 535-4 0-53-63-108-141z"/></g><g fill="rgba(0,0,0,0.15)" style="transform:scale(-1,1);transform-origin:center"><path d="M691 2419c-407-571-639-1083-682-1498-14-139-3-249 37-371 69-208 254-402 459-481 68-27 217-59 271-59h24v160 180 940 635c0 349-2 635-5 635-2 0-49-63-104-141z"/></g><circle cx="800" cy="800" r="600" fill="{secondaryColor}"/><text x="800" y="1100" style="font-size:800px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-arrow":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25.47 * {scale})" height="calc(35.18 * {scale})" viewBox="0 0 4330 5980"><g fill="{color}"><path d="m2080 5969c-49-20-93-63-115-113-25-55-1928-5486-1953-5573-40-138 67-282 210-283 36 0 246 73 987 345 518 190 947 345 955 345 8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29-33 0-71-5-85-10z"/></g><g fill="{secondaryColor}"><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z"/><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z" style="transform:scale(-1,1);transform-origin:center"/></g><g fill="rgba(0,0,0,0.2)" ><path d="m2165 685c8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29z"/></g><text x="2165" y="3300" style="font-size:2500px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-ball-pin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15.67 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 235 452"><g transform="translate(-135 10)"><path fill="{secondaryColor}" d="m256 442 0 0c-13 0-18-11-18-24l-6-323c0-13 11-24 24-24h0c13 0 24 11 24 24l-6 323c0 13-5 24-18 24z"/><circle style="fill:{color};stroke-width:10;stroke:{secondaryColor}" cx="256" cy="112" r="111"/><ellipse transform="matrix(0.834 0.5518 -0.5518 0.834 65.7916 -97.18)" fill="rgba(255,255,255,0.3)" cx="194.399" cy="60.749" rx="19.076" ry="32.428"/></g><text x="117.5" y="160" style="font-size:160px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.67 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2000 2420"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M845 2152c-22-37-58-95-80-129-22-35-62-99-90-143l-50-80-312 0-313 0 0-900 0-900 900 0 900 0 0 900 0 900-313 0-313 0-34 58c-19 31-38 59-42 60-5 2-8 8-8 12 0 9-69 123-88 145-5 6-11 15-13 21-16 39-77 123-89 124-8 0-33-31-55-68z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(38.8 * {scale})" viewBox="0 0 2500 2910"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m866 2652c-17-31-37-68-46-82-9-14-32-54-51-90-19-36-50-92-70-125l-36-60-332-3-331-2 0-905 0-905 660 0 660 0 0-38c0-71 50-196 102-258 71-85 189-164 244-164 12 0 26-4 29-10 8-13 222-13 230 0 3 6 17 10 30 10 25 0 117 45 154 76 130 107 191 232 191 392 0 155-63 284-190 386-36 29-129 76-150 76-11 0-22 5-25 10-3 6-31 10-61 10l-54 0 0 660 0 660-332 2-332 3-29 50c-17 28-48 84-70 125-22 41-47 86-56 100-9 14-30 51-46 83-17 32-36 57-45 57-8 0-28-25-44-58z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.8 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2010 2410"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M856 2155c-20-30-36-59-36-65 0-5-4-10-10-10-5 0-10-5-10-11 0-5-18-37-40-69-22-32-40-64-40-69 0-6-4-11-10-11-5 0-10-5-10-10 0-6-15-33-32-60l-33-50-127 0c-74 0-129-4-133-10-3-5-17-10-30-10-25 0-116-45-155-76-87-69-142-151-178-265-15-46-17-1075-2-1084 5-3 10-17 10-30 0-13 5-27 10-30 6-3 10-13 10-22 0-22 83-135 122-168 57-46 62-50 112-75l50-25 585 0 586 0 63 34c84 46 169 133 212 218l35 68 0 565 0 565-28 59c-32 69-100 157-139 180-15 9-33 22-40 29-23 22-99 57-123 57-13 0-27 5-30 10-4 6-60 10-135 10l-128 0-128 205c-84 136-133 205-144 205-10 0-33-24-54-55z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(32.13 * {scale})" viewBox="0 0 2500 2900"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m874 2669c-9-18-26-49-37-68-11-20-30-55-43-78-13-24-36-64-51-90-14-27-38-69-52-95l-26-48-142 0c-84 0-144-4-148-10-3-5-17-10-30-10-25 0-118-46-154-76-91-76-136-142-175-254-13-38-16-119-16-554 0-358 3-520 12-545 40-125 106-219 195-278 127-84 116-83 646-83l467 0 0-42c0-46 11-87 45-163 54-121 169-220 306-264 46-14 232-14 278 0 165 53 284 175 340 350 19 61 14 204-10 273-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-3 6-28 10-56 10l-49 0 0 462c0 446-1 464-21 522-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-4 6-65 10-149 10-138 0-143 1-154 23-12 23-62 114-112 202-16 28-44 79-63 115-42 77-67 88-93 39z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(23.5 * {scale})" height="calc(40 * {scale})" viewBox="34 28 198 308"><path style="stroke:{secondaryColor};stroke-width:15;stroke-linecap:round;" d="M42 327l0 -291"/><path style="fill:{color};stroke:{secondaryColor};stroke-width:10;stroke-linejoin:round;" d="M49 50c70 30 104 28 178 2-21 42-21 74 0 116-72 25-101 25-178 0l0-118z"/><text x="130" y="165" style="font-size:100px;fill:#fff;text-anchor:middle">{text}</text></svg>',"flag-triangle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(35.33 * {scale})" viewBox="0 0 40.5 53"><g transform="translate(-31 -20)"><path fill="{secondaryColor}" d="M34.7,73.3V48.4l34.6-10.1c0.7-0.2,1.2-0.8,1.2-1.5s-0.4-1.4-1-1.7L33.7,20.5c-0.5-0.2-1.1-0.2-1.6,0.2 c-0.5,0.3-0.7,0.8-0.7,1.4v51.2H34.7z"/><polygon points="34.7,24.5 66,36.5 34.7,45 34.7,10" fill="{color}"/></g><text x="11" y="21" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(34 * {scale})" height="calc(34 * {scale})" viewBox="0 0 34 34"><g transform="translate(2 2)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17" y="22" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(38 * {scale})" height="calc(38 * {scale})" viewBox="0 0 38 38"><g transform="translate(4 4)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19" y="24" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',triangle:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(36 * {scale})" height="calc(36 * {scale})" viewBox="0 0 36 36"><g transform="translate(2 2)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="30" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><g transform="translate(4 4)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="32" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',hexagon:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(35 * {scale})" height="calc(40 * {scale})" viewBox="0 0 35 40"><g transform="translate(2 2)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="25" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(39 * {scale})" height="calc(44 * {scale})" viewBox="0 0 39 44"><g transform="translate(4 4)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="27" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1100 1100"><g transform="translate(50 50)"><path style="stroke:{secondaryColor};stroke-width:50;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="550" y="700" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1200 1200"><g transform="translate(100 100)"><path style="stroke:{secondaryColor};stroke-width:100;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="600" y="750" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="12,0 0,24 12,17 24,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="17" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="24,12 0,0 7,12 0,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="16.5" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(12.16 * {scale})" height="calc(30.1 * {scale})" viewBox="0 0 902 364"><g fill="{color}" transform="matrix(0,2.4,-2.4,0,897,-930)"><polygon points="902,222 233,222 233,364 0,182 233,0 233,141 902,141 902,222"/></g><text x="450" y="700" style="font-size:900px;fill:#000;text-anchor:middle">{text}</text></svg>',"arrow-up-thin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 12 25"><g transform="translate(-136.91823 -751.91998)"><path fill="{color}" d="m148.271 760.71c-1.641-.547-3.186-1.47-4.633-2.769l0 18.07-1.675 0 0-18.07c-1.447 1.299-2.986 2.222-4.616 2.769l0-1.231c2.325-1.596 4.006-3.812 5.043-6.65l.838 0c1.037 2.838 2.718 5.055 5.043 6.65l0 1.231z"/></g><text x="6" y="20" style="font-size:10px;fill:#000;text-anchor:middle">{text}</text></svg>',car:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(21.93 * {scale})" height="calc(40.9 * {scale})" viewBox="0 0 6580 12270"><g transform="translate(0 12270) rotate(-90)"><path fill="{secondaryColor}" d="M7045 6566c-42-13-105-44-105-51 0-2 23-105 50-228 28-123 50-230 50-236 0-8-241-11-907-11-855 0-1145 6-1513 30-85 6-189 13-230 15-41 3-133 10-205 15-286 21-430 32-705 50-953 63-1459 18-2335-205-304-77-746-209-799-238-131-72-221-408-285-1062-34-345-42-532-48-1130-16-1557 108-2532 336-2649 32-17 469-149 676-205 409-110 819-191 1205-238 116-14 224-18 540-18 395 1 494 5 1140 50 1124 79 1224 82 2496 78l641-3-53-237c-29-131-52-238-51-239 1-1 31-14 66-29 56-23 76-26 142-23 67 3 83 7 120 33 23 17 50 41 61 55 10 14 51 117 91 230l73 205 674 3 675 2 90-39c98-43 198-72 315-93 122-21 829-18 990 5 321 45 626 143 849 270 293 168 516 378 704 662 266 402 416 893 467 1527 15 174 8 882-9 998-6 41-18 127-27 190-69 502-253 969-523 1325-79 105-262 284-381 374-189 142-355 229-574 300-336 110-526 139-952 148-457 9-685-23-887-124l-47-24-678-6-678-6-64 179c-79 224-92 253-121 284-67 70-177 97-274 66zm-2752-5073c-23-2-64-2-90 0-26 2-7 3 42 3 50 0 71-1 48-3zm395 0c-21-2-55-2-75 0-21 2-4 4 37 4 41 0 58-2 38-4z"/><path fill="{color}" d="M7043 6498c-13-6-23-19-23-28 0-9 23-117 50-240 28-123 50-230 50-237 0-22-2126-13-2465 10-132 10-400 28-595 42-661 47-824 55-1160 62-435 7-656-8-1040-73-415-70-865-183-1447-365-168-53-272-556-325-1569-16-319-16-1311 0-1630 45-872 129-1366 257-1518 22-26 51-39 172-77 557-177 1122-310 1563-369 271-36 351-40 690-40 361 1 463 6 1165 54 1122 78 1288 83 2337 79 460-2 840-7 843-11 4-4-17-117-47-252l-55-245 39-16c76-30 180-8 224 47 10 13 54 124 98 246l79 222 709 0 709 0 47-24c74-37 219-83 322-101 122-22 606-32 802-16 374 29 658 102 933 238 124 62 271 155 361 230l61 51 6 100c19 278 103 497 247 643 88 89 173 136 278 152l70 11 41 131c116 369 159 673 168 1170 10 584-38 984-167 1397l-40 126-70 12c-193 33-348 175-441 405-56 139-89 302-89 445 0 43-3 47-58 91-290 235-644 384-1068 450-191 29-796 39-974 16-135-18-263-54-368-102l-75-35-701 0-701 0-79 223c-82 232-102 267-163 293-38 16-138 17-170 2zm-2023-820c332-15 1155-12 1835 6 308 8 563 12 566 8 4-4 10-21 13-38 7-30 6-31-92-77-518-244-1197-396-2112-474-295-25-1282-25-1579 0-231 20-473 46-479 51-6 7 49 110 93 171 160 226 416 335 855 365 142 10 539 5 900-12zm3304-263c525-111 899-887 934-1935 19-557-37-1023-172-1435-186-563-521-900-896-899-81 0-158 14-525 92-426 91-431 92-540 146-195 96-287 207-306 368-12 104-11 2985 1 3078 22 170 135 291 365 389 49 21 191 55 480 115 226 47 419 87 430 89 45 10 164 6 229-8zm-5570-485c112-43 197-156 216-291 12-83 13-2623 1-2706-23-158-125-273-270-304-44-9-100-1-542 75-272 47-514 91-539 98-266 68-487 424-594 958-56 280-70 548-40 800 56 484 207 878 414 1081 115 114 122 116 702 218 277 49 524 90 550 90 26 1 72-8 102-19zm2111-3440c1023-44 1884-213 2462-486l113-53-7-33c-3-18-8-35-10-37-2-3-236 1-521 7-993 24-1271 26-1708 11-541-18-1128-18-1249-1-377 56-588 181-734 437-32 55-41 79-32 84 12 8 246 32 491 51 356 28 815 36 1195 20z"/></g><text x="3250" y="8250" style="font-size:3000px;fill:#fff;text-anchor:middle">{text}</text></svg>',checker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 16 16"><pattern id="p" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse"><rect fill="{color}" x="0" width="8" height="8" y="0"/><rect fill="{color}" x="8" width="8" height="8" y="8"/></pattern><rect x="0" y="0" width="16" height="16" fill="{secondaryColor}"/><rect x="0" y="0" width="16" height="16" fill="url(#p)"/></svg>',"checker-rotated":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 60 60"><rect width="60" height="60" fill="{secondaryColor}"/><rect width="42.42" height="42.42" transform="translate(30 0) rotate(45)" fill="{color}"/></svg>',"zig-zag":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 120 60 120 90 90 120 60 120 0 120 0 60 60 0 0 0 60 30 90 60 120 120 120"/></svg>',"zig-zag-vertical":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 0 120 60 90 30 60 0 0 0 0 0 60 60 0 120 60 120 90 90 120 60 120 0"/></svg>',"circles-spaced":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',circles:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(7 * {scale})" height="calc(7 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="6" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',"diagonal-lines-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-lines-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-stripes-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"diagonal-stripes-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(14 * {scale})" height="calc(14 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(45 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}" transform="rotate(-45 3 3)"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-stripes":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"x-fill":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="45.3" height="45.3" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(13 * {scale})" height="calc(13 * {scale})" viewBox="0 0 20 20"><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><g fill="{color}"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>'},dl=(fl.getHighContrastMode=function(){return matchMedia("(-ms-high-contrast: white-on-black)").matches?"dark":matchMedia("(-ms-high-contrast: black-on-white)").matches?"light":matchMedia("(-ms-high-contrast: active)").matches?"dark":matchMedia("(inverted-colors: inverted)").matches?"invert":null},fl);function fl(){}var ml,yl=(v(gl,ml=S),gl);function gl(){var t=null!==ml&&ml.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.copyrightContent=void 0,t.customAttribution=void 0,t.showFeedbackLink=!0,t.showLogo=!0,t}var vl,bl=(v(wl,vl=K),wl.prototype.onAdd=function(t){return this.container=this.buildContainer(t,u.ControlStyle.auto),this.container.className="map-copyright",this.copyrightDiv=this.buildCopyrightDiv(),this.copyrightDiv.className="azure-map-copyright",this.container.appendChild(this.copyrightDiv),this.options.showLogo&&this.addRemoveLogo(!0),this.options.showFeedbackLink&&this.addRemoveFeedbackDiv(!0),this.container},wl.prototype.onRemove=function(){vl.prototype.onRemove.call(this),delete this.container},wl.prototype.setOptions=function(t){var e=this,o=(new yl).merge(this.options,t);o.copyrightMessage===this.options.copyrightMessage&&o.customAttribution===this.options.customAttribution||(this.copyrightDiv.innerText=this.textAttribution(o)),o.copyrightContent!==this.options.copyrightContent&&(this.options.copyrightContent&&(t=Array.from(this.copyrightDiv.children).find(function(t){return t===e.options.copyrightContent}),this.copyrightDiv.removeChild(t)),0<this.copyrightDiv.childNodes.length?this.copyrightDiv.insertBefore(o.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(o.copyrightContent),this.options.copyrightContent=o.copyrightContent),!o.showLogo&&this.logoAnchor?this.addRemoveLogo(!1):o.showLogo&&!this.logoAnchor&&this.addRemoveLogo(!0),!o.showFeedbackLink&&this.feedbackAnchor?this.addRemoveFeedbackDiv(!1):o.showFeedbackLink&&!this.feedbackAnchor&&this.addRemoveFeedbackDiv(!0),this.options=o},wl.prototype.getDefaultAttributions=function(){var t=(new Date).getFullYear(),e=["©"+t+" TomTom"];return this.options.showLogo||e.push("©"+t+" Microsoft"),e},wl.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.textAttribution(this.options)||"",t},wl.prototype.buildFeedbackLink=function(){var t=document.createElement("a");return t.setAttribute("alt","Give Feedback"),t.setAttribute("aria-label","Give Feedback"),t.href="https://feedback.azuremaps.com",t.target="_blank",t.rel="noopener",t.className="azure-map-feedback",t},wl.prototype.addRemoveFeedbackDiv=function(t){t?(this.feedbackAnchor=this.buildFeedbackLink(),this.tooltip=z("Give Feedback"),this.container.appendChild(this.feedbackAnchor),this.container.appendChild(this.tooltip),R(this.tooltip,this.feedbackAnchor)):(this.feedbackAnchor.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackAnchor)},wl.prototype.addRemoveLogo=function(t){t?(this.logoAnchor=document.createElement("a"),this.logoAnchor.className="azure-map-logo",this.logoAnchor.href="https://microsoft.com",this.logoAnchor.setAttribute("aria-label","Microsoft"),this.container.appendChild(this.logoAnchor),this.logoTooltip=z("Visit microsoft.com"),this.container.appendChild(this.logoTooltip),R(this.logoTooltip,this.logoAnchor)):(this.logoAnchor.remove(),this.logoTooltip.remove(),delete this.logoAnchor)},wl);function wl(t){var e=vl.call(this)||this;return e.textAttribution=function(t){return[e.options.copyrightMessage,e.options.customAttribution].filter(function(t){return t}).join("")},e.options=(new yl).merge(t),e}var _l,xl=function(t){var o=this;this.addToMap=function(){o.initializeMapLiveStateInfo(),o.initializeMapStyleInfo(),o.createMapKeyBindingInfo(),o.map.getMapContainer().setAttribute("role","application"),o.map.getMapContainer().setAttribute("aria-label","Map Application"),o.map.getCanvasContainer().setAttribute("aria-live","polite"),o.map.getCanvasContainer().setAttribute("aria-describedby","atlas-map-state atlas-map-style"),o.map.getCanvas().setAttribute("aria-label","Interactive Map"),o.map.getCanvas().setAttribute("aria-describedby","atlas-map-shortcuts"),o.map.getCanvas().setAttribute("alt","Interactive Map")},this.removeFromMap=function(){null!=o.mapViewDesc&&o.mapViewDesc.dispose(),delete o.mapViewDesc,null!=o.atlasMapKeyBindings&&o.map.getCanvasContainer().removeChild(o.atlasMapKeyBindings),delete o.atlasMapKeyBindings,null!=o.atlasMapLiveStateInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapLiveStateInfo),delete o.atlasMapLiveStateInfo,null!=o.atlasMapStyleInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapStyleInfo),delete o.atlasMapStyleInfo,o.map.getMapContainer().removeAttribute("role"),o.map.getMapContainer().removeAttribute("aria-label"),o.map.getCanvasContainer().removeAttribute("aria-live"),o.map.getCanvasContainer().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("aria-label"),o.map.getCanvas().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("alt"),o.map.events.remove("stylechanged",o.updateMapStyle)},this.createMapKeyBindingInfo=function(){o.atlasMapKeyBindings=document.createElement("div"),o.atlasMapKeyBindings.setAttribute("tabindex","-1"),o.atlasMapKeyBindings.setAttribute("aria-hidden","true"),o.atlasMapKeyBindings.id="atlas-map-shortcuts",o.atlasMapKeyBindings.classList.add("hidden-accessible-element"),o.atlasMapKeyBindings.innerHTML=["Map shortcuts:","Zoom out: hyphen.","Zoom in: plus.","Pan right 100 pixels: right arrow.","Pan left 100 pixels: left arrow.","Pan up 100 pixels: up arrow.","Pan down 100 pixels: down arrow.","Rotate 15 degrees clockwise: shift + right arrow.","Rotate 15 degrees counter clockwise: shift + left arrow.","Increase pitch 10 degrees: shift + up arrow.","Decrease pitch 10 degrees: shift + down arrow.","Jump focus to the map: Escape."].join("\n"),o.map.getCanvasContainer().appendChild(o.atlasMapKeyBindings);var t=[189,187,38,37,39,40],e=o.map._getMap()._canvas;null!=e&&e.addEventListener("keyup",function(e){t.find(function(t){return e.keyCode===t})&&(o.atlasMapKeyBindings.innerHTML="")})},this.initializeMapLiveStateInfo=function(){},this.initializeMapStyleInfo=function(){o.atlasMapStyleInfo=document.createElement("div"),o.atlasMapStyleInfo.setAttribute("tabindex","-1"),o.atlasMapStyleInfo.setAttribute("aria-hidden","true"),o.atlasMapStyleInfo.id="atlas-map-style",o.atlasMapStyleInfo.classList.add("hidden-accessible-element"),o.map.events.add("stylechanged",o.updateMapStyle),o.map.getCanvasContainer().appendChild(o.atlasMapStyleInfo)},this.updateMapStyle=function(){o.atlasMapStyleInfo.innerHTML="<p>Map style: "+o.map.getStyle().style+".</p>"},this.updateMapState=function(t){o.atlasMapLiveStateInfo.innerHTML=t},this.map=t},Cl=function(t){var o=this;this.listenerEnabled=!1,this.lastFlowMode="none",this.addToMap=function(){if(!o.map._isReady())throw new Error("Traffic flow could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before enabling traffic flow.");o.listenerEnabled||(o.map.events.add("styledata",o.addToMap),o.listenerEnabled=!0);var t,e=o.map.getTraffic();"none"===e.flow||(t=o.map.layers.getLayerById("traffic_"+e.flow))&&(o.lastFlowMode=e.flow,t._updateLayoutProperty("visibility","visible","none"))},this.removeFromMap=function(){var t;o.map.getTraffic();"none"!=o.lastFlowMode&&((t=o.map.layers.getLayerById("traffic_"+o.lastFlowMode))&&t._updateLayoutProperty("visibility","none","visible"),o.lastFlowMode="none"),o.listenerEnabled&&(o.map.events.remove("styledata",o.addToMap),o.listenerEnabled=!1)},this.map=t},Ll=(v(Sl,_l=S),Sl);function Sl(){var t=null!==_l&&_l.apply(this,arguments)||this;return t.interactive=!0,t.scrollZoomInteraction=!0,t.boxZoomInteraction=!0,t.dragRotateInteraction=!0,t.dragPanInteraction=!0,t.keyboardInteraction=!0,t.dblClickZoomInteraction=!0,t.touchInteraction=!0,t.touchRotate=!0,t.wheelZoomRate=1/450,t}var kl=(Ml.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},Ml.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},Ml);function Ml(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}var Pl=(Il.prototype.enable=function(){this.map.getCanvasContainer().addEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().addEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().addEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().addEventListener("touchend",this._onTouchEnd)},Il.prototype.disable=function(){this.map.getCanvasContainer().removeEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().removeEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().removeEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().removeEventListener("touchend",this._onTouchEnd)},Il);function Il(t){var e=this;this._onGestureStart=function(t){e.hasTouch||(t.preventDefault(),e.initZoom=e.map.getCamera().zoom)},this._onGestureChange=function(t){e.hasTouch||(t.preventDefault(),e.map.setCamera({zoom:e.initZoom+t.scale-1}))},this._onTouchStart=function(t){e.hasTouch=!0},this._onTouchEnd=function(t){0===t.touches.length&&(e.hasTouch=!1)},this.map=t}var Ol=(Al.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},Al.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},Al.prototype.setOptions=function(t){this.options=(new Ll).merge(this.options,t),this.added&&this._setInteractions(this.options)},Al.prototype.getOptions=function(){return Object.assign({},this.options)},Al.prototype._setInteractions=function(t){var e;t.interactive?(t.boxZoomInteraction?this.map._getMap().boxZoom.enable():this.map._getMap().boxZoom.disable(),t.dblClickZoomInteraction?this.map._getMap().doubleClickZoom.enable():this.map._getMap().doubleClickZoom.disable(),t.dragPanInteraction?this.map._getMap().dragPan.enable():this.map._getMap().dragPan.disable(),t.dragRotateInteraction?this.map._getMap().dragRotate.enable():this.map._getMap().dragRotate.disable(),t.keyboardInteraction?(this.map._getMap().keyboard.enable(),this.focusShortcut.enable()):(this.map._getMap().keyboard.disable(),this.focusShortcut.disable()),t.scrollZoomInteraction?(this.map._getMap().scrollZoom.enable(),this.map._getMap().scrollZoom.setWheelZoomRate(t.wheelZoomRate)):this.map._getMap().scrollZoom.disable(),e=this.map._getMap().touchZoomRotate,t.touchInteraction?(e.enable(),t.touchRotate?e.enableRotation():e.disableRotation()):e.disable(),this.pinchZoom.enable()):(this.map._getMap().boxZoom.disable(),this.map._getMap().doubleClickZoom.disable(),this.map._getMap().dragPan.disable(),this.map._getMap().dragRotate.disable(),this.map._getMap().keyboard.disable(),this.focusShortcut.disable(),this.map._getMap().scrollZoom.disable(),this.map._getMap().touchZoomRotate.disable(),this.pinchZoom.disable())},Al);function Al(t,e){this.added=!1,this.map=t,this.focusShortcut=new kl(t),this.pinchZoom=new Pl(t),this.options=(new Ll).merge(e)}var El=(Tl.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=x(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._add(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._add(t,e)},Tl.prototype.getControls=function(){return Array.from(this.controls)},Tl.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._remove(t)},Tl.prototype._add=function(t,e){this.controls.add(t);var o=(new j).merge(e),t=t.onAdd(this.map,e),e=this.controlContainer.getElementsByClassName(o.position);if(!(0<e.length))throw new Error("Control position "+o.position+" does not exist.");e.item(0).appendChild(t)},Tl.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},Tl);function Tl(t){for(var e in this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),u.ControlPosition){var o;u.ControlPosition.hasOwnProperty(e)&&((o=document.createElement("div")).classList.add(u.ControlPosition[e]),o.classList.add("subcontrol-container"),this.controlContainer.appendChild(o))}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}var Dl=(zl.prototype.addCallback=function(s,a,l,t,c){var e,u,p=this;if(t)e=function(t){var e=t.lngLat?new qr(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?[t.point.x,t.point.y]:void 0,n=t.features?t.features.map(function(t){return new Rn(t.geometry,t.properties,t.id)}):[],n={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:o,features:n};l(n)};else switch(s){case"data":case"sourcedata":case"styledata":e=function(t){t=b(b({dataType:t.dataType},"source"===t.dataType&&b(b(b({isSourceLoaded:t.isSourceLoaded},t.sourceDataType&&{sourceDataType:t.sourceDataType}),{source:p.map.sources.getById(t.sourceId)}),t.tile&&{tile:{id:{x:t.tile.tileID.canonical.x,y:t.tile.tileID.canonical.y,z:t.tile.tileID.canonical.z},size:t.tile.tileSize,state:t.tile.state}})),{map:p.map,type:t.type});c&&p.map.events._removeListener(s,a,l),l(t)};break;case"error":e=function(t){t={error:t.error,map:p.map,type:t.type};c&&p.map.events._removeListener(s,a,l),l(t)};break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.point?new Fn(t.point.x,t.point.y):void 0,o=t.points?t.points.map(function(t){return new Fn(t.x,t.y)}):[],n=t.lngLat?new qr(t.lngLat.lng,t.lngLat.lat):void 0,r=t.lngLats?t.lngLats.map(function(t){return new qr(t.lng,t.lat)}):[],i=n?p.map.layers.getRenderedShapes(new Zn(n),a?[a]:void 0):[],i={map:p.map,originalEvent:t.originalEvent,pixel:e,pixels:o,position:n,positions:r,shapes:i,layerId:a||void 0,preventDefault:function(){return t.preventDefault()},type:t.type};c&&p.map.events._removeListener(s,a,l),l(i)};break;case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"click":case"dblclick":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.lngLat?new qr(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?new Fn(t.point.x,t.point.y):void 0,n=e?p.map.layers.getRenderedShapes(new Zn(e),a?[a]:void 0):[],n={map:p.map,originalEvent:t.originalEvent,position:e,pixel:o,preventDefault:function(){return t.preventDefault()},shapes:n,layerId:a||void 0,type:t.type};c&&p.map.events._removeListener(s,a,l),l(n)};break;case"styleimagemissing":e=function(t){c&&p.map.events._removeListener(s,a,l),l(t.id)};break;case"wheel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e={map:p.map,originalEvent:t.originalEvent,preventDefault:function(){return t.preventDefault()},type:t.type};c&&p.map.events._removeListener(s,a,l),l(e)};break;case"resize":e=function(t){var e,o={map:p.map,type:t.type};for(e in t)"type"!==e&&"target"!==e&&(o[e]=t[e]);c&&p.map.events._removeListener(s,a,l),l(o)};break;default:e=function(t){var e={map:p.map,type:t.type};t.originalEvent&&(e.originalEvent=t.originalEvent),c&&p.map.events._removeListener(s,a,l),l(e)}}this.callbacks.has(a)||this.callbacks.set(a,new q),this.callbacks.get(a).has(s)||this.callbacks.get(a).set(s,new Map),this.callbacks.get(a).get(s).set(l,[e,c])},zl.prototype.removeCallback=function(t,e,o){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o)&&this.callbacks.get(e).get(t).delete(o)},zl.prototype.getModifiedCallback=function(t,e,o){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o))return this.callbacks.get(e).get(t).get(o)[0]},zl.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},zl.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){e=this.callbacks.get(e);if(e.has(t))return e.get(t)}},zl);function zl(t){this.callbacks=new q,this.map=t}var Rl=["maxzoomchanged","minzoomchanged","mapconfigurationchanged"],Bl=(jl.prototype.add=function(t,e,o){var n,r;if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else{e=Array.isArray(e)?e:[e];try{for(var i=x(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Ti&&Ti._isMBoxEvent(t)?this._addLayerListener(t,a,o,!1,!1):a._addEventListener(t,o,!1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},jl.prototype.addOnce=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof Ti&&Ti._isMBoxEvent(t)?this._addLayerListener(t,e,o,!1,!0):e._addEventListener(t,o,!0)},jl.prototype._addLegacy=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,o,!0,!1)},jl.prototype._addLayerListener=function(t,e,o,n,r){var i,s,a,l,c=e instanceof Ti?e.getId():e,e=this.map.layers.getLayerById(c),u=this.mapCallbackHandler.getModifiedCallback(t,c,o);if(u&&e)try{for(var p=x(e._getLayerIds()),h=p.next();!h.done;h=p.next()){var d=h.value;this.map._getMap().off(t,d,u)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}if(this.mapCallbackHandler.addCallback(t,c,o,n,r),e){u=this.mapCallbackHandler.getModifiedCallback(t,c,o);try{for(var f=x(e._getLayerIds()),m=f.next();!m.done;m=f.next()){d=m.value;this.map._getMap().on(t,d,u)}}catch(t){a={error:t}}finally{try{m&&!m.done&&(l=f.return)&&l.call(f)}finally{if(a)throw a.error}}}},jl.prototype._addGlobalListener=function(t,e,o,n){var r,i,s,a;Rl.includes(t)?this.map._addEventListener(t,e,n):(r=this.mapCallbackHandler.getModifiedCallback(t,"",e),this.mapCallbackHandler.addCallback(t,"",e,o,n),i=this.mapCallbackHandler.getModifiedCallback(t,"",e),"load"===t&&this.map._isLoaded()?(s={type:"load",map:this.map},setTimeout(function(){return i(s)})):"ready"===t?this.map._isReady()&&(a={type:"ready",map:this.map},setTimeout(function(){return i(a)})):(r&&this.map._getMap().off(t,r),this.map._getMap().on(t,i)))},jl.prototype.invoke=function(t,e,o){if(void 0===o)this._invokeListeners(t,"",e);else if(e instanceof Ti&&Ti._isMBoxEvent(t))this._invokeListeners(t,e.getId(),o);else{if(!(e instanceof H))throw new Error("The invoke target is invalid.");e._invokeEvent(t,o)}},jl.prototype._invokeListeners=function(o,n,r){var i=this,t=new q(this.mapCallbackHandler.getEventCallbacks(o,n));t?t.forEach(function(t,e){t=C(t,2),t[0];t[1]&&i._removeListener(o,n,e),e(r)}):"error"===o&&console.error("error"in r?r.error:r)},jl.prototype.remove=function(t,e,o){var n,r;if("function"==typeof e)this._removeListener(t,"",e);else{e=Array.isArray(e)?e:[e];try{for(var i=x(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof Ti&&Ti._isMBoxEvent(t)?this._removeListener(t,a,o):a._removeEventListener(t,o)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},jl.prototype._removeLegacy=function(t,e,o){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,o)},jl.prototype._removeListener=function(t,e,o){var n,r;if(Rl.includes(t))this.map._removeEventListener(t,o);else{var i=e instanceof Ti?e.getId():e,s=this.mapCallbackHandler.getModifiedCallback(t,i,o);if(s)if(i){e=this.map.layers.getLayerById(i);if(e)try{for(var a=x(e._getLayerIds()),l=a.next();!l.done;l=a.next()){var c=l.value;this.map._getMap().off(t,c,s)}}catch(t){n={error:t}}finally{try{l&&!l.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}else this.map._getMap().off(t,s);this.mapCallbackHandler.removeCallback(t,i,o)}},jl.prototype._enableLayerEvents=function(l){var c=this,t=this.mapCallbackHandler.getLayerCallbacks(l.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=C(t,1)[0];try{for(var r=x(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().on(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},jl.prototype._disableLayerEvents=function(l){var c=this,t=this.mapCallbackHandler.getLayerCallbacks(l.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=C(t,1)[0];try{for(var r=x(l._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;c.map._getMap().off(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},jl);function jl(t){this.map=t,this.mapCallbackHandler=new Dl(this.map)}var Fl=(Nl.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=x(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addMarker(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addMarker(t,e)},Nl.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},Nl.prototype.getMarkers=function(){return Array.from(this.markers)},Nl.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeMarker(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeMarker(t)},Nl.prototype._removeMarker=function(e){var o=this;e instanceof ra?(e._removeFromMap(),this.markers.delete(e)):this.markers.forEach(function(t){t._getId()===e&&(t._removeFromMap(),o.markers.delete(t))})},Nl.prototype.clear=function(){var e=this;this.markers.forEach(function(t){t._removeFromMap(),e.markers.delete(t)})},Nl);function Nl(t){this.markers=new Set,this.map=t}var Zl=(ql.prototype.add=function(s,e,a){var l=this;return new Promise(function(o,n){var r,t,i;l.userImages.has(s)?o():e instanceof HTMLImageElement||e instanceof ImageData?(l.map._getMap().addImage(s,e,a),l.userImages.set(s,{image:e,meta:a}),o()):"string"==typeof e&&(t=void 0,t=/<svg/i.test(e)&&!/^data:/i.test(e)?"data:image/svg+xml;base64,"+window.btoa(e):e,i=!1,l.map._sendRequest(t,"Image").then(function(t){return i?void 0:t.blob()}).then(function(t){var e;!i&&t&&(clearTimeout(r),(e=new Image).onload=function(){l.map._getMap().addImage(s,e,a),l.userImages.set(s,{image:e,meta:a}),o()},e.onerror=e.onabort=function(){n("Failed to load image into HTML element.")},e.src=URL.createObjectURL(t))}).catch(function(){i||(clearTimeout(r),n("Failed to load image into HTML element."))}),r=setTimeout(function(){i=!0,n("Failed to load image within specified timeout: "+l.imageLoadTimeout+" ms.")},l.imageLoadTimeout))})},ql.prototype.clear=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().removeImage(e)}),this.userImages.clear()},ql.prototype.getImageIds=function(){var o=[];return this.userImages.forEach(function(t,e){o.push(e)}),o},ql.prototype.createFromTemplate=function(t,e,o,n,r){o=o||"#1A73AA",n=n||"#fff";r=(r=nl(e,r)).replace(/{color}/g,o).replace(/{secondaryColor}/g,n).replace(/{text}/g,"");return this.add(t,r)},ql.prototype.hasImage=function(t){return this.userImages.has(t)},ql.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},ql.prototype._restoreImages=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().hasImage(e)||o.map._getMap().addImage(e,t.image,t.meta)})},ql);function ql(t){this.userImages=new q,this.imageLoadTimeout=5e3,this.map=t}var Hl,Ul=(v(Wl,Hl=Ti),Wl.prototype._buildLayers=function(){return this.layers},Wl.prototype._getLayerIds=function(){return this.layers.map(function(t){return t.id})},Wl.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=x(this.layers),r=n.next();!r.done;r=n.next()){var i=r.value;"string"==typeof i.source?o.add(i.source):i.source&&o.add(i.id)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},Wl.prototype._updateLayoutProperty=function(e,o,n,r){var i=this;this.layers.forEach(function(t){Tn(o,n)||i.map._getMap().setLayoutProperty(t.id,e,r||o)})},Wl);function Wl(t,e){e=Hl.call(this,e)||this;return e.layers=t,e}var Gl=(Kl.prototype.add=function(t,e){var o,n,r=e instanceof Ti?e.getId():e;if(Array.isArray(t))try{for(var i=x(t),s=i.next();!s.done;s=i.next()){var a=s.value;this._addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}else this._addLayer(t,r)},Kl.prototype._addLayer=function(e,o){if(!(this.map._isReady()||e instanceof Ul))throw new Error("The layer '"+e.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a layer to it.");var t,n,r,i;o!==e.getId()&&this.layerIndex.find(function(t){return o===t.getId()})?this._getMapboxLayerExists(e)?(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),i=this.layerIndex[n],this._removeMapboxLayers(e),this._addMapboxLayers(e,o),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),this.layerIndex.splice(n,1),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof Ul||(this.userLayers[r]={layer:e,before:o}),i.onRemove()):(this._addMapboxLayers(e,o),this.map.events._enableLayerEvents(e),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof Ul||this.userLayers.push({layer:e,before:o})):(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),0<=n&&0<=r?(i=this.layerIndex[n],this._removeMapboxLayers(i),this._addMapboxLayers(e,n+1),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),(this.layerIndex[n]=e)instanceof Ul||(this.userLayers[r]={layer:e,before:void 0}),i.onRemove()):(this._addMapboxLayers(e),this.map.events._enableLayerEvents(e),this.layerIndex.push(e),e instanceof Ul||this.userLayers.push({layer:e,before:o}))),e.onAdd(this.map)},Kl.prototype._addMapboxLayers=function(t,e){var o,n;if(!(t instanceof Bs)||t.getOptions().tileUrl)if(t instanceof Ul)this.map.events._enableLayerEvents(t);else{t instanceof ts&&this.map._getMap().addSource(t._getSourceId(),t._buildSource());var r=this._getMapboxBefore(e);try{for(var i=x(t._buildLayers()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}this.map.events._enableLayerEvents(t)}},Kl.prototype._removeMapboxLayers=function(t,e){var o,n;if(t instanceof Ul&&!e)this.map.events._disableLayerEvents(t);else{try{for(var r=x(t._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;this.map._getMap().getLayer(s)&&this.map._getMap().removeLayer(s)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this.map.events._disableLayerEvents(t),t instanceof ts&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())}},Kl.prototype._getMapboxLayerExists=function(e){var o=this,n=!1;return"string"==typeof e?!!(e=this.layerIndex.find(function(t){return t.getId()===e})):(e._getLayerIds().forEach(function(t){o.map._getMap().getLayer(t)&&(n=!0)}),n)},Kl.prototype._getMapboxBefore=function(e){var o,t,n,r;if("string"==typeof e){var i=this.layerIndex.find(function(t){return t.getId()===e});if(!i)return;try{for(var s=x(i._getLayerIds()),a=s.next();!a.done;a=s.next()){var l=a.value;if(this.map._getMap().getLayer(l))return l}}catch(t){o={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}e=this.layerIndex.findIndex(function(t){return t.getId()===e})+1}for(var c=e;c<this.layerIndex.length;c++)try{for(var u=(n=void 0,x(this.layerIndex[c]._getLayerIds())),p=u.next();!p.done;p=u.next()){l=p.value;if(this.map._getMap().getLayer(l))return l}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},Kl.prototype.clear=function(){for(var t=this.layerIndex.length-1;0<=t;t--){var e=this.layerIndex[t];this._removeMapboxLayers(e,!0),this.layerIndex.splice(t,1),e.onRemove()}this.userLayers=[]},Kl.prototype.getLayerById=function(e){var t=this.layerIndex.find(function(t){return t.getId()===e});if(t)return t},Kl.prototype.getLayers=function(){return this.layerIndex.slice(0)},Kl.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=x(this.layerIndex),r=n.next();!r.done;r=n.next())r.value._getSourceIds().forEach(function(t){return o.add(t)})}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},Kl.prototype._getUserLayers=function(){return Array.from(this.userLayers)},Kl.prototype.move=function(t,e){var o=t instanceof Ti?t.getId():t,n=e instanceof Ti?e.getId():e;if(!this.layerIndex.find(function(t){return t.getId()===o}))throw new Error("The layer '"+o+"' has not been added to the map and cannot be moved.");e=this.layerIndex.findIndex(function(t){return t.getId()===o});this._moveMapboxLayers(this.layerIndex[e],n),t=this.layerIndex[e],this.layerIndex.splice(e,1);e=this.layerIndex.findIndex(function(t){return t.getId()===n});-1<e?this.layerIndex.splice(e,0,t):this.layerIndex.push(t);t=this.userLayers.find(function(t){return t.layer.getId()===o});t&&(t.before=n)},Kl.prototype._moveMapboxLayers=function(t,e){var o,n,r=this._getMapboxBefore(e);try{for(var i=x(t._getLayerIds()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().moveLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}},Kl.prototype.getRenderedShapes=function(t,e,o){var n,r,i,s=this;if(t=t||[-180,-85.0511,180,85.0511],Array.isArray(t)?4===t.length||6===t.length?i=this.map.positionsToPixels([Jr.getSouthWest(t),Jr.getNorthEast(t)]):2!==t.length&&3!==t.length||(i=this.map.positionsToPixels([t])[0]):i=this.map.positionsToPixels([t.coordinates])[0],e){e=Array.isArray(e)?e:[e];var a=[],l=this;try{for(var c=x(e),u=c.next();!u.done;u=c.next())!function(t){var e=t instanceof Ti?t.getId():t,t=l.layerIndex.findIndex(function(t){return t.getId()===e});if(!(-1<t))throw new Error("The layer '"+e+"' has not been added to the map and its rendered features cannot be retrieved.");a.push.apply(a,L(l.layerIndex[t]._getLayerIds().filter(function(t){return!!s.map._getMap().getLayer(t)})))}(u.value)}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}}o=this.map._getMap().queryRenderedFeatures(i,{layers:a,filter:o});return this.map.sources._mapFeaturesToShapes(o)},Kl.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeLayer(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeLayer(t)},Kl.prototype._removeLayer=function(t){var e=t instanceof Ti?t.getId():t,o=this.layerIndex.findIndex(function(t){return t.getId()===e});if(-1==o)throw new Error("The layer '"+e+"' has not been added to the map and cannot be removed.");t=this.layerIndex[o];this._removeMapboxLayers(t),this.layerIndex.splice(o,1);o=this.userLayers.findIndex(function(t){return t.layer.getId()===e});-1!=o&&this.userLayers.splice(o,1),t.onRemove()},Kl);function Kl(t){this.layerIndex=[],this.userLayers=[],this.map=t}var Vl=(Yl.prototype.add=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)||(this.popups.add(i),i.attach(this.map))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Yl.prototype.clear=function(){var e=this;this.popups.forEach(function(t){e.popups.delete(t),t.remove()})},Yl.prototype.remove=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)&&(this.popups.delete(i),i.remove())}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Yl.prototype.getPopups=function(){return Array.from(this.popups)},Yl.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+Yl.Css.collection);return t||((t=document.createElement("div")).classList.add(Yl.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Yl.prototype._addDraggedPopup=function(t){0===this.draggedPopups.size&&(this.map.getMapContainer().addEventListener("mousemove",this._onDrag),this.map.getMapContainer().addEventListener("touchmove",this._onDrag),this.map.getMapContainer().addEventListener("mouseup",this._onUp),this.map.getMapContainer().addEventListener("touchend",this._onUp)),this.draggedPopups.add(t)},Yl.Css={collection:"popup-collection-container"},Yl);function Yl(t){var n=this;this._onDrag=function(t){var e,o;"mousemove"===t.type?(e=t.clientX,o=t.clientY):"touchmove"===t.type&&(e=t.touches[0].clientX,o=t.touches[0].clientY),n.draggedPopups.forEach(function(t){t._dragToPixel([e,o])})},this._onUp=function(){n.map.getMapContainer().removeEventListener("mousemove",n._onDrag),n.map.getMapContainer().removeEventListener("touchmove",n._onDrag),n.map.getMapContainer().removeEventListener("mouseup",n._onUp),n.map.getMapContainer().removeEventListener("touchend",n._onUp),n.draggedPopups.forEach(function(t){n.draggedPopups.delete(t),t._onUp()})},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var Jl,$l=(v(Xl,Jl=xi),Xl.prototype._buildSource=function(){return this.source},Xl.prototype._modifySource=function(t,e){if(t.tiles){var o=t.tiles.map(function(t){return"string"==typeof t?t:new O({domain:r,path:t.path,queryParams:b(b({},e),t.queryParams)}).toString()});t.tiles=o}else{if(!t.url)throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");t.url="string"==typeof t.url?t.url:new O({domain:r,path:t.url.path,queryParams:b(b({},e),t.url.queryParams)}).toString()}return t},Xl);function Xl(t,e,o){t=Jl.call(this,t)||this;return t.source=t._modifySource(e,o),t}var Ql=(tc.prototype.add=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=x(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addSource(t,e)},tc.prototype.getRenderedShapes=function(t,e,o){t="string"==typeof t?t:t.getId(),e=this.map._getMap().querySourceFeatures(t,{sourceLayer:o,filter:e});return this.map.sources._mapFeaturesToShapes(e,!0,this.sources.get(t))},tc.prototype._buildSources=function(){var e={};return this.sources.forEach(function(t){e[t.getId()]=t._buildSource()}),e},tc.prototype.clear=function(){var e=this;this.sources.forEach(function(t){e.remove(t)})},tc.prototype.getById=function(t){return this.sources.get(t)},tc.prototype.getSources=function(){return Array.from(this.sources.values())},tc.prototype.isSourceLoaded=function(t){t=t instanceof xi?t.getId():t;return this.map._getMap().isSourceLoaded(t)},tc.prototype.remove=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=x(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._removeSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._removeSource(t,e)},tc.prototype._removeSource=function(t,e){t=t instanceof xi?t.getId():t;if(this.sources.has(t)){if(this.map._getMap().getSource(t)&&e&&this.map._getMap().removeSource(t),this.map._getMap().getSource(t)&&e)throw new Error("One or more layers have a dependency on the source '"+t+"'");return this.sources.get(t)._setMap(null),void this.sources.delete(t)}throw new Error("'"+t+"' is not added to the map")},tc.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'"+t.getId()+"' is already added to the map");this.sources.get(t.getId())._setMap(null),this.sources.delete(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '"+t.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a source to it.");this.map._getMap().addSource(t.getId(),t._buildSource())}this.sources.set(t.getId(),t),t._setMap(this.map)},tc.prototype._mapFeaturesToShapes=function(t,e,o){var n,r,i=[];try{for(var s=x(t),a=s.next();!a.done;a=s.next()){var l=a.value;if((o||"string"==typeof l.source)&&"string"==typeof l.properties[Kr._shapeIdPropName]){var c=o||this.sources.get(l.source);if(c instanceof Si){var u=c.getShapeById(l.properties[Kr._shapeIdPropName]);if(u instanceof Kr){i.push(u);continue}}}e||i.push(l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},tc.prototype._syncSources=function(n){var r=this;n&&(Object.keys(n).forEach(function(t){if(!r.sources.has(t)){var e=n[t];if("vector"===e.type){var o=new $l(t,{name:t,tiles:e.tiles,type:"vector",url:e.url});r.sources.set(t,o),o._setMap(r.map)}else{if("raster"!==e.type)throw new Error("Unable to construct source with ID "+t+".");o=new $l(t,{name:t,tiles:e.tiles,type:"raster",url:e.url});r.sources.set(t,o),o._setMap(r.map)}}}),Object.keys(this.sources).forEach(function(t){n.hasOwnProperty(t)||(r.sources.get(t)._setMap(null),r.sources.delete(t))}))},tc);function tc(t){this.map=t,this.sources=new q}var ec,oc=(v(nc,ec=S),nc);function nc(){var t=null!==ec&&ec.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}var rc,ic=(v(sc,rc=S),sc);function sc(){var t=null!==rc&&rc.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var ac,lc=(v(cc,ac=S),cc.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=x(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&"number"==typeof s.padding&&(s.padding={top:s.padding,bottom:s.padding,left:s.padding,right:s.padding})}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return ac.prototype.merge.apply(this,L(o))},cc);function cc(){var t=null!==ac&&ac.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new Fn(0,0),t.padding=new ic,t}var uc,pc=(v(hc,uc=S),hc);function hc(){var t=null!==uc&&uc.apply(this,arguments)||this;return t.zoom=1,t.center=new qr(0,0),t.centerOffset=new Fn(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=void 0,t}var dc,n=(v(fc,dc=S),fc);function fc(){var t=null!==dc&&dc.apply(this,arguments)||this;return t.name=void 0,t.before=void 0,t.minZoom=1,t.maxZoom=20,t.overwrite=!1,t.opacity=1,t}var mc,yc=(v(gc,mc=n),gc);function gc(){var t=null!==mc&&mc.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.radius=1,t.outlineWidth=5,t.name="default-circles",t}var vc,bc=(v(wc,vc=n),wc);function wc(){var t=null!==vc&&vc.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}var _c,xc=(v(Cc,_c=n),Cc);function Cc(){var t=null!==_c&&_c.apply(this,arguments)||this;return t.iconSize=1,t.fontSize=14,t.fontColor="#000",t.textFont="SegoeUi-Regular",t.cluster=!0,t.clusterIcon=void 0,t.textOffset=[0,0],t.name="default-pins",t.icon="pin-darkblue",t.title="",t}var Lc,Sc=(v(kc,Lc=n),kc);function kc(){var t=null!==Lc&&Lc.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}var Mc,Pc=(v(Ic,Mc=n),Ic);function Ic(){var t=null!==Mc&&Mc.apply(this,arguments)||this;return t.name="default-raster",t}var Oc,Ac=(v(Ec,Oc=S),Ec);function Ec(){var t=null!==Oc&&Oc.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var Tc,Dc=(v(zc,Tc=S),zc.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=x(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&(s.hasOwnProperty("view")?s.userRegion=s.view:s.hasOwnProperty("userRegion")&&(s.view=s.userRegion),"string"==typeof s.language&&(s.language=ua.getCode(s.language)))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return Tc.prototype.merge.apply(this,L(o))},zc);function zc(){var t=null!==Tc&&Tc.apply(this,arguments)||this;return t.antialias=void 0,t.autoResize=!0,t.language=va,t.light=new Ac,t.preserveDrawingBuffer=!1,t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.showLabels=!0,t.customAttribution=void 0,t.showTileBoundaries=!1,t.style=void 0,t.view=ma,t.userRegion=t.view,t}function Rc(t){return 0==t.length?void 0:t.slice(1).reduce(function(o,n){return function(t,e){t=o(t,e);return b(b({},t),n(t.url,e))}},t[0])}var Bc,jc=(v(Fc,Bc=S),Fc.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{for(var o=x(t),n=o.next();!n.done;n=o.next()){var r=n.value;r&&(r.authOptions?"string"==typeof r.authOptions.subscriptionKey&&(r.subscriptionKey=r["subscription-key"]=r.authOptions.subscriptionKey):"string"==typeof r.subscriptionKey?(r["subscription-key"]=r.subscriptionKey,r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r.subscriptionKey}):"string"==typeof r["subscription-key"]&&(r.subscriptionKey=r["subscription-key"],r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r["subscription-key"]}),"string"==typeof r.sessionId?r["session-id"]=r.sessionId:"string"==typeof r["session-id"]&&(r.sessionId=r["session-id"]),"boolean"==typeof r.disableTelemetry?r["disable-telemetry"]=r.disableTelemetry:"boolean"==typeof r["disable-telemetry"]&&(r.disableTelemetry=r["disable-telemetry"]),"boolean"==typeof r.enableAccessibility?r["enable-accessibility"]=r.enableAccessibility:"boolean"==typeof r["enable-accessibility"]&&(r.enableAccessibility=r["enable-accessibility"]))}}catch(t){a={error:t}}finally{try{n&&!n.done&&(s=o.return)&&s.call(o)}finally{if(a)throw a.error}}var i=this._transformers,s=t?t.filter(function(t){return void 0!==t}).reduce(function(t,e){return L(t,e._transformers||[])},[]):[],a=Bc.prototype.merge.apply(this,L(t));return a.authOptions.authType!==u.AuthenticationType.subscriptionKey&&(a["subscription-key"]=a.subscriptionKey=void 0),void 0!==a.styleSet&&void 0===a.mapConfiguration&&(a.mapConfiguration=a.styleSet),a.mapConfiguration&&"string"!=typeof a.mapConfiguration&&(a.mapConfiguration=b(b({},a.mapConfiguration),{defaultConfiguration:a.mapConfiguration.defaultConfiguration||a.mapConfiguration.defaultStyle,configurations:a.mapConfiguration.configurations||a.mapConfiguration.styles})),this._transformers=L(i||[],s.filter(function(t){return!i.includes(t)})),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),this.transformRequest=Rc(this._transformers),a},Fc.prototype.addTransformer=function(t){this._transformers||(this._transformers=[]),this._transformers.push(t),this.transformRequest=Rc(this._transformers)},Fc.prototype.removeTransformer=function(e){this._transformers&&(this._transformers=this._transformers.filter(function(t){return e!==t}),this.transformRequest=Rc(this._transformers))},Fc._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Fc);function Fc(){var t=null!==Bc&&Bc.apply(this,arguments)||this;return t.authOptions=za(),t.disableTelemetry=!1,t["disable-telemetry"]=t.disableTelemetry,t.domain=wa,t.staticAssetsDomain=_a,t.styleDefinitionsPath=xa,t.styleDefinitionsVersion=Ca,t.styleAPIVersion=La,t.mapConfiguration=void 0,t.styleSet=void 0,t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.enableAccessibilityLocationFallback=!0,t.maxParallelImageRequests=qa(),t.refreshExpiredTiles=!0,t.subscriptionKey=Wa(),t["subscription-key"]=t.subscriptionKey,t.sessionId=ba,t["session-id"]=t.sessionId,t._transformers=[],t.transformRequest=void 0,t.workerCount=Za(),t.fadeDuration=300,t.localIdeographFontFamily="sans-serif",t.validateStyle=!0,t}var Nc=(Zc.getLayerGroup=function(t){var e=t;if(null!=e&&e.metadata&&e.metadata["microsoft.maps:layerGroup"])return e.metadata["microsoft.maps:layerGroup"];t=null!==(e=null==e?void 0:e.id)&&void 0!==e?e:t;if(t.startsWith("microsoft.")){t=t.split(".");return 4<=t.length?t[3]:void 0}},Zc);function Zc(){}var qc=(Hc.resolve=function(t){return new Hc(Promise.resolve(t))},Hc.reject=function(t){return new Hc(Promise.reject(t))},Hc.prototype.then=function(t,e){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).then(t,e)},Hc.prototype.catch=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).catch(t)},Hc.prototype.finally=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).finally(t)},Hc.prototype.hijackAndResolve=function(t){this._hijackedToResolve=t,this._resolve&&this._resolve(t)},Hc.prototype.hijackAndReject=function(t){this._hijackedToReject=t,this._reject&&this._reject(t)},Hc.prototype.switchWith=function(t){this.origin=t,this._toResolve=void 0,this._toReject=void 0},Hc);function Hc(t){var r=this;this.isHijacked=function(){return void 0!==r._hijackedToResolve||void 0!==r._hijackedToReject},this.isResolved=function(){return void 0!==r._hijackedToResolve||void 0!==r._toResolve},this.isRejected=function(){return void 0!==r._hijackedToReject||void 0!==r._toReject},this.resultIfResolved=function(){return r._hijackedToResolve||r._toResolve},this.errorIfRejected=function(){return r._hijackedToReject||r._toReject},this._thenResolver=function(e,o){var n;r._hijackedToResolve?e(r._hijackedToResolve):r._hijackedToReject?o(r._hijackedToReject):(n=r.origin,r.origin.then(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toResolve=t,e(t)))}).catch(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toReject=t,o(t)))}))},this.origin=t,this[Symbol.toStringTag]=this.origin[Symbol.toStringTag]}var Uc={road:"Road",satellite:"Satellite",satellite_road_labels:"Hybrid",grayscale_dark:"Grayscale (Dark)",grayscale_light:"Grayscale (Light)",night:"Night",road_shaded_relief:"Terra",blank:"Blank",blank_accessible:"Blank (Accessible)",high_contrast_dark:"High contrast (Dark)",high_contrast_light:"High contrast (Light)"},Wc=(Gc.prototype.updateIndoorState=function(t,e){var o,n,r=this,i=this.map.styles.getMapConfiguration();i?(this.preservedPreindoorMapConfiguration=i,o=this.map.getStyle().style?this.map.getStyle().style+"_indoor"+("dark"===t?"_dark":"")+"_tileset_"+e:void 0,this.map.styles.setMapConfiguration("defaultIndoor_"+e,"microsoft-maps:default"===i?o:void 0)):(n=(null===(o=this.indoorState)||void 0===o?void 0:o.tilesetId)!==e,this.indoorState={tilesetId:e,theme:t},this.initStyleset(),this.definitions().then(function(t){var e=(r.map.getStyle().style||t.defaultConfiguration).replace("_indoor_dark","").replace("_indoor","")+"_indoor",t=t.configurations.find(function(t){return t.name.startsWith(e)});t&&r.map.setStyle({style:t.name},!n)}))},Gc.prototype.unsetIndoorState=function(){var o=this,t=this.preservedPreindoorMapConfiguration;t?this.map.styles.setMapConfiguration(t):(this.indoorState=void 0,this.initStyleset(),this.definitions().then(function(t){var e=o.map.getStyle().style;e.includes("_indoor")&&e.split("_indoor")[0]?o.map.setStyle({style:e.split("_indoor")[0]}):o.map.setStyle({style:void 0})}))},Gc.prototype.initStyleset=function(){var e=this,t=this.serviceOptions.mapConfiguration?"string"==typeof this.serviceOptions.mapConfiguration?new qc(this._request(this.serviceOptions.domain,m+"/mapconfigurations/metadata/"+this.serviceOptions.mapConfiguration,"StyleDefinitions").then(function(t){return b(b({},t),{defaultConfiguration:t.defaultConfiguration||t.defaultStyle,configurations:t.configurations||t.styles})})):qc.resolve(this.serviceOptions.mapConfiguration):new qc(this._request(this.serviceOptions.staticAssetsDomain,f+"/"+m,"StyleDefinitions",{version:this.serviceOptions.styleDefinitionsVersion}).then(function(t){return{version:isNaN(t.version)?0:parseFloat(t.version),defaultConfiguration:t.defaultStyle,configurations:t.styles.filter(function(t){return e.indoorState?"auto"===e.indoorState.theme?t.name.endsWith("dark"===t.theme?"_indoor_dark":"_indoor"):t.name.endsWith("dark"===e.indoorState.theme?"_indoor_dark":"_indoor"):!t.name.includes("indoor")}).map(function(t){return{copyright:t.copyright.join(" "),name:t.name,displayName:function(t){t=e.indoorState&&t.includes("_indoor")?t.split("_indoor")[0]:t;return t in Uc?Uc[t]:t}(t.name),theme:t.theme,thumbnail:new O({domain:e.serviceOptions.staticAssetsDomain,path:t.thumbnail,protocol:"https"}).toString(),url:new O({domain:e.serviceOptions.staticAssetsDomain,path:f+"/"+m+"/"+t.name,queryParams:{styleVersion:e.serviceOptions.styleDefinitionsVersion},protocol:"https"}).toString()}})}}));return this.initPromise&&this.initPromise.switchWith(t),this.initPromise=t,this.initPromise.then(function(t){return e.map._invokeEvent("mapconfigurationchanged",t)}),this.initPromise},Gc.prototype.getStyle=function(t){t=this._lookUp(t);if(!t)throw Error("Style definition is not available.");if(t.url)return t.url;if(t.style)return t.style;throw Error("Style definition does not contain neither URL nor style object.")},Gc.prototype.deriveNewStyle=function(t,e){var i=this.map.getStyle(),s=this.map.getTraffic();return b(b({},e),{sources:Object.entries(e.sources).reduce(function(t,e){var o=C(e,2),e=o[0],o=o[1],o=b({},o);return"url"in o&&"string"==typeof o.url&&o.url.includes(a)&&(o.url=o.url.replace(a,i.language)),t[e]=o,t},{}),layers:e.layers.map(function(t){var e,o,n=b({},t),r=Nc.getLayerGroup(n);return r&&(i.showBuildingModels||"fill-extrusion"!==n.type?"fill-extrusion"===n.type&&(n.layout=null!==(t=n.layout)&&void 0!==t?t:{},n.layout.visibility="visible"):(n.layout=null!==(e=n.layout)&&void 0!==e?e:{},n.layout.visibility="none"),"none"!==s.flow&&r&&r==="traffic_"+s.flow&&"line"==n.type&&(n.layout=null!==(e=n.layout)&&void 0!==e?e:{},n.layout.visibility="visible"),"labels"!==r&&"labels_places"!==r&&"labels_indoor"!==r||"symbol"!==n.type||(i.showLabels?(n.layout=null!==(o=n.layout)&&void 0!==o?o:{},n.layout.visibility="visible"):(n.layout=null!==(o=n.layout)&&void 0!==o?o:{},n.layout.visibility="none"))),n})})},Gc.prototype.injectUserLayersIntoStyle=function(s,a,l){return s?this.map.layers._getUserLayers().reduce(function(o,e){if(e.layer instanceof Hs)return o;var t,n=l[e.before]&&0<l[e.before].length?l[e.before][0]:void 0,r=s.layers.find(function(t){return t.id===e.layer.getId()}),i=a.layers.findIndex(function(t){return t.id===e.layer.getId()});return-1<i&&a.layers.splice(i,1),r&&(t=new Set(Array.from(e.layer._getSourceIds()).map(function(t){return s.sources[t]?{source:s.sources[t],id:t}:void 0}).filter(function(t){return void 0!==t})),-1<(i=n?o.layers.findIndex(function(t){return t.id===n.id}):-1)?o.layers.splice(i,0,r):o.layers.push(r),t.forEach(function(t){var e=t.source,t=t.id;o.sources[t]=e})),o},b({},a)):a},Gc.prototype.setStyle=function(t,e){var n=this;void 0===e&&(e=!0);try{this.map._getMap().setStyle(this.getStyle(t),{diff:e,validate:this.serviceOptions.validateStyle,transformStyle:function(t,e){var o=n.deriveNewStyle(t,e).layers.map(function(t){return{nextLayer:t,layerGroup:Nc.getLayerGroup(t)}}).filter(function(t){t.nextLayer;return void 0!==t.layerGroup}).reduce(function(t,e){var o=e.nextLayer,n=e.layerGroup;return b(b({},t),((e={})[n]=n in t?L(t[n],[o]):[o],e))},{}),e=n.injectUserLayersIntoStyle(t,e,o),o=Object.entries(o).map(function(t){var e=C(t,2),t=e[0],e=e[1];return n._buildFundamentalLayerFrom(e,t)}),o=n.map.layers._getUserLayers().reduce(function(t,e){var o=e.before?t.findIndex(function(t){return t.getId()===e.before}):-1;return-1<o?t.splice(o,0,e.layer):t.push(e.layer),t},o);return n.map.layers.layerIndex=o,n.map.sources._syncSources(e.sources),n.map.events.remove("styledata",n._onStyleData),n.map.events.addOnce("styledata",n._onStyleData),e}})}catch(t){throw t}},Gc.prototype.getTheme=function(t){t=this._lookUp(t);if(t)return t.theme.toLowerCase()},Gc.prototype.getThemeAsync=function(e){return w(this,void 0,void 0,function(){return _(this,function(t){switch(t.label){case 0:return[4,this._lookUpAsync(e)];case 1:return[2,t.sent().theme]}})})},Gc.prototype.setMapConfiguration=function(t,o){var n=this;"string"==typeof(this.serviceOptions.mapConfiguration=t)?this.initStyleset():this.initPromise?this.initPromise.hijackAndResolve(t):this.initPromise=qc.resolve(t),this.definitions().then(function(t){var e=t.defaultConfiguration;t.configurations.find(function(t){return t.name===o})&&(e=o),n.map.setStyle({style:e})})},Gc.prototype.getMapConfiguration=function(){return this.serviceOptions.mapConfiguration},Gc.prototype.setStyleSet=function(t){this.updateIndoorState("indoor_dark"===t?"dark":"light",null)},Gc.prototype.getStyleSet=function(){return void 0!==this.indoorState?"dark"===this.indoorState.theme?"indoor_dark":"indoor":"base"},Gc.prototype.clearStyleSet=function(){this.unsetIndoorState()},Gc.prototype._buildFundamentalLayerFrom=function(t,e){if(t&&0<t.length){t=new Ul(t,e);return t.onAdd(this.map),t}throw new Error("Unable to construct fundamental map layer for ID: "+e+".")},Gc.prototype._transformStyleRequest=function(t,e){t.includes(r)&&(e.url=e.url.replace(r,this.serviceOptions.domain)),t.includes(c)&&(e.url=e.url.replace(c,f)),t.includes(d)&&(e.url=e.url.replace(d,m)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&((t=new URL(e.url)).searchParams.get(l)||(t.searchParams.set(l,this.serviceOptions.styleAPIVersion),e.url=t.href),null!==(t=this.map.authentication)&&void 0!==t&&t.signRequest(e))},Gc.prototype._request=function(n,r,i,s){var a;return void 0===s&&(s={}),w(this,void 0,void 0,function(){var e,o;return _(this,function(t){switch(t.label){case 0:return e={url:new O({protocol:"https",domain:n,path:r,queryParams:b(((o={})[l]=this.serviceOptions.styleAPIVersion,o),s)}).toString()},"function"==typeof this.serviceOptions.transformRequest&&i&&(e=this.serviceOptions.transformRequest(e.url,i)),null!==(a=this.map.authentication)&&void 0!==a&&a.signRequest(e),o={method:"GET",mode:"cors"},e.credentials&&(o.credentials=e.credentials),e.headers&&(o.headers=e.headers),[4,fetch(e.url,o).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText+" ")})];case 1:return[2,t.sent()]}})})},Gc);function Gc(t,e){var n=this;this.definitions=function(){return n.initPromise||n.initStyleset()},this.indoorState=void 0,this.preservedPreindoorMapConfiguration=void 0,this._onStyleData=function(){n._lookUpAsync(n.map.getStyle()).then(function(t){n.map.events.invoke("stylechanged",{style:t.name,map:n.map,type:"stylechanged"})})},this._lookUp=function(e){var t=n.definitions().errorIfRejected(),o=n.definitions().resultIfResolved();return t||void 0===o?null:o.configurations.find(function(t){return t.name===(e.style||o.defaultConfiguration)})||o.configurations.find(function(t){return t.name===o.defaultConfiguration})||o.configurations[0]},this._lookUpAsync=function(o){return w(n,void 0,void 0,function(){var e;return _(this,function(t){switch(t.label){case 0:return[4,this.definitions()];case 1:return e=t.sent(),[2,e.configurations.find(function(t){return t.name===(o.style||e.defaultConfiguration)})||e.configurations.find(function(t){return t.name===e.defaultConfiguration})||e.configurations[0]]}})})},this.map=t,this.serviceOptions=e}var Kc,y=(v(Vc,Kc=H),Vc.prototype.getCanvas=function(){return this.map.getCanvas()},Vc.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},Vc.prototype.getMapContainer=function(){return this.map.getContainer()},Vc.prototype.getServiceOptions=function(){return vi(this.serviceOptions,jc._cloneCustomizer)},Vc.prototype.setServiceOptions=function(t){this.serviceOptions=(new jc).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},Vc.prototype.addRequestTransformer=function(t){this.serviceOptions.addTransformer(t)},Vc.prototype.removeRequestTransformer=function(t){this.serviceOptions.removeTransformer(t)},Vc.prototype.setCamera=function(t,e){if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var o,n=(new lc).merge({maxZoom:this.getCamera().maxZoom},t),r=this._generateSafeBounds(n.bounds),i={padding:n.padding,offset:n.offset,maxZoom:n.maxZoom};if(!(o=this.map.cameraForBounds(r,i))){var s=null===(s=this.map)||void 0===s?void 0:s.getContainer(),s={message:"The map cannot be fit to the current canvas with the given CameraBoundsOptions.",containerWidth:null==s?void 0:s.clientWidth,containerHeight:null==s?void 0:s.clientHeight,safeBounds:r,cameraForBoundsOptions:i};throw new Error(JSON.stringify(s))}this.map.setMaxZoom(n.maxZoom),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(n.maxBounds)}else{i=(new pc).merge(this.getCamera(),t);i.centerOffset&&2<=i.centerOffset.length&&(s=i.centerOffset,(n=Ir([i.center],i.zoom))[0][0]+=s[0],n[0][1]+=s[1],i.center=Pr(n,i.zoom)[0]),o={center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,around:void 0},this.map.setMinZoom(i.minZoom),this.map.setMaxZoom(i.maxZoom),this._invokeEvent("minzoomchanged",this.map.getMinZoom()),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(i.maxBounds)}r?this.map.setMaxBounds(r):this.map.setMaxBounds(null);r=(new oc).merge(t),t={duration:r.duration,easing:function(t){return t},offset:[0,0],animate:!0},e={fromControl:e};"jump"===r.type?this.map.jumpTo(o,e):"ease"===r.type?this.map.easeTo(b(b({},o),t),e):"fly"===r.type&&this.map.flyTo(b(b({},o),t),e)},Vc.prototype.setCameraBounds=function(t){this.setCamera(t)},Vc.prototype.getCamera=function(){var t=this.map.getBounds().getSouthWest().toArray(),e=this.map.getBounds().getNorthEast().toArray();return{zoom:this.map.getZoom(),center:this.map.getCenter().toArray(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),bounds:new Jr(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},Vc.prototype.setStyle=function(t,e){void 0===e&&(e=!0),delete t.preserveDrawingBuffer;t=(new Dc).merge(this.styleOptions,t);t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize),t.language!==this.styleOptions.language&&(this.localizedStringsPromise=ua.getStrings(t.language)),t.renderWorldCopies!==this.styleOptions.renderWorldCopies&&this.map.setRenderWorldCopies(t.renderWorldCopies),t.showFeedbackLink!==this.styleOptions.showFeedbackLink&&this.copyrightControl.setOptions({showFeedbackLink:t.showFeedbackLink}),t.customAttribution!==this.styleOptions.customAttribution&&this.copyrightControl.setOptions({customAttribution:t.customAttribution}),t.showLogo!==this.styleOptions.showLogo&&this.copyrightControl.setOptions({showLogo:t.showLogo}),t.showTileBoundaries!==this.styleOptions.showTileBoundaries&&(this.map.showTileBoundaries=t.showTileBoundaries),this.styleOptions=t,this._setStyleComponents(t,e)},Vc.prototype.getStyle=function(){return Oo(this.styleOptions)},Vc.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},Vc.prototype.addPins=function(t,e){var o,n=(new xc).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new As(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,iconOptions:{anchor:"center",size:n.iconSize,image:["case",["has","icon"],["get","icon"],n.icon],ignorePlacement:!n.cluster,opacity:n.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],n.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[n.textFont]]],size:["case",["has","point_count"],20,n.fontSize],ignorePlacement:!n.cluster,opacity:n.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[n.textOffset[0]/16,n.textOffset[1]/16]]],color:n.fontColor}})),!(r instanceof As))throw new Error("A layer with name '"+n.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Si(o,{cluster:n.cluster})),!(s instanceof Si))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new Xr(t);n.overwrite?s.setShapes(t):s.add(t)},Vc.prototype.addCircles=function(t,e){var o,n=(new yc).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new Zi(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,opacity:n.opacity,radius:["case",["has","radius"],["get","radius"],n.radius],color:["case",["has","color"],["get","color"],n.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],n.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],n.outlineWidth]})),!(r instanceof Zi))throw new Error("A layer with name '"+n.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Si(o)),!(s instanceof Si))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new Xr(t);n.overwrite?s.setShapes(t):s.add(t)},Vc.prototype.addLinestrings=function(t,e){var o,n=(new bc).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new ls(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,lineCap:n.cap,lineJoin:n.join,strokeOpacity:n.opacity,strokeColor:["case",["has","color"],["get","color"],n.color],strokeWidth:["case",["has","width"],["get","width"],n.width]})),!(r instanceof ls))throw new Error("A layer with name '"+n.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Si(o)),!(s instanceof Si))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new Xr(t);n.overwrite?s.setShapes(t):s.add(t)},Vc.prototype.addPolygons=function(t,e){var o,n=(new Sc).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new bs(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,fillOpacity:n.opacity,fillColor:["case",["has","color"],["get","color"],n.color]})),!(r instanceof bs))throw new Error("A layer with name '"+n.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Si(o)),!(s instanceof Si))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new Xr(t);n.overwrite?s.setShapes(t):s.add(t)},Vc.prototype.addRaster=function(t,e){var o=(new Pc).merge(e),n=this.layers.getLayerById(o.name);if(!((n=n||new Bs({maxZoom:o.maxZoom,minZoom:o.minZoom,opacity:o.opacity,tileSize:256,tileUrl:"{subdomain}"},o.name))instanceof Bs))throw new Error("A layer with name '"+o.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if("{subdomain}"!==n.getOptions().tileUrl)throw new Error("A TileLayer with name '"+o.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");(e=!o.overwrite&&n.getOptions().subdomains||[]).push.apply(e,L(t)),n._setOptionsNoUpdate({subdomains:e}),this.layers.add(n,o.before)},Vc.prototype.getLayers=function(){return this.layers.getLayers().map(function(t){return t.getId()})},Vc.prototype.removeLayers=function(t){var e,o;try{for(var n=x(t),r=n.next();!r.done;r=n.next()){var i,s=r.value;this.layers.getLayerById(s)&&(this.layers.remove(s),i=s+"-source",this.sources.getById(i)&&this.sources.remove(i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Vc.prototype.addHtml=function(t,e){t.id||(t.id="marker_"+zn());var o=new ra({htmlContent:t});return this.markers.add(o,e),t.id},Vc.prototype.removeHtml=function(t){this.markers.remove(t)},Vc.prototype.addEventListener=function(t,e,o){this.events._addLegacy(t,e,o)},Vc.prototype.removeEventListener=function(t,e,o){this.events._removeLegacy(t,e,o)},Vc.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},Vc.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},Vc.prototype.addControl=function(t,e){this.controls.add(t,e)},Vc.prototype.removeControl=function(t){this.controls.remove(t)},Vc.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,o=this.trafficOptions.flow;if(this.trafficOptions=(new rn).merge(this.trafficOptions,t),this.controls.getControls().filter(function(t){return t instanceof pn}).forEach(function(t){return t.updateButtonState()}),this.incidentDelegate&&(this.trafficOptions.incidents?e||this.incidentDelegate.addToMap():this.incidentDelegate.removeFromMap()),this.trafficOptions.flow&&"none"!==this.trafficOptions.flow)try{this.trafficOptions.flow!==o&&this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=o,t}else this.flowDelegate.removeFromMap()},Vc.prototype.getTraffic=function(){return Oo(this.trafficOptions)},Vc.prototype.remove=function(){this.dispose()},Vc.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear()},Vc.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var t=this.getMapContainer().firstChild;this.getMapContainer().removeChild(t)}},Vc.prototype.resize=function(t,e,o){"number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e?o=t:(t=t,this.getMapContainer().style.height="number"==typeof t?t+"px":t,this.getMapContainer().style.width="number"==typeof e?e+"px":e);e=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(o),this.getMapContainer().style.overflow=e},Vc.prototype.pixelsToPositions=function(t){var e,o,n=[];try{for(var r=x(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.unproject(s);n.push(new qr(a.lng,a.lat))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},Vc.prototype.positionsToPixels=function(t){var e,o,n=[];try{for(var r=x(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.project(s);n.push(new Fn(a.x,a.y))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},Vc.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},Vc.prototype.stop=function(){this.map.stop()},Vc.prototype.triggerRepaint=function(){this.map.triggerRepaint()},Vc.prototype._getMap=function(){return this.map},Vc.prototype._rebuildStyle=function(e){return void 0===e&&(e=!0),w(this,void 0,void 0,function(){return _(this,function(t){return this.styles.setStyle(this.styleOptions,e),this.imageSprite._restoreImages(),[2]})})},Vc.prototype._isLoaded=function(){return this.loaded},Vc.prototype._isReady=function(){return this.ready},Vc.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},Vc.prototype._sendRequest=function(t,e,o){var n;return(n="function"==typeof this.serviceOptions.transformRequest?this.serviceOptions.transformRequest(t,e):n)?fetch(n.url||t,{credentials:n.credentials,headers:b(b({},o),n.headers),method:"GET",mode:"cors"}):fetch(t,{headers:o,method:"GET",mode:"cors"})},Vc.prototype._substituteDomainLanguageViewAndSignInRequest=function(t,e){var o,n;(t.includes(h)||t.includes(r))&&(n=new RegExp("[^{]"+h+"[^}]"),t.match(n)&&(e.url=e.url.replace(h,r)),O.protoRegEx.test(this.serviceOptions.domain)?(n=e.url.indexOf(r),e.url=this.serviceOptions.domain+e.url.substring(n+r.length)):e.url=e.url.replace(r,this.serviceOptions.domain)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&null!==(o=this.authentication)&&void 0!==o&&o.signRequest(e),t.includes(a)&&(e.url=e.url.replace(a,this.styleOptions.language)),t.includes(i)&&(e.url=this.styleOptions.view?e.url.replace(i,this.styleOptions.view):e.url.replace(i,"").replace("&"+s+"=",""))},Vc.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},Vc.prototype._setStyleComponents=function(e,o){var n=this;void 0===o&&(o=!0),this.removed||this.styles.definitions().then(function(t){n.styleOptions.style&&t.configurations.map(function(t){return t.name}).includes(n.styleOptions.style)||(n.styleOptions.style=t.defaultConfiguration),n.styleOptions=e,n._rebuildStyle(o)})},Vc.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!Da&&Va(t.authOptions),t.domain&&!Ma&&Ya(t.domain),t.styleDefinitionsPath&&!Pa&&Ja(t.styleDefinitionsPath),t.workerCount&&!Oa&&$a(t.workerCount),t.maxParallelImageRequests&&!Aa&&Xa(t.maxParallelImageRequests),!t.subscriptionKey&&!t["subscription-key"]||Da||el(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||Ta||tl(t.sessionId||t["session-id"]),t.language&&!Ea&&Qa(t.language),!t.userRegion&&!t.view||ka||ol(t.userRegion||t.view))},Vc.prototype._generateSafeBounds=function(t){if(t){var e=Jr.getSouth(t),o=Jr.getWest(t),n=Jr.getNorth(t),r=Jr.getEast(t);if(!(isFinite(e)&&isFinite(o)&&isFinite(n)&&isFinite(r)))throw new Error("The bounds specified are invalid: ["+t+"]");for(;r<o;)r+=360;return new Jr([o,e,r,n])}return t},Vc.prototype._detectHighContrast=function(){var t,e;switch(dl.getHighContrastMode()){case"invert":case"light":t=Vc.Css.hcLight,e="high_contrast_light";break;case"dark":t=Vc.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},Vc.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},Vc);function Vc(t,e){var n=Kc.call(this)||this;n.removed=!1,n.loaded=!1,n.ready=!1,n._windowResizeCallback=function(){return n.resize()};var o,r,i=!0;n._updateGlobalDefaults(e),n.serviceOptions=(new jc).merge(e),n.styleOptions=(new Dc).merge(e),n.trafficOptions=new rn,n.styles=new Wc(n,n.serviceOptions),n.serviceOptions.authOptions.subscriptionKey&&(n.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(n.serviceOptions.authOptions.subscriptionKey)),o=n.serviceOptions.authOptions.clientId||(n.serviceOptions.authOptions.subscriptionKey?n.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting"),n.insights&&n.insights.setAuthenticatedUserContext(n.serviceOptions.sessionId,o),arguments[2]&&"ENVIRONMENT"in window&&window.ENVIRONMENT.hmr?(r=arguments[2],n.ready=!0,n.loaded=!0):(t={antialias:n.styleOptions.antialias,attributionControl:!1,container:t,fadeDuration:n.serviceOptions.fadeDuration,localIdeographFontFamily:n.serviceOptions.localIdeographFontFamily,preserveDrawingBuffer:n.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:n.serviceOptions.refreshExpiredTiles,renderWorldCopies:n.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var o={url:t};return"Tile"===e||"Source"===e?(t.includes(h)&&n.insights&&n.insights.trackEvent({name:"TileLoad"}),n._substituteDomainLanguageViewAndSignInRequest(t,o)):"Style"!==e&&"SpriteJSON"!==e&&"SpriteImage"!==e&&"Glyphs"!==e||n.styles._transformStyleRequest(t,o),n.serviceOptions.transformRequest&&Xo(o,n.serviceOptions.transformRequest(o.url,e)),o}},r=new p.Map(t));try{n.map=r,n.controls=new El(n),n.events=new Bl(n),n.imageSprite=new Zl(n),n.layers=new Gl(n),n.markers=new Fl(n),n.sources=new Ql(n),n.popups=new Vl(n),n.map.getContainer().classList.add(Vc.Css.container),n.map.getCanvasContainer().classList.add(Vc.Css.canvasContainer),n.map.getCanvas().classList.add(Vc.Css.canvas),n._detectHighContrast(),n.copyrightControl=new bl({showFeedbackLink:n.styleOptions.showFeedbackLink,showLogo:n.styleOptions.showLogo,customAttribution:n.styleOptions.customAttribution}),n.controls.add(n.copyrightControl,{position:u.ControlPosition.NonFixed});var s=n.authentication?n.authentication.initialize():Promise.resolve();if(n.removed)return n;var a=function(){n.loaded=!0,n.map.off("load",a)};n.map.on("load",a);var l=function(){n.ready=!0,n.map.off("styledata",l),n.events.invoke("ready",{map:n,type:"ready"})};n.map.on("styledata",l),n._setAutoResize(n.styleOptions.autoResize),n.map.showTileBoundaries=n.styleOptions.showTileBoundaries,n.localizedStringsPromise=ua.getStrings(n.styleOptions.language);var c=n.styles.initStyleset();Promise.all([s,c]).then(function(t){t=C(t,2),t[0],t[1];if(!n.removed){if(n.authentication&&!n.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");n.serviceOptions["enable-accessibility"]&&n.accessibleMapDelegate.addToMap(),n._setStyleComponents(n.styleOptions),n.copyrightDelegate&&n.copyrightDelegate.addToMap()}}).catch(function(t){t=t instanceof Error?t:new Error(t);n.insights&&n.insights.trackException({error:t}),n.events.invoke("error",{map:n,type:"error",error:t})}),n.setCamera(b(b({},e),{type:"jump",duration:0})),n.flowDelegate=new Cl(n),n.accessibleMapDelegate=new xl(n),n.userInteractionDelegate=new Ol(n,e),n.userInteractionDelegate.addToMap(),n.copyrightControl.setOptions({copyrightMessage:n.copyrightControl.getDefaultAttributions().join(", ")})}catch(t){throw i=!1,n.insights&&n.insights.trackException({error:t instanceof Error?t:new Error(t)}),t}finally{n.insights&&(n.insights.trackEvent({name:"MapLoad"},{success:i,supported:Ka(!1),supportedWithPerformance:Ka(!0)}),n.insights.flush())}return n}Yc.applyTemplate=function(e,o){var n,r,t,i=this,s=document.createElement("div");return s.classList.add(Yc.Css.template),e&&("boolean"!=typeof(o=o||{}).singleDescription&&(o.singleDescription=!0),o.sandboxContent="boolean"!=typeof o.sandboxContent||o.sandboxContent,o.title&&"string"==typeof o.content&&(o.content.includes("{title}")||o.content.includes("{name}"))||(e.title?o.title="{title}":e.name&&(o.title="{name}")),"boolean"!=typeof o.detectHyperlinks&&(o.detectHyperlinks=!0),"boolean"!=typeof o.parsePropertyPaths&&(o.parsePropertyPaths=!0),o.textColor&&(s.style.color=o.textColor),o.fillColor&&(s.style.backgroundColor=o.fillColor),o.title&&((t=this._applyStringTemplate(e,o.title,o)).innerText=t.textContent||t.innerText||"",this._appendChild(s,t,Yc.Css.title)),(n=document.createElement("div")).classList.add(Yc.Css.content),Array.isArray(o.content)?0<o.content.length&&o.content[0].propertyPath?this._appendChild(n,this._generateContent(e,o.content,o),Yc.Css.item):o.content.forEach(function(t){i._appendChild(n,i._generateContent(e,t,o),Yc.Css.item)}):(r=0,e.description&&Object.keys(e).forEach(function(t){i._ignoreProperty(t,e[t])||r++}),t=void 0,1===r||o.singleDescription&&e.description||2===r&&e.Snippet?(t=document.createElement("div")).innerHTML=e.description:t=this._generateContent(e,o.content,o),this._appendChild(n,t,Yc.Css.item)),""!==n.innerHTML&&(o.sandboxContent?s.appendChild(Yc._createSandboxedIframe(n,o)):s.appendChild(n))),s},Yc._createSandboxedIframe=function(t,e){var o=document.createElement("iframe");o.sandbox.add("allow-popups");var n=t.innerHTML,r=!1,i=100,s=550,a=10,l=0;document.body.scrollWidth<=340&&(s=300,i=50);var c=n.split(/<(tr|div|br|li|h[0-9]|p>)/),l=Math.max.apply(Math,L(c.map(function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length})))-1,t=Math.ceil(3.5*l);t<s&&(s=t,i=l),n.includes("<img")||n.includes("<video")?(r=!0,o.width="550px"):(l=-1<n.indexOf(Yc.Css.table)?25:20,a+=Math.max(.5*c.length*l,Math.ceil(n.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/i)*l)),o.width=s+"px",o.height=r||280<a?"280px":a+"px";a=e.textColor?"color:"+e.textColor+";":"",e=e.fillColor?"background-color:"+e.fillColor+";":"",n='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" /><link rel="stylesheet" href="'+Yc._cssUrl+'" type="text/css"/><style>html, body{margin:0;padding:0;'+a+e+'}</style></head><body><div class="'+Yc.Css.template+'" style="padding:0;width:'+(s-20)+'px">'+n+"</div></body></html>";return void 0===o.srcdoc?o.src="data:text/html;charset=utf-8,"+encodeURI(n):o.srcdoc=n,o},Yc._appendChild=function(t,e,o){e&&(o&&(e.className=(e.className?e.className+" ":"")+o),t.appendChild(e))},Yc._generateContent=function(t,e,o){if(e)return Array.isArray(e)?this._generatePropertyInfoTable(t,e,o):this._applyStringTemplate(t,e,o);t=this._generateDynamicTableHtml(t,null,o);if(t){o=document.createElement("div");return o.innerHTML=t,o}return null},Yc._applyStringTemplate=function(t,e,o){if(e){for(var n,r=e,i=this._placeholderRx.exec(e);i;)2<=i.length&&(n=this._getPropertyValue(t,i[1],o),r=r.replace(i[0],n)),i=this._placeholderRx.exec(e);if(r){(r=r.trim()).includes("<")&&(r=r.replace(/[\r\n]+/g,"<br/>"));var s=document.createElement("div");return s.innerHTML=r,s}}return null},Yc._getPropertyValue=function(t,e,o,n){var r=o.parsePropertyPaths?e.split("/"):[e],i=r.length;if(0<i&&t){var s=r[0],a=t[s];if(o.detectHyperlinks&&"link"===e&&(!n||n.hyperlinkFormat)){var l,c=[];if(Array.isArray(a)?a.forEach(function(t){t.href?c.push(t):"string"==typeof t&&c.push({href:t})}):a.href&&c.push(a),0<c.length){n&&n.hyperlinkFormat?l=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(l=o.hyperlinkFormat);var u=l&&l.target?l.target:"_blank",p=[];return c.forEach(function(t){t.title||l&&l.label||!t.rel||p.push(t.rel," - "),p.push('<a href="',t.href,'" target="',u,'">'),t.title?p.push(t.title):l&&l.label?p.push(l.label):p.push(t.href),p.push("</a>","<br/>")}),p.pop(),p.join("")}}if(null!=a){for(var h=void 0,h=1;h<i&&(a=a[r[h]],s=r[h],null!=a);h++);if(h===i&&null!=a){var d=void 0;if((d=void 0!==a.value?a.value:a)instanceof Date)return n&&n.dateFormat?d.toLocaleString(void 0,n.dateFormat):o.dateFormat?d.toLocaleString(void 0,o.dateFormat):d.toISOString();if("object"==typeof d)return(m=this._generateDynamicTableHtml(d,r.slice(1),o))||"";if("number"==typeof d){if(n){if(n.dateFormat)return new Date(d).toLocaleString(void 0,n.dateFormat);if(n.numberFormat)return d.toLocaleString(void 0,n.numberFormat)}else if(/(timestamp|date)/gi.test(s))return new Date(d).toISOString();return d.toLocaleString(void 0,o.numberFormat)}if("string"==typeof d&&""!==d&&!/[\n\r<>\s]/g.test(d)&&(o.detectHyperlinks||n&&n.hyperlinkFormat)){var d=d.trim(),f=this._isUrlRx.test(d)||n&&n.hyperlinkFormat,t=this._isImageUrlRx.test(d)&&(f||d.startsWith("data:image")),e=this._emailRx.test(d);if(f||t||e){f=void 0;n&&n.hyperlinkFormat?f=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(f=o.hyperlinkFormat);var m=void 0;m=f&&f.target?' target="'+f.target+'"':' target="_blank"';o=""+(f&&f.label?f.label:d);f&&f.scheme?d=f.scheme+d:e&&(d="mailto:"+d);e=f&&f.label?' alt="'+f.label+'"':"";return'<a href="'+d+'"'+m+">"+(o=f&&f.isImage||t?'<img src="'+d+'" style="max-width:100%"'+e+'"/>':o)+"</a>"}}return d.toString()}}}return""},Yc._generatePropertyInfoTable=function(o,t,n){if(o&&t&&0<t.length){var r=[],i=this;r.push('<table class="'+i.Css.table+'">'),t.forEach(function(t){var e=i._getPropertyValue(o,t.propertyPath,n,t);t.hideLabel?r.push('<tr><td colspan="2">',e,"</td></tr>"):(t=t.label||t.propertyPath.split("/")[0],r.push("<tr><th>",t,"</th><td>",e,"</td></tr>"))}),r.push("</table>");t=document.createElement("div");return t.innerHTML=r.join(""),t}return null},Yc._generateDynamicTableHtml=function(e,t,o){var n=this;if(e){var r=[],i=this;r.push('<table class="'+i.Css.table+'">');var s=t&&0<t.length?t.join("/")+"/":"",a=0;return(Object.keys(e).forEach(function(t){n._ignoreProperty(t,e[t])||(r.push("<tr><th>",t,"</th><td>",i._getPropertyValue(e,s+t,o),"</td></tr>"),a++)}),0===a)?null:(r.push("</table>"),r.join(""))}return null},Yc._ignoreProperty=function(t,e){switch(t){case"title":case"name":case"base":case"popupTemplate":case"anchor":case"icon":case"image":case"imageUrl":case"rotation":case"color":case"size":case"offset":case"strokeColor":case"strokeWidth":case"strokeOpacity":case"subType":case"fillColor":case"fillOpacity":case"visibility":case"visible":return!0;default:if(0===t.indexOf("_")||null==e||""===e)return!0}return!1},Yc._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,Yc._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,Yc._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,Yc._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,Yc._cssUrl=new O({domain:e,path:"sdk/javascript/mapcontrol/"+T.getEndpointVersion()+"/atlas.min.css"}).toString(),Yc.Css={template:"azure-maps-control-popup-template",title:"azure-maps-control-popup-template-title",content:"azure-maps-control-popup-template-content",item:"azure-maps-control-popup-template-content-item",table:"azure-maps-control-popup-template-table"},n=Yc;function Yc(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}S=new O({domain:e,path:"sdk/javascript/mapcontrol/"+T.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"});p.setRTLTextPlugin(S.toString(),function(t){t&&console.warn(t)},!0),u.HtmlMarker=ra,u.Map=y,u.Pixel=Fn,u.Popup=Xs,u.PopupTemplate=n,u.Shape=Kr,u._getAssetDomain=function(){return t},u._getDomain=function(){return wa},u._hasMaxParallelImageRequests=ll,u._hasSetAuthenticationOptions=rl,u._hasSetDomain=il,u._hasSetLanguage=cl,u._hasSetSessionId=ul,u._hasSetStyleDefinitionsPath=sl,u._hasSetStyleDefinitionsVersion=function(){return Ia},u._hasSetView=pl,u._hasWorkerCount=al,u.addImageTemplate=function(t,e,o){!o&&hl[t.toLowerCase()]||(hl[t.toLowerCase()]=e)},u.clearPrewarmedResources=function(){p.clearPrewarmedResources()},u.control=gt,u.data=ut,u.getAllImageTemplateNames=function(){return Object.keys(hl)},u.getAuthenticationOptions=za,u.getDomain=Ba,u.getImageTemplate=nl,u.getLanguage=Ha,u.getMaxParallelImageRequests=qa,u.getSessionId=Ua,u.getStaticAssetsDomain=Ra,u.getStyleAPIVersion=Na,u.getStyleDefinitionsPath=ja,u.getStyleDefinitionsVersion=Fa,u.getSubscriptionKey=Wa,u.getUserRegion=function(){return ma},u.getVersion=function(){return T.getFullVersion()},u.getView=Ga,u.getWorkerCount=Za,u.internal=G,u.isSupported=Ka,u.layer=yt,u.math=Ct,u.prewarm=function(){p.prewarm()},u.setAuthenticationOptions=Va,u.setDomain=Ya,u.setLanguage=Qa,u.setMaxParallelImageRequests=Xa,u.setSessionId=tl,u.setStyleAPIVersion=function(t){La=t},u.setStyleDefinitionsPath=Ja,u.setStyleDefinitionsVersion=function(t){Ca=t,Ia=!0},u.setSubscriptionKey=el,u.setUserRegion=ol,u.setView=function(t){ma=t,ka=!0},u.setWorkerCount=$a,u.source=it,Object.defineProperty(u,"__esModule",{value:!0})});
55
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("azuremaps-maplibre-gl")):"function"==typeof define&&define.amd?define(["exports","azuremaps-maplibre-gl"],e):e((t=t||self).atlas=t.atlas||{},t.maplibregl)}(this,function(u,p){"use strict";p=p&&Object.prototype.hasOwnProperty.call(p,"default")?p.default:p;var t="atlas.microsoft.com",e="atlas.microsoft.com",o="styling",n="2022-08-05",c="api-version",r="{{azMapsDomain}}",h="{azMapsDomain}",i="{{azMapsView}}",s="view",a="{{azMapsLanguage}}",l="{{azMapsStylingPath}}",d="{{azMapsStylePath}}",f="styling",y="styles",m="2.0",g=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},v=(w.prototype.merge=function(){for(var e,t,o,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{for(var i=g(n),s=i.next();!s.done;s=i.next()){var a=s.value;if(a)for(var c in a)a.hasOwnProperty(c)&&this.hasOwnProperty(c)&&(void 0!==a[c]&&null!=a[c]?this[c]instanceof w?this[c].merge(a[c]):this[c]=a[c]:(o=o||new(Object.getPrototypeOf(this).constructor),this[c]=o[c]))}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return this},w);function w(){}var _,b,x=window&&window.__extends||(_=function(t,e){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),C=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},O=(x(S,b=v),S);function S(){var t=null!==b&&b.apply(this,arguments)||this;return t.domain=void 0,t.headers={},t.path="",t.protocol="https",t.queryParams={},t.subdomain="",t}var P=(L.prototype.get=function(){return fetch(this.toString(),{method:"GET",mode:"cors",headers:new Headers(this.options.headers)}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)})},L.prototype.toString=function(){var t=this,e=Object.entries(t.options.queryParams).map(function(t){t=C(t,2);return t[0]+"="+t[1]}).join("&"),o=[],n=t.options.path||"";return L.protoRegEx.test(n)?o.push(n):(t.options.domain&&(L.protoRegEx.test(t.options.domain)||(o.push(t.options.protocol+"://"),o.push(t.options.subdomain?t.options.subdomain+".":"")),o.push(t.options.domain)),o.push(t.options.path?"/"+n:"")),o.push(e?"?"+e:""),o.join("")},L.protoRegEx=new RegExp(/^(((file|http|https):\/\/)|blob:)/i),L);function L(t){this.options=(new O).merge(t)}var k="3.0.0-preview.3",M=(E.getFullVersion=function(){return k},E.getEndpointVersion=function(){var t=k.indexOf(".");return-1===(t=k.indexOf(".",t+1))?k:k.substring(0,t)},E);function E(){}function A(t){var e=document.createElement("span");e.innerText=t,e.classList.add("tooltiptext"),window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&e.classList.add("dark");var o=window.matchMedia("(prefers-color-scheme: dark)"),t=function(t){t=t.matches;t&&!e.classList.contains("dark")?e.classList.add("dark"):!t&&e.classList.contains("dark")&&e.classList.remove("dark")};return"function"==typeof o.addEventListener?o.addEventListener("change",t):"function"==typeof o.addListener&&o.addListener(t),-1!=navigator.userAgent.indexOf("Edg")?e.classList.add("edge"):-1!=navigator.userAgent.indexOf("Chrome")?e.classList.add("chrome"):-1!=navigator.userAgent.indexOf("Safari")?e.classList.add("safari"):-1!=navigator.userAgent.indexOf("Firefox")&&e.classList.add("firefox"),-1!=navigator.userAgent.indexOf("Windows")?e.classList.add("win"):-1!=navigator.userAgent.indexOf("Macintosh")&&e.classList.add("mac"),e}function j(r,i,s){function t(t){var e=i.getBoundingClientRect(),o=r.getBoundingClientRect(),n=e.x+o.width>window.innerWidth?window.innerWidth-o.width:e.x,o=e.y+e.height+o.height+4>window.innerHeight?e.y-o.height-4:e.y+e.height+4;s&&i.parentElement&&(e=i.parentElement?i.parentElement.getBoundingClientRect():null,r.style.position="absolute",n-=e.x,o-=e.y),r.style.transform="translate("+n+"px, "+o+"px)"}void 0===s&&(s=!1),i.addEventListener("mouseover",t),i.addEventListener("focusin",t)}var T,I=window&&window.__extends||(T=function(t,e){return(T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}T(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});(bt=u.ControlPosition||(u.ControlPosition={})).TopLeft="top-left",bt.TopRight="top-right",bt.BottomLeft="bottom-left",bt.BottomRight="bottom-right",bt.NonFixed="non-fixed";var z,D=(I(R,z=v),R);function R(){var t=null!==z&&z.apply(this,arguments)||this;return t.position=u.ControlPosition.NonFixed,t}var B=(F.prototype.getLuminosity=function(){for(var t=[this.r,this.g,this.b],e=[],o=0;o<t.length;o++){var n=t[o]/255;e[o]=n<=.03928?n/12.92:Math.pow((.055+n)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},F.prototype.getRBGA=function(t){var e=document.createElement("canvas").getContext("2d");e.globalAlpha=1,e.fillStyle=t,e.fillRect(0,0,1,1);e=e.getImageData(0,0,1,1).data;return[e[0],e[1],e[2],e[3]]},F);function F(t){var e;t&&(e=void 0,3<=(e="string"==typeof t?this.getRBGA(t):t).length&&(this.r=e[0],this.g=e[1],this.b=e[2],3<e.length&&(this.a=e[3])))}(Ot=u.ControlStyle||(u.ControlStyle={})).light="light",Ot.dark="dark",Ot.auto="auto";var N=Map,Z=(q.prototype._addEventListener=function(t,e,o){this.listeners.has(t)||this.listeners.set(t,new N),this.listeners.get(t).set(e,o)},q.prototype._removeEventListener=function(t,e){this.listeners.has(t)&&this.listeners.get(t).delete(e)},q.prototype._invokeEvent=function(o,n){var r=this;this.listeners.has(o)&&this.listeners.get(o).forEach(function(t,e){t&&r._removeEventListener(o,e);try{e(n)}catch(t){console.error(t)}})},q);function q(){this.listeners=new N}var H,U,G=Object.freeze({__proto__:null,EventEmitter:Z}),W=((window&&window.__extends||(H=function(t,e){return(H=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}H(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(V,U=Z),V.prototype.onRemove=function(){this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.events.remove("stylechanged",this._onStyleChange),delete this._map),this._observer&&(this._observer.disconnect(),delete this._observer),delete this._theme},V.prototype.buildContainer=function(t,e,o,n){var r=this;return this._map=t,this._container=document.createElement(n||"div"),this._container.classList.add("azure-maps-control-container"),"string"==typeof o&&this._container.setAttribute("aria-label",o),e.toLowerCase()===u.ControlStyle.auto?this._map.styles.definitions().then(function(t){r._map&&r._map.events.add("stylechanged",r._onStyleChange)}):this._container.classList.add(e),this._container},V.prototype._setTheme=function(t){this._theme!==t&&(this._container.classList.remove(this._theme),this._container.classList.add(t),this._theme=t)},V.activateClickDelay=100,V);function V(){var e=null!==U&&U.apply(this,arguments)||this;return e._onStyleChange=function(){e._map.getStyle().style.toLowerCase().startsWith("blank")?e._observer||(e._onBackgroundChange(),e._observer=new MutationObserver(e._onBackgroundChange),e._observer.observe(e._map.getMapContainer(),{attributes:!0,attributeFilter:["style"]})):(e._observer&&(e._observer.disconnect(),delete e._observer),e._map.styles.getThemeAsync(e._map.getStyle()).then(function(t){e._setTheme(t)}))},e._onBackgroundChange=function(){var t=new B(e._map.getMapContainer().style.backgroundColor).getLuminosity(),t=isNaN(t)||.5<t?u.ControlStyle.light:u.ControlStyle.dark;e._setTheme(t)},e}var K,Y,J=((window&&window.__extends||(K=function(t,e){return(K=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}K(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))($,Y=v),$);function $(){var t=null!==Y&&Y.apply(this,arguments)||this;return t.rotationDegreesDelta=15,t.style=u.ControlStyle.light,t.inverted=!1,t}var X,Q,tt=((window&&window.__extends||(X=function(t,e){return(X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}X(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(et,Q=W),et.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Rotation Control"),r=this.constructRotationButton(t),i=this.constructRotationGrid(t,e),t=A("Reset to Default Rotation");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element")))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&et.InvertOrderPositions.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(t),j(t,r)):(n.appendChild(r),n.appendChild(t),j(t,r),n.appendChild(i)),n},et.prototype.constructRotationGrid=function(t,e){var o=document.createElement("div");o.classList.add("sub-container"),o.classList.add("hidden-accessible-element");var n=this.constructRightRotationButton(t),r=this.constructLeftRotationButton(t),i=A("Rotate Left"),t=A("Rotate Right");return e&&et.InvertOrderPositions.includes(e.position)?(o.appendChild(n),o.appendChild(t),j(t,n),o.appendChild(r),o.appendChild(i),j(i,r)):(o.appendChild(r),o.appendChild(i),j(i,r),o.appendChild(n),o.appendChild(t),j(t,n)),o},et.prototype.constructRotationButton=function(e){var o=this,t=document.createElement("button");t.classList.add("azure-maps-control-button"),t.classList.add("rotation"),t.setAttribute("aria-label","Reset to Default Rotation"),t.setAttribute("alt","Reset to Default Rotation"),t.setAttribute("type","button");var n=document.createElement("div");return t.appendChild(n),t.addEventListener("click",function(t){t.timeStamp-o.lastActiveTime>W.activateClickDelay&&e.setCamera({bearing:et.DefaultRotation},!0)}),e.events.add("rotate",function(t){n.style.transform="rotate("+-t.map.getCamera().bearing+"deg)"}),t},et.prototype.constructRightRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-right"),o.setAttribute("aria-label","Rotate Right"),o.setAttribute("alt","Rotate Right"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing-(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:et.RotationDuration,type:"ease"},!0)}),o},et.prototype.constructLeftRotationButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("rotation-left"),o.setAttribute("aria-label","Rotate Left"),o.setAttribute("alt","Rotate Left"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({bearing:t.getCamera().bearing+(e.options.inverted?-1:1)*e.options.rotationDegreesDelta,duration:et.RotationDuration,type:"ease"},!0)}),o},et.DefaultRotation=0,et.RotationDuration=100,et.InvertOrderPositions=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],et);function et(t){var e=Q.call(this)||this;return e.hasMouse=!1,e.hasFocus=!1,e.options=(new J).merge(t),e}var ot,nt,rt=((window&&window.__extends||(ot=function(t,e){return(ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ot(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(it,nt=v),it);function it(){var t=null!==nt&&nt.apply(this,arguments)||this;return t.pitchDegreesDelta=10,t.style=u.ControlStyle.light,t.inverted=!1,t}var st,at,ct=((window&&window.__extends||(st=function(t,e){return(st=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}st(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(lt,at=W),lt.prototype.onAdd=function(t,e){var o=this,n=this.buildContainer(t,this.options.style,"Pitch Control"),r=this.constructPitchButton(t),i=this.constructPitchGrid(t,e),s=A("Reset to Default Pitch");return n.addEventListener("mouseover",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasMouse=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(t){o.lastActiveTime=o.lastActiveTime||t.timeStamp,o.hasFocus=!0,n.classList.add("in-use"),i.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse||(delete o.lastActiveTime,n.classList.remove("in-use"),i.classList.add("hidden-accessible-element")))}),i.addEventListener("keydown",function(t){"Escape"!==t.key&&"Esc"!==t.key||(t.stopPropagation(),r.focus(),n.classList.remove("in-use"),i.classList.add("hidden-accessible-element"))}),e&&lt.INVERT_ORDER_POSITIONS.includes(e.position)?(n.appendChild(i),n.appendChild(r),n.appendChild(s),j(s,n)):(n.appendChild(r),n.appendChild(s),j(s,n),n.appendChild(i)),this.map=t,this.container=n,this.pitchButton=r,t.events.add("pitch",this.pitchChanged),this.updatePitchButtonsState(),n},lt.prototype.onRemove=function(){this.container&&(this.container.remove(),this.container=null,this.pitchButton=null,this.pitchIncrementButton=null,this.pitchDecrementButton=null),this.map&&(this.map.events.remove("pitch",this.pitchChanged),this.map=null)},lt.prototype.constructPitchGrid=function(t,e){var o=document.createElement("div");o.classList.add("sub-container"),o.classList.add("hidden-accessible-element"),this.pitchIncrementButton=this.constructPitchIncrementButton(t),this.pitchDecrementButton=this.constructPitchDecrementButton(t);var n=A("Increase Pitch"),t=A("Decrease Pitch");return e&&lt.INVERT_ORDER_POSITIONS.includes(e.position)?(o.appendChild(this.pitchDecrementButton),o.appendChild(t),j(t,this.pitchDecrementButton),o.appendChild(this.pitchIncrementButton),o.appendChild(n),j(n,this.pitchIncrementButton)):(o.appendChild(this.pitchIncrementButton),o.appendChild(n),j(n,this.pitchIncrementButton),o.appendChild(this.pitchDecrementButton),o.appendChild(t),j(t,this.pitchDecrementButton)),o},lt.prototype.constructPitchButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch"),o.setAttribute("aria-label","Reset to Default Pitch"),o.setAttribute("alt","Reset to Default Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){event.timeStamp-e.lastActiveTime>W.activateClickDelay&&t.setCamera({pitch:lt.DEFAULT_PITCH},!0)}),o},lt.prototype.constructPitchDecrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-down"),o.setAttribute("aria-label","Decrease Pitch"),o.setAttribute("alt","Decrease Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch-(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:lt.PITCH_DURATION_MS,type:"ease"},!0)}),o},lt.prototype.constructPitchIncrementButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("pitch-up"),o.setAttribute("aria-label","Increase Pitch"),o.setAttribute("alt","Increase Pitch"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({pitch:t.getCamera().pitch+(e.options.inverted?-1:1)*e.options.pitchDegreesDelta,duration:lt.PITCH_DURATION_MS,type:"ease"},!0)}),o},lt.PITCH_DURATION_MS=100,lt.DEFAULT_PITCH=0,lt.INVERT_ORDER_POSITIONS=[u.ControlPosition.BottomRight,u.ControlPosition.TopRight],lt);function lt(t){var o=at.call(this)||this;return o.container=null,o.map=null,o.pitchButton=null,o.pitchIncrementButton=null,o.pitchDecrementButton=null,o.hasMouse=!1,o.hasFocus=!1,o.pitchChanged=function(t){return o.updatePitchButtonsState()},o.updatePitchButtonsState=function(){var t=o.map.getCamera().pitch<=0,e=60<=o.map.getCamera().pitch;o.hasFocus&&o.pitchButton&&(t||e)&&o.pitchButton.focus(),o.options.inverted?(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=t&&(o.pitchIncrementButton.disabled=t),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=e&&(o.pitchDecrementButton.disabled=e)):(o.pitchIncrementButton&&o.pitchIncrementButton.disabled!=e&&(o.pitchIncrementButton.disabled=e),o.pitchDecrementButton&&o.pitchDecrementButton.disabled!=t&&(o.pitchDecrementButton.disabled=t))},o.options=(new rt).merge(t),o}var ut=function(t,e){return t===e||t!=t&&e!=e};var pt=function(t,e){for(var o=t.length;o--;)if(ut(t[o][0],e))return o;return-1},ht=Array.prototype.splice;var dt=function(t){var e=this.__data__;return!((t=pt(e,t))<0)&&(t==e.length-1?e.pop():ht.call(e,t,1),--this.size,!0)};var ft=function(t){var e=this.__data__;return(t=pt(e,t))<0?void 0:e[t][1]};var yt=function(t){return-1<pt(this.__data__,t)};var mt=function(t,e){var o=this.__data__,n=pt(o,t);return n<0?(++this.size,o.push([t,e])):o[n][1]=e,this};function gt(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}gt.prototype.clear=function(){this.__data__=[],this.size=0},gt.prototype.delete=dt,gt.prototype.get=ft,gt.prototype.has=yt,gt.prototype.set=mt;var vt=gt;var wt=function(){this.__data__=new vt,this.size=0};var _t=function(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t};x=function(t){return this.__data__.get(t)};var bt=function(t){return this.__data__.has(t)},I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function xt(t,e){return t(e={exports:{}},e.exports),e.exports}var Ct="object"==typeof I&&I&&I.Object===Object&&I,Ot="object"==typeof self&&self&&self.Object===Object&&self,St=Ct||Ot||Function("return this")(),dt=St.Symbol,ft=Object.prototype,Pt=ft.hasOwnProperty,Lt=ft.toString,kt=dt?dt.toStringTag:void 0;var Mt=function(t){var e=Pt.call(t,kt),o=t[kt];try{var n=!(t[kt]=void 0)}catch(t){}var r=Lt.call(t);return n&&(e?t[kt]=o:delete t[kt]),r},Et=Object.prototype.toString;var At=function(t){return Et.call(t)},jt=dt?dt.toStringTag:void 0;var Tt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(jt&&jt in Object(t)?Mt:At)(t)};var It=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var zt=function(t){return!!It(t)&&("[object Function]"==(t=Tt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)},yt=St["__core-js_shared__"],Dt=(mt=/[^.]+$/.exec(yt&&yt.keys&&yt.keys.IE_PROTO||""))?"Symbol(src)_1."+mt:"";var Rt=function(t){return!!Dt&&Dt in t},Bt=Function.prototype.toString;var Ft=function(t){if(null!=t){try{return Bt.call(t)}catch(t){}try{return t+""}catch(t){}}return""},Nt=/^\[object .+?Constructor\]$/,I=Function.prototype,Ot=Object.prototype,ft=I.toString,yt=Ot.hasOwnProperty,Zt=RegExp("^"+ft.call(yt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var qt=function(t){return!(!It(t)||Rt(t))&&(zt(t)?Zt:Nt).test(Ft(t))};var Ht=function(t,e){return null==t?void 0:t[e]};var Ut=function(t,e){return e=Ht(t,e),qt(e)?e:void 0},Gt=Ut(St,"Map"),Wt=Ut(Object,"create");var mt=function(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t},Vt=Object.prototype.hasOwnProperty;var I=function(t){var e=this.__data__;if(Wt){var o=e[t];return"__lodash_hash_undefined__"===o?void 0:o}return Vt.call(e,t)?e[t]:void 0},Kt=Object.prototype.hasOwnProperty;Ot=function(t){var e=this.__data__;return Wt?void 0!==e[t]:Kt.call(e,t)};ft=function(t,e){var o=this.__data__;return this.size+=this.has(t)?0:1,o[t]=Wt&&void 0===e?"__lodash_hash_undefined__":e,this};function Yt(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Yt.prototype.clear=function(){this.__data__=Wt?Wt(null):{},this.size=0},Yt.prototype.delete=mt,Yt.prototype.get=I,Yt.prototype.has=Ot,Yt.prototype.set=ft;var Jt=Yt;yt=function(){this.size=0,this.__data__={hash:new Jt,map:new(Gt||vt),string:new Jt}};var $t=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Xt=function(t,e){return t=t.__data__,$t(e)?t["string"==typeof e?"string":"hash"]:t.map};mt=function(t){return t=Xt(this,t).delete(t),this.size-=t?1:0,t};I=function(t){return Xt(this,t).get(t)};Ot=function(t){return Xt(this,t).has(t)};ft=function(t,e){var o=Xt(this,t),n=o.size;return o.set(t,e),this.size+=o.size==n?0:1,this};function Qt(t){var e=-1,o=null==t?0:t.length;for(this.clear();++e<o;){var n=t[e];this.set(n[0],n[1])}}Qt.prototype.clear=yt,Qt.prototype.delete=mt,Qt.prototype.get=I,Qt.prototype.has=Ot,Qt.prototype.set=ft;var te=Qt;I=function(t,e){var o=this.__data__;if(o instanceof vt){var n=o.__data__;if(!Gt||n.length<199)return n.push([t,e]),this.size=++o.size,this;o=this.__data__=new te(n)}return o.set(t,e),this.size=o.size,this};function ee(t){t=this.__data__=new vt(t);this.size=t.size}ee.prototype.clear=wt,ee.prototype.delete=_t,ee.prototype.get=x,ee.prototype.has=bt,ee.prototype.set=I;var oe=ee;var ne=function(t,e){for(var o=-1,n=null==t?0:t.length;++o<n&&!1!==e(t[o],o,t););return t},re=function(){try{var t=Ut(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();var ie=function(t,e,o){"__proto__"==e&&re?re(t,e,{configurable:!0,enumerable:!0,value:o,writable:!0}):t[e]=o},se=Object.prototype.hasOwnProperty;var ae=function(t,e,o){var n=t[e];se.call(t,e)&&ut(n,o)&&(void 0!==o||e in t)||ie(t,e,o)};var ce=function(t,e,o,n){var r=!o;o=o||{};for(var i=-1,s=e.length;++i<s;){var a=e[i],c=n?n(o[a],t[a],a,o,t):void 0;void 0===c&&(c=t[a]),(r?ie:ae)(o,a,c)}return o};var le=function(t,e){for(var o=-1,n=Array(t);++o<t;)n[o]=e(o);return n};var ue=function(t){return null!=t&&"object"==typeof t};var Ot=function(t){return ue(t)&&"[object Arguments]"==Tt(t)},ft=Object.prototype,pe=ft.hasOwnProperty,he=ft.propertyIsEnumerable,de=Ot(function(){return arguments}())?Ot:function(t){return ue(t)&&pe.call(t,"callee")&&!he.call(t,"callee")},fe=Array.isArray;function ye(){return!1}var me=xt(function(t,e){var o=e&&!e.nodeType&&e,e=o&&t&&!t.nodeType&&t,o=e&&e.exports===o?St.Buffer:void 0,o=o?o.isBuffer:void 0;t.exports=o||ye}),ge=/^(?:0|[1-9]\d*)$/;var ve=function(t,e){var o=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==o||"symbol"!=o&&ge.test(t))&&-1<t&&t%1==0&&t<e};var we=function(t){return"number"==typeof t&&-1<t&&t%1==0&&t<=9007199254740991},_e={};_e["[object Float32Array]"]=_e["[object Float64Array]"]=_e["[object Int8Array]"]=_e["[object Int16Array]"]=_e["[object Int32Array]"]=_e["[object Uint8Array]"]=_e["[object Uint8ClampedArray]"]=_e["[object Uint16Array]"]=_e["[object Uint32Array]"]=!0,_e["[object Arguments]"]=_e["[object Array]"]=_e["[object ArrayBuffer]"]=_e["[object Boolean]"]=_e["[object DataView]"]=_e["[object Date]"]=_e["[object Error]"]=_e["[object Function]"]=_e["[object Map]"]=_e["[object Number]"]=_e["[object Object]"]=_e["[object RegExp]"]=_e["[object Set]"]=_e["[object String]"]=_e["[object WeakMap]"]=!1;wt=function(t){return ue(t)&&we(t.length)&&!!_e[Tt(t)]};var _t=function(e){return function(t){return e(t)}},x=xt(function(t,e){var e=e&&!e.nodeType&&e,o=e&&t&&!t.nodeType&&t,n=o&&o.exports===e&&Ct.process,e=function(){try{var t=o&&o.require&&o.require("util").types;return t?t:n&&n.binding&&n.binding("util")}catch(t){}}();t.exports=e}),bt=x&&x.isTypedArray,be=bt?_t(bt):wt,xe=Object.prototype.hasOwnProperty;var Ce=function(t,e){var o,n=fe(t),r=!n&&de(t),i=!n&&!r&&me(t),s=!n&&!r&&!i&&be(t),a=n||r||i||s,c=a?le(t.length,String):[],l=c.length;for(o in t)!e&&!xe.call(t,o)||a&&("length"==o||i&&("offset"==o||"parent"==o)||s&&("buffer"==o||"byteLength"==o||"byteOffset"==o)||ve(o,l))||c.push(o);return c},Oe=Object.prototype;var Se=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Oe)};var I=function(e,o){return function(t){return e(o(t))}},Pe=I(Object.keys,Object),Le=Object.prototype.hasOwnProperty;var ke=function(t){if(!Se(t))return Pe(t);var e,o=[];for(e in Object(t))Le.call(t,e)&&"constructor"!=e&&o.push(e);return o};var Me=function(t){return null!=t&&we(t.length)&&!zt(t)};var Ee=function(t){return(Me(t)?Ce:ke)(t)};var Ae=function(t,e){return t&&ce(e,Ee(e),t)};var je=function(t){var e=[];if(null!=t)for(var o in Object(t))e.push(o);return e},Te=Object.prototype.hasOwnProperty;var Ie=function(t){if(!It(t))return je(t);var e,o=Se(t),n=[];for(e in t)("constructor"!=e||!o&&Te.call(t,e))&&n.push(e);return n};var ze=function(t){return Me(t)?Ce(t,!0):Ie(t)};var De=function(t,e){return t&&ce(e,ze(e),t)},Re=xt(function(t,e){var o=e&&!e.nodeType&&e,e=o&&t&&!t.nodeType&&t,o=e&&e.exports===o?St.Buffer:void 0,n=o?o.allocUnsafe:void 0;t.exports=function(t,e){return e?t.slice():(e=t.length,e=n?n(e):new t.constructor(e),t.copy(e),e)}});var Be=function(t,e){var o=-1,n=t.length;for(e=e||Array(n);++o<n;)e[o]=t[o];return e};var Fe=function(t,e){for(var o=-1,n=null==t?0:t.length,r=0,i=[];++o<n;){var s=t[o];e(s,o,t)&&(i[r++]=s)}return i};var ft=function(){return[]},Ne=Object.prototype.propertyIsEnumerable,Ze=Object.getOwnPropertySymbols,qe=Ze?function(e){return null==e?[]:(e=Object(e),Fe(Ze(e),function(t){return Ne.call(e,t)}))}:ft;var He=function(t,e){return ce(t,qe(t),e)};var Ue=function(t,e){for(var o=-1,n=e.length,r=t.length;++o<n;)t[r+o]=e[o];return t},Ge=I(Object.getPrototypeOf,Object),We=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ue(e,qe(t)),t=Ge(t);return e}:ft;var Ve=function(t,e){return ce(t,We(t),e)};var Ke=function(t,e,o){return e=e(t),fe(t)?e:Ue(e,o(t))};var Ye=function(t){return Ke(t,Ee,qe)};function Je(t){return Ke(t,ze,We)}var Ot=Ut(St,"DataView"),bt=Ut(St,"Promise"),wt=Ut(St,"Set"),I=Ut(St,"WeakMap"),$e="[object Map]",Xe="[object Promise]",Qe="[object Set]",to="[object WeakMap]",eo="[object DataView]",oo=Ft(Ot),no=Ft(Gt),ro=Ft(bt),io=Ft(wt),so=Ft(I),ft=Tt,ao=ft=Ot&&ft(new Ot(new ArrayBuffer(1)))!=eo||Gt&&ft(new Gt)!=$e||bt&&ft(bt.resolve())!=Xe||wt&&ft(new wt)!=Qe||I&&ft(new I)!=to?function(t){var e=Tt(t),t="[object Object]"==e?t.constructor:void 0,t=t?Ft(t):"";if(t)switch(t){case oo:return eo;case no:return $e;case ro:return Xe;case io:return Qe;case so:return to}return e}:ft,co=Object.prototype.hasOwnProperty;var lo=function(t){var e=t.length,o=new t.constructor(e);return e&&"string"==typeof t[0]&&co.call(t,"index")&&(o.index=t.index,o.input=t.input),o},uo=St.Uint8Array;var po=function(t){var e=new t.constructor(t.byteLength);return new uo(e).set(new uo(t)),e};var ho=function(t,e){return e=e?po(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)},fo=/\w*$/;var yo=function(t){var e=new t.constructor(t.source,fo.exec(t));return e.lastIndex=t.lastIndex,e},Ot=dt?dt.prototype:void 0,mo=Ot?Ot.valueOf:void 0;var go=function(t){return mo?Object(mo.call(t)):{}};var vo=function(t,e){return e=e?po(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)};var wo=function(t,e,o){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return po(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return ho(t,o);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return vo(t,o);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return yo(t);case"[object Set]":return new n;case"[object Symbol]":return go(t)}},_o=Object.create;function bo(){}var xo=function(t){if(!It(t))return{};if(_o)return _o(t);bo.prototype=t;t=new bo;return bo.prototype=void 0,t};var Co=function(t){return"function"!=typeof t.constructor||Se(t)?{}:xo(Ge(t))};var bt=function(t){return ue(t)&&"[object Map]"==ao(t)},wt=x&&x.isMap,Oo=wt?_t(wt):bt;var I=function(t){return ue(t)&&"[object Set]"==ao(t)},ft=x&&x.isSet,So=ft?_t(ft):I,Po="[object Arguments]",Lo="[object Function]",ko="[object Object]",Mo={};Mo[Po]=Mo["[object Array]"]=Mo["[object ArrayBuffer]"]=Mo["[object DataView]"]=Mo["[object Boolean]"]=Mo["[object Date]"]=Mo["[object Float32Array]"]=Mo["[object Float64Array]"]=Mo["[object Int8Array]"]=Mo["[object Int16Array]"]=Mo["[object Int32Array]"]=Mo["[object Map]"]=Mo["[object Number]"]=Mo[ko]=Mo["[object RegExp]"]=Mo["[object Set]"]=Mo["[object String]"]=Mo["[object Symbol]"]=Mo["[object Uint8Array]"]=Mo["[object Uint8ClampedArray]"]=Mo["[object Uint16Array]"]=Mo["[object Uint32Array]"]=!0,Mo["[object Error]"]=Mo[Lo]=Mo["[object WeakMap]"]=!1;var Eo=function o(n,r,i,t,e,s){var a,c=1&r,l=2&r,u=4&r;if(void 0!==(a=i?e?i(n,t,e,s):i(n):a))return a;if(!It(n))return n;var p=fe(n);if(p){if(a=lo(n),!c)return Be(n,a)}else{var h=ao(n),t=h==Lo||"[object GeneratorFunction]"==h;if(me(n))return Re(n,c);if(h==ko||h==Po||t&&!e){if(a=l||t?{}:Co(n),!c)return l?Ve(n,De(a,n)):He(n,Ae(a,n))}else{if(!Mo[h])return e?n:{};a=wo(n,h,c)}}c=(s=s||new oe).get(n);if(c)return c;s.set(n,a),So(n)?n.forEach(function(t){a.add(o(t,r,i,t,n,s))}):Oo(n)&&n.forEach(function(t,e){a.set(e,o(t,r,i,e,n,s))});var d=p?void 0:(u?l?Je:Ye:l?ze:Ee)(n);return ne(d||n,function(t,e){d&&(t=n[e=t]),ae(a,e,o(t,r,i,e,n,s))}),a};var Ao=function(t){return Eo(t,5)};var jo=function(t,e,o){(void 0===o||ut(t[e],o))&&(void 0!==o||e in t)||ie(t,e,o)};var To=function(c){return function(t,e,o){for(var n=-1,r=Object(t),i=o(t),s=i.length;s--;){var a=i[c?s:++n];if(!1===e(r[a],a,r))break}return t}}();var Io=function(t){return ue(t)&&Me(t)},Ot=Function.prototype,wt=Object.prototype,zo=Ot.toString,Do=wt.hasOwnProperty,Ro=zo.call(Object);var Bo=function(t){return!(!ue(t)||"[object Object]"!=Tt(t))&&(null===(t=Ge(t))||"function"==typeof(t=Do.call(t,"constructor")&&t.constructor)&&t instanceof t&&zo.call(t)==Ro)};var Fo=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]};var No=function(t){return ce(t,ze(t))};var Zo=function(t,e,o,n,r,i,s){var a,c,l,u=Fo(t,o),p=Fo(e,o),h=s.get(p);h?jo(t,o,h):((a=void 0===(l=i?i(u,p,o+"",t,e,s):void 0))&&(h=!(c=fe(p))&&me(p),e=!c&&!h&&be(p),l=p,c||h||e?l=fe(u)?u:Io(u)?Be(u):h?Re(p,!(a=!1)):e?vo(p,!(a=!1)):[]:Bo(p)||de(p)?de(l=u)?l=No(u):It(u)&&!zt(u)||(l=Co(p)):a=!1),a&&(s.set(p,l),r(l,p,n,i,s),s.delete(p)),jo(t,o,l))};var qo=function n(r,i,s,a,c){r!==i&&To(i,function(t,e){var o;c=c||new oe,It(t)?Zo(r,i,e,s,n,a,c):(o=a?a(Fo(r,e),t,e+"",r,i,c):void 0,jo(r,e,o=void 0===o?t:o))},ze)};function Ho(t){return t}var Uo=function(t,e,o){switch(o.length){case 0:return t.call(e);case 1:return t.call(e,o[0]);case 2:return t.call(e,o[0],o[1]);case 3:return t.call(e,o[0],o[1],o[2])}return t.apply(e,o)},Go=Math.max;var Wo=function(i,s,a){return s=Go(void 0===s?i.length-1:s,0),function(){for(var t=arguments,e=-1,o=Go(t.length-s,0),n=Array(o);++e<o;)n[e]=t[s+e];for(var e=-1,r=Array(s+1);++e<s;)r[e]=t[e];return r[s]=a(n),Uo(i,this,r)}};var Vo=function(t){return function(){return t}},Ko=Date.now;var Yo=function(o){var n=0,r=0;return function(){var t=Ko(),e=16-(t-r);if(r=t,0<e){if(800<=++n)return arguments[0]}else n=0;return o.apply(void 0,arguments)}}(re?function(t,e){return re(t,"toString",{configurable:!0,enumerable:!1,value:Vo(e),writable:!0})}:Ho);var Jo=function(t,e){return Yo(Wo(t,e,Ho),t+"")};var $o=function(t,e,o){if(!It(o))return!1;var n=typeof e;return!!("number"==n?Me(o)&&ve(e,o.length):"string"==n&&e in o)&&ut(o[e],t)};var Xo,Qo,tn=function(a){return Jo(function(t,e){var o=-1,n=e.length,r=1<n?e[n-1]:void 0,i=2<n?e[2]:void 0,r=3<a.length&&"function"==typeof r?(n--,r):void 0;for(i&&$o(e[0],e[1],i)&&(r=n<3?void 0:r,n=1),t=Object(t);++o<n;){var s=e[o];s&&a(t,s,o,r)}return t})}(function(t,e,o){qo(t,e,o)}),en=((window&&window.__extends||(Xo=function(t,e){return(Xo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Xo(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(on,Qo=v),on);function on(){var t=null!==Qo&&Qo.apply(this,arguments)||this;return t.layout="icons",t.mapStyles=["road","grayscale_light","grayscale_dark","night","road_shaded_relief"],t.style=u.ControlStyle.light,t.autoSelectionMode=!0,t}var nn,rn,bt=window&&window.__extends||(nn=function(t,e){return(nn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}nn(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),sn=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},an=window&&window.__generator||function(o,n){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(o,a)}catch(t){e=[6,t],i=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},cn=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},x=(bt(ln,rn=W),ln.prototype.onAdd=function(t,e){var o=this;this.map=t;var n=this.buildContainer(t,this.options.style,"Map Style Control"),r=this.buildStyleOpsGrid();this.styleOpsGrid=r;var i=this.buildCurrStyleBtn(),t=A("Select Style");return r.classList.add(e&&e.position||"top-right"),n.addEventListener("mouseover",function(){o.hasMouse=!0,n.classList.add(ln.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("focusin",function(){o.hasFocus=!0,n.classList.add(ln.Css.inUse),r.classList.remove("hidden-accessible-element")}),n.addEventListener("mouseleave",function(){o.hasMouse=!1,o.hasFocus||(n.classList.remove(ln.Css.inUse),r.classList.add("hidden-accessible-element"))}),n.addEventListener("focusout",function(t){t.relatedTarget instanceof Node&&n.contains(t.relatedTarget)||(o.hasFocus=!1,o.hasMouse||(n.classList.remove(ln.Css.inUse),r.classList.add("hidden-accessible-element")))}),r.addEventListener("keydown",function(t){27===t.keyCode&&(t.stopPropagation(),i.focus(),n.classList.contains(ln.Css.inUse)&&(n.classList.remove(ln.Css.inUse),r.classList.add("hidden-accessible-element")))}),i.addEventListener("click",function(t){n.classList.contains(ln.Css.inUse)?(n.classList.remove(ln.Css.inUse),r.classList.add("hidden-accessible-element")):(n.classList.add(ln.Css.inUse),r.classList.remove("hidden-accessible-element"),r.firstElementChild&&r.firstElementChild.focus())}),e&&ln.InvertOrderPositions.includes(e.position)?(n.appendChild(r),n.appendChild(i),n.appendChild(t),j(t,i)):(n.appendChild(i),n.appendChild(t),j(t,i),n.appendChild(r)),n},ln.prototype.onRemove=function(){rn.prototype.onRemove.call(this),this.styleOpsGrid=null,this.styleButtons.clear(),this.map.events.remove("stylechanged",this.onStyleChange),this.map.events.remove("mapconfigurationchanged",this.onMapConfigurationChange)},ln.prototype.setSelectedStyle=function(o){var e,t,n=this;this.styleIcons.has(o)&&(e=this.currStyleImage,t=this.styleIcons.get(o),e.src!==t&&(e.src=t),Object.entries(this.styleButtons).forEach(function(t){var e=cn(t,2),t=e[0];return e[1].setAttribute("aria-current",t===o?"true":"false")}),this.map.styles.definitions().then(function(t){t=n.mapToFriendlyStyleName(o,t);e.alt!==t&&(e.alt=t),e.parentElement.lastChild instanceof Text&&(e.parentElement.lastChild.textContent=t)}))},ln.prototype.disableStyle=function(t){t=this.styleButtons[t];t&&t.setAttribute("disabled","true")},ln.prototype.enableStyle=function(t){t=this.styleButtons[t];t&&t.removeAttribute("disabled")},ln.prototype.buildSelectStyleBtn=function(o,t,e){var n=this,r=document.createElement("button"),i=this.mapToFriendlyStyleName(o,t);r.setAttribute("aria-label",i),r.setAttribute("type","button");var s=new Image;e.then(function(t){return t.blob()}).then(function(t){t=URL.createObjectURL(t);s.src=t,o===n.map.getStyle().style&&(n.currStyleImage.src=t,n.currStyleImage.alt=i,n.currStyleImage.parentElement.lastChild.nodeType==Node.TEXT_NODE?n.currStyleImage.parentElement.lastChild.textContent=i:n.currStyleImage.parentElement.appendChild(document.createTextNode(i))),n.styleIcons.set(o,t)}),s.setAttribute("aria-hidden","true"),r.appendChild(s),"icons"===this.options.layout?r.classList.add(ln.Css.button):(r.classList.add(ln.Css.listButton),r.classList.add(ln.Css.expanded),r.appendChild(document.createTextNode(i))),r.addEventListener("click",function(){n.hasMouse=!1,n.hasFocus=!1;var t=n.styleButtons[o];t&&!t.hasAttribute("disabled")&&(n._invokeEvent("styleselected",o),n.options.autoSelectionMode&&n.map.setStyle({style:o}),Object.entries(n.styleButtons).forEach(function(t){var e=cn(t,2),t=e[0];return e[1].setAttribute("aria-current",t===o?"true":"false")}))});e=document.createElement("div");return e.classList.add("selected-icon"),r.appendChild(e),r},ln.prototype.buildCurrStyleBtn=function(){var t=document.createElement("button");"icons"==this.options.layout?t.classList.add(ln.Css.button):t.classList.add(ln.Css.listButton),t.classList.add(ln.Css.currentStyle),t.setAttribute("aria-label","Select Style"),t.setAttribute("tabindex","-1"),this.currStyleImage=new Image,t.appendChild(this.currStyleImage);var e=document.createElement("div");return e.classList.add("icon"),t.appendChild(e),t},ln.prototype.buildStyleOpsGrid=function(){var t=this,e=document.createElement("div");return e.classList.add(ln.Css.styleOptions),"icons"===this.options.layout?e.classList.add(this.options.layout):e.classList.add(ln.Css.dropdown),e.setAttribute("aria-label","Style Options"),e.classList.add("hidden-accessible-element"),this.map.styles.definitions().then(function(e){return sn(t,void 0,void 0,function(){return an(this,function(t){return this.onMapConfigurationChange(e),this.map.events.add("stylechanged",this.onStyleChange),[2]})})}),this.map.events.add("mapconfigurationchanged",this.onMapConfigurationChange),e},ln.prototype.populateOpsGridFromDefinitions=function(n){var t,o,r=this;this.styleOpsGrid&&(t=n.configurations,(t=Array.isArray(this.options.mapStyles)?t.filter(function(t){return r.options.mapStyles.includes(t.name.split("_indoor")[0])}):t).forEach(function(t){var e={url:t.thumbnail};t.thumbnail&&r.map.styles._transformStyleRequest(t.thumbnail,e);var o=r.map.getServiceOptions();o.transformRequest&&tn(e,o.transformRequest(e.url,"Thumbnail"));e=fetch(e.url,{headers:e.headers}),e=r.buildSelectStyleBtn(t.name,n,e);r.styleOpsGrid.appendChild(e),r.styleButtons[t.name]=e,"icons"===r.options.layout&&(t=A(r.mapToFriendlyStyleName(t.name,n)),r.styleOpsGrid.appendChild(t),j(t,e))}),o=this.map.getStyle().style,Object.entries(this.styleButtons).forEach(function(t){var e=cn(t,2),t=e[0];return e[1].setAttribute("aria-current",t===o?"true":"false")}))},ln.InvertOrderPositions=[u.ControlPosition.TopRight,u.ControlPosition.BottomRight],ln.Css={button:"azure-maps-control-button",listButton:"azure-maps-control-list-button",expanded:"expanded",currentStyle:"curr-style",inUse:"in-use",styleOptions:"style-options",dropdown:"azure-maps-control-dropdown"},ln);function ln(t){var e=rn.call(this)||this;return e.styleOpsGrid=null,e.hasMouse=!1,e.hasFocus=!1,e.styleButtons=new N,e.styleIcons=new N,e.onStyleChange=function(){var t;e.options.autoSelectionMode&&(t=e.map.getStyle().style,e.setSelectedStyle(t))},e.onMapConfigurationChange=function(t){e.styleOpsGrid&&(Array.from(e.styleOpsGrid.children).forEach(function(t){return t.remove()}),e.styleButtons.clear(),e.populateOpsGridFromDefinitions(t))},e.mapToFriendlyStyleName=function(e,t){t=t.configurations.find(function(t){return t.name===e});return(null==t?void 0:t.displayName)||e},e.options=(new en).merge(Ao(t)),e}var un,pn,hn=((window&&window.__extends||(un=function(t,e){return(un=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}un(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(dn,pn=v),dn);function dn(){var t=null!==pn&&pn.apply(this,arguments)||this;return t.flow="none",t.incidents=!1,t}var fn,yn,mn=((window&&window.__extends||(fn=function(t,e){return(fn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}fn(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(gn,yn=hn),gn);function gn(){var t=null!==yn&&yn.apply(this,arguments)||this;return t.isActive=!1,t.style=u.ControlStyle.light,t}var vn,wn,_n=((window&&window.__extends||(vn=function(t,e){return(vn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}vn(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(bn,wn=W),Object.defineProperty(bn.prototype,"isActive",{get:function(){if(!this.map)return!1;var t=this.map.getTraffic();return"none"!==t.flow||t.incidents},set:function(t){this.map&&this.map.setTraffic({flow:t?this.options.flow:"none",incidents:!!t&&this.options.incidents})},enumerable:!1,configurable:!0}),bn.prototype.onAdd=function(t){(this.map=t).getTraffic();void 0!==this.initIsActive&&(this.isActive=this.initIsActive),this.container=this.buildContainer(t,this.style,"Traffic Control"),this.container.style.flexDirection="column";var e=this.constructTrafficButton(t);this.container.appendChild(e);t=A("Toggle Traffic Display");return this.container.appendChild(t),j(t,e),this.container},bn.prototype.onRemove=function(){wn.prototype.onRemove.call(this),this.map=null},bn.prototype.getOptions=function(){return(new mn).merge({isActive:this.isActive,flow:this.options.flow,incidents:this.options.incidents,style:this.style})},bn.prototype.updateButtonState=function(){this.trafficButton&&(this.isActive?this.container.classList.add("in-use"):this.container.classList.remove("in-use"),this.trafficButton.setAttribute("aria-pressed",this.isActive?"true":"false"))},bn.prototype.constructTrafficButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("traffic"),o.setAttribute("aria-label","Toggle Traffic Display"),o.setAttribute("alt","Toggle Traffic Display"),o.setAttribute("type","button"),this.trafficButton=o,this.updateButtonState(),o.addEventListener("click",function(){e.isActive=!e.isActive}),o},bn);function bn(t){var e,o=wn.call(this)||this;return o.hasMouse=!1,o.hasFocus=!1,o.options=(new hn).merge({flow:"relative",incidents:!0}),o.style=u.ControlStyle.light,o.container=null,o.trafficButton=null,o.map=null,t&&(o.initIsActive=null!==(e=t.isActive)&&void 0!==e&&e,o.options.flow=t.flow||"relative",o.options.incidents=null===(e=t.incidents)||void 0===e||e,o.style=t.style||u.ControlStyle.light),o}var xn,Cn,_t=window&&window.__extends||(xn=function(t,e){return(xn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xn(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),On=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ft=(_t(Sn,Cn=W),Sn.prototype.onAdd=function(t){this.map=t;var e=this.buildContainer(t,u.ControlStyle.auto,"Traffic Legend"),t=this.buildTrafficLegendDiv(t);return e.setAttribute("role","definition"),e.appendChild(t),e},Sn.prototype.onRemove=function(){Cn.prototype.onRemove.call(this),this.syncHiddenState&&(this.map.events.remove("styledata",this.syncHiddenState),this.syncHiddenState=null),this.map=null},Sn.prototype.buildTrafficLegendDiv=function(e){var o,t,n,r,i=document.createElement("div");i.classList.add("traffic-legend","hidden"),i.setAttribute("alt","Traffic Legend");var s=document.createElement("table"),a=document.createElement("tr"),c=document.createElement("td");c.setAttribute("alt","Traffic"),c.appendChild(document.createTextNode("Traffic"));var l=A("Traffic");c.classList.add("traffic-legend-title"),c.colSpan=6,a.appendChild(c),a.appendChild(l),j(l,c),s.appendChild(a);var u=document.createElement("tr");try{for(var p=On(this.table),h=p.next();!h.done;h=p.next()){var d=h.value,f=document.createElement("td");if("Fast"===d||"Slow"===d)f.setAttribute("alt",d),f.appendChild(document.createTextNode(d)),f.classList.add("traffic-legend-text");else{f.classList.add("traffic-legend-colors"),f.setAttribute("aria-label","Traffic Legend"),f.setAttribute("role","img");try{for(var y=(n=void 0,On(d)),m=y.next();!m.done;m=y.next()){var g=m.value,v=document.createElement("div");v.classList.add(g),f.appendChild(v)}}catch(t){n={error:t}}finally{try{m&&!m.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}}u.appendChild(f);var w=A(d instanceof Array?"Traffic Legend":d);u.appendChild(w),j(w,f)}}catch(t){o={error:t}}finally{try{h&&!h.done&&(t=p.return)&&t.call(p)}finally{if(o)throw o.error}}return s.appendChild(u),i.appendChild(s),this.syncHiddenState=function(t){"style"===t.dataType&&((t=e.getTraffic()).flow&&"none"!==t.flow?i.classList.remove("hidden"):i.classList.add("hidden"))},this.syncHiddenState({dataType:"style"}),e.events.add("styledata",this.syncHiddenState),i},Sn);function Sn(){var t=Cn.call(this)||this;return t.table=["Fast",["green","yellow","red","dark-red"],"Slow"],t.map=null,t.syncHiddenState=null,t}I=function(t){return this.__data__.has(t)};function Pn(t){var e=-1,o=null==t?0:t.length;for(this.__data__=new te;++e<o;)this.add(t[e])}Pn.prototype.add=Pn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Pn.prototype.has=I;var Ln=Pn;var kn=function(t,e){for(var o=-1,n=null==t?0:t.length;++o<n;)if(e(t[o],o,t))return!0;return!1};var Mn=function(t,e){return t.has(e)};var En=function(t,e,o,n,r,i){var s=1&o,a=t.length,c=e.length;if(a!=c&&!(s&&a<c))return!1;var l=i.get(t),c=i.get(e);if(l&&c)return l==e&&c==t;var u=-1,p=!0,h=2&o?new Ln:void 0;for(i.set(t,e),i.set(e,t);++u<a;){var d,f=t[u],y=e[u];if(void 0!==(d=n?s?n(y,f,u,e,t,i):n(f,y,u,t,e,i):d)){if(d)continue;p=!1;break}if(h){if(!kn(e,function(t,e){if(!Mn(h,e)&&(f===t||r(f,t,o,n,i)))return h.push(e)})){p=!1;break}}else if(f!==y&&!r(f,y,o,n,i)){p=!1;break}}return i.delete(t),i.delete(e),p};function An(t){var o=-1,n=Array(t.size);return t.forEach(function(t,e){n[++o]=[e,t]}),n}function jn(t){var e=-1,o=Array(t.size);return t.forEach(function(t){o[++e]=t}),o}var Ot=dt?dt.prototype:void 0,Tn=Ot?Ot.valueOf:void 0;var In=function(t,e,o,n,r,i,s){switch(o){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return t.byteLength==e.byteLength&&i(new uo(t),new uo(e))?!0:!1;case"[object Boolean]":case"[object Date]":case"[object Number]":return ut(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=An;case"[object Set]":a=a||jn;if(t.size!=e.size&&!(1&n))return!1;var c=s.get(t);if(c)return c==e;n|=2,s.set(t,e);a=En(a(t),a(e),n,r,i,s);return s.delete(t),a;case"[object Symbol]":if(Tn)return Tn.call(t)==Tn.call(e)}return!1},zn=Object.prototype.hasOwnProperty;var Dn=function(t,e,o,n,r,i){var s=1&o,a=Ye(t),c=a.length;if(c!=Ye(e).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in e:zn.call(e,u)))return!1}var p=i.get(t),h=i.get(e);if(p&&h)return p==e&&h==t;var d=!0;i.set(t,e),i.set(e,t);for(var f=s;++l<c;){var y,m=t[u=a[l]],g=e[u];if(!(void 0===(y=n?s?n(g,m,u,e,t,i):n(m,g,u,t,e,i):y)?m===g||r(m,g,o,n,i):y)){d=!1;break}f=f||"constructor"==u}return!d||f||(p=t.constructor)!=(h=e.constructor)&&"constructor"in t&&"constructor"in e&&!("function"==typeof p&&p instanceof p&&"function"==typeof h&&h instanceof h)&&(d=!1),i.delete(t),i.delete(e),d},Rn="[object Arguments]",Bn="[object Array]",Fn="[object Object]",Nn=Object.prototype.hasOwnProperty;var Zn=function(t,e,o,n,r,i){var s=fe(t),a=fe(e),c=s?Bn:ao(t),l=a?Bn:ao(e),u=(c=c==Rn?Fn:c)==Fn,a=(l=l==Rn?Fn:l)==Fn;if((l=c==l)&&me(t)){if(!me(e))return!1;u=!(s=!0)}if(l&&!u)return i=i||new oe,s||be(t)?En(t,e,o,n,r,i):In(t,e,c,o,n,r,i);if(!(1&o)){u=u&&Nn.call(t,"__wrapped__"),a=a&&Nn.call(e,"__wrapped__");if(u||a)return r(u?t.value():t,a?e.value():e,o,n,i=i||new oe)}return!!l&&(i=i||new oe,Dn(t,e,o,n,r,i))};var qn=function t(e,o,n,r,i){return e===o||(null==e||null==o||!ue(e)&&!ue(o)?e!=e&&o!=o:Zn(e,o,n,r,t,i))};var Hn,Un=function(t,e){return qn(t,e)},Gn=(Hn=Object.freeze({__proto__:null,default:{}}))&&Hn.default||Hn,Wn=xt(function(a){!function(){for(var e,o,n=0,r=[],t=0;t<256;t++)r[t]=(t+256).toString(16).substr(1);function i(){var t,t=(t=16,(!e||s.BUFFER_SIZE<n+t)&&(n=0,e=s.randomBytes(s.BUFFER_SIZE)),e.slice(n,n+=t));return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}function s(){var t=i();return r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}s.BUFFER_SIZE=4096,s.bin=i,s.clearBuffer=function(){e=null,n=0},s.test=function(t){return"string"==typeof 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)},"undefined"!=typeof crypto?o=crypto:"undefined"!=typeof window&&void 0!==window.msCrypto&&(o=window.msCrypto),o=o||Gn,(a.exports=s).randomBytes=function(){if(o){if(o.randomBytes)return o.randomBytes;if(o.getRandomValues)return"function"!=typeof Uint8Array.prototype.slice?function(t){t=new Uint8Array(t);return o.getRandomValues(t),Array.from(t)}:function(t){t=new Uint8Array(t);return o.getRandomValues(t),t}}return function(t){for(var e=[],o=0;o<t;o++)e.push(Math.floor(256*Math.random()));return e}}()}()}),Vn=(Kn.TYPE="Feature",Kn);function Kn(t,e,o,n){this.type="Feature",this.type=Kn.TYPE,this.properties=e||{},this.id=o,this.geometry=t,this.bbox=n}var Yn,Jn,wt=window&&window.__extends||(Yn=function(t,e){return(Yn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Yn(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),$n=(Jn=Array,wt(Xn,Jn),Xn.fromData=function(o){var n=NaN,r=NaN,i=new Set(["y"]),s=new Set(["x"]);return Object.keys(o).forEach(function(t){var e=t.toLowerCase();isNaN(n)&&i.has(e)&&"number"==typeof o[t]?n=o[t]:isNaN(r)&&s.has(e)&&"number"==typeof o[t]&&(r=o[t])}),isNaN(n)||isNaN(r)?null:new Xn(n,r)},Xn.getX=function(t){return 0<t.length?t[0]:NaN},Xn.getY=function(t){return 1<t.length?t[1]:NaN},Xn.getDestination=function(t,e,o){return new Xn(Xn.getX(t)+o*Math.cos((e+270)*Math.PI/180),Xn.getY(t)+o*Math.sin((e+270)*Math.PI/180))},Xn.getDistance=function(t,e){var o=Xn.getX(t)-Xn.getX(e),e=Xn.getY(t)-Xn.getY(e);return Math.sqrt(o*o+e*e)},Xn.getHeading=function(t,e){var o=Xn.getX(e)-Xn.getX(t),e=Xn.getY(t)-Xn.getY(e);return 180*(2.5*Math.PI-Math.atan2(e,o))/Math.PI%360},Xn);function Xn(t,e){return Jn.call(this,t,e)||this}var Qn=(tr.TYPE="Point",tr);function tr(t){this.type="Point",this.type=tr.TYPE,this.coordinates=t}var er,or,nr,rr,ir,sr=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},ar=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cr=6378137,lr=Math.PI/180,ur=180/Math.PI,pr=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9],hr=85.0511;function dr(t){return t*lr}function fr(t){return t*ur}function yr(t,e,o){return Math.min(Math.max(t,e),o)}function mr(t,e){var o=dr(e[1]-t[1]),n=dr(e[0]-t[0]),n=Math.pow(Math.sin(o/2),2)+Math.cos(dr(t[1]))*Math.cos(dr(e[1]))*Math.pow(Math.sin(n/2),2),n=2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n));return Math.round(cr*n*100)/100}function gr(t){if(t)switch(t.toLowerCase()){case"feet":case"foot":case"ft":return or.feet;case"kilometers":case"kilometer":case"kilometres":case"kilometre":case"km":case"kms":return or.kilometers;case"miles":case"mile":case"mi":return or.miles;case"nauticalmiles":case"nauticalmile":case"nms":case"nm":return or.nauticalMiles;case"yards":case"yard":case"yds":case"yrd":case"yrds":return or.yards;default:return or.meters}return or.meters}function vr(t){if(t)switch(t.toLowerCase()){case"milespersecondsquared":case"milepersecondsquared":case"mi/s^2":case"mi/s2":return ir.milesPerSecondSquared;case"kilometerspersecondsquared":case"kilometrespersecondsquared":case"kilometerpersecondsquared":case"kilometrepersecondsquared":case"km/s^2":case"km/s2":return ir.kilometersPerSecondSquared;case"knotspersecond":case"knotpersecond":case"knts/s":case"kn/s":case"kt/s":return ir.knotsPerSecond;case"standardgravity":case"g":return ir.standardGravity;case"feetpersecondsquared":case"footpersecondsquared":case"ft/s^2":case"ft/s2":return ir.feetPerSecondSquared;case"yardspersecondsquared":case"yardpersecondsquared":case"yds/s^2":case"yds/s2":case"yd/s^2":case"yd/s2":return ir.yardsPerSecondSquared;case"milesperhoursecond":case"mileperhoursecond":case"milesperhourseconds":case"mileperhourseconds":case"mi/h/s":return ir.milesPerHourSecond;case"kilometersperhoursecond":case"kilometrespersoursecond":case"kilometerperhoursecond":case"kilometrepersoursecond":case"kilometersperhourssecond":case"kilometrespersourssecond":case"kilometerperhourssecond":case"kilometrepersourssecond":case"kmhs":case"km/h/s":return ir.kilometersPerHourSecond;default:return ir.metersPerSecondSquared}return ir.metersPerSecondSquared}function wr(t){if(t)switch(t){case"acres":case"ac":return er.acres;case"hectares":case"ha":return er.hectares;case"squareFeet":case"ft^2":case"ft2":return er.squareFeet;case"squareYards":case"squareYard":case"yds^2":case"yds2":case"yd^2":case"yd2":return er.squareYards;case"squareKilometers":case"squareKilometres":case"squareKilometer":case"squareKilometre":case"km^2":case"km2":return er.squareKilometers;case"squareMiles":case"squareMile":case"mi^2":case"mi2":return er.squareMiles;default:return er.squareMeters}return er.squareMeters}function _r(t){if(t)switch(t.toLowerCase()){case"feetpersecond":case"footsecond":case"ftps":case"ft/s":return rr.feetPerSecond;case"milesperhour":case"mileperhour":case"mph":case"mi/hr":case"mi/h":return rr.milesPerHour;case"knots":case"knot":case"knts":case"knt":case"kn":case"kt":return rr.knots;case"mach":case"m":return rr.mach;case"kilometersperhour":case"kilometresperhour":case"kmperhour":case"kmph":case"km/hr":case"km/h":return rr.kilometersPerHour;default:return rr.metersPerSecond}return rr.metersPerSecond}function br(t){if(t)switch(t.toLowerCase()){case"milliseconds":case"ms":return nr.ms;case"minutes":case"minute":case"mins":case"min":return nr.minutes;case"hours":case"hour":case"hr":case"h":return nr.hours;case"days":case"day":case"d":return nr.days;default:return nr.seconds}return nr.seconds}function xr(t){var e=0;if(t&&0<t.length)for(var e=Math.abs(Cr(t[0])),o=1,n=t.length;o<n;o++)e-=Math.abs(Cr(t[o]));return e}function Cr(t){var e=0;if(3<=t.length){for(var o=void 0,n=void 0,r=0,i=t.length;r<i;r++)e+=(dr(t[r===i-2?(o=i-2,n=i-1,0):r===i-1?(o=i-1,n=0,1):(n=(o=r)+1,r+2)][0])-dr(t[o][0]))*Math.sin(dr(t[n][1]));e=e*cr*cr/2}return e}function Or(t,e,o){return(t[0]-o[0])*(e[1]-o[1])-(t[1]-o[1])*(e[0]-o[0])}function Sr(t,e,o){if(2<=o.length){for(var n,r,i=1/0,s=null,a=Hr(o,22),c=0,l=a.length-1;c<l;c++)r=function(t,e,o){if(e[0]===o[0]&&e[1]===o[1])return e;var n=t[0]-e[0],r=t[1]-e[1],i=o[0]-e[0],t=o[1]-e[1],r=(i*n+t*r)/(i*i+t*t);return r<0?e:1<r?o:[e[0]+i*r,e[1]+t*r]}(e,a[c],a[c+1]),(n=$n.getDistance(e,r))<i&&(i=n,s=r);if(s){var u=qr([s],22)[0];return new Vn(new Qn(u),{distance:Mr(t,u)})}}else if(1===o.length)return new Vn(new Qn(o[0]),{distance:Mr(t,o[0])});return null}function Pr(t,e){var o;return!isNaN(t)&&"number"==typeof e&&0<=e&&(o=void 0,o=e<pr.length?pr[e]:Math.pow(10,e),t=Math.round(t*o)/o),t}function Lr(t,e,o,n){switch(gr(e)){case or.meters:t/=1e3;break;case or.feet:t/=3280.8399;break;case or.miles:t/=.62137119;break;case or.yards:t/=1093.6133;break;case or.nauticalMiles:t/=.5399568;break;case or.kilometers:}switch(gr(o)){case or.meters:t*=1e3;break;case or.feet:t*=3280.8399;break;case or.miles:t*=.62137119;break;case or.yards:t*=1093.6133;break;case or.nauticalMiles:t*=.5399568;break;case or.kilometers:}return"number"==typeof n&&0<=n&&(n=Math.pow(10,n),t=Math.round(t*n)/n),t}function kr(t,e,o,n){n=n||"meters",t=Qr(t);var r=Er(n),n=dr(t[1]),t=dr(t[0]),e=e*lr,o=o/r,r=Math.asin(Math.sin(n)*Math.cos(o)+Math.cos(n)*Math.sin(o)*Math.cos(e)),n=t+Math.atan2(Math.sin(e)*Math.sin(o)*Math.cos(n),Math.cos(o)-Math.sin(n)*Math.sin(r)),r=yr(Fr(r*ur),-85,85);return[Nr(n*ur),r]}function Mr(t,e,o){e=mr(t=Qr(t),e=Qr(e));return"meters"===o?e:Lr(e,"meters",o||"meters")}function Er(t){t=gr(t);return Lr(cr,or.meters,t)}function Ar(t,e,o){for(var n=[],r=dr(t[1]),i=dr(t[0]),s=dr(e[1]),a=dr(e[0]),c=2*Math.asin(Math.sqrt(Math.pow(Math.sin((r-s)/2),2)+Math.cos(r)*Math.cos(s)*Math.pow(Math.sin((i-a)/2),2))),l=0;l<=o;l++){var u=l/o,p=Math.sin((1-u)*c)/Math.sin(c),h=Math.sin(u*c)/Math.sin(c),d=p*Math.cos(r)*Math.cos(i)+h*Math.cos(s)*Math.cos(a),u=p*Math.cos(r)*Math.sin(i)+h*Math.cos(s)*Math.sin(a),h=p*Math.sin(r)+h*Math.sin(s),h=Math.atan2(h,Math.sqrt(Math.pow(d,2)+Math.pow(u,2))),d=Math.atan2(u,d),h=yr(h*ur,-85,85);d*=ur,n.push([d,h])}return n}function jr(t){return(Array.isArray(t)?t:t.coordinates).reduce(function(t,e){var o=0<t.length?t[t.length-1]:null;return o&&180<Math.abs(e[0]-o[0])?(o=o[0]<0?e[0]-360:e[0]+360,t.push([o,e[1]])):t.push(e),t},[])}function Tr(t){for(var e,o,n,r,i,s=Array.isArray(t)?t:t.coordinates,a=[],c=[],l=0;l<s.length;l++)a.push(s[l]),l+1>=s.length||(e=(n=sr(s[l],2))[0],o=n[1],i=(r=sr(s[l+1],2))[0],n=r[1],180<Math.abs(i-e)&&(r=0<e?180:-180,i=Math.abs((0<e?i+360:i-360)-e),i=o+(n-o)*(Math.abs(r-e)/i),a.push([r,i]),c.push(a),a=[[-r,i]]));return c.push(a),c}function Ir(t,e){if(t=Qr(t),e=Qr(e),t&&2<=t.length&&e&&2<=e.length){var o=dr(t[1]),n=dr(e[1]),e=dr(e[0]-t[0]),t=Math.sin(e)*Math.cos(n),e=Math.cos(o)*Math.sin(n)-Math.sin(o)*Math.cos(n)*Math.cos(e);return(fr(Math.atan2(t,e))+360)%360}return NaN}function zr(t,e){var o,n=0;Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var r=0,i=o.length-1;r<i;r++)n+=mr(o[r],o[r+1]);return Lr(n,"meters",e||"meters")}function Dr(t,e,o){o=o||"meters";var n,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(n=Mr(r[a-1],r[a],o))){var c=Ir(r[a-1],r[a]);return kr(r[a-1],c,e-i,o)}i+=n}return i<=e?r[s-1]:r[0]}return null}function Rr(t,e,o,n,r){n=n||"meters",r=r||0,t=Qr(t);for(var i=[],s=360/o,a=0;a<=o;a++)i.push(kr(t,(a*s+r)%360,e,n));return i}function Br(t,e,o,n,r){return jr(Rr(t,e,o,n,r))}function Fr(t){return 90<t?180<(t=(t+90)%360)?90-(t-180):t-90:t<-90?(t=(t-90)%360)<-180?-90-(t+180):t+90:t}function Nr(t){return 180<t?(t+180)%360-180:t<-180?(t-180)%360+180:t}function Zr(t,e,o){if(0===o)return Object.assign({},t);e=Qr(e);for(var n,r,i=[],s=0,a=t.length;s<a;s++)n=Mr(e,t[s]),r=Ir(e,t[s]),i.push(kr(e,r+o,n));return i}function qr(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)o=t[s][0]/r-.5,n=.5-t[s][1]/r,i.push([360*o,90-360*Math.atan(Math.exp(2*-n*Math.PI))/Math.PI]);return i}function Hr(t,e){for(var o,n,r=512*Math.pow(2,e),i=[],s=0,a=t.length;s<a;s++)n=Math.sin(t[s][1]*Math.PI/180),o=(t[s][0]+180)/360,n=.5-Math.log((1+n)/(1-n))/(4*Math.PI),i.push([Math.round(o*r),Math.round(n*r)]);return i}function Ur(t,e,o,n){switch(vr(e)){case ir.kilometersPerHourSecond:t/=3.6;break;case ir.milesPerHourSecond:t/=2.236936292054;break;case ir.knotsPerSecond:t/=1.943844492441;break;case ir.standardGravity:t/=.1019716212978;break;case ir.kilometersPerSecondSquared:t/=.001;break;case ir.milesPerSecondSquared:t/=.000621371192;break;case ir.feetPerSecondSquared:t/=3.280839895012;break;case ir.yardsPerSecondSquared:t/=1.093613298338;break;case ir.metersPerSecondSquared:}switch(vr(o)){case ir.kilometersPerHourSecond:t*=3.6;break;case ir.milesPerHourSecond:t*=2.236936292054;break;case ir.knotsPerSecond:t*=1.943844492441;break;case ir.standardGravity:t*=.1019716212978;break;case ir.kilometersPerSecondSquared:t*=.001;break;case ir.milesPerSecondSquared:t*=.000621371192;break;case ir.feetPerSecondSquared:t*=3.280839895012;break;case ir.yardsPerSecondSquared:t*=1.093613298338;break;case ir.metersPerSecondSquared:}return Pr(t,n)}function Gr(t,e,o,n){switch(wr(e)){case er.acres:t*=4046.8564224;break;case er.hectares:t*=1e4;break;case er.squareFeet:t*=.09290304;break;case er.squareKilometers:t*=1e6;break;case er.squareMiles:t*=259e4;break;case er.squareYards:t*=.83612736;break;case er.squareMeters:}switch(wr(o)){case er.acres:t/=4046.8564224;break;case er.hectares:t/=1e4;break;case er.squareFeet:t/=.09290304;break;case er.squareKilometers:t/=1e6;break;case er.squareMiles:t/=259e4;break;case er.squareYards:t/=.83612736;break;case er.squareMeters:}return Pr(t,n)}function Wr(t,e,o,n){switch(_r(e)){case rr.feetPerSecond:t*=1.09728;break;case rr.milesPerHour:t*=1.6093;break;case rr.knots:t*=1.852;break;case rr.metersPerSecond:t*=3.6;break;case rr.mach:t*=1234.8;break;case rr.kilometersPerHour:}switch(_r(o)){case rr.feetPerSecond:t/=1.09728;break;case rr.milesPerHour:t/=1.6093;break;case rr.knots:t/=1.852;break;case rr.metersPerSecond:t/=3.6;break;case rr.mach:t/=1234.8;break;case rr.kilometersPerHour:}return Pr(t,n)}function Vr(t,e,o,n){switch(br(e)){case nr.ms:t/=1e3;break;case nr.hours:t*=3600;break;case nr.minutes:t*=60;break;case nr.days:t*=86400;break;case nr.seconds:}switch(br(o)){case nr.ms:t*=1e3;break;case nr.hours:t/=3600;break;case nr.minutes:t/=60;break;case nr.days:t/=86400;break;case nr.seconds:}return Pr(t,n)}function Kr(t,e,o,n,r,i,s,a){r=Lr(e,r,or.meters),i=Vr(o,i,nr.seconds);return Ur(2*(r-Wr(t,n,rr.metersPerSecond)*i)/(i*i),ir.metersPerSecondSquared,s,a)}function Yr(t,e,o,n,r,i,s){t=Wr(t,n,rr.metersPerSecond);return Ur((Wr(e,n,rr.metersPerSecond)-t)/Vr(o,r,nr.seconds),ir.metersPerSecondSquared,i,s)}function Jr(t,e,o,n){t=$r(t),e=$r(e);return null!=t&&null!=e?Vr(e.getTime()-t.getTime(),nr.ms,o,n):NaN}function $r(t){if("[object Date]"===Object.prototype.toString.call(t))return t;if("string"==typeof t){var e=Date.parse(t);if(!isNaN(e))return new Date(e);if(0<=t.indexOf("Date(")){e=0,e=0<(t=t.replace("/Date(","").replace(")/","")).indexOf("+")?parseInt(t.substr(0,t.indexOf("+")),10):0<t.indexOf("-")?parseInt(t.substr(0,t.indexOf("-")),10):parseInt(t,10);return new Date(e)}}else if("number"==typeof t)return new Date(t);return null}function Xr(t){var e=[],o=null,n=null;if(Array.isArray(t)&&0<t.length)if(Array.isArray(t[0])&&"number"==typeof t[0][0])e=t;else for(var r=t.length,i=0;i<r;i++)e=e.concat(Xr(t[i]));else if(t.type)switch(t.type){case"Point":e=[t.coordinates];break;case"LineString":e=t.coordinates;break;case"Polygon":o=t.coordinates;break;case"MultiPoint":e=t.coordinates;break;case"MultiLineString":o=t.coordinates;break;case"MultiPolygon":n=t.coordinates;break;case"Feature":var s=t,e=ui._isCircle(s)?ui._getCirclePositions(s):Xr(s.geometry);break;case"FeatureCollection":e=Xr(t.features);break;case"GeometryCollection":e=Xr(t.geometries)}else if(t instanceof ui)return Xr(t.toJson());if(o)for(r=o.length,i=0;i<r;i++)e=e.concat(o[i]);else if(n)for(var a=n.length,i=0;i<a;i++)for(var c=n[i].length,l=0;l<c;l++)e=e.concat(n[i][l]);return e}function Qr(t){if(Array.isArray(t)&&"number"==typeof t[0])return t;if(t.type){if("Point"===t.type)return t.coordinates;if("Feature"===t.type&&"Point"===t.geometry.type)return t.geometry.coordinates}else if(t instanceof ui&&"Point"===t.getType())return t.getCoordinates();return null}function ti(t,e,o){o=o||"meters";var n,r,i=0;if(Array.isArray(t)?r=t:t.type&&"LineString"===t.type&&(r=t.coordinates),2<=r.length){for(var s=r.length,a=1;a<s;a++){if(e<=i+(n=Mr(r[a-1],r[a],o))){var c=Ir(r[a-1],r[a]),l=kr(r[a-1],c,e-i,o);return new Vn(new Qn(l),{heading:c})}i+=n}return i<=e?new Vn(new Qn(r[s-1]),{heading:Ir(r[s-2],r[s-1])}):new Vn(new Qn(r[0]),{heading:Ir(r[0],r[1])})}return null}(bt=er=er||{}).squareMeters="squareMeters",bt.acres="acres",bt.hectares="hectares",bt.squareFeet="squareFeet",bt.squareKilometers="squareKilometers",bt.squareMiles="squareMiles",bt.squareYards="squareYards",(_t=or=or||{}).meters="meters",_t.kilometers="kilometers",_t.feet="feet",_t.miles="miles",_t.nauticalMiles="nauticalMiles",_t.yards="yards",(I=nr=nr||{}).seconds="seconds",I.hours="hours",I.ms="ms",I.minutes="minutes",I.days="days",(dt=rr=rr||{}).metersPerSecond="metersPerSecond",dt.kilometersPerHour="kilometersPerHour",dt.feetPerSecond="feetPerSecond",dt.milesPerHour="milesPerHour",dt.knots="knots",dt.mach="mach",(Ot=ir=ir||{}).milesPerSecondSquared="milesPerSecondSquared",Ot.kilometersPerSecondSquared="kilometersPerSecondSquared",Ot.knotsPerSecond="knotsPerSecond",Ot.standardGravity="standardGravity",Ot.feetPerSecondSquared="feetPerSecondSquared",Ot.yardsPerSecondSquared="yardsPerSecondSquared",Ot.milesPerHourSecond="milesPerHourSecond",Ot.kilometersPerHourSecond="kilometersPerHourSecond",Ot.metersPerSecondSquared="metersPerSecondSquared";var ei,oi,wt=window&&window.__extends||(ei=function(t,e){return(ei=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ei(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ni=(oi=Array,wt(ri,oi),ri.fromPosition=function(t){return 2===t.length?new ri(t[0],t[1]):2<t.length?new ri(t[0],t[1],t[2]):null},ri.areEqual=function(t,e,o){if(void 0===o&&(o=6),t&&2<=t.length&&e&&2<=e.length){var n=Math.pow(10,o),r=Fr(t[1]),o=Fr(e[1]),t=Nr(t[0]),e=Nr(e[0]);if(0!=Math.round((r-o)*n)/n)return!1;n=Math.round((t-e)*n)/n;return 0!=n&&360!=n?!1:!0}return!1},ri.fromLatLng=function(r,t,e){var i,s,a,c,l,u,o=[];return"number"==typeof r?(o.push(r),"number"==typeof t&&o.push(t),"number"==typeof e&&o.push(e)):Array.isArray(r)?2<=r.length&&"number"==typeof r[0]&&"number"==typeof r[1]&&(3<=r.length&&"number"==typeof r[2]?o.push(r[0],r[1],r[2]):o.push(r[0],r[1])):"object"==typeof r&&(i=["lat","latitude","y"],s=["lng","longitude","lon","x"],a=["elv","elevation","alt","altitude","z"],u=l=c=NaN,Object.keys(r).forEach(function(t,e,o){var n=t.toLowerCase();isNaN(c)&&0<=i.indexOf(n)&&"number"==typeof r[t]?c=r[t]:isNaN(l)&&0<=s.indexOf(n)&&"number"==typeof r[t]?l=r[t]:isNaN(u)&&0<=a.indexOf(n)&&"number"==typeof r[t]&&(u=r[t])}),isNaN(c)||isNaN(l)||(o.push(l,c),isNaN(u)||o.push(u))),2<=o.length?o:null},ri.fromLatLngs=function(t){var e=[];if(Array.isArray(t))for(var o=0,n=t.length;o<n;o++){var r=ri.fromLatLng(t[o]);r&&e.push(r)}return e},ri._getDimensions=function(t){for(var e=0;Array.isArray(t);)t=t[0],e++;return"number"==typeof t&&e--,e},ri);function ri(t,e,o){return o?oi.call(this,t,e,o)||this:oi.call(this,t,e)||this}var ii=(si.TYPE="Polygon",si);function si(t,e){this.type="Polygon",this.type=si.TYPE,1===ni._getDimensions(t)?this.coordinates=[t]:this.coordinates=t,this.bbox=e}var ai,ci,bt=window&&window.__extends||(ai=function(t,e){return(ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ai(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),li=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},ui=(bt(pi,ci=Z),pi.prototype.addProperty=function(t,e){Un(this.data.properties[t],e)||(this.data.properties[t]=Ao(e),"subType"!==t&&"radius"!==t||this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},pi.prototype.getBounds=function(){var e,t,o,n,r,i=this.getCoordinates(),s=this.getType();if("Point"===s)r=this.circlePolygon?(a=this.circlePolygon.geometry.coordinates,yi.fromPositions(a[0])):new yi(a=i,a);else if("MultiPoint"===s||"LineString"===s){var a=i;r=yi.fromPositions(a)}else if("Polygon"===s){a=i;r=yi.fromPositions(a[0])}else if("MultiLineString"===s){a=i;try{for(var c=li(a),l=c.next();!l.done;l=c.next()){var u=l.value;r=yi.merge(r,yi.fromPositions(u))}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=c.return)&&t.call(c)}finally{if(e)throw e.error}}}else if("MultiPolygon"===s){a=i;try{for(var p=li(a),h=p.next();!h.done;h=p.next()){var d=h.value;r=yi.merge(r,yi.fromPositions(d[0]))}}catch(t){o={error:t}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(o)throw o.error}}}return r},pi.prototype.getCoordinates=function(){return Ao(this.data.geometry.coordinates)},pi.prototype.getCircleCoordinates=function(){return this.circlePolygon?Ao(this.circlePolygon.geometry.coordinates[0]):null},pi.prototype.getId=function(){return this.data.id},pi.prototype.getProperties=function(){return Ao(this.data.properties)},pi.prototype.getType=function(){return this.data.geometry.type},pi.prototype.isCircle=function(){return pi._isCircle(this.data)},pi.prototype.isRectangle=function(){return pi._isRectangle(this.data)},pi.prototype.setCoordinates=function(t){t="Polygon"===this.getType()&&1===ni._getDimensions(t)?[t]:t;Un(this.data.geometry.coordinates,t)||(this.data.geometry.coordinates=Ao(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},pi.prototype.setProperties=function(t){t[pi._shapeIdPropName]=this.data.id,Un(this.data.properties,t)||(this.data.properties=Ao(t),this._handleCircle(),this.dataSource&&this.dataSource._updateSource(),this._invokeEvent("shapechanged",this))},pi.prototype.toJson=function(){return JSON.parse(JSON.stringify(this.data))},pi.prototype._toJson=function(){return this.circlePolygon||this.data},pi.prototype._setDataSource=function(t){void 0===t||null==t?delete this.dataSource:this.dataSource=t},pi.prototype._handleCircle=function(){var t;this.isCircle()?(t=pi._getCirclePositions(this.data),this.circlePolygon=new Vn(new ii([t]),this.data.properties,this.data.id),this.data.properties.subType="Circle"):delete this.circlePolygon},pi._isCircle=function(t){return t&&t.geometry&&"Point"===t.geometry.type&&t.geometry.coordinates&&t.properties&&"string"==typeof t.properties.subType&&"circle"===t.properties.subType.toLowerCase()&&"number"==typeof t.properties.radius},pi._isRectangle=function(t){if("Polygon"===t.geometry.type&&t.geometry.coordinates&&"string"==typeof t.properties.subType&&"rectangle"===t.properties.subType.toLowerCase()){t=t.geometry.coordinates;if(1===t.length){t=t[0];if(5===t.length)return t[0][0]===t[4][0]&&t[0][1]===t[4][1];if(4===t.length)return!0}}return!1},pi._getCirclePositions=function(t){return Br(t.geometry.coordinates,t.properties.radius,72,"meters")},pi._shapeIdPropName="_azureMapsShapeId",pi);function pi(t,e,o){var n,r,i=ci.call(this)||this;return"Feature"===t.type?(r=Ao((n=t).geometry),o=n.properties?Ao(n.properties):{},e=null==n.id||""===n.id?Wn():n.id):(r=Ao(t),e=null==e||""===e?Wn():e,o=o?Ao(o):{}),o[pi._shapeIdPropName]=e,i.data=new Vn(r,o,e),i._handleCircle(),i}var hi,di,_t=window&&window.__extends||(hi=function(t,e){return(hi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}hi(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),fi=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yi=(di=Array,_t(mi,di),mi.fromBoundingBox=function(t){var e=mi.getWest(t),o=mi.getSouth(t),n=mi.getEast(t),t=mi.getNorth(t);return new mi([e,o,n,t])},mi.fromDimensions=function(t,e,o){var n=t[0],r=t[1],t=Math.min(Math.max(r+o/2,-85.5),85.5),r=Math.min(Math.max(r-o/2,-85.5),85.5),o=Nr(n+e/2);return new mi([Nr(n-e/2),r,o,t])},mi.fromEdges=function(t,e,o,n){return new mi([t,e,o,n])},mi.containsPosition=function(t,e){var o=mi.getCenter(t),n=Math.abs(o[1]-e[1]),o=Math.abs(o[0]-e[0]);180<o&&(o=360-o);e=mi.getHeight(t),t=mi.getWidth(t);return n<=e/2+1e-8&&o<=t/2+1e-8},mi.containsBoundingBox=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;return!(!o||!n)&&(mi.getWest(t)<mi.getWest(e)&&mi.getWest(e)<mi.getEast(t)&&mi.getWest(t)<mi.getEast(e)&&mi.getEast(e)<mi.getEast(t)&&mi.getSouth(t)<mi.getSouth(e)&&mi.getSouth(e)<mi.getNorth(t)&&mi.getSouth(t)<mi.getNorth(e)&&mi.getNorth(e)<mi.getNorth(t))},mi.crossesAntimeridian=function(t){return Nr(mi.getEast(t))-Nr(mi.getWest(t))<0||mi.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)||mi.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)},mi.getCenter=function(t){var e=Nr(mi.getEast(t)),o=Nr(mi.getWest(t));e<o&&(e+=360);o=Nr((o+e)/2),e=Fr(mi.getSouth(t)),t=Fr(mi.getNorth(t));return[o,Fr((e+t)/2)]},mi.getHeight=function(t){t=Fr(mi.getNorth(t))-Fr(mi.getSouth(t));return isNaN(t)?0:t},mi.getWidth=function(t){t=Nr(mi.getEast(t))-Nr(mi.getWest(t));return isNaN(t)?0:t<0?t+360:t},mi.getSouthWest=function(t){var e=this.getSouth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},mi.getNorthEast=function(t){var e=this.getNorth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},mi.getNorthWest=function(t){var e=this.getNorth(t),t=this.getWest(t);return isNaN(e)||isNaN(t)?null:[t,e]},mi.getSouthEast=function(t){var e=this.getSouth(t),t=this.getEast(t);return isNaN(e)||isNaN(t)?null:[t,e]},mi.getSouth=function(t){return t&&4<=t.length?Number(t[1]):NaN},mi.getWest=function(t){return t&&4<=t.length?Number(t[0]):NaN},mi.getNorth=function(t){if(t){if(4===t.length)return Number(t[3]);if(6===t.length)return Number(t[4])}return NaN},mi.getEast=function(t){if(t){if(4===t.length)return Number(t[2]);if(6===t.length)return Number(t[3])}return NaN},mi.intersect=function(t,e){var o=mi.getCenter(t),n=mi.getCenter(e),r=Math.abs(o[1]-n[1]),i=Math.abs(o[0]-n[0]);180<i&&(i=360-i);o=mi.getHeight(t),n=mi.getWidth(t),t=mi.getHeight(e),e=mi.getWidth(e);return r<=o/2+t/2&&i<=n/2+e/2},mi.merge=function(t,e){var o=t&&4===t.length,n=e&&4===e.length;if(o&&!n)return t;if(n&&!o)return e;if(!o&&!n)return null;for(var o=Math.max(Fr(mi.getNorth(t)),Fr(mi.getNorth(e))),n=Math.min(Fr(mi.getSouth(t)),Fr(mi.getSouth(e))),r=[t,e],i=[],s=0,s=0;s<r.length;s++){var a=r[s],c=Nr(mi.getWest(a)),l=Nr(mi.getEast(a));mi.crossesAntimeridian(a)?(i.push([c,180]),i.push([-180,l])):i.push([c,l])}i.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var u=[],p=i[0];for(s=1;s<i.length;){var h=i[s];p[1]>=h[0]?p[1]=Math.max(p[1],h[1]):(u.push(p),p=h),s++}u.push(p);var d=u.length,f=u[0][0]+360-u[d-1][1],y=[u[d-1][1],u[0][0]];for(s=1;s<d;s++){var m=u[s][0]-u[s-1][1];f<m&&(f=m,y=[u[s-1][1],u[s][0]])}return new mi([y[1],n],[y[0],o])},mi.fromPositions=function(t){for(var e,o,n=NaN,r=NaN,i=NaN,s=NaN,a=t.length,c=new Array(a),l=0;a--;)(o=t[a])&&2<=o.length&&(e=Fr(o[1]),n=isNaN(n)?e:Math.max(n,e),r=isNaN(r)?e:Math.min(r,e),c[l++]=Nr(o[0]));if(l){c.length=l,c.sort(function(t,e){return t-e});for(var u=c[0]+360-c[l-1],p=0,a=1;a<l;a++){var h=c[a]-c[a-1];u<h&&(u=h,p=a)}i=c[p],s=c[(p||l)-1]}return isNaN(i)||isNaN(r)||isNaN(s)||isNaN(n)?null:new mi([i,r,s,n])},mi.fromLatLngs=function(t){return mi.fromPositions(ni.fromLatLngs(t))},mi.fromData=function(t){var e,o,n=null;if(Array.isArray(t)&&0<t.length){try{for(var r=fi(t),i=r.next();!i.done;i=r.next()){var s,a=i.value;null!=(s=mi.fromData(a))&&(n=null===n?s:mi.merge(n,s))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n}if(t instanceof ui)return t.getBounds();if(t&&t.type){var c=t;if(c.bbox&&4===c.bbox.length)return c.bbox;switch(c.type){case"FeatureCollection":return mi.fromData(c.features);case"Feature":return ui._isCircle(c)?mi.fromPositions(ui._getCirclePositions(c)):mi.fromData(c.geometry);case"GeometryCollection":return mi.fromData(c.geometries);case"Point":var l=c.coordinates;if(l&&2<=l.length)return[l[0],l[1],l[0],l[1]];break;case"LineString":case"MultiPoint":return mi.fromPositions(c.coordinates);case"Polygon":case"MultiLineString":var u=c.coordinates;if(u&&0<u.length){for(var p=0,h=u.length;p<h;p++)null!=(s=mi.fromPositions(u[p]))&&(n=null===n?s:mi.merge(n,s));if(null!=n)return n}break;case"MultiPolygon":var d=c.coordinates;if(d&&0<d.length){for(p=0,h=d.length;p<h;p++)for(var f=0,y=d[p].length;f<y;f++)null!=(s=mi.fromPositions(d[p][f]))&&(n=null===n?s:mi.merge(n,s));return n}}}return null},mi.splitOnAntimeridian=function(t){var e,o,n,r,i,s,a=[];return mi.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe(t)?[[-180,t[1],t[2],180,t[4],t[5]]]:mi.isBoundingBoxWithLessThanSixElementsLargerThanGlobe(t)?[[-180,t[1],180,t[3]]]:(mi.crossesAntimeridian(t)?(s=e=void 0,o=Nr(mi.getWest(t)),n=Nr(mi.getEast(t)),r=Fr(mi.getNorth(t)),i=Fr(mi.getSouth(t)),s=6<=t.length?(e=[o,i,t[2],180,r,t[5]],[-180,i,t[2],n,r,t[5]]):(e=[o,i,180,r],[-180,i,n,r]),a.push(e,s)):a.push(t),a)},mi.isBoundingBoxWithSixOrMoreElementsLargerThanGlobe=function(t){return 6<=t.length&&360<t[3]-t[0]},mi.isBoundingBoxWithLessThanSixElementsLargerThanGlobe=function(t){return t.length<6&&360<t[2]-t[0]},mi);function mi(t,e){var o,n=this;return t&&e?n=(o=t)[2]&&e[2]?di.call(this,o[0],o[1],o[2]||0,e[0],e[1],e[2]||0)||this:di.call(this,o[0],o[1],e[0],e[1])||this:!t||(t=t)&&(4===t.length?n=di.call(this,t[0],t[1],t[2],t[3])||this:6<=t.length&&(n=di.call(this,t[0],t[1],t[2],t[3],t[4],t[5])||this)),n}var gi=(vi.TYPE="FeatureCollection",vi);function vi(t,e){this.type="FeatureCollection",this.type=vi.TYPE,this.features=t,this.bbox=e}wi.TYPE="GeometryCollection",I=wi;function wi(t){this.type="GeometryCollection",this.type=wi.TYPE,this.geometries=t}_i.TYPE="LineString",dt=_i;function _i(t,e){this.type="LineString",this.type=_i.TYPE,this.coordinates=t,this.bbox=e}bi.TYPE="MultiLineString",Ot=bi;function bi(t,e){this.type="MultiLineString",this.type=bi.TYPE,this.coordinates=t,this.bbox=e}xi.TYPE="MultiPoint",wt=xi;function xi(t,e){this.type="MultiPoint",this.type=xi.TYPE,this.coordinates=t,this.bbox=e}Ci.TYPE="MultiPolygon",bt=Ci;function Ci(t,e){this.type="MultiPolygon",this.type=Ci.TYPE,this.coordinates=t,this.bbox=e}var Oi,Si,_t=window&&window.__extends||(Oi=function(t,e){return(Oi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Oi(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),_t=(Si=Array,_t(Pi,Si),Pi.fromPosition=function(t){return 2<=t.length?new Pi((180+t[0])/360,Pi._latToMercatorY(t[1]),3<=t.length?Pi._altitudeToMercatorZ(t[2],t[1]):0):[0,0,0]},Pi.fromPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.fromPosition(t[o]));return e},Pi.toFloat32Array=function(t){for(var e=new Float32Array(3*t.length),o=0,n=t.length;o<n;o++){var r=3*o,i=t[o];e[r]=(180+i[0])/360,e[1+r]=Pi._latToMercatorY(i[1]),e[2+r]=3<=i.length?Pi._altitudeToMercatorZ(i[2],i[1]):0}return e},Pi.toPosition=function(t){if(2<=t.length){var e=360/Math.PI*Math.atan(Math.exp((180-360*t[1])*Math.PI/180))-90;return new ni(360*t[0]-180,e,3<=t.length?Pi._mercatorZToAltitude(t[2],t[1]):0)}return[0,0,0]},Pi.toPositions=function(t){for(var e=[],o=0,n=t.length;o<n;o++)e.push(this.toPosition(t[o]));return e},Pi.mercatorScale=function(t){return 1/Math.cos(t*Math.PI/180)},Pi.meterInMercatorUnits=function(t){return 1/Pi.earthCircumference*Pi.mercatorScale(Pi._latToMercatorY(t))},Pi._circumferenceAtLatitude=function(t){return Pi.earthCircumference*Math.cos(t*Math.PI/180)},Pi._altitudeToMercatorZ=function(t,e){return t/Pi._circumferenceAtLatitude(e)},Pi._mercatorZToAltitude=function(t,e){return t*Pi._circumferenceAtLatitude(Pi._latToMercatorY(e))},Pi._latToMercatorY=function(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360},Pi.earthCircumference=2*Math.PI*Er(),Pi);function Pi(t,e,o){return Si.call(this,t,e,o||0)||this}var Li,dt=Object.freeze({__proto__:null,Feature:Vn,FeatureCollection:gi,LineString:dt,Point:Qn,Polygon:ii,Position:ni,BoundingBox:yi,MercatorPoint:_t,MultiLineString:Ot,MultiPoint:wt,MultiPolygon:bt,GeometryCollection:I}),ki=xt(function(t,e){function y(t,e){return t*t+e*e}function i(t,e){for(var o,n,r,i=t[0],s=[i],a=1,c=t.length;a<c;a++)o=t[a],r=i,y((n=o)[0]-r[0],n[1]-r[1])>e&&(s.push(o),i=o);return i!==o&&s.push(o),s}function m(t,e,o,n,r){for(var i,s,a,c,l,u,p,h=n,d=e+1;d<o;d++){var f=(s=t[d],a=t[e],c=t[o],p=u=f=l=void 0,l=a[0],f=a[1],u=c[0]-l,p=c[1]-f,0==u&&0==p||(1<(a=((s[0]-l)*u+(s[1]-f)*p)/y(u,p))?(l=c[0],f=c[1]):0<a&&(l+=u*a,f+=p*a)),y(s[0]-l,s[1]-f));h<f&&(i=d,h=f)}n<h&&(1<i-e&&m(t,e,i,n,r),r.push(t[i]),1<o-i&&m(t,i,o,n,r))}e.__esModule=!0,e.SimplifyAP=function(t,e,o){if(t.length<=2)return t;var n,r=(e=void 0===e?1:e)*e;return t=(o=void 0===o?!1:o)?t:i(t,r),e=(n=t).length-1,o=[n[0]],m(n,0,e,r,o),o.push(n[e]),t=o}});(Li=ki)&&Li.__esModule&&Object.prototype.hasOwnProperty.call(Li,"default")&&Li.default;var Mi=ki.SimplifyAP;var Ei=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ai=(ji.prototype.toTarget=function(t,e){return this.transformArray(t,this.M,e)},ji.prototype.toSource=function(t,e){return this.transformArray(t,this.inverseM,e)},ji.prototype.transformArray=function(t,e,o){var n,r;if(t&&Array.isArray(t)&&Array.isArray(t[0])){var i=[];try{for(var s=Ei(t),a=s.next();!a.done;a=s.next()){var c=a.value;i.push(this.transform(c,e,o))}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i}return null},ji.prototype.transform=function(t,e,o){var n=t[0]*e[0][3]+t[1]*e[1][3]+e[2][3],e=t[0]*e[0][4]+t[1]*e[1][4]+e[2][4];return"number"==typeof o&&0<=o?[Pr(n,o),Pr(e,o)]:[Pr(n,6),Pr(e,6)]},ji._calculateAffineTransform=function(t,e){if(t.length!==e.length||t.length<1)throw new Error("Error: source and target arrays must have the same length.");var o=Math.min(t[0].length,e[0].length),n=o+1;if(t.length<o)throw new Error("Erorr: At least "+o+" reference points required.");for(var r=[],i=[],s=0;s<n;s++){i[s]=[];for(var a=0;a<n;a++){a<o&&(r[a]=0);for(var c=i[s][a]=0;c<t.length;c++)a<o&&(r[a]+=s<o?t[c][s]*e[c][a]:e[c][a]),i[s][a]+=o<=s&&o<=a?1:o<=s?t[c][a]:o<=a?t[c][s]:t[c][s]*t[c][a]}i[s]=i[s].concat(r)}if(!this._gaussJordanElimination(i))throw new Error("Error: Singular matrix. Points are likely coplanar.");return i},ji._gaussJordanElimination=function(t){for(var e,o=t.length,n=2*o-1,r=0;r<o;r++){for(var i=r,s=r+1;s<o;s++)Math.abs(t[s][r])>Math.abs(t[i][r])&&(i=s);if(e=t[i],t[i]=t[r],t[r]=e,Math.abs(t[r][r])<=1e-12)return!1;for(var a=r+1;a<o;a++)for(var c=t[a][r]/t[r][r],l=r;l<n;l++)t[a][l]-=t[r][l]*c}for(r=o-1;-1<r;r--){c=t[r][r];for(s=0;s<r;s++)for(var u=n-1;r-1<u;u--)t[s][u]-=t[r][u]*t[s][r]/c;t[r][r]/=c;for(var p=o;p<n;p++)t[r][p]/=c}return!0},ji);function ji(t,e){this.M=ji._calculateAffineTransform(t,e),this.inverseM=ji._calculateAffineTransform(e,t)}var Ti,Ii,_t=Object.freeze({__proto__:null,AffineTransform:Ai,WEBMERCATOR_MAXLAT:hr,_precision:Pr,get AreaUnits(){return er},get DistanceUnits(){return or},get TimeUnits(){return nr},get SpeedUnits(){return rr},get AccelerationUnits(){return ir},boundingBoxToPolygon:function(t){var e=Nr(yi.getWest(t)),o=Nr(yi.getEast(t)),n=Fr(yi.getNorth(t)),r=Fr(yi.getSouth(t)),t=yi.getCenter(t),n=[[e,n],[e,r],[t[0],r],[o,r],[o,n],[t[0],n],[e,n]];return new ii([n])},convertDistance:Lr,getCardinalSpline:function(t,e,o,n){if(!t||t.length<=2)return i;"number"!=typeof e&&(e=.5),("number"!=typeof o||o<=0)&&(o=15);var r=t.length,i=t.slice(0);n?(ni.areEqual(i[0],i[r-1])&&(i.pop(),r--),i.unshift(t[r-1]),i.push(t[0]),i.push(t[1]),r++):(i.unshift(t[0]),i.push(t[r-1]));var s,a,c,l=[];l.push([1,0,0,0]);for(var u=1;u<o-1;u++)l.push([2*(c=(s=u/o)*(a=s*s))-3*a+1,-2*c+3*a,c-2*a+s,c-a]);l.push([0,1,0,0]);for(var p,h,d,f,y,m,g=[],u=1;u<r;u++)for(p=e*(i[u+1][0]-i[u-1][0]),h=e*(i[u+1][1]-i[u-1][1]),d=e*(i[u+2][0]-i[u][0]),f=e*(i[u+2][1]-i[u][1]),s=0;s<o;s++)m=(y=l[s])[0]*i[u][0]+y[1]*i[u+1][0]+y[2]*p+y[3]*d,y=yr(y[0]*i[u][1]+y[1]*i[u+1][1]+y[2]*h+y[3]*f,-85,85),g.push([m,y]);return g},getDestination:kr,getDistanceTo:Mr,getEarthRadius:Er,getPathDenormalizedAtAntimerian:jr,getPathSplitByAntimeridian:Tr,getGeodesicPath:function(t,e){var o;(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var n=o.length-1,r=[],i=0;i<n;i++)r=r.concat(Ar(o[i],o[i+1],e));return jr(r)},getGeodesicPaths:function(t,e){var o;(!e||e<=0)&&(e=15),Array.isArray(t)?o=t:t.type&&"LineString"===t.type&&(o=t.coordinates);for(var n=o.length-1,r=[],i=[],s=0;s<n;s++)for(var a,c,l,u,p,h=Ar(o[s],o[s+1],e),d=0;d<h.length;d++)r.push(h[d]),d+1>=h.length||(a=(l=sr(h[d],2))[0],c=l[1],p=(u=sr(h[d+1],2))[0],l=u[1],180<Math.abs(p-a)&&(u=0<a?180:-180,p=Math.abs((0<a?p+360:p-360)-a),p=c+(l-c)*(Math.abs(u-a)/p),r.push([u,p]),i.push(r),r=[[-u,p]]));return i.push(r),i},getHeading:Ir,getLengthOfPath:zr,getPositionAlongPath:Dr,getRegularPolygonPath:Br,getRegularPolygonPaths:function(t,e,o,n,r){return Tr(Rr(t,e,o,n,r))},interpolate:function(t,e,o){o=void 0===o?.5:o;var n=Mr(t=Qr(t),e=Qr(e),"kilometers");return kr(t,Ir(t,e),n*o,"kilometers")},normalizeLatitude:Fr,normalizeLongitude:Nr,rotatePositions:Zr,getPixelHeading:function(t,e){t=Qr(t),e=Qr(e);var t=(o=sr(Hr([t,e],21),2))[0],o=(e=o[1])[0]-t[0],e=t[1]-e[1];return(2.5*Math.PI-Math.atan2(e,o))*ur%360},mercatorPixelsToPositions:qr,mercatorPositionsToPixels:Hr,convertAcceleration:Ur,convertArea:Gr,convertSpeed:Wr,convertTimespan:Vr,getAcceleration:Kr,getAccelerationFromSpeeds:Yr,getAccelerationFromFeatures:function(t,e,o,n,r,i,s){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){var a=Jr(t.properties[o],e.properties[o],nr.seconds);if(!isNaN(a)){var c=0;if(n&&"string"==typeof n){o=t.properties[n],n=e.properties[n];if("number"==typeof o&&(c=o,"number"==typeof n))return Yr(o,n,a,r,nr.seconds,i,s)}return Kr(c,Mr(t.geometry.coordinates,e.geometry.coordinates,or.meters),a,r,or.meters,nr.seconds,i,s)}}return NaN},getArea:function t(e,o,n){if(e){var r=0;switch((e=e instanceof ui?e.toJson():e).type){case"Feature":var i=e;if(e.geometry)return t(i.geometry,o,n);break;case"Polygon":(i=e).coordinates&&(r=xr(i.coordinates));break;case"MultiPolygon":var s=e;if(s.coordinates)for(var a=0,c=s.coordinates.length;a<c;a++)r+=xr(s.coordinates[a])}return Gr(r,er.squareMeters,o,n)}return 0},getSpeed:function(t,e,o,n,r,i){if(t=Qr(t),e=Qr(e),t&&e){n=Vr(o,n,nr.seconds);return Wr(Mr(t,e,or.meters)/n,rr.metersPerSecond,r,i)}return 0},getSpeedFromFeatures:function(t,e,o,n,r){if("string"==typeof o&&"Feature"===t.type&&"Point"===t.geometry.type&&"Feature"===e.type&&"Point"===e.geometry.type){o=this.getTimespan(t.properties[o],e.properties[o],nr.seconds);if(!isNaN(o)){e=this.getDistanceTo(t.geometry.coordinates,e.geometry.coordinates,or.meters);return this.convertSpeed(e/o,rr.metersPerSecond,n,r)}}return NaN},getTimespan:Jr,getTravelDistance:function(t,e,o,n,r,i,s,a){return e=this.convertTimespan(e,r,nr.seconds),o=(o=this.convertSpeed(o,i,rr.metersPerSecond))*e,"number"==typeof n&&(o+=.5*this.convertAcceleration(n,s,ir.metersPerSecondSquared)*e*e),this.convertDistance(o,or.meters,t,a)},parseTimestamp:$r,getConvexHull:function(t){var e,o,n=Xr(t).map(function(t){return[Nr(t[0]),Fr(t[1])]});n.sort(function(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]});var r=[];try{for(var i=ar(n),s=i.next();!s.done;s=i.next()){for(var a=s.value;2<=r.length&&Or(r[r.length-2],r[r.length-1],a)<=0;)r.pop();r.push(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(o=i.return)&&o.call(i)}finally{if(e)throw e.error}}for(var c=[],l=n.length-1;0<=l;l--){for(;2<=c.length&&Or(c[c.length-2],c[c.length-1],n[l])<=0;)c.pop();c.push(n[l])}return new ii([r.concat(c)])},getPositions:Xr,getPosition:Qr,getPositionsAlongPath:function(t,e){if(e<2)return[];for(var o=[],n=zr(t,or.meters)/(e-1),r=0;r<e;r++){var i=Dr(t,n*r,or.meters);null!=i&&o.push(i)}return o},getPointWithHeadingAlongPath:ti,getPointsWithHeadingsAlongPath:function(t,e){if(e<=0)return[];for(var o=[],n=zr(t,or.meters)/(e-1),r=0;r<e;r++){var i=ti(t,n*r,or.meters);null!=i&&o.push(i)}return o},getClosestPointOnGeometry:function t(e,o,n,r){var i=Qr(e),s=Hr([i],22)[0],a=null,c=1/0;switch((o=o instanceof ui?o.toJson():o).type){case"Feature":return t(e,o.geometry,n);case"Point":f=[[o.coordinates]];break;case"MultiPoint":for(var l,u=o.coordinates,p=0,h=u.length;p<h;p++)(l=Mr(i,u[p]))<c&&(c=l,a=new Vn(new Qn(u[p]),{distance:l}));break;case"LineString":f=[o.coordinates];break;case"Polygon":case"MultiLineString":f=o.coordinates;break;case"MultiPolygon":var d=o.coordinates;if(0<d.length)for(var f=d[0],p=1,h=d.length;p<h;p++)f=f.concat(d[p])}if(f)for(var y,p=0,h=f.length;p<h;p++)(y=Sr(i,s,f[p]))&&y.properties.distance<c&&(c=y.properties.distance,a=y);return a&&(a.properties.distance=Lr(a.properties.distance,"meters",n,r)),a},simplify:function(t,e){return Mi(t,e,!0)}}),zi=((window&&window.__extends||(Ti=function(t,e){return(Ti=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ti(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Di,Ii=v),Di);function Di(){var t=null!==Ii&&Ii.apply(this,arguments)||this;return t.zoomDelta=1,t.style=u.ControlStyle.light,t}var Ri,Bi,Ot=((window&&window.__extends||(Ri=function(t,e){return(Ri=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ri(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Fi,Bi=W),Fi.prototype.onAdd=function(t){this.container=this.buildContainer(t,this.options.style,"Zoom Control"),this.container.style.flexDirection="column",this.zoomInButton=this.constructZoomInButton(t),this.zoomOutButton=this.constructZoomOutButton(t);var e=A("Zoom In"),o=A("Zoom Out");return this.container.appendChild(this.zoomInButton),this.container.appendChild(e),this.container.appendChild(this.zoomOutButton),this.container.appendChild(o),j(e,this.zoomInButton),j(o,this.zoomOutButton),t.events.add("zoom",this.zoomChanged),t.events.add("minzoomchanged",this.minZoomChanged),t.events.add("maxzoomchanged",this.maxZoomChanged),this.map=t,this.container},Fi.prototype.onRemove=function(){Bi.prototype.onRemove.call(this),this.map&&(this.map.events.remove("zoom",this.zoomChanged),this.map.events.remove("minzoomchanged",this.minZoomChanged),this.map.events.remove("maxzoomchanged",this.maxZoomChanged),this.map=null),this.container&&(this.container.remove(),this.container=null,this.zoomInButton=null,this.zoomOutButton=null)},Fi.prototype.updateZoomButtonsState=function(){var t=this.map.getCamera().zoom>=this.map._getMap().getMaxZoom(),e=yi.getSouth(this.map.getCamera().bounds)<=-hr&&yi.getNorth(this.map.getCamera().bounds)>=hr,e=this.map.getCamera().zoom<=this.map._getMap().getMinZoom()||e;this.zoomInButton&&this.zoomInButton.disabled!=t&&(this.zoomInButton.disabled=t,this.zoomInButton.setAttribute("aria-label",t?"Zoom In disabled":"Zoom In")),this.zoomOutButton&&this.zoomOutButton.disabled!=e&&(this.zoomOutButton.disabled=e,this.zoomInButton.setAttribute("aria-label",t?"Zoom Out disabled":"Zoom Out"))},Fi.prototype.constructZoomInButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("zoom-in"),o.setAttribute("aria-label","Zoom In"),o.setAttribute("alt","Zoom In"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom+e.options.zoomDelta,duration:Fi.ZOOM_DURATION_MS,type:"ease"},!0)}),o},Fi.prototype.constructZoomOutButton=function(t){var e=this,o=document.createElement("button");return o.classList.add("azure-maps-control-button"),o.classList.add("zoom-out"),o.setAttribute("aria-label","Zoom Out"),o.setAttribute("alt","Zoom Out"),o.setAttribute("type","button"),o.addEventListener("click",function(){t.setCamera({zoom:t.getCamera().zoom-e.options.zoomDelta,duration:Fi.ZOOM_DURATION_MS,type:"ease"},!0)}),o},Fi.ZOOM_DURATION_MS=200,Fi);function Fi(t){var e=Bi.call(this)||this;return e.container=null,e.zoomInButton=null,e.zoomOutButton=null,e.zoomChanged=function(t){return e.updateZoomButtonsState()},e.minZoomChanged=function(t){return e.updateZoomButtonsState()},e.maxZoomChanged=function(t){return e.updateZoomButtonsState()},e.options=(new zi).merge(t),e}wt=Object.freeze({__proto__:null,ControlBase:W,PitchControl:ct,CompassControl:tt,ZoomControl:Ot,StyleControl:x,TrafficControl:_n,TrafficLegendControl:ft});var Ni,Zi,qi=function(t,e){return Eo(t,5,e="function"==typeof e?e:void 0)},Hi=((window&&window.__extends||(Ni=function(t,e){return(Ni=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ni(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ui,Zi=v),Ui);function Ui(){var t=null!==Zi&&Zi.apply(this,arguments)||this;return t.buffer=128,t.maxZoom=18,t.cluster=!1,t.clusterRadius=50,t.clusterMaxZoom=void 0,t.clusterProperties=void 0,t.lineMetrics=!1,t.tolerance=.375,t}var Gi,Wi,Vi=((window&&window.__extends||(Gi=function(t,e){return(Gi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Gi(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ki,Wi=Z),Ki.prototype.getId=function(){return this.id},Ki.prototype._setMap=function(t){var e;null==t||void 0===t?(e=this.map,delete this.map,this._invokeEvent("sourceremoved",this),e&&e.events.invoke("sourceremoved",this)):(this.map=t,this._invokeEvent("sourceadded",this),this.map.events.invoke("sourceadded",this))},Ki);function Ki(t){var e=Wi.call(this)||this;return e.id=t||Wn(),e}var Yi,Ji,bt=window&&window.__extends||(Yi=function(t,e){return(Yi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Yi(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),$i=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Xi=(bt(Qi,Ji=Vi),Qi.prototype.add=function(t,e){this._addNoUpdate(t,e),this._updateSource()},Qi.prototype.clear=function(){this._clearNoUpdate(),this._updateSource()},Qi.prototype.dispose=function(){this.options=null,this.shapes=null,this.shapesMap=null,this.map=null},Qi.prototype.getClusterExpansionZoom=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterExpansionZoom(e,function(t,e){t?n(t):"number"==typeof e&&o(e)}):n("The DataSource hasn't been added to a map.")})},Qi.prototype.getClusterChildren=function(e){var r=this;return new Promise(function(o,n){var t;r.map?(t=r.map._getMap().getSource(r.getId()))&&"geojson"===t.type&&t.getClusterChildren(e,function(t,e){t?n(t):e&&o(r.map.sources._mapFeaturesToShapes(e,!1,r))}):n("The DataSource hasn't been added to a map.")})},Qi.prototype.getClusterLeaves=function(e,r,i){var s=this;return new Promise(function(o,n){var t;s.map?(t=s.map._getMap().getSource(s.getId()))&&"geojson"===t.type&&t.getClusterLeaves(e,r,i,function(t,e){t?n(t):e&&o(s.map.sources._mapFeaturesToShapes(e,!1,s))}):n("The DataSource hasn't been added to a map.")})},Qi.prototype.getOptions=function(){return Ao(this.options)},Qi.prototype.getShapes=function(){return Array.from(this.shapes)},Qi.prototype.importDataFromUrl=function(t){var e=this;return fetch(t,{method:"GET",mode:"cors"}).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText)}).then(function(t){e.add(t)})},Qi.prototype.getShapeById=function(t){return this.shapes[this.shapesMap.get(t)]||null},Qi.prototype.remove=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=$i(t),r=n.next();!r.done;r=n.next()){var i=r.value;"number"==typeof i?this._removeByIndex(i):this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},Qi.prototype.removeById=function(t){var e,o,t=Array.isArray(t)?t:[t];try{for(var n=$i(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeById(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}this._updateSource()},Qi.prototype.setOptions=function(t){t=(new Hi).merge(this.options,Ao(t));Un(this.options,t)||(this._invokeEvent("datasourceupdated",this),this.options=t,this.map&&this.map._rebuildStyle())},Qi.prototype.setShapes=function(t){this._clearNoUpdate(),this.add(t)},Qi.prototype.toJson=function(){return new gi(this.shapes.map(function(t){return t.toJson()}))},Qi.prototype._toJson=function(){return new gi(this.shapes.map(function(t){return t._toJson()}))},Qi.prototype._buildSource=function(){var t={type:"geojson",data:this._toJson(),maxzoom:this.options.maxZoom,cluster:this.options.cluster,clusterRadius:this.options.clusterRadius,tolerance:this.options.tolerance,lineMetrics:this.options.lineMetrics,clusterProperties:this.options.clusterProperties,buffer:this.options.buffer};return"number"==typeof this.options.clusterMaxZoom&&(t.clusterMaxZoom=this.options.clusterMaxZoom),t},Qi.prototype._addNoUpdate=function(t,e){var o;t instanceof ui?(this._addToSources(t,e),o=[t]):Array.isArray(t)?(o=t.map(function(t){return t instanceof ui?t:new ui(t)}),this._addToSources(o,e)):"FeatureCollection"===t.type?(o=t.features.map(function(t){return new ui(t)}),this._addToSources(o,e)):"GeometryCollection"===t.type?(o=t.geometries.map(function(t){return new ui(t)}),this._addToSources(o,e)):(t=new ui(t),this._addToSources(t,e),o=[t]),this._invokeEvent("dataadded",o)},Qi.prototype._clearNoUpdate=function(){var t=this.shapes;this.shapes=[],this.shapesMap=new N,t&&0<t.length&&this._invokeEvent("dataremoved",t)},Qi.prototype._updateSource=function(){var t=this;void 0!==this.requestId||(this.requestId=requestAnimationFrame(function(){t._updateMboxSource(),t.requestId=void 0}))},Qi.prototype._addToSources=function(t,e){var o,n,r,i;if(t=Array.isArray(t)?t:[t],"number"!=typeof e)try{for(var s=$i(t),a=s.next();!a.done;a=s.next()){var c=a.value;this.shapes.push(c),this.shapesMap.set(c.getId(),this.shapes.length-1)}}catch(t){o={error:t}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(o)throw o.error}}else for(var l=t.length-1;0<=l;l--)this.shapes.splice(e,0,t[l]),this._updateShapesMap(e);try{for(var u=$i(t),p=u.next();!p.done;p=u.next())(c=p.value)._setDataSource(this)}catch(t){r={error:t}}finally{try{p&&!p.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}},Qi.prototype._removeById=function(t){var e=t instanceof ui?t.getId():"string"==typeof t||"number"==typeof t?t:t.id,t=this.shapes[this.shapesMap.get(e)];t&&(t._setDataSource(null),this.shapes.splice(this.shapesMap.get(e),1),this._updateShapesMap(this.shapesMap.get(e)),this.shapesMap.delete(e),this._invokeEvent("dataremoved",[t]))},Qi.prototype._removeByIndex=function(t){var e;if(t>=this.shapes.length)throw new Error("The specified remove index '"+t+"' is greater than the maximum possible index '"+(this.shapes.length-1)+"'");e=this.shapes[t],this.shapesMap.delete(e.getId()),e._setDataSource(null),this.shapes.splice(t,1),this._updateShapesMap(t),this._invokeEvent("dataremoved",[e])},Qi.prototype._updateShapesMap=function(t){for(var e=t;e<this.shapes.length;e++)this.shapesMap.set(this.shapes[e].getId(),e)},Qi.prototype._updateMboxSource=function(){var t;this.map&&this.map._getMap()&&((t=this.map._getMap().getSource(this.getId()))&&"geojson"===t.type&&t.setData(this._toJson()))},Qi);function Qi(t,e){t=Ji.call(this,t)||this;return t.requestId=void 0,t.options=(new Hi).merge(Ao(e)),t.shapes=[],t.shapesMap=new N,t}var ts,es,os=((window&&window.__extends||(ts=function(t,e){return(ts=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ts(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ns,es=v),ns);function ns(){var t=null!==es&&es.apply(this,arguments)||this;return t.bounds=void 0,t.minZoom=0,t.maxZoom=22,t.isTMS=!1,t.tiles=void 0,t.url=void 0,t}var rs,is,I=((window&&window.__extends||(rs=function(t,e){return(rs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}rs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ss,is=Vi),ss.prototype.getOptions=function(){return Ao(this.options)},ss.prototype.getShape=function(t,e){return this.map._getMap().querySourceFeatures(this.getId(),{sourceLayer:t,filter:e})},ss.prototype._buildSource=function(){var t={type:"vector"};return this.options.bounds&&(t.bounds=this.options.bounds),this.options.tiles?(t.tiles=this.options.tiles,t.minzoom=this.options.minZoom,t.maxzoom=this.options.maxZoom):this.options.url&&(t.url=this.options.url),this.options.isTMS&&(t.scheme="tms"),t},ss);function ss(t,e){t=is.call(this,t)||this;return t.options=(new os).merge(Ao(e)),t}var as,cs,ct=Object.freeze({__proto__:null,Source:Vi,DataSource:Xi,VectorTileSource:I}),ls=((window&&window.__extends||(as=function(t,e){return(as=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}as(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(us,cs=Z),us.prototype.getId=function(){return this.id},us.prototype.getMap=function(){return this.map||null},us.prototype.onAdd=function(t){this.map=t,this._invokeEvent("layeradded",this),this.map.events.invoke("layeradded",this)},us.prototype.onRemove=function(){var t=this.map;delete this.map,this._invokeEvent("layerremoved",this),t&&t.events.invoke("layerremoved",this)},us._isMBoxEvent=function(t){return!this.LayerEvents.hasOwnProperty(t)},us.prototype._updateBaseProperties=function(t,e){this._updateFilter(t.filter,e.filter),this._updateZoomRange(t.minZoom,e.minZoom,t.maxZoom,e.maxZoom),this._updateLayoutProperty("visibility",t.visible,e.visible,t.visible?"visible":"none")},us.prototype._updateFilter=function(t,e){Un(t,e)||this.map._getMap().setFilter(this.id,t)},us.prototype._updatePaintProperty=function(t,e,o,n){Un(e,o)||this.map._getMap().setPaintProperty(this.id,t,n||e)},us.prototype._updateLayoutProperty=function(t,e,o,n){Un(e,o)||this.map._getMap().setLayoutProperty(this.id,t,n||e)},us.prototype._updateZoomRange=function(t,e,o,n){t===e&&n===o||this.map._getMap().setLayerZoomRange(this.id,t,o)},us.LayerEvents={layeradded:void 0,layerremoved:void 0},us);function us(t){var e=cs.call(this)||this;return e.id=t||Wn(),e}var ps,hs,tt=((window&&window.__extends||(ps=function(t,e){return(ps=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ps(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ds,hs=v),ds._cloneCustomizer=function(t){if(t instanceof Vi)return t},ds);function ds(){var t=null!==hs&&hs.apply(this,arguments)||this;return t.filter=void 0,t.minZoom=0,t.maxZoom=24,t.visible=!0,t}var fs,ys,ms=((window&&window.__extends||(fs=function(t,e){return(fs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}fs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(gs,ys=tt),gs);function gs(){var t=null!==ys&&ys.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color="#1A73AA",t.blur=0,t.opacity=1,t.strokeColor="#FFFFFF",t.strokeOpacity=1,t.strokeWidth=2,t.pitchAlignment="viewport",t.radius=8,t}var vs,ws,_s=((window&&window.__extends||(vs=function(t,e){return(vs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}vs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(bs,ws=ls),bs.prototype.getOptions=function(){return qi(this.options,ms._cloneCustomizer)},bs.prototype.getSource=function(){return this.options.source},bs.prototype.setOptions=function(t){t=(new ms).merge(this.options,qi(t,ms._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("circle-blur",t.blur,this.options.blur),this._updatePaintProperty("circle-color",t.color,this.options.color),this._updatePaintProperty("circle-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("circle-radius",t.radius,this.options.radius),this._updatePaintProperty("circle-stroke-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("circle-stroke-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("circle-stroke-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("circle-pitch-alignment",t.pitchAlignment,this.options.pitchAlignment)}this.options=t},bs.prototype._buildLayers=function(){var t={id:this.id,type:"circle",source:this.options.source instanceof Vi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"circle-color":this.options.color,"circle-blur":this.options.blur,"circle-opacity":this.options.opacity,"circle-stroke-color":this.options.strokeColor,"circle-stroke-opacity":this.options.strokeOpacity,"circle-stroke-width":this.options.strokeWidth,"circle-pitch-alignment":this.options.pitchAlignment,"circle-radius":this.options.radius},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},bs.prototype._getLayerIds=function(){return[this.id]},bs.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Vi?t.add(this.options.source.getId()):t.add(this.options.source),t},bs);function bs(t,e,o){e=ws.call(this,e)||this;return e.options=(new ms).merge(qi(o,ms._cloneCustomizer)),e.options.source=t||e.options.source,e}var xs,Cs,Os=((window&&window.__extends||(xs=function(t,e){return(xs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}xs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ss,Cs=tt),Ss._cloneCustomizer=function(t){if(t instanceof Vi)return t},Ss);function Ss(){var t=null!==Cs&&Cs.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.color=["interpolate",["linear"],["heatmap-density"],0,"rgba(0,0, 255,0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],t.intensity=1,t.opacity=1,t.radius=30,t.weight=1,t}var Ps,Ls,Ot=((window&&window.__extends||(Ps=function(t,e){return(Ps=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ps(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ks,Ls=ls),ks.prototype.getOptions=function(){return qi(this.options,Os._cloneCustomizer)},ks.prototype.getSource=function(){return this.options.source},ks.prototype.setOptions=function(t){t=(new Os).merge(this.options,qi(t,Os._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("heatmap-color",t.color,this.options.color),this._updatePaintProperty("heatmap-intensity",t.intensity,this.options.intensity),this._updatePaintProperty("heatmap-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("heatmap-radius",t.radius,this.options.radius),this._updatePaintProperty("heatmap-weight",t.weight,this.options.weight)}this.options=t},ks.prototype._buildLayers=function(){var t={id:this.id,type:"heatmap",source:this.options.source instanceof Vi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"heatmap-color":this.options.color,"heatmap-intensity":this.options.intensity,"heatmap-opacity":this.options.opacity,"heatmap-radius":this.options.radius,"heatmap-weight":this.options.weight},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),[t]},ks.prototype._getLayerIds=function(){return[this.id]},ks.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Vi?t.add(this.options.source.getId()):t.add(this.options.source),t},ks);function ks(t,e,o){e=Ls.call(this,e)||this;return e.options=(new Os).merge(qi(o,Os._cloneCustomizer)),e.options.source=t||e.options.source,e}var Ms,Es,x=((window&&window.__extends||(Ms=function(t,e){return(Ms=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ms(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(As,Es=tt),As);function As(){var t=null!==Es&&Es.apply(this,arguments)||this;return t.contrast=0,t.fadeDuration=300,t.hueRotation=0,t.maxBrightness=1,t.minBrightness=0,t.opacity=1,t.saturation=0,t}var js,Ts,Is=((window&&window.__extends||(js=function(t,e){return(js=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}js(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(zs,Ts=x),zs._cloneCustomizer=function(t){if(t instanceof Vi)return t},zs);function zs(){var t=null!==Ts&&Ts.apply(this,arguments)||this;return t.url=void 0,t.coordinates=void 0,t}var Ds,Rs,Bs=((window&&window.__extends||(Ds=function(t,e){return(Ds=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ds(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Fs,Rs=ls),Fs.prototype._getSourceIds=function(){var t=new Set;return t.add(this._getSourceId()),t},Fs);function Fs(){return null!==Rs&&Rs.apply(this,arguments)||this}var Ns,Zs,ft=((window&&window.__extends||(Ns=function(t,e){return(Ns=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ns(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(qs,Zs=Bs),qs.prototype.getOptions=function(){return qi(this.options,Is._cloneCustomizer)},qs.prototype.setOptions=function(t){var e=(new Is).merge(this.options,qi(t,Is._cloneCustomizer)),o="string"==typeof t.url&&t.url!==this.getOptions().url,n=void 0!==t.coordinates&&t.coordinates!==this.getOptions().coordinates;this.map&&(this._updateBaseProperties(e,this.options),this._updatePaintProperty("raster-contrast",e.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",e.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",e.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",e.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",e.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",e.saturation,this.options.saturation),(t=this.map._getMap().getSource(this._getSourceId()))&&t.updateImage(e)),this.options=e,o?this.reloadImage():n&&this.updateTransform()},qs.prototype.getPositions=function(e){return this.transform.then(function(t){return t.toTarget(e)})},qs.prototype.getPixels=function(e){return this.transform.then(function(t){return t.toSource(e)})},qs.getCoordinatesFromRefPoints=function(t,e,o,n){return new Ai(o,n).toTarget([[0,0],[t,0],[t,e],[0,e]])},qs.getCoordinatesFromEdges=function(t,e,o,n,r){"number"!=typeof r&&(r=0);o=[Math.min(n,o),e,Math.max(n,o),t],t=yi.getCenter(o);return Zr([yi.getNorthWest(o),yi.getNorthEast(o),yi.getSouthEast(o),yi.getSouthWest(o)],t,r)},qs.prototype._buildLayers=function(){var t={id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-opacity":this.options.opacity,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-min":this.options.minBrightness,"raster-brightness-max":this.options.maxBrightness,"raster-saturation":this.options.saturation,"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),[t]},qs.prototype._getLayerIds=function(){return[this.id]},qs.prototype._buildSource=function(){return{type:"image",url:this.options.url,coordinates:this.options.coordinates}},qs.prototype._getSourceId=function(){return this.getId()+"-ImageSource"},qs.prototype.reloadImage=function(){var o=this;this.options.url&&(this.transform=new Promise(function(e,t){o.img.onload=function(){var t=[[0,0],[o.img.width,0],[o.img.width,o.img.height],[0,o.img.height]];e(new Ai(t,o.options.coordinates)),o.isLoading=!1},o.img.onerror=o.img.onabort=function(){t("Failed to load image")},o.isLoading=!0,o.img.src=o.options.url}))},qs.prototype.updateTransform=function(){var t;this.isLoading||(t=[[0,0],[this.img.width,0],[this.img.width,this.img.height],[0,this.img.height]],this.transform=Promise.resolve(new Ai(t,this.options.coordinates)))},qs);function qs(t,e){e=Zs.call(this,e)||this;return e.isLoading=!1,e.options=(new Is).merge(qi(t,Is._cloneCustomizer)),e.img=new Image,e.reloadImage(),e}var Hs,Us,Gs=((window&&window.__extends||(Hs=function(t,e){return(Hs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Hs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ws,Us=tt),Ws);function Ws(){var t=null!==Us&&Us.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.lineCap="round",t.lineJoin="round",t.blur=0,t.strokeColor="#1E90FF",t.strokeDashArray=void 0,t.strokeGradient=void 0,t.offset=0,t.strokeOpacity=1,t.translate=new $n(0,0),t.translateAnchor="map",t.strokeWidth=2,t}var Vs,Ks,bt=window&&window.__extends||(Vs=function(t,e){return(Vs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Vs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Ys=window&&window.__assign||function(){return(Ys=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Js=(bt($s,Ks=ls),$s.prototype.getOptions=function(){return qi(this.options,Gs._cloneCustomizer)},$s.prototype.getSource=function(){return this.options.source},$s.prototype.setOptions=function(t){t=(new Gs).merge(this.options,qi(t,Gs._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("line-blur",t.blur,this.options.blur),this._updateLayoutProperty("line-cap",t.lineCap,this.options.lineCap),this._updateLayoutProperty("line-join",t.lineJoin,this.options.lineJoin),this._updatePaintProperty("line-offset",t.offset,this.options.offset),this._updatePaintProperty("line-color",t.strokeColor,this.options.strokeColor),this._updatePaintProperty("line-dasharray",t.strokeDashArray,this.options.strokeDashArray),this._updatePaintProperty("line-gradient",t.strokeGradient,this.options.strokeGradient),this._updatePaintProperty("line-opacity",t.strokeOpacity,this.options.strokeOpacity),this._updatePaintProperty("line-width",t.strokeWidth,this.options.strokeWidth),this._updatePaintProperty("line-translate",t.translate,this.options.translate),this._updatePaintProperty("line-translate-anchor",t.translateAnchor,this.options.translateAnchor)}this.options=t},$s.prototype._buildLayers=function(){return[Ys(Ys(Ys(Ys({id:this.id,type:"line"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Vi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none","line-cap":this.options.lineCap,"line-join":this.options.lineJoin},paint:Ys(Ys(Ys({"line-blur":this.options.blur,"line-color":this.options.strokeColor},this.options.strokeDashArray&&{"line-dasharray":this.options.strokeDashArray}),this.options.strokeGradient&&{"line-gradient":this.options.strokeGradient}),{"line-offset":this.options.offset,"line-opacity":this.options.strokeOpacity,"line-translate":this.options.translate,"line-translate-anchor":this.options.translateAnchor,"line-width":this.options.strokeWidth})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},$s.prototype._getLayerIds=function(){return[this.id]},$s.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Vi?t.add(this.options.source.getId()):t.add(this.options.source),t},$s);function $s(t,e,o){e=Ks.call(this,e)||this;return e.options=(new Gs).merge(qi(o,Gs._cloneCustomizer)),e.options.source=t||e.options.source,e}var Xs,Qs,ta=((window&&window.__extends||(Xs=function(t,e){return(Xs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Xs(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ea,Qs=tt),ea);function ea(){var t=null!==Qs&&Qs.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.base=0,t.fillColor="#1E90FF",t.height=0,t.fillOpacity=1,t.fillPattern=void 0,t.translate=new $n(0,0),t.translateAnchor="map",t.verticalGradient=!0,t}var oa,na,I=window&&window.__extends||(oa=function(t,e){return(oa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}oa(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ra=window&&window.__assign||function(){return(ra=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},bt=(I(ia,na=ls),ia.prototype.getOptions=function(){return qi(this.options,ta._cloneCustomizer)},ia.prototype.getSource=function(){return this.options.source},ia.prototype.setOptions=function(t){t=(new ta).merge(this.options,qi(t,ta._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-extrusion-base",t.base,this.options.base),this._updatePaintProperty("fill-extrusion-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-extrusion-height",t.height,this.options.height),this._updatePaintProperty("fill-extrusion-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-extrusion-pattern",t.fillPattern,this.options.fillPattern),this._updatePaintProperty("fill-extrusion-translate",t.translate,this.options.translate),this._updatePaintProperty("fill-extrusion-translate-anchor",t.translateAnchor,this.options.translateAnchor),this._updatePaintProperty("fill-extrusion-vertical-gradient",t.verticalGradient,this.options.verticalGradient)}this.options=t},ia.prototype._buildLayers=function(){return[ra(ra(ra(ra({id:this.id,type:"fill-extrusion"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Vi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:ra(ra({"fill-extrusion-base":this.options.base,"fill-extrusion-height":this.options.height,"fill-extrusion-opacity":this.options.fillOpacity},this.options.fillPattern?{"fill-extrusion-pattern":this.options.fillPattern}:{"fill-extrusion-color":this.options.fillColor}),{"fill-extrusion-translate":this.options.translate,"fill-extrusion-translate-anchor":this.options.translateAnchor,"fill-extrusion-vertical-gradient":this.options.verticalGradient})}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},ia.prototype._getLayerIds=function(){return[this.id]},ia.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Vi?t.add(this.options.source.getId()):t.add(this.options.source),t},ia);function ia(t,e,o){e=na.call(this,e)||this;return e.options=(new ta).merge(qi(o,ta._cloneCustomizer)),e.options.source=t||e.options.source,e}var sa,aa,I=window&&window.__extends||(sa=function(t,e){return(sa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}sa(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ca=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},la=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},ua=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},pa=(I(ha,aa=tt),ha.prototype.merge=function(){for(var t,e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var n=!1,r=!1;try{for(var i=ca(e),s=i.next();!s.done;s=i.next()){var a=s.value;a&&(a.hasOwnProperty("fillColor")?r=!(n=!0):a.hasOwnProperty("fillPattern")&&(n=!(r=!0)))}}catch(t){c={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(c)throw c.error}}var c=aa.prototype.merge.apply(this,ua([],la(e)));return n?c.fillPattern=void 0:r&&(c.fillColor=void 0),c},ha);function ha(){var t=null!==aa&&aa.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.fillColor="#1E90FF",t.fillOpacity=.5,t.fillPattern=void 0,t}var da,fa,ya=((window&&window.__extends||(da=function(t,e){return(da=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}da(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ma,fa=ls),ma.prototype.getOptions=function(){return qi(this.options,pa._cloneCustomizer)},ma.prototype.getSource=function(){return this.options.source},ma.prototype.setOptions=function(t){t=(new pa).merge(this.options,qi(t,pa._cloneCustomizer));if(this.map){if(t.source!==this.options.source||t.sourceLayer!==this.options.sourceLayer)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("fill-color",t.fillColor,this.options.fillColor),this._updatePaintProperty("fill-opacity",t.fillOpacity,this.options.fillOpacity),this._updatePaintProperty("fill-pattern",t.fillPattern,this.options.fillPattern)}this.options=t},ma.prototype._buildLayers=function(){var t={id:this.id,type:"fill",source:this.options.source instanceof Vi?this.options.source.getId():this.options.source,layout:{visibility:this.options.visible?"visible":"none"},paint:{"fill-opacity":this.options.fillOpacity},minzoom:this.options.minZoom,maxzoom:this.options.maxZoom};return this.options.filter&&(t.filter=this.options.filter),this.options.sourceLayer&&(t["source-layer"]=this.options.sourceLayer),this.options.fillPattern?t.paint["fill-pattern"]=this.options.fillPattern:t.paint["fill-color"]=this.options.fillColor,[t]},ma.prototype._getLayerIds=function(){return[this.id]},ma.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Vi?t.add(this.options.source.getId()):t.add(this.options.source),t},ma);function ma(t,e,o){e=fa.call(this,e)||this;return e.options=(new pa).merge(qi(o,pa._cloneCustomizer)),e.options.source=t||e.options.source,e}var ga,va,wa=((window&&window.__extends||(ga=function(t,e){return(ga=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ga(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(_a,va=v),_a);function _a(){var t=null!==va&&va.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="bottom",t.ignorePlacement=!1,t.image="marker-blue",t.offset=new $n(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=1,t.opacity=1,t}var ba,xa,Ca=((window&&window.__extends||(ba=function(t,e){return(ba=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ba(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Oa,xa=v),Oa);function Oa(){var t=null!==xa&&xa.apply(this,arguments)||this;return t.allowOverlap=!1,t.anchor="center",t.textField=void 0,t.font=["StandardFont-Regular"],t.ignorePlacement=!1,t.justify="center",t.offset=new $n(0,0),t.optional=!1,t.padding=2,t.pitchAlignment="auto",t.rotation=0,t.rotationAlignment="auto",t.size=16,t.color="#000000",t.haloBlur=0,t.haloColor="rgba(0,0,0,0)",t.haloWidth=0,t.opacity=1,t}var Sa,Pa,La=((window&&window.__extends||(Sa=function(t,e){return(Sa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Sa(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(ka,Pa=tt),ka);function ka(){var t=null!==Pa&&Pa.apply(this,arguments)||this;return t.source=void 0,t.sourceLayer=void 0,t.iconOptions=new wa,t.textOptions=new Ca,t.placement="point",t.zOrder="auto",t.lineSpacing=250,t}var Ma,Ea,I=window&&window.__extends||(Ma=function(t,e){return(Ma=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ma(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Aa=window&&window.__assign||function(){return(Aa=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ja=(I(Ta,Ea=ls),Ta.prototype.getOptions=function(){return qi(this.options,La._cloneCustomizer)},Ta.prototype.getSource=function(){return this.options.source},Ta.prototype.setOptions=function(t){var e=(new La).merge(this.options,qi(t,La._cloneCustomizer));if(this.map){if(e.source!==this.options.source||e.sourceLayer!==this.options.sourceLayer)return this.options=e,void this.map.layers.add(this);var o=this.options,n=e.iconOptions,r=o.iconOptions,i=e.textOptions,t=o.textOptions;this._updateBaseProperties(e,o),this._updateLayoutProperty("symbol-spacing",e.lineSpacing,o.lineSpacing),this._updateLayoutProperty("symbol-placement",e.placement,o.placement),this._updateLayoutProperty("symbol-sort-key",e.sortKey,o.sortKey),this._updateLayoutProperty("symbol-z-order",e.zOrder,o.zOrder),this._updateLayoutProperty("icon-allow-overlap",n.allowOverlap,r.allowOverlap),this._updateLayoutProperty("icon-anchor",n.anchor,r.anchor),this._updateLayoutProperty("icon-ignore-placement",n.ignorePlacement,r.ignorePlacement),this._updateLayoutProperty("icon-image",n.image,r.image),this._updateLayoutProperty("icon-offset",n.offset,r.offset),this._updatePaintProperty("icon-opacity",n.opacity,r.opacity),this._updateLayoutProperty("icon-optional",n.optional,r.optional),this._updateLayoutProperty("icon-padding",n.padding,r.padding),this._updateLayoutProperty("icon-pitch-alignment",n.pitchAlignment,r.pitchAlignment),this._updateLayoutProperty("icon-rotate",n.rotation,r.rotation),this._updateLayoutProperty("icon-rotation-alignment",n.rotationAlignment,r.rotationAlignment),this._updateLayoutProperty("icon-size",n.size,r.size),this._updateLayoutProperty("text-allow-overlap",i.allowOverlap,t.allowOverlap),this._updateLayoutProperty("text-anchor",i.anchor,t.anchor),this._updatePaintProperty("text-color",i.color,t.color),this._updateLayoutProperty("text-font",i.font,t.font),this._updateLayoutProperty("text-ignore-placement",i.ignorePlacement,t.ignorePlacement),this._updateLayoutProperty("text-justify",i.justify,t.justify),this._updatePaintProperty("text-halo-blur",i.haloBlur,t.haloBlur),this._updatePaintProperty("text-halo-color",i.haloColor,t.haloColor),this._updatePaintProperty("text-halo-width",i.haloWidth,t.haloWidth),this._updateLayoutProperty("text-offset",i.offset,t.offset),this._updatePaintProperty("text-opacity",i.opacity,t.opacity),this._updateLayoutProperty("text-optional",i.optional,t.optional),this._updateLayoutProperty("text-padding",i.padding,t.padding),this._updateLayoutProperty("text-pitch-alignment",i.pitchAlignment,t.pitchAlignment),this._updateLayoutProperty("text-radial-offset",i.radialOffset,t.radialOffset),this._updateLayoutProperty("text-rotate",i.rotation,t.rotation),this._updateLayoutProperty("text-rotation-alignment",i.rotationAlignment,t.rotationAlignment),this._updateLayoutProperty("text-size",i.size,t.size),this._updateLayoutProperty("text-variable-anchor",i.variableAnchor,t.variableAnchor),this._updateLayoutProperty("text-field",i.textField,t.textField)}this.options=e},Ta.prototype._buildLayers=function(){var t=Aa(Aa(Aa(Aa({id:this.id,type:"symbol"},this.options.sourceLayer&&{"source-layer":this.options.sourceLayer}),{source:this.options.source instanceof Vi?this.options.source.getId():this.options.source,layout:Aa(Aa({visibility:this.options.visible?"visible":"none","symbol-placement":this.options.placement,"symbol-spacing":this.options.lineSpacing,"symbol-z-order":this.options.zOrder,"text-allow-overlap":this.options.textOptions.allowOverlap,"text-anchor":this.options.textOptions.anchor},this.options.textOptions.textField&&{"text-field":this.options.textOptions.textField}),{"text-font":this.options.textOptions.font,"text-ignore-placement":this.options.textOptions.ignorePlacement,"text-justify":this.options.textOptions.justify,"text-offset":this.options.textOptions.offset,"text-optional":this.options.textOptions.optional,"text-padding":this.options.textOptions.padding,"text-pitch-alignment":this.options.textOptions.pitchAlignment,"text-rotate":this.options.textOptions.rotation,"text-rotation-alignment":this.options.textOptions.rotationAlignment,"text-size":this.options.textOptions.size,"icon-allow-overlap":this.options.iconOptions.allowOverlap,"icon-anchor":this.options.iconOptions.anchor,"icon-ignore-placement":this.options.iconOptions.ignorePlacement,"icon-image":this.options.iconOptions.image,"icon-offset":this.options.iconOptions.offset,"icon-optional":this.options.iconOptions.optional,"icon-padding":this.options.iconOptions.padding,"icon-pitch-alignment":this.options.iconOptions.pitchAlignment,"icon-rotate":this.options.iconOptions.rotation,"icon-rotation-alignment":this.options.iconOptions.rotationAlignment,"icon-size":this.options.iconOptions.size}),paint:{"text-color":this.options.textOptions.color,"text-halo-blur":this.options.textOptions.haloBlur,"text-halo-color":this.options.textOptions.haloColor,"text-halo-width":this.options.textOptions.haloWidth,"text-opacity":this.options.textOptions.opacity,"icon-opacity":this.options.iconOptions.opacity}}),this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom});return void 0!==this.options.sortKey&&(t.layout["symbol-sort-key"]=this.options.sortKey),void 0!==this.options.textOptions.radialOffset&&(t.layout["text-radial-offset"]=this.options.textOptions.radialOffset),void 0!==this.options.textOptions.variableAnchor&&(t.layout["text-variable-anchor"]=this.options.textOptions.variableAnchor),[t]},Ta.prototype._getLayerIds=function(){return[this.id]},Ta.prototype._getSourceIds=function(){var t=new Set;return this.options.source instanceof Vi?t.add(this.options.source.getId()):t.add(this.options.source),t},Ta);function Ta(t,e,o){e=Ea.call(this,e)||this;return e.options=(new La).merge(qi(o,La._cloneCustomizer)),e.options.source=t||e.options.source,e}var Ia,za,Da=((window&&window.__extends||(Ia=function(t,e){return(Ia=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ia(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Ra,za=x),Ra);function Ra(){var t=null!==za&&za.apply(this,arguments)||this;return t.bounds=[-180,-85.0511,180,85.0511],t.minSourceZoom=0,t.maxSourceZoom=22,t.tileSize=512,t.isTMS=!1,t.subdomains=void 0,t.tileUrl=void 0,t}var Ba,Fa,x=window&&window.__extends||(Ba=function(t,e){return(Ba=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ba(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Na=window&&window.__assign||function(){return(Na=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Za=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},qa=(x(Ha,Fa=Bs),Ha.prototype.getOptions=function(){return qi(this.options,Da._cloneCustomizer)},Ha.prototype.setOptions=function(t){t=(new Da).merge(this.options,qi(t,Da._cloneCustomizer));if(this.map){if(!Un(t.bounds,this.options.bounds)||t.isTMS!==this.options.isTMS||t.maxSourceZoom!==this.options.maxSourceZoom||t.minSourceZoom!==this.options.minSourceZoom||!Un(t.subdomains,this.options.subdomains)||t.tileSize!==this.options.tileSize||t.tileUrl!==this.options.tileUrl)return this.options=t,void this.map.layers.add(this);this._updateBaseProperties(t,this.options),this._updatePaintProperty("raster-contrast",t.contrast,this.options.contrast),this._updatePaintProperty("raster-fade-duration",t.fadeDuration,this.options.fadeDuration),this._updatePaintProperty("raster-hue-rotate",t.hueRotation,this.options.hueRotation),this._updatePaintProperty("raster-brightness-max",t.maxBrightness,this.options.maxBrightness),this._updatePaintProperty("raster-opacity",t.opacity,this.options.opacity),this._updatePaintProperty("raster-saturation",t.saturation,this.options.saturation)}this.options=t},Ha.prototype._setOptionsNoUpdate=function(t){this.options=(new Da).merge(this.options,qi(t,Da._cloneCustomizer))},Ha.prototype._buildLayers=function(){return[Na(Na({id:this.id,type:"raster",source:this._getSourceId(),layout:{visibility:this.options.visible?"visible":"none"},paint:{"raster-contrast":this.options.contrast,"raster-fade-duration":this.options.fadeDuration,"raster-hue-rotate":this.options.hueRotation,"raster-brightness-max":this.options.maxBrightness,"raster-brightness-min":this.options.minBrightness,"raster-opacity":this.options.opacity,"raster-saturation":this.options.saturation}},this.options.filter&&{filter:this.options.filter}),{minzoom:this.options.minZoom,maxzoom:this.options.maxZoom})]},Ha.prototype._getLayerIds=function(){return[this.id]},Ha.prototype._buildSource=function(){var t,e;if(this.options.tileUrl){if(-1===this.options.tileUrl.indexOf("{"))return{type:"raster",url:this.options.tileUrl};if(-1!==this.options.tileUrl.indexOf("{subdomain}")){if(!(this.options.subdomains&&0<this.options.subdomains.length))throw new Error("The {subdomain} placeholder was included in the tileUrl but no subdomains were specified");var o=[];try{for(var n=Za(this.options.subdomains),r=n.next();!r.done;r=n.next()){var i=r.value;o.push(this.options.tileUrl.replace(/{subdomain}/g,i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}e=o}else e=[this.options.tileUrl]}return Na({type:"raster",bounds:this.options.bounds,maxzoom:this.options.maxSourceZoom,minzoom:this.options.minSourceZoom,scheme:this.options.isTMS?"tms":"xyz",tileSize:this.options.tileSize},e&&{tiles:e})},Ha.prototype._getSourceId=function(){return this.getId()+"-RasterSource"},Ha);function Ha(t,e){e=Fa.call(this,e)||this;return t&&e.setOptions(t),e}var Ua,Ga,Wa=((window&&window.__extends||(Ua=function(t,e){return(Ua=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ua(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Va,Ga=tt),Va);function Va(){var t=null!==Ga&&Ga.apply(this,arguments)||this;return t.renderer=void 0,t}var Ka,Ya,Ja=((window&&window.__extends||(Ka=function(t,e){return(Ka=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ka(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))($a,Ya=ls),$a.prototype.getOptions=function(){return qi(this.options,Wa._cloneCustomizer)},$a.prototype.setOptions=function(t){t=(new Wa).merge(this.options,qi(t,Wa._cloneCustomizer));this.map&&this.map.triggerRepaint(),this.options=t},$a.prototype.onAdd=function(t){var e,o;Ya.prototype.onAdd.call(this,t),this.map.events.add("stylechanged",this._onStyleChange),this.options.renderer&&this.glContext&&null!==(o=(e=this.options.renderer).onAdd)&&void 0!==o&&o.call(e,t,this.glContext)},$a.prototype.onRemove=function(){var t,e;this.options.renderer&&this.glContext&&null!==(e=(t=this.options.renderer).onRemove)&&void 0!==e&&e.call(t,this.map,this.glContext),this.map.events.remove("stylechanged",this._onStyleChange),this.glContext=null,Ya.prototype.onRemove.call(this)},$a.prototype._buildLayers=function(){var r=this;if(!this.options.renderer)throw new Error("Cannot build the WebGL layer because renderer was not set.");return[{id:this.id,type:"custom",renderingMode:this.options.renderer.renderingMode,onAdd:function(t,e){r.glContext=e},onRemove:function(t,e){},prerender:function(t,e){var o,n;r._shouldRender()&&null!==(n=(o=r.options.renderer).prerender)&&void 0!==n&&n.call(o,t,e)},render:function(t,e){r._shouldRender()&&r.options.renderer.render(t,e)}}]},$a.prototype._getLayerIds=function(){return[this.id]},$a.prototype._getSourceIds=function(){return(new Set).add(this.source.getId())},$a.prototype._shouldRender=function(){if(this.map){var t=this.map.getCamera().zoom;return this.options.visible&&this.options.minZoom<=t&&this.options.maxZoom>t}return!1},$a);function $a(t,e){var o=Ya.call(this,t)||this;return o._onStyleChange=function(){var t,e;o.map._getMap().getLayer(o.id)||(t=o.map,e=null===(e=o.map.layers._getUserLayers().find(function(t){return t.layer.getId()==o.id}))||void 0===e?void 0:e.before,t.layers.remove(o),t.layers.add(o,e))},o.options=(new Wa).merge(qi(e,Wa._cloneCustomizer)),o.source=new Xi,o}var bt=Object.freeze({__proto__:null,BubbleLayer:_s,Layer:ls,LineLayer:Js,PolygonExtrusionLayer:bt,PolygonLayer:ya,SymbolLayer:ja,TileLayer:qa,HeatMapLayer:Ot,ImageLayer:ft,WebGLLayer:Ja}),Xa=(Qa.convertHtmlString=function(t){if("string"!=typeof t)return t;var e=document.createElement("div");return e.innerHTML=t,e},Qa.parseWithFilter=function(t,e,o,n){var r=this;if(void 0===e&&(e=function(t){return!0}),void 0===o&&(o=function(t){return t}),void 0===n&&(n=function(){return document.createElement("div")}),"string"==typeof t){var i=(new DOMParser).parseFromString(t,"text/html").body;if(0==i.children.length)return o(i.innerHTML);var s,i=1==i.children.length&&1==i.childNodes.length?i.children[0]:(s=n(),Array.from(i.childNodes).map(function(t){return s.append(t)}),s)}else i=t;return Array.from(i.children).forEach(function(t){return r.parseWithFilter(t,e,o)}),e(i)?o(i):(i.parentNode&&i.parentNode.removeChild(i),null)},Qa);function Qa(){}var tc,ec,oc=function(t){return ue(t)&&1===t.nodeType&&!Bo(t)},nc=((window&&window.__extends||(tc=function(t,e){return(tc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}tc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(rc,ec=v),rc._cloneCustomizer=function(t){if(oc(t))return t},rc);function rc(){var t=null!==ec&&ec.apply(this,arguments)||this;return t.anchor="none",t.draggable=!1,t.closeButton=!0,t.content=document.createElement("span"),t.fillColor="#FFFFFF",t.pixelOffset=new $n(0,0),t.position=new ni(0,0),t.showPointer=!0,t}var ic,sc,Ot=window&&window.__extends||(ic=function(t,e){return(ic=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ic(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),ac=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},cc=(Ot(lc,sc=Z),lc.prototype.setPopupOptions=function(t){this.setOptions(t)},lc.prototype.setOptions=function(t){var e=(new nc).merge(this.options,qi(t,nc._cloneCustomizer));e.content!==this.options.content?(this.htmlContent.remove(),this.htmlContent=this._createHtmlContent(e),this.contentDiv.prepend(this.htmlContent)):e.draggable!==this.options.draggable&&this._setDraggable(this.htmlContent,e.draggable),e.closeButton&&!this.closeBtn?(this.closeBtn=this._createCloseButton(),this.contentDiv.appendChild(this.closeBtn),t=A("close"),this.contentDiv.appendChild(t),j(t,this.closeBtn,!0)):!e.closeButton&&this.closeBtn&&(this.contentDiv.removeChild(this.closeBtn),delete this.closeBtn),e.showPointer&&!this.arrowDiv?(this.arrowDiv=this._createArrowDiv(),this.containerDiv.appendChild(this.arrowDiv)):!e.showPointer&&this.arrowDiv&&(this.containerDiv.removeChild(this.arrowDiv),delete this.arrowDiv),e.fillColor!==this.options.fillColor&&(this.containerDiv.style.borderColor=e.fillColor,this.contentDiv.style.backgroundColor=e.fillColor),this.marker&&(e.anchor!==this.options.anchor?"none"===this.options.anchor?(this.autoAnchor!==e.anchor&&this._replaceMarker(this.map,e),this.map.events.remove("move",this._onMove),delete this.autoAnchor):(this._replaceMarker(this.map,e),"none"===e.anchor&&this.map.events.add("move",this._onMove)):(Un(e.position,this.options.position)||this.marker.setLngLat(e.position),Un(e.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(e.pixelOffset))),this.options=e},lc.prototype.getPopupOptions=function(){return this.getOptions()},lc.prototype.getOptions=function(){return qi(this.options,nc._cloneCustomizer)},lc.prototype.getPopupContainer=function(){return this.containerDiv},lc.prototype._dragToPixel=function(t){this.dragging||(this.dragging=!0,this.contentDiv.style.pointerEvents="none",this._invokeEvent("dragstart",{type:"dragstart",target:this}));t=[t[0]+this.dragOffset[0],t[1]+this.dragOffset[1]],t=ac(this.map.pixelsToPositions([t]),1)[0];this.options.position=t,this.marker.setLngLat(this.options.position),this._invokeEvent("drag",{type:"drag",target:this})},lc.prototype._onUp=function(){this.dragging&&(this.contentDiv.style.pointerEvents="",this._invokeEvent("dragend",{type:"dragend",target:this}),"none"===this.options.anchor&&this._onMove()),delete this.dragOffset,delete this.dragging},lc.prototype._createContainerDiv=function(t){var e=this,o=document.createElement("div");o.classList.add(lc.Css.container),o.classList.add(lc.Css.hidden),o.style.borderColor=t.fillColor,o.setAttribute("role","dialog"),o.setAttribute("aria-label","Map Information Window");var n=!1;return o.addEventListener("keydown",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!0)}),o.addEventListener("keyup",function(t){"Tab"!==t.key&&"Escape"!==t.key&&"Esc"!==t.key||(n=!1)}),o.addEventListener("focusin",function(t){e.map&&!e.isOpen()&&(e.open(e.map),t.target instanceof HTMLElement&&t.target.focus())}),o.addEventListener("focusout",function(t){n&&t.relatedTarget instanceof Node&&!o.contains(t.relatedTarget)&&(n=!1,e.isOpen()&&e.close())}),o},lc.prototype._createContentDiv=function(t){var e=document.createElement("div");return e.classList.add(lc.Css.content),e.style.backgroundColor=t.fillColor,e.setAttribute("tabindex","0"),this.htmlContent=this._createHtmlContent(t),e.appendChild(this.htmlContent),e},lc.prototype._createArrowDiv=function(){var t=document.createElement("div");return t.classList.add(lc.Css.arrow),t},lc.prototype._createCloseButton=function(){var t=document.createElement("button");return t.addEventListener("click",this.close),t.classList.add(lc.Css.close),t.setAttribute("aria-label","close"),t.setAttribute("tabindex","0"),t.innerHTML="&times;",t},lc.prototype._createHtmlContent=function(t){var e=Xa.convertHtmlString(t.content);return t.draggable&&this._setDraggable(e,t.draggable),e},lc.prototype._createMarker=function(t,e){var o=this.marker?this.marker.getLngLat():t.position,o="none"===t.anchor?(this.autoAnchor=e||"bottom",this.containerDiv.classList.add(this.autoAnchor),new p.Marker({anchor:this.autoAnchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(o)):(this.containerDiv.classList.add(t.anchor),new p.Marker({anchor:t.anchor,element:this.containerDiv,offset:t.pixelOffset}).setLngLat(o));return o},lc.prototype._getAutoAnchor=function(t,e){var o,n,r,i=this.containerDiv.offsetWidth,s=this.containerDiv.offsetHeight,a=[];return(r=this.marker?(n=(o=t._getMap().project(this.marker.getLngLat())).x,o.y):(r=ac(t.positionsToPixels([e.position]),1),n=(r=ac(r[0],2))[0],r[1]))<s?a.push("top"):r>t.getCanvas().offsetHeight-s&&a.push("bottom"),n<i/2?a.push("left"):n>t.getCanvas().offsetWidth-i/2&&a.push("right"),0<a.length?a.join("-"):"bottom"},lc.prototype._replaceMarker=function(t,e,o){var n=this.containerDiv.nextElementSibling;this.marker.remove(),this.containerDiv.classList.remove(this.autoAnchor||this.options.anchor),this.marker=this._createMarker(e,o),this.marker.addTo(t._getMap()),t.popups._getCollectionDiv().insertBefore(this.containerDiv,n||null)},lc.prototype._setDraggable=function(t,e){e?(t.addEventListener("mousedown",this._onDown),t.addEventListener("touchstart",this._onDown),t.addEventListener("dragstart",this._onDragStart)):(t.removeEventListener("mousedown",this._onDown),t.removeEventListener("touchstart",this._onDown),t.removeEventListener("dragstart",this._onDragStart))},lc.Css={arrow:"popup-arrow",close:"popup-close",container:"popup-container",content:"popup-content-container",hidden:"hidden-accessible-element"},lc);function lc(t){var o=sc.call(this)||this;return o.attach=function(t){o.map!==t&&(o.map&&o.remove(),o.map=t,o.marker=o._createMarker(o.options),o.marker.addTo(o.map._getMap()),o.map.popups._getCollectionDiv().appendChild(o.containerDiv),o.map.popups.add(o))},o.open=function(t){if(!t&&!o.map)throw new Error("Must specify a map to open on or attach to a map in advance");o.attach(t||o.map),o.containerDiv.classList.remove(lc.Css.hidden),o.map.events.add("move",o._onMove),o._onMove(),o._invokeEvent("open",{target:o,type:"open"})},o.close=function(){o.map&&o.map.events.remove("move",o._onMove),o.containerDiv.classList.add(lc.Css.hidden),o._invokeEvent("close",{target:o,type:"close"})},o.remove=function(){o.map&&(o.marker.remove(),o.containerDiv.classList.remove(o.autoAnchor||o.options.anchor),o.map.events.remove("move",o._onMove),o.map.popups.remove(o),delete o.map,delete o.marker,delete o.autoAnchor)},o.isOpen=function(){return o.map&&!o.containerDiv.classList.contains(lc.Css.hidden)},o._onMove=function(){var t=o._getAutoAnchor(o.map,o.options);t!==o.autoAnchor&&(o._replaceMarker(o.map,o.options,t),o.map.events.add("move",o._onMove))},o._onDown=function(t){o.map.popups._addDraggedPopup(o);var e=ac(o.map.positionsToPixels([o.options.position]),1)[0];"mousedown"===t.type?o.dragOffset=[e[0]-t.clientX,e[1]-t.clientY]:"touchstart"===t.type&&(o.dragOffset=[e[0]-t.touches[0].clientX,e[1]-t.touches[0].clientY])},o._onDragStart=function(t){t.preventDefault()},o.options=(new nc).merge(qi(t,nc._cloneCustomizer)),o.containerDiv=o._createContainerDiv(o.options),o.contentDiv=o._createContentDiv(o.options),o.containerDiv.appendChild(o.contentDiv),o.options.showPointer&&(o.arrowDiv=o._createArrowDiv(),o.containerDiv.appendChild(o.arrowDiv)),o.options.closeButton&&(o.closeBtn=o._createCloseButton(),o.contentDiv.appendChild(o.closeBtn),t=A("close"),o.contentDiv.appendChild(t),j(t,o.closeBtn,!0)),o}var uc,pc,hc=((window&&window.__extends||(uc=function(t,e){return(uc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}uc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(dc,pc=v),dc._cloneCustomizer=function(t){if(t instanceof cc||oc(t))return t},dc);function dc(){var t=null!==pc&&pc.apply(this,arguments)||this;return t.anchor="bottom",t.color="#1A73AA",t.draggable=!1,t.htmlContent='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24.5 36.5" id="marker_'+Wn()+'" width="24.5" height="36.5" display="block"><path d="M12.25.25a12.2543,12.2543,0,0,0-12,12.4937c0,6.4436,6.4879,12.1093,11.059,22.5641.5493,1.2563,1.3327,1.2563,1.882,0C17.7621,24.8529,24.25,19.1857,24.25,12.7437A12.2543,12.2543,0,0,0,12.25.25Z" fill="{color}" stroke="{secondaryColor}" stroke-width="0.5"/><text style="font-family: Arial, Helvetica, sans-serif; font-size: 14px; fill: white;" text-anchor="middle" x="12" y="18">{text}</text></svg>',t.pixelOffset=new $n(0,0),t.position=new ni(0,0),t.popup=void 0,t.secondaryColor="white",t.text=void 0,t.visible=!0,t}var fc,yc,mc=((window&&window.__extends||(fc=function(t,e){return(fc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}fc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(gc,yc=Z),gc.prototype.getOptions=function(){return qi(this.options,hc._cloneCustomizer)},gc.prototype.getElement=function(){return this.marker.getElement()},gc.prototype.setOptions=function(t){t=(new hc).merge(this.options,qi(t,hc._cloneCustomizer));Un(t.htmlContent,this.options.htmlContent)&&t.anchor===this.options.anchor?("string"!=typeof t.htmlContent||t.color===this.options.color&&t.text===this.options.text&&t.secondaryColor===this.options.secondaryColor||(this.element.innerHTML=this._getSubbedHtmlString(t)||""),t.draggable!==this.options.draggable&&(this._setDraggable(t.draggable),this.marker.setDraggable(t.draggable)),Un(t.pixelOffset,this.options.pixelOffset)||this.marker.setOffset(t.pixelOffset),Un(t.position,this.options.position)||this.marker.setLngLat(t.position),t.visible!==this.options.visible&&(t.visible?this.element.classList.remove(gc.hiddenClass):this.element.classList.add(gc.hiddenClass))):(this.marker.remove(),this._buildMarker(t),this.map&&(this.marker.addTo(this.map._getMap()),this._getCollectionContainer().appendChild(this.element))),this.options=t},gc.prototype.togglePopup=function(){if(this.options.popup)if(this.options.popup.isOpen())this.options.popup.close();else{if(!this.map)throw new Error("The marker must be added to a map before calling togglePopup().");this.options.popup.setOptions({position:this.options.position}),this.options.popup.open(this.map)}},gc.prototype._addToMap=function(t,e){this.map&&this.map!==t&&this._removeFromMap(),e&&(this.options.position=Ao(e),this.marker.setLngLat(this.options.position)),this.map!==t&&(this.map=t,this.marker.addTo(t._getMap()),this._getCollectionContainer().appendChild(this.element))},gc.prototype._removeFromMap=function(){this.map&&(this.marker.remove(),delete this.map)},gc.prototype._getId=function(){if(this.element)return("string"==typeof this.options.htmlContent?this.element.firstChild:this.element).id},gc.prototype._buildMarker=function(t){var e;"string"==typeof t.htmlContent?(e=this._getSubbedHtmlString(t)||"",this.element=Xa.convertHtmlString(e)):this.element=t.htmlContent,this.element.classList.add(gc.containerClass),t.draggable&&this._setDraggable(!0),t.visible||this.element.classList.add(gc.hiddenClass),this.marker=new p.Marker({element:this.element,offset:t.pixelOffset,draggable:t.draggable,anchor:t.anchor}).setLngLat(t.position),this.marker.on("drag",this._onDrag),this.marker.on("dragstart",this._onDragStart),this.marker.on("dragend",this._onDragEnd),this.element.addEventListener("click",this._bubbleElementEvent),this.element.addEventListener("dblclick",this._bubbleElementEvent),this.element.addEventListener("contextmenu",this._bubbleElementEvent),this.element.addEventListener("keydown",this._bubbleElementEvent),this.element.addEventListener("keypress",this._bubbleElementEvent),this.element.addEventListener("keyup",this._bubbleElementEvent),this.element.addEventListener("mousedown",this._bubbleElementEvent),this.element.addEventListener("mouseenter",this._bubbleElementEvent),this.element.addEventListener("mouseleave",this._bubbleElementEvent),this.element.addEventListener("mousemove",this._bubbleElementEvent),this.element.addEventListener("mouseout",this._bubbleElementEvent),this.element.addEventListener("mouseover",this._bubbleElementEvent),this.element.addEventListener("mouseup",this._bubbleElementEvent)},gc.prototype._getSubbedHtmlString=function(t){return"string"==typeof t.htmlContent?t.htmlContent.replace(/{color}/gi,t.color||"").replace(/{secondaryColor}/gi,t.secondaryColor||"").replace(/{text}/gi,t.text||""):null},gc.prototype._getCollectionContainer=function(){var t=this.map.getCanvasContainer().querySelector("."+gc.collectionContainerClass);return t||((t=document.createElement("div")).classList.add(gc.collectionContainerClass),this.map.getCanvasContainer().appendChild(t)),t},gc.prototype._setDraggable=function(t){t?this.element.addEventListener("dragstart",this._onEleDragStart):this.element.removeEventListener("dragstart",this._onEleDragStart)},gc.collectionContainerClass="marker-collection-container",gc.hiddenClass="hidden-accessible-element",gc.containerClass="marker-container",gc);function gc(t){var e=yc.call(this)||this;return e._onDrag=function(){var t=e.marker.getLngLat().wrap();e.options.position=new ni(t.lng,t.lat),e._invokeEvent("drag",{type:"drag",target:e})},e._onDragStart=function(){e._invokeEvent("dragstart",{type:"dragstart",target:e})},e._onDragEnd=function(){e._invokeEvent("dragend",{type:"dragend",target:e})},e._bubbleElementEvent=function(t){e._invokeEvent(t.type,{type:t.type,target:e})},e._onEleDragStart=function(t){t.preventDefault()},e.options=(new hc).merge(qi(t,hc._cloneCustomizer)),e._buildMarker(e.options),e}var vc=(wc.parse=function(t){var e=(t=t.toLowerCase()).lastIndexOf("-");return-1!==e?{code:t,language:t.substring(0,e),region:t.substring(e+1)}:{code:t,language:t}},wc);function wc(){}var _c={localizationsPath:"locs/mapcontrol/2019-3-12",sensitiveUserRegions:["il","kr","pk","in","cn","ar","bh","eg","jo","sa","kw","om","qa","ma","ae"],locales:{defaultLanguage:{defaultRegion:{code:"NGT",strings:"en/resource.json"},latn:{code:"NGT-Latn",strings:"en/resource.json"}},ar:{defaultRegion:{code:"ar",strings:"ar-sa/resource.json"}},bg:{defaultRegion:{code:"bg-BG",strings:"bg-bg/resource.json"}},cs:{defaultRegion:{code:"cs-CZ",strings:"cs-cz/resource.json"}},da:{defaultRegion:{code:"da-DK",strings:"da-dk/resource.json"}},de:{defaultRegion:{code:"de-DE",strings:"de-de/resource.json"}},el:{defaultRegion:{code:"el-GR",strings:"el-gr/resource.json"}},en:{defaultRegion:{code:"en",strings:"en/resource.json"},us:{code:"en-US",strings:"en/resource.json"},au:{code:"en-AU",strings:"en/resource.json"},gb:{code:"en-GB",strings:"en/resource.json"},nz:{code:"en-NZ",strings:"en/resource.json"}},es:{defaultRegion:{code:"es-ES",strings:"es-es/resource.json"},mx:{code:"es-MX",strings:"es-mx/resource.json"}},fi:{defaultRegion:{code:"fi-FI",strings:"fi-fi/resource.json"}},fr:{defaultRegion:{code:"fr-FR",strings:"fr-fr/resource.json"}},hu:{defaultRegion:{code:"hu-HU",strings:"hu-hu/resource.json"}},id:{defaultRegion:{code:"id-ID",strings:"id-id/resource.json"}},it:{defaultRegion:{code:"it-IT",strings:"it-it/resource.json"}},ko:{defaultRegion:{code:"ko-KR",strings:"ko-kr/resource.json"}},lt:{defaultRegion:{code:"lt-LT",strings:"lt-lt/resource.json"}},ms:{defaultRegion:{code:"ms-MY",strings:"ms-my/resource.json"}},nb:{defaultRegion:{code:"nb-NO",strings:"nb-no/resource.json"}},nl:{defaultRegion:{code:"nl-NL",strings:"nl-nl/resource.json"}},pl:{defaultRegion:{code:"pl-PL",strings:"pl-pl/resource.json"}},pt:{defaultRegion:{code:"pt-PT",strings:"pt-pt/resource.json"},br:{code:"pt-BR",strings:"pt-br/resource.json"}},ru:{defaultRegion:{code:"ru-RU",strings:"ru-ru/resource.json"}},sk:{defaultRegion:{code:"sk-SK",strings:"sk-sk/resource.json"}},sl:{defaultRegion:{code:"sl-SL",strings:"sl-sl/resource.json"}},sv:{defaultRegion:{code:"sv-SE",strings:"sv-se/resource.json"}},th:{defaultRegion:{code:"th-TH",strings:"th-th/resource.json"}},tr:{defaultRegion:{code:"tr-TR",strings:"tr-tr/resource.json"}},zh:{defaultRegion:{code:"zh",strings:"en/resource.json"}},"zh-hans":{defaultRegion:{code:"zh-Hans",strings:"zh-cn/resource.json"},cn:{code:"zh-Hans-CN",strings:"zh-cn/resource.json"}},"zh-hant":{defaultRegion:{code:"zh-Hant",strings:"en/resource.json"},tw:{code:"zh-Hant-TW",strings:"zh-tw/resource.json"}}}},bc=function(){this.Unknown="Unknown",this.Accident="Accident",this.Fog="Fog",this.Danger="Danger",this.Rain="Rain",this.Ice="Ice",this.Jam="Jam",this.LaneClosed="Lane Closed",this.RoadClosed="Road Closed",this.RoadWorks="Road Works",this.Wind="Wind",this.Flood="Flood",this.Detour="Detour"},xc=(Cc.getCode=function(t){var e=vc.parse(t);return-1===_c.sensitiveUserRegions.indexOf(e.region)?this.getLocaleData(e).code:t},Cc.getStrings=function(t){t=this.getLocaleData(t);return _c.locales.defaultLanguage.defaultRegion.code===t.code?new Promise(function(t){t(new bc)}):new P({domain:e,path:_c.localizationsPath+"/"+t.strings}).get().then(function(t){return t},function(){return new bc})},Cc.getLocaleData=function(t){if("string"==typeof t&&(t=vc.parse(t)),_c.locales[t.code])return _c.locales[t.code].defaultRegion;var e;if(_c.locales[t.language])e=_c.locales[t.language];else{if(-1!==t.language.indexOf("-"))return this.getLocaleData(t.language);e=_c.locales.defaultLanguage}return t.region&&e[t.region]?e[t.region]:e.defaultRegion},Cc);function Cc(){}var Oc=(Sc.getEdgeOrIEVersion=function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");if(0<e)return parseInt(t.substring(e+5,t.indexOf(".",e)),10);if(0<t.indexOf("Trident/")){var o=t.indexOf("rv:");return parseInt(t.substring(o+3,t.indexOf(".",o)),10)}o=t.indexOf("Edge/");return 0<o?parseInt(t.substring(o+5,t.indexOf(".",o)),10):-1},Sc.isEdgeOrIE=function(){return-1!==this.getEdgeOrIEVersion()},Sc.isIE=function(){var t=this.getEdgeOrIEVersion();return-1!==t&&t<=11},Sc);function Sc(){}var Pc,ft=window&&window.__extends||(Pc=function(t,e){return(Pc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Pc(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Lc=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},kc=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t};(Ot=u.AuthenticationType||(u.AuthenticationType={})).subscriptionKey="subscriptionKey",Ot.aad="aad",Ot.anonymous="anonymous",Ot.sas="sas";var Mc,Ec,Ac=(ft(jc,Mc=v),jc.prototype.setSubscriptionKey=function(t){this.authType=u.AuthenticationType.subscriptionKey,this.subscriptionKey=t},jc.prototype.setAadProperties=function(t,e,o,n,r){this.authType=u.AuthenticationType.aad,this.authContext=r||this.authContext,this.aadInstance=n||this.aadInstance,this.clientId=t,this.aadAppId=e,this.aadTenant=o},jc.prototype.setTokenCallbackFunction=function(t){this.authType=u.AuthenticationType.anonymous,this.getToken=t},jc.prototype.setSasCallbackFunction=function(t){this.authType=u.AuthenticationType.sas,this.getToken=t},jc.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var o=Mc.prototype.merge.apply(this,kc([],Lc(t)));return o.authType===u.AuthenticationType.subscriptionKey?o.authContext=o.aadAppId=o.getToken=void 0:o.authType===u.AuthenticationType.aad?o.subscriptionKey=o.getToken=void 0:o.authType===u.AuthenticationType.anonymous?o.subscriptionKey=o.authContext=o.aadAppId=void 0:o.authType===u.AuthenticationType.sas&&(o.authContext=o.subscriptionKey=o.aadAppId=void 0),o},jc);function jc(){var t=null!==Mc&&Mc.apply(this,arguments)||this;return t.authType=void 0,t.subscriptionKey=void 0,t.clientId=void 0,t.aadAppId=void 0,t.aadTenant=void 0,t.aadInstance=void 0,t.getToken=void 0,t.sasToken=void 0,t.authContext=void 0,t}var Tc="NGT",Ic=Wn(),zc=t,Dc=e,Rc=o,Bc=n,Fc=m,Nc=new Ac,Zc=!1,qc=!1,Hc=!1,Uc=!1,Gc=!1,Wc=!1,Vc=!1,Kc=!1,Yc=!1;function Jc(){return Object.assign({},Nc)}function $c(){return Dc}function Xc(){return zc}function Qc(){return Rc}function tl(){return Bc}function el(){return Fc}function ol(){return p.workerCount}function nl(){return p.maxParallelImageRequests}function rl(){return Tc}function il(){return Ic}function sl(){return Nc.authType===u.AuthenticationType.subscriptionKey?Nc.subscriptionKey:void 0}function al(){return Ec}function cl(t){return!Oc.isIE()&&p.supported({failIfMajorPerformanceCaveat:t})}function ll(t){Nc=(new Ac).merge(Nc,t),Yc=!0}function ul(t){zc=t,qc=!0}function pl(t){Rc=t,Hc=!0}function hl(t){0<t&&(p.workerCount=t,Gc=!0)}function dl(t){0<t&&(p.maxParallelImageRequests=t,Wc=!0)}function fl(t){Tc=xc.getCode(t),Vc=!0}function yl(t){Ic=t,Kc=!0}function ml(t){Nc.setSubscriptionKey(t),Yc=!0}function gl(t){Ec=t,Zc=!0}function vl(t,e){if(e=Math.abs(e||1),"string"==typeof t&&Ll[t.toLowerCase()]){for(var o=Ll[t.toLowerCase()],n=/calc\(([0-9.]+)[px]*\s*\*\s*\{scale\}\)/gi,r=o,i=n.exec(o);i;)r=r.replace(i[0],parseFloat(i[1])*e+""),i=n.exec(o);return r=r.replace("{scale}",e+"")}throw new Error("Invalid templateName.")}function wl(){return Yc}function _l(){return qc}function bl(){return Hc}function xl(){return Gc}function Cl(){return Wc}function Ol(){return Vc}function Sl(){return Kc}function Pl(){return Zc}var Ll={marker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 26 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><text x="12.5" y="17.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:2"/><text x="12.5" y="18.5" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-circle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(39 * {scale})" viewBox="-1 -1 27 38"><path d="M12.25.25a12.254 12.254 0 0 0-12 12.494c0 6.444 6.488 12.109 11.059 22.564.549 1.256 1.333 1.256 1.882 0C17.762 24.853 24.25 19.186 24.25 12.744A12.254 12.254 0 0 0 12.25.25Z" style="fill:{color};stroke:{secondaryColor};stroke-width:1"/><circle cx="12.5" cy="12.5" r="9" fill="{secondaryColor}"/><text x="12" y="17.5" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',pin:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(24 * {scale})" height="calc(28 * {scale})" viewBox="0 0 24 28"><path d="m11.988 16.615a5.15 5.15 0 0 1-2.268-.525 4.909 4.909 0 0 1-2.805-4.442 5.019 5.019 0 0 1 5.072-4.936h.012a5.03 5.03 0 0 1 5.085 4.961 4.907 4.907 0 0 1-.549 2.224 5.114 5.114 0 0 1-4.548 2.718zm0-8.06a3.173 3.173 0 0 0-3.226 3.099 3.081 3.081 0 0 0 1.77 2.782 3.299 3.299 0 0 0 4.365-1.386 3.049 3.049 0 0 0 .342-1.381 3.184 3.184 0 0 0-3.239-3.114h-.012z" fill="{secondaryColor}"/><path d="m11.999.922a10.908 10.908 0 0 0-11.076 10.732 10.639 10.639 0 0 0 4.418 8.598l6.658 6.464 6.658-6.463a10.537 10.537 0 0 0 2.198-15.041 11.182 11.182 0 0 0-8.856-4.289zm1.873 14.341a4.221 4.221 0 0 1-5.589-1.789 3.945 3.945 0 0 1-.445-1.8 4.164 4.164 0 0 1 8.323-.037 4.028 4.028 0 0 1-2.289 3.626Z" fill="{color}"/><path d="m11.999 28-7.256-7.044a11.611 11.611 0 0 1-4.743-9.303 11.844 11.844 0 0 1 11.988-11.652.102 .102 0 0 1 .02 0 12.164 12.164 0 0 1 9.577 4.647 11.357 11.357 0 0 1 2.299 8.614 11.521 11.521 0 0 1-4.63 7.695zm-.01-26.157a9.997 9.997 0 0 0-10.143 9.812 9.769 9.769 0 0 0 4.04 7.853l.099.083 6.014 5.838 6.113-5.922a9.7 9.7 0 0 0 3.945-6.505 9.533 9.533 0 0 0-1.933-7.229 10.305 10.305 0 0 0-8.116-3.931h-.021zm.021 14.772a5.11 5.11 0 0 1-4.547-2.718 4.868 4.868 0 0 1 .932-5.743 5.118 5.118 0 0 1 3.58-1.46h.024a5.031 5.031 0 0 1 5.084 4.938 4.92 4.92 0 0 1-2.805 4.457h0a5.152 5.152 0 0 1-2.269.525zm-.011-8.079h-.015a3.277 3.277 0 0 0-2.295.933 3.029 3.029 0 0 0-.587 3.58 3.297 3.297 0 0 0 4.364 1.386h0a3.092 3.092 0 0 0 1.772-2.795 3.185 3.185 0 0 0-3.239-3.105z" fill="{secondaryColor}"/><text x="12" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"pin-round":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25 * {scale})" height="calc(25 * {scale})" viewBox="0 0 25 25"><g transform="translate(0 1)"><circle cx="12.25" cy="11.5833" r="11" fill="{color}"/><path d="m12.25 23.583a12 12 0 1 1 12-12 12 12 0 0 1-12 12zm0-22a10 10 0 1 0 10 10 10 10 0 0 0-10-10z" fill="{secondaryColor}"/><circle cx="12.25" cy="11.5833" r="4.2386" fill="{secondaryColor}"/></g><text x="12.5" y="17" style="font-size:14px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-flat":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(42.8 * {scale})" viewBox="0 0 1600 2570"><g fill="{color}"><path d="M691 2419c-409-575-641-1086-683-1504-10-106-10-136 5-224 31-188 105-330 241-458 129-124 270-190 453-214 69-9 113-10 182-1 373 46 655 326 703 698 40 308-120 801-424 1309-134 224-348 535-369 535-4 0-53-63-108-141z"/></g><g fill="rgba(0,0,0,0.15)" style="transform:scale(-1,1);transform-origin:center"><path d="M691 2419c-407-571-639-1083-682-1498-14-139-3-249 37-371 69-208 254-402 459-481 68-27 217-59 271-59h24v160 180 940 635c0 349-2 635-5 635-2 0-49-63-104-141z"/></g><circle cx="800" cy="800" r="600" fill="{secondaryColor}"/><text x="800" y="1100" style="font-size:800px;fill:#000;text-anchor:middle">{text}</text></svg>',"marker-arrow":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(25.47 * {scale})" height="calc(35.18 * {scale})" viewBox="0 0 4330 5980"><g fill="{color}"><path d="m2080 5969c-49-20-93-63-115-113-25-55-1928-5486-1953-5573-40-138 67-282 210-283 36 0 246 73 987 345 518 190 947 345 955 345 8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29-33 0-71-5-85-10z"/></g><g fill="{secondaryColor}"><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z"/><path d="m2200 1600c-36 10-83 2-484-84-243-53-451-94-461-91-11 4-22 18-25 31-5 19 114 371 436 1292 244 697 448 1273 454 1281 19 24 50 30 71 12z" style="transform:scale(-1,1);transform-origin:center"/></g><g fill="rgba(0,0,0,0.2)" ><path d="m2165 685c8 0 438-155 955-345 615-226 954-345 979-345 87 0 165 47 204 123 46 91 107-95-957 2942-537 1535-986 2805-997 2823-11 18-43 46-72 62-41 24-62 30-111 29z"/></g><text x="2165" y="3300" style="font-size:2500px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-ball-pin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15.67 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 235 452"><g transform="translate(-135 10)"><path fill="{secondaryColor}" d="m256 442 0 0c-13 0-18-11-18-24l-6-323c0-13 11-24 24-24h0c13 0 24 11 24 24l-6 323c0 13-5 24-18 24z"/><circle style="fill:{color};stroke-width:10;stroke:{secondaryColor}" cx="256" cy="112" r="111"/><ellipse transform="matrix(0.834 0.5518 -0.5518 0.834 65.7916 -97.18)" fill="rgba(255,255,255,0.3)" cx="194.399" cy="60.749" rx="19.076" ry="32.428"/></g><text x="117.5" y="160" style="font-size:160px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.67 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2000 2420"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M845 2152c-22-37-58-95-80-129-22-35-62-99-90-143l-50-80-312 0-313 0 0-900 0-900 900 0 900 0 0 900 0 900-313 0-313 0-34 58c-19 31-38 59-42 60-5 2-8 8-8 12 0 9-69 123-88 145-5 6-11 15-13 21-16 39-77 123-89 124-8 0-33-31-55-68z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(38.8 * {scale})" viewBox="0 0 2500 2910"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m866 2652c-17-31-37-68-46-82-9-14-32-54-51-90-19-36-50-92-70-125l-36-60-332-3-331-2 0-905 0-905 660 0 660 0 0-38c0-71 50-196 102-258 71-85 189-164 244-164 12 0 26-4 29-10 8-13 222-13 230 0 3 6 17 10 30 10 25 0 117 45 154 76 130 107 191 232 191 392 0 155-63 284-190 386-36 29-129 76-150 76-11 0-22 5-25 10-3 6-31 10-61 10l-54 0 0 660 0 660-332 2-332 3-29 50c-17 28-48 84-70 125-22 41-47 86-56 100-9 14-30 51-46 83-17 32-36 57-45 57-8 0-28-25-44-58z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(26.8 * {scale})" height="calc(32.27 * {scale})" viewBox="0 0 2010 2410"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="M856 2155c-20-30-36-59-36-65 0-5-4-10-10-10-5 0-10-5-10-11 0-5-18-37-40-69-22-32-40-64-40-69 0-6-4-11-10-11-5 0-10-5-10-10 0-6-15-33-32-60l-33-50-127 0c-74 0-129-4-133-10-3-5-17-10-30-10-25 0-116-45-155-76-87-69-142-151-178-265-15-46-17-1075-2-1084 5-3 10-17 10-30 0-13 5-27 10-30 6-3 10-13 10-22 0-22 83-135 122-168 57-46 62-50 112-75l50-25 585 0 586 0 63 34c84 46 169 133 212 218l35 68 0 565 0 565-28 59c-32 69-100 157-139 180-15 9-33 22-40 29-23 22-99 57-123 57-13 0-27 5-30 10-4 6-60 10-135 10l-128 0-128 205c-84 136-133 205-144 205-10 0-33-24-54-55z"/></g><text x="1000" y="1300" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',"marker-square-rounded-cluster":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(33.33 * {scale})" height="calc(32.13 * {scale})" viewBox="0 0 2500 2900"><g transform="translate(100 100)" style="stroke:{secondaryColor};stroke-width:100;fill:{color}"><path d="m874 2669c-9-18-26-49-37-68-11-20-30-55-43-78-13-24-36-64-51-90-14-27-38-69-52-95l-26-48-142 0c-84 0-144-4-148-10-3-5-17-10-30-10-25 0-118-46-154-76-91-76-136-142-175-254-13-38-16-119-16-554 0-358 3-520 12-545 40-125 106-219 195-278 127-84 116-83 646-83l467 0 0-42c0-46 11-87 45-163 54-121 169-220 306-264 46-14 232-14 278 0 165 53 284 175 340 350 19 61 14 204-10 273-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-3 6-28 10-56 10l-49 0 0 462c0 446-1 464-21 522-32 91-94 178-169 240-38 31-130 76-155 76-13 0-27 5-30 10-4 6-65 10-149 10-138 0-143 1-154 23-12 23-62 114-112 202-16 28-44 79-63 115-42 77-67 88-93 39z"/></g><text x="1650" y="900" style="font-size:1000px;fill:#fff">+</text><text x="1000" y="1800" style="font-size:1000px;fill:#fff;text-anchor:middle">{text}</text></svg>',flag:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(23.5 * {scale})" height="calc(40 * {scale})" viewBox="34 28 198 308"><path style="stroke:{secondaryColor};stroke-width:15;stroke-linecap:round;" d="M42 327l0 -291"/><path style="fill:{color};stroke:{secondaryColor};stroke-width:10;stroke-linejoin:round;" d="M49 50c70 30 104 28 178 2-21 42-21 74 0 116-72 25-101 25-178 0l0-118z"/><text x="130" y="165" style="font-size:100px;fill:#fff;text-anchor:middle">{text}</text></svg>',"flag-triangle":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(27 * {scale})" height="calc(35.33 * {scale})" viewBox="0 0 40.5 53"><g transform="translate(-31 -20)"><path fill="{secondaryColor}" d="M34.7,73.3V48.4l34.6-10.1c0.7-0.2,1.2-0.8,1.2-1.5s-0.4-1.4-1-1.7L33.7,20.5c-0.5-0.2-1.1-0.2-1.6,0.2 c-0.5,0.3-0.7,0.8-0.7,1.4v51.2H34.7z"/><polygon points="34.7,24.5 66,36.5 34.7,45 34.7,10" fill="{color}"/></g><text x="11" y="21" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(34 * {scale})" height="calc(34 * {scale})" viewBox="0 0 34 34"><g transform="translate(2 2)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17" y="22" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"rounded-square-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(38 * {scale})" height="calc(38 * {scale})" viewBox="0 0 38 38"><g transform="translate(4 4)"><rect x="0" y="0" rx="8" ry="8" width="30" height="30" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19" y="24" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',triangle:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(36 * {scale})" height="calc(36 * {scale})" viewBox="0 0 36 36"><g transform="translate(2 2)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="30" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><g transform="translate(4 4)"><polygon points="16,0 32,32 0,32 16,0" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="32" style="font-size:12px;fill:#fff;text-anchor:middle">{text}</text></svg>',hexagon:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(35 * {scale})" height="calc(40 * {scale})" viewBox="0 0 35 40"><g transform="translate(2 2)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:2;fill:{color}"/></g><text x="17.5" y="25" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(39 * {scale})" height="calc(44 * {scale})" viewBox="0 0 39 44"><g transform="translate(4 4)"><path d="M31 9 15.5 0 0 9 0 27 15.5 36 31 27 31 9Z" style="stroke:{secondaryColor};stroke-width:4;fill:{color}"/></g><text x="19.5" y="27" style="font-size:14px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1100 1100"><g transform="translate(50 50)"><path style="stroke:{secondaryColor};stroke-width:50;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="550" y="700" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"hexagon-rounded-thick":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 1200 1200"><g transform="translate(100 100)"><path style="stroke:{secondaryColor};stroke-width:100;fill:{color}" d="M881 210 561 25c-33-19-88-19-121 0L119 210c-33 19-61 67-61 105v370c0 39 27 86 61 105l321 185c33 19 88 19 122 0l321-185c33-19 61-67 61-105V315C942 276 915 229 881 210z"/></g><text x="600" y="750" style="font-size:400px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="12,0 0,24 12,17 24,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="17" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"triangle-arrow-left":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(28 * {scale})" height="calc(28 * {scale})" viewBox="0 0 28 28"><g transform="translate(2 2)"><polygon points="24,12 0,0 7,12 0,24" stroke-width="2" stroke="{secondaryColor}" fill="{color}"/></g><text x="14" y="16.5" style="font-size:8px;fill:#fff;text-anchor:middle">{text}</text></svg>',"arrow-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(12.16 * {scale})" height="calc(30.1 * {scale})" viewBox="0 0 902 364"><g fill="{color}" transform="matrix(0,2.4,-2.4,0,897,-930)"><polygon points="902,222 233,222 233,364 0,182 233,0 233,141 902,141 902,222"/></g><text x="450" y="700" style="font-size:900px;fill:#000;text-anchor:middle">{text}</text></svg>',"arrow-up-thin":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(33.33 * {scale})" viewBox="0 0 12 25"><g transform="translate(-136.91823 -751.91998)"><path fill="{color}" d="m148.271 760.71c-1.641-.547-3.186-1.47-4.633-2.769l0 18.07-1.675 0 0-18.07c-1.447 1.299-2.986 2.222-4.616 2.769l0-1.231c2.325-1.596 4.006-3.812 5.043-6.65l.838 0c1.037 2.838 2.718 5.055 5.043 6.65l0 1.231z"/></g><text x="6" y="20" style="font-size:10px;fill:#000;text-anchor:middle">{text}</text></svg>',car:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(21.93 * {scale})" height="calc(40.9 * {scale})" viewBox="0 0 6580 12270"><g transform="translate(0 12270) rotate(-90)"><path fill="{secondaryColor}" d="M7045 6566c-42-13-105-44-105-51 0-2 23-105 50-228 28-123 50-230 50-236 0-8-241-11-907-11-855 0-1145 6-1513 30-85 6-189 13-230 15-41 3-133 10-205 15-286 21-430 32-705 50-953 63-1459 18-2335-205-304-77-746-209-799-238-131-72-221-408-285-1062-34-345-42-532-48-1130-16-1557 108-2532 336-2649 32-17 469-149 676-205 409-110 819-191 1205-238 116-14 224-18 540-18 395 1 494 5 1140 50 1124 79 1224 82 2496 78l641-3-53-237c-29-131-52-238-51-239 1-1 31-14 66-29 56-23 76-26 142-23 67 3 83 7 120 33 23 17 50 41 61 55 10 14 51 117 91 230l73 205 674 3 675 2 90-39c98-43 198-72 315-93 122-21 829-18 990 5 321 45 626 143 849 270 293 168 516 378 704 662 266 402 416 893 467 1527 15 174 8 882-9 998-6 41-18 127-27 190-69 502-253 969-523 1325-79 105-262 284-381 374-189 142-355 229-574 300-336 110-526 139-952 148-457 9-685-23-887-124l-47-24-678-6-678-6-64 179c-79 224-92 253-121 284-67 70-177 97-274 66zm-2752-5073c-23-2-64-2-90 0-26 2-7 3 42 3 50 0 71-1 48-3zm395 0c-21-2-55-2-75 0-21 2-4 4 37 4 41 0 58-2 38-4z"/><path fill="{color}" d="M7043 6498c-13-6-23-19-23-28 0-9 23-117 50-240 28-123 50-230 50-237 0-22-2126-13-2465 10-132 10-400 28-595 42-661 47-824 55-1160 62-435 7-656-8-1040-73-415-70-865-183-1447-365-168-53-272-556-325-1569-16-319-16-1311 0-1630 45-872 129-1366 257-1518 22-26 51-39 172-77 557-177 1122-310 1563-369 271-36 351-40 690-40 361 1 463 6 1165 54 1122 78 1288 83 2337 79 460-2 840-7 843-11 4-4-17-117-47-252l-55-245 39-16c76-30 180-8 224 47 10 13 54 124 98 246l79 222 709 0 709 0 47-24c74-37 219-83 322-101 122-22 606-32 802-16 374 29 658 102 933 238 124 62 271 155 361 230l61 51 6 100c19 278 103 497 247 643 88 89 173 136 278 152l70 11 41 131c116 369 159 673 168 1170 10 584-38 984-167 1397l-40 126-70 12c-193 33-348 175-441 405-56 139-89 302-89 445 0 43-3 47-58 91-290 235-644 384-1068 450-191 29-796 39-974 16-135-18-263-54-368-102l-75-35-701 0-701 0-79 223c-82 232-102 267-163 293-38 16-138 17-170 2zm-2023-820c332-15 1155-12 1835 6 308 8 563 12 566 8 4-4 10-21 13-38 7-30 6-31-92-77-518-244-1197-396-2112-474-295-25-1282-25-1579 0-231 20-473 46-479 51-6 7 49 110 93 171 160 226 416 335 855 365 142 10 539 5 900-12zm3304-263c525-111 899-887 934-1935 19-557-37-1023-172-1435-186-563-521-900-896-899-81 0-158 14-525 92-426 91-431 92-540 146-195 96-287 207-306 368-12 104-11 2985 1 3078 22 170 135 291 365 389 49 21 191 55 480 115 226 47 419 87 430 89 45 10 164 6 229-8zm-5570-485c112-43 197-156 216-291 12-83 13-2623 1-2706-23-158-125-273-270-304-44-9-100-1-542 75-272 47-514 91-539 98-266 68-487 424-594 958-56 280-70 548-40 800 56 484 207 878 414 1081 115 114 122 116 702 218 277 49 524 90 550 90 26 1 72-8 102-19zm2111-3440c1023-44 1884-213 2462-486l113-53-7-33c-3-18-8-35-10-37-2-3-236 1-521 7-993 24-1271 26-1708 11-541-18-1128-18-1249-1-377 56-588 181-734 437-32 55-41 79-32 84 12 8 246 32 491 51 356 28 815 36 1195 20z"/></g><text x="3250" y="8250" style="font-size:3000px;fill:#fff;text-anchor:middle">{text}</text></svg>',checker:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 16 16"><pattern id="p" x="0" y="0" width="16" height="16" patternUnits="userSpaceOnUse"><rect fill="{color}" x="0" width="8" height="8" y="0"/><rect fill="{color}" x="8" width="8" height="8" y="8"/></pattern><rect x="0" y="0" width="16" height="16" fill="{secondaryColor}"/><rect x="0" y="0" width="16" height="16" fill="url(#p)"/></svg>',"checker-rotated":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(16 * {scale})" height="calc(16 * {scale})" viewBox="0 0 60 60"><rect width="60" height="60" fill="{secondaryColor}"/><rect width="42.42" height="42.42" transform="translate(30 0) rotate(45)" fill="{color}"/></svg>',"zig-zag":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 120 60 120 90 90 120 60 120 0 120 0 60 60 0 0 0 60 30 90 60 120 120 120"/></svg>',"zig-zag-vertical":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(15 * {scale})" height="calc(15 * {scale})" viewBox="0 0 120 120"><rect x="0" y="0" width="120" height="120" fill="{secondaryColor}"/><polygon fill="{color}" points="120 0 120 60 90 30 60 0 0 0 0 0 60 60 0 120 60 120 90 90 120 60 120 0"/></svg>',"circles-spaced":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="2" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',circles:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(7 * {scale})" height="calc(7 * {scale})" viewBox="0 0 20 20"><defs><pattern id="p" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="6" stroke="none" fill="{color}"/></pattern></defs><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><rect x="0" y="0" width="100" height="100" fill="url(#p)"/></svg>',"diagonal-lines-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-lines-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"diagonal-stripes-up":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"diagonal-stripes-down":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(14 * {scale})" height="calc(14 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(45 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}" transform="rotate(-45 3 3)"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-lines":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(18 * {scale})" height="calc(18 * {scale})" viewBox="0 0 6 6"><rect x="0" y="0" width="6" height="6" fill="{secondaryColor}"/><g transform="rotate(90 3 3)" fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g><g fill="{color}"><path d="M5 0h1L0 6V5zM6 5v1H5z"/></g></svg>',"rotated-grid-stripes":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(20 * {scale})" height="calc(20 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="40" height="40" fill="{secondaryColor}"/><g transform="rotate(90 20 20)" fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g><g fill="{color}"><path d="M0 40L40 0H20L0 20M40 40V20L20 40"/></g></svg>',"x-fill":'<svg xmlns="http://www.w3.org/2000/svg" width="calc(40 * {scale})" height="calc(40 * {scale})" viewBox="0 0 40 40"><rect x="0" y="0" width="45.3" height="45.3" fill="{secondaryColor}"/><g fill="{color}"><path d="M0 38.59l2.83-2.83 1.41 1.41L1.41 40H0v-1.41zM0 1.4l2.83 2.83 1.41-1.41L1.41 0H0v1.41zM38.59 40l-2.83-2.83 1.41-1.41L40 38.59V40h-1.41zM40 1.41l-2.83 2.83-1.41-1.41L38.59 0H40v1.41zM20 18.6l2.83-2.83 1.41 1.41L21.41 20l2.83 2.83-1.41 1.41L20 21.41l-2.83 2.83-1.41-1.41L18.59 20l-2.83-2.83 1.41-1.41L20 18.59z"/></g></svg>',dots:'<svg xmlns="http://www.w3.org/2000/svg" width="calc(13 * {scale})" height="calc(13 * {scale})" viewBox="0 0 20 20"><rect x="0" y="0" width="20" height="20" fill="{secondaryColor}"/><g fill="{color}"><circle cx="3" cy="3" r="3"/><circle cx="13" cy="13" r="3"/></g></svg>'},kl=(Ml.getHighContrastMode=function(){return matchMedia("(-ms-high-contrast: white-on-black)").matches?"dark":matchMedia("(-ms-high-contrast: black-on-white)").matches?"light":matchMedia("(-ms-high-contrast: active)").matches?"dark":matchMedia("(inverted-colors: inverted)").matches?"invert":null},Ml);function Ml(){}var El,Al,jl=((window&&window.__extends||(El=function(t,e){return(El=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}El(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Tl,Al=v),Tl);function Tl(){var t=null!==Al&&Al.apply(this,arguments)||this;return t.copyrightMessage=void 0,t.copyrightContent=void 0,t.customAttribution=void 0,t.showFeedbackLink=!0,t.showLogo=!0,t}var Il,zl,Dl=((window&&window.__extends||(Il=function(t,e){return(Il=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Il(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Rl,zl=W),Rl.prototype.onAdd=function(t){return this.container=this.buildContainer(t,u.ControlStyle.auto),this.container.className="map-copyright",this.copyrightDiv=this.buildCopyrightDiv(),this.copyrightDiv.className="azure-map-copyright",this.container.appendChild(this.copyrightDiv),this.options.showLogo&&this.addRemoveLogo(!0),this.options.showFeedbackLink&&this.addRemoveFeedbackDiv(!0),this.container},Rl.prototype.onRemove=function(){zl.prototype.onRemove.call(this),delete this.container},Rl.prototype.setOptions=function(t){var e=this,o=(new jl).merge(this.options,t);o.copyrightMessage===this.options.copyrightMessage&&o.customAttribution===this.options.customAttribution||(this.copyrightDiv.innerText=this.textAttribution(o)),o.copyrightContent!==this.options.copyrightContent&&(this.options.copyrightContent&&(t=Array.from(this.copyrightDiv.children).find(function(t){return t===e.options.copyrightContent}),this.copyrightDiv.removeChild(t)),0<this.copyrightDiv.childNodes.length?this.copyrightDiv.insertBefore(o.copyrightContent,this.copyrightDiv.childNodes[0]):this.copyrightDiv.appendChild(o.copyrightContent),this.options.copyrightContent=o.copyrightContent),!o.showLogo&&this.logoAnchor?this.addRemoveLogo(!1):o.showLogo&&!this.logoAnchor&&this.addRemoveLogo(!0),!o.showFeedbackLink&&this.feedbackAnchor?this.addRemoveFeedbackDiv(!1):o.showFeedbackLink&&!this.feedbackAnchor&&this.addRemoveFeedbackDiv(!0),this.options=o},Rl.prototype.getDefaultAttributions=function(){var t=(new Date).getFullYear(),e=["©"+t+" TomTom"];return this.options.showLogo||e.push("©"+t+" Microsoft"),e},Rl.prototype.buildCopyrightDiv=function(){var t=document.createElement("div");return t.innerText=this.textAttribution(this.options)||"",t},Rl.prototype.buildFeedbackLink=function(){var t=document.createElement("a");return t.setAttribute("alt","Give Feedback"),t.setAttribute("aria-label","Give Feedback"),t.href="https://feedback.azuremaps.com",t.target="_blank",t.rel="noopener",t.className="azure-map-feedback",t},Rl.prototype.addRemoveFeedbackDiv=function(t){t?(this.feedbackAnchor=this.buildFeedbackLink(),this.tooltip=A("Give Feedback"),this.container.appendChild(this.feedbackAnchor),this.container.appendChild(this.tooltip),j(this.tooltip,this.feedbackAnchor)):(this.feedbackAnchor.remove(),this.tooltip.remove(),delete this.tooltip,delete this.feedbackAnchor)},Rl.prototype.addRemoveLogo=function(t){t?(this.logoAnchor=document.createElement("a"),this.logoAnchor.className="azure-map-logo",this.logoAnchor.href="https://microsoft.com",this.logoAnchor.setAttribute("aria-label","Microsoft"),this.container.appendChild(this.logoAnchor),this.logoTooltip=A("Visit microsoft.com"),this.container.appendChild(this.logoTooltip),j(this.logoTooltip,this.logoAnchor)):(this.logoAnchor.remove(),this.logoTooltip.remove(),delete this.logoAnchor)},Rl);function Rl(t){var e=zl.call(this)||this;return e.textAttribution=function(t){return[e.options.copyrightMessage,e.options.customAttribution].filter(function(t){return t}).join("")},e.options=(new jl).merge(t),e}window&&window.__assign,window&&window.__awaiter,window&&window.__generator,window&&window.__read;var Bl,Fl,Nl=function(t){var o=this;this.addToMap=function(){o.initializeMapLiveStateInfo(),o.initializeMapStyleInfo(),o.createMapKeyBindingInfo(),o.map.getMapContainer().setAttribute("role","application"),o.map.getMapContainer().setAttribute("aria-label","Map Application"),o.map.getCanvasContainer().setAttribute("aria-live","polite"),o.map.getCanvasContainer().setAttribute("aria-describedby","atlas-map-state atlas-map-style"),o.map.getCanvas().setAttribute("aria-label","Interactive Map"),o.map.getCanvas().setAttribute("aria-describedby","atlas-map-shortcuts"),o.map.getCanvas().setAttribute("alt","Interactive Map")},this.removeFromMap=function(){null!=o.mapViewDesc&&o.mapViewDesc.dispose(),delete o.mapViewDesc,null!=o.atlasMapKeyBindings&&o.map.getCanvasContainer().removeChild(o.atlasMapKeyBindings),delete o.atlasMapKeyBindings,null!=o.atlasMapLiveStateInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapLiveStateInfo),delete o.atlasMapLiveStateInfo,null!=o.atlasMapStyleInfo&&o.map.getCanvasContainer().removeChild(o.atlasMapStyleInfo),delete o.atlasMapStyleInfo,o.map.getMapContainer().removeAttribute("role"),o.map.getMapContainer().removeAttribute("aria-label"),o.map.getCanvasContainer().removeAttribute("aria-live"),o.map.getCanvasContainer().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("aria-label"),o.map.getCanvas().removeAttribute("aria-describedby"),o.map.getCanvas().removeAttribute("alt"),o.map.events.remove("stylechanged",o.updateMapStyle)},this.createMapKeyBindingInfo=function(){o.atlasMapKeyBindings=document.createElement("div"),o.atlasMapKeyBindings.setAttribute("tabindex","-1"),o.atlasMapKeyBindings.setAttribute("aria-hidden","true"),o.atlasMapKeyBindings.id="atlas-map-shortcuts",o.atlasMapKeyBindings.classList.add("hidden-accessible-element"),o.atlasMapKeyBindings.innerHTML=["Map shortcuts:","Zoom out: hyphen.","Zoom in: plus.","Pan right 100 pixels: right arrow.","Pan left 100 pixels: left arrow.","Pan up 100 pixels: up arrow.","Pan down 100 pixels: down arrow.","Rotate 15 degrees clockwise: shift + right arrow.","Rotate 15 degrees counter clockwise: shift + left arrow.","Increase pitch 10 degrees: shift + up arrow.","Decrease pitch 10 degrees: shift + down arrow.","Jump focus to the map: Escape."].join("\n"),o.map.getCanvasContainer().appendChild(o.atlasMapKeyBindings);var t=[189,187,38,37,39,40],e=o.map._getMap()._canvas;null!=e&&e.addEventListener("keyup",function(e){t.find(function(t){return e.keyCode===t})&&(o.atlasMapKeyBindings.innerHTML="")})},this.initializeMapLiveStateInfo=function(){},this.initializeMapStyleInfo=function(){o.atlasMapStyleInfo=document.createElement("div"),o.atlasMapStyleInfo.setAttribute("tabindex","-1"),o.atlasMapStyleInfo.setAttribute("aria-hidden","true"),o.atlasMapStyleInfo.id="atlas-map-style",o.atlasMapStyleInfo.classList.add("hidden-accessible-element"),o.map.events.add("stylechanged",o.updateMapStyle),o.map.getCanvasContainer().appendChild(o.atlasMapStyleInfo)},this.updateMapStyle=function(){o.atlasMapStyleInfo.innerHTML="<p>Map style: "+o.map.getStyle().style+".</p>"},this.updateMapState=function(t){o.atlasMapLiveStateInfo.innerHTML=t},this.map=t},Zl=function(t){var o=this;this.listenerEnabled=!1,this.lastFlowMode="none",this.addToMap=function(){if(!o.map._isReady())throw new Error("Traffic flow could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before enabling traffic flow.");o.listenerEnabled||(o.map.events.add("styledata",o.addToMap),o.listenerEnabled=!0);var t,e=o.map.getTraffic();"none"===e.flow||(t=o.map.layers.getLayerById("traffic_"+e.flow))&&(o.lastFlowMode=e.flow,t._updateLayoutProperty("visibility","visible","none"))},this.removeFromMap=function(){var t;o.map.getTraffic();"none"!=o.lastFlowMode&&((t=o.map.layers.getLayerById("traffic_"+o.lastFlowMode))&&t._updateLayoutProperty("visibility","none","visible"),o.lastFlowMode="none"),o.listenerEnabled&&(o.map.events.remove("styledata",o.addToMap),o.listenerEnabled=!1)},this.map=t},ql=((window&&window.__extends||(Bl=function(t,e){return(Bl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Bl(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Hl,Fl=v),Hl);function Hl(){var t=null!==Fl&&Fl.apply(this,arguments)||this;return t.interactive=!0,t.scrollZoomInteraction=!0,t.boxZoomInteraction=!0,t.dragRotateInteraction=!0,t.dragPanInteraction=!0,t.keyboardInteraction=!0,t.dblClickZoomInteraction=!0,t.touchInteraction=!0,t.touchRotate=!0,t.wheelZoomRate=1/450,t}var Ul=(Gl.prototype.enable=function(){this.map.getMapContainer().addEventListener("keydown",this._onKeyDown)},Gl.prototype.disable=function(){this.map.getMapContainer().removeEventListener("keydown",this._onKeyDown)},Gl);function Gl(t){var e=this;this._onKeyDown=function(t){27===t.keyCode&&e.map.getCanvas().focus()},this.map=t}var Wl=(Vl.prototype.enable=function(){this.map.getCanvasContainer().addEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().addEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().addEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().addEventListener("touchend",this._onTouchEnd)},Vl.prototype.disable=function(){this.map.getCanvasContainer().removeEventListener("gesturestart",this._onGestureStart),this.map.getCanvasContainer().removeEventListener("gesturechange",this._onGestureChange),this.map.getCanvasContainer().removeEventListener("touchstart",this._onTouchStart),this.map.getCanvasContainer().removeEventListener("touchend",this._onTouchEnd)},Vl);function Vl(t){var e=this;this._onGestureStart=function(t){e.hasTouch||(t.preventDefault(),e.initZoom=e.map.getCamera().zoom)},this._onGestureChange=function(t){e.hasTouch||(t.preventDefault(),e.map.setCamera({zoom:e.initZoom+t.scale-1}))},this._onTouchStart=function(t){e.hasTouch=!0},this._onTouchEnd=function(t){0===t.touches.length&&(e.hasTouch=!1)},this.map=t}var Kl=(Yl.prototype.addToMap=function(){this.added||(this.added=!0,this._setInteractions(this.options))},Yl.prototype.removeFromMap=function(){this.added&&(this.added=!1,this._setInteractions({interactive:!1}))},Yl.prototype.setOptions=function(t){this.options=(new ql).merge(this.options,t),this.added&&this._setInteractions(this.options)},Yl.prototype.getOptions=function(){return Object.assign({},this.options)},Yl.prototype._setInteractions=function(t){var e;t.interactive?(t.boxZoomInteraction?this.map._getMap().boxZoom.enable():this.map._getMap().boxZoom.disable(),t.dblClickZoomInteraction?this.map._getMap().doubleClickZoom.enable():this.map._getMap().doubleClickZoom.disable(),t.dragPanInteraction?this.map._getMap().dragPan.enable():this.map._getMap().dragPan.disable(),t.dragRotateInteraction?this.map._getMap().dragRotate.enable():this.map._getMap().dragRotate.disable(),t.keyboardInteraction?(this.map._getMap().keyboard.enable(),this.focusShortcut.enable()):(this.map._getMap().keyboard.disable(),this.focusShortcut.disable()),t.scrollZoomInteraction?(this.map._getMap().scrollZoom.enable(),this.map._getMap().scrollZoom.setWheelZoomRate(t.wheelZoomRate)):this.map._getMap().scrollZoom.disable(),e=this.map._getMap().touchZoomRotate,t.touchInteraction?(e.enable(),t.touchRotate?e.enableRotation():e.disableRotation()):e.disable(),this.pinchZoom.enable()):(this.map._getMap().boxZoom.disable(),this.map._getMap().doubleClickZoom.disable(),this.map._getMap().dragPan.disable(),this.map._getMap().dragRotate.disable(),this.map._getMap().keyboard.disable(),this.focusShortcut.disable(),this.map._getMap().scrollZoom.disable(),this.map._getMap().touchZoomRotate.disable(),this.pinchZoom.disable())},Yl);function Yl(t,e){this.added=!1,this.map=t,this.focusShortcut=new Ul(t),this.pinchZoom=new Wl(t),this.options=(new ql).merge(e)}var Jl=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},$l=(Xl.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=Jl(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._add(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._add(t,e)},Xl.prototype.getControls=function(){return Array.from(this.controls)},Xl.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=Jl(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._remove(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._remove(t)},Xl.prototype._add=function(t,e){this.controls.add(t);var o=(new D).merge(e),t=t.onAdd(this.map,e),e=this.controlContainer.getElementsByClassName(o.position);if(!(0<e.length))throw new Error("Control position "+o.position+" does not exist.");e.item(0).appendChild(t)},Xl.prototype._remove=function(t){t.onRemove(),this.controls.delete(t)},Xl);function Xl(t){for(var e in this.map=t,this.controlContainer=document.createElement("div"),this.controlContainer.classList.add("atlas-control-container"),u.ControlPosition){var o;u.ControlPosition.hasOwnProperty(e)&&((o=document.createElement("div")).classList.add(u.ControlPosition[e]),o.classList.add("subcontrol-container"),this.controlContainer.appendChild(o))}this.map.getMapContainer().appendChild(this.controlContainer),this.controls=new Set}var Ql=window&&window.__assign||function(){return(Ql=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},tu=(eu.prototype.addCallback=function(s,a,c,t,l){var e,u,p=this;if(t)e=function(t){var e=t.lngLat?new ni(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?[t.point.x,t.point.y]:void 0,n=t.features?t.features.map(function(t){return new Vn(t.geometry,t.properties,t.id)}):[],n={type:t.type,originalEvent:t.originalEvent,position:e,coordinate:o,features:n};c(n)};else switch(s){case"data":case"sourcedata":case"styledata":e=function(t){t=Ql(Ql({dataType:t.dataType},"source"===t.dataType&&Ql(Ql(Ql({isSourceLoaded:t.isSourceLoaded},t.sourceDataType&&{sourceDataType:t.sourceDataType}),{source:p.map.sources.getById(t.sourceId)}),t.tile&&{tile:{id:{x:t.tile.tileID.canonical.x,y:t.tile.tileID.canonical.y,z:t.tile.tileID.canonical.z},size:t.tile.tileSize,state:t.tile.state}})),{map:p.map,type:t.type});l&&p.map.events._removeListener(s,a,c),c(t)};break;case"error":e=function(t){t={error:t.error,map:p.map,type:t.type};l&&p.map.events._removeListener(s,a,c),c(t)};break;case"touchstart":case"touchend":case"touchmove":case"touchcancel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.point?new $n(t.point.x,t.point.y):void 0,o=t.points?t.points.map(function(t){return new $n(t.x,t.y)}):[],n=t.lngLat?new ni(t.lngLat.lng,t.lngLat.lat):void 0,r=t.lngLats?t.lngLats.map(function(t){return new ni(t.lng,t.lat)}):[],i=n?p.map.layers.getRenderedShapes(new Qn(n),a?[a]:void 0):[],i={map:p.map,originalEvent:t.originalEvent,pixel:e,pixels:o,position:n,positions:r,shapes:i,layerId:a||void 0,preventDefault:function(){return t.preventDefault()},type:t.type};l&&p.map.events._removeListener(s,a,c),c(i)};break;case"mousedown":case"mouseup":case"mouseover":case"mousemove":case"click":case"dblclick":case"mouseout":case"mouseenter":case"mouseleave":case"contextmenu":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e=t.lngLat?new ni(t.lngLat.lng,t.lngLat.lat):void 0,o=t.point?new $n(t.point.x,t.point.y):void 0,n=e?p.map.layers.getRenderedShapes(new Qn(e),a?[a]:void 0):[],n={map:p.map,originalEvent:t.originalEvent,position:e,pixel:o,preventDefault:function(){return t.preventDefault()},shapes:n,layerId:a||void 0,type:t.type};l&&p.map.events._removeListener(s,a,c),c(n)};break;case"styleimagemissing":e=function(t){l&&p.map.events._removeListener(s,a,c),c(t.id)};break;case"wheel":e=function(t){if(t.originalEvent){if(t.originalEvent===u)return;u=t.originalEvent}var e={map:p.map,originalEvent:t.originalEvent,preventDefault:function(){return t.preventDefault()},type:t.type};l&&p.map.events._removeListener(s,a,c),c(e)};break;case"resize":e=function(t){var e,o={map:p.map,type:t.type};for(e in t)"type"!==e&&"target"!==e&&(o[e]=t[e]);l&&p.map.events._removeListener(s,a,c),c(o)};break;default:e=function(t){var e={map:p.map,type:t.type};t.originalEvent&&(e.originalEvent=t.originalEvent),l&&p.map.events._removeListener(s,a,c),c(e)}}this.callbacks.has(a)||this.callbacks.set(a,new N),this.callbacks.get(a).has(s)||this.callbacks.get(a).set(s,new Map),this.callbacks.get(a).get(s).set(c,[e,l])},eu.prototype.removeCallback=function(t,e,o){this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o)&&this.callbacks.get(e).get(t).delete(o)},eu.prototype.getModifiedCallback=function(t,e,o){if(this.callbacks.has(e)&&this.callbacks.get(e).has(t)&&this.callbacks.get(e).get(t).has(o))return this.callbacks.get(e).get(t).get(o)[0]},eu.prototype.getLayerCallbacks=function(t){if(this.callbacks.has(t))return this.callbacks.get(t)},eu.prototype.getEventCallbacks=function(t,e){if(this.callbacks.has(e)){e=this.callbacks.get(e);if(e.has(t))return e.get(t)}},eu);function eu(t){this.callbacks=new N,this.map=t}var ou=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},nu=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},ru=["maxzoomchanged","minzoomchanged","mapconfigurationchanged"],iu=(su.prototype.add=function(t,e,o){var n,r;if("function"==typeof e)this._addGlobalListener(t,e,!1,!1);else{e=Array.isArray(e)?e:[e];try{for(var i=ou(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof ls&&ls._isMBoxEvent(t)?this._addLayerListener(t,a,o,!1,!1):a._addEventListener(t,o,!1)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},su.prototype.addOnce=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!1,!0):e instanceof ls&&ls._isMBoxEvent(t)?this._addLayerListener(t,e,o,!1,!0):e._addEventListener(t,o,!0)},su.prototype._addLegacy=function(t,e,o){"function"==typeof e?this._addGlobalListener(t,e,!0,!1):this._addLayerListener(t,e,o,!0,!1)},su.prototype._addLayerListener=function(t,e,o,n,r){var i,s,a,c,l=e instanceof ls?e.getId():e,e=this.map.layers.getLayerById(l),u=this.mapCallbackHandler.getModifiedCallback(t,l,o);if(u&&e)try{for(var p=ou(e._getLayerIds()),h=p.next();!h.done;h=p.next()){var d=h.value;this.map._getMap().off(t,d,u)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(s=p.return)&&s.call(p)}finally{if(i)throw i.error}}if(this.mapCallbackHandler.addCallback(t,l,o,n,r),e){u=this.mapCallbackHandler.getModifiedCallback(t,l,o);try{for(var f=ou(e._getLayerIds()),y=f.next();!y.done;y=f.next()){d=y.value;this.map._getMap().on(t,d,u)}}catch(t){a={error:t}}finally{try{y&&!y.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}}},su.prototype._addGlobalListener=function(t,e,o,n){var r,i,s,a;ru.includes(t)?this.map._addEventListener(t,e,n):(r=this.mapCallbackHandler.getModifiedCallback(t,"",e),this.mapCallbackHandler.addCallback(t,"",e,o,n),i=this.mapCallbackHandler.getModifiedCallback(t,"",e),"load"===t&&this.map._isLoaded()?(s={type:"load",map:this.map},setTimeout(function(){return i(s)})):"ready"===t?this.map._isReady()&&(a={type:"ready",map:this.map},setTimeout(function(){return i(a)})):(r&&this.map._getMap().off(t,r),this.map._getMap().on(t,i)))},su.prototype.invoke=function(t,e,o){if(void 0===o)this._invokeListeners(t,"",e);else if(e instanceof ls&&ls._isMBoxEvent(t))this._invokeListeners(t,e.getId(),o);else{if(!(e instanceof Z))throw new Error("The invoke target is invalid.");e._invokeEvent(t,o)}},su.prototype._invokeListeners=function(o,n,r){var i=this,t=new N(this.mapCallbackHandler.getEventCallbacks(o,n));t?t.forEach(function(t,e){t=nu(t,2),t[0];t[1]&&i._removeListener(o,n,e),e(r)}):"error"===o&&console.error("error"in r?r.error:r)},su.prototype.remove=function(t,e,o){var n,r;if("function"==typeof e)this._removeListener(t,"",e);else{e=Array.isArray(e)?e:[e];try{for(var i=ou(e),s=i.next();!s.done;s=i.next()){var a=s.value;a instanceof ls&&ls._isMBoxEvent(t)?this._removeListener(t,a,o):a._removeEventListener(t,o)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}},su.prototype._removeLegacy=function(t,e,o){"function"==typeof e?this._removeListener(t,"",e):this._removeListener(t,e,o)},su.prototype._removeListener=function(t,e,o){var n,r;if(ru.includes(t))this.map._removeEventListener(t,o);else{var i=e instanceof ls?e.getId():e,s=this.mapCallbackHandler.getModifiedCallback(t,i,o);if(s)if(i){e=this.map.layers.getLayerById(i);if(e)try{for(var a=ou(e._getLayerIds()),c=a.next();!c.done;c=a.next()){var l=c.value;this.map._getMap().off(t,l,s)}}catch(t){n={error:t}}finally{try{c&&!c.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}}else this.map._getMap().off(t,s);this.mapCallbackHandler.removeCallback(t,i,o)}},su.prototype._enableLayerEvents=function(c){var l=this,t=this.mapCallbackHandler.getLayerCallbacks(c.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=nu(t,1)[0];try{for(var r=ou(c._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;l.map._getMap().on(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},su.prototype._disableLayerEvents=function(c){var l=this,t=this.mapCallbackHandler.getLayerCallbacks(c.getId());t&&t.forEach(function(t,a){t.forEach(function(t){var e,o,n=nu(t,1)[0];try{for(var r=ou(c._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;l.map._getMap().off(a,s,n)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}})})},su);function su(t){this.map=t,this.mapCallbackHandler=new tu(this.map)}var au=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},cu=(lu.prototype.add=function(t,e){var o,n;if(Array.isArray(t))try{for(var r=au(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addMarker(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addMarker(t,e)},lu.prototype._addMarker=function(t,e){t._addToMap(this.map,e),this.markers.add(t)},lu.prototype.getMarkers=function(){return Array.from(this.markers)},lu.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=au(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeMarker(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeMarker(t)},lu.prototype._removeMarker=function(e){var o=this;e instanceof mc?(e._removeFromMap(),this.markers.delete(e)):this.markers.forEach(function(t){t._getId()===e&&(t._removeFromMap(),o.markers.delete(t))})},lu.prototype.clear=function(){var e=this;this.markers.forEach(function(t){t._removeFromMap(),e.markers.delete(t)})},lu);function lu(t){this.markers=new Set,this.map=t}var uu=(pu.prototype.add=function(s,e,a){var c=this;return new Promise(function(o,n){var r,t,i;c.userImages.has(s)?o():e instanceof HTMLImageElement||e instanceof ImageData?(c.map._getMap().addImage(s,e,a),c.userImages.set(s,{image:e,meta:a}),o()):"string"==typeof e&&(t=void 0,t=/<svg/i.test(e)&&!/^data:/i.test(e)?"data:image/svg+xml;base64,"+window.btoa(e):e,i=!1,c.map._sendRequest(t,"Image").then(function(t){return i?void 0:t.blob()}).then(function(t){var e;!i&&t&&(clearTimeout(r),(e=new Image).onload=function(){c.map._getMap().addImage(s,e,a),c.userImages.set(s,{image:e,meta:a}),o()},e.onerror=e.onabort=function(){n("Failed to load image into HTML element.")},e.src=URL.createObjectURL(t))}).catch(function(){i||(clearTimeout(r),n("Failed to load image into HTML element."))}),r=setTimeout(function(){i=!0,n("Failed to load image within specified timeout: "+c.imageLoadTimeout+" ms.")},c.imageLoadTimeout))})},pu.prototype.clear=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().removeImage(e)}),this.userImages.clear()},pu.prototype.getImageIds=function(){var o=[];return this.userImages.forEach(function(t,e){o.push(e)}),o},pu.prototype.createFromTemplate=function(t,e,o,n,r){o=o||"#1A73AA",n=n||"#fff";r=(r=vl(e,r)).replace(/{color}/g,o).replace(/{secondaryColor}/g,n).replace(/{text}/g,"");return this.add(t,r)},pu.prototype.hasImage=function(t){return this.userImages.has(t)},pu.prototype.remove=function(t){this.map._getMap().removeImage(t),this.userImages.delete(t)},pu.prototype._restoreImages=function(){var o=this;this.userImages.forEach(function(t,e){o.map._getMap().hasImage(e)||o.map._getMap().addImage(e,t.image,t.meta)})},pu);function pu(t){this.userImages=new N,this.imageLoadTimeout=5e3,this.map=t}var hu,du,n=window&&window.__extends||(hu=function(t,e){return(hu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}hu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),fu=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},yu=(n(mu,du=ls),mu.prototype._buildLayers=function(){return this.layers},mu.prototype._getLayerIds=function(){return this.layers.map(function(t){return t.id})},mu.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=fu(this.layers),r=n.next();!r.done;r=n.next()){var i=r.value;"string"==typeof i.source?o.add(i.source):i.source&&o.add(i.id)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},mu.prototype._updateLayoutProperty=function(e,o,n,r){var i=this;this.layers.forEach(function(t){Un(o,n)||i.map._getMap().setLayoutProperty(t.id,e,r||o)})},mu);function mu(t,e){e=du.call(this,e)||this;return e.layers=t,e}var gu=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},vu=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},wu=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},_u=(bu.prototype.add=function(t,e){var o,n,r=e instanceof ls?e.getId():e;if(Array.isArray(t))try{for(var i=gu(t),s=i.next();!s.done;s=i.next()){var a=s.value;this._addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}else this._addLayer(t,r)},bu.prototype._addLayer=function(e,o){if(!(this.map._isReady()||e instanceof yu))throw new Error("The layer '"+e.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a layer to it.");var t,n,r,i;o!==e.getId()&&this.layerIndex.find(function(t){return o===t.getId()})?this._getMapboxLayerExists(e)?(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),i=this.layerIndex[n],this._removeMapboxLayers(e),this._addMapboxLayers(e,o),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),this.layerIndex.splice(n,1),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof yu||(this.userLayers[r]={layer:e,before:o}),i.onRemove()):(this._addMapboxLayers(e,o),this.map.events._enableLayerEvents(e),t=this.layerIndex.findIndex(function(t){return t.getId()===o}),this.layerIndex.splice(t,0,e),e instanceof yu||this.userLayers.push({layer:e,before:o})):(n=this.layerIndex.findIndex(function(t){return t.getId()===e.getId()}),r=this.userLayers.findIndex(function(t){return t.layer.getId()===e.getId()}),0<=n&&0<=r?(i=this.layerIndex[n],this._removeMapboxLayers(i),this._addMapboxLayers(e,n+1),this.map.events._disableLayerEvents(i),this.map.events._enableLayerEvents(e),(this.layerIndex[n]=e)instanceof yu||(this.userLayers[r]={layer:e,before:void 0}),i.onRemove()):(this._addMapboxLayers(e),this.map.events._enableLayerEvents(e),this.layerIndex.push(e),e instanceof yu||this.userLayers.push({layer:e,before:o}))),e.onAdd(this.map)},bu.prototype._addMapboxLayers=function(t,e){var o,n;if(!(t instanceof qa)||t.getOptions().tileUrl)if(t instanceof yu)this.map.events._enableLayerEvents(t);else{t instanceof Bs&&this.map._getMap().addSource(t._getSourceId(),t._buildSource());var r=this._getMapboxBefore(e);try{for(var i=gu(t._buildLayers()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().addLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}this.map.events._enableLayerEvents(t)}},bu.prototype._removeMapboxLayers=function(t,e){var o,n;if(t instanceof yu&&!e)this.map.events._disableLayerEvents(t);else{try{for(var r=gu(t._getLayerIds()),i=r.next();!i.done;i=r.next()){var s=i.value;this.map._getMap().getLayer(s)&&this.map._getMap().removeLayer(s)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}this.map.events._disableLayerEvents(t),t instanceof Bs&&this.map._getMap().getSource(t._getSourceId())&&this.map._getMap().removeSource(t._getSourceId())}},bu.prototype._getMapboxLayerExists=function(e){var o=this,n=!1;return"string"==typeof e?!!(e=this.layerIndex.find(function(t){return t.getId()===e})):(e._getLayerIds().forEach(function(t){o.map._getMap().getLayer(t)&&(n=!0)}),n)},bu.prototype._getMapboxBefore=function(e){var o,t,n,r;if("string"==typeof e){var i=this.layerIndex.find(function(t){return t.getId()===e});if(!i)return;try{for(var s=gu(i._getLayerIds()),a=s.next();!a.done;a=s.next()){var c=a.value;if(this.map._getMap().getLayer(c))return c}}catch(t){o={error:t}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}e=this.layerIndex.findIndex(function(t){return t.getId()===e})+1}for(var l=e;l<this.layerIndex.length;l++)try{for(var u=(n=void 0,gu(this.layerIndex[l]._getLayerIds())),p=u.next();!p.done;p=u.next()){c=p.value;if(this.map._getMap().getLayer(c))return c}}catch(t){n={error:t}}finally{try{p&&!p.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}},bu.prototype.clear=function(){for(var t=this.layerIndex.length-1;0<=t;t--){var e=this.layerIndex[t];this._removeMapboxLayers(e,!0),this.layerIndex.splice(t,1),e.onRemove()}this.userLayers=[]},bu.prototype.getLayerById=function(e){var t=this.layerIndex.find(function(t){return t.getId()===e});if(t)return t},bu.prototype.getLayers=function(){return this.layerIndex.slice(0)},bu.prototype._getSourceIds=function(){var e,t,o=new Set;try{for(var n=gu(this.layerIndex),r=n.next();!r.done;r=n.next())r.value._getSourceIds().forEach(function(t){return o.add(t)})}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return o},bu.prototype._getUserLayers=function(){return Array.from(this.userLayers)},bu.prototype.move=function(t,e){var o=t instanceof ls?t.getId():t,n=e instanceof ls?e.getId():e;if(!this.layerIndex.find(function(t){return t.getId()===o}))throw new Error("The layer '"+o+"' has not been added to the map and cannot be moved.");e=this.layerIndex.findIndex(function(t){return t.getId()===o});this._moveMapboxLayers(this.layerIndex[e],n),t=this.layerIndex[e],this.layerIndex.splice(e,1);e=this.layerIndex.findIndex(function(t){return t.getId()===n});-1<e?this.layerIndex.splice(e,0,t):this.layerIndex.push(t);t=this.userLayers.find(function(t){return t.layer.getId()===o});t&&(t.before=n)},bu.prototype._moveMapboxLayers=function(t,e){var o,n,r=this._getMapboxBefore(e);try{for(var i=gu(t._getLayerIds()),s=i.next();!s.done;s=i.next()){var a=s.value;this.map._getMap().moveLayer(a,r)}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}},bu.prototype.getRenderedShapes=function(t,e,o){var n,r,i,s=this;if(t=t||[-180,-85.0511,180,85.0511],Array.isArray(t)?4===t.length||6===t.length?i=this.map.positionsToPixels([yi.getSouthWest(t),yi.getNorthEast(t)]):2!==t.length&&3!==t.length||(i=this.map.positionsToPixels([t])[0]):i=this.map.positionsToPixels([t.coordinates])[0],e){e=Array.isArray(e)?e:[e];var a=[],c=this;try{for(var l=gu(e),u=l.next();!u.done;u=l.next())!function(t){var e=t instanceof ls?t.getId():t,t=c.layerIndex.findIndex(function(t){return t.getId()===e});if(!(-1<t))throw new Error("The layer '"+e+"' has not been added to the map and its rendered features cannot be retrieved.");a.push.apply(a,wu([],vu(c.layerIndex[t]._getLayerIds().filter(function(t){return!!s.map._getMap().getLayer(t)}))))}(u.value)}catch(t){n={error:t}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}o=this.map._getMap().queryRenderedFeatures(i,{layers:a,filter:o});return this.map.sources._mapFeaturesToShapes(o)},bu.prototype.remove=function(t){var e,o;if(Array.isArray(t))try{for(var n=gu(t),r=n.next();!r.done;r=n.next()){var i=r.value;this._removeLayer(i)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}else this._removeLayer(t)},bu.prototype._removeLayer=function(t){var e=t instanceof ls?t.getId():t,o=this.layerIndex.findIndex(function(t){return t.getId()===e});if(-1==o)throw new Error("The layer '"+e+"' has not been added to the map and cannot be removed.");t=this.layerIndex[o];this._removeMapboxLayers(t),this.layerIndex.splice(o,1);o=this.userLayers.findIndex(function(t){return t.layer.getId()===e});-1!=o&&this.userLayers.splice(o,1),t.onRemove()},bu);function bu(t){this.layerIndex=[],this.userLayers=[],this.map=t}var xu=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Cu=(Ou.prototype.add=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=xu(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)||(this.popups.add(i),i.attach(this.map))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Ou.prototype.clear=function(){var e=this;this.popups.forEach(function(t){e.popups.delete(t),t.remove()})},Ou.prototype.remove=function(t){var e,o;t=Array.isArray(t)?t:[t];try{for(var n=xu(t),r=n.next();!r.done;r=n.next()){var i=r.value;this.popups.has(i)&&(this.popups.delete(i),i.remove())}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},Ou.prototype.getPopups=function(){return Array.from(this.popups)},Ou.prototype._getCollectionDiv=function(){var t=this.map.getMapContainer().querySelector("."+Ou.Css.collection);return t||((t=document.createElement("div")).classList.add(Ou.Css.collection),t.setAttribute("aria-label","Map Information"),this.map.getMapContainer().appendChild(t)),t},Ou.prototype._addDraggedPopup=function(t){0===this.draggedPopups.size&&(this.map.getMapContainer().addEventListener("mousemove",this._onDrag),this.map.getMapContainer().addEventListener("touchmove",this._onDrag),this.map.getMapContainer().addEventListener("mouseup",this._onUp),this.map.getMapContainer().addEventListener("touchend",this._onUp)),this.draggedPopups.add(t)},Ou.Css={collection:"popup-collection-container"},Ou);function Ou(t){var n=this;this._onDrag=function(t){var e,o;"mousemove"===t.type?(e=t.clientX,o=t.clientY):"touchmove"===t.type&&(e=t.touches[0].clientX,o=t.touches[0].clientY),n.draggedPopups.forEach(function(t){t._dragToPixel([e,o])})},this._onUp=function(){n.map.getMapContainer().removeEventListener("mousemove",n._onDrag),n.map.getMapContainer().removeEventListener("touchmove",n._onDrag),n.map.getMapContainer().removeEventListener("mouseup",n._onUp),n.map.getMapContainer().removeEventListener("touchend",n._onUp),n.draggedPopups.forEach(function(t){n.draggedPopups.delete(t),t._onUp()})},this.map=t,this.popups=new Set,this.draggedPopups=new Set}var Su,Pu,m=window&&window.__extends||(Su=function(t,e){return(Su=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Su(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Lu=window&&window.__assign||function(){return(Lu=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ku=(m(Mu,Pu=Vi),Mu.prototype._buildSource=function(){return this.source},Mu.prototype._modifySource=function(t,e){if(t.tiles){var o=t.tiles.map(function(t){return"string"==typeof t?t:new P({domain:r,path:t.path,queryParams:Lu(Lu({},e),t.queryParams)}).toString()});t.tiles=o}else{if(!t.url)throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");t.url="string"==typeof t.url?t.url:new P({domain:r,path:t.url.path,queryParams:Lu(Lu({},e),t.url.queryParams)}).toString()}return t},Mu);function Mu(t,e,o){t=Pu.call(this,t)||this;return t.source=t._modifySource(e,o),t}var Eu=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Au=(ju.prototype.add=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=Eu(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._addSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._addSource(t,e)},ju.prototype.getRenderedShapes=function(t,e,o){t="string"==typeof t?t:t.getId(),e=this.map._getMap().querySourceFeatures(t,{sourceLayer:o,filter:e});return this.map.sources._mapFeaturesToShapes(e,!0,this.sources.get(t))},ju.prototype._buildSources=function(){var e={};return this.sources.forEach(function(t){e[t.getId()]=t._buildSource()}),e},ju.prototype.clear=function(){var e=this;this.sources.forEach(function(t){e.remove(t)})},ju.prototype.getById=function(t){return this.sources.get(t)},ju.prototype.getSources=function(){return Array.from(this.sources.values())},ju.prototype.isSourceLoaded=function(t){t=t instanceof Vi?t.getId():t;return this.map._getMap().isSourceLoaded(t)},ju.prototype.remove=function(t,e){var o,n;if(void 0===e&&(e=!0),Array.isArray(t))try{for(var r=Eu(t),i=r.next();!i.done;i=r.next()){var s=i.value;this._removeSource(s,e)}}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}else this._removeSource(t,e)},ju.prototype._removeSource=function(t,e){t=t instanceof Vi?t.getId():t;if(this.sources.has(t)){if(this.map._getMap().getSource(t)&&e&&this.map._getMap().removeSource(t),this.map._getMap().getSource(t)&&e)throw new Error("One or more layers have a dependency on the source '"+t+"'");return this.sources.get(t)._setMap(null),void this.sources.delete(t)}throw new Error("'"+t+"' is not added to the map")},ju.prototype._addSource=function(t,e){if(this.sources.has(t.getId())){if(e)throw new Error("'"+t.getId()+"' is already added to the map");this.sources.get(t.getId())._setMap(null),this.sources.delete(t.getId())}if(e){if(!this.map._isReady())throw new Error("The source '"+t.getId()+"' could not be added to the map because the map is not ready. Please use a ready event listener to guarantee the map is ready before adding a source to it.");this.map._getMap().addSource(t.getId(),t._buildSource())}this.sources.set(t.getId(),t),t._setMap(this.map)},ju.prototype._mapFeaturesToShapes=function(t,e,o){var n,r,i=[];try{for(var s=Eu(t),a=s.next();!a.done;a=s.next()){var c=a.value;if((o||"string"==typeof c.source)&&"string"==typeof c.properties[ui._shapeIdPropName]){var l=o||this.sources.get(c.source);if(l instanceof Xi){var u=l.getShapeById(c.properties[ui._shapeIdPropName]);if(u instanceof ui){i.push(u);continue}}}e||i.push(c)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return i},ju.prototype._syncSources=function(n){var r=this;n&&(Object.keys(n).forEach(function(t){if(!r.sources.has(t)){var e=n[t];if("vector"===e.type){var o=new ku(t,{name:t,tiles:e.tiles,type:"vector",url:e.url});r.sources.set(t,o),o._setMap(r.map)}else{if("raster"!==e.type)throw new Error("Unable to construct source with ID "+t+".");o=new ku(t,{name:t,tiles:e.tiles,type:"raster",url:e.url});r.sources.set(t,o),o._setMap(r.map)}}}),Object.keys(this.sources).forEach(function(t){n.hasOwnProperty(t)||(r.sources.get(t)._setMap(null),r.sources.delete(t))}))},ju);function ju(t){this.map=t,this.sources=new N}var Tu,Iu,zu=((window&&window.__extends||(Tu=function(t,e){return(Tu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Du,Iu=v),Du);function Du(){var t=null!==Iu&&Iu.apply(this,arguments)||this;return t.duration=1e3,t.type="jump",t}var Ru,Bu,Fu=((window&&window.__extends||(Ru=function(t,e){return(Ru=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ru(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Nu,Bu=v),Nu);function Nu(){var t=null!==Bu&&Bu.apply(this,arguments)||this;return t.bottom=0,t.left=0,t.right=0,t.top=0,t}var Zu,qu,n=window&&window.__extends||(Zu=function(t,e){return(Zu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Zu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Hu=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Uu=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Gu=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},Wu=(n(Vu,qu=v),Vu.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=Hu(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&"number"==typeof s.padding&&(s.padding={top:s.padding,bottom:s.padding,left:s.padding,right:s.padding})}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return qu.prototype.merge.apply(this,Gu([],Uu(o)))},Vu);function Vu(){var t=null!==qu&&qu.apply(this,arguments)||this;return t.bounds=[-180,-89,180,90],t.maxBounds=void 0,t.maxZoom=20,t.offset=new $n(0,0),t.padding=new Fu,t}var Ku,Yu,Ju=((window&&window.__extends||(Ku=function(t,e){return(Ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Ku(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))($u,Yu=v),$u);function $u(){var t=null!==Yu&&Yu.apply(this,arguments)||this;return t.zoom=1,t.center=new ni(0,0),t.centerOffset=new $n(0,0),t.bearing=0,t.pitch=0,t.minZoom=1,t.maxZoom=20,t.maxBounds=void 0,t}var Xu,Qu,m=((window&&window.__extends||(Xu=function(t,e){return(Xu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Xu(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(tp,Qu=v),tp);function tp(){var t=null!==Qu&&Qu.apply(this,arguments)||this;return t.name=void 0,t.before=void 0,t.minZoom=1,t.maxZoom=20,t.overwrite=!1,t.opacity=1,t}var ep,op,np=((window&&window.__extends||(ep=function(t,e){return(ep=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ep(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(rp,op=m),rp);function rp(){var t=null!==op&&op.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.radius=1,t.outlineWidth=5,t.name="default-circles",t}var ip,sp,ap=((window&&window.__extends||(ip=function(t,e){return(ip=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}ip(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(cp,sp=m),cp);function cp(){var t=null!==sp&&sp.apply(this,arguments)||this;return t.cap="butt",t.join="miter",t.name="default-linestrings",t.color="#000",t.width=1,t}var lp,up,pp=((window&&window.__extends||(lp=function(t,e){return(lp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}lp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(hp,up=m),hp);function hp(){var t=null!==up&&up.apply(this,arguments)||this;return t.iconSize=1,t.fontSize=14,t.fontColor="#000",t.textFont="SegoeUi-Regular",t.cluster=!0,t.clusterIcon=void 0,t.textOffset=[0,0],t.name="default-pins",t.icon="pin-darkblue",t.title="",t}var dp,fp,yp=((window&&window.__extends||(dp=function(t,e){return(dp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}dp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(mp,fp=m),mp);function mp(){var t=null!==fp&&fp.apply(this,arguments)||this;return t.color="rgba(0,0,0,.5)",t.outlineColor="#000",t.name="default-polygons",t}var gp,vp,wp=((window&&window.__extends||(gp=function(t,e){return(gp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}gp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(_p,vp=m),_p);function _p(){var t=null!==vp&&vp.apply(this,arguments)||this;return t.name="default-raster",t}var bp,xp,Cp=((window&&window.__extends||(bp=function(t,e){return(bp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}bp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}))(Op,xp=v),Op);function Op(){var t=null!==xp&&xp.apply(this,arguments)||this;return t.anchor="map",t.color="#FFFFFF",t.intensity=.5,t.position=[1.15,210,30],t}var Sp,Pp,n=window&&window.__extends||(Sp=function(t,e){return(Sp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Sp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Lp=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},kp=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Mp=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},Ep=(n(Ap,Pp=v),Ap.prototype.merge=function(){for(var e,t,o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];try{for(var r=Lp(o),i=r.next();!i.done;i=r.next()){var s=i.value;s&&(s.hasOwnProperty("view")?s.userRegion=s.view:s.hasOwnProperty("userRegion")&&(s.view=s.userRegion),"string"==typeof s.language&&(s.language=xc.getCode(s.language)))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return Pp.prototype.merge.apply(this,Mp([],kp(o)))},Ap);function Ap(){var t=null!==Pp&&Pp.apply(this,arguments)||this;return t.antialias=void 0,t.autoResize=!0,t.language=Tc,t.light=new Cp,t.preserveDrawingBuffer=!1,t.progressiveLoading=!1,t.progressiveLoadingInitialLayerGroups=["base"],t.renderWorldCopies=!0,t.showBuildingModels=!1,t.showFeedbackLink=!0,t.showLogo=!0,t.showLabels=!0,t.customAttribution=void 0,t.showTileBoundaries=!1,t.style=void 0,t.view=Ec,t.userRegion=t.view,t}function jp(t){return 0==t.length?void 0:t.slice(1).reduce(function(o,n){return function(t,e){t=o(t,e);return zp(zp({},t),n(t.url,e))}},t[0])}var Tp,Ip,m=window&&window.__extends||(Tp=function(t,e){return(Tp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Tp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),zp=window&&window.__assign||function(){return(zp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Dp=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Rp=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Bp=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},Fp=(m(Np,Ip=v),Np.prototype.merge=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{for(var o=Dp(t),n=o.next();!n.done;n=o.next()){var r=n.value;r&&(r.authOptions?"string"==typeof r.authOptions.subscriptionKey&&(r.subscriptionKey=r["subscription-key"]=r.authOptions.subscriptionKey):"string"==typeof r.subscriptionKey?(r["subscription-key"]=r.subscriptionKey,r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r.subscriptionKey}):"string"==typeof r["subscription-key"]&&(r.subscriptionKey=r["subscription-key"],r.authOptions={authType:u.AuthenticationType.subscriptionKey,subscriptionKey:r["subscription-key"]}),"string"==typeof r.sessionId?r["session-id"]=r.sessionId:"string"==typeof r["session-id"]&&(r.sessionId=r["session-id"]),"boolean"==typeof r.disableTelemetry?r["disable-telemetry"]=r.disableTelemetry:"boolean"==typeof r["disable-telemetry"]&&(r.disableTelemetry=r["disable-telemetry"]),"boolean"==typeof r.enableAccessibility?r["enable-accessibility"]=r.enableAccessibility:"boolean"==typeof r["enable-accessibility"]&&(r.enableAccessibility=r["enable-accessibility"]))}}catch(t){a={error:t}}finally{try{n&&!n.done&&(s=o.return)&&s.call(o)}finally{if(a)throw a.error}}var i=this._transformers,s=t?t.filter(function(t){return void 0!==t}).reduce(function(t,e){return Bp(Bp([],Rp(t)),Rp(e._transformers||[]))},[]):[],a=Ip.prototype.merge.apply(this,Bp([],Rp(t)));return a.authOptions.authType!==u.AuthenticationType.subscriptionKey&&(a["subscription-key"]=a.subscriptionKey=void 0),void 0!==a.styleSet&&void 0===a.mapConfiguration&&(a.mapConfiguration=a.styleSet),a.mapConfiguration&&"string"!=typeof a.mapConfiguration&&(a.mapConfiguration=zp(zp({},a.mapConfiguration),{defaultConfiguration:a.mapConfiguration.defaultConfiguration||a.mapConfiguration.defaultStyle,configurations:a.mapConfiguration.configurations||a.mapConfiguration.styles})),this._transformers=Bp(Bp([],Rp(i||[])),Rp(s.filter(function(t){return!i.includes(t)}))),this.transformRequest&&!this._transformers.includes(this.transformRequest)&&this._transformers.push(this.transformRequest),this.transformRequest=jp(this._transformers),a},Np.prototype.addTransformer=function(t){this._transformers||(this._transformers=[]),this._transformers.push(t),this.transformRequest=jp(this._transformers)},Np.prototype.removeTransformer=function(e){this._transformers&&(this._transformers=this._transformers.filter(function(t){return e!==t}),this.transformRequest=jp(this._transformers))},Np._cloneCustomizer=function(t){if("object"==typeof t)return Object.assign({},t)},Np);function Np(){var t=null!==Ip&&Ip.apply(this,arguments)||this;return t.authOptions=Jc(),t.disableTelemetry=!1,t["disable-telemetry"]=t.disableTelemetry,t.domain=zc,t.staticAssetsDomain=Dc,t.styleDefinitionsPath=Rc,t.styleDefinitionsVersion=Bc,t.styleAPIVersion=Fc,t.mapConfiguration=void 0,t.styleSet=void 0,t.enableAccessibility=!0,t["enable-accessibility"]=t.enableAccessibility,t.enableAccessibilityLocationFallback=!0,t.maxParallelImageRequests=nl(),t.refreshExpiredTiles=!0,t.subscriptionKey=sl(),t["subscription-key"]=t.subscriptionKey,t.sessionId=Ic,t["session-id"]=t.sessionId,t._transformers=[],t.transformRequest=void 0,t.workerCount=ol(),t.fadeDuration=300,t.localIdeographFontFamily="sans-serif",t.validateStyle=!0,t}var Zp=(qp.getLayerGroup=function(t){var e=t;if(null!=e&&e.metadata&&e.metadata["microsoft.maps:layerGroup"])return e.metadata["microsoft.maps:layerGroup"];t=null!==(e=null==e?void 0:e.id)&&void 0!==e?e:t;if(t.startsWith("microsoft.")){t=t.split(".");return 4<=t.length?t[3]:void 0}},qp);function qp(){}var Hp=(Up.resolve=function(t){return new Up(Promise.resolve(t))},Up.reject=function(t){return new Up(Promise.reject(t))},Up.prototype.then=function(t,e){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).then(t,e)},Up.prototype.catch=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).catch(t)},Up.prototype.finally=function(t){var o=this;return new Promise(function(t,e){o._resolve=t,o._reject=e,o._thenResolver(t,e)}).finally(t)},Up.prototype.hijackAndResolve=function(t){this._hijackedToResolve=t,this._resolve&&this._resolve(t)},Up.prototype.hijackAndReject=function(t){this._hijackedToReject=t,this._reject&&this._reject(t)},Up.prototype.switchWith=function(t){this.origin=t,this._toResolve=void 0,this._toReject=void 0},Up);function Up(t){var r=this;this.isHijacked=function(){return void 0!==r._hijackedToResolve||void 0!==r._hijackedToReject},this.isResolved=function(){return void 0!==r._hijackedToResolve||void 0!==r._toResolve},this.isRejected=function(){return void 0!==r._hijackedToReject||void 0!==r._toReject},this.resultIfResolved=function(){return r._hijackedToResolve||r._toResolve},this.errorIfRejected=function(){return r._hijackedToReject||r._toReject},this._thenResolver=function(e,o){var n;r._hijackedToResolve?e(r._hijackedToResolve):r._hijackedToReject?o(r._hijackedToReject):(n=r.origin,r.origin.then(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toResolve=t,e(t)))}).catch(function(t){r.isHijacked()||(n!==r.origin?r._thenResolver(e,o):(r._toReject=t,o(t)))}))},this.origin=t,this[Symbol.toStringTag]=this.origin[Symbol.toStringTag]}var Gp={road:"Road",satellite:"Satellite",satellite_road_labels:"Hybrid",grayscale_dark:"Grayscale (Dark)",grayscale_light:"Grayscale (Light)",night:"Night",road_shaded_relief:"Terra",blank:"Blank",blank_accessible:"Blank (Accessible)",high_contrast_dark:"High contrast (Dark)",high_contrast_light:"High contrast (Light)"},Wp=window&&window.__assign||function(){return(Wp=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},Vp=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},Kp=window&&window.__generator||function(o,n){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(o,a)}catch(t){e=[6,t],i=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},Yp=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},Jp=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},$p=(Xp.prototype.updateIndoorState=function(t,e){var o,n,r=this,i=this.map.styles.getMapConfiguration();i?(this.preservedPreindoorMapConfiguration=i,o=this.map.getStyle().style?this.map.getStyle().style+"_indoor"+("dark"===t?"_dark":"")+"_tileset_"+e:void 0,this.map.styles.setMapConfiguration("defaultIndoor_"+e,"microsoft-maps:default"===i?o:void 0)):(n=(null===(o=this.indoorState)||void 0===o?void 0:o.tilesetId)!==e,this.indoorState={tilesetId:e,theme:t},this.initStyleset(),this.definitions().then(function(t){var e=(r.map.getStyle().style||t.defaultConfiguration).replace("_indoor_dark","").replace("_indoor","")+"_indoor",t=t.configurations.find(function(t){return t.name.startsWith(e)});t&&r.map.setStyle({style:t.name},!n)}))},Xp.prototype.unsetIndoorState=function(){var o=this,t=this.preservedPreindoorMapConfiguration;t?this.map.styles.setMapConfiguration(t):(this.indoorState=void 0,this.initStyleset(),this.definitions().then(function(t){var e=o.map.getStyle().style;e.includes("_indoor")&&e.split("_indoor")[0]?o.map.setStyle({style:e.split("_indoor")[0]}):o.map.setStyle({style:void 0})}))},Xp.prototype.initStyleset=function(){var e=this,t=this.serviceOptions.mapConfiguration?"string"==typeof this.serviceOptions.mapConfiguration?new Hp(this._request(this.serviceOptions.domain,y+"/mapconfigurations/metadata/"+this.serviceOptions.mapConfiguration,"StyleDefinitions").then(function(t){return Wp(Wp({},t),{defaultConfiguration:t.defaultConfiguration||t.defaultStyle,configurations:t.configurations||t.styles})})):Hp.resolve(this.serviceOptions.mapConfiguration):new Hp(this._request(this.serviceOptions.staticAssetsDomain,f+"/"+y,"StyleDefinitions",{version:this.serviceOptions.styleDefinitionsVersion}).then(function(t){return{version:isNaN(t.version)?0:parseFloat(t.version),defaultConfiguration:t.defaultStyle,configurations:t.styles.filter(function(t){return e.indoorState?"auto"===e.indoorState.theme?t.name.endsWith("dark"===t.theme?"_indoor_dark":"_indoor"):t.name.endsWith("dark"===e.indoorState.theme?"_indoor_dark":"_indoor"):!t.name.includes("indoor")}).map(function(t){return{copyright:t.copyright.join(" "),name:t.name,displayName:function(t){t=e.indoorState&&t.includes("_indoor")?t.split("_indoor")[0]:t;return t in Gp?Gp[t]:t}(t.name),theme:t.theme,thumbnail:new P({domain:e.serviceOptions.staticAssetsDomain,path:t.thumbnail,protocol:"https"}).toString(),url:new P({domain:e.serviceOptions.staticAssetsDomain,path:f+"/"+y+"/"+t.name,queryParams:{styleVersion:e.serviceOptions.styleDefinitionsVersion},protocol:"https"}).toString()}})}}));return this.initPromise&&this.initPromise.switchWith(t),this.initPromise=t,this.initPromise.then(function(t){return e.map._invokeEvent("mapconfigurationchanged",t)}),this.initPromise},Xp.prototype.getStyle=function(t){t=this._lookUp(t);if(!t)throw Error("Style definition is not available.");if(t.url)return t.url;if(t.style)return t.style;throw Error("Style definition does not contain neither URL nor style object.")},Xp.prototype.deriveNewStyle=function(t,e){var i=this.map.getStyle(),s=this.map.getTraffic();return Wp(Wp({},e),{layers:e.layers.map(function(t){var e,o,n=Wp({},t),r=Zp.getLayerGroup(n);return r&&(i.showBuildingModels||"fill-extrusion"!==n.type?"fill-extrusion"===n.type&&(n.layout=null!==(t=n.layout)&&void 0!==t?t:{},n.layout.visibility="visible"):(n.layout=null!==(e=n.layout)&&void 0!==e?e:{},n.layout.visibility="none"),"none"!==s.flow&&r&&r==="traffic_"+s.flow&&"line"==n.type&&(n.layout=null!==(e=n.layout)&&void 0!==e?e:{},n.layout.visibility="visible"),"labels"!==r&&"labels_places"!==r&&"labels_indoor"!==r||"symbol"!==n.type||(i.showLabels&&"none"!==(null===(r=n.layout)||void 0===r?void 0:r.visibility)?(n.layout=null!==(o=n.layout)&&void 0!==o?o:{},n.layout.visibility="visible"):(n.layout=null!==(o=n.layout)&&void 0!==o?o:{},n.layout.visibility="none"))),n})})},Xp.prototype.injectUserLayersIntoStyle=function(s,a,c){return s?this.map.layers._getUserLayers().reduce(function(o,e){if(e.layer instanceof Ja)return o;var t,n=c[e.before]&&0<c[e.before].length?c[e.before][0]:void 0,r=s.layers.find(function(t){return t.id===e.layer.getId()}),i=a.layers.findIndex(function(t){return t.id===e.layer.getId()});return-1<i&&a.layers.splice(i,1),r&&(t=new Set(Array.from(e.layer._getSourceIds()).map(function(t){return s.sources[t]?{source:s.sources[t],id:t}:void 0}).filter(function(t){return void 0!==t})),-1<(i=n?o.layers.findIndex(function(t){return t.id===n.id}):-1)?o.layers.splice(i,0,r):o.layers.push(r),t.forEach(function(t){var e=t.source,t=t.id;o.sources[t]=e})),o},Wp({},a)):a},Xp.prototype.setStyle=function(r,t){var i=this;void 0===t&&(t=!0);try{this.map._getMap().setStyle(this.getStyle(r),{diff:t,validate:this.serviceOptions.validateStyle,transformStyle:function(t,e){var o=Ao(e),n=i.deriveNewStyle(t,o).layers.map(function(t){return{nextLayer:t,layerGroup:Zp.getLayerGroup(t)}}).filter(function(t){t.nextLayer;return void 0!==t.layerGroup}).reduce(function(t,e){var o=e.nextLayer,n=e.layerGroup;return Wp(Wp({},t),((e={})[n]=n in t?Jp(Jp([],Yp(t[n])),[o]):[o],e))},{});r.progressiveLoading&&!i.map._isLoaded()&&(e=r.progressiveLoadingInitialLayerGroups,Array.isArray(e)&&0<e.length&&i._deferLayerGroupVisibilities(n,e));o=i.injectUserLayersIntoStyle(t,o,n),n=Object.entries(n).map(function(t){var e=Yp(t,2),t=e[0],e=e[1];return i._buildFundamentalLayerFrom(e,t)}),n=i.map.layers._getUserLayers().reduce(function(t,e){var o=e.before?t.findIndex(function(t){return t.getId()===e.before}):-1;return-1<o?t.splice(o,0,e.layer):t.push(e.layer),t},n);return i.map.layers.layerIndex=n,i.map.sources._syncSources(o.sources),i.map.events.remove("styledata",i._onStyleData),i.map.events.addOnce("styledata",i._onStyleData),o}})}catch(t){throw t}},Xp.prototype.getTheme=function(t){t=this._lookUp(t);if(t)return t.theme.toLowerCase()},Xp.prototype.getThemeAsync=function(e){return Vp(this,void 0,void 0,function(){return Kp(this,function(t){switch(t.label){case 0:return[4,this._lookUpAsync(e)];case 1:return[2,t.sent().theme]}})})},Xp.prototype.setMapConfiguration=function(t,o){var n=this;"string"==typeof(this.serviceOptions.mapConfiguration=t)?this.initStyleset():this.initPromise?this.initPromise.hijackAndResolve(t):this.initPromise=Hp.resolve(t),this.definitions().then(function(t){var e=t.defaultConfiguration;t.configurations.find(function(t){return t.name===o})&&(e=o),n.map.setStyle({style:e})})},Xp.prototype.getMapConfiguration=function(){return this.serviceOptions.mapConfiguration},Xp.prototype.setStyleSet=function(t){this.updateIndoorState("indoor_dark"===t?"dark":"light",null)},Xp.prototype.getStyleSet=function(){return void 0!==this.indoorState?"dark"===this.indoorState.theme?"indoor_dark":"indoor":"base"},Xp.prototype.clearStyleSet=function(){this.unsetIndoorState()},Xp.prototype._buildFundamentalLayerFrom=function(t,e){if(t&&0<t.length){t=new yu(t,e);return t.onAdd(this.map),t}throw new Error("Unable to construct fundamental map layer for ID: "+e+".")},Xp.prototype._transformStyleRequest=function(t,e){t.includes(r)&&(e.url=e.url.replace(r,this.serviceOptions.domain)),t.includes(l)&&(e.url=e.url.replace(l,f)),t.includes(d)&&(e.url=e.url.replace(d,y)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&((t=new URL(e.url)).searchParams.get(c)||(t.searchParams.set(c,this.serviceOptions.styleAPIVersion),e.url=t.href),null!==(t=this.map.authentication)&&void 0!==t&&t.signRequest(e))},Xp.prototype._request=function(n,r,i,s){var a;return void 0===s&&(s={}),Vp(this,void 0,void 0,function(){var e,o;return Kp(this,function(t){switch(t.label){case 0:return e={url:new P({protocol:"https",domain:n,path:r,queryParams:Wp(((o={})[c]=this.serviceOptions.styleAPIVersion,o),s)}).toString()},"function"==typeof this.serviceOptions.transformRequest&&i&&(e=this.serviceOptions.transformRequest(e.url,i)),null!==(a=this.map.authentication)&&void 0!==a&&a.signRequest(e),o={method:"GET",mode:"cors"},e.credentials&&(o.credentials=e.credentials),e.headers&&(o.headers=e.headers),[4,fetch(e.url,o).then(function(t){if(t.ok)return t.json();throw new Error("HTTP "+t.status+": "+t.statusText+" ")})];case 1:return[2,t.sent()]}})})},Xp);function Xp(t,e){var a=this;this.definitions=function(){return a.initPromise||a.initStyleset()},this.indoorState=void 0,this.preservedPreindoorMapConfiguration=void 0,this._progressiveLoadingState={mapStyle:void 0,pendingVisibilityChange:void 0},this._deferLayerGroupVisibilities=function(e,t){var o,r,n,i,s=t.filter(function(t){return t in e});0!==s.length&&(o=a.map._getMap(),r=o.getZoom(),n=a.map.getStyle().style,a._progressiveLoadingState.pendingVisibilityChange&&(a.map.events.remove("load",a._progressiveLoadingState.pendingVisibilityChange),a._progressiveLoadingState.pendingVisibilityChange=null),a._progressiveLoadingState.mapStyle=n,(i=Object.entries(e).reduce(function(t,e){var o=Yp(e,2),e=o[0],o=o[1],n=s.includes(e);return Jp(Jp([],Yp(t)),Yp(o.filter(function(t){if("custom"===t.type)return!1;if(n)if("number"==typeof t.maxzoom&&"number"==typeof t.minzoom){if(r<=t.maxzoom&&r>=t.minzoom)return!1}else if("number"==typeof t.minzoom){if(r>=t.minzoom)return!1}else{if("number"!=typeof t.maxzoom)return!1;if(r<=t.maxzoom)return!1}return"none"!==(null===(t=t.layout)||void 0===t?void 0:t.visibility)})))},[])).forEach(function(t){t.layout=t.layout||{},t.layout.visibility="none"}),a._progressiveLoadingState.pendingVisibilityChange=function(){a._progressiveLoadingState.pendingVisibilityChange=null;var t=a.map.getStyle().style;n===t&&i.forEach(function(t){t.layout.visibility="visible",o.setLayoutProperty(t.id,"visibility","visible")})},a.map.events.addOnce("load",a._progressiveLoadingState.pendingVisibilityChange))},this._onStyleData=function(){a._lookUpAsync(a.map.getStyle()).then(function(t){a.map.events.invoke("stylechanged",{style:t.name,map:a.map,type:"stylechanged"})})},this._lookUp=function(e){var t=a.definitions().errorIfRejected(),o=a.definitions().resultIfResolved();return t||void 0===o?null:o.configurations.find(function(t){return t.name===(e.style||o.defaultConfiguration)})||o.configurations.find(function(t){return t.name===o.defaultConfiguration})||o.configurations[0]},this._lookUpAsync=function(o){return Vp(a,void 0,void 0,function(){var e;return Kp(this,function(t){switch(t.label){case 0:return[4,this.definitions()];case 1:return e=t.sent(),[2,e.configurations.find(function(t){return t.name===(o.style||e.defaultConfiguration)})||e.configurations.find(function(t){return t.name===e.defaultConfiguration})||e.configurations[0]]}})})},this.map=t,this.serviceOptions=e}var Qp,th,n=window&&window.__extends||(Qp=function(t,e){return(Qp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Qp(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),eh=window&&window.__assign||function(){return(eh=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},oh=window&&window.__awaiter||function(t,s,a,c){return new(a=a||Promise)(function(o,e){function n(t){try{i(c.next(t))}catch(t){e(t)}}function r(t){try{i(c.throw(t))}catch(t){e(t)}}function i(t){var e;t.done?o(t.value):((e=t.value)instanceof a?e:new a(function(t){t(e)})).then(n,r)}i((c=c.apply(t,s||[])).next())})},nh=window&&window.__generator||function(o,n){var r,i,s,a={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},t={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,i&&(s=2&e[0]?i.return:e[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,e[1])).done)return s;switch(i=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return a.label++,{value:e[1],done:!1};case 5:a.label++,i=e[1],e=[0];continue;case 7:e=a.ops.pop(),a.trys.pop();continue;default:if(!(s=0<(s=a.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){a=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){a.label=e[1];break}if(6===e[0]&&a.label<s[1]){a.label=s[1],s=e;break}if(s&&a.label<s[2]){a.label=s[2],a.ops.push(e);break}s[2]&&a.ops.pop(),a.trys.pop();continue}e=n.call(o,a)}catch(t){e=[6,t],i=0}finally{r=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}},rh=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},ih=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},sh=window&&window.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return{value:(t=t&&n>=t.length?void 0:t)&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},m=(n(ah,th=Z),ah.prototype.getCanvas=function(){return this.map.getCanvas()},ah.prototype.getCanvasContainer=function(){return this.map.getCanvasContainer()},ah.prototype.getMapContainer=function(){return this.map.getContainer()},ah.prototype.getServiceOptions=function(){return qi(this.serviceOptions,Fp._cloneCustomizer)},ah.prototype.setServiceOptions=function(t){this.serviceOptions=(new Fp).merge(this.serviceOptions,t),this.serviceOptions["enable-accessibility"]?this.accessibleMapDelegate.addToMap():this.accessibleMapDelegate.removeFromMap()},ah.prototype.addRequestTransformer=function(t){this.serviceOptions.addTransformer(t)},ah.prototype.removeRequestTransformer=function(t){this.serviceOptions.removeTransformer(t)},ah.prototype.setCamera=function(t,e){if(void 0===e&&(e=!1),"padding"in t||"offset"in t||"bounds"in t){var o,n=(new Wu).merge({maxZoom:this.getCamera().maxZoom},t),r=this._generateSafeBounds(n.bounds),i={padding:n.padding,offset:n.offset,maxZoom:n.maxZoom};if(!(o=this.map.cameraForBounds(r,i))){var s=null===(s=this.map)||void 0===s?void 0:s.getContainer(),s={message:"The map cannot be fit to the current canvas with the given CameraBoundsOptions.",containerWidth:null==s?void 0:s.clientWidth,containerHeight:null==s?void 0:s.clientHeight,safeBounds:r,cameraForBoundsOptions:i};throw new Error(JSON.stringify(s))}"pitch"in t&&(o.pitch=t.pitch),"bearing"in t&&(o.bearing=t.bearing),this.map.setMaxZoom(n.maxZoom),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(n.maxBounds)}else{i=(new Ju).merge(this.getCamera(),t);i.centerOffset&&2<=i.centerOffset.length&&(s=i.centerOffset,(n=Hr([i.center],i.zoom))[0][0]+=s[0],n[0][1]+=s[1],i.center=qr(n,i.zoom)[0]),o={center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,around:void 0},this.map.setMinZoom(i.minZoom),this.map.setMaxZoom(i.maxZoom),this._invokeEvent("minzoomchanged",this.map.getMinZoom()),this._invokeEvent("maxzoomchanged",this.map.getMaxZoom()),r=this._generateSafeBounds(i.maxBounds)}r?this.map.setMaxBounds(r):this.map.setMaxBounds(null);r=(new zu).merge(t),t={duration:r.duration,easing:function(t){return t},offset:[0,0],animate:!0},e={fromControl:e};"jump"===r.type?this.map.jumpTo(o,e):"ease"===r.type?this.map.easeTo(eh(eh({},o),t),e):"fly"===r.type&&this.map.flyTo(eh(eh({},o),t),e)},ah.prototype.setCameraBounds=function(t){this.setCamera(t)},ah.prototype.getCamera=function(){var t=this.map.getBounds().getSouthWest().toArray(),e=this.map.getBounds().getNorthEast().toArray();return{zoom:this.map.getZoom(),center:this.map.getCenter().toArray(),bearing:this.map.getBearing(),pitch:this.map.getPitch(),bounds:new yi(t,e),minZoom:this.map.getMinZoom(),maxZoom:this.map.getMaxZoom()}},ah.prototype.setStyle=function(t,e){void 0===e&&(e=!0),delete t.preserveDrawingBuffer;t=(new Ep).merge(this.styleOptions,t);t.autoResize!==this.styleOptions.autoResize&&this._setAutoResize(t.autoResize),t.language!==this.styleOptions.language&&(this.localizedStringsPromise=xc.getStrings(t.language)),t.renderWorldCopies!==this.styleOptions.renderWorldCopies&&this.map.setRenderWorldCopies(t.renderWorldCopies),t.showFeedbackLink!==this.styleOptions.showFeedbackLink&&this.copyrightControl.setOptions({showFeedbackLink:t.showFeedbackLink}),t.customAttribution!==this.styleOptions.customAttribution&&this.copyrightControl.setOptions({customAttribution:t.customAttribution}),t.showLogo!==this.styleOptions.showLogo&&this.copyrightControl.setOptions({showLogo:t.showLogo}),t.showTileBoundaries!==this.styleOptions.showTileBoundaries&&(this.map.showTileBoundaries=t.showTileBoundaries);e=e&&this.styleOptions.language===t.language&&this.styleOptions.view===t.view;this.styleOptions=t,this._setStyleComponents(t,e)},ah.prototype.getStyle=function(){return Ao(this.styleOptions)},ah.prototype.addIcon=function(t,e){this.imageSprite.add(t,e)},ah.prototype.addPins=function(t,e){var o,n=(new pp).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new ja(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,iconOptions:{anchor:"center",size:n.iconSize,image:["case",["has","icon"],["get","icon"],n.icon],ignorePlacement:!n.cluster,opacity:n.opacity},textOptions:{anchor:"center",textField:["case",["has","point_count"],["to-string",["get","point_count"]],["has","title"],["to-string",["get","title"]],n.title],font:["case",["has","point_count"],["literal",["StandardFontCondensed-Bold"]],["literal",[n.textFont]]],size:["case",["has","point_count"],20,n.fontSize],ignorePlacement:!n.cluster,opacity:n.opacity,offset:["case",["has","point_count"],["literal",[.5,-.45]],["literal",[n.textOffset[0]/16,n.textOffset[1]/16]]],color:n.fontColor}})),!(r instanceof ja))throw new Error("A layer with name '"+n.name+"' already exists but it is not a SymbolLayer.A SymbolLayer should be used for rendering pins.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Xi(o,{cluster:n.cluster})),!(s instanceof Xi))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new gi(t);n.overwrite?s.setShapes(t):s.add(t)},ah.prototype.addCircles=function(t,e){var o,n=(new np).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new _s(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,opacity:n.opacity,radius:["case",["has","radius"],["get","radius"],n.radius],color:["case",["has","color"],["get","color"],n.color],strokeColor:["case",["has","outlineColor"],["get","outlineColor"],n.outlineColor],strokeWidth:["case",["has","outlineWidth"],["get","outlineWidth"],n.outlineWidth]})),!(r instanceof _s))throw new Error("A layer with name '"+n.name+"' already exists but it is not a BubbleLayer.A BubbleLayer should be used for rendering circles.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Xi(o)),!(s instanceof Xi))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new gi(t);n.overwrite?s.setShapes(t):s.add(t)},ah.prototype.addLinestrings=function(t,e){var o,n=(new ap).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new Js(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,lineCap:n.cap,lineJoin:n.join,strokeOpacity:n.opacity,strokeColor:["case",["has","color"],["get","color"],n.color],strokeWidth:["case",["has","width"],["get","width"],n.width]})),!(r instanceof Js))throw new Error("A layer with name '"+n.name+"' already exists but it is not a LineLayer.A LineLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Xi(o)),!(s instanceof Xi))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new gi(t);n.overwrite?s.setShapes(t):s.add(t)},ah.prototype.addPolygons=function(t,e){var o,n=(new yp).merge(e),r=this.layers.getLayerById(n.name),i=!1;if(r||(i=!0,r=new ya(n.name+"-source",n.name,{source:n.name+"-source",minZoom:n.minZoom,maxZoom:n.maxZoom,fillOpacity:n.opacity,fillColor:["case",["has","color"],["get","color"],n.color]})),!(r instanceof ya))throw new Error("A layer with name '"+n.name+"' already exists but it is not a PolygonLayer.A PolygonLayer should be used for rendering linestrings.");var s=r.getSource();"string"==typeof s?(o=s,s=this.sources.getById(o)):o=s.getId();e=!1;if(s||(e=!0,s=new Xi(o)),!(s instanceof Xi))throw new Error("The source with name '"+o+"' already exists but it is not a DataSource.New data can only be added to a DataSource.");e&&this.sources.add(s),i&&this.layers.add(r,n.before);t=new gi(t);n.overwrite?s.setShapes(t):s.add(t)},ah.prototype.addRaster=function(t,e){var o=(new wp).merge(e),n=this.layers.getLayerById(o.name);if(!((n=n||new qa({maxZoom:o.maxZoom,minZoom:o.minZoom,opacity:o.opacity,tileSize:256,tileUrl:"{subdomain}"},o.name))instanceof qa))throw new Error("A layer with name '"+o.name+"' already exists but it is not a TileLayer.A TileLayer should be used for rendering raster images.");if("{subdomain}"!==n.getOptions().tileUrl)throw new Error("A TileLayer with name '"+o.name+"' already exists but was configured for a single tile url [default for new TileLayer(...)].");(e=!o.overwrite&&n.getOptions().subdomains||[]).push.apply(e,ih([],rh(t))),n._setOptionsNoUpdate({subdomains:e}),this.layers.add(n,o.before)},ah.prototype.getLayers=function(){return this.layers.getLayers().map(function(t){return t.getId()})},ah.prototype.removeLayers=function(t){var e,o;try{for(var n=sh(t),r=n.next();!r.done;r=n.next()){var i,s=r.value;this.layers.getLayerById(s)&&(this.layers.remove(s),i=s+"-source",this.sources.getById(i)&&this.sources.remove(i))}}catch(t){e={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(e)throw e.error}}},ah.prototype.addHtml=function(t,e){t.id||(t.id="marker_"+Wn());var o=new mc({htmlContent:t});return this.markers.add(o,e),t.id},ah.prototype.removeHtml=function(t){this.markers.remove(t)},ah.prototype.addEventListener=function(t,e,o){this.events._addLegacy(t,e,o)},ah.prototype.removeEventListener=function(t,e,o){this.events._removeLegacy(t,e,o)},ah.prototype.setUserInteraction=function(t){this.userInteractionDelegate.setOptions(t)},ah.prototype.getUserInteraction=function(){return this.userInteractionDelegate.getOptions()},ah.prototype.addControl=function(t,e){this.controls.add(t,e)},ah.prototype.removeControl=function(t){this.controls.remove(t)},ah.prototype.setTraffic=function(t){var e=this.trafficOptions.incidents,o=this.trafficOptions.flow;if(this.trafficOptions=(new hn).merge(this.trafficOptions,t),this.controls.getControls().filter(function(t){return t instanceof _n}).forEach(function(t){return t.updateButtonState()}),this.incidentDelegate&&(this.trafficOptions.incidents?e||this.incidentDelegate.addToMap():this.incidentDelegate.removeFromMap()),this.trafficOptions.flow&&"none"!==this.trafficOptions.flow)try{this.trafficOptions.flow!==o&&this.flowDelegate.addToMap()}catch(t){throw this.trafficOptions.flow=o,t}else this.flowDelegate.removeFromMap()},ah.prototype.getTraffic=function(){return Ao(this.trafficOptions)},ah.prototype.remove=function(){this.dispose()},ah.prototype.clear=function(){this.popups.clear(),this.layers.clear(),this.sources.clear(),this.markers.clear()},ah.prototype.dispose=function(){for(this.clear(),this.map.remove(),this.removed=!0;this.getMapContainer().firstChild;){var t=this.getMapContainer().firstChild;this.getMapContainer().removeChild(t)}},ah.prototype.resize=function(t,e,o){"number"!=typeof t&&"string"!=typeof t||"number"!=typeof e&&"string"!=typeof e?o=t:(t=t,this.getMapContainer().style.height="number"==typeof t?t+"px":t,this.getMapContainer().style.width="number"==typeof e?e+"px":e);e=this.getMapContainer().style.overflow;this.getMapContainer().style.overflow="hidden",this.map.resize(o),this.getMapContainer().style.overflow=e},ah.prototype.pixelsToPositions=function(t){var e,o,n=[];try{for(var r=sh(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.unproject(s);n.push(new ni(a.lng,a.lat))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},ah.prototype.positionsToPixels=function(t){var e,o,n=[];try{for(var r=sh(t),i=r.next();!i.done;i=r.next()){var s=i.value,a=this.map.project(s);n.push(new $n(a.x,a.y))}}catch(t){e={error:t}}finally{try{i&&!i.done&&(o=r.return)&&o.call(r)}finally{if(e)throw e.error}}return n},ah.prototype.areTilesLoaded=function(){return this.map.areTilesLoaded()},ah.prototype.stop=function(){this.map.stop()},ah.prototype.triggerRepaint=function(){this.map.triggerRepaint()},ah.prototype._getMap=function(){return this.map},ah.prototype._rebuildStyle=function(e){return void 0===e&&(e=!0),oh(this,void 0,void 0,function(){return nh(this,function(t){return this.styles.setStyle(this.styleOptions,e),this.imageSprite._restoreImages(),[2]})})},ah.prototype._isLoaded=function(){return this.loaded},ah.prototype._isReady=function(){return this.ready},ah.prototype._getLocalizedStrings=function(){return this.localizedStringsPromise},ah.prototype._sendRequest=function(t,e,o){var n;return(n="function"==typeof this.serviceOptions.transformRequest?this.serviceOptions.transformRequest(t,e):n)?fetch(n.url||t,{credentials:n.credentials,headers:eh(eh({},o),n.headers),method:"GET",mode:"cors"}):fetch(t,{headers:o,method:"GET",mode:"cors"})},ah.prototype._substituteDomainLanguageViewAndSignInRequest=function(t,e){var o,n;(t.includes(h)||t.includes(r))&&(n=new RegExp("[^{]"+h+"[^}]"),t.match(n)&&(e.url=e.url.replace(h,r)),P.protoRegEx.test(this.serviceOptions.domain)?(n=e.url.indexOf(r),e.url=this.serviceOptions.domain+e.url.substring(n+r.length)):e.url=e.url.replace(r,this.serviceOptions.domain)),(e.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase())||e.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase()))&&null!==(o=this.authentication)&&void 0!==o&&o.signRequest(e),t.includes(a)&&(e.url=e.url.replace(a,this.styleOptions.language)),t.includes(i)&&(e.url=this.styleOptions.view?e.url.replace(i,this.styleOptions.view):e.url.replace(i,"").replace("&"+s+"=",""))},ah.prototype._setAutoResize=function(t){t?window.addEventListener("resize",this._windowResizeCallback):window.removeEventListener("resize",this._windowResizeCallback)},ah.prototype._setStyleComponents=function(e,o){var n=this;void 0===o&&(o=!0),this.removed||this.styles.definitions().then(function(t){n.styleOptions.style&&t.configurations.map(function(t){return t.name}).includes(n.styleOptions.style)||(n.styleOptions.style=t.defaultConfiguration),n.styleOptions=e,n._rebuildStyle(o)})},ah.prototype._updateGlobalDefaults=function(t){t&&(t.authOptions&&!Yc&&ll(t.authOptions),t.domain&&!qc&&ul(t.domain),t.styleDefinitionsPath&&!Hc&&pl(t.styleDefinitionsPath),t.workerCount&&!Gc&&hl(t.workerCount),t.maxParallelImageRequests&&!Wc&&dl(t.maxParallelImageRequests),!t.subscriptionKey&&!t["subscription-key"]||Yc||ml(t.subscriptionKey||t["subscription-key"]),!t.sessionId&&!t["session-id"]||Kc||yl(t.sessionId||t["session-id"]),t.language&&!Vc&&fl(t.language),!t.userRegion&&!t.view||Zc||gl(t.userRegion||t.view))},ah.prototype._generateSafeBounds=function(t){if(t){var e=yi.getSouth(t),o=yi.getWest(t),n=yi.getNorth(t),r=yi.getEast(t);if(!(isFinite(e)&&isFinite(o)&&isFinite(n)&&isFinite(r)))throw new Error("The bounds specified are invalid: ["+t+"]");for(;r<o;)r+=360;return new yi([o,e,r,n])}return t},ah.prototype._detectHighContrast=function(){var t,e;switch(kl.getHighContrastMode()){case"invert":case"light":t=ah.Css.hcLight,e="high_contrast_light";break;case"dark":t=ah.Css.hcDark,e="high_contrast_dark"}t&&this.map.getContainer().classList.add(t),e&&"road"===this.styleOptions.style&&(this.styleOptions.style=e)},ah.Css={canvasContainer:"atlas-map-canvas-container",canvas:"atlas-map-canvas",container:"atlas-map",hcDark:"high-contrast-dark",hcLight:"high-contrast-light"},ah);function ah(t,e){var n=th.call(this)||this;n.removed=!1,n.loaded=!1,n.ready=!1,n._windowResizeCallback=function(){return n.resize()};var o,r,i=!0;n._updateGlobalDefaults(e),n.serviceOptions=(new Fp).merge(e),n.styleOptions=(new Ep).merge(e),n.trafficOptions=new hn,n.styles=new $p(n,n.serviceOptions),n.serviceOptions.authOptions.subscriptionKey&&(n.serviceOptions.authOptions.subscriptionKey=encodeURIComponent(n.serviceOptions.authOptions.subscriptionKey)),o=n.serviceOptions.authOptions.clientId||(n.serviceOptions.authOptions.subscriptionKey?n.serviceOptions.authOptions.subscriptionKey.replace(/.(?=.{3,}$)/g,"*"):"invalid-setting"),n.insights&&n.insights.setAuthenticatedUserContext(n.serviceOptions.sessionId,o),arguments[2]&&"ENVIRONMENT"in window&&window.ENVIRONMENT.hmr?(r=arguments[2],n.ready=!0,n.loaded=!0):(t={antialias:n.styleOptions.antialias,attributionControl:!1,container:t,fadeDuration:n.serviceOptions.fadeDuration,localIdeographFontFamily:n.serviceOptions.localIdeographFontFamily,preserveDrawingBuffer:n.styleOptions.preserveDrawingBuffer,refreshExpiredTiles:n.serviceOptions.refreshExpiredTiles,renderWorldCopies:n.styleOptions.renderWorldCopies,trackResize:!1,transformRequest:function(t,e){var o={url:t};return"Tile"===e||"Source"===e?(t.includes(h)&&n.insights&&n.insights.trackEvent({name:"TileLoad"}),n._substituteDomainLanguageViewAndSignInRequest(t,o)):"Style"!==e&&"SpriteJSON"!==e&&"SpriteImage"!==e&&"Glyphs"!==e||n.styles._transformStyleRequest(t,o),n.serviceOptions.transformRequest&&tn(o,n.serviceOptions.transformRequest(o.url,e)),o}},r=new p.Map(t));try{n.map=r,n.controls=new $l(n),n.events=new iu(n),n.imageSprite=new uu(n),n.layers=new _u(n),n.markers=new cu(n),n.sources=new Au(n),n.popups=new Cu(n),n.map.getContainer().classList.add(ah.Css.container),n.map.getCanvasContainer().classList.add(ah.Css.canvasContainer),n.map.getCanvas().classList.add(ah.Css.canvas),n._detectHighContrast(),n.copyrightControl=new Dl({showFeedbackLink:n.styleOptions.showFeedbackLink,showLogo:n.styleOptions.showLogo,customAttribution:n.styleOptions.customAttribution}),n.controls.add(n.copyrightControl,{position:u.ControlPosition.NonFixed});var s=n.authentication?n.authentication.initialize():Promise.resolve();if(n.removed)return n;var a=function(){n.loaded=!0,n.map.off("load",a)};n.map.on("load",a);var c=function(){n.ready=!0,n.map.off("styledata",c),n.events.invoke("ready",{map:n,type:"ready"})};n.map.on("styledata",c),n._setAutoResize(n.styleOptions.autoResize),n.map.showTileBoundaries=n.styleOptions.showTileBoundaries,n.localizedStringsPromise=xc.getStrings(n.styleOptions.language);var l=n.styles.initStyleset();Promise.all([s,l]).then(function(t){t=rh(t,2),t[0],t[1];if(!n.removed){if(n.authentication&&!n.authentication.getToken())throw new Error("AuthenticationManager finished initializing, but no token is available");n.serviceOptions["enable-accessibility"]&&n.accessibleMapDelegate.addToMap(),n._setStyleComponents(n.styleOptions),n.copyrightDelegate&&n.copyrightDelegate.addToMap()}}).catch(function(t){t=t instanceof Error?t:new Error(t);n.insights&&n.insights.trackException({error:t}),n.events.invoke("error",{map:n,type:"error",error:t})}),n.setCamera(eh(eh({},e),{type:"jump",duration:0})),n.flowDelegate=new Zl(n),n.accessibleMapDelegate=new Nl(n),n.userInteractionDelegate=new Kl(n,e),n.userInteractionDelegate.addToMap(),n.copyrightControl.setOptions({copyrightMessage:n.copyrightControl.getDefaultAttributions().join(", ")})}catch(t){throw i=!1,n.insights&&n.insights.trackException({error:t instanceof Error?t:new Error(t)}),t}finally{n.insights&&(n.insights.trackEvent({name:"MapLoad"},{success:i,supported:cl(!1),supportedWithPerformance:cl(!0)}),n.insights.flush())}return n}var ch=window&&window.__read||function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,r,i=o.call(t),s=[];try{for(;(void 0===e||0<e--)&&!(n=i.next()).done;)s.push(n.value)}catch(t){r={error:t}}finally{try{n&&!n.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}return s},lh=window&&window.__spreadArray||function(t,e){for(var o=0,n=e.length,r=t.length;o<n;o++,r++)t[r]=e[o];return t},v=(uh.applyTemplate=function(e,o){var n,r,t,i=this,s=document.createElement("div");return s.classList.add(uh.Css.template),e&&("boolean"!=typeof(o=o||{}).singleDescription&&(o.singleDescription=!0),o.sandboxContent="boolean"!=typeof o.sandboxContent||o.sandboxContent,o.title&&"string"==typeof o.content&&(o.content.includes("{title}")||o.content.includes("{name}"))||(e.title?o.title="{title}":e.name&&(o.title="{name}")),"boolean"!=typeof o.detectHyperlinks&&(o.detectHyperlinks=!0),"boolean"!=typeof o.parsePropertyPaths&&(o.parsePropertyPaths=!0),o.textColor&&(s.style.color=o.textColor),o.fillColor&&(s.style.backgroundColor=o.fillColor),o.title&&((t=this._applyStringTemplate(e,o.title,o)).innerText=t.textContent||t.innerText||"",this._appendChild(s,t,uh.Css.title)),(n=document.createElement("div")).classList.add(uh.Css.content),Array.isArray(o.content)?0<o.content.length&&o.content[0].propertyPath?this._appendChild(n,this._generateContent(e,o.content,o),uh.Css.item):o.content.forEach(function(t){i._appendChild(n,i._generateContent(e,t,o),uh.Css.item)}):(r=0,e.description&&Object.keys(e).forEach(function(t){i._ignoreProperty(t,e[t])||r++}),t=void 0,1===r||o.singleDescription&&e.description||2===r&&e.Snippet?(t=document.createElement("div")).innerHTML=e.description:t=this._generateContent(e,o.content,o),this._appendChild(n,t,uh.Css.item)),""!==n.innerHTML&&(o.sandboxContent?s.appendChild(uh._createSandboxedIframe(n,o)):s.appendChild(n))),s},uh._createSandboxedIframe=function(t,e){var o=document.createElement("iframe");o.sandbox.add("allow-popups");var n=t.innerHTML,r=!1,i=100,s=550,a=10,c=0;document.body.scrollWidth<=340&&(s=300,i=50);var l=n.split(/<(tr|div|br|li|h[0-9]|p>)/),c=Math.max.apply(Math,lh([],ch(l.map(function(t){return t.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length}))))-1,t=Math.ceil(3.5*c);t<s&&(s=t,i=c),n.includes("<img")||n.includes("<video")?(r=!0,o.width="550px"):(c=-1<n.indexOf(uh.Css.table)?25:20,a+=Math.max(.5*l.length*c,Math.ceil(n.replace(/<[a-zA-Z0-9\s=\/]+>/g,"").length/i)*c)),o.width=s+"px",o.height=r||280<a?"280px":a+"px";a=e.textColor?"color:"+e.textColor+";":"",e=e.fillColor?"background-color:"+e.fillColor+";":"",n='<html><head><title></title><meta charset="utf-8" /><meta http-equiv="x-ua-compatible" content="IE=Edge" /><link rel="stylesheet" href="'+uh._cssUrl+'" type="text/css"/><style>html, body{margin:0;padding:0;'+a+e+'}</style></head><body><div class="'+uh.Css.template+'" style="padding:0;width:'+(s-20)+'px">'+n+"</div></body></html>";return void 0===o.srcdoc?o.src="data:text/html;charset=utf-8,"+encodeURI(n):o.srcdoc=n,o},uh._appendChild=function(t,e,o){e&&(o&&(e.className=(e.className?e.className+" ":"")+o),t.appendChild(e))},uh._generateContent=function(t,e,o){if(e)return Array.isArray(e)?this._generatePropertyInfoTable(t,e,o):this._applyStringTemplate(t,e,o);t=this._generateDynamicTableHtml(t,null,o);if(t){o=document.createElement("div");return o.innerHTML=t,o}return null},uh._applyStringTemplate=function(t,e,o){if(e){for(var n,r=e,i=this._placeholderRx.exec(e);i;)2<=i.length&&(n=this._getPropertyValue(t,i[1],o),r=r.replace(i[0],n)),i=this._placeholderRx.exec(e);if(r){(r=r.trim()).includes("<")&&(r=r.replace(/[\r\n]+/g,"<br/>"));var s=document.createElement("div");return s.innerHTML=r,s}}return null},uh._getPropertyValue=function(t,e,o,n){var r=o.parsePropertyPaths?e.split("/"):[e],i=r.length;if(0<i&&t){var s=r[0],a=t[s];if(o.detectHyperlinks&&"link"===e&&(!n||n.hyperlinkFormat)){var c,l=[];if(Array.isArray(a)?a.forEach(function(t){t.href?l.push(t):"string"==typeof t&&l.push({href:t})}):a.href&&l.push(a),0<l.length){n&&n.hyperlinkFormat?c=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(c=o.hyperlinkFormat);var u=c&&c.target?c.target:"_blank",p=[];return l.forEach(function(t){t.title||c&&c.label||!t.rel||p.push(t.rel," - "),p.push('<a href="',t.href,'" target="',u,'">'),t.title?p.push(t.title):c&&c.label?p.push(c.label):p.push(t.href),p.push("</a>","<br/>")}),p.pop(),p.join("")}}if(null!=a){for(var h=void 0,h=1;h<i&&(a=a[r[h]],s=r[h],null!=a);h++);if(h===i&&null!=a){var d=void 0;if((d=void 0!==a.value?a.value:a)instanceof Date)return n&&n.dateFormat?d.toLocaleString(void 0,n.dateFormat):o.dateFormat?d.toLocaleString(void 0,o.dateFormat):d.toISOString();if("object"==typeof d)return(y=this._generateDynamicTableHtml(d,r.slice(1),o))||"";if("number"==typeof d){if(n){if(n.dateFormat)return new Date(d).toLocaleString(void 0,n.dateFormat);if(n.numberFormat)return d.toLocaleString(void 0,n.numberFormat)}else if(/(timestamp|date)/gi.test(s))return new Date(d).toISOString();return d.toLocaleString(void 0,o.numberFormat)}if("string"==typeof d&&""!==d&&!/[\n\r<>\s]/g.test(d)&&(o.detectHyperlinks||n&&n.hyperlinkFormat)){var d=d.trim(),f=this._isUrlRx.test(d)||n&&n.hyperlinkFormat,t=this._isImageUrlRx.test(d)&&(f||d.startsWith("data:image")),e=this._emailRx.test(d);if(f||t||e){f=void 0;n&&n.hyperlinkFormat?f=n.hyperlinkFormat:o&&o.hyperlinkFormat&&(f=o.hyperlinkFormat);var y=void 0;y=f&&f.target?' target="'+f.target+'"':' target="_blank"';o=""+(f&&f.label?f.label:d);f&&f.scheme?d=f.scheme+d:e&&(d="mailto:"+d);e=f&&f.label?' alt="'+f.label+'"':"";return'<a href="'+d+'"'+y+">"+(o=f&&f.isImage||t?'<img src="'+d+'" style="max-width:100%"'+e+'"/>':o)+"</a>"}}return d.toString()}}}return""},uh._generatePropertyInfoTable=function(o,t,n){if(o&&t&&0<t.length){var r=[],i=this;r.push('<table class="'+i.Css.table+'">'),t.forEach(function(t){var e=i._getPropertyValue(o,t.propertyPath,n,t);t.hideLabel?r.push('<tr><td colspan="2">',e,"</td></tr>"):(t=t.label||t.propertyPath.split("/")[0],r.push("<tr><th>",t,"</th><td>",e,"</td></tr>"))}),r.push("</table>");t=document.createElement("div");return t.innerHTML=r.join(""),t}return null},uh._generateDynamicTableHtml=function(e,t,o){var n=this;if(e){var r=[],i=this;r.push('<table class="'+i.Css.table+'">');var s=t&&0<t.length?t.join("/")+"/":"",a=0;return(Object.keys(e).forEach(function(t){n._ignoreProperty(t,e[t])||(r.push("<tr><th>",t,"</th><td>",i._getPropertyValue(e,s+t,o),"</td></tr>"),a++)}),0===a)?null:(r.push("</table>"),r.join(""))}return null},uh._ignoreProperty=function(t,e){switch(t){case"title":case"name":case"base":case"popupTemplate":case"anchor":case"icon":case"image":case"imageUrl":case"rotation":case"color":case"size":case"offset":case"strokeColor":case"strokeWidth":case"strokeOpacity":case"subType":case"fillColor":case"fillOpacity":case"visibility":case"visible":return!0;default:if(0===t.indexOf("_")||null==e||""===e)return!0}return!1},uh._placeholderRx=/\{([a-zA-Z0-9_\/\s]+)\}/gi,uh._isUrlRx=/^(http|https|ftp|tel|mailto):\/\//i,uh._isImageUrlRx=/(^data:image|.png$|.jpg$|.jpeg$|.gif$|.bmp$|.svg|.tif|.tiff$)/i,uh._emailRx=/^[^\.\s@:](?:[^\s@:]*[^\s@:\.])?@[^\.\s@]+(?:\.[^\.\s@]+)*$/,uh._cssUrl=new P({domain:e,path:"sdk/javascript/mapcontrol/"+M.getEndpointVersion()+"/atlas.min.css"}).toString(),uh.Css={template:"azure-maps-control-popup-template",title:"azure-maps-control-popup-template-title",content:"azure-maps-control-popup-template-content",item:"azure-maps-control-popup-template-content-item",table:"azure-maps-control-popup-template-table"},uh);function uh(){this.detectHyperlinks=!0,this.parsePropertyPaths=!0}n=new P({domain:e,path:"sdk/javascript/mapcontrol/"+M.getEndpointVersion()+"/mapbox-gl-rtl-text.min.js"});p.setRTLTextPlugin(n.toString(),function(t){t&&console.warn(t)},!0),u.HtmlMarker=mc,u.Map=m,u.Pixel=$n,u.Popup=cc,u.PopupTemplate=v,u.Shape=ui,u._getAssetDomain=function(){return t},u._getDomain=function(){return zc},u._hasMaxParallelImageRequests=Cl,u._hasSetAuthenticationOptions=wl,u._hasSetDomain=_l,u._hasSetLanguage=Ol,u._hasSetSessionId=Sl,u._hasSetStyleDefinitionsPath=bl,u._hasSetStyleDefinitionsVersion=function(){return Uc},u._hasSetView=Pl,u._hasWorkerCount=xl,u.addImageTemplate=function(t,e,o){!o&&Ll[t.toLowerCase()]||(Ll[t.toLowerCase()]=e)},u.clearPrewarmedResources=function(){p.clearPrewarmedResources()},u.control=wt,u.data=dt,u.getAllImageTemplateNames=function(){return Object.keys(Ll)},u.getAuthenticationOptions=Jc,u.getDomain=Xc,u.getImageTemplate=vl,u.getLanguage=rl,u.getMaxParallelImageRequests=nl,u.getSessionId=il,u.getStaticAssetsDomain=$c,u.getStyleAPIVersion=el,u.getStyleDefinitionsPath=Qc,u.getStyleDefinitionsVersion=tl,u.getSubscriptionKey=sl,u.getUserRegion=function(){return Ec},u.getVersion=function(){return M.getFullVersion()},u.getView=al,u.getWorkerCount=ol,u.internal=G,u.isSupported=cl,u.layer=bt,u.math=_t,u.prewarm=function(){p.prewarm()},u.setAuthenticationOptions=ll,u.setDomain=ul,u.setLanguage=fl,u.setMaxParallelImageRequests=dl,u.setSessionId=yl,u.setStyleAPIVersion=function(t){Fc=t},u.setStyleDefinitionsPath=pl,u.setStyleDefinitionsVersion=function(t){Bc=t,Uc=!0},u.setSubscriptionKey=ml,u.setUserRegion=gl,u.setView=function(t){Ec=t,Zc=!0},u.setWorkerCount=hl,u.source=ct,Object.defineProperty(u,"__esModule",{value:!0})});